DEV Community

Mark0
Mark0

Posted on

The “P” in PAM is for Persistence: Linux Persistence Technique

This article explores a persistence technique on Linux systems by leveraging the Pluggable Authentication Modules (PAM) framework. Since PAM handles authentication for core services like SSH and login screens, it interacts directly with cleartext credentials. By replacing the standard PAM with a malicious version, an attacker can implement a "skeleton key" universal password and capture user credentials before they are encrypted.

The author demonstrates the 'PAM Skeleton Key' tool, which automates the process of backdooring the system. This method allows attackers to maintain access even after a user changes their password and can exfiltrate stolen credentials via webhooks. The technique highlights the unique security landscape of Linux, where the absence of traditional antivirus solutions often permits more invasive persistence methods.


Read Full Article

Top comments (0)