Wireshark HTTP Trace - http

How do I trace the path of HTTP packets using Wireshark. When I filter out using keyword "HTTP", all I see is just the source and destination IP addresses, rather for every HTTP request I would want to see what path did it take with their IP addresses. I would like to see an output similar to traceroute.

It is impossible for a sniffer program to determine the full path that an IP packet took merely by looking at the packet, unless one of the IP "record route" options was used, so that the packet, as received by the program, contains the full route. That option is rarely, if ever, set.
In addition, that wouldn't help for packets sent by the machine running the sniffer program - you have to capture packets on the final machine in order for the recorded route to have the full path.
So, no, Wireshark can't do this, tcpdump can't do this, Microsoft Network Monitor can't do this, KSniffer can't do this, NetScout Sniffer can't do this, OmniPeek can't do this, no sniffer can do this.

Related

Wireshark: How to filter for a specific SYN packet?

I'm pretty new to Wireshark and stuck with a filter task.
I have network traffic and error messages from a certain system. I need to trace the SYN packet of one of my error messages.
For Wireshark, that means I need to filter for one specific IP-port combination x.x.x.x:xxxx among the SYN packets.
With tcp.flags.syn == 1 as a display filter I have been able to narrow down Wireshark's output to only SYN packets, but it's still far too many to find the one packet belonging to the port where we see the error and that we would like to follow.
Can you help me with that?
Looking only at SYN packets is not very helpful if you need to find a conversation that has problems - it's usually better to gather as much information about the IPs involved in the problem and filter on them. E.g. if you know that the computer with the IP 192.168.1.1 has a problem, and your capture has tons of conversations, you can filter on that IP by using the following filter:
ip.addr==192.168.1.1
If you also know the layer 4 protocol and port (e.g. TCP on port 1025) you can filter on both IP and port, like this:
ip.addr==192.168.1.1 and tcp.port==1025.
If you have a plain text protocol and know the text of the error message (if it is actually visible in a packet, and not just some coded thing), you could use the "find" option and search for the string (don't forget to set the search type to "string", because the default is "display filter").

Can we use ping to see packet dropped in traffic control?

I am studying in traffic control and want to know how we can check packet dropped in a traffic control that I config it. Can we use ping icmp not?
You can use ping to check if there is currently some packet loss, but if you need to see if any packets were dropped before something like "netstat -s" or regularly checking the data in /proc/net/netstat (on unix-like systems) might be more useful.

tcpdump slowed down by... its own filter?

Do long BPF filters slow down tcpdump?
I replay a packet trace where all the packets have ttl=k and wait for ICMP messages back. What I've been noticing is that if I use the following filter (on eth0):
(ip and ip[8]=$k and src host $myAddress) or (icmp and dst host $myAddress and icmp[0]=11)
...I always miss 20-30 packets among the sent packets, whereas if I just do:
ip
... and then do the exact above filtering offline on the capture file, I find all the packets I had sent.
Is this a known behaviour?
If tcpdump is not fast enough to pop out captured packets from the queue, the kernel could drop some of them.
Look at the "XXXX packets dropped by kernel" message at the end of the dump to see if effectively some of them is lost.
Ensure to add the -n option to the command line. This will avoid DNS resolving and it will speed up a little (depending on your network)

Identify fake UDP Packet

I want to identify an UDP or TCP packet that have its source IP address faked. My guess is that even if the packet is faked with a program such has hping, the MAC src address is still the same on all the faked packets, is this correct?
If my idea is not correct, how can I identify such packets that are being faked and looks like it has different source for each and every packet?
Thanks.
MAC addresses can be faked too.
With TCP, its easy to identify / handle this. You'll reply to a fake SYN packet with a SYN-ACK. If it was a real client, it'd reply with an ACK to complete the handshake. Only caveat is that you'll have to implement syn-cookies so that you don't create state & use up resources while waiting for an ACK.
With UDP, there is no way to know, since the protocol is connection-less. If you send a reply to the fake packet, you're not guaranteed a response from a "real" client. So there is no way to identify a fake one.
The way I see it, UDP and TCP have nothing to do with this. You're talking about only layer 2 (MAC) and layer 3 (IP). Even at that though, you have no way of knowing, because the source MAC address should be that of the closest router to the recipient (assuming the packet did not originate in your subnet.) So you should see the same MAC address for most all inbound packets (again, internet traffic only).
Now there are profiling tools like p0f that work on signatures of packets, and you could try and do some heuristics based on that information, but nothing very concreted could be determined.
From the packet you can get the MAC address of the nearest node. Yeah you can send ACK packet to the fake source address(IP) and then use Traceroute command to know the path of the source packet, so that you can atleast find the location of the originating. It works well in TCP and you can have acknowledgement also.

Measuring Dropped packets in Network through wireshark

Monitoring the all network traffic from one port on the switch and captured the all traffic bu using wireshark.
Here i found all packet captured in the summary result and it has dropped packet information also. This is some thing lost packets in the network or at the wireshark point?
I was in ambiguous...i am testing in ethernet based and TCP/IP based protocol.
One more possible case if my server is installed with wireshark and its capturing the all packets coming and going from this point. At this point also found the packet dropped in the wireshark summary.
So any one help in this issue....any explanation appreciated.
thanks....
Chirug
Surely wireshark is only telling you about packets it has dropped? I can't see how it could possibly know about any others.

Resources