---
title: "Darkleech: What is it and How to Detect It"
description: "Twitter is abuzz today about the recent Apache worm that causes servers to participate in a new threat called \"Darkleech.\"  Apache servers s"
---

- [Home](https://mydev.netwitness.com/home)
- Integrations 
    - [Netwitness Platform Integrations](https://mydev.netwitness.com/netwitnessplatformintegrations)
    - [Third Party Integrations](https://mydev.netwitness.com/thirdpartyintegrations)
- [Knowledge Center](https://mydev.netwitness.com/knowledge-base)
- Community 
    - [Blogs](https://mydev.netwitness.com/netwitness-security-llc-blog)
    - Discussions
- Customers 
    - [Manage Products and Licenses](https://mydev.netwitness.com/nwportal)
    - Downloads
- Partners 
    - [Partner Program](https://mydev.netwitness.com/partner)
    - [Partner Resources](https://mydev.netwitness.com/partnerresources)
    - [Submit a New Deal Registration](https://mydev.netwitness.com/dealregistration)
    - [Become a Partner](https://mydev.netwitness.com/becomeapartner)
    - [Update Your Partner Locator Profile](https://www.netwitness.com/partner-locator/?utm_source=pardotnewsletter&utm_medium=email&utm_campaign=partner_march)
    - [NetWitness LinkedIn Partner Hub](https://linkedin.com/showcase/netwitnesspartners/)
- Education 
    - [Instructor Led Training Schedule](https://mydev.netwitness.com/instructorledtrainingschedule)
    - [NetWitness Training Catalog](https://mydev.netwitness.com/netwitnesstrainingcatalog)
    - [Security Awareness Training](https://mydev.netwitness.com/securityawarenesstraining)
    - [New Product Readiness](https://mydev.netwitness.com/newproductreadiness)
    - [On-Demand Virtual Labs](https://mydev.netwitness.com/ondemandvirtuallabs)
    - [Additional Training Information](https://mydev.netwitness.com/additionaltraininginformation)
    - [Frequently Asked Questions](https://mydev.netwitness.com/educationfaq)
    - [Contact NetWitness Education Team](https://mydev.netwitness.com/contact-netwitness-education-team)
- Support 
    - [Contact Support](https://mydev.netwitness.com/contact-support)
    - [Create a New Case](https://mydev.netwitness.com/create-support-case)
    - [View My Cases](https://mydev.netwitness.com/viewmycase)
    - [Product Version Life Cycle](https://mydev.netwitness.com/product-version-life-cycle)
    - [Warranty & Replacement Parts](https://mydev.netwitness.com/warranty-and-replacement-parts)
    - [Community Support Forum](https://mydev.netwitness.com/community-support-forum)
    - [Technical Support Guide](https://mydev.netwitness.com/technical-support-guide)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

# Darkleech: What is it and How to Detect It

- Home
 */*- [Netwitness blogs](https://mydev.netwitness.com/netwitness-security-llc-blog)
*/*- darkleech: what is it and how to detect it

 3 Apr, 2013

**Author:** RSAAdmin

Twitter is abuzz today about the recent Apache worm that causes servers to participate in a new threat called "Darkleech."  Apache servers seem to have vulnerable modules that allow attackers to inject iframes into the browsers of certain web visitors delivering exploit code.  [ArsTechnica broke the story here](http://arstechnica.com/security/2013/04/exclusive-ongoing-malware-attack-targeting-apache-hijacks-20000-sites/)

![darkleech.jpg](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/24175i80493CA850099987.jpg "darkleech.jpg")

The story is very helpful in pointing out exactly what the meta would look like if one of your enterprise users encountered the Darkleech string. 

> | The injected HTML iframe tag is usually constructed as `IP address/hex/q.php`. Sites that deliver such iframes that aren't visible within the HTML source are likely compromised by Darkleech. Special "regular expression" searches such as [this one](http://urlquery.net/search.php?q=\%2F[a-f0-9]{32}\%2Fq.php&type=regexp&start=2013-02-27&end=2013-03-14&max=400) helped Landesman ferret out reported iframes used in these attacks. Note that while the iframe reference is formed as `IP/hex/q.php`, the malware delivery is formed as `IP/hex/hex/q.php`. |
> | --- |

To clarify, the directory is not "hex" but a long hexadecimal string that changes.  This is still not a big problem to detect.  We have already published rules to Live that identifies suspiciously long directories and filenames.  But the key piece of meta here is the direct to IP get request.  We have a risk.suspicious meta alert for just such an event.

The story also [links to Urlquery.net](http://urlquery.net/search.php?q=\%2F[a-f0-9]{32}\%2Fq.php&type=regexp&start=2013-02-27&end=2013-03-14&max=400) and provides a long list of likely compromised sites.  The most helpful part is the urls produced.  Here's a sample:

> | hxxp://195.189.114.10/ae1b9cc49ddca4ebe9ee068e06739c7d/ae1b9cc49ddca4ebe9ee068e06739c7d/q.php?omwsi=31:1l:1f:2v:1k |
> | --- |

The get request shows a direct to IP connection, followed by two hex-string directories, followed by the filename of q.php with a query appended after the question mark.  So a rule to detect this in Security Analytics would be:

**risk.suspicious = 'direct to ip http request' && filename = 'q.php' && query exists**

Name the rule Darkleech Detected and push it to your decoders.

The same rule can be used as a custom query to look backwards in time to see if anyone has visited a Darkleech site in the past.  As  reminder, **do the custom drill on the past three hours first, and then change the timeframe to all data.**

Thanks and Happy Hunting!

-Fielder of RSA FirstWatch

 Topic:

[0 Comment](https://mydev.netwitness.com/netwitness-security-llc-blog/darkleech-whatisitandhowtodetectit#comments-listing)

###### CATEGORIES

- All
- [Blog](https://mydev.netwitness.com/netwitness-security-llc-blog/tag/blog)

##### RECENT POST

[Netwitness Platform Integration with AWS Application Load Balancer Access logs](https://mydev.netwitness.com/netwitness-security-llc-blog/netwitnessplatformintegrationwithawsapplicationloadbalanceraccesslogs)

 23 Jul, 2024

[The Sky Is Crying: The Wake of the 19 JUL 2024 CrowdStrike Content Update for Microsoft Windows and We Should Take Away From It](https://mydev.netwitness.com/netwitness-security-llc-blog/715124)

 20 Jul, 2024

[DDoS using BotNet Use Case](https://mydev.netwitness.com/netwitness-security-llc-blog/ddosusingbotnetusecase)

 7 May, 2024

[NetWitness Platform](https://www.netwitness.com/)

[Acceptable Use Policy](https://www.netwitness.com/wp-content/uploads/Acceptable-Use-Policy-092022.pdf) [Privacy Statement](https://www.netwitness.com/wp-content/uploads/NetWitness-Privacy-Statement-07292024.pdf)

![NetWitness Logo](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/netwitness-logo-RGB-white%201.png)

[![LinkedIn](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/linkedin.png)](https://www.linkedin.com/company/netwitness-platform/) [![YouTube](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/Youtube.jpg)](https://www.youtube.com/@netwitness)

© 2026 NetWitness LLC. All rights reserved.

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "RSAAdmin",
    "url" : "https://mydev.netwitness.com/netwitness-security-llc-blog/author/rsaadmin"
  },
  "dateModified" : "2026-03-20T14:09:33.811Z",
  "datePublished" : "2013-04-03T04:00:00.000Z",
  "headline" : "Darkleech: What is it and How to Detect It",
  "mainEntityOfPage" : {
    "@id" : "https://mydev.netwitness.com/netwitness-security-llc-blog/darkleech-whatisitandhowtodetectit",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://mydev.netwitness.com/hubfs/netwitness-logo-CMYK.jpg"
    }
  }
}
```