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

84 lines
3.6 KiB
Markdown
Raw Normal View History

2024-04-06 19:38:49 +00:00
# 1080 - Pentesting Socks
{% 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)
<details>
<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.
</details>
{% endhint %}
## Informações Básicas
2022-04-28 16:01:33 +00:00
**SOCKS** é um protocolo usado para transferir dados entre um cliente e um servidor através de um proxy. A quinta versão, **SOCKS5**, adiciona um recurso de autenticação opcional, permitindo que apenas usuários autorizados acessem o servidor. Ele lida principalmente com o proxy de conexões TCP e o encaminhamento de pacotes UDP, operando na camada de sessão (Camada 5) do modelo OSI.
2022-04-28 16:01:33 +00:00
**Porta Padrão:** 1080
2023-06-06 18:56:34 +00:00
## Enumeração
### Verificação de Autenticação
```bash
nmap -p 1080 <ip> --script socks-auth-info
```
### Brute Force
2024-04-06 19:38:49 +00:00
#### Uso básico
```bash
nmap --script socks-brute -p 1080 <ip>
```
2023-06-06 18:56:34 +00:00
#### Uso avançado
```bash
nmap --script socks-brute --script-args userdb=users.txt,passdb=rockyou.txt,unpwdb.timelimit=30m -p 1080 <ip>
```
2023-06-06 18:56:34 +00:00
#### Saída
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
```
## Tunneling e Encaminhamento de Portas
2023-06-06 18:56:34 +00:00
### Uso básico do proxychains
Configurar proxy chains para usar proxy socks
2022-05-01 13:25:53 +00:00
```
nano /etc/proxychains4.conf
```
```markdown
Edite a parte inferior e adicione seu proxy
```
2022-05-01 13:25:53 +00:00
```
socks5 10.10.10.10 1080
```
2023-06-06 18:56:34 +00:00
Com autenticação
2022-05-01 13:25:53 +00:00
```
socks5 10.10.10.10 1080 username password
```
#### Mais informações: [Tunneling and Port Forwarding](../generic-methodologies-and-resources/tunneling-and-port-forwarding.md)
2024-04-06 19:38:49 +00:00
{% hint style="success" %}
Aprenda e pratique 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">\
Aprenda e pratique 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>
<summary>Support HackTricks</summary>
2022-04-28 16:01:33 +00:00
* Confira os [**planos de assinatura**](https://github.com/sponsors/carlospolop)!
* **Junte-se ao** 💬 [**grupo do Discord**](https://discord.gg/hRep4RUj7f) ou ao [**grupo do telegram**](https://t.me/peass) ou **siga**-nos no **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Compartilhe truques de hacking enviando PRs para o** [**HackTricks**](https://github.com/carlospolop/hacktricks) e [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repositórios do github.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}