Skip to content

Instantly share code, notes, and snippets.

@michelep
Last active October 15, 2021 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michelep/5bd8f709e8aa02638c3a4ffe7731a777 to your computer and use it in GitHub Desktop.
Save michelep/5bd8f709e8aa02638c3a4ffe7731a777 to your computer and use it in GitHub Desktop.
GreyNoise check for outbound connection
sudo netstat -anp TCP | grep ESTAB | grep -v "127.0.0.1" | grep -E -o "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" | grep -v "$192\.\|10\." | sort -u | while read ip;do curl https://api.greynoise.io/v3/community/$ip; echo; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment