Introduction to BellaCiao
BellaCiao is a .NET-based dropper malware developed and deployed by IRGC-IO Counterintelligence Division (Unit 1500) Department 40. The malware has been analyzed by BitDefender and exists in two distinct variants, each with different capabilities and deployment strategies.The complete source code for both variants has been exposed in Episode 3, providing unprecedented insight into CharmingKitten’s malware development practices.
Technical Overview
BellaCiao operates as a dropper that deploys additional malicious components onto compromised systems. The malware is designed to:- Establish persistent access to victim systems
- Deploy webshells for remote command execution
- Enable file upload and download capabilities
- Establish reverse proxy connections using legitimate tools
Variant 1: C# Webshell Dropper
Architecture
The first variant of BellaCiao drops a C# webshell that provides comprehensive remote access capabilities: Key Features:- File upload and download
- Command execution via webshell interface
- Stealth deployment to IIS and Exchange Server paths
- DNS-based command and control using randomized subdomains
Command & Control Infrastructure
The malware uses DNS queries with randomized subdomains for C2 communication:twittsupport.commailupdate.info
Deployment Locations
The webshell is strategically deployed to multiple locations to ensure persistence: IIS Locations:c:\inetpub\wwwroot\aspnet_client\c:\inetpub\wwwroot\aspnet_client\system_web\
C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa\auth\Current\themes\resources\C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa\auth\Current\themes\C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa\auth\Current\
Webshell Capabilities
The embedded C# webshell supports:- Command Execution - Executes system commands and returns output
- File Upload - Uploads files to specified paths on the victim system
- File Download - Downloads files from the victim system
- Custom Encoding - Uses character substitution for command obfuscation
Real-World Attack: Turkish Foreign Ministry
The source code includes evidence of a successful attack against the Turkish Foreign Ministry: Target:212.175.168.58Webshell URL:
https://eposta.mfa.gov.ct.tr/aspnet_client/system_web/aspnet_client.aspx
Commands Executed:
- Lateral movement via WMI to internal systems (10.20.x.x network)
- Credential usage:
Admin1@MFAwith password - Deployment of Plink for reverse tunneling
- Access to Exchange mailbox servers
Variant 2: PowerShell Reverse Proxy
Architecture
The second variant deploys a PowerShell-based webserver combined with Plink (PuTTY Link) for reverse proxy capabilities. Components:iis.ps1- PowerShell webserver script (734 lines)Java Update Services.exe- Plink binary for SSH tunneling- Configuration file with C2 parameters
PowerShell Webserver
Based on a customized version of a publicly available PowerShell webserver (venom/Start-Webserver.ps1), the script provides: Features:- HTTP listener on
127.0.0.1:49450 - Command execution interface
- Script upload and execution
- File upload and download
- Web-based file browser
Plink Reverse Proxy
The malware establishes a reverse SSH tunnel using Plink:- Remote Port: 9090 on attacker server
- Local Port: 49450 (PowerShell webserver)
- Protocol: SSH over port 443 (HTTPS)
- Credentials:
Israel/Israel@123!
Persistence Mechanism
The malware installs itself as a Windows service:- Service Name: “Java Update Services”
- Binary Location:
C:\ProgramData\Microsoft\Diagnostic\Java Update Services.exe - Script Location:
C:\ProgramData\Microsoft\Diagnostic\JavaUpdateServices.ps1 - Alive Time: 24 hours
- Port: 8000
Dual-Domain Fallback
Both C2 domains are attempted with automatic fallback:- Primary:
twittsupport.com - Fallback:
msn-center.uk
Anti-Detection Features
Obfuscation Techniques
- Base64 Encoding - Webshell payload stored as base64 with noise characters
- Character Replacement - Uses
#and@as noise in encoded payload - Random Naming - Generates random filenames for deployed webshells
- Timer-Based Execution - 120-hour intervals between DNS queries
Stealth Deployment
- Deploys to legitimate Microsoft paths (Exchange, IIS)
- Uses service names mimicking legitimate software
- Hidden file execution for service binaries
- Minimal network traffic pattern (timer-based callbacks)
C2 Communication Protocol
The malware uses DNS TXT records and IP address responses for command encoding: IP Address Decoding:Indicators of Compromise
Domains
twittsupport.commailupdate.infomsn-center.uk
File Paths
Service Names
- “Microsoft Exchange Agent Diagnostic Services”
- “Microsoft Monitoring Exchange Services”
- “Exchange Agent Diagnostic Services”
- “Java Update Services”
Attribution Evidence
The source code release directly links BellaCiao to IRGC-IO operations:- Consistent infrastructure with other CharmingKitten tools
- Shared C2 domains across multiple campaigns
- Code comments and variables in Persian
- Targeting patterns aligned with Iranian intelligence priorities