- 论坛徽章:
- 0
|
想用l7封VAGAA,分析了vagaa的协议
13:04:29.174283 192.168.100.155.1546 > 220.174.236.35.1572: udp 512
0x0000 4500 021c 0e0b 0000 8011 3cb0 c0a8 649b E.........<...d.
0x0010 dcae ec23 060a 0624 0208 09e7 ff0d 4903 ...#...$......I.
0x0020 6361 0000 0000 0000 74cf 4ea1 66b2 6171 ca......t.N.f.aq
0x0030 1d1c f9e3 b965 3a1b ebb4 a6fc 2e80 f135 .....e:........5
0x0040 ddd0 9a53 d9b8 0e73 deed 3249 4c41 4d45 ...S...s..2ILAME
0x0050 332e
13:04:29.180305 192.168.100.155.1546 > 220.174.236.35.1572: udp 512
0x0000 4500 021c 0e0d 0000 8011 3cae c0a8 649b E.........<...d.
0x0010 dcae ec23 060a 0624 0208 c1ee ff0d 4903 ...#...$......I.
0x0020 6561 0000 0000 0000 4634 67f8 5aba 3d72 ea......F4g.Z.=r
0x0030 b77e be9e 5ce6 ec9f ef52 9652 49f9 2fa7 .~..\....R.RI./.
0x0040 0f81 e53a a9f6 7983 cfae 313b 0d5b 8bfb ...:..y...1;.[..
0x0050 1c19 ..
相同部位应该是 4500 0000 8011 c0a8 649b
所以vagaa.pat的文件应该为
vagaa
^\x45\x00.+\x00\x00\x80\x11.+\xc0\xa8\x64\x9b.+$
但是好像封不住
iptables -t mangle -I PREROUTING -s 192.168.100.155 -m layer7 --l7proto vagaa -j DROP
数据包为零
各位高手帮忙看看pat文件写得对不对的!! |
|