Search code examples
socketsprocesstcppacket-sniffers

Saving data that's being sent to a process through TCP/IP


I want to capture and save the data that's being sent to a certain process through internet .

Are there any tools for the job?

If not, does listening to the same port as the process that I'm trying to get data from, will get me the data?

Any help appreciated !


Solution

  • On Windows, use Winsock Packet Editor (WPE). You will be able to hook a process' all Winsock-related functions and capture (and even modify/block) any TCP/IP, UDP packets that the application receives or sends. For all other operating systems, you will have to either:

    1. write your own tool that hooks various socket functions (e.g. send, recv, etc.)
    2. or just use Wireshark which will capture all Layer-3 packets that goes through your network card. You will have to use your own knowledge of the application that you're trying to monitor in order to filter the packets that are specific to the application.