HackTricks
Search…
Pentesting
1080 - Pentesting Socks

Basic Information

SOCKS is an Internet protocol that exchanges network packets between a client and server through a proxy server. SOCKS5 optionally provides authentication, so only authorized users may access a server.
Practically, a SOCKS server proxies TCP connections to an arbitrary IP address, and provides a means for UDP packets to be forwarded. SOCKS performs at Layer 5 of the OSI model
Default Port: 1080

Enumeration

Authentication Check

1
nmap -p 1080 <ip> --script socks-auth-info
Copied!

Brute Force

Basic usage

1
nmap --script socks-brute -p 1080 <ip>
Copied!

Advanced usage

1
nmap --script socks-brute --script-args userdb=users.txt,passdb=rockyou.txt,unpwdb.timelimit=30m -p 1080 <ip>
Copied!

Output

1
PORT STATE SERVICE
2
1080/tcp open socks
3
| socks-brute:
4
| Accounts
5
| patrik:12345 - Valid credentials
6
| Statistics
7
|_ Performed 1921 guesses in 6 seconds, average tps: 320
Copied!

Tunneling and Port Forwarding

Basic proxychains usage

Setup proxy chains to use socks proxy
1
nano /etc/proxychains4.conf
Copied!
Edit the bottom and add your proxy
1
socks5 10.10.10.10 1080
Copied!
With auth
1
socks5 10.10.10.10 1080 username password
Copied!
Last modified 6mo ago