Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Making it simple (no security at all), when we want to detect whether or not a GET parameter is vulnerable to SQLi, we could just type a ' as the value (?id=') and check if there is any error. (No blind SQL)

But in the case that the parameter is sent using a POST method, how can I detect if it is vulnerable? And then how to exploit it? I think that using a proxy and intercept the query will be the solution, but is there any other way?

share|improve this question
add comment

2 Answers

One of the easiest ways to do both (detect & exploit) is to download sqlmap and use the -r option.

Capture the POST request using any proxy tool, paste it into a file, then do:

# sqlmap -r <text_file_with_raw_POST_request>

(add --force-ssl switch if needed)

From: https://github.com/sqlmapproject/sqlmap/wiki/Usage

enter image description here

share|improve this answer
add comment

You can either use a proxy or a tool like Firebug to modify POST parameters before sending them. Personally I prefer to use a proxy like ZAP or Burp as they have some nice tools which allow you to automate the attack and load lists of payloads to test.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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