# SOCKS

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

<figure><img src="/files/osSpSGB4nQCy2T0qR46K" 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>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.pentestwiki.com/lateral-movement/tunneling/socks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
