Injection and X-site Scripting Attacks

Geoffrey Dunn

Mister Pink

What is an Injection attack?

We will get to how later. But basically the attacker is running commands on your webserver through security holes in your php script!

What is Cross Site Scripting?

This gives that 3rd party access to cookies or the ability to run website commands as if it was the victim user

The Injection Attack

<?php
$result = mysql_query("SELECT * FROM users WHERE name='$name' AND pass=MD5('$pass')");
?>

How would someone attack this?

Never trust data the client gives you

How can we protect it?

Simple data checks can help greatly

Are injection attacks only SQL?

The Cross Site Script

How might someone attack this?

Never trust data the client gives you

How can we protect it?

The basics

Hopefully in the future this will all be easier with tools like Pear::Validate

Stay safe

Thank you