Framework Architecture
This webshell framework consists of two primary components:- Python C2 Interface - Client-side command and control scripts that communicate with deployed webshells
- ASP Webshells - Server-side scripts deployed on compromised IIS/ASP.NET servers
Command & Control Structure
The framework uses a Python-based interface to manage multiple compromised targets through an interactive shell. The C2 infrastructure includes:- Target Selection Menu - Multiple pre-configured targets with hardcoded URLs
- Command Encoding - Custom character substitution cipher to obfuscate commands
- HTTP-based Communication - Commands transmitted via HTTP headers
- Interactive Shell - readline-based interface for operator interaction
Communication Protocol
Commands are transmitted through HTTP headers, specifically using theAccept-Language header to avoid detection:
Accept-Captcha header contains a static token, while Accept-Language carries the actual command payload.
Target Infrastructure
The framework was configured to target multiple organizations:Target 1: uniforms.flydubai.com
- Webshell disguised as a photo file
- Uses custom encoding for command obfuscation
Target 2: jordandesert.org.jo
- Deployed in CMS upload directory
- ASPX extension for IIS/ASP.NET compatibility
Target 3: 193.188.88.156
- Direct IP access
- PHP extension (likely misconfigured or different variant)
Webshell Variants
Three ASP webshell variants were identified:| File | Encoding | Complexity | Purpose |
|---|---|---|---|
m0s.asp | Custom decode function | High | Primary webshell with obfuscation |
webshell.asp | None (plaintext) | Low | Backup shell, direct command execution |
file.asp | None (plaintext) | Low | Simple command execution shell |
Operational Security
The framework demonstrates several OPSEC characteristics:- Custom encoding scheme to evade signature-based detection
- HTTP header tunneling instead of POST data
- Legitimate user-agent strings mimicking Chrome browser
- 404 responses when no command is present (appears as broken page)
- Hidden webshell placement in image/upload directories
Detection Indicators
Network Indicators
- Unusual
Accept-Languageheader values (encoded commands) - Static
Accept-Captchaheader:am=JgAAgP7jP38JwxmUgBgbuF8P_Nmlh2EEBhzhIQOBCEgGdAeWqYD_xNXr3UBFH35AAgACOJqOmhmdA2KVQwAEsGJYhhEAAAAAAAAAAA - GET requests to image/upload directories returning command output
Host Indicators
- ASP files in unexpected locations (images/, flash/, Uploads/)
- Files named
m0s.*with various extensions - WScript.Shell object creation in ASP pages
cmd /cexecution patterns
Next Steps
For detailed analysis:- Python Framework Analysis - Deep dive into C2 scripts
- ASP Webshell Analysis - Server-side webshell functionality