CNIT 129S: Securing Web Applications: CH 9: Attacking Data Stores Part 2 of 2
CNIT 129S: Securing Web Applications: CH 9: Attacking Data Stores Part 2 of 2
Web Applications
' or 1=1 --
• To create
' or 'a'='a
• To create
foo'
• The correct way to insert that value is by adding a
second quote (link Ch 2a)
' shutdown--
• Drop table
admin' --
• Included by default
• Resulting query
Parameterized Queries
Vulnerable Code
• User input inserted into a command, which is
parsed later to match quotes
Parameterized Version
• User input replaces placeholder "?"
Marcus'//
• XML Data
Store
Injection
• This query retrieves a stored credit card number
from a username and password
• This injection:
Finding XPATH Injection
Flaws
• These strings usually break the syntax
• Also in OpenLDAP
LDAP Queries
• Match a username