Huntress Traces Obfuscated PowerShell Reverse Shell to SSH Persistence

· Original article ↗

Summary

Huntress investigated an encoded PowerShell command on a partner’s system, tracing it to an SSH reverse shell and scheduled-task persistence. The process lineage pointed to the partner’s ScreenConnect instance.

Key points

  • Huntress said its Managed EDR alerted on an encoded PowerShell command running on a partner’s computer.
  • The command’s parent process was the partner’s ScreenConnect instance, which Huntress said indicated attacker access to the ScreenConnect host.
  • Analysis of the payload revealed a firewall rule for inbound SSH, a dropped SSH executable, and a scheduled task for persistence.
  • A batch script set up an SSH reverse-shell listener connecting to an IP address found in the script.
  • Huntress recommended enabling and checking two-factor authentication and strong credentials on RMM accounts, monitoring anomalous inbound and outbound traffic, and considering IDS/IPS controls.

Article Details

Attack Vectors
  • An attacker accessed a partner's ScreenConnect instance and ran an encoded PowerShell command.
  • The command used PowerShell Invoke-WebRequest to retrieve content from an attacker staging domain.
  • Retrieved scripts added an inbound SSH firewall rule, dropped an SSH executable, and configured a scheduled task to persistently launch a reverse-shell listener.
  • The reverse shell connected back to an IPv4 address returned by the staging content.
Defensive Notes
  • Enable and verify two-factor authentication and strong credentials for RMM accounts.
  • Monitor incoming and outgoing network traffic for anomalous behavior.
  • Consider deploying an intrusion detection and prevention system.
  • Educate users not to download untrusted files or software.

Indicators of compromise

TypeIndicatorContext
DOMAINonerecovery[.]clickAttacker staging domain whose returned content included scripts used to establish a reverse shell and persistence.
IPV488[.]119[.]175[.]55IP address identified in the retrieved content and used as the reverse-shell callback destination.

MITRE ATT&CK

Vendors

Products

Related Articles