Fiddling with strace & ngrep

  Uncategorized

Strace useful – https://linux-audit.com/the-ultimate-strace-cheat-sheet/

strace -p PID -e trace=network

-e trace=ipc – Track communication between processes (IPC)
-e trace=memory – Track memory syscalls
-e trace=network – Track memory syscalls
-e trace=process – Track process calls (like fork, exec)
-e trace=signal – Track process signal handling (like HUP, exit)
-e trace=file – Track file related syscalls

Ngrep useful – https://debian-administration.org/article/105/Monitoring_network_traffic_with_ngrep

ngrep -q '^POST .* HTTP/1.[01]'
ngrep -q '^GET .* HTTP/1.[01]' 'host slashdot.org'