1080 - Pentesting Socks

**htARTE(HackTricks AWS Red Team Expert)**でAWSハッキングをゼロからヒーローまで学ぶ htARTE(HackTricks AWS Red Team Expert)

HackTricksをサポートする他の方法:

基本情報

SOCKSは、クライアントとサーバー間でデータをプロキシを介して転送するために使用されるプロトコルです。第5バージョンであるSOCKS5は、オプションの認証機能を追加し、認証されたユーザーのみがサーバーにアクセスできるようにします。主にTCP接続のプロキシ処理とUDPパケットの転送を処理し、OSIモデルのセッション層(レイヤー5)で動作します。

デフォルトポート: 1080

列挙

認証チェック

nmap -p 1080 <ip> --script socks-auth-info

ブルートフォース

基本的な使用法

nmap --script socks-brute -p 1080 <ip>

高度な使用法

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

出力

PORT     STATE SERVICE
1080/tcp open  socks
| socks-brute:
|   Accounts
|     patrik:12345 - Valid credentials
|   Statistics
|_    Performed 1921 guesses in 6 seconds, average tps: 320

トンネリングとポートフォワーディング

基本的なproxychainsの使用

ソックスプロキシを使用するためにproxychainsを設定します。

nano /etc/proxychains4.conf
## Testing SOCKS Proxy

To test the SOCKS proxy, you can use tools like `proxychains` or `proxychains4`. These tools allow you to route your traffic through the SOCKS proxy server. Here is an example of how you can use `proxychains` to test the SOCKS proxy:

1. Edit the configuration file for `proxychains` located at `/etc/proxychains.conf`.
2. Add the following line at the end of the file:

socks5 127.0.0.1 1080

Replace `127.0.0.1` and `1080` with the IP address and port of your SOCKS proxy server.
3. Save the file and close it.
4. Run a command with `proxychains` to test the SOCKS proxy. For example:

proxychains curl http://example.com


By following these steps, you can test your SOCKS proxy configuration and ensure that it is working correctly.
socks5 10.10.10.10 1080

認証あり

socks5 10.10.10.10 1080 username password

ゼロからヒーローまでAWSハッキングを学ぶ htARTE(HackTricks AWS Red Team Expert)

HackTricksをサポートする他の方法:

Last updated