Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 19th August 2010, 01:10 AM
mathteacher Offline
Registered User
 
Join Date: Jun 2006
Posts: 26
linuxfedorafirefox
T-like utility for sniffing/logging TCP connections

I need a utility to record the traffic on a particular TCP port. I know there are packet sniffers that can do this, but I don't need to monitors the wire, just the traffic to and from my own computer. I would assume there is something out there that can hook into the TCP stack and copy the data to a file just before/after it goes out/in, but my google fu has failed me.

Thanks.

Edit: NVM - Found tcpdump

Last edited by mathteacher; 19th August 2010 at 01:21 AM.
Reply With Quote
  #2  
Old 19th August 2010, 03:55 AM
nick.stumpos's Avatar
nick.stumpos Offline
Registered User
 
Join Date: Feb 2005
Location: Lansing, Mi
Age: 28
Posts: 2,222
windows_7chrome
Re: T-like utility for sniffing/logging TCP connections

Tcpdump you can just get you nice or the wire also for GUI wireshark can filter on on ip
__________________
As always
Love, Life, Loyalty, Wisdom, Knowledge, And Understanding
FC6: Common Questions answered
Reply With Quote
  #3  
Old 21st August 2010, 02:32 PM
mathteacher Offline
Registered User
 
Join Date: Jun 2006
Posts: 26
linuxfedorafirefox
Re: T-like utility for sniffing/logging TCP connections

OK, new question. tcpdump and wireshark were good finds, but the stream I'm trying to look at is SSL, and I need to see the application data. I don't have the server's private key, so ssldump is not an option. I know that if over the wire snooping on SSL communications were easy, it would be useless, but that's not really what I need. I just need to be able to look at the traffic coming in and out of my computer. What I really need is some way to hook into the TCP library and log traffic before it hits the SSL layer, maybe via a LD_PRELOAD or similar. Does anyone know of a way to do this?

Thanks,
Jay
Reply With Quote
  #4  
Old 21st August 2010, 02:48 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,098
linuxfedorafirefox
Re: T-like utility for sniffing/logging TCP connections

Sorry, no such thing.

The SSL library is built into the application, specifically to prevent this.

What you would have to do is compile your own version of sshd, and tap into
the data AFTER it has been decrypted, or (harder actually) bug the ssh client,
but then the output data would be owned by the user...

NOTE: This can be highly illegal depending on your environment (as in your own
personal system).

In any organizational environment (and especially government) this should ONLY
be done during an investigation and with legal authority - get a memo of
investigation and approval of the security officer and your supervisor.

There is an additional problem - ssh allows "tunneling" of other socket connections
over an ssl TCP connection. If you dump all traffic, you could easily run out of space,
second, you would have to preserve any stream tags. Remember, at a minimum you
could be tunnelling the forwarded X window protocol to one or more windows. Also
if the user has sshfs installed, you get TONS of data from file I/O, directory information,
all of it binary.

Without more information on what you are trying to do, I doubt we will be able to help.

Last edited by jpollard; 21st August 2010 at 02:54 PM.
Reply With Quote
  #5  
Old 21st August 2010, 04:02 PM
mathteacher Offline
Registered User
 
Join Date: Jun 2006
Posts: 26
linuxfedorafirefox
Re: T-like utility for sniffing/logging TCP connections

Okay, thanks for the info. I can perhaps do what I need to through judicious use of a debugger.

For the record, the only snooping/tampering I intend is on the data in and out my own personal computer.
Reply With Quote
  #6  
Old 22nd August 2010, 12:30 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,098
linuxfedorafirefox
Re: T-like utility for sniffing/logging TCP connections

debugger won't help - It cannot decode the embedded data streams, nor will it
easily handle the buffering - you will see multiplexed data (keys/data/headers
but no identification of what the data is.

Keystrokes, for instance, show up as 1 to about 6 bytes (the data) but then
you add the headers, multiplexing flags, and any other data (it packs the data)
which is then compressed prior encryption and transmission.

Last edited by jpollard; 22nd August 2010 at 12:33 AM.
Reply With Quote
  #7  
Old 22nd August 2010, 02:05 AM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,300
linuxfedorafirefox
Re: T-like utility for sniffing/logging TCP connections

Yeah well - some solid misinformation here. ssh does NOT use SSL - tho' it can use many of the same crypto libraries.
ssh/sshd do crypto in the application layer while SSL and it's younger sibling TLS do crypto in the stack.

As said, you can't crack any of the common FIPS crypto without the key, or elseZ a stack of mathematicians, supercomputers and time.

Anyway ?ARE? you trying t decrypt your ssh channel - or is it some other ssl/tls channel ?
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
Reply

Tags
connections, sniffing or logging, tcp, tlike, utility

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FC4 stop logging after Webmin installed ( bandwidth logging ) simonxyz EOL (End Of Life) Versions 0 15th November 2005 10:48 AM
Logging SSH connections sforget Servers & Networking 5 24th June 2005 08:49 AM
wireless sniffing tools ewdi Servers & Networking 3 21st February 2004 04:22 AM


Current GMT-time: 16:12 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat