Hi, I use tcprewrite command to randomize the IPs of different pcaps: tcprewrite --seed=$RANDOM --infile=a.pcap --outfile=B.pcap This changes IPs of both source of destination. Is there anyway I can limit this change to source IPs or destination IPs alone and not both? asked 12 Feb '14, 01:52 rorolia |
2 Answers:
I don't think it is possible. Also, the source address in one packet is the destination address in the answer packet, so keeping only half and replacing the other doesn't make any sense I think. If you're not bound to Linux tools and need more control over your replacements check out TraceWrangler. answered 12 Feb '14, 02:01 Jasper ♦♦ |
I am not sure if this is what you want. I used to change source IP to something else or destination IP to something else. And, this is how I am doing it. tcprewrite --srcipmap=a.a.a.a/32:c.c.c.c/32 --infile=file1.pcap --outfile=file1_temp.pcap request: tcprewrite --dstipmap=a.a.a.a/32:d.d.d.d/32 --infile=file2.pcap --outfile=file2_temp.pcap request: answered 12 Feb '14, 02:53 hunghoong |
And of course tcprewrite isn't part of the Wireshark suite so you may got more focused help over at the help specifically for that application.
The problem of source IP becoming dest IP can be solved if rewrite is occurring only on src IPs in case of request packets and dest ip in case of response packet
In the case of UDP (and other protocols), how do you identify what is a request and what is a response packet, who is 'client' and who is 'server', as there is no session establishment protocol like TCP 3-way handshake??
As long as you know the subenets in your capture file, you could use --pnat instead of --seed