Hijacking programs' using socket(s) / a proxy in python

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP

Hijacking programs' using socket(s) / a proxy in python



Currently I'm attempting to read/send UDP(/TCP) packets a running process is receiving and sending. So far I figured out several methods:


Normal:
Program <-> socket <-> Destination

Proxy:
Program <-> socket <-> proxy <-> Destination

Socket hijack:
Program <-> socket <-> Destination
^ | ^
| v |
+---"Shared" Socket ---+
Python



A Proxy would be possible but the ports change on startup and detecting that would be a pain.



So I reasoned that it would be possible to get some kind of copy/reference of the socket of the running process so that I could use that socket to read/send packets in python.



Edit: To clarify my question:
How would you get a python socket that is a "copy" of a process' socket.





And the question is...?
– Adam Brinded
1 hour ago









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

Executable numpy error

Trying to Print Gridster Items to PDF without overlapping contents

Hystrix command on request collapser fallback