# 1080 - Pentesting Socks {% 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 %} ## Basic Information **SOCKS**λŠ” ν΄λΌμ΄μ–ΈνŠΈμ™€ μ„œλ²„ 간에 ν”„λ‘μ‹œλ₯Ό 톡해 데이터λ₯Ό μ „μ†‘ν•˜λŠ” 데 μ‚¬μš©λ˜λŠ” ν”„λ‘œν† μ½œμž…λ‹ˆλ‹€. λ‹€μ„― 번째 버전인 **SOCKS5**λŠ” 선택적 인증 κΈ°λŠ₯을 μΆ”κ°€ν•˜μ—¬ κΆŒν•œμ΄ μžˆλŠ” μ‚¬μš©μžλ§Œ μ„œλ²„μ— μ ‘κ·Όν•  수 μžˆλ„λ‘ ν•©λ‹ˆλ‹€. 주둜 TCP μ—°κ²°μ˜ ν”„λ‘μ‹œ μ²˜λ¦¬μ™€ UDP νŒ¨ν‚·μ˜ ν¬μ›Œλ”©μ„ μ²˜λ¦¬ν•˜λ©°, OSI λͺ¨λΈμ˜ μ„Έμ…˜ 계측(계측 5)μ—μ„œ μž‘λ™ν•©λ‹ˆλ‹€. **κΈ°λ³Έ 포트:** 1080 ## Enumeration ### Authentication Check ```bash nmap -p 1080 --script socks-auth-info ``` ### Brute Force #### κΈ°λ³Έ μ‚¬μš©λ²• ```bash nmap --script socks-brute -p 1080 ``` #### κ³ κΈ‰ μ‚¬μš©λ²• ```bash nmap --script socks-brute --script-args userdb=users.txt,passdb=rockyou.txt,unpwdb.timelimit=30m -p 1080 ``` #### 좜λ ₯ ``` 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 μ‚¬μš©λ²• socks ν”„λ‘μ‹œλ₯Ό μ‚¬μš©ν•˜λ„λ‘ proxy chains μ„€μ • ``` nano /etc/proxychains4.conf ``` Edit the bottom and add your proxy ```markdown # SOCKS ν”„λ‘μ‹œ SOCKS ν”„λ‘μ‹œλŠ” ν΄λΌμ΄μ–ΈνŠΈμ™€ μ„œλ²„ κ°„μ˜ νŠΈλž˜ν”½μ„ μ€‘κ³„ν•˜λŠ” ν”„λ‘œν† μ½œμž…λ‹ˆλ‹€. 이 ν”„λ‘œν† μ½œμ€ λ‹€μ–‘ν•œ λ„€νŠΈμ›Œν¬ μ„œλΉ„μŠ€μ— λŒ€ν•œ μ•‘μ„ΈμŠ€λ₯Ό μ œκ³΅ν•˜λ©°, λ³΄μ•ˆ 및 읡λͺ…성을 λ†’μ΄λŠ” 데 μœ μš©ν•©λ‹ˆλ‹€. ## SOCKS μ„€μ • SOCKS ν”„λ‘μ‹œλ₯Ό μ„€μ •ν•˜λ €λ©΄ λ‹€μŒ 단계λ₯Ό λ”°λ₯΄μ‹­μ‹œμ˜€: 1. ν”„λ‘μ‹œ μ„œλ²„μ˜ IP μ£Όμ†Œμ™€ 포트λ₯Ό ν™•μΈν•©λ‹ˆλ‹€. 2. ν΄λΌμ΄μ–ΈνŠΈ μ†Œν”„νŠΈμ›¨μ–΄μ—μ„œ ν”„λ‘μ‹œ 섀정을 μ—½λ‹ˆλ‹€. 3. SOCKS ν”„λ‘μ‹œ μ˜΅μ…˜μ„ μ„ νƒν•˜κ³ , IP μ£Όμ†Œμ™€ 포트λ₯Ό μž…λ ₯ν•©λ‹ˆλ‹€. 4. 섀정을 μ €μž₯ν•˜κ³  ν΄λΌμ΄μ–ΈνŠΈλ₯Ό μž¬μ‹œμž‘ν•©λ‹ˆλ‹€. ## ν…ŒμŠ€νŠΈ ν”„λ‘μ‹œκ°€ μ œλŒ€λ‘œ μž‘λ™ν•˜λŠ”μ§€ ν™•μΈν•˜λ €λ©΄ λ‹€μŒ λͺ…λ Ήμ–΄λ₯Ό μ‚¬μš©ν•˜μ—¬ 연결을 ν…ŒμŠ€νŠΈν•©λ‹ˆλ‹€: ```bash curl --socks5 <ν”„λ‘μ‹œ_IP>:<포트> http://example.com ``` 이 λͺ…λ Ήμ–΄λŠ” SOCKS ν”„λ‘μ‹œλ₯Ό 톡해 example.com에 연결을 μ‹œλ„ν•©λ‹ˆλ‹€. μ„±κ³΅μ μœΌλ‘œ μ—°κ²°λ˜λ©΄ ν”„λ‘μ‹œκ°€ μ˜¬λ°”λ₯΄κ²Œ μ„€μ •λœ κ²ƒμž…λ‹ˆλ‹€. ``` ``` socks5 10.10.10.10 1080 ``` 인증이 μžˆλŠ” 경우 ``` socks5 10.10.10.10 1080 username password ``` #### More info: [Tunneling and Port Forwarding](../generic-methodologies-and-resources/tunneling-and-port-forwarding.md) {% 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)**.** * **ν•΄ν‚Ή νŠΈλ¦­μ„ κ³΅μœ ν•˜λ €λ©΄** [**HackTricks**](https://github.com/carlospolop/hacktricks) **와** [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) **κΉƒν—ˆλΈŒ 리포지토리에 PR을 μ œμΆœν•˜μ„Έμš”.**
{% endhint %}