office microsoft outlook manage tips Microsoft Windows 7 Ultimate 64-bit microsoft office final exam microsoft office turorials Microsoft Office Visio Professional 2007 microsoft mouse driver for windows xp windows media center microsoft english Microsoft Windows 7 Home Premium 64 Bit microsoft windows start up tone microsoft office xp pro with frontpage Microsoft Windows 7 Professional beta information microsoft office system office xp microsoft outlook sp3 vista Microsoft Office Outlook 2007 microsoft office for windows xp microsoft office x mac Microsoft Windows 7 Ultimate (32 bit) microsoft windows user microsoft office 2007 training video Microsoft Windows XP Professional SP3 32-bit microsoft office setup cannot continue microsoft remote tools framework windows Microsoft Windows 7 Professional 64 Bit microsoft office standard 2003 key generator microsoft windows media player upgrade Microsoft Office 2003 Professional microsoft office 2003 upgrade requirements microsoft windows me repair Microsoft Office Project Professional 2003 microsoft windows network not accessible
msgbartop
I will happily conduct a FREE basic web security scan for any genuine organization interested in my services to point out whether or not I can find vulnerabilities in your application. Just contact me.
Need a PHP Programmer, PHP staff or project manager? Contact me now.
msgbarbottom

15 Dec 08 Some simple filtering and sniffing with tcpdump

tcpdump is one of the best network debugging tools available. In it’s most basic form, it will print network traffic in terms of a source and destination address to the console, more advanced uses include printing out captured ASCII and simple but powerful filtering.

tcpdump -ieth0 -n
# Start tcpdump listening on interface eth0, and do not attempt to resolve IP addresses to hostnames ( -n ).

What we see is:

20:51:40.848211 IP 217.10.X.X.22 > 93.97.Y.Y.52381: P 76216:76364(148) ack 261 win 8576
20:51:40.853726 IP 93.97.Y.Y.52381 > 217.10.X.X.22: . ack 59548 win 16848

And this is repeated over and over. Now this is a feedback loop. As we are connected via port 22 (SSH), this loop will continue, and we must therefore filter it out:

tcpdump -ieth0 -n tcp port not 22

Now we can cleanly monitor traffic. What happens though if we want to view SSH traffic, but not our own?

tcpdump -ieth0 -n tcp port not 22 and host not 93.97.Y.Y

We can build this filter up as much as we wish. Let’s start watching HTTP (tcp port 80) traffic only:

tcpdump -ieth0 -n tcp port 80

Finally, let’s set the ’snaplen’ to 1500 bytes, and print out the captured data in ASCII:

tcpdump -ieth0 -n tcp port 80 -A -s1500
20:56:25.260143 IP 217.10.X.X.80 > 88.110.Y.Y.51171: P 1:550(549) ack 172 win 1728
E..Mn @.@..w.
..Xn!..P….’@..\.P…3…HTTP/1.1 404 Not Found
Date: Mon, 15 Dec 2008 21:05:17 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13
Content-Length: 313
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /favicon.ico was not found on this server.</p>
<hr>
<address>Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 Server at www.[HIDDEN].com Port 80</address>
</body></html>

And from this we can see all HTTP traffic. As you can see, it’s that easy to capture and decode plaintext traffic. We can do the same on port 110 (POP3):

(more…)

Tags: , , , , , , , ,