New answers tagged

3

You need to figure out if the parameter is being parsed as an integer or a string (most probably as string). If the query is balanced and successful, It won't die(). try .. 1' order by 1-- - or .. 1 order by 1-- - If the first one returns an error, that means the parameter is being parsed as an integer so you don't need a quote (') to perform the ...


2

However I am unsure how to proceed as I have also heard that you do not want to expose your database structure to others. You don't want to expose them because if SQL injection exists they know which tables to target. However, if SQL inject exists to make this happen it is a moot protection since your security is already broken. Especially since most ...


3

Relying on keeping your schema secret to protect your system is not a good starting point. It's not Kerchoff's principle, but if the security of your system relies on the obscurity of the schema, then even if you keep it closed source and don't offer it to anyone else, you have problems. the script with the connection username/password should not be ...


6

This is a good question with a simple answer: Best practices cannot be applied in every situation. The best practices of "don't tell the world what security algorithms you use" and also "don't expose your DB structure" exist as a possible fallback- just in case your code has a security flaw in it, it's much harder for someone to exploit it if they ...


2

There's no benefit to going to lengths obfuscating username as long the database does not return a descriptive login error, for instance "username or password incorrect". There will already be many possible usernames, and no way for an attacker to know whether they are using a valid one. Having a descriptive username is often operationally helpful in a ...



Top 50 recent answers are included