Ligolo-ng MCP Server

Ligolo-ng MCP Server

This MCP server enables AI assistants to control Ligolo-ng operations on a remote Kali Linux machine via SSH, providing tools for managing proxy, agents, tunnels, routes, and listeners for network pivoting during security assessments.

Category
访问服务器

README

Ligolo-ng MCP Server

A Model Context Protocol (MCP) server for managing Ligolo-ng - a lightweight and fast tunneling tool for establishing reverse TCP/TLS tunnels during penetration testing and red team engagements.

Overview

This MCP server enables AI assistants to control Ligolo-ng operations on a remote Kali Linux machine via SSH. It provides tools for managing the proxy server, agents, tunnels, routes, and listeners - all the core functionality needed for network pivoting during security assessments.

Features

  • Proxy Management: Start, stop, and monitor the Ligolo-ng proxy server
  • Agent Control: List connected agents and manage sessions
  • Network Interface: Create and manage TUN interfaces for tunneling
  • Tunnel Operations: Start/stop tunnels through agent sessions
  • Route Management: Add and remove routes to target networks
  • Listener Configuration: Set up port forwarding through agents
  • Agent Command Generation: Generate agent connection commands for targets

Prerequisites

  • Node.js 18+
  • SSH access to a Kali Linux machine with Ligolo-ng installed
  • SSH key-based authentication configured (passwordless SSH)

Installation

# Clone the repository
git clone https://github.com/schwarztim/sec-ligolo-ng-mcp.git
cd sec-ligolo-ng-mcp

# Install dependencies
npm install

# Build the project
npm run build

Configuration

Environment Variables

Variable Default Description
KALI_HOST kali SSH hostname or alias for your Kali machine
LIGOLO_PROXY_PORT 11601 Port for agent connections
LIGOLO_API_PORT 8080 Port for the Ligolo-ng web API
LIGOLO_INTERFACE ligolo Default TUN interface name

SSH Configuration

Ensure your SSH config (~/.ssh/config) has an entry for your Kali machine:

Host kali
    HostName 192.168.1.100
    User root
    IdentityFile ~/.ssh/id_rsa

Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "ligolo-ng": {
      "command": "node",
      "args": ["/path/to/sec-ligolo-ng-mcp/dist/index.js"],
      "env": {
        "KALI_HOST": "kali",
        "LIGOLO_PROXY_PORT": "11601"
      }
    }
  }
}

Available Tools

Proxy Management

Tool Description
ligolo_proxy_start Start the Ligolo-ng proxy server with optional self-signed certs and API
ligolo_proxy_stop Stop the running proxy server
ligolo_proxy_status Check proxy status and view recent logs

Session Management

Tool Description
ligolo_agents_list List all connected agents
ligolo_session_select Select an agent session to work with
ligolo_agent_info Get network information from the selected agent

Network Configuration

Tool Description
ligolo_interface_create Create a TUN interface for tunneling
ligolo_interface_list List all TUN interfaces
ligolo_tunnel_start Start a tunnel through the selected session
ligolo_tunnel_stop Stop the active tunnel

Routing

Tool Description
ligolo_route_add Add a route to access target networks
ligolo_route_delete Remove a route
ligolo_route_list List all Ligolo routes

Port Forwarding

Tool Description
ligolo_listener_add Add a listener for reverse connections
ligolo_listener_list List active listeners
ligolo_listener_delete Remove a listener

Utilities

Tool Description
ligolo_agent_command Generate agent command for target deployment
ligolo_certificate_fingerprint Get certificate fingerprint for secure connections
ligolo_send_command Send raw commands to the proxy console

Usage Example

Basic Pivoting Workflow

  1. Start the proxy on Kali:

    Use ligolo_proxy_start with selfcert enabled
    
  2. Generate agent command:

    Use ligolo_agent_command with your Kali IP
    
  3. Create TUN interface:

    Use ligolo_interface_create
    
  4. After agent connects, add routes:

    Use ligolo_route_add with network 10.10.10.0/24
    
  5. Start the tunnel:

    Use ligolo_tunnel_start
    

Now you can access the 10.10.10.0/24 network through your Kali machine.

Setting Up Reverse Shell Callback

Use listeners to receive reverse shells through the pivot:

Use ligolo_listener_add with:
  localAddress: 0.0.0.0:4444
  remoteAddress: 127.0.0.1:4444

This forwards connections from port 4444 on the agent back to your Kali's port 4444.

Security Considerations

  • This tool is designed for authorized security testing only
  • Always use certificate verification in production environments
  • The proxy runs with elevated privileges to manage network interfaces
  • SSH keys should be properly secured and not shared

Development

# Watch mode for development
npm run dev

# Build
npm run build

# Start the server
npm start

License

MIT License - See LICENSE for details.

Acknowledgments

Disclaimer

This tool is intended for authorized security testing and educational purposes only. Users are responsible for ensuring they have proper authorization before using this tool against any systems. The authors are not responsible for any misuse or damage caused by this tool.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选