#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    7
    Rep Power
    0

    can i listen on a remote machine?


    hi ev1!
    i have a question. i know its kinda specialized but here goes...
    ive readin socket programming tutorials and i know how to listen on my local machine, but is there a way to listen on a remote machine. someone told me there wasnt, but im not sure yet.
    and if its not possible, how do packet sniffers work? i always thought they listened on ports of other machines. please help, i have some homework related w this...:confused:
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,607
    Rep Power
    4247
    >> i always thought they listened on ports of other machines.
    No, there would have to be a security hole if you could remotely install a port listener on another machine. Also, the concept of ports occurs at the transport layer of a TCP/IP stack, whereas a packet sniffer monitors stuff from a lower layer (physical or network layer). The way they work is by sniffing the packets that go across the line between two computers.

    Consider the following setup with two machines A and B:
    Code:
    A --------------------- B
    Now a packet sniffer E could sit in between the line like this:
    Code:
    A -----------+----------B
                 |
                 E
    Now, the packet sniffer can see everything going on the line between A and B, because of the tap in between. Not only is it possible for E to see the traffic on the line, but it is also possible for E to insert additional data into the line. Obviously, if the line between A and B is protected, there's no way for you to install a tap between A and B.

    Consider an ethernet network with four computers A, B, C and D
    Code:
    +-----+-----+-----+
    |     |     |     |
    A     B     C     D
    Now when a packet is sent from A to C, since B and D are on the same common line, they can see what is going through the pipe from A to C, since signals sent on the common line go to all computers hooked to the line. So you could set up something to display the packets flowing through the line on either B or D or both (or add a 5th computer E, which monitors traffic flowing between the other computers).
    Last edited by Scorpions4ever; September 15th, 2003 at 07:36 PM.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    7
    Rep Power
    0
    thx scorpions4ever!
    do you know any where i can get code or tutorials of this (good ones).?? im currently looking at beej's guide to network programming, but i dont think it talks about it. thanx again...:)
  6. #4
  7. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,607
    Rep Power
    4247
    My favourite books are by Richard Stevens (http://www.kohala.com/start/) and in particular, TCP/IP Illustrated Volume 1: The Protocols, and my favourite tool is tcpdump: http://www.tcpdump.org/

    Incidentally, Stevens' book makes heavy use of tcpdump to demonstrate what is going on with various protocols.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  8. #5
  9. not a fan of fascism (n00b)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Feb 2003
    Location
    ct
    Posts
    2,756
    Rep Power
    95
    hey scorpions have you read volume 2 - the implementation yet? i just got it in the mail toaday what an awesome book :)

    http://citeseer.nj.nec.com/mccanne92bsd.html - this is good paper to read if your on *bsd/unix
    http://www.whitefang.com/rin/ - another goood one
    http://www.linuxjournal.com/article.php?sid=4659 -that's great for linux
    http://tangentsoft.net/wskfaq/ - for windows
    and my favorite one http://library.n0i.net/linux-unix/ad...liable-guides/

    and teh best one http://www.phrack.org/show.php?p=61&a=13
    Last edited by infamous41md; September 15th, 2003 at 07:03 PM.
  10. #6
  11. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,607
    Rep Power
    4247
    I own all three volumes :D.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  12. #7
  13. not a fan of fascism (n00b)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Feb 2003
    Location
    ct
    Posts
    2,756
    Rep Power
    95
    hmm well i know who im going to bother when i have questions ;)
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    7
    Rep Power
    0
    Thanx a million guys...im gonna check all that out...:D

IMN logo majestic logo threadwatch logo seochat tools logo