Last active
December 19, 2015 18:49
-
-
Save robmiller/6002038 to your computer and use it in GitHub Desktop.
One-liner for finding out what usernames attackers are using when bruteforcing SSH on an OS X box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo bzcat /var/log/secure*.bz2 \ | |
| perl -ne '/authentication error for( illegal user)? (\S+) from/ && print "$2\n"' \ | |
| sort | uniq -c | sed 's/^ *//' | sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A RedHat equivalent: