SSH (Secure Shell) is a versatile and widely-used protocol that provides secure remote access to systems and services. While it serves as a fundamental tool for authorized system administration, it can also be exploited by attackers to establish persistence on compromised systems. Through various techniques, ranging from simple SSH key-based attacks to more sophisticated methods like public key backdooring, adversaries can maintain unauthorized access and evade detection.
Practice
It's possible to backdoor an SSH public key using the command= argument. The backdoor will execute whenever the user logs in using this key.
To be stealhier, we can encode the command to be executed