Pluggable Authentication Modules

T1556.003

Sub-technique of T1556 Modify Authentication Process.View on attack.mitre.org

About this technique

Adversaries may modify pluggable authentication modules (PAM) to access user credentials or enable otherwise unwarranted access to accounts. PAM is a modular system of configuration files, libraries, and executable files which guide authentication for many services. The most common authentication module is pam_unix.so, which retrieves, sets, and verifies account authentication information in /etc/passwd and /etc/shadow.

Adversaries may modify components of the PAM system to create backdoors. PAM components, such as pam_unix.so, can be patched to accept arbitrary adversary supplied values as legitimate credentials.

Malicious modifications to the PAM system may also be abused to steal credentials. Adversaries may infect PAM resources with code to harvest user credentials, since the values exchanged with PAM components may be plain-text since PAM does not store passwords.

Detection rules0

Rules on DetectionCode tagged with T1556.003.

Sigma0

No Sigma rules are mapped to this technique yet.

Splunk0

No Splunk rules are mapped to this technique yet.

Groups0

None recorded.

Software2

Campaigns0

None recorded.

Procedure examples2

Software2

Used byProcedure example
MalwareEbury

Ebury can deactivate PAM modules to tamper with the sshd configuration.

MalwareSkidmap

Skidmap has the ability to replace the pam_unix.so file on an infected machine with its own malicious version that accepts a specific backdoor password for all users.

References5

  1. Apple PAM Open source
    Apple. (2011, May 11). PAM - Pluggable Authentication Modules. Retrieved June 25, 2020.
  2. Man Pam_Unix Open source
    die.net. (n.d.). pam_unix(8) - Linux man page. Retrieved June 25, 2020.
  3. PAM Backdoor Open source
    zephrax. (2018, August 3). linux-pam-backdoor. Retrieved June 25, 2020.
  4. PAM Creds Open source
    Fernández, J. M. (2018, June 27). Exfiltrating credentials via PAM backdoors & DNS requests. Retrieved November 17, 2024.
  5. Red Hat PAM Open source
    Red Hat. (n.d.). CHAPTER 2. USING PLUGGABLE AUTHENTICATION MODULES (PAM). Retrieved June 25, 2020.

Data from MITRE ATT&CK® (Enterprise). ATT&CK® is a registered trademark of The MITRE Corporation.