Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
pipe-intercept — 使用 Burp 或类似的 HTTP 代理工具拦截 Windows 命名管道通信 | Kitploit
工具/GitHubGitHub/gabriel-sztejnworcel/pipe-intercept
Web代理与拦截渗透测试红队
GitHubgabriel-sztejnworcel/pipe-intercept

pipe-intercept

使用 Burp 或类似的 HTTP 代理工具拦截 Windows 命名管道通信

查看仓库
30421511个月前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

pipe-intercept

使用 Burp 或类似的 HTTP 代理工具拦截 Windows 命名管道通信

命名管道(Named Pipes)在 Windows 上广泛用于进程间通信。它们被许多应用程序使用,包括 Windows 远程过程调用(RPC)。此工具旨在让安全研究人员和渗透测试人员能够对使用命名管道的应用程序进行安全评估。

本项目灵感来源于 CyberArk Labs 出色的 MITM_Intercept 项目。

它是如何工作的?

该工具创建了一个管道客户端/服务器代理,并附带 WebSocket 客户端/服务器桥接。WebSocket 客户端通过 HTTP 代理(如 Burp)连接到 WebSocket 服务器。

重要提示: 此工具使用 win32 api 创建命名管道,因此仅适用于 Windows。目前,它需要在目标管道服务器和 HTTP 代理所在的同一台机器上运行。我可能会添加使用远程代理的选项,以及转发到远程管道服务器的选项,但该工具仍必须在 Windows 上运行。

流程图:

Flow Diagram

理解这一点很重要:该工具通过创建独立的管道服务器实例来工作,这些实例与目标服务器应用程序创建的实例相互独立,从而使目标客户端应用程序连接到这些代理实例。这意味着以下几点:

  1. 如果该工具在目标服务器应用程序启动并创建其管道服务器实例之后运行,则运行该工具的用户必须具有足够的权限来创建管道服务器实例
  2. 通常,服务器应用程序总会有一个管道服务器实例在等待客户端连接。客户端按 FIFO 顺序连接,因此在运行该工具后,第一个客户端可能会连接到目标应用程序创建的实例,而后续客户端将开始通过代理连接。某些应用程序的行为可能有所不同,它们可能不会始终存在监听实例,甚至可能有多个监听实例——目前你需要尝试并了解目标应用程序的工作方式
  3. 某些应用程序会检查另一端的管道客户端/服务器(通过进程 ID、用户名等),并将其用作身份验证方法。在这些情况下,该工具可能无法正常工作
  4. 如果该工具创建了第一个管道服务器实例,那么目标服务器应用程序可能无法启动(如果它使用 FILE_FLAG_FIRST_PIPE_INSTANCE)

从上述几点可以看出,使用此工具可能会改变目标应用程序的行为。请记住,此工具主要用于安全测试,请勿在生产系统中使用。

依赖项

该工具已在 Python 3.13.7 版本下测试。设置:

root@kitploit:~
python -m venv .venv
.venv\Scripts\activate.bat
pip install -r requirements.txt

用法

root@kitploit:~
usage: pipe_intercept.py [-h] --pipe-name PIPE_NAME [--ws-port WS_PORT] [--http-proxy-port HTTP_PROXY_PORT] [--log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG}]

options:
  -h, --help            show this help message and exit
  --pipe-name PIPE_NAME
                        The name of the pipe to be intercepted
  --ws-port WS_PORT     An available port number for the internal WebSocket server (if not specified, a random port will be used)
  --http-proxy-port HTTP_PROXY_PORT
                        The port number of the HTTP proxy (if not specified, the default is 8080)
  --log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG}
                        Log level (if not specified, the default is INFO)

运行测试

在根目录(pipe-intercept)中运行:

root@kitploit:~
pytest

示例

Windows 上的 Docker 使用命名管道在客户端和 docker 服务之间进行通信。管道名称为 "\\.\pipe\docker_engine"。让我们看看如何拦截这种通信。首先,我们运行该工具:

root@kitploit:~
C:\pipe-intercept>python pipe_intercept.py --pipe-name docker_engine

INFO:websockets.server:server listening on 127.0.0.1:12037

现在我们可以启动 Burp,并从另一个 shell 创建一个 Windows 容器:

root@kitploit:~
C:\pipe-intercept>docker run -it --name win mcr.microsoft.com/windows:1809-amd64 cmd

Microsoft Windows [Version 10.0.17763.2803]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\>dir
 Volume in drive C has no label.
 Volume Serial Number is 5C09-8FFA

 Directory of C:\

05/07/2020  06:16 AM             5,510 License.txt
04/04/2022  02:57 PM    <DIR>          PerfLogs
04/04/2022  04:13 PM    <DIR>          Program Files
04/04/2022  02:57 PM    <DIR>          Program Files (x86)
04/04/2022  04:17 PM    <DIR>          Users
04/04/2022  04:13 PM    <DIR>          Windows
               1 File(s)          5,510 bytes
               5 Dir(s)  21,188,812,800 bytes free

C:\>

现在,如果我们在 Burp 中打开 WebSocket 选项卡,就可以看到通信内容:

Burp WebSocket History

我们还可以打开拦截功能并修改消息:

Burp Intercept

root@kitploit:~
Microsoft Windows [Version 10.0.17763.2803]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\>dir
 Volume in drive C has no label.
 Volume Serial Number is 5C09-8FFA

 Directory of C:\

05/07/2020  06:16 AM             5,510 License.txt
04/04/2022  02:57 PM    <DIR>          PerfLogs
04/04/2022  04:13 PM    <DIR>          Modified Name
04/04/2022  02:57 PM    <DIR>          Program Files (x86)
04/04/2022  04:17 PM    <DIR>          Users
04/04/2022  04:13 PM    <DIR>          Windows
               1 File(s)          5,510 bytes
               5 Dir(s)  21,188,288,512 bytes free

C:\>
下载工具