# NacosExploitGUI **Repository Path**: pangPython/NacosExploitGUI ## Basic Information - **Project Name**: NacosExploitGUI - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-02-25 - **Last Updated**: 2025-02-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 0x01 前言 在攻防演练中,Nacos一直是红队攻击的重点目标之一,红队通常需要快速打点,尽快发现系统中的漏洞,并利用它们获取权限。在NacosExploitGUI_v7.0版本中,更新了UI及其各种友好的提示、新增空间测绘功能让打点资产更迅速、修复derby sql注入漏洞在在特殊场景下的编码问题、新增derby sql注入不出网RCE的检测及其利用、 修复配置文件提取接口上限的问题、Jraft Hessian 反序列化漏洞新增自定义group攻击链路、新增自定义注入内存马密码及其路径、新增注入蚁剑内存马、新增命令执行可反弹shell功能等等。 ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1715562376670-a665692a-3517-45b9-9247-7757516fe479.png#averageHue=%2331363b&clientId=uec354d1b-5c12-4&from=paste&height=719&id=u5b13e76c&originHeight=899&originWidth=1859&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=80356&status=done&style=none&taskId=ua9606130-cca8-4507-9803-4f7988d43f4&title=&width=1487.2) ### 0x02 工具简介 工具支持检测Nacos多种常见漏洞,并且支持多种利用方式,如添加用户、删除用户、重置密码、sql注入、内存马注入、命令执行、配置文件提取等等。工具提供直观友好的图像化界面,用户能够轻松进行操作和管理。支持空间测绘、批量扫描功能,用户可以同时对多个目标进行漏洞检测,极大地提高了扫描效率。还支持暂停扫描、终止扫描、自定义多线程扫描、自定义请求头、内置随机User-Agent头、http代理、socks代理、扫描结果导出为表格等等功能。 ### 0x03 工具检查能力 工具目前支持如下漏洞的检测,我们也会持续添加poc和各种漏洞利用方式。漏洞检测支持非常规路径的检查,比如Nacos的路径为 [http://xxx.xxx.xxx.xxx/home/nacos](http://xxx.xxx.xxx.xxx/home/nacos) , 只需在目标中填入Nacos的路径即可,指纹识别功能就会去扫描三个路径(" "、"/nacos" 、"/home/nacos"),识别了Nacos才会开启漏洞扫描 ``` Nacos Console 默认口令漏洞 Nacos Derby SQL 注入漏洞(CNVD-2020-67618) Nacos User-Agent 权限绕过漏洞(CVE-2021-29441) Nacos serverIdentity 权限绕过漏洞 Nacos token.secret.key 默认配置漏洞(QVD-2023-6271) Nacos-Client Yaml 反序列化漏洞 Nacos Jraft Hessian 反序列化漏洞(CNVD-2023-45001) ``` ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721291542280-6c41fdba-6c01-4fb3-8757-e6cbb2bb9ee6.png#averageHue=%23f8f7f7&clientId=u480c2d5a-2c4b-4&from=paste&height=557&id=u79f39b52&originHeight=696&originWidth=1289&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=76010&status=done&style=none&taskId=ubc72f37d-048d-4d41-9f42-6db2a36f1d8&title=&width=1031.2) ### 0x04 漏洞利用 新增了空间测绘功能,支持Fofa、Quake、Hunter查询,可一键将查询结果发送至批量扫描 ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721294472903-bea4b143-f7bf-408a-8d85-ee8b4cbbaf06.png#averageHue=%23f1f0ef&clientId=udbe10049-9b17-4&from=paste&height=618&id=u5a3b18fe&originHeight=773&originWidth=1294&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=119811&status=done&style=none&taskId=u7cfb10f3-e270-4cd7-8db0-e7fbb2a126d&title=&width=1035.2) 批量检测自动识别版本,多线程扫描速度极快 ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721294700713-158a0a90-f748-4515-9542-058a80da76a7.png#averageHue=%23efeeed&clientId=u0bfd99bb-644c-4&from=paste&height=614&id=u4cc6ed73&originHeight=768&originWidth=1290&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=125758&status=done&style=none&taskId=ube291431-0d50-4692-aac4-f10908fcc49&title=&width=1032) SQL注入功能,内置各种Derby注入查询语句,一键查询即可 ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721291707525-ccb38cd5-9e49-4a99-95e3-cb40b3691d26.png#averageHue=%23f2f1f0&clientId=u480c2d5a-2c4b-4&from=paste&height=282&id=uecd7923c&originHeight=353&originWidth=1288&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=34790&status=done&style=none&taskId=ua2d48429-4f3b-4152-8979-d0f60405bf3&title=&width=1030.4) 针对近期暴露出Derby SQL注入漏洞新的利用方式,该工具也已经集成,支持不出网命令执行、反弹shell及其注入冰蝎、蚁剑、哥斯拉内存马,具体使用如下 ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721291928313-d2f09b55-4c66-479c-9301-fc8d0e54644a.png#averageHue=%23f4f4f4&clientId=u480c2d5a-2c4b-4&from=paste&height=450&id=ub6f7455d&originHeight=562&originWidth=1281&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=42461&status=done&style=none&taskId=udbee08f8-f2a2-4494-8f39-73a6144c519&title=&width=1024.8) ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721292985826-008a2dfe-c3ed-4418-b731-2b38edb55cd1.png#averageHue=%23f3f1f1&clientId=u480c2d5a-2c4b-4&from=paste&height=498&id=u4dc285a2&originHeight=623&originWidth=1285&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=70555&status=done&style=none&taskId=u94e80b54-be89-42a1-a5ef-cb05921c0b3&title=&width=1028) ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721292251659-e60be652-a605-45c6-aa57-ad93b8e12e0e.png#averageHue=%23f1f1f1&clientId=u480c2d5a-2c4b-4&from=paste&height=647&id=u21d16de9&originHeight=809&originWidth=1721&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=116971&status=done&style=none&taskId=u9ec89111-65ff-458e-9e34-3dfb3f575a1&title=&width=1376.8) Hessian反序列化漏洞,我们都知道一共有三条可攻击的链路,7.0版本已将其他两条链路添加至工具,拓展了可攻击面,一条链路被打崩溃了可以更换其他两条链路继续尝试。新增了一键注入蚁剑的内存马、新增了自定义注入内存马的密码和路径,先打的点再也不用害怕被别人连接了,内存马可以多次注入不同路径,不会导致链路崩溃。 ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721293629244-b785550a-5c2c-4db0-bfef-4e741c75622c.png#averageHue=%23f2f1f0&clientId=u480c2d5a-2c4b-4&from=paste&height=368&id=ubf644784&originHeight=460&originWidth=1270&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=53098&status=done&style=none&taskId=u329f39c2-5bf5-45c7-b4a7-97af312a778&title=&width=1016) 当然,如果目标被别人先打了全部路径,不知道连接密码还能利用吗?当然能,只要链路未崩溃,可以使用命令执行(无回显)进行反弹shell,首先可以借助dnslog使用代码执行功能探测链路的可用性。 ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721295186304-dac14f71-083e-4630-b5c5-3c76e0d2a342.png#averageHue=%23f8f7f6&clientId=u0bfd99bb-644c-4&from=paste&height=576&id=u445555eb&originHeight=720&originWidth=1407&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=86473&status=done&style=none&taskId=ubbc1c8d1-8d31-4445-94a4-40c92705727&title=&width=1125.6) 当发现链路可用时,直接使用该链路进行反弹shell,同样不会导致链路崩溃,可多次执行 ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721295390081-c6dab150-4f75-4bd7-aa2d-264d80b16be3.png#averageHue=%23838382&clientId=u0bfd99bb-644c-4&from=paste&height=432&id=u62b22cd7&originHeight=540&originWidth=1409&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=59580&status=done&style=none&taskId=ub173ce20-138a-4bf8-b692-39de8fa3a5a&title=&width=1127.2) 权限绕过漏洞利用功能,支持添加用户、删除用户、重置密码、以及支持获取账号的accessToken ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721294111959-e7427730-982f-4d95-a3ee-9a3b1a38e639.png#averageHue=%23f4f3f2&clientId=u480c2d5a-2c4b-4&from=paste&height=260&id=u175c1120&originHeight=325&originWidth=1203&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=33188&status=done&style=none&taskId=u7826e6d1-0fce-4308-b3be-fb18735f8da&title=&width=962.4) Yaml反序列化功能,支持一键去检测Nacos-Client低版本存在的Yaml反序列化漏洞,需要配置accessToken,打法可参考:[https://mp.weixin.qq.com/s/SfAFMiraMKafcISo5IDEAg](https://mp.weixin.qq.com/s/SfAFMiraMKafcISo5IDEAg) 。 ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721294277301-06e6979b-7de8-462a-a178-90d859c0c73d.png#averageHue=%23f4f4f3&clientId=u480c2d5a-2c4b-4&from=paste&height=213&id=u2568fb23&originHeight=266&originWidth=1267&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=23247&status=done&style=none&taskId=u43d22f4a-6c4b-4b21-8dfe-c21b59e5edd&title=&width=1013.6) 配置提取功能,可以一键获取所有命名空间的配置信息,若目标Nacos不存在未授权漏洞,则需要手动配置accessToken,支持导出结果为表格,方便持久化存储以及搜索,7.0版本修复导出上限的问题![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721295499124-9b9646b1-f2e7-400d-8db2-b000292f6e94.png#averageHue=%23f7f6f6&clientId=u0bfd99bb-644c-4&from=paste&height=523&id=uc65ac178&originHeight=654&originWidth=1271&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=62417&status=done&style=none&taskId=u0cee0475-48c6-420a-89ce-b2174dfc969&title=&width=1016.8) ![image.png](https://cdn.nlark.com/yuque/0/2024/png/32506071/1721295624939-6bbd84c4-250b-439e-9135-87b3091ba11f.png#averageHue=%23f6f4f4&clientId=u0bfd99bb-644c-4&from=paste&height=480&id=ub789f9d3&originHeight=600&originWidth=1586&originalType=binary&ratio=1.25&rotation=0&showTitle=false&size=162954&status=done&style=none&taskId=u55042fa7-4629-4ca1-b93d-6147f07b8c0&title=&width=1268.8) 工具获取: https://mp.weixin.qq.com/s/C_MsDZj0GPPC3BGYbk3JTg