当前位置:网站首页>How tcpdump filters specific TCP flag bits
How tcpdump filters specific TCP flag bits
2022-06-29 22:44:00 【Yaohua】
according to tcp The structure of the guarantee is known ,TCP The flag header is located at the... Of the header 14 In bytes , Because the number is from 0 Byte start , therefore TCP The logo header is on the 13 byte .
byte 13 Up to 8 Single bit logo ; however ,TCP Only use 6 A sign . The other two bits are reserved , Should be set to zero .
For those with only one logo TCP head , Each bit has a byte , byte 13 Contains the following decimal binary values .
- Final (FIN) = 1
- Sync (SYN) = 2
- Reset (RST) = 4
- Push (PSH) = 8
- Acknowledgement (ACK) = 16
- Urgent (URG) = 32
- Reserved = 64 and 128
If TCP The header has multiple flags , byte 13 The value of is the sum of the binary values of all the bits set . for example
- FIN, ACK = 17 (1 + 16)
- SYN, ACK = 18 (2 + 16)
- PSH, ACK = 24 (8 + 16)
- FIN, PSH = 9 (1 + 8)
- FIN, PSH, ACK = 25 (1 + 8 + 16)
Filter with SYN give an example
[[email protected] ~]
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
23:28:45.929246 IP 113.65.30.42.jomamqmonitor > 10.13.132.171.ssh: Flags [S], seq 356758948, win 64240, options [mss 1412,nop,wscale 8,nop,nop,sackOK], length 0
23:28:55.109148 IP 113.65.30.42.netscript > 10.13.132.171.ssh: Flags [S], seq 1672259268, win 64240, options [mss 1412,nop,wscale 8,nop,nop,sackOK], length 0
23:29:06.584163 IP 128.199.4.167.45848 > 10.13.132.171.ssh: Flags [S], seq 572498397, win 42340, options [mss 1412,sackOK,TS val 2388703754 ecr 0,nop,wscale 8], length 0If filtering is required SYN+ACK My bag , It is SYN, ACK = 18 (2 + 16). like this
[[email protected] ~]
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
23:30:41.332866 IP 10.13.132.171.ssh > 113.65.30.42.macbak: Flags [S.], seq 1578017406, ack 2299936850, win 64952, options [mss 1412,nop,nop,sackOK,nop,wscale 8], length 0
23:30:43.381328 IP 10.13.132.171.ssh > 188.166.240.30.34898: Flags [S.], seq 3237261487, ack 715567311, win 64400, options [mss 1412,sackOK,TS val 498768258 ecr 1839524773,nop,wscale 8], length 0
23:30:45.616443 IP 10.13.132.171.ssh > 113.65.30.42.wcpp: Flags [S.], seq 3406886282, ack 1487533276, win 64952, options [mss 1412,nop,nop,sackOK,nop,wscale 8], length 0边栏推荐
- 从零实现深度学习框架——RNN从理论到实战【实战】
- [php8+oracle11g+windows environment without tools] Intranet / no network /win10/php connecting to Oracle database instance
- 0. grpc environment setup
- MooseFS基本概念总结
- Evolution from stand-alone to distributed database storage system
- 直播平台开发,进入可视区域执行动画、动效、添加样式类名
- Kubernetes architecture that novices must know
- 为什么在局域网(ERP服务器)共享文件夹上拷贝文件时导致全局域英特网断网
- Still stay up late every day and work overtime to make statements? In fact, you don't know how to make reports efficiently
- 股票开户安全吗?上海股票开户。
猜你喜欢

在线文本数字识别列表求和工具

IFLYTEK AI learning machine summer new product launch AI + education depth combination to create a new height of products

Kubernetes architecture that novices must know

云原生爱好者周刊:炫酷的 Grafana 监控面板集合

With the rise of China's database, Alibaba cloud lifeifei: China's cloud database has taken the lead in various mainstream technological innovations abroad

Number theory - division and blocking
Evolution from stand-alone to distributed database storage system

AI scene Storage Optimization: yunzhisheng supercomputing platform storage practice based on juicefs

qt5.14.2连接ubuntu20.04的mysql数据库出错

触摸按键与按键控制对应的LED状态翻转
随机推荐
Day9 - user registration and login
Detailed description of gaussdb (DWS) complex and diverse resource load management methods
便携式4K音视频会议终端一体机带8倍数字变焦
低代码、端到端,一小时构建IoT示例场景,声网发布灵隼物联网云平台
MySQL lock common knowledge points & summary of interview questions
新手必须知道的 Kubernetes 架构
Processing of error b6267342 reported by AIX small machine in production environment
关于深度学习的概念理解(笔记)
Talk about auto in MySQL in detail_ What is the function of increment
如果我在珠海,到哪里开户比较好?究竟网上开户是否安全么?
Spark集群安装
Laravel 创建自己的 Facade 扩展 geoip 根据 IP 获取国家、地域、城市信息
Code sharing for making and developing small programs on the dating platform
Conceptual understanding of deep learning (notes)
Ansible automatic operation and maintenance
【多线程】 如何自己实现定时器
Kubernetes architecture that novices must know
Advanced use of the optional class
What if MySQL fails to store emoticons
LeetCode85+105+114+124