Files
vulhub/ntopng/CVE-2021-28073/README.zh-cn.md
Aaron 63285f61aa
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
first commit
2025-09-06 16:08:15 +08:00

46 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ntopng权限绕过漏洞CVE-2021-28073
ntopng是监控服务器网络流量的工具对外提供Web页面。其4.2及以前的版本中存在一处权限绕过漏洞,利用该漏洞可以未授权访问目标任意接口。
参考链接:
- http://noahblog.360.cn/ntopng-multiple-vulnerabilities/
## 漏洞环境
执行如下命令启动ntopng
```
docker compose up -d
```
环境启动后,访问`http://your-ip:3000`将被跳转到登录页面默认密码admin/admin首次登录将会重设密码。
## 漏洞复现
根据参考链接中的方法,编写一个简单的[poc.py](poc.py)。首先计算出ntopng lua目录的长度
```
python poc.py --url http://your-ip:3000/ baselength
```
![](1.png)
可见Vulhub靶场中的长度为36。
然后,找到我们想要越权访问的页面或接口,比如`/lua/find_prefs.lua`正常访问时会302跳转到登录页面无权限。
使用POC生成越权访问URL
```
python poc.py --url http://your-ip:3000/ generate -l 36 -p find_prefs.lua
```
![](2.png)
访问这个URL发现可以越权返回正常信息
![](3.png)
后续更深入的利用方法可以自行修改poc.py利用。