0

I'm fairly new to sqlmap but I have tried a lot of attacks and have been successful except for this one attack that I have tried. SQLMAP won't detect this nor try to inject an error like this.

So how ik that the site is vulnerable well. I used http-headers and edited a value which was:

Client-IP: 1'"

Now I tried all attacks on the site it was amazingly protected and not vulnerable to any attacks but then I noticed changing the client-IP to 1'" gave an error:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"'' at line 1

However I tried almost all commands and I'm not really sure why sqlmap won't detect even a little bit of anything.

Can anyone help me out with like a command or something or explain why the site is not injectable.

0

SQLMap is a great tool if used in correct manner. we need to specify the correct injection point in the complete query of SQLMap like for example in case of get method used in html form

sqlmap.py -u "www.example.com/file.php?id=1" --dbs //here injection is already specified.

but if its a post method we need to change our query

sqlmap.py -u "www.example.com/file.php" --method="POST" --data"email=ex@ex.com&pass=pass" -p pass --dbs

here pass is the injectable parameter and it will run all its test on this parameter

sometimes header injection exists like for example when the php code takes the ip of the user and doesn't sanitise it

sqlmap -u "http://www.example.com/file.php?id=1" --headers=”X-Forwarded-For: *” --dbs

now the sqlmap will run its test on the headers also i.e X-forwarded-for

SQLMap doesnt perform injections on the headers directly unless its specified. I think this might answer your query

  • have tried this before, like i said i have completed almost every possible test on it... it is vulnerable just need some help here – Dan Ash Dec 22 '18 at 10:26
  • which header are you exactly referring to. You usually need to provide sqlmap with the specific request that you want to test for SQL injections.sqlmap can't reliably analyze the web application and recognize the injectable parameters by itself. – kshitiz saini Dec 27 '18 at 23:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.