A typical hack with strace command which traces a ping command

ABOUT strace strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as ptrace. TYPICAL strace …

sample session involving “env” and “unset” commands

ABOUT env env is a shell command for Unix and Unix-like operating systems. It is used to either print a list of environment variables or run another utility in an altered environment without having to modify the currently existing environment. Using env, variables may be added or removed, and existing variables may be changed by …

how to backup and restore file permissions using acl

$mkdir data $cd data/ $ls $pwd /home/jeffrin/data $echo hello > file1.txt $echo world > file2.txt $ls -l total 8 -rw-r–r– 1 jeffrin jeffrin 6 Jan 22 22:44 file1.txt -rw-r–r– 1 jeffrin jeffrin 6 Jan 22 22:44 file2.txt $getfacl -R . > permissions.txt $cat permissions.txt # file: . # owner: jeffrin # group: jeffrin user::rwx group::r-x …

sample session with “ss” command to show details on network

$ss -t State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 0 192.168.0.100:57982 216.58.197.34:https ESTAB 0 0 192.168.0.100:56572 216.58.196.98:https ESTAB 0 0 192.168.0.100:51440 216.58.220.34:https ESTAB 0 0 192.168.0.100:56850 216.58.196.110:https ESTAB 0 0 192.168.0.100:42946 216.58.220.46:https ESTAB 0 0 192.168.0.100:42758 216.58.197.46:https ESTAB 0 0 192.168.0.100:32912 216.58.220.33:https ESTAB 0 0 192.168.0.100:40452 216.58.220.38:https ESTAB 0 0 192.168.0.100:51128 182.79.251.80:https ESTAB …

Capturing TCP Flags with tcpdump. Capture ACK or SYN packets

ABOUT TCP FLAGS They are control bits that indicate different connection states or information about how a packet should be handled. FLAGS CWR – Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment with the ECE flag set (added to header by RFC 3168). ECE …