T1021.004 SSH

Adversaries may use Valid Accounts to log into remote machines using Secure Shell (SSH). The adversary may then perform actions as the logged-on user.

SSH is a protocol that allows authorized users to open remote shells on other computers. Many Linux and macOS versions come with SSH installed by default, although typically disabled until the user enables it. On ESXi, SSH can be enabled either directly on the host (e.g., via vim-cmd hostsvc/enable_ssh) or via vCenter.(Citation: Sygnia ESXi Ransomware 2025)(Citation: TrendMicro ESXI Ransomware)(Citation: Sygnia Abyss Locker 2025) The SSH server can be configured to use standard password authentication or public-private keypairs in lieu of or in addition to a password. In this authentication scenario, the user’s public key must be in a special file on the computer running the server that lists which keypairs are allowed to login as that user (i.e., SSH Authorized Keys).

View in MITRE ATT&CK®

CIS Controls Mappings

Capability ID Capability Description Mapping Type ATT&CK ID ATT&CK Name Notes
CIS-13.5 Manage Access Control for Remote Access mitigates T1021.004 SSH
Comments
Conditional access policies for remote enterprise assets can deny authentication attempts to the SSH service if external SSH access is reachable through a remote-access control plane that can evaluates device posture
References
CIS-6.8 Define and Maintain Role-Based Access Control mitigates T1021.004 SSH
Comments
Using role-based access control (RBAC) to limit SSH access and permitted commands to users with a legitimate need can help prevent adversaries from using SSH for lateral movement.
References
CIS-6.4 Require MFA for Remote Network Access mitigates T1021.004 SSH
Comments
Enabling multi-factor authentication for SSH connections helps minimize the adversary's ability to leverage stolen credentials.
References
CIS-4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software mitigates T1021.004 SSH
Comments
Disabling the SSH daemon or Remote Login on systems that do not require it eliminates an SSH-based remote-access path.
References
    CIS-4.6 Securely Manage Enterprise Assets and Software mitigates T1021.004 SSH
    Comments
    SSH protects administrative credentials and commands from plaintext interception and should replace Telnet. It does not prevent an adversary with valid credentials or an unauthorized SSH key from using the service.
    References
      CIS-4.5 Implement and Manage a Firewall on End-User Devices mitigates T1021.004 SSH
      Comments
      A default-deny firewall can block inbound SSH or restrict TCP 22 to approved management systems, directly limiting remote access to SSH-enabled end-user devices.
      References
        CIS-4.4 Implement and Manage a Firewall on Servers mitigates T1021.004 SSH
        Comments
        A default-deny server firewall can directly restrict inbound SSH, normally TCP 22, to approved management systems. This reduces unauthorized remote administration and lateral movement against Linux, macOS, and other SSH-enabled servers.
        References

          GCP Mappings

          Capability ID Capability Description Mapping Type ATT&CK ID ATT&CK Name Notes
          shielded_vm Shielded VM technique_scores T1021.004 SSH
          Comments
          Chronicle is able to trigger an alert based on accounts and authorized device access to a certain IP range (e.g., "Attempted Lateral Movement via SSH metadata pivoting"). This technique was scored as minimal based on low or uncertain detection coverage factor. https://github.com/chronicle/detection-rules/tree/main/gcp_cloudaudit
          References
          vpc_service_controls VPC Service Controls technique_scores T1021.004 SSH
          Comments
          This control can be used to detect adversaries that may try to use Valid Accounts to log into remote machines using Secure Shell (SSH).
          References

          AWS Mappings

          Capability ID Capability Description Mapping Type ATT&CK ID ATT&CK Name Notes
          amazon_inspector Amazon Inspector technique_scores T1021.004 SSH
          Comments
          The Amazon Inspector Best Practices assessment package can detect a security control setting related to remote service access on Linux endpoints. Specifically, "Disable root login over SSH". This information can be used identify insecure configurations and harden the endpoints. Amazon Inspector does not directly protect against adversaries accessing remote services. Given Amazon Inspector can only assess this security control on Linux platforms (although it also supports Windows) and it only restricts access to remote services for one user account, the coverage score is Minimal leading to an overall Minimal score.
          References
            aws_network_firewall AWS Network Firewall technique_scores T1021.004 SSH
            Comments
            AWS Network Firewall has the ability to pass, drop, or alert on traffic based on the network protocol as well as perform deep packet inspection on the payload. This functionality can be used to only allow remote services from trusted hosts (i.e., only allow remote access traffic from certain hosts). This mapping is given a score of Partial because even though it can restrict remote services traffic from untrusted hosts, it cannot protect against an adversary using a trusted host that is permitted to use remote services as part of an attack.
            References
              amazon_virtual_private_cloud Amazon Virtual Private Cloud technique_scores T1021.004 SSH
              Comments
              VPC security groups and network access control lists (NACLs) can be used to restrict direct access to remote services to trusted networks. This mitigates even an adversary with a valid account from accessing resources. This can be circumvented though if an adversary is able to compromise a trusted host and move laterally to a protected network. This results in an overall partial (coverage) score.
              References