Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Security
Reload this Page Configuring tshark
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Security Discussion about keeping your machines secure, and the crackers out.

Reply
 
Thread Tools Display Modes
Old 05-06-2008   #1 (permalink)
ahs3ng
Just Joined!
 
Join Date: Feb 2008
Posts: 27
Configuring tshark

Hi guys

I wanna collect the raw data to and from my server to cisco router. I googled and read up tshark, tried to find some simple guide for it but failed.

Anyone could help out?

Thanks alot
ahs3ng is offline   Reply With Quote
Old 05-08-2008   #2 (permalink)
SagaciousKJB
Just Joined!
 
SagaciousKJB's Avatar
 
Join Date: Aug 2007
Location: Yakima, WA
Posts: 99
Send a message via AIM to SagaciousKJB Send a message via MSN to SagaciousKJB
Well, as always, the man file is a tremendous help...

In anycase, this is the command I usually use

Code:
tshark -w - -i -eth0 -f "port 80" | dd of=./http_traf
Note that's a '-' after the -w switch to denote to write raw data to stdout. There is a option to specify the output file in tshark, but I typically wind up getting permission write problems when using that, so I pipe the output out to dd instead, which is extremely flexible in piping it out to other programs and files.

For a basic explanation...

-w - writes raw packet data to stdout
-i specifies the interface
-f "port 80" specifies the capture filter

You can look up tshark or wireshark capture filters on google to find more of these, or you can simply capture all traffic by ommiting the -f switch all-together. To capture on all interfaces, use 'any'. It might also work with 'all', but I've typically used it with 'any'

I think that should give you a good enough idea of how to use it, with a little help from the man file.
SagaciousKJB is offline   Reply With Quote
Old 05-08-2008   #3 (permalink)
ahs3ng
Just Joined!
 
Join Date: Feb 2008
Posts: 27
Talking

cool.. thanks alot! that really helps alot.. bwt im wish to see the raw packet in hex hash, any idea how do i do that?
ahs3ng is offline   Reply With Quote
Old 05-08-2008   #4 (permalink)
SagaciousKJB
Just Joined!
 
SagaciousKJB's Avatar
 
Join Date: Aug 2007
Location: Yakima, WA
Posts: 99
Send a message via AIM to SagaciousKJB Send a message via MSN to SagaciousKJB
Well, you could use a graphical packet capture program to open the data. Wireshark or Ethereal would probably do, and they would probably have an option to view as hex.

The other option is just to simply use a hex editor, but I don't think it would be nearly as informative as doing it with a packet capture program, as it would know how to differntiate between the data of the packet itself, and the data that the packet is carrying simply by highlighting different parts of the packet structure.
SagaciousKJB is offline   Reply With Quote
Old 05-08-2008   #5 (permalink)
ahs3ng
Just Joined!
 
Join Date: Feb 2008
Posts: 27
i see.. the server running on centos5 text.. no gui.. anyway thanks for your help
ahs3ng is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 09:54 AM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0