T1563.001SubTechniquelateral-movementagent-callable

T1563.001SSH Hijacking

Sub-technique of T1563

Platforms: Linux · macOS

ATT&CK version: 14.1

What it is

Adversaries may hijack a legitimate user's SSH session to move laterally within an environment. Secure Shell (SSH) is a standard means of remote access on Linux and macOS systems. It allows a user to connect to another system via an encrypted tunnel, commonly authenticating through a password, certificate or the use of an asymmetric encryption key pair. In order to move laterally from a compromised host, adversaries may take advantage of trust relationships established with other systems via public key authentication in active SSH sessions by hijacking an existing connection to another system. This may occur through compromising the SSH agent itself or by having access to the agent's socket. If an adversary is able to obtain root access, then hijacking SSH sessions is likely trivial.(Citation: Slideshare Abusing SSH)(Citation: SSHjack Blackhat)(Citation: Clockwork SSH Agent Hijacking)(Citation: Breach Post-mortem SSH Hijack) [SSH Hijacking](https://attack.mitre.org/techniques/T1563/001) differs from use of [SSH](https://attack.mitre.org/techniques/T1021/004) because it hijacks an existing SSH session rather than creating a new session using [Valid Accounts](https://attack.mitre.org/techniques/T1078).

ATT&CK tactics· 1

Lateral Movement

References

  1. https://attack.mitre.org/techniques/T1563/001
  2. https://www.slideshare.net/morisson/mistrusting-and-abusing-ssh-13526219
  3. https://www.blackhat.com/presentations/bh-usa-05/bh-us-05-boileau.pdf
  4. https://www.clockwork.com/news/2012/09/28/602/ssh_agent_hijacking
  5. https://matrix.org/blog/2019/05/08/post-mortem-and-remediations-for-apr-11-security-incident
Sourced from MITRE ATT&CK Enterprise v14.1. Curated and contextualized for EU compliance use cases by Adam Lundqvist, Founder at SQUR.