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
import binascii | |
import sys | |
file_name = sys.argv[1] | |
with open (file_name) as f: | |
hexdata = binascii.hexlify(f.read()) | |
hexlist = map(''.join, zip(hexdata[::2], hexdata[1::2])) | |
shellcode = '' | |
for i in hexlist: | |
shellcode += "0x{},".format(i) |
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
Command to run: | |
ssh -L 2222:localhost:8501 [email protected] | |
where 2222 is the local port mapping it can be any number above 1000 | |
where localhost must be set to localhost and refers to your current connection | |
where 8501 is the port you will be opening up on the remote machine | |
where [email protected] is the first hop in your quest for internal access |
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/python | |
import sys | |
import tarfile | |
import hashlib | |
for filename in sys.argv[1:]: | |
print filename | |
with tarfile.open(filename, 'r') as tar: | |
for tarinfo in tar: |
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
function Escape-JSONString($str){ | |
if ($str -eq $null) {return ""} | |
$str = $str.ToString().Replace('"','\"').Replace('\','\\').Replace("`n",'\n').Replace("`r",'\r').Replace("`t",'\t') | |
return $str; | |
} | |
function ConvertTo-JSON($maxDepth = 4,$forceArray = $false) { | |
begin { | |
$data = @() | |
} |
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
# YOUR LOCAL BOX | |
socat -t0 -T0 tcp4-listen:6667,reuseaddr,fork UDP:localhost:4445 | |
ssh user@remote_server -R 6667:localhost:6667 | |
# REMOTE MACHINE | |
socat -t0 -T0 udp4-recvfrom:4445,reuseaddr,fork tcp:localhost:6667 |