LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-16-2006, 01:20 PM   #1
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Rep: Reputation: 30
Talking sniffing over the router


In my lan i have a router netgear 192.168.0.1 after it there is a linuxbox 2eths as netfilter,i need to sniff from this machine the wan traffic over 192.168.0.1.
 
Old 02-16-2006, 02:17 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
You should be able to use ethereal for this.
 
Old 02-17-2006, 09:12 AM   #3
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
If i want to sniff the connection of two really remote hosts,both not in my lan,would that be possible,how do i set ethereal to do this?A so called MITM!
... questions .... ?? ... questions ... ?? ... ... ? ? ? ?
 
Old 02-17-2006, 09:20 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
You buy a hub and you put it on the host you want to monitor
Easy
 
Old 02-17-2006, 12:08 PM   #5
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
A hub beetwen the 192.168.0.1 router and the linux box behind it.Anything that passes the router's nic is seen by all other hosts in lan,right?But maybe i got it wrong .Let's say i want to sniff all traffic that goes from macrozoz.com in japan to caccanet.com in russia,is that impossible?I'm studing a tool made by some italian geeks called ettercap it has an option that starts by putting two target hosts and by arp poisoning them make a man in the middle attak,they are not going to fisically go in japan and then maybe russia to make this happen,but ....
 
Old 02-17-2006, 12:32 PM   #6
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Hosts on The Internet send traffic targeted to each other through varying routes on The Internet. Even if you wanted to monitor their traffic remotely, unless you are connected to the same LAN as one of them, the data exchange can take multiple paths so you pretty much have to be close to, if not on, one of the end networks to have a chance at grabbing any data.

LAN being a local network, and assumed to be a single IP subnet, can only be "sniffed" for traffic on that LAN. This means traffic coming from, or going to that LAN. If there is a switch (or bridge) between your monitor node and the router then you won't even see all of the LAN traffic, just stuff destined for your system and broadcasts. The simple answer is that no you can't sniff traffic between two remote nodes, unless you can compromise a node that's on the same collision domain as, or a router between, one of them. ARP poisoning has the same limits (ARP = LAN != The Internet) so you can't mess with ARP tables at all unless you have a node on the same LAN. If that confuses you, try a wikipedia or google search for the difference between a hub and switch, what a collision domain is, what Address Resolution Protocol is and how IP routing works.

In theory it's possible to do a Man In The Middle attack over The Internet, but it would require poisoning something like DNS entries or route tables. That's something that could affect the whole Internet which means there could be dire consequences for those actions not to mention it's not a chore for the light at heart.
 
Old 02-17-2006, 03:01 PM   #7
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
That's right!Look this scenario:
gabrix:~# tcptraceroute www.google.it
Selected device eth0, address 192.168.1.4, port 33486 for outgoing packets
Tracing the path to www.google.it (66.249.93.99) on TCP port 80 (www), 30 hops max
1 192.168.1.1 1.039 ms 0.178 ms 0.153 ms
2 192.168.0.1 3.114 ms 0.902 ms 0.907 ms
3 192.168.100.1 53.579 ms 57.464 ms 53.439 ms
......................................
...............................................
the firsts two hops are my gateways the 3th is my isp's proxy(a private ip for a public server ... ) it's not in my lan but ... it could became!right?I'm following networking studies for cisco ,just started,so i'm experimenting,i could own that host as like some one could use it to attak me.In the first place i wanted to sniff traffic behind my router which is the 2 hop,i could go even over it and over my isp's proxy,what do you think?
I'm impressed by the powerful features of tools like ethereal or ettercap,i just started making filters,what filters would you use,just to monitor after the last hop??

Last edited by gabsik; 02-17-2006 at 03:09 PM.
 
Old 02-18-2006, 09:31 PM   #8
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
In theory, an MITM attack can be performed over the net. In reality, it's noisy as hell to do so and would raise some huge red flags with quite a number of information security officers.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sniffing password?!?! nostromo Linux - Wireless Networking 11 01-18-2005 03:57 AM
wired computer sniffing wireless router drkshadow Linux - Wireless Networking 0 11-24-2004 01:31 AM
IP Sniffing, how? shrike_912 Slackware - Installation 1 06-06-2004 05:36 PM
IP-less sniffing on WAN side of internet router codeape Linux - Networking 18 02-17-2004 02:18 PM
sniffing network traffic, linux server between firewall and router, only want http sabah Linux - Networking 2 10-20-2003 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration