Skip to content

Instantly share code, notes, and snippets.

@gorshkov-leonid
Last active August 19, 2025 11:08
Show Gist options
  • Save gorshkov-leonid/afb3cd0926c57f5ce7330c5297572935 to your computer and use it in GitHub Desktop.
Save gorshkov-leonid/afb3cd0926c57f5ce7330c5297572935 to your computer and use it in GitHub Desktop.
Sniffing proxy

Open remote proxy and forward into internal network with dumping

  1. Use white ip on routher (let it be a.b.c.d)
  2. Make port fowarding from router to PC (let it be 1063)
  3. Install python 3
  4. Use script MITM Relay
  5. Install Burb Suite Common Edition See https://security.stackexchange.com/questions/229698/intercepting-tcp-traffic-through-mitm-attack
# Burb Suite Common Edition listens on 127.0.0.1:8080
# Replays from 0.0.0.0:1063 to 127.0.0.1:9090
python .\mitm_relay.py -l 0.0.0.0 -p 127.0.0.1:8080 -r tcp:1063:127.0.0.1:9090
# OR
# without proxy
# Replays from 0.0.0.0:1063 to 10.78.100.39:1063 and 10.77.0.182:1036
python .\mitm_relay.py -l 0.0.0.0 -r tcp:1063:10.78.100.39:1063 -r tcp:1063:10.77.0.182:1036

5.1 If you have the problem OSError: [WinError 10013] Сделана попытка доступа к сокету методом, запрещенным правами доступа, как решить ошибку? then call:

net stop hns
net start hns
  1. Call remotely ip address a.b.c.d with port 1063 on router
netsh interface portproxy add v4tov4 listenport=80 connectaddress=ip-of-server-on-internet connectport=23 listenaddress=ip-of-windows-machine protocol=tcp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment