> For the complete documentation index, see [llms.txt](https://www.pentestwiki.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pentestwiki.com/lateral-movement/tunneling/socks.md).

# SOCKS

SOCKS(Socket Secure) 프로토콜은 트래픽이 전달될 때 중간에서 중개자 역할을 합니다.

<figure><img src="https://1400861083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiA9eS35C4waXdT3c51bW%2Fuploads%2FDj24RWXrtNug4WE5ZxtO%2F4.png?alt=media&amp;token=8659540e-9c0e-4b9d-a169-d33ae760c2e8" alt=""><figcaption><p><a href="https://www.geeksforgeeks.org/what-are-the-benefits-of-socks5-proxy/">https://www.geeksforgeeks.org/what-are-the-benefits-of-socks5-proxy/</a></p></figcaption></figure>

SOCKS 프록시와 일반적인 HTTP 프록시의 차이점으로는 동작하는 계층이 다르기 때문에 FTP, POP3 등의 6계층 프로토콜까지도 터널링 할 수 있다는 것입니다.

## Abuse

<pre class="language-bash"><code class="lang-bash"><strong># proxychains 설정 변경
</strong>echo 'socks4 127.0.0.1 9050' >> /etc/proxychains4.conf

<strong># 로컬 다이나믹 포트 포워딩
</strong>ssh -D 9050 root@192.168.1.23

<strong># 리모트 다이나믹 포트 포워딩
</strong>ssh -R 9050 root@192.168.1.23

<strong># 내부망 포트 스캔
</strong>proxychains4 nmap -Pn -sT -n 10.0.2.10
</code></pre>

## References

{% embed url="<https://www.geeksforgeeks.org/what-are-the-benefits-of-socks5-proxy/>" %}

{% embed url="<https://soax.com/glossary/socks-proxy>" %}
