hacktricks/network-services-pentesting/1080-pentesting-socks.md

82 lines
3.6 KiB
Markdown
Raw Normal View History

2022-05-01 13:25:53 +00:00
# 1080 - Pentesting Socks
2022-04-28 16:01:33 +00:00
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
<details>
2022-04-28 16:01:33 +00:00
<summary>Support HackTricks</summary>
2022-04-28 16:01:33 +00:00
* 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.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}
2022-04-28 16:01:33 +00:00
2024-02-10 13:03:23 +00:00
## Informazioni di base
2022-04-28 16:01:33 +00:00
**SOCKS** è un protocollo utilizzato per trasferire dati tra un client e un server tramite un proxy. La quinta versione, **SOCKS5**, aggiunge una funzionalità di autenticazione opzionale, consentendo solo agli utenti autorizzati di accedere al server. Gestisce principalmente il proxying delle connessioni TCP e l'inoltro dei pacchetti UDP, operando al livello di sessione (Livello 5) del modello OSI.
2024-02-10 13:03:23 +00:00
**Porta predefinita:** 1080
2024-02-10 13:03:23 +00:00
## Enumerazione
### Controllo dell'autenticazione
```bash
nmap -p 1080 <ip> --script socks-auth-info
```
2022-05-01 13:25:53 +00:00
### Brute Force
2024-02-10 13:03:23 +00:00
#### Utilizzo di base
```bash
nmap --script socks-brute -p 1080 <ip>
```
2024-02-10 13:03:23 +00:00
#### Utilizzo avanzato
```bash
nmap --script socks-brute --script-args userdb=users.txt,passdb=rockyou.txt,unpwdb.timelimit=30m -p 1080 <ip>
```
#### Output
2022-05-01 13:25:53 +00:00
```
PORT STATE SERVICE
1080/tcp open socks
| socks-brute:
| Accounts
| patrik:12345 - Valid credentials
| Statistics
|_ Performed 1921 guesses in 6 seconds, average tps: 320
```
2024-02-10 13:03:23 +00:00
## Tunneling e Port Forwarding
### Utilizzo base di proxychains
Imposta le catene di proxy per utilizzare un proxy socks
2022-05-01 13:25:53 +00:00
```
nano /etc/proxychains4.conf
```
Edita il fondo e aggiungi il tuo proxy
2024-02-10 13:03:23 +00:00
```
socks5 10.10.10.10 1080
```
Con autenticazione
```
socks5 10.10.10.10 1080 username password
```
#### Maggiori informazioni: [Tunneling and Port Forwarding](../generic-methodologies-and-resources/tunneling-and-port-forwarding.md)
2022-04-28 16:01:33 +00:00
{% hint style="success" %}
Impara e pratica AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Impara e pratica GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
<details>
2022-04-28 16:01:33 +00:00
<summary>Supporta HackTricks</summary>
2022-04-28 16:01:33 +00:00
* Controlla i [**piani di abbonamento**](https://github.com/sponsors/carlospolop)!
* **Unisciti al** 💬 [**gruppo Discord**](https://discord.gg/hRep4RUj7f) o al [**gruppo telegram**](https://t.me/peass) o **seguici** su **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Condividi trucchi di hacking inviando PR ai** [**HackTricks**](https://github.com/carlospolop/hacktricks) e [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos su github.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}