当前位置:网站首页>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 .
边栏推荐
- Preparation of functional test report
- 使用3DMax制作一个象棋棋子
- SAP 智能机器人流程自动化(iRPA)解决方案分享
- locust的使用
- Understanding of transactions in MySQL
- Selection of all-optical technology in the park - Part 2
- Congratulations on the release of friends' new book (send welfare)
- QStringList 的常规使用
- The median salary of TSMC's global employees is about 460000, and the CEO is about 8.99 million; Apple raised the price of iPhone in Japan; VIM 9.0 release | geek headlines
- SAP GUI 里的收藏夹事务码管理工具
猜你喜欢

Understanding of transactions in MySQL

激发新动能 多地发力数字经济

104. SAP ui5 table control supports multi select and how to select multiple table row items at a time with code

Cutefishos system~

El input text field word limit, beyond which the display turns red and input is prohibited

Intelligent computing architecture design of Internet

Turn -- bring it and use it: share a gadget for checking memory leaks

3DE resources have nothing or nothing wrong

Digital currency: far-reaching innovation

Hide the creation and use of users
随机推荐
nn. Parameter] pytoch feature fusion adaptive weight setting (learnable weight use)
Appium自动化测试基础 — 补充:Desired Capabilities参数介绍
internal field separator
Reprint CSDN article operation
SAP GUI 里的收藏夹事务码管理工具
Mysql5.7 set password policy (etc. three-level password transformation)
Explain kubernetes network model in detail
今日睡眠质量记录71分
Digital currency: far-reaching innovation
MySQL view exercise
cvpr2022 human pose estiamtion
[MySQL] index classification
[target tracking] | single target tracking indicator
Preparation of functional test report
Congratulations on the release of friends' new book (send welfare)
Rust language - Introduction to Xiaobai 05
思科--WAN 的概念考试外部工具
Use three JS realize the 'ice cream' earth, and let the earth cool for a summer
Two schemes of transforming the heat map of human posture estimation into coordinate points
Cut noodles C language