Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Wireshark be used to change the content of packets

Wireshark doesn't seem to be able to change the content of filtered packets in real time.

Does anyone know a symilar software which can change packet content that is filtered.

Finding something like this will really be a life saver

Thanks.

like image 242
Mihul Avatar asked Jan 08 '11 11:01

Mihul


People also ask

Can you edit packets in Wireshark?

No wireshark won't let you change the contents of the packets and place them back on the line. However there are ways to change packets as they pass through the machine. Typically the host is setup with two nics bridged together. One nic is connected to one network and the other nic to the other network.

What can you do with Wireshark packets?

What Is Wireshark Used For? Wireshark has many uses, including troubleshooting networks that have performance issues. Cybersecurity professionals often use Wireshark to trace connections, view the contents of suspect network transactions and identify bursts of network traffic.

What exactly does Wireshark do?

Wireshark is a packet sniffer and analysis tool. It captures network traffic from ethernet, Bluetooth, wireless (IEEE. 802.11), token ring, and frame relay connections, among others, and stores that data for offline analysis.


1 Answers

At least on Unices and -like where raw sockets are used, this is not possible, since the packet is copied to userspace and you only work on that copy. Furthermore, sending a packet back through the raw socket may be considered an "outgoing" packet so that it is, in fact, not reinjected to the input path where it should be. Raw sockets were — according to the Linux manpage — designed to implement new protocols, IOW, raw sockets are an "endpoint", not a "passthrough station".

For packet modification in the input path (passthrough-like), each OS has its own set of interfaces. In Linux (you were sort of unspecific as to which you target), that would be the nfqueue mechanism, usable through libnetfilter_queue. And of course, that is how wireshark, if it wanted to (I don't see it doing packet alteration last time I checked), would go about doing this.

like image 131
user562374 Avatar answered Sep 30 '22 05:09

user562374