Threat Research

Now You See Me - H-worm by Houdini

Thoufique Haq, Ned Moran
Sep 24, 2013
4 min read
|   Last updated: Apr 03, 2024

H-worm is a VBS (Visual Basic Script) based RAT written by an individual going by the name Houdini. We believe the author is based in Algeria and has connections to njq8, the author of njw0rm [1] and njRAT/LV [2] through means of a shared or common code base. We have seen the H-worm RAT being employed in targeted attacks against the international energy industry; however, we also see it being employed in a wider context as run of the mill attacks through spammed email attachments and malicious links.

The Payload

The H-worm payload is simply a VBS file, which is often wrapped, in a PE executable dropper. The H-worm VBS file is also packed with multiple layers of obfuscation in some cases. While analyzing such samples (81c153256efd9161f4d89fe5fd7015bc and 4543daa6936dde54dda8782b89d5daf1), we discovered that they were obfuscated with custom Base64 encoding, multiple levels of standard Base64 encoding (Safa Crypter), and character substitutions. The obfuscation techniques [3] used have been described and are summarized in Figure 1 below. There is also an Autoit version of H-worm called the "underworld version" floating around which has the same functionality as the VBS version.

Multiple layers of obfuscation
Figure 1: Multiple layers of obfuscation

Dissecting Command and Control (CnC) Behavior

Upon successful compromise, the worm generates network telemetry (beacon), as shown below:

POST /is-ready HTTP/1.1

Accept: */*

Accept-Language: en-us

User-Agent: {DiskVolumeSerial}<|>{Hostname}<|>{Username}<|>{OS}<|>plus<|>{AVProductInstalled or nan-av}<|>{USBSpread: true or false} - {CurrentSystemDate}

Accept-Encoding: gzip, deflate


Content-Length: 0

Connection: Keep-Alive

Cache-Control: no-cache

As seen in the beacon, it sends out various pieces of sensitive identification information in the User-Agent field. We have also observed versions where the URI was modified to use other strings such as "POST /I_AM_READY". The keyword "<|>plus<|>" is constant in the beacon but we have seen versions where this was modified as well. We saw instances where "<|>underworld final<|>" was used instead. It expects a response of the form:


The worm supports the following remote commands:

CommandDescriptionCommunication Request generated
execute executeExecutes param value using 'execute' Executes param value using 'execute'- -
update updateReplaces the payload and restarts with the wscript engine Replaces the payload and restarts with the wscript engine- -
uninstall uninstallDeletes startup entries and payload Deletes startup entries and payload- -
send sendDownloads file from CnC server Downloads file from CnC serverPOST /is-sending<|>{FileURL}… POST /is-sending<|>{FileURL}…
site-send site-sendDownloads file from URL Downloads file from URLGET /{FileURL}… GET /{FileURL}…
recv recvUploads file to CnC server Uploads file to CnC serverPOST / is-recving<|>{FilePath}… POST / is-recving<|>{FilePath}…
enum-driver enum-driverSends all drive information to the CnC Sends all drive information to the CnCPOST /is-enum-driver…{DrivePath|DriveType<|>…} POST /is-enum-driver…{DrivePath|DriveType<|>…}
enum-faf enum-fafSends all file and folder attributes in a specified directory Sends all file and folder attributes in a specified directoryPOST /is-enum-faf…{FolderName|(FileSize)|(d|f)|Attributes<|>…} POST /is-enum-faf…{FolderName|(FileSize)|(d|f)|Attributes<|>…}
enum-process enum-processSends all running processed Sends all running processedPOST /is-enum-process…{Name|PID|Path<|>…} POST /is-enum-process…{Name|PID|Path<|>…}
cmd-shell cmd-shellExecutes param value with ‘cmd.exe /c’ and returns result Executes param value with ‘cmd.exe /c’ and returns resultPOST /is-cmd-shell…{Result} POST /is-cmd-shell…{Result}
delete deleteDeletes file or folder specified in param Deletes file or folder specified in param- -
exit-process exit-processKills process specified in param Kills process specified in param- -
sleep sleepSleep call in param is passed to eval() Sleep call in param is passed to eval()- -

Table 1 - Remote commands available in H-worm

Behind The Curtains

The control panel for H-worm has a builder and a controller interface to interact with the infected machine. The control panel is written in Delphi. Some of the features such as password grabber and USB spreading were not functional in the versions we analyzed. These features could be operational in newer versions of H-worm.

Control panel of H-worm
Figure 2: Control panel of H-worm

The author, Houdini, has a portal to show off his wares, which hosts a demonstration video of H-worm. The contents of the portal indicate that he is proficient in both French and Arabic. Based on this and various other identifiable clues in the video, it is likely that the author of H-worm is from Algeria. We also believe the thumbnail images briefly seen in the video may be of the author himself. For the keen eyed observers, it is also evident that the author likes to play "Beetle Bug 2" and "Chicken invaders 4".

Snippets from Houdini's demo of H-worm
Figure 3: Snippets from Houdini's demo of H-worm

CnC Intel Analysis

On further analysis of the command and control infrastructure, we discovered that the CnC infrastructure used by some of the H-worm variants were shared by others RATs such as NjW0rm, njRat/LV, XtremeRAT, and PoisonIvy. The attackers behind these instances appear to have an arsenal of RATs at their disposal, in order to perform various attack campaigns.

CnC DomainOther associated RATs
sidisalim.myvnc.comLV82e6fc9a6b06fb51c134ba1755be23be, e96a6b06b0b46bd3cde7137c47137643
securityfocus.bounceme.netLV72679f31721e82111cc8797e0a6d7db48fa4, 0399e7bdcb2664a7634ac3ad3140, 471d61e7a3d936fa28efef3273b2dbd6
PoisonIvyd833ba1b0ac9b512382433f47084bf52, eaba668520690207f07eb99fcd4c0cae

Table 2 - Direct overlaps on command and control infrastructure

Possible Connections to the njq8 Enterprise

We recently talked about njw0rm [1] and the author behind it, njq8. We found strong connections indicating that njw0rm and njRAT/LV [2] were written by the same author. We believe H-worm is also linked to njq8, through a shared code base. An earlier version of H-worm [4] was analyzed, by another researcher. It is evident from this older version, that the client side module was originally coded by njq8. The older version beacons with "POST /ready" instead of "POST /is-ready", as seen in the newer versions. This blog was re-tweeted on the njq8 twitter page. Our earlier njw0rm blog was also promptly re-tweeted on the njq8 twitter page.  It is unclear how connected Houdini and njq8 are, but it is likely that njq8 is a group of individuals collaborating on the development of RATs, or alternatively, there are development forks on the same code base by multiple authors.

Common code base and njq8 connections
Figure 4: Common code base and njq8 connections

H-worm Hashes













H-worm Command and Control (CnC) Infrastructure


[1] /content/fireeye-www/global/en/www/blog/threat-research/2013/08/njw0rm-brother-from-the-same-mother.html

[2] /content/fireeye-www/global/en/www/blog/threat-research/2012/09/the-story-behind-backdoorlv.html



We would like to thank Darien Kindlund, Nart Villeneuve, Uttang Dawda, Mike Scott, and Ali Mesdaq for their help and support.