https://github.com/pboardman/pam_printpw
pam module for printing cleartext password in log
https://github.com/pboardman/pam_printpw
pam password ssh
Last synced: about 1 month ago
JSON representation
pam module for printing cleartext password in log
- Host: GitHub
- URL: https://github.com/pboardman/pam_printpw
- Owner: pboardman
- License: mit
- Created: 2017-01-04T00:31:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-04T01:13:11.000Z (over 8 years ago)
- Last Synced: 2025-03-29T21:22:29.080Z (2 months ago)
- Topics: pam, password, ssh
- Language: C
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pam_printpw
Like the name suggest, pam_printpw is a very simple pam module that will print a
user username and password in a log file when the user attempt to login.**Obviously this is very insecure, use at your own risk**
## Why?
I made this module to check the username/password combinations tried by bots
endlessly trying to bruteforce every ssh ports they can find on the internet.
But there are probably other fun ways to use it.## Installation
This was only tested on Fedora 25 for now but it should be similar for other
linux distributions.- Run ` make all ` to compile the module
- Copy the module `pam_printpw.so` to /lib64/securityTo use the module with your ssh server add those two lines **at the top** of
`/etc/pam.d/sshd`:```
auth required pam_unix.so
auth required pam_printpw.so
```## Testing it
You shouldn't have to restart anything after the installation.
To test if it works:
- ssh to localhost (if you installed it locally) with `ssh [email protected]`
- check the ssh logs to see if your username + password is there: `journalctl -f -u sshd`You should see something like this:
## Notes
- It will print the password regardless of whether it's the good or wrong password