当前位置:网站首页>Wireshark network packet capture
Wireshark network packet capture
2022-07-04 19:57:00 【Daydayup】
Catalog
One 、 Preface
Study various network protocols and local and remote packet capturing analysis , Indispensable Wireshark Or similar tools .
Here to 3 Do a simple packet capture in this scenario .
Two 、3 A bag capturing scene
2.1、 Packet capture local http
The first set Wireshark filter ip.dst == 124.223.54.92 and tcp.port == 8116, Start capturing .
Then open the PC( Local IP:192.168.0.102) Browser , Visit a traditional Chinese medicine information website that you practice yourself :http://124.223.54.92:8116/, And search for “ Sheraton ”,
Some relevant results are found above , Check again Wireshark Captured content ,
You can only see the browser -> One way request from the server (No=64, Left arrow → representative src->dst The client side 192.168.0.102-> Server side 124.223.54.92 Request ), The corresponding data cannot be captured .
If you want a response , Next, change the filter to ip.addr == 124.223.54.92 and tcp.port == 8116(ip.addr representative src or dst Can be this ip), After applying the new filter, check the capture results as follows ,
No=108, Left arrow ← representative source->dest The service side 124.223.54.92-> client 192.168.0.102 Response .
The previous search request is GET request , Then try again POST request http://124.223.54.92:8116/api/echo, This echo The interface request body returns whatever response it sends , as follows ,
curl --location --request POST 'http://124.223.54.92:8116/api/echo' \
--header 'Content-Type: text/plain' \
--data-raw '{ "name": "Jay" }'
Also go to Wireshark See the corresponding req and resp, And the clear text business response data can also be seen below ,
2.2、 Grab your cell phone http
stay PC Of Wireshark You can't directly capture mobile traffic on , Even though PC It's the same as the mobile phone WIFI. because Wireshark To capture packets, you need to select the network card for monitoring , Related to this network card , Or the traffic or network packets passing through the selected network card will be caught . So if you grab your mobile phone , Obviously, the network card of the mobile phone should be monitored , Or the network card of the server . So it can't be directly in PC Grab the bag on the mobile phone .
But there are 2 Methods ,
- firstly ,PC Open a sharing hotspot to connect your mobile phone
- second , stay PC Upper use
CharlesAnd other tools to open the network agent , And set the agent on the mobile phone
The second way is used here , First step , Download and install Charles after , Set up Proxy->Proxy Settings->HTTP Proxy Of Port=8888, as follows ,
The second step , Connect your cell phone to PC The same WIFI Next , Connected at WIFI Set the proxy host name to PC Of ip, The proxy port is Charles Set up 8888, as follows ,
After setting up the proxy , The flow of mobile phones goes PC Agent , It is no longer sent directly to the router .
The picture above shows the mobile phone ip yes 192.168.0.100, So in Wireshark catalog filter ip.addr == 192.168.0.100, And start capturing .
Then open the mobile browser to access http://124.223.54.92:8116/, And search for ,
Back to Wireshark Check whether the information has been captured , as follows No=43, Captured the request ,
as follows No=153, Also captured the response ,
Again ,Charles As itself and Wireshark Similar tools , At the same time, the request and response are also obtained , as follows ,
2.3、 Remote bag capture
Above 2.1 and 2.2 Examples of local and mobile packet capturing are given respectively , Capturing packets on mobile phones is also a scenario of remote capturing packets , But it still needs to be with PC Under the same LAN , So it can be considered that it is not completely remote .
There must be a completely remote scenario , Such as remote server 192.168.2.15 Upper a process , Need constant and remote server 192.168.2.22 Upper b The process goes on p2p Handshake communication , In this case, if verification is required 2 Is the handshake between processes encrypted or unencrypted , How to verify .
explain :a The process and b The process is used to shake hands p2p Ports are all 34000.
First step , stay 192.168.2.15 Upper use tcpdump command , Will work with 192.168.2.22 Between tcp Packages are saved to cap file ,
tcpdump tcp port 34000 and host 192.168.2.22 -w ./target.cap
The second step , take cap Put files locally PC, And import Wireshark analysis , as follows , You can see the relationship between the two processes p2p The handshake agreement is TLSv1.2 Encrypted , The message content is also displayed as Application Data, Represents being encrypted .
边栏推荐
- [QNX Hypervisor 2.2用户手册]6.3.1 工厂页和控制页
- Lm10 cosine wave homeopathic grid strategy
- 92. (cesium chapter) cesium building layering
- Allure of pytest visual test report
- 【毕业季】绿蚁新醅酒,红泥小火炉。晚来天欲雪,能饮一杯无?
- Multi table operation inner join query
- c# . Net MVC uses Baidu ueditor rich text box to upload files (pictures, videos, etc.)
- Cbcgptabwnd control used by BCG (equivalent to MFC TabControl)
- 记一次 .NET 某工控数据采集平台 线程数 爆高分析
- Educational codeforces round 22 E. Army Creation
猜你喜欢

Online sql to excel (xls/xlsx) tool

Crystal optoelectronics: ar-hud products of Chang'an dark blue sl03 are supplied by the company

What should we pay attention to when doing social media marketing? Here is the success secret of shopline sellers!

YOLOv5s-ShuffleNetV2

Upgrade the smart switch, how much is the difference between the "zero fire version" and "single fire" wiring methods?

Online text line fixed length fill tool

应用实践 | 蜀海供应链基于 Apache Doris 的数据中台建设

记一次 .NET 某工控数据采集平台 线程数 爆高分析

实战模拟│JWT 登录认证

In operation (i.e. included in) usage of SSRs filter
随机推荐
明明的随机数
Kotlin cycle control
Master the use of auto analyze in data warehouse
有关架构设计的个人思考(本文后续不断修改更新)
Dark horse programmer - software testing - stage 07 2-linux and database -09-24-linux command learning steps, wildcards, absolute paths, relative paths, common commands for files and directories, file
. Net ORM framework hisql practice - Chapter 2 - using hisql to realize menu management (add, delete, modify and check)
1003 emergency (25 points) (PAT class a)
Several methods of online database migration
Niuke Xiaobai month race 7 who is the divine Archer
The explain statement in MySQL queries whether SQL is indexed, and several types in extra collate and summarize
Educational Codeforces Round 22 E. Army Creation
YOLOv5s-ShuffleNetV2
HMM hidden Markov model and code implementation
勾股数规律(任意三个数能够满足勾股定理需要满足的条件)
Find the nth power of 2
1007 Maximum Subsequence Sum(25 分)(PAT甲级)
In operation (i.e. included in) usage of SSRs filter
New wizard effect used by BCG
偏移量函数及开窗函数
Multi table operation inner join query