# FTP Bounce attack - Scan
{% hint style="success" %}
Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Support HackTricks
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** π¬ [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** π¦ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
{% endhint %}
**Try Hard Security Group**
{% embed url="https://discord.gg/tryhardsecurity" %}
***
## FTP Bounce - Scanning
### Manual
1. μ·¨μ½ν FTPμ μ°κ²°ν©λλ€.
2. **`PORT`** λλ **`EPRT`**(λ μ€ νλλ§ μ¬μ©) λͺ
λ Ήμ΄λ₯Ό μ¬μ©νμ¬ μ€μΊνλ €λ _\_μ μ°κ²°μ μ€μ ν©λλ€:
`PORT 172,32,80,80,0,8080`\
`EPRT |2|172.32.80.80|8080|`
3. **`LIST`**λ₯Ό μ¬μ©νμ¬(μ΄ λͺ
λ Ήμ μ°κ²°λ _\_μ FTP ν΄λμ νμ¬ νμΌ λͺ©λ‘μ μ μ‘ν©λλ€) κ°λ₯ν μλ΅μ νμΈν©λλ€: `150 File status okay` (μ΄κ²μ ν¬νΈκ° μ΄λ € μμμ μλ―Έ) λλ `425 No connection established` (μ΄κ²μ ν¬νΈκ° λ«ν μμμ μλ―Έ)
4. `LIST` λμ **`RETR /file/in/ftp`**λ₯Ό μ¬μ©νμ¬ μ μ¬ν `Open/Close` μλ΅μ μ°Ύμ μ μμ΅λλ€.
**PORT**λ₯Ό μ¬μ©ν μμ(172.32.80.80μ ν¬νΈ 8080μ μ΄λ € μκ³ ν¬νΈ 7777μ λ«ν μμ):
![](<../../.gitbook/assets/image (241).png>)
**`EPRT`**λ₯Ό μ¬μ©ν λμΌν μμ(μΈμ¦ μλ΅):
![](<../../.gitbook/assets/image (539).png>)
`LIST` λμ `EPRT`λ₯Ό μ¬μ©νμ¬ μ΄λ¦° ν¬νΈ(λ€λ₯Έ νκ²½):
![](<../../.gitbook/assets/image (875).png>)
### **nmap**
```bash
nmap -b :@
nmap -Pn -v -p 21,80 -b ftp:ftp@10.2.1.5 127.0.0.1 #Scan ports 21,80 of the FTP
nmap -v -p 21,22,445,80,443 -b ftp:ftp@10.2.1.5 192.168.0.1/24 #Scan the internal network (of the FTP) ports 21,22,445,80,443
```
**Try Hard Security Group**
{% embed url="https://discord.gg/tryhardsecurity" %}
{% hint style="success" %}
AWS ν΄νΉ λ°°μ°κΈ° λ° μ°μ΅νκΈ°:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
GCP ν΄νΉ λ°°μ°κΈ° λ° μ°μ΅νκΈ°: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
HackTricks μ§μνκΈ°
* [**ꡬλ
κ³ν**](https://github.com/sponsors/carlospolop) νμΈνκΈ°!
* **π¬ [**Discord κ·Έλ£Ή**](https://discord.gg/hRep4RUj7f) λλ [**ν
λ κ·Έλ¨ κ·Έλ£Ή**](https://t.me/peass)μ μ°Έμ¬νκ±°λ **Twitter** π¦ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**λ₯Ό νλ‘μ°νμΈμ.**
* **[**HackTricks**](https://github.com/carlospolop/hacktricks) λ° [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) κΉνλΈ λ¦¬ν¬μ§ν 리μ PRμ μ μΆνμ¬ ν΄νΉ νμ 곡μ νμΈμ.**
{% endhint %}