当前位置:网站首页>Tcpdump command usage details
Tcpdump command usage details
2022-07-01 22:57:00 【victorwjw】
tcpdump Command to use detailed _ Crazy little penguin blog -CSDN Blog _tcpdump Detailed command The most detailed tcpdump Use guide - Wang Yibai - Blog Garden Tcpdump Practical tutorial of bag capturing tool , Let you know that a bag grabs the world !_ Bili, Bili _bilibili
Generally, the following types of keywords :
About keywords for data types :
Include host、port、net, for example host 192.168.1.1 Indicates that this is a host ,net 192.168.0.0 It means this is a network address ,port 22 Indicates that the port number is 22, If no type is specified , The default type is host
Keywords of data transmission direction :
Include src、dst、dst or src、dst and src, These keywords indicate the direction of transmission , such as src 192.168.1.1 The source address of the packet is 192.168.1.1,dst net 192.168.0.0 Indicate that the destination network address is 192.168.0.0, The default is to monitor host to host src and dst, That is, by default, listen to all data of the local machine and the target host
Protocol keywords :
Include ip、arp、rarp、tcp、udp etc. ,
Other keywords :
Operation type :or、and、not、!
Auxiliary function :gateway、less、broadcast、greater
There is a complete method of use , The following excerpts are some commonly used
tcpdump -i eth0 Monitor the specified network card eth0 All transmission packets , When there are multiple network cards, you must specify which one
tcpdump host 192.168.56.209 and ( 192.168.56.210 or 192.168.56.211 ) # Capture host 192.168.56.209 And host 192.168.56.210 or 192.168.56.211 All communication packets ( It can also be a host name , But the requirements can be resolved IP Address )
tcpdump ip host node9 and ! www.baidu.com # Capture node9 Communication packets with all other hosts ( barring www.baidu.com)
tcpdump -i eth0 src node10 # Capture source host node10 All the process of sending eth0 All packets of the network card
-nn: Don't convert protocol and port number to name , It's going to be a lot faster .
tcpdump icmp -w icmp.pcap Use -w Is to write data to a file , While using -r Read data from file .
tcpdump -vvAls0 | grep 'POST' Grab HTTP POST Request package
tcpdump -nn -A -s1500 -l | egrep -i 'User-Agent:|Host:' from HTTP Extract... From the request header User-Agent And the host name
tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' Grab 80 Port of HTTP Valid packets , exclude TCP The packets of the connection establishment process (SYN / FIN / ACK)
tcp Protocol message header

Usually Wireshark( or tshark) Than tcpdump It's easier to analyze application layer protocols . The general practice is to use... On the remote server first tcpdump Grabbing data and writing it to a file , And then copy the file to the local workstation Wireshark analysis .
边栏推荐
- Sogou wechat app reverse (II) so layer
- ECMAScript 2022 正式发布,有你了解过的吗?
- Rust language - Introduction to Xiaobai 05
- 转--利用C语言中的setjmp和longjmp,来实现异常捕获和协程
- Configure filter
- Stimulate new kinetic energy and promote digital economy in multiple places
- Multi picture alert ~ comparison of Huawei ECs and Alibaba cloud ECS
- Single step debugging analysis of rxjs observable of operator
- 14年本科毕业,3个月转行软件测试月薪13.5k,32的岁我终于找对了方向
- General use of qstringlist
猜你喜欢

I graduated from college in 14 years and changed to software testing in 3 months. My monthly salary was 13.5k. At the age of 32, I finally found the right direction

今日睡眠质量记录71分

Understanding of indexes in MySQL

"Trust machine" empowers development
![[untitled]](/img/60/9a56e8b00c386779be13308515b24f.png)
[untitled]

Hide the creation and use of users

轉載csdn文章操作

Today's sleep quality record 71 points

Genicam gentl standard ver1.5 (4) Chapter 5 acquisition engine

MySQL -- index of InnoDB storage engine
随机推荐
[image segmentation] 2021 segformer neurips
rxjs Observable of 操作符的单步调试分析
Happy number [fast and slow pointer of ring PROBLEMS]
[MySQL] index classification
旅游管理系统
Explain ThreadLocal in detail
Niuke monthly race - logarithmic sum in groups
Awoo's favorite problem (priority queue)
Flynk SQL client uses comparison and is familiar with official documents
Réimpression de l'article csdn
半监督学习之数据增强
MySQL -- index of InnoDB storage engine
The fixed assets management subsystem reports are divided into what categories and which accounts are included
元宇宙可能成为互联网发展的新方向
[target tracking] | single target tracking indicator
正则系列之量词(Quantifiers)
ECMAScript 2022 was officially released. Have you heard about it?
Mysql 5.7 实现 rank 排名
Origin2018安装教程「建议收藏」
redis配置文件中常用配置详解[通俗易懂]