Wireshark doesnt show UDP packets - networking

I have checked this UDP packets not displayed in Wireshark and this UDP Packet not captured by Wireshark, but is captured by UDP application , but couldnt solve my issue.
I am using Wireshark to observe traffic on an adapter I have connected to some network device- no other traffic than the one I issue is there.
Then I am using Packet Sender application to send a UDP packet to an IP address I know is on the other side of the adapter (i.e. I am 10.10.10.34, the other device is 10.10.10.1).
I can correctly ping the other device and ICMP packets are visible in Wireshark. I can sent TCP or SSL packets and see them in Wireshark. Whenever I send UDP packet, it is not seen in Wireshark- I cannot figure out why. All my settings are default ones.
The other thing I suspect that the UDP packet is not sent by the Packet Sender application, but I am not sure how to validate that.

The case was not about Wireshark, but about Packet sender. Binding the IP address as described here solved my problem:
https://github.com/dannagle/PacketSender/issues/158#issuecomment-516481820

Related

Windows Host OS appears to ignore injected packets via linux sendto using raw socket

I am sending packets to a Windows network card (eth1) using the Linux sendto() function and a RAW socket (socket(AF_INET, SOCK_RAW, IPPROTO_RAW);). However, although the packets are addressed to the IP address of the network card, the host OS appears to "ignore" the packets.
For example, the network card has IP 192.168.1.2, and my userspace application sends a network packet containing a ping addressed to 192.168.1.2. I can observe in Wireshark the ping arrive on the network device at 192.168.1.2, however no reply is generated. The TTL on the ping is non-zero, so I'm lost as to why the host OS would appear to "ignore" packets destined for it.
Equivalently, if I create a UDP socket and bind it listening to 192.168.1.2 on port 5050, and then send a userspace UDP packet addressed to 192.168.1.2 on port 5050, the packet is never delivered to the port.
What would cause a packet to be ignored by the network card that receives it?
Is there any socket flag needed if I'm sending packets in from userspace (over a custom IP tunnel) to force processing of the packets, as if they came from a router?
The issue turned out to be the native windows firewall, disabling the firewall fixed this issue.
In addition, if republishing network packets on a network device, if a single device (mac addr) is publishing multiple ip packets from various source ips, windows may filter out packets with the assumption that mac<->ip is a unique 1:1 mapping.

How can I prevent Windows10 from sending a TCP RST to a particular IP nad PORT?

I have been analyzing packets sent out from my IP to a game server.
The connection to the server was getting reset for some reason and after packet capture, I could see that there are TCP RST packets sent at the time of the disconnection.
I have tried to use advance firewall to specifically only restrict the TCP RST packets to the game server to see if that will prevent this disconnection. However I am unable to specify the flag level details in the rules.
How can I accomplish this configuration?
Is there any third party firewall that can do this?
Thank you

Unable to capture a UDP protocol packet with Wireshark by visiting any website

I am using wireshark, and for an exercise we need to capture a UDP packet with wireshark by visiting any website, and then analyze the information within that packet.
I have tried numerous times and all websites appear to send packets with TCP protocol. I have looked at Wireshark documentation, as well as looked online and am stumped.
What am I doing wrong, and how can I get a UDP packet by visiting a website?
Thats the main question. A side question is: how do I filter the captured packets to only those packets referring to requests and responses from websites over the network? Currently there appear to be a bunch of low-level captured packets that I need to scroll through.
Thanks in advance!
Because websockets/HTTP is over TCP.
And in Wireshark,if you are intending to see packets corresponding to a particular client/server, click on the packet and do "Follow TCP/UDP stream"
You will never see a UDP packet in a WEB connection. Never never never. The Web's connection is in HTTP protocol and HTTP is encapsulated in TCP.
If you need see UDP packets en wireshark you can generate UDP sockets from your host. You can:
Make a connection with a TFTP server.
Renew your IP you will see the DHCP protocol.
You search, what protocols are encapsulated in UDP and use it.
Make a program with UDP sokects.

how to allow TCP response packets enter network and how to configure it in access-list?

What is TCP response packets?
How to meet this requirement in access-list on a router?
You probably want to look up stateful firewalling for whatever router you're using.
TCP response packets are basically any related TCP packets that come back after an initial SYN has been sent. Typically this would be either a packet with SYN+ACK set, or one with RST if the connection was refused.
Stateful firewalls keep track of not just the source and destination of individual packets, but what connection the packets belong to. By doing this they are able to distinguish between expected, legitimate replies to SYN packets (and others) and random or malicious unrequested "replies".

Sniffing detection

Can someone tell me how exactly works "test ICMP"? (One of methods to detect sniffing in local network)
Sniffing detection is basically detecting if there are any sniffers in your network. The main feature of sniffers that is used to detect them is that they place the network card in promiscuous mode, listening for all traffic. Typically, a sniffer is placed on a machine with a full TCP/IP stack which will be affected by this mode.
ICMP is the protocol behind the ping command. To ping a machine, you send an ICMP Echo request packet to it and wait for an ICMP response one. Usually, the ICMP request is embedded in an Ethernet packet to be delivered across the network. A standard Ethernet packet would include the MAC address of the addressed network card, as well as the IP address of that machine in the embedded ICMP packet. The packet would be detected by the appropriate card and that machine would respond to the ping. This is the standard process.
Now let's see what happens if we sent a ping packet (ICMP Echo request one) with the IP address of the suspected sniffer address but with a different, faulty MAC address in the Ethernet envelope.
If the network card in the sniffer machine is not on promiscuous mode, then the packet will not be received by that machine. Naturally, the machine wouldn't respond. The ping attempt would fail.
If the network card in the sniffer machine is on promiscuous mode, then the machine will see all packets in the network. The TCP/IP stack on that machine would thus accept the ping packet by identifying the received packet IP address. The stack would thus send a response. The ping attempt would succeed.
Similar to other methods of detection, this has false positives as well as false negatives. The sniffer machine may be instructed to ignore all ICMP requests. Detecting promiscuous mode is not exactly detecting sniffers, though it is a very significant clue.

Resources