Skip to content
Advertisement

Blind SQL Injection using acunetix

I’m using acunetix to test my website. The problem is with this script http://boedesign.com/blog/2007/02/18/ajax-star-rating/

acunetix doesn’t show any message, but when I test for blind SQL I can get values like

JavaScript

in the rating_id mysql column, I want to only allow numbers in there, so I made a little fix but since the first number is 8 its passing trough the if. how can I fix it? It’s something like this at includes/rating_process.php

JavaScript

and almost the same think at the “// IF JAVASCRIPT IS DISABLED”

Advertisement

Answer

If you know that the rating must be an integer, you can cast your variable as an integer :

JavaScript

You can do as well on your id variable.

It ensures you that you only have integer values.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement