Skip to content

Instantly share code, notes, and snippets.

@vpnwall-services
Last active April 25, 2020 11:09
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 vpnwall-services/ef9ec69acb92fc596621b437a744964a to your computer and use it in GitHub Desktop.
Save vpnwall-services/ef9ec69acb92fc596621b437a744964a to your computer and use it in GitHub Desktop.
[FORENSICS 101] Forensics 101 #linux # forensics #101

FORENSICS 101

Find number of established connections on system :

netstat -an|grep ESTABLISHED|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|awk '{ printf("%s\t%s\t",$2,$1); for (i = 0; i < $1; i++) {printf("*")}; print ""}'

Trigger OOM killer without rebooting :

echo 1 > /proc/sys/kernel/sysrq;echo f > /proc/sysrq-trigger;echo 0 > /proc/sys/kernel/sysrq

Grep date, IP, page, and status code in apache2 logs

grep -R '25/Apr/2020:00' | cut -d " " -f1,4,7,8,9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment