Go Back   Wireless and Wifi Forums > News > Newsgroups > comp.security.misc
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-30-2005, 04:11 PM
ketema@gmail.com
Guest
 
Posts: n/a
Default tcpdump file recovery

I was wondering it its possible to reconstruct a binary file captured
with a utility like ethereal. I have been successful in
reconstructing files using a program call tcpflow using its -r option,
and for text this is fine, but I'm having trouble figuring out to take
the file generated by tcpflow and actually save it as it was
originally intended. Is this possible? What utilities can accomplish
this? BTW simply renaming the file does not seem to work for me.
Example of desired goal: capture traffic using a libpcap program
like ethereal, save the output to a file, process that file with
tcpflow -r file and receive many files named by ip source and
destination, take one of these files and actually view it, if say it
was a jpeg, or run it if it was an application, etc. Thank You.


Reply With Quote
  #2 (permalink)  
Old 08-31-2005, 07:54 PM
Moe Trin
Guest
 
Posts: n/a
Default Re: tcpdump file recovery

In the Usenet newsgroup comp.security.misc, in article
<1125418260.893775.166380@o13g2000cwo.googlegroups .com>,
ketema@gmail.com wrote:

>I was wondering it its possible to reconstruct a binary file captured
>with a utility like ethereal.


Possible? Yes. Practical? No

>I have been successful in reconstructing files using a program call
>tcpflow using its -r option, and for text this is fine, but I'm having
>trouble figuring out to take the file generated by tcpflow and actually
>save it as it was originally intended. Is this possible?


I'd rather doubt that it's PRACTICAL. Using a stream editor, you could
convert the stream of packets into a file, but you would have to know the
protocols involved, and how to convert TCP and IP header data (specifically
the Offset and Length data) and match up port numbers and IP addresses.
The data is in there, it's just not something that would be practical.

>Example of desired goal: capture traffic using a libpcap program
>like ethereal, save the output to a file, process that file with
>tcpflow -r file and receive many files named by ip source and
>destination, take one of these files and actually view it, if say it
>was a jpeg, or run it if it was an application, etc.


A more practical solution would be to set up a proxy server, and have
the system you want to snoop on use that instead of the real source.

You are posting from the USA. You may wish to consult an attorney, as
this action may violate local, state, or federal law relating to
privacy, and intercepting data (especially if the data is from/to
"out of state").

Old guy

Reply With Quote
  #3 (permalink)  
Old 08-31-2005, 11:19 PM
Barry Margolin
Guest
 
Posts: n/a
Default Re: tcpdump file recovery

In article <slrndhc2n1.fu0.ibuprofin@compton.phx.az.us>,
ibuprofin@painkiller.example.tld (Moe Trin) wrote:

> I'd rather doubt that it's PRACTICAL. Using a stream editor, you could
> convert the stream of packets into a file, but you would have to know the
> protocols involved, and how to convert TCP and IP header data (specifically
> the Offset and Length data) and match up port numbers and IP addresses.
> The data is in there, it's just not something that would be practical.


You mean like Ethereal's "Follow TCP Stream" operation does?

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

Reply With Quote
  #4 (permalink)  
Old 09-01-2005, 11:33 AM
Volker Birk
Guest
 
Posts: n/a
Default Re: tcpdump file recovery

Moe Trin <ibuprofin@painkiller.example.tld> wrote:
> >I was wondering it its possible to reconstruct a binary file captured
> >with a utility like ethereal.

> Possible? Yes. Practical? No


With an Ethereal dump it's possible to replay the traffic. Therefore
it's possible and practical to restore transported binary files, if
there was no encryption.

Yours,
VB.
--
"Es kann nicht sein, dass die Frustrierten in Rom bestimmen, was in
deutschen Schlafzimmern passiert".
Harald Schmidt zum "Weltjugendtag"

Reply With Quote
  #5 (permalink)  
Old 09-01-2005, 12:21 PM
Tore Lund
Guest
 
Posts: n/a
Default Re: tcpdump file recovery

ketema@gmail.com wrote:
>
> I was wondering it its possible to reconstruct a binary file captured
> with a utility like ethereal.


It is certainly possible. But it sounds like you want to extract
several files from a stream, and that might be a mess.

I have extracted JPEG files myself. However, later on I discovered that
these can be picked up from the cache if you run Mozilla. All you have
to do is find the right file. Maybe other binary files can also be
found in Mozilla's cache.
--
Tore

Reply With Quote
  #6 (permalink)  
Old 09-01-2005, 02:31 PM
ketema@gmail.com
Guest
 
Posts: n/a
Default Re: tcpdump file recovery

Thanks, for all the reply's I appreciate teh help, but so far no has
supplied an answer. Perhaps this attachment will help. It is a
reconstruction of a simple free executable that can be downloaded from
www.downloads.com. The file is what was recontrsucted from the tcpflow
-r opton. notice that it is a binary file, but it has a header that to
me appears to be added by the tcp flow program. Can anyone get this
file to execute like the original? The file is i_view32.exe which is a
free graphic viewer made my a guy named Irfan, it should be easily
verifiable by downloading it either from his website or from
downloads.com or tucows. Since Google doesn't allow me to attach, the
tcpflow file can be found here on my website
http://www.ketema.net/stream
the entire ethereal log file can be downloaded too
http://www.ketema.net/tcpdump_ethereal.log


Reply With Quote
  #7 (permalink)  
Old 09-01-2005, 07:55 PM
Moe Trin
Guest
 
Posts: n/a
Default Re: tcpdump file recovery

In the Usenet newsgroup comp.security.misc, in article
<barmar-568064.19190331082005@comcast.dca.giganews.com>, Barry Margolin wrote:

> ibuprofin@painkiller.example.tld (Moe Trin) wrote:
>
>> I'd rather doubt that it's PRACTICAL. Using a stream editor, you could
>> convert the stream of packets into a file, but you would have to know the
>> protocols involved, and how to convert TCP and IP header data (specifically
>> the Offset and Length data) and match up port numbers and IP addresses.
>> The data is in there, it's just not something that would be practical.

>
>You mean like Ethereal's "Follow TCP Stream" operation does?


I think the O/P wants something more 'turn-key'. The paragraph that followed
wanted packet-capture all the way to displaying the file contents, or running
the file if it were an application.

Old guy

Reply With Quote
  #8 (permalink)  
Old 09-01-2005, 07:55 PM
Moe Trin
Guest
 
Posts: n/a
Default Re: tcpdump file recovery

In the Usenet newsgroup comp.security.misc, in article
<4316e703@news.uni-ulm.de>, Volker Birk wrote:

>Moe Trin <ibuprofin@painkiller.example.tld> wrote:


>>> I was wondering it its possible to reconstruct a binary file captured
>>> with a utility like ethereal.

>> Possible? Yes. Practical? No

>
>With an Ethereal dump it's possible to replay the traffic. Therefore
>it's possible and practical to restore transported binary files, if
>there was no encryption.


Have you an application that the O/P can use? He's already got a means to
replay the traffic - what he wants is something to rebuild it and then
display/run the result (which sounds like passing it to OE without concern
for any security).

Old guy


Reply With Quote
  #9 (permalink)  
Old 09-01-2005, 09:05 PM
ketema@gmail.com
Guest
 
Posts: n/a
Default Re: tcpdump file recovery

Moe Trin has stated it exactly. What is "passing it to OE" is OE some
sort of program to actually rebuild the original file? If so that is
what I'm looking for.


Reply With Quote
  #10 (permalink)  
Old 09-02-2005, 01:41 AM
Barry Margolin
Guest
 
Posts: n/a
Default Re: tcpdump file recovery

In article <slrndhen4b.lec.ibuprofin@compton.phx.az.us>,
ibuprofin@painkiller.example.tld (Moe Trin) wrote:

> In the Usenet newsgroup comp.security.misc, in article
> <barmar-568064.19190331082005@comcast.dca.giganews.com>, Barry Margolin wrote:
>
> > ibuprofin@painkiller.example.tld (Moe Trin) wrote:
> >
> >> I'd rather doubt that it's PRACTICAL. Using a stream editor, you could
> >> convert the stream of packets into a file, but you would have to know the
> >> protocols involved, and how to convert TCP and IP header data (specifically
> >> the Offset and Length data) and match up port numbers and IP addresses.
> >> The data is in there, it's just not something that would be practical.

> >
> >You mean like Ethereal's "Follow TCP Stream" operation does?

>
> I think the O/P wants something more 'turn-key'. The paragraph that followed
> wanted packet-capture all the way to displaying the file contents, or running
> the file if it were an application.


I just meant that it's PRACTICAL (to copy your emphasis) to write a tool
that uses the same technique as Ethereal's Follow TCP Stream to do what
he wants.

In some cases it would have to do a little more than what Follow TCP
Stream does, though. For FTP, all it has to do is get the stream from
the data connection, but for HTTP it would have to recognize the request
and response header, so that it can skip over them and find the end of
the data (and in the case of chunked encoding, it will have to recognize
the individual chunks).

None of this is incredibly challenging, it's just some pattern matching.
I don't know offhand of any turn-key application to do it, but
Ethereal's Follow TCP Stream code should provide a good head start.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

Reply With Quote
Reply

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing/opening file sent by secure method Zak alt.computer.security 1 02-28-2007 08:58 AM
Viewing/opening file sent by secure method Zak comp.security.misc 1 02-28-2007 08:58 AM
Corrupt NTFS filesystem Citizen Bob alt.comp.hardware 144 11-11-2006 07:38 PM
Partition File Structure Recovery: NTFS Partition kc2lto@gmail.com alt.comp.hardware 1 09-09-2005 05:02 AM
Re: File Recovery software suggestions Sleepy alt.comp.hardware 0 08-15-2005 08:39 AM


All times are GMT. The time now is 10:06 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45