Skip to content

Instantly share code, notes, and snippets.

View stopandcatchfire's full-sized avatar

Nick Wantz stopandcatchfire

  • Sacramento, CA
View GitHub Profile
@stopandcatchfire
stopandcatchfire / ssh-attempts.txt
Created February 27, 2016 07:43 — forked from gfoss/ssh-attempts.txt
grep IP addresses from auth logs to see attempted ssh attempts into your box w/ invalid creds {ubuntu}
#search for invalid logon attempts, pull out IP, remove dupes, sort...
$ grep -rhi 'invalid' /var/log/auth.log* | awk '{print $10}' | uniq | sort > ~/ips.txt
#look em up
$ for i in `cat ~/ips.txt`; do @nslookup $i 2>/dev/null | grep Name | tail -n 1 | cut -d " " -f 3; done > ~/who.txt
# :-) #
$ do moar things...