Citadel Trojan Outgrowing Its Zeus Origins

As of April 30th 2012 the Citadel Trojan is at its fourth upgrade with Version 1.3.4.0 already in the hands of its customers. Citadel’s features, bug fixes, and added modules (each priced separately), have long gone beyond what Zeus ever offered as Slavik’s zeal for developing the malware died down when law enforcement got too close for comfort.

It is already very clear that Citadel is the new Zeus in more ways than one: it was based on the Zeus code and it has all the functions going way beyond any crimeware kit to date. More importantly, it is the only commercial malware in the cybercrime arena being aggressively marketed to criminals at this time, and quite logically, Citadel is slowly but surely converting Zeus operators and bringing them to its ranks, taking over Zeus’ market-share.

Putting one’s self in the shoes of a cybercriminal who has just decided to begin bot-herding, what would the first thing on the “to do” list be? How about seeking-out a crime kit that will provide technical set-up, support, CRM, updates and in-depth understanding of cybercrime? It has to be commercially available, check; and its developers have to be serious and responsive, check. In a Jeopardy game, the obvious reply would be “What is Citadel?

Citadel is all about money, conceived for sheer greed both from the developers’ side and from its nefarious clientele’s end of things. Judging by how Citadel is managed, developed and marketed, it is not surprising to see Team Citadel post indulgent satirical images as part of its cybercrime-centric sales campaigns.

Citadel – What Really Changed Since Zeus v2?

RSA researchers have been analyzing variants of the Citadel Trojan and setting apart the hype from factual changes made to Citadel that were written differently in its base code, Zeus v2.0.8.9. 

The following functions are the main changes observed to date:

Feature Added

Basic Detail

Trojan’s encryption method

Citadel uses a more sophisticated encryption method to have its bots communicate with the C&C servers, including hardcoded keys, RC4 and AES[1] combined.

Local Pharming

Citadel hooks local DNS-related Windows functions and can be configured to redirect any host to any IP, thus enabling the fraudster to both create more “reliable” phishing attacks and isolate victim machines from AV services.

More functions hooks

With its hooking variety, Citadel covers a much larger array of Windows functions than Zeus ever did.

The C&C server side

The Citadel botnet has been patched against common attack methods that plagued Zeus.

 

The Citadel Encryption Method

Going back to how the communication was programmed to happen between Zeus v2 variants and their C&C servers researchers recall it was encrypted[1] with a symmetric encryption algorithm: RC4, with a pre-shared key defined by the builder. 

Some variants of Zeus were seen using AES encryption instead of RC4, which is stronger, and still used with a predefined key.

Citadel combined those two encryption methods, and topped them with an additional layer: 

  • Every Citadel variant has a hardcoded MD5 string (probably a hash of the password set by the builder) in addition to the RC4 key.
  • In runtime, the MD5 string is run through MD5 function a second time 
  • The result (the new MD5) is then encrypted using RC4 with the stored key
  • That final result is used in the creation of an AES encryption/decryption key using AES schedule routines
  • The Trojan’s communication is then encrypted using AES encryption. 

This three-fold effort provides botmasters with strong encryption out of the box – even if they were to choose a weak password, it would practically be impossible to brute-force or break into their bots’ communications.

Local Pharming: Citadel’s Custom DNS Redirection

Right from its first release, Citadel introduced this new option to botmasters, designed to allow them to change the behavior of name resolution on infected machines. Bottom line, this means that the botmaster can decide which URLs the victim can or cannot reach, and what page the victim will land on instead of the original page they were looking for. Local Pharming at its best. 

This particular redirection scheme occurs by installing hooks on two DNS related functions:

  1. gethostbyname
  2. getaddrinfo

In order to implement this functionality, a new block was added to the config file, containing names and IP pairs.

Whenever an infected process[2] tries to resolve a hostname to an IP address, the request will first pass through Citadel’s routines. The Trojan will then try to resolve the address using regular mechanisms; if successful, it will check its own configuration for a name/IP pair match.

If such a match is found – the Trojan will return the pre-defined (fraudulent) address to the caller.

It’s worth mentioning that if the regular DNS request fails (domain does not exist, network timeout etc.) – Citadel will return the original error message to the caller, even if a matching address is found in its botmaster’s config. This behavior makes the redirection appear less suspicious in aspects of network monitoring and typical request/answer times.

The local Pharming functionality allows botnet operators to leverage two main attack vectors: 

  • Isolation of the infected machine, blocking its access to certain “unwanted” services, including AV providers, web-based malware scans, security providers’ web sites, abuse lists and malware update servers.  Team Citadel has been keeping on top of things and makes sure the Trojan comes bundled     with a very long list of known security-related servers and numerous specific URLs for each, to   begin with. In one variant studied by RSA, this list was composed of over 650 different URLs. 
  • The second attack vector that can be facilitated greatly by local Pharming is the deployment of sophisticated phishing attacks, redirecting Trojan-infected victims to fraudulent servers when they attempt to reach a legitimate URL via their browser. 

DNS redirection can be a part of SSL compromise attacks, along with other Trojan capabilities.

Citadel’s Windows Hooks

Zeus v2 and all its offspring and variants create function hooks in processes they inject themselves into. 

Citadel too, is a Trojan that hooks Windows processes, taking hostage a larger number of functions than Zeus does in its v2 samples:

CreateProcessAsUserA

CreateProcessAsUserW

PlaySoundA

PlaySoundW

gethostbyname

getaddrinfo

These additional hooks cause the program execution flow to pass through Citadel on more events than Zeus monitored, and may also suggest the development of future capabilities of the Trojan. 

The last two process hooks have to do with the DNS redirection routine explained in the previous section of this report.

Citadel’s Chrome browser hooks

Zeus v2 is known for its form-grabbing capabilities and its efficient HTTP injection mechanism, but although Zeus plugins were written to target Firefox and opera, Zeus variants were never programmed to target the Chrome[3] browser specifically.

Citadel’s team did develop this ability and now the Trojan, when injected into Chrome browser’s memory space at runtime, hooks Chrome-specific core functions in chrome.dll.

Citadel’s C&C Server-Side Improvements and Security Patches

The Citadel Trojan used the well known Zeus server panel and patched it against web-based attacks. Another minor change is in the panel’s visual design, making it appear more professional for the users and affording added control over infected bots. Many of Citadel’s functions and options are embedded into the panel ad-hoc as the team sees fit.

The Cost of Cybercrime with Citadel

What can a cyber crook expect to pay for this next generation crimeware kit?  The following table represents the selling price today for Citadel and its respective technical set-up, support, updates and other various features: 

Feature Overview Cost
Citadel VNCFox 2012 Connect infected machines via remote administration tool (VNC) $495 USD / €375
Citadel SOCKS Checker Allows access and proxy traffic through bots located on different botnets. 

Uses real web browsing to check the target bot’s match, up to 99.9% accuracy rate.

$49 USD / €37
CBOT EXE Auto-Encryption Plugin Automates the encryption task for new variants created $395 USD / €300 +Pay per crypt at $15/ €11.50
Log Parser Plugin Adds filtering options to the immense amounts of stolen incoming data 295 USD / €225
“CardSwipe” module Picks out card numbers from outgoing web traffic $250 / €190
Automatic iFramer of FTP accounts from logs Steals FTP account credentials from bots and feeds them into iFrames that facilitate traffic to the botnet’s infection points. $1000 / €755
GeoIP-filter Provides protection against tracking and unwanted attention by filtering out complete country IP ranges. $380 / €290
Duplicates-Cleaner Complete removal of all incoming duplicate records from logs working non-stop $90 / €70
The Citadel CRM Membership Community, support, business partners, advertising, forum Monthly fee $125 USD (€95), from each user.

What does Citadel’s Future Hold?

The team developing Citadel appears to be taking the project very seriously and seems to be working tirelessly on patching clunky Zeus mechanisms and adding new ones, making the Trojan increasingly modular and adapted to cybercrime endeavors.

Because of its major similarities to the Zeus v2 assembly, Citadel is still very much like its forefather.  The Citadel Trojan is being aggressively marketed within the fraud underground and will be a crimeware to be reckoned with in 2012.  RSA is conducting research into the Citadel Trojan on an ongoing basis and will continue to report on new findings as they become available.

 


 

 [1] Active Zeus v2 variants still use this method today

[2] (could be every process on an infected machine)

[3] Google Chrome is an Internet browser based on Chromium – the open source web browser project from which Google drew its primary source code.

 


[1] Advanced Encryption Standard (AES) is a specification for the encryption of electronic data

Citadel Outgrowing its Zeus Origins

By Limor S Kessem, Cybercrime and Online Fraud Communications Specialist, RSA

As of April 30th, 2012 the Citadel Trojan was at its fourth upgrade with Version 1.3.4.0 already in the hands of its customers. Citadel’s features, bug fixes and added modules (each priced separately), have long gone beyond what Zeus ever offered as Slavik’s zeal for developing the malware died down when law enforcement got too close for the Trojan creator’s comfort.

It is already very clear that Citadel is the new Zeus in more ways than one: it was based on the Zeus code and it has all the functions going way beyond any crimeware kit to date. More importantly, it is the only commercial malware in the cybercrime arena being aggressively marketed to criminals at this time, and quite logically, Citadel is slowly but surely converting Zeus operators and bringing them over to its ranks, further eroding Zeus’ market-share.

Putting one’s self in the shoes of a cybercriminal who has just decided to begin bot-herding, what would the first thing on the “to-do” list be? How about seeking-out a crime kit that will provide technical set-up, support, CRM, updates and in-depth understanding of cybercrime? It has to be commercially available – check; and its developers have to be serious and responsive – check as well. In a Jeopardy game, the obvious reply would be “What is Citadel?

Citadel is all about money, conceived for the purpose of fulfilling sheer greed both of its nefarious developers and dubious clientele. Judging by how Citadel is managed, developed and marketed, it is not surprising to see Team Citadel post indulgent, satirical images (like this one below) as part of its cybercrime-centric sales campaigns:

Citadel – What Really Changed Since Zeus v2?

RSA researchers have been analyzing variants of the Citadel Trojan and setting apart the hype from factual changes made to Citadel that were written differently in its base code, Zeus v2.0.8.9.

The following functions are the main changes observed to date:

The Citadel Encryption Method

Going back to how the communication was programmed to happen between Zeus v2 variants and their C&C servers researchers recall it was encrypted[1] with a symmetric encryption algorithm: RC4, with a pre-shared key defined by the builder.

Some variants of Zeus were seen using AES encryption instead of RC4, which is stronger, and still used with a predefined key.

Citadel combined those two encryption methods, and topped them with an additional layer:

  • Every Citadel variant has a hardcoded MD5 string (probably a hash of the password set by the builder) in addition to the RC4 key.
  • In runtime, the MD5 string is run through MD5 function a second time
  • The result (the new MD5) is then encrypted using RC4 with the stored key
  • That final result is used in the creation of an AES encryption/decryption key using AES schedule routines
  • The Trojan’s communication is then encrypted using AES encryption.

This three-fold effort provides botmasters with strong encryption out of the box – even if they were to choose a weak password, it would practically be impossible to brute-force or break into their bots’ communications.

Local Pharming: Citadel’s Custom DNS Redirection

Right from its first release, Citadel introduced this new option to botmasters, designed to allow them to change the behavior of name resolution on infected machines. Bottom line, this means that the botmaster can decide which URLs the victim can or cannot reach, and what page the victim will land on instead of the original page they were looking for. Local Pharming at its best.

This particular redirection scheme occurs by installing hooks on two DNS related functions:

  1. 1.       gethostbyname
  2. 2.       getaddrinfo

In order to implement this functionality, a new block was added to the config file, containing names and IP pairs.

Whenever an infected process[2] tries to resolve a hostname to an IP address, the request will first pass through Citadel’s routines. The Trojan will then try to resolve the address using regular mechanisms; if successful, it will check its own configuration for a name/IP pair match.

If such a match is found – the Trojan will return the pre-defined (fraudulent) address to the caller.

It’s worth mentioning that if the regular DNS request fails (domain does not exist, network timeout etc.) – Citadel will return the original error message to the caller, even if a matching address is found in its botmaster’s config. This behavior makes the redirection appear less suspicious in aspects of network monitoring and typical request/answer times.

The local Pharming functionality allows botnet operators to leverage two main attack vectors:

  • Isolation of the infected machine, blocking its access to certain “unwanted” services, including AV providers, web-based malware scans, security providers’ web sites, abuse lists and malware update servers.

Team Citadel has been keeping on top of things and makes sure the Trojan comes bundled with a very long list of known security-related servers and numerous specific URLs for each, to            begin with. In one variant studied by RSA, this list was composed of over 650 different URLs.

  • The second attack vector that can be facilitated greatly by local Pharming is the deployment of sophisticated phishing attacks, redirecting Trojan-infected victims to fraudulent servers when they attempt to reach a legitimate URL via their browser.

DNS redirection can be a part of SSL compromise attacks, along with other Trojan capabilities.

Citadel’s Windows Hooks

Zeus v2 and all its offspring and variants create function hooks in processes they inject themselves into.

Citadel too, is a Trojan that hooks Windows processes, taking hostage a larger number of functions than Zeus does in its v2 samples:

These additional hooks cause the program execution flow to pass through Citadel on more events than Zeus monitored, and may also suggest the development of future capabilities of the Trojan.

The last two process hooks have to do with the DNS redirection routine explained in the previous section of this report.

Citadel’s Chrome browser hooks

Zeus v2 is known for its form-grabbing capabilities and its efficient HTTP injection mechanism, but although Zeus plugins were written to target Firefox and opera, Zeus variants were never programmed to target the Chrome[1] browser specifically.

Citadel’s team did develop this ability and now the Trojan, when injected into Chrome browser’s memory space at runtime, hooks Chrome-specific core functions in chrome.dll.

Citadel’s C&C Server-Side Improvements and Security Patches

The Citadel Trojan used the well known Zeus server panel and patched it against web-based attacks. Another minor change is in the panel’s visual design, making it appear more professional for the users and affording added control over infected bots. Many of Citadel’s functions and options are embedded into the panel ad-hoc as the team sees fit.

The Cost of Cybercrime with Citadel

What can a cyber crook expect to pay for this next generation crimeware kit?  The following table represents the selling price today for Citadel and its respective technical set-up, support, updates and other various features:

What does Citadel’s Future Hold?

The team developing Citadel appears to be taking the project very seriously and seems to be working tirelessly on patching clunky Zeus mechanisms and adding new ones, making the Trojan increasingly modular and adapted to cybercrime endeavors.

Because of its major similarities to the Zeus v2 assembly, Citadel is still very much like its forefather.  The Citadel Trojan is being aggressively marketed within the fraud underground and will be a crimeware kit to be reckoned with in 2012.  RSA is conducting research into the Citadel Trojan on an ongoing basis and will continue to report on new findings as they become available.


[1] Google Chrome is an Internet browser based on Chromium – the open source web browser project from which Google drew its primary source code.


[1] Active Zeus v2 variants still use this method today

[2] (could be every process on an infected machine)

[1] Advanced Encryption Standard (AES) is a specification for the encryption of electronic data

Man-in-the-Middle For Hire

By Limor S Kessem, Cybercrime and Online Fraud Communications Specialist, RSA

Discussion and buzz about the burgeoning Fraud-as-a-Service (FaaS) trend in the cybercrime economy is as constant and as progressive as it gets. New FaaS offerings are only limited to the imagination of the dubious actors who offer them, and as such, are often creative and interesting in the ways by which they can make perpetrating fraud easier and more accessible to a growing number of criminals.

In some of the most recent FaaS offerings RSA noticed, it is interesting to see the Citadel Trojan developers’ team instruct “Crypters” to charge botmasters for their encryption services each time they provide them with a ‘crypt’ for their Citadel variant. This is a “pay-per-crypt” service, made accessible by a malware developing team that built a CRM system for their crimeware customers.

Another interesting offer put a twist on an old FaaS service – Internet traffic, with the added punch of cybercrime. Here, RSA’s FraudAction Research Lab analysts observed an interesting offering, “Man-in-the-Middle for Hire”.

This interesting offer came from a Russian-speaking cybercriminal, peddling his services to operate as the Man-in-the Middle for wire-fraud schemes. What would normally be part of a botmaster’s daily work, within the context of Trojan-assisted fraudulent transactions, is offered as an outsourced service to those interested in bypassing the entire process of building and upkeep of a botnet. This service would afford fraudsters direct access to victims without having to set up any of the infrastructure – via their very own Man-in-the-Middle.

The vendor is a botmaster himself, using a known banking Trojan that has a CAPTCHA-breaking module and links to exploit kits and attacks via legitimate websites (particularly Facebook and other social networks). Apparently, the vendor’s botnet is large and diverse enough that he can monetize it by renting his infected bots to the fraudsters who would actually commit the crime.

How will this work? In the fraudster’s words: “I enter in the middle of the connection and add a code with frame to the target page”. What does that actually mean?

  1. The vendor operates a botnet in which different bots (infected machines) are located in different countries and belong to customers of different banks.
  2. A fraudster-customer contacts the vendor and asks to forward a specific injection to the infected bots in a given country or to the customers of a specific bank.
  3. The vendor, who controls the botnet and bots’ browsers through the Trojan, can inject the fraudster-customer’s script into the victim’s banking session and have the stolen credentials go directly to that fraudster.
  4. Since the vendor also provides a remote control component, he can allow the buyer to take control over the infected PC and attempt session hijacking or other fraud scenarios.

The potential benefits of this service for less sophisticated fraudsters is a complete shortcut to the targeted theft of credentials and a way to attempt performing fraudulent transactions on Trojan-infected machines – without ever owning a Trojan or operating a botnet.

The potential drawbacks are the limited exclusivity of the bots, especially when it comes to the larger banks, but could be lucrative to fraudsters who wish to target credit unions or regional financial institutions that are in less demand or are less known.

This type of ‘service’ is part of the continuing trend of Fraud-as-a-Service supply chain in the black market where tech-savvy operators offer their help and resources to the actual thieves who will attempt to defraud accounts and cash them out.

Fortunately for security professionals, the mitigation methods for this MiTM attack are not affected since the fraudster is not offering a new attack method but rather creating a short-cut for those who plan to attempt accessing victim PCs. Similar results can be obtained otherwise by purchasing RDP access, which fraudsters have been doing for years; this offering tops that with custom injections and a live assistant.

Another side to this service offer is that the fraudster himself has to be available in real time to those demanding his assistance – unlike MITB and automated scripts, hands-on fraud schemes are time-consuming and can only target one victim at a time.

Gone Phishing and Mining! Phishers leverage Web Analytics to Refine Attacks

By Hook and by Crook – Citadel Trojan Isolates Bots from AV and Security

The Citadel Trojan was first introduced for sale to cybercriminals in the Russian-speaking underground in February 2012. The Trojan, which was initially based on the Zeus Trojan’s exposed source code, is already at its second upgrade release, version 1.3.3.0, which was shared with its customer-base on March 15th.

One of the features included in the initial report and communicated by Citadel’s developers in late February related to a Trojan feature the developers have apparently implemented: DNS Redirection. Per the feature list, the developer claims that unlike other Trojans, Citadel does not modify the “Hosts” file on the infected PC (all too often used for local Pharming), but rather allows the botmaster to block or redirect any URL they wish to prevent the bot from reaching.

To add value for their customers, the developers went the extra mile to add a list of AV software providers and security scans to the DNS redirection lists embedded into the configuration. On a change-log posting from the team, the developer specified that at least 104 different security-vendor URLs were added to this feature.

Fix/ Change applied by Citadel Team

Description

DNS redirection

Any URL can now be blocked/redirected, undetectable by heuristics. For example, block AV servers or redirect bank pages to a different host.

Bonus: The list of popular AV server URLs to block was included.

 Note: The redirection does not happen through the victim’s “Hosts” file.

Citadel Process Hooks Tamper with DNS Response, Isolate Bots from AV and Security Scans

RSA researchers were able to confirm that the DNS-redirection method embedded into the Citadel configuration file was not a feature available in the original Zeus Trojan—it is new programming, courtesy of the Citadel team.

Note that unlike local Pharming Trojans, in the case of Citadel this feature is not designed for redirection to malicious sites or phishing, but rather in order to isolate the victim from all AV and security providers. Preventing the user from browsing to AV scans or getting the software will also limit sampling of each variant.

The redirection action works by installing hooks on two specific Windows APIs: gethostbyname and getaddrinfo.

Whenever an infected process calls one of these functions in order to resolve a host name, the call will be passed through Citadel routines, where the redirection information and action list will dictate the next step.

The Trojan will call the original function, and make a choice based on these three options:

  • If the call for the URL requested fails (address doesn’t exist, no network connection etc.) –> return an error.
  • If the call for the URL requested succeeds –> search own config for a matching address and IP mask, and if found, return the configured fake address to the victim.
  • If the call for the URL requested succeeds and no matching IP mask is found in the Citadel config –> return the original address to the victim.

The ‘reply’ resulting would appear like a genuine DNS response per the victim’s query. Note that this channeling will only interfere with users’ requests when they attempt to contact a “Forbidden” URL, but will return the correct result in all other cases.

The Citadel Trojan’s configuration contained more than 650 different URLs of a large variety of AV-providers and security scanning services based out of different countries (USA, DE, RU and more). Each ‘forbidden’ URL was followed by a “=” mark and the IP mask address to which the botmaster wants the victim rerouted.

Citadel Resource Camouflage Dresses a Wolf in Sheep’s Clothing

Another interesting feature analyzed by RSA researchers appeared in a Citadel variant, raising questions as to redirection scheme to Citadel resources. At first sight, the analysis result seemed somewhat peculiar, showing that Citadel was using legitimate URLs as its C&C’s drop point as well as the configuration update point (Google, CNET).

In the case analyzed, such legitimate URLs included the Google toolbar and the download site at cnet.com. The infected PC’s “hosts” file remained untouched, as did the proxy settings within the victim’s browser. So what was being changed?

A “Checkfile” run exposed an equation from the Citadel configuration file, revealing the true destination of each—Citadel uses legitimate URLs which are being redirected to its resources.

The analysis of this feature showed that the Trojan’s query resolved (in memory), ending at an entirely different IP address; the DNS query confirmed the findings which were quite evidently typical Trojan resources.

hxxp://download.cnet.com/i/88.php|ip=184.82… (censored by RSA)hxxp://toolbar.google.com/img/capcha2.php|ip=64.120… (censored by RSA)

This camouflage method ‘dresses’ the malware resource with the name of innocuous popular services that will allow the Trojan to access its update point without being stopped by blacklists or tracking.

As reported recently by RSA, Citadel is just one of the many offspring of the infamous Zeus that is making great strides in the black market through rapid development.  This strain of financial malware is definitely on the “one to watch” list.