ngrep ile networkü süzmek

Ekim 25th, 2011 § Yorum yok

ngrep network izleme aracıdır.

eth0 interfacinde “fatih” ifadesini içeren paketleri aramak.
İçinde fatih olmayan paketler için ”#” yazılır.

ngrep -d eth0 fatih

İçinde fatih olmayan paketler için ”#” yazılmasını istemiyorsak quiet(-q) modda çalıştıralım..

ngrep -q -d eth0 fatih

ngrep tooluna filitre koymak için

ngrep -q -d eth0 facebook "tcp port 80"
   interface: eth0 (10.1.21.0/255.255.255.0)
   filter: (ip or ip6) and ( tcp port 80 )
   match: facebook

ngrep e regexp de girilebilir

ngrep -q -d eth0 *hack* "tcp port 80"

birden fazla regexp girmek için

ngrep -q -d eth0 '*hack*| vivek' "tcp port 80"

-i ile case insensitive arama yapılabilir. -W daha temiz rapor oluşturmaya yarar.

ngrep -i 'game*|chat|recipe' -W byline > bad_user.txt
 
 
interface: wlan0 (192.168.0.0/255.255.255.0)
match: game*|chat|recipe
###############################
T 192.168.0.100:33035 -> 66.249.85.104:80 [AP]
GET<nobr> <wbr></nobr>/search?hl=en&safe=off&q=online+games&btnG=Search<nobr>&<wbr></nobr> meta= HTTP/1.1.
Host: www.google.co.in.
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050419 OpenLX/1.7.
6-1.olx.
Accept: text/xml,application/xml,application/xhtml+xml,te<nobr>x<wbr></nobr> t/html;q=0.9,text/plain;q=0.8,
image/png,*/*;q=0.5.
Accept-Language: en-us,en;q=0.5.
Accept-Encoding: gzip,deflate.
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7.
Keep-Alive: 300.
Connection: keep-alive.
Referer: http://www.google.co.in/search?hl=en&q=hello&btnG<nobr>=<wbr></nobr> Google+Search&meta=.
Cookie: PREF=ID=7c5bf916f28d16c7:FF=4:LD=en:NR=10:TM=1118<nobr>3<wbr></nobr> 48709:LM=1118348731:S=20ZkQG0Y
sMDDsXsW. 

E-posta trafiğini izlemek için

ngrep -i 'rcpt to|mail from' tcp port smtp

interface: wlan0 (192.168.0.0/255.255.255.0)
filter: ip and ( tcp port smtp )
match: rcpt to|mail from
T 192.168.0.100:1043 -> 200.40.174.30:25 [AP]
MAIL From: SIZE=192..
T 192.168.0.100:1043 -> 200.40.174.30:25 [AP]
RCPT To:..

-q :sessiz mod(sadece match göster), -t zamanı YYYY/MM/DD HH:MM:SS.UUUUUU formatında göster, -wi login gelimesini case insensitive bul, port 23 ile telnet trafiğini dinle

ngrep -q -t -wi "login" port 23

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Ne yapıyorum ben!?

ngrep ile networkü süzmek başlıklı yazıyı okuyorsun.

Üst Veri