Linux
[서비스-유지보수] TCP dump
YH.Dream
2021. 10. 29. 20:29
업무 중 통신간의 데이터를 검증하기 위해 TCP Dump 가 필요할 때가 있다.
일단 기억나는대로 기록해두고 추후 정리한다.
tcpdump -i eno16777736 src TARGET_IP and port 443
tcpdump -i eno16777736 port 8101
tcpdump -A -s 0 'tcp port 443 and src 150.1.8.141 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
tcpdump -X -s 0 'tcp port 443 and src 150.1.8.141 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
tcpdump -s 0 -A 'tcp dst port 443 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)'
tcpdump -vvvs 1024 -l -A src TARGET_IP
tcpdump -i eno16777736 -s 0 -A 'tcp dst port 80 or 443 and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504F5354'
tcpdump -i eno16777736 -A