Skip to content

sdBot / spyBot Family

The sdBot family, originally authored by a developer known as [sd], represents the foundational IRC bot codebase from which the entire rBot/rxBot lineage descended. With 73 directory entries (~42 unique specimens), this family documents the complete arc from amateur single-file C bots to professionally engineered object-oriented malware platforms.

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


2002 sdbot 0.4b - original by [sd], single-file C
2003 sdbot 0.5a/0.5b + Tesla SYN mod
2003 spyBot 1.1–1.3 - Mich's keylogger fork
2003-04 spyBot 1.4 + sdbot community mods proliferate
2004 rBot forks off (see rBot/rxBot page)
2005-07 120-series emerges (sdBot lineage via rxBot)
2008 SDX/SBX OOP rewrites - maturation endpoint

Source: sdbot04b/sdbot04b.c

View source

The initial public version of sdBot is characterized by stark simplicity - a defining trait of early 2000s malware. The entire bot is contained within a single C file.

CharacteristicDetail
LanguageC (compiled with LCC)
ArchitectureMonolithic, single-file, procedural
VariablesGlobal state, hardcoded configuration
C2 ProtocolIRC - connects to hardcoded server/channel
Command ParsingPrefix-based (.) from PRIVMSG messages

sdbot04b's capabilities are rudimentary but effective for its era:

CommandFunctionMITRE ATT&CK
udpUDP denial of service floodT1498 (Network DoS)
pingICMP flood attackT1498 (Network DoS)
downloadFetch file from URL and executeT1105 (Ingress Tool Transfer)
updateSelf-update from remote URLT1105 (Ingress Tool Transfer)
sysinfoGather and report system infoT1082 (System Information Discovery)
redirectTCP port redirector (proxy)T1090 (Proxy)
// Pseudocode - sdbot04b persistence
CopyFile(self, "%SYSTEMDIR%\\bot_filename.exe");
RegSetValue(
HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices,
"bot_key", bot_path
);

The bot achieves persistence by copying itself to the Windows System directory and creating a registry key under RunServices - the simplest possible autostart mechanism.

Technique IDTechnique NameImplementation
T1095Non-Application Layer ProtocolIRC for C2 communication
T1041Exfiltration Over C2 ChannelSystem info sent via IRC
T1568.002Dynamic Resolution: DNSC2 server identified by DNS name
T1498Network Denial of Serviceudp and ping commands
T1105Ingress Tool Transferdownload command
T1547.001Registry Run KeysRunServices persistence

Source: sdbot05b/sdbot05b.c

View source

The final public release of the original sdBot series demonstrates incremental but significant feature creep - a common evolutionary pattern in malware development.

FeatureSignificance
Backup server (server2, port2)Fallback C2 - simple but dramatically increases botnet resilience
Enhanced scanningIncludes icmp.dll, kernel32.dll process functions for future scanning
visit commandSilently visits a URL - precursor to click-fraud bots
Conditional compilationMore #define flags for feature toggling before compilation

The visit Command - A New Monetization Vector

Section titled “The visit Command - A New Monetization Vector”

The addition of the visit command was a pivotal moment. It allowed operators to:

  • Generate fraudulent ad revenue (click fraud)
  • Drive traffic to exploit kit landing pages
  • Participate in pay-per-install schemes

This opened monetization pathways beyond simple DDoS-for-hire.

Technique IDTechnique NameImplementation
T1568.001Dynamic Resolution: Fast Flux DNSBackup server concept
T1189Drive-by Compromisevisit command directing bots to exploit kits

SpyBot 1.4 - The Rise of Information Stealing

Section titled “SpyBot 1.4 - The Rise of Information Stealing”

Source: spybot1.4/spybot.c

View source

SpyBot represents the most significant fork from the original sdBot codebase. Authored by Mich, it extended the bot's purpose from a simple DoS tool to a multi-functional espionage platform, introducing threat categories that would become staples of modern malware.

SpyBot integrated the Windows hook API for keystroke capture:

// Pseudocode - SpyBot keylogging approach
HHOOK hook = Set​Windows​HookEx(
WH_KEYBOARD_LL, // Low-level keyboard hook
KeyboardProc, // Hook callback function
hInstance, // Module handle
0 // All threads
);
// KeyboardProc logs keystrokes to file/channel
// including window title for context

This captured usernames, passwords, and chat messages - with the active window title providing context for which application the keystrokes belonged to.

Beyond keylogging, SpyBot actively searched for cached passwords:

TargetMethod
Web browserscachedpasswords function - reads Windows Protected Storage
FTP clientsFile/registry parsing for saved credentials
IM clientsProfile/config file extraction

SpyBot spread via the popular communication applications of its era:

ApplicationSpreading Method
KazaaDrop bot into shared download folder with enticing filename
MSN MessengerSend lure message with download link to contact list
Other P2PCopy to generic shared folders

The bot could start a small HTTP server, allowing the attacker to browse the victim's file system remotely using any web browser - a primitive but effective RAT capability.

Technique IDTechnique NameImplementation
T1056.001Input Capture: KeyloggingSet​Windows​HookEx keyboard hook
T1555Credentials from Password Storescachedpasswords function
T1573Encrypted ChannelEncrypted command parameters
T1071.004Application Layer Protocol: P2PKazaa/P2P spreading
T1005Data from Local SystemActive password file searches

SpyBot's information-stealing capabilities forced a paradigm shift in defense:

  • Network-based defenses alone were no longer sufficient - host-based detection became critical
  • Behavioral monitoring for suspicious API calls (like Set​Windows​HookEx) became a priority
  • User education gained importance as IM-based spreading exploited social trust

SDX.amk.0x00 - Maturation of Malware Engineering

Section titled “SDX.amk.0x00 - Maturation of Malware Engineering”

Source: SDX.amk.0x00/Src/

View source

SDX marks a crucial step in the professionalization of malware development. It was a ground-up rewrite in C++ adopting Object-Oriented Programming (OOP) principles - a stark contrast to the monolithic C files of its predecessors.

ComponentFile(s)Purpose
Core definitionsSDX.hMain bot structure and interfaces
UtilitiesUtilities.h, Utilities.cppProcess killing, hosts file modification
User managementclient.huser_list_t, FindUser, AddUser, DelLogin
Configurationconfig.hCentralized settings with XOR encryption
IRC handlingDedicated moduleProtocol parsing and command dispatch

Modular, OOP Design: The code is broken into logical components with defined interfaces. The use of structs and associated functions (e.g., user_list_t, FindUser) mimics a class-based structure - a significant architectural maturation.

Abstraction and Encapsulation: Functionality is grouped logically. User management (AddUser, DelLogin) is handled by dedicated functions, separated from core IRC logic. The Utilities module encapsulates malicious actions (process killing, hosts modification).

Encrypted Configuration: All configuration strings (server, channel, password) are stored in XOR-encrypted format and decoded at runtime:

// Pseudocode - SDX configuration decryption
char* DecryptConfig(char* encrypted, int key) {
char* result = malloc(strlen(encrypted));
for (int i = 0; i < strlen(encrypted); i++) {
result[i] = encrypted[i] ^ key;
}
return result;
}
// Usage at startup
char* server = DecryptConfig(enc_server, XOR_KEY);
char* channel = DecryptConfig(enc_channel, XOR_KEY);
Technique IDTechnique NameImplementation
T1027Obfuscated Files or InformationXOR-encrypted configuration
T1140Deobfuscate/Decode Files or InformationRuntime configuration decryption
T1587Develop CapabilitiesOOP framework investment
  • Static analysis difficulty increased - analysts could no longer run strings on the binary to find C2 servers
  • Behavioral analysis became essential - detecting actions (IRC connection, process scanning, hosts modification) outweighed signature matching
  • Reverse engineering workload grew - decryption routines had to be identified and emulated first

Sub-GroupCountKey Characteristics
Original sdBot (v0.4b–0.5b)13By [sd], single-file C source, LCC compiler
sdBot v0.5b mods/forks24Community mods: b0rg, skbot, fake xdcc, getadm
spyBot versions (v1.1–1.4)24By Mich, adds keylogger + HTTP server + spreading
120-Series (sdBot via rxBot)21BuZ's modular rebuild with VNC/MySQL/MSSQL
svBot offshoots2Independent IRC bots in same niche
Sbot-RARSpreader1RAR archive infection variant

Featuresdbot04bsdbot05bSpyBot 1.4SDX
LanguageCCCC++ (OOP)
Files111Multiple modules
C2 Servers12 (failover)1+Configurable
DDoSUDP, ICMPUDP, ICMPUDP, ICMP, SYNFull suite
Keylogging❌❌✅✅
Password Theft❌❌✅✅
IM Spreading❌❌✅ (Kazaa, MSN)✅
String Encryption❌❌PartialXOR
Click Fraud❌✅ (visit)✅✅

The rBot family forked from sdBot around 2003–2004. The fork point is documented explicitly in rBot source headers:

Authors:
sdbot: sd
rbot: Nils, D3ADLiN3, Edge, bohika, rewe, racerx91

Key differences at fork time:

  • rBot focused on exploit integration and modular architecture
  • sdBot mods continued as simpler, more accessible variants for lower-skill operators
  • SpyBot diverged toward information stealing capabilities
  • Both lineages eventually converged in the 120-series which incorporated features from both branches

For the rBot side of the family tree, see the rBot / rxBot Family page.


All specimens referenced in this analysis are available in the archived collection: