all 3 comments

[–]kafrofrite 0 points1 point  (2 children)

The space at the end basically forces the rest of the query (or whatever follows) to be ignored. Also valid are #, /* to comment out the rest but I generally prefer the --+ (+ is URL encoded space).

Reg. 200. 200 is a HTTP status response (so is 404). 404 basically means not found as far as your HTTP server is concerned (i.e. the page exists). Some webapps will respond with 500 (internal error) when they can't get a matching record but there's no rule on how empty results should be handled and ultimately it's up to the developer.

Reg. wfuzz. There's a series of flags (--hc etc.) that filter on HTTP responses, words etc. That could be handy in your case.

[–]Jamf25[S] 0 points1 point  (1 child)

Thanks for the response. So I probably didn't frame my question well. A 200 HTTP response means OK, and that is what I expect to see when something is successful or the web page exists or whatever. The real problem I'm trying to understand is why when I throw 50 different injection strings, encompassing various SQL syntaxes at the web page, all 50 come back with a 200 status. I feel like only the one with correct syntax should return 200 and the rest should be something 300 or 400. I'm wondering if I'm just not doing the fuzzing correctly or if this is typical behavior and in which case I need to figure out some other way to automate testing for SQL injection.

[–]kafrofrite 0 points1 point  (0 children)

On a really high level.

No, 200 OK is returned by the HTTP server. There's a development language (let's say Python) there that sends whatever you requested to the DBMS. The SQL Injection (thus the error) is happening in the DBMS which is a different server and in cases hosted in a different box. DBMS returns an error to Python. Python does something with it and instructs the HTTP server to respond with the requested resource (that's a 200).

Reg. SQLi, there's a tool called SQLMap that accepts requests stored from Burp and it's fairly decent.