MyBB是一款开源的论坛软件,使用PHP编写,目前在Github有800+的Star。MyBB中存在RCE漏洞,目前Poc已公开。
MyBB < 1.8.30
新建docker-compose.yml
version: '3'
services:
mybb:
image: mybb/mybb:1.8.29
volumes:
${PWD}/mybb:/var/www/html:rw
nginx:
image: nginx:mainline-alpine
ports:
8089:80
volumes:
${PWD}/nginx:/etc/nginx/conf.d:ro
${PWD}/mybb:/var/www/html:ro
postgresql:
environment:
POSTGRES_DB: mybb
POSTGRES_PASSWORD: changeme
POSTGRES_USER: mybb
image: postgres:14-alpine
volumes:
/var/lib/postgresql/data:rw :
新建nginx目录,并新建nginx/default.conf文件
upstream mybb {
server mybb:9000 weight=5;
}
server {
listen 80;
root /var/www/html;
index index.html index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ inc/ {
internal;
}
location ~ ^/(images|cache|jscripts|uploads)/ {
access_log off;
}
location ~ .php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass mybb;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
启动
docker-compose up -d
访问
http://127.0.0.1:8089/
一路next,到输入数据库配置,选择postgre,填入docker-compose文件中配置的数据库密码等信息
一路next,然后配置登录用户名密码
再次访问
http://127.0.0.1:8089/
安装成功
安装依赖
pip3 install -r requirements.txt
使用Poc执行id命令测试
python3 test.py --host http://xxxxx:8089 --username admin --password 1q2w3e4r --cmd id
Poc
https://github.com/cckuailong/CVE-2022-24734
https://github.com/Altelus1/CVE-2022-24734/
https://nvd.nist.gov/vuln/detail/CVE-2022-24734
https://github.com/mybb/docker/blob/master/README.md
本公众号内的文章及工具仅提供学习用途,由于传播、利用此文所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,本公众号及文章作者不为此承担任何责任。
原文始发于微信公众号(我不是Hacker):MyBB RCE(CVE-2022-24734)
- 左青龙
- 微信扫一扫
- 右白虎
- 微信扫一扫
评论