In a pcap with many HTTP transactions, wonder if there is a way to extract the transactions whose response body starts with 3 characters "CWS" (Adobe flash). It is frequently used to deliver malware. asked 19 Oct '15, 09:33 pktUser1001 |
3 Answers:
Maybe something like this:
answered 19 Oct '15, 13:53 Jaap ♦ |
You could use the folowing display filters finding the streams (maybe if you use tshark)
or the filter which Jaap has posted. Also you can export the flash content with the following dialog: File -> Export objects -> HTTP This dialog shows you all the Obeject inside the HTTP streams and you are able to export(extract) their contents. answered 19 Oct '15, 14:19 Christian_R edited 19 Oct '15, 14:20 Thanks @Christian_R for the tips, as mentioned earlier, it may not always have the right content-type in the server response since it's malware traffic. (19 Oct '15, 17:11) pktUser1001
(19 Oct '15, 17:29) pktUser1001 It is not so easy with just a blind filter. One way is to filter out the (ip.clientaddr)and (tcp.clientport) of the response to get the full session. Other way is just to click at the Reletatd Request in the Response Packet at Packet Detail Pane. It is that what you mean? Or have you meant any different? (19 Oct '15, 21:43) Christian_R Packet Detail Pane does give the packet number of the matching request. Thanks for the tip. Ideally I would like all the desired requests and response show up in the packet list pane. (20 Oct '15, 07:21) pktUser1001 Http is sequential protocol. There for the combination of client ip and client port will show you the req and resp for sure. But of course it could be that it shows you too much. (20 Oct '15, 07:25) Christian_R |
well, please define 'extract'.
can you please try the following
or case insensitive
Regards answered 19 Oct '15, 17:02 Kurt Knochner ♦ Thanks @kurt-knochner for the question. Clarification: "Extract" means filtering the packets in the pcap so that only the packets related to the desired HTTP transactions will remain, I can then save them to another (smaller) pcap. (19 Oct '15, 17:26) pktUser1001 In your case, the best filter would be a 'media matches ...' as mentioned by @Christian_R, with a small change:
Then right click the frame and choose "Follow TCP Stream". (20 Oct '15, 00:58) Kurt Knochner ♦ Yes @kurt-knochner, (20 Oct '15, 07:24) pktUser1001 |
Thanks for the idea. It works when server sent that in the HTTP response. But malware servers may not be that honest :-(
@pktUser1001: Really ;)