Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-16-2006, 01:20 PM
|
#1
|
Member
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567
Rep:
|
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.
|
|
|
02-16-2006, 02:17 PM
|
#2
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
You should be able to use ethereal for this.
|
|
|
02-17-2006, 09:12 AM
|
#3
|
Member
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567
Original Poster
Rep:
|
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 ... ?? ... ... ? ? ? ?
|
|
|
02-17-2006, 09:20 AM
|
#4
|
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307
Rep:
|
You buy a hub and you put it on the host you want to monitor
Easy 
|
|
|
02-17-2006, 12:08 PM
|
#5
|
Member
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567
Original Poster
Rep:
|
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 ....
|
|
|
02-17-2006, 12:32 PM
|
#6
|
Senior Member
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024
Rep:
|
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.
|
|
|
02-17-2006, 03:01 PM
|
#7
|
Member
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567
Original Poster
Rep:
|
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.
|
|
|
02-18-2006, 09:31 PM
|
#8
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
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.
|
|
|
All times are GMT -5. The time now is 03:49 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|