Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
XSS&CSRF
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ar7z1
November 17, 2015
130
0
Share
XSS&CSRF
Внутренний курс по безопасности для разработчиков
ar7z1
November 17, 2015
More Decks by ar7z1
See All by ar7z1
Шпора.Безопасность
ar7z1
1
73
XSS & CSRF 2.0
ar7z1
0
110
HappyDev 2015
ar7z1
0
97
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
490
The Spectacular Lies of Maps
axbom
PRO
1
690
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
180
Six Lessons from altMBA
skipperchong
29
4.2k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
670
WENDY [Excerpt]
tessaabrams
9
37k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
220
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
140
Transcript
XSS CSRF
[email protected]
TOOLS
http://bit.ly/ 1tMrggU
http://bit.ly/ 1jKA1UJ
XSS
Reflected
http://example.com/? q=<script>alert('1') </script>
Stored
<img src=lalala onerror="alert('1')" />
DOM-based
http://example.com/ #'><img src=qqq onerror=“alert(‘1’)”>
https://xss- game.appspot .com/
None
None
jsfuck.com
HtmlEncode
innerHTML document.write eval @Html.Raw
X-XSS-Protection
Content-Security- Policy X-Content-Security- Policy X-WebKit-CSP
Content-Security- Policy: default-src 'self'
<system.web> <httpRuntime requestValidationMode="4.0" /> </system.web> <system.web> <pages validateRequest="true" /> </system.web>
CSRF
site.com
site.com GET /emails gmail.com
site.com GET /emails gmail.com
Same Origin Policy
protocol://host:port
https://site.com http://site.com https://a.site.com https://site.com:9090
None
Cross-origin writes $.ajax({ type: "POST", url: url, data: {…}, contentType:'text/plain'
});
Cross-origin writes • application/x-www- form-urlencoded • multipart/form- data • text/plain
Cross-origin embedding $(‘…’).append( ‘<img src=“…”>’ );
Cross-origin reads $.get(url, function(data){ alert(data); });
GET evil.com
GET evil.com
<form method=“POST” action=“https://…/ SaveEmail”> <input type=“hidden” name=“email” value=“
[email protected]
” /> </form>
<form method=“POST” action=“https://…/SaveEmail”> <input type=“hidden” name=“email” value=“
[email protected]
” /> </form>
<script> window.onload = function(){ … form.submit(); } </script>
POST /SaveEmail
[email protected]
GET evil.com
candy- csrf.apphb.com
None
@troyhunt
webgoat. github.io
https://ctftime.org
@ar7z1
[email protected]