Forum Thread: Socket Programming - Spoof Source IP

Hello, I'm trying to send spoofed packets through the LAN that the source IP is different(in order to impersonate a server).

The server communicates with the client through ip/tcp, so what I made is a script in scapy that performs an handshake with the client, the source IP is the IP of the server and thus the client thinks they're communicating with the server. The script works great the only problem is that I need to send and receive data from the client and it's hard to make the tcp communication to work with sending and receiving data.

So does anyone knows a script or module that allows you to use the socket API(ie. socket.send, socket.recv, socket.connect...) in order to communicate with a client with spoofed source ip?

1 Response

If you're really desperate, try looking into the SCAPY library. It lets you hand craft every part of a packet.
With socket, however, no can do.

What you might want to do is disconnect, spoof your MAC to that of the client you want to impersonate, then reconnect and steal its IP address. Or, try MITMing the target.

Best of luck

Share Your Thoughts

  • Hot
  • Active