SlideShare a Scribd company logo
1 of 62
CSRF: Not All Defenses Are Created Equal
Ari Elias-Bachrach
Defensium llc
November 2013

CSRF: Not All Defenses Are Created Equal

1
This Talk is a Review of Current Defensive Options

Or the long tail?

Is your application
one of the 80%

CSRF: Not All Defenses Are Created Equal

2
This Talk Will Cover CSRF Defenses and Their Side Effects
What is CSRF

General (high level) fixes

Code level defenses

Server level defenses

CSRF: Not All Defenses Are Created Equal

3
CSRF occurs when an attacker tricks a user's browser
into performing an action on a website

CSRF: Not All Defenses Are Created Equal

4
Normally, Browser's Form Submissions are Straightforward
and Predictable

<form action=submitpage>
<input name= amount type=text>
<input name=dest type=text>
<input type=submit value=Transfer>
</form>

CSRF: Not All Defenses Are Created Equal

5
Normally, Browser's Form Submissions are Straightforward
and Predictable
If action was a POST
POST /submitpage
Server: server.com
amount=100.00&dest=12345
If action was a GET
GET /submitpage?amount=100.00&dest=12345
Server: server.com

CSRF: Not All Defenses Are Created Equal

6
If you can predict all the parameters for an action,
you can fake it

To Fake a GET
<img src=”...”>
http://server.com/submitpage?amount=100.00&dest=12345
http://webmail.com/sendEmail?dest=boss@work&subj=resignation

CSRF: Not All Defenses Are Created Equal

7
If you can predict all the parameters for an action,
you can fake it
To Fake a POST
<form name=”evil” action=”http://server.com/submitpage”
action=POST>
<input type=”hidden” name=”amount” value=”100.00”>
<input type=”hidden” name=”dest” value=”12345”>
</form>
<script>document.evil.submit()</script>

CSRF: Not All Defenses Are Created Equal

8
Anatomy of an Attack
1. User navigates to website which attacker has some
control over
2. User's browser tries to load content from site
3. Content performs action at a legitimate site

CSRF: Not All Defenses Are Created Equal

9
Anatomy of an Attack
<html>
Malicious code

Legitimate site
Session cookie

CSRF: Not All Defenses Are Created Equal

10
In 2008, A CSRF flaw Was Used to Attack Cable Modems
Found a CSRF flaw in
ADSL modems used by a
Brazilian ISP
Used it to Change DNS
settings
Sent users to malicious
websites that looked like
www.google.br

CSRF: Not All Defenses Are Created Equal

11
High Level Defenses (Design Patterns)

CSRF: Not All Defenses Are Created Equal

12
There are Four Design Patterns Which are Used
Synchronizer Token Pattern

Double Submit Cookies

Challenge Response

Check Referrer Header

CSRF: Not All Defenses Are Created Equal

13
Primary Defense is the Synchronizer Token Pattern
The most common defense
Make at least one parameter unpredictable
Upon submission, check to ensure the submitted value
matches the generated value
<input type="hidden" name="FromEmail" value="president@whitehouse.gov" />
<input type="hidden" name="Subject" value="Do something wild" />
<input type="hidden" name="GUID" value="0f41d8e54aa80b3193c28ed920" />

CSRF: Not All Defenses Are Created Equal

14
Primary Defense is the Synchronizer Token Pattern
The most common defense
Things to look out for
- How are tokens remembered?
- Completeness of coverage

CSRF: Not All Defenses Are Created Equal

15
Second Defensive Option is Double Submit Cookies
This option used less often, but useful for things like REST
Generate a random value, store it in two places:
1 – a cookie
2 – a hidden form field
Upon submission, check to see if they match
abc123

<input>=abc123
abc123

<input>

abc123

CSRF: Not All Defenses Are Created Equal

16
Second Defensive Option is Double Submit Cookies
This option used less often, but useful for things like REST
Things to look out for:
- Do not use the Session ID for this purpose!

abc123

<input>=abc123
abc123

<input>

abc123

CSRF: Not All Defenses Are Created Equal

17
A Third Option is Any Form of Challenge Response System
Rarely Used Exclusively for CSRF Defense

CSRF: Not All Defenses Are Created Equal

18
A Third Option is Any Form of Challenge Response System
Rarely Used Exclusively for CSRF Defense

CSRF: Not All Defenses Are Created Equal

19
A Third Option is Any Form of Challenge Response System
Rarely Used Exclusively for CSRF Defense

CSRF: Not All Defenses Are Created Equal

20
A Third Option is Any Form of Challenge Response System
Rarely Used Exclusively for CSRF Defense

CSRF: Not All Defenses Are Created Equal

21
A Third Option is Any Form of Challenge Response System
Rarely Used Exclusively for CSRF Defense
Things to look out for:
- User impact

CSRF: Not All Defenses Are Created Equal

22
A Fourth Option is to Check the Referrer Header
I Have Never Seen This Implemented
GET /services/transfer.jsp HTTP/1.1
Host: mybank.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0)
Gecko/20100101 Firefox/16.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Referer: http://t.co/xblu14l6vL
Cookie: JSESSIONID=007f0100547a514c54060044;

CSRF: Not All Defenses Are Created Equal

23
A Fourth Option is to Check the Referrer Header
I Have Never Seen This Implemented
Things to look out for:
- Potential impact on other things which may modify the
referer header

CSRF: Not All Defenses Are Created Equal

24
Actually Implementing These Patterns is Where it Gets Fun
and Complicated

Code Fixes

Server Fixes

CSRF: Not All Defenses Are Created Equal

25
We Will Show Five Common Software Libraries That Can Be
Used To Do CSRF Defense

1. ViewState User Keys (.net)
2. AntiForgeryToken (.net MVC)
3. AntiCSRF (.net)
4. CSRFGuard (Java, PHP port is in progress)
5. HDIV (Java)

CSRF: Not All Defenses Are Created Equal

26
.net can add CSRF protections to the ViewState
Viewstate is meant to maintain a form's state on postbacks

Page.aspx

CSRF: Not All Defenses Are Created Equal

Page.aspx

27
.net can add CSRF protections to the ViewState
Adding the session ID
to the view state
makes it unpredictable

sessionID

CSRF: Not All Defenses Are Created Equal

28
.net can add CSRF protections to the ViewState
Add to OnInit for all pages or once to base class
protected override OnInit(EventArgs e) {
base.OnInit(e);
if (User.Identity.IsAuthenticated)
ViewStateUserKey = Session.SessionID; }

CSRF: Not All Defenses Are Created Equal

29
.net can add CSRF protections to the ViewState
Viewstate User Keys was designed to protect against 1
click attacks, which are a subset of CSRF attacks
Only protects postbacks - Won't
protect posts to other pages

Other.aspx

Page.aspx

Other.aspx

CSRF: Not All Defenses Are Created Equal

30
.net MVC Applications Can Use AntiForgeryToken

What about .net MVC?
AntiForgeryToken
- Part of the HtmlHelper class

CSRF: Not All Defenses Are Created Equal

31
.net MVC Applications Can Use AntiForgeryToken

<% using(Html.Form("UserProfile", "SubmitUpdate")) { %>
<%= Html.AntiForgeryToken() %>
<!-- rest of form goes here -->
<input name="__RequestVerificationToken" type="hidden"
value="saTFWpkKN0BYazFtN6c4YbZAmsEwG0srqlUqqloi/fVgeV2ciIFVmelv
zwRZ" />

CSRF: Not All Defenses Are Created Equal

32
.net MVC Applications Can Use AntiForgeryToken
Validate the token in the controller
[ValidateAntiForgeryToken]
public ActionResult FunctionToProtect()
{
// this is now run only if the token is valid
}

CSRF: Not All Defenses Are Created Equal

33
.net MVC Applications Can Use AntiForgeryToken
By Default, will only work for POST

Not a problem if GET is idempotent

Can be hacked to work, google for details

CSRF: Not All Defenses Are Created Equal

34
.net MVC Applications Can Use AntiForgeryToken
Obvious problem: the forgetful programmer

- must add to every controller and function that needs to
be protected

CSRF: Not All Defenses Are Created Equal

35
Anticsrf for .net implements the double submit cookies pattern
Anticsrf
- For .net
- Has no other requirements (like viewstate enabled, MVC, etc.)
- Open source
- Developed in C#

Available from http://anticsrf.codeplex.com/

CSRF: Not All Defenses Are Created Equal

36
Anticsrf for .net implements the double submit cookies pattern
Generates string using Guid.NewGuid()
Cookie: __CSRFCOOKIE=a22b81af-74f0-45ee-b2fd-1ead5f31f1c2;
in POST
__CSRFTOKEN=a22b81af-74f0-45ee-b2fd-1ead5f31f1c2
abc123

<input>=abc123
abc123

<input>

abc123

CSRF: Not All Defenses Are Created Equal

37
Anticsrf for .net implements the double submit cookies pattern
Can be used in a .net web app
New Token for each session
Only protects POST (not a problem if GET is idempotent)
- Won't work for Rest (unless you hack it)
abc123

<input>=abc123
abc123

<input>

abc123

CSRF: Not All Defenses Are Created Equal

38
CSRFGuard Implements the Synchronizer Token Pattern and
Makes a New Token For Each Session
Made By OWASP (open source, BSD license)

Java currently, PHP and .net port in progress

Keeps one token per session, stored in the session
- exposure of token compromises entire session

CSRF: Not All Defenses Are Created Equal

39
CSRFGuard Implements the Synchronizer Token Pattern and
Makes a New Token For Each Session

Modifies existing GET and POST
requests
Keeps one token per session, stored in
the session
- exposure of token compromises
entire session

CSRF: Not All Defenses Are Created Equal

link=nonce1
action=nonce1

40
CSRFGuard Can Also be Configured to Generate a New
Token For Each Page

Each link or action would get a unique token value
Stored in session
Feature is still experimental

link=page?nonce1
action=page2?nonce2

CSRF: Not All Defenses Are Created Equal

41
CSRFGuard Can Also be Configured to Generate a New
Token For Each Page

Also supports AJAX

Sets the token
value in an HTTP
header

CSRF: Not All Defenses Are Created Equal

42
HDIV Uses Tokens With a Queue Based Expiry
HDIV is a Java library that provides
several security functions, including
CSRF defense using the
Synchronizer Token Pattern.
The queue includes all generated
tokens (could be dozens per page).

link=page?nonce1
action=page2?nonce2

CSRF: Not All Defenses Are Created Equal

43
These Five Libraries All Have Different Approaches To CSRF
Defense
ViewState User Keys (.net)

Synchronizer Token Pattern
- only postbacks

AntiForgeryToken (.net MVC) Synchronizer Token Pattern
- needs lots of code changes
AntiCSRF (.net)

Double Submit Cookies
- only protects POST

CSRF: Not All Defenses Are Created Equal

44
These Five Libraries All Have Different Approaches To CSRF
Defense
CSRFGuard (Java)

Synchronizer Token Pattern
- can be done per session or page

HDIV

Synchronizer Token Pattern
- per link/action
- queue based expiry

CSRF: Not All Defenses Are Created Equal

45
We Can Also Implement CSRF Protection on the Server

Changing code on existing applications is hard

What if we asked the server to do CSRF protection

CSRF: Not All Defenses Are Created Equal

46
Tomcat 7 Includes a CSRF Prevention Filter
Generates a new UUID for each page loaded
- default generator is java.security.SecureRandom)
Protects GET and POST
- modifies links and form actions
Stores the last n UUIDs in the session
- default for n is 5

link=nonce1

http://server/page?org.apache.catalina.filters.CSRF_NONCE=31ACB2CA0A9...

CSRF: Not All Defenses Are Created Equal

47
Tomcat's CSRF Prevention Filter Can Cause Usability Issues
for User's With Multiple Browser Tabs Open
User opens a second tab (same session, same
cookies, etc.)
Makes n mouse clicks (default n is 5)
Original tab is now broken
nonce1

CSRF: Not All Defenses Are Created Equal

nonce2
nonce3
nonce4
nonce5
nonce6
48
F5's ASM Can Insert a Token in All Links and Forms to
Implement the Synchronizer Token Pattern

<form action=”foo”>

<a href=”bar”>

<form action=”foo”>
<input type=”hidden”
value=”12345”>

<a href=”bar?csrt=12345”>

CSRF: Not All Defenses Are Created Equal

49
F5's ASM Can Insert a Token in All Links and Forms to
Implement the Synchronizer Token Pattern
Will protect all GET and POST requests
Token are generated per session, and have an expiry
time (configurable from 1-99999 seconds). Default is
600 seconds
Obvious problem of timeouts

CSRF: Not All Defenses Are Created Equal

50
Imperva SecureSphere Can Detect CSRF Attacks by
Checking the Referrer Header
SecureSphere (Imperva's WAF) can alert and block
when the referrer header of a request is from an
external site
GET /services/transfer.jsp HTTP/1.1
Host: mybank.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101
Firefox/16.0
Accept-Language: en-US,en;q=0.5
Referer: http://t.co/xblu14l6vL
Cookie: JSESSIONID=007f0100547a514c54060044;

CSRF: Not All Defenses Are Created Equal

51
Imperva SecureSphere Can Detect CSRF Attacks by
Checking the Referrer Header

The referrer header is not respected in all situations
Bookmarks, links from external sites, and plugins that
stop or tamper with the referrer header can all
cause false positives

CSRF: Not All Defenses Are Created Equal

52
All Three Of The Servers We Looked At Do CSRF Defense
Differently
Synchronizer Token Pattern
- Queue based expiry
Synchronizer Token Pattern
- Time based expiry
Check Referrer Header
- Is intended for detection, not prevention

CSRF: Not All Defenses Are Created Equal

53
CSRF Token Names Can Reveal What Library You Are Using

CSRF: Not All Defenses Are Created Equal

54
CSRF Token Names Can Reveal What Library You Are Using

CSRF: Not All Defenses Are Created Equal

55
CSRF Token Names Can Reveal What Library You Are Using

Tomcat

CSRFGuard

513 results

126,000 results

CSRF: Not All Defenses Are Created Equal

56
CSRF Token Names Can Reveal What Library You Are Using

Almost all of the solutions we've
mentioned that use tokens allow you to
customize the name of the token
Some require you to edit source code to
do it...

CSRF: Not All Defenses Are Created Equal

57
A single XSS flaw makes all of these CSRF defenses useless

There are numerous ways for a script to access the CSRF
token value
document.cookie
document.getElementByID('csrftoken')
document.forms[0].elements[0]

CSRF: Not All Defenses Are Created Equal

58
Protecting GET Requests Comes At A Cost

CSRF tokens can be leaked through the
referer header, and can be reused if they're
still valid
GET /page HTTP/1.1
Host: othersite.com
Referer: http://mysite.com/page?CSRF_TOKEN=1ba5690d4ea45fbab3

CSRF: Not All Defenses Are Created Equal

59
We Have Seen Seven Widely Used Implementations of CSRF
Defense
Know your defenses – which solution you select will depend
on your application
How many of these solutions were perfect?
Security is rarely 'plug n play'

CSRF: Not All Defenses Are Created Equal

60
We Have Seen Seven Widely Used Implementations of CSRF
Defense
Know your defenses – which solution you select will depend
on your application
Environment and language used
Whether this is a new app or a retrofit of an old one
Idempotence
Potential user impact of some solutions

CSRF: Not All Defenses Are Created Equal

61
CSRF: Not All Defenses Are Created Equal
Ari Elias-Bachrach
ari@defensium.com
@angelofsecurity
Defensium llc
http://www.defensium.com

CSRF: Not All Defenses Are Created Equal

62

More Related Content

What's hot

[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security HeadersOWASP
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application SecurityRob Ragan
 
Abusing & Securing XPC in macOS apps
Abusing & Securing XPC in macOS appsAbusing & Securing XPC in macOS apps
Abusing & Securing XPC in macOS appsSecuRing
 
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...CODE BLUE
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10bilcorry
 
How to Make Your NodeJS Application Secure (24 Best Security Tips )
How to Make Your NodeJS Application Secure (24 Best Security Tips )How to Make Your NodeJS Application Secure (24 Best Security Tips )
How to Make Your NodeJS Application Secure (24 Best Security Tips )Katy Slemon
 
DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)Soham Kansodaria
 
When Ajax Attacks! Web application security fundamentals
When Ajax Attacks! Web application security fundamentalsWhen Ajax Attacks! Web application security fundamentals
When Ajax Attacks! Web application security fundamentalsSimon Willison
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshoptestuser1223
 
Devouring Security XML Attack surface and Defences
Devouring Security XML Attack surface and DefencesDevouring Security XML Attack surface and Defences
Devouring Security XML Attack surface and Defencesgmaran23
 
Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)Michael Hendrickx
 
MITM Attacks on HTTPS: Another Perspective
MITM Attacks on HTTPS: Another PerspectiveMITM Attacks on HTTPS: Another Perspective
MITM Attacks on HTTPS: Another PerspectiveGreenD0g
 
The Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile PlatformsThe Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile Platformskosborn
 
Hunting Layered Malware by Raul Alvarez
Hunting Layered Malware by Raul AlvarezHunting Layered Malware by Raul Alvarez
Hunting Layered Malware by Raul AlvarezEC-Council
 
Attack Chaining: Advanced Maneuvers for Hack Fu
Attack Chaining: Advanced Maneuvers for Hack FuAttack Chaining: Advanced Maneuvers for Hack Fu
Attack Chaining: Advanced Maneuvers for Hack FuRob Ragan
 
Writing Secure Code – Threat Defense
Writing Secure Code – Threat DefenseWriting Secure Code – Threat Defense
Writing Secure Code – Threat Defenseamiable_indian
 
Beyond OWASP Top 10 - Hack In Paris 2017
Beyond OWASP Top 10 - Hack In Paris 2017Beyond OWASP Top 10 - Hack In Paris 2017
Beyond OWASP Top 10 - Hack In Paris 2017Aaron Hnatiw
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultMohammed ALDOUB
 

What's hot (20)

[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers
 
Web Security 101
Web Security 101Web Security 101
Web Security 101
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application Security
 
Abusing & Securing XPC in macOS apps
Abusing & Securing XPC in macOS appsAbusing & Securing XPC in macOS apps
Abusing & Securing XPC in macOS apps
 
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10
 
How to Make Your NodeJS Application Secure (24 Best Security Tips )
How to Make Your NodeJS Application Secure (24 Best Security Tips )How to Make Your NodeJS Application Secure (24 Best Security Tips )
How to Make Your NodeJS Application Secure (24 Best Security Tips )
 
DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)
 
When Ajax Attacks! Web application security fundamentals
When Ajax Attacks! Web application security fundamentalsWhen Ajax Attacks! Web application security fundamentals
When Ajax Attacks! Web application security fundamentals
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshop
 
Devouring Security XML Attack surface and Defences
Devouring Security XML Attack surface and DefencesDevouring Security XML Attack surface and Defences
Devouring Security XML Attack surface and Defences
 
Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)
 
MITM Attacks on HTTPS: Another Perspective
MITM Attacks on HTTPS: Another PerspectiveMITM Attacks on HTTPS: Another Perspective
MITM Attacks on HTTPS: Another Perspective
 
The Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile PlatformsThe Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile Platforms
 
Hunting Layered Malware by Raul Alvarez
Hunting Layered Malware by Raul AlvarezHunting Layered Malware by Raul Alvarez
Hunting Layered Malware by Raul Alvarez
 
Attack Chaining: Advanced Maneuvers for Hack Fu
Attack Chaining: Advanced Maneuvers for Hack FuAttack Chaining: Advanced Maneuvers for Hack Fu
Attack Chaining: Advanced Maneuvers for Hack Fu
 
Writing Secure Code – Threat Defense
Writing Secure Code – Threat DefenseWriting Secure Code – Threat Defense
Writing Secure Code – Threat Defense
 
Beyond OWASP Top 10 - Hack In Paris 2017
Beyond OWASP Top 10 - Hack In Paris 2017Beyond OWASP Top 10 - Hack In Paris 2017
Beyond OWASP Top 10 - Hack In Paris 2017
 
ATM Malware: Understanding the threat
ATM Malware: Understanding the threat	ATM Malware: Understanding the threat
ATM Malware: Understanding the threat
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by Default
 

Viewers also liked

Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitationsAppsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitationsdrewz lin
 
Appsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martinAppsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martindrewz lin
 
I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2drewz lin
 
Appsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaolaAppsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaoladrewz lin
 
基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架drewz lin
 
Owasp2013 johannesullrich
Owasp2013 johannesullrichOwasp2013 johannesullrich
Owasp2013 johannesullrichdrewz lin
 
Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013drewz lin
 
Appsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_editsAppsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_editsdrewz lin
 
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21drewz lin
 
新浪微博稳定性经验谈
新浪微博稳定性经验谈新浪微博稳定性经验谈
新浪微博稳定性经验谈drewz lin
 
Cyber Threats & Cybersecurity - Are You Ready? - Jared Carstensen
Cyber Threats & Cybersecurity - Are You Ready? - Jared CarstensenCyber Threats & Cybersecurity - Are You Ready? - Jared Carstensen
Cyber Threats & Cybersecurity - Are You Ready? - Jared Carstensenjaredcarst
 
Telecom security issues (Raoul Chiesa, day 1 )
Telecom security issues   (Raoul Chiesa, day 1 ) Telecom security issues   (Raoul Chiesa, day 1 )
Telecom security issues (Raoul Chiesa, day 1 ) ClubHack
 
Information Security
Information SecurityInformation Security
Information SecuritySamilMehdiyev
 
Breaking down the cyber security framework closing critical it security gaps
Breaking down the cyber security framework closing critical it security gapsBreaking down the cyber security framework closing critical it security gaps
Breaking down the cyber security framework closing critical it security gapsIBM Security
 
1 security goals
1   security goals1   security goals
1 security goalsdrewz lin
 
Cryptography and Encryptions,Network Security,Caesar Cipher
Cryptography and Encryptions,Network Security,Caesar CipherCryptography and Encryptions,Network Security,Caesar Cipher
Cryptography and Encryptions,Network Security,Caesar CipherGopal Sakarkar
 

Viewers also liked (17)

Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitationsAppsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
 
Appsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martinAppsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martin
 
I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2
 
Appsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaolaAppsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaola
 
基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架
 
Owasp2013 johannesullrich
Owasp2013 johannesullrichOwasp2013 johannesullrich
Owasp2013 johannesullrich
 
Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013
 
Appsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_editsAppsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_edits
 
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
 
新浪微博稳定性经验谈
新浪微博稳定性经验谈新浪微博稳定性经验谈
新浪微博稳定性经验谈
 
Cyber Threats & Cybersecurity - Are You Ready? - Jared Carstensen
Cyber Threats & Cybersecurity - Are You Ready? - Jared CarstensenCyber Threats & Cybersecurity - Are You Ready? - Jared Carstensen
Cyber Threats & Cybersecurity - Are You Ready? - Jared Carstensen
 
Telecom security issues (Raoul Chiesa, day 1 )
Telecom security issues   (Raoul Chiesa, day 1 ) Telecom security issues   (Raoul Chiesa, day 1 )
Telecom security issues (Raoul Chiesa, day 1 )
 
Information Security
Information SecurityInformation Security
Information Security
 
Breaking down the cyber security framework closing critical it security gaps
Breaking down the cyber security framework closing critical it security gapsBreaking down the cyber security framework closing critical it security gaps
Breaking down the cyber security framework closing critical it security gaps
 
1 security goals
1   security goals1   security goals
1 security goals
 
Cryptography and Encryptions,Network Security,Caesar Cipher
Cryptography and Encryptions,Network Security,Caesar CipherCryptography and Encryptions,Network Security,Caesar Cipher
Cryptography and Encryptions,Network Security,Caesar Cipher
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 

Similar to Csrf not-all-defenses-are-created-equal

Securing your EmberJS Application
Securing your EmberJS ApplicationSecuring your EmberJS Application
Securing your EmberJS ApplicationPhilippe De Ryck
 
Advanced System Security and Digital Forensics
Advanced System Security and Digital ForensicsAdvanced System Security and Digital Forensics
Advanced System Security and Digital ForensicsDr. Ramchandra Mangrulkar
 
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...Felipe Prado
 
Cyber Security Workshop @SPIT- 3rd October 2015
Cyber Security Workshop @SPIT- 3rd October 2015Cyber Security Workshop @SPIT- 3rd October 2015
Cyber Security Workshop @SPIT- 3rd October 2015Nilesh Sapariya
 
Web Application Firewall: Suckseed or Succeed
Web Application Firewall: Suckseed or SucceedWeb Application Firewall: Suckseed or Succeed
Web Application Firewall: Suckseed or SucceedPrathan Phongthiproek
 
Prevoty NYC Java SIG 20150730
Prevoty NYC Java SIG 20150730Prevoty NYC Java SIG 20150730
Prevoty NYC Java SIG 20150730chadtindel
 
Unifi securitybugs sep2013
Unifi securitybugs sep2013Unifi securitybugs sep2013
Unifi securitybugs sep2013testslidesha12
 
Security Best Practices
Security Best PracticesSecurity Best Practices
Security Best PracticesClint Edmonson
 
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdftheVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdfGabriel Mathenge
 
Application Security from the Inside - OWASP
Application Security from the Inside - OWASPApplication Security from the Inside - OWASP
Application Security from the Inside - OWASPSqreen
 
Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...
Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...
Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...iotcloudserve_tein
 
MIT-6-determina-vps.ppt
MIT-6-determina-vps.pptMIT-6-determina-vps.ppt
MIT-6-determina-vps.pptwebhostingguy
 
DEFCON 21: EDS: Exploitation Detection System Slides
DEFCON 21: EDS: Exploitation Detection System SlidesDEFCON 21: EDS: Exploitation Detection System Slides
DEFCON 21: EDS: Exploitation Detection System SlidesAmr Thabet
 
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011Samvel Gevorgyan
 
Web Application Security in Rails
Web Application Security in RailsWeb Application Security in Rails
Web Application Security in RailsUri Nativ
 
Server Side Template Injection by Mandeep Jadon
Server Side Template Injection by Mandeep JadonServer Side Template Injection by Mandeep Jadon
Server Side Template Injection by Mandeep JadonMandeep Jadon
 
Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018Paula Januszkiewicz
 

Similar to Csrf not-all-defenses-are-created-equal (20)

Securing your EmberJS Application
Securing your EmberJS ApplicationSecuring your EmberJS Application
Securing your EmberJS Application
 
Advanced System Security and Digital Forensics
Advanced System Security and Digital ForensicsAdvanced System Security and Digital Forensics
Advanced System Security and Digital Forensics
 
SOHIL_RM (1).pptx
SOHIL_RM (1).pptxSOHIL_RM (1).pptx
SOHIL_RM (1).pptx
 
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
 
Cyber Security Workshop @SPIT- 3rd October 2015
Cyber Security Workshop @SPIT- 3rd October 2015Cyber Security Workshop @SPIT- 3rd October 2015
Cyber Security Workshop @SPIT- 3rd October 2015
 
Web Application Firewall: Suckseed or Succeed
Web Application Firewall: Suckseed or SucceedWeb Application Firewall: Suckseed or Succeed
Web Application Firewall: Suckseed or Succeed
 
Prevoty NYC Java SIG 20150730
Prevoty NYC Java SIG 20150730Prevoty NYC Java SIG 20150730
Prevoty NYC Java SIG 20150730
 
Unifi securitybugs sep2013
Unifi securitybugs sep2013Unifi securitybugs sep2013
Unifi securitybugs sep2013
 
Security Best Practices
Security Best PracticesSecurity Best Practices
Security Best Practices
 
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdftheVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
 
Application Security from the Inside - OWASP
Application Security from the Inside - OWASPApplication Security from the Inside - OWASP
Application Security from the Inside - OWASP
 
Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...
Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...
Introduction to DevOps and DevOpsSec with Secure Design by Prof.Krerk (Chulal...
 
MIT-6-determina-vps.ppt
MIT-6-determina-vps.pptMIT-6-determina-vps.ppt
MIT-6-determina-vps.ppt
 
DEFCON 21: EDS: Exploitation Detection System Slides
DEFCON 21: EDS: Exploitation Detection System SlidesDEFCON 21: EDS: Exploitation Detection System Slides
DEFCON 21: EDS: Exploitation Detection System Slides
 
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
 
WebSec_MSR.ppt
WebSec_MSR.pptWebSec_MSR.ppt
WebSec_MSR.ppt
 
Metasploit Humla for Beginner
Metasploit Humla for BeginnerMetasploit Humla for Beginner
Metasploit Humla for Beginner
 
Web Application Security in Rails
Web Application Security in RailsWeb Application Security in Rails
Web Application Security in Rails
 
Server Side Template Injection by Mandeep Jadon
Server Side Template Injection by Mandeep JadonServer Side Template Injection by Mandeep Jadon
Server Side Template Injection by Mandeep Jadon
 
Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018
 

More from drewz lin

Appsec usa roberthansen
Appsec usa roberthansenAppsec usa roberthansen
Appsec usa roberthansendrewz lin
 
Appsec2013 presentation
Appsec2013 presentationAppsec2013 presentation
Appsec2013 presentationdrewz lin
 
Amol scadaowasp
Amol scadaowaspAmol scadaowasp
Amol scadaowaspdrewz lin
 
Agile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usaAgile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usadrewz lin
 
Vulnex app secusa2013
Vulnex app secusa2013Vulnex app secusa2013
Vulnex app secusa2013drewz lin
 
无线App的性能分析和监控实践 rickyqiu
无线App的性能分析和监控实践 rickyqiu无线App的性能分析和监控实践 rickyqiu
无线App的性能分析和监控实践 rickyqiudrewz lin
 
网易移动自动化测试实践(孔庆云)
网易移动自动化测试实践(孔庆云)网易移动自动化测试实践(孔庆云)
网易移动自动化测试实践(孔庆云)drewz lin
 
天猫后端技术架构优化实践
天猫后端技术架构优化实践天猫后端技术架构优化实践
天猫后端技术架构优化实践drewz lin
 
天猫大促性能测试实践 耿电
天猫大促性能测试实践 耿电天猫大促性能测试实践 耿电
天猫大促性能测试实践 耿电drewz lin
 
互联网海量运维 20130807
互联网海量运维 20130807互联网海量运维 20130807
互联网海量运维 20130807drewz lin
 
阿里自研数据库 Ocean base实践
阿里自研数据库 Ocean base实践阿里自研数据库 Ocean base实践
阿里自研数据库 Ocean base实践drewz lin
 
T4 淘宝私有云
T4 淘宝私有云T4 淘宝私有云
T4 淘宝私有云drewz lin
 
I os与android多平台开发心得
I os与android多平台开发心得I os与android多平台开发心得
I os与android多平台开发心得drewz lin
 
Hadoop在反作弊中的应用 林述民
Hadoop在反作弊中的应用 林述民Hadoop在反作弊中的应用 林述民
Hadoop在反作弊中的应用 林述民drewz lin
 
人人网服务化与架构变迁V3
人人网服务化与架构变迁V3人人网服务化与架构变迁V3
人人网服务化与架构变迁V3drewz lin
 
有道云笔记架构简介
有道云笔记架构简介有道云笔记架构简介
有道云笔记架构简介drewz lin
 

More from drewz lin (16)

Appsec usa roberthansen
Appsec usa roberthansenAppsec usa roberthansen
Appsec usa roberthansen
 
Appsec2013 presentation
Appsec2013 presentationAppsec2013 presentation
Appsec2013 presentation
 
Amol scadaowasp
Amol scadaowaspAmol scadaowasp
Amol scadaowasp
 
Agile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usaAgile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usa
 
Vulnex app secusa2013
Vulnex app secusa2013Vulnex app secusa2013
Vulnex app secusa2013
 
无线App的性能分析和监控实践 rickyqiu
无线App的性能分析和监控实践 rickyqiu无线App的性能分析和监控实践 rickyqiu
无线App的性能分析和监控实践 rickyqiu
 
网易移动自动化测试实践(孔庆云)
网易移动自动化测试实践(孔庆云)网易移动自动化测试实践(孔庆云)
网易移动自动化测试实践(孔庆云)
 
天猫后端技术架构优化实践
天猫后端技术架构优化实践天猫后端技术架构优化实践
天猫后端技术架构优化实践
 
天猫大促性能测试实践 耿电
天猫大促性能测试实践 耿电天猫大促性能测试实践 耿电
天猫大促性能测试实践 耿电
 
互联网海量运维 20130807
互联网海量运维 20130807互联网海量运维 20130807
互联网海量运维 20130807
 
阿里自研数据库 Ocean base实践
阿里自研数据库 Ocean base实践阿里自研数据库 Ocean base实践
阿里自研数据库 Ocean base实践
 
T4 淘宝私有云
T4 淘宝私有云T4 淘宝私有云
T4 淘宝私有云
 
I os与android多平台开发心得
I os与android多平台开发心得I os与android多平台开发心得
I os与android多平台开发心得
 
Hadoop在反作弊中的应用 林述民
Hadoop在反作弊中的应用 林述民Hadoop在反作弊中的应用 林述民
Hadoop在反作弊中的应用 林述民
 
人人网服务化与架构变迁V3
人人网服务化与架构变迁V3人人网服务化与架构变迁V3
人人网服务化与架构变迁V3
 
有道云笔记架构简介
有道云笔记架构简介有道云笔记架构简介
有道云笔记架构简介
 

Recently uploaded

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Csrf not-all-defenses-are-created-equal

  • 1. CSRF: Not All Defenses Are Created Equal Ari Elias-Bachrach Defensium llc November 2013 CSRF: Not All Defenses Are Created Equal 1
  • 2. This Talk is a Review of Current Defensive Options Or the long tail? Is your application one of the 80% CSRF: Not All Defenses Are Created Equal 2
  • 3. This Talk Will Cover CSRF Defenses and Their Side Effects What is CSRF General (high level) fixes Code level defenses Server level defenses CSRF: Not All Defenses Are Created Equal 3
  • 4. CSRF occurs when an attacker tricks a user's browser into performing an action on a website CSRF: Not All Defenses Are Created Equal 4
  • 5. Normally, Browser's Form Submissions are Straightforward and Predictable <form action=submitpage> <input name= amount type=text> <input name=dest type=text> <input type=submit value=Transfer> </form> CSRF: Not All Defenses Are Created Equal 5
  • 6. Normally, Browser's Form Submissions are Straightforward and Predictable If action was a POST POST /submitpage Server: server.com amount=100.00&dest=12345 If action was a GET GET /submitpage?amount=100.00&dest=12345 Server: server.com CSRF: Not All Defenses Are Created Equal 6
  • 7. If you can predict all the parameters for an action, you can fake it To Fake a GET <img src=”...”> http://server.com/submitpage?amount=100.00&dest=12345 http://webmail.com/sendEmail?dest=boss@work&subj=resignation CSRF: Not All Defenses Are Created Equal 7
  • 8. If you can predict all the parameters for an action, you can fake it To Fake a POST <form name=”evil” action=”http://server.com/submitpage” action=POST> <input type=”hidden” name=”amount” value=”100.00”> <input type=”hidden” name=”dest” value=”12345”> </form> <script>document.evil.submit()</script> CSRF: Not All Defenses Are Created Equal 8
  • 9. Anatomy of an Attack 1. User navigates to website which attacker has some control over 2. User's browser tries to load content from site 3. Content performs action at a legitimate site CSRF: Not All Defenses Are Created Equal 9
  • 10. Anatomy of an Attack <html> Malicious code Legitimate site Session cookie CSRF: Not All Defenses Are Created Equal 10
  • 11. In 2008, A CSRF flaw Was Used to Attack Cable Modems Found a CSRF flaw in ADSL modems used by a Brazilian ISP Used it to Change DNS settings Sent users to malicious websites that looked like www.google.br CSRF: Not All Defenses Are Created Equal 11
  • 12. High Level Defenses (Design Patterns) CSRF: Not All Defenses Are Created Equal 12
  • 13. There are Four Design Patterns Which are Used Synchronizer Token Pattern Double Submit Cookies Challenge Response Check Referrer Header CSRF: Not All Defenses Are Created Equal 13
  • 14. Primary Defense is the Synchronizer Token Pattern The most common defense Make at least one parameter unpredictable Upon submission, check to ensure the submitted value matches the generated value <input type="hidden" name="FromEmail" value="president@whitehouse.gov" /> <input type="hidden" name="Subject" value="Do something wild" /> <input type="hidden" name="GUID" value="0f41d8e54aa80b3193c28ed920" /> CSRF: Not All Defenses Are Created Equal 14
  • 15. Primary Defense is the Synchronizer Token Pattern The most common defense Things to look out for - How are tokens remembered? - Completeness of coverage CSRF: Not All Defenses Are Created Equal 15
  • 16. Second Defensive Option is Double Submit Cookies This option used less often, but useful for things like REST Generate a random value, store it in two places: 1 – a cookie 2 – a hidden form field Upon submission, check to see if they match abc123 <input>=abc123 abc123 <input> abc123 CSRF: Not All Defenses Are Created Equal 16
  • 17. Second Defensive Option is Double Submit Cookies This option used less often, but useful for things like REST Things to look out for: - Do not use the Session ID for this purpose! abc123 <input>=abc123 abc123 <input> abc123 CSRF: Not All Defenses Are Created Equal 17
  • 18. A Third Option is Any Form of Challenge Response System Rarely Used Exclusively for CSRF Defense CSRF: Not All Defenses Are Created Equal 18
  • 19. A Third Option is Any Form of Challenge Response System Rarely Used Exclusively for CSRF Defense CSRF: Not All Defenses Are Created Equal 19
  • 20. A Third Option is Any Form of Challenge Response System Rarely Used Exclusively for CSRF Defense CSRF: Not All Defenses Are Created Equal 20
  • 21. A Third Option is Any Form of Challenge Response System Rarely Used Exclusively for CSRF Defense CSRF: Not All Defenses Are Created Equal 21
  • 22. A Third Option is Any Form of Challenge Response System Rarely Used Exclusively for CSRF Defense Things to look out for: - User impact CSRF: Not All Defenses Are Created Equal 22
  • 23. A Fourth Option is to Check the Referrer Header I Have Never Seen This Implemented GET /services/transfer.jsp HTTP/1.1 Host: mybank.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0 Accept: */* Accept-Language: en-US,en;q=0.5 Referer: http://t.co/xblu14l6vL Cookie: JSESSIONID=007f0100547a514c54060044; CSRF: Not All Defenses Are Created Equal 23
  • 24. A Fourth Option is to Check the Referrer Header I Have Never Seen This Implemented Things to look out for: - Potential impact on other things which may modify the referer header CSRF: Not All Defenses Are Created Equal 24
  • 25. Actually Implementing These Patterns is Where it Gets Fun and Complicated Code Fixes Server Fixes CSRF: Not All Defenses Are Created Equal 25
  • 26. We Will Show Five Common Software Libraries That Can Be Used To Do CSRF Defense 1. ViewState User Keys (.net) 2. AntiForgeryToken (.net MVC) 3. AntiCSRF (.net) 4. CSRFGuard (Java, PHP port is in progress) 5. HDIV (Java) CSRF: Not All Defenses Are Created Equal 26
  • 27. .net can add CSRF protections to the ViewState Viewstate is meant to maintain a form's state on postbacks Page.aspx CSRF: Not All Defenses Are Created Equal Page.aspx 27
  • 28. .net can add CSRF protections to the ViewState Adding the session ID to the view state makes it unpredictable sessionID CSRF: Not All Defenses Are Created Equal 28
  • 29. .net can add CSRF protections to the ViewState Add to OnInit for all pages or once to base class protected override OnInit(EventArgs e) { base.OnInit(e); if (User.Identity.IsAuthenticated) ViewStateUserKey = Session.SessionID; } CSRF: Not All Defenses Are Created Equal 29
  • 30. .net can add CSRF protections to the ViewState Viewstate User Keys was designed to protect against 1 click attacks, which are a subset of CSRF attacks Only protects postbacks - Won't protect posts to other pages Other.aspx Page.aspx Other.aspx CSRF: Not All Defenses Are Created Equal 30
  • 31. .net MVC Applications Can Use AntiForgeryToken What about .net MVC? AntiForgeryToken - Part of the HtmlHelper class CSRF: Not All Defenses Are Created Equal 31
  • 32. .net MVC Applications Can Use AntiForgeryToken <% using(Html.Form("UserProfile", "SubmitUpdate")) { %> <%= Html.AntiForgeryToken() %> <!-- rest of form goes here --> <input name="__RequestVerificationToken" type="hidden" value="saTFWpkKN0BYazFtN6c4YbZAmsEwG0srqlUqqloi/fVgeV2ciIFVmelv zwRZ" /> CSRF: Not All Defenses Are Created Equal 32
  • 33. .net MVC Applications Can Use AntiForgeryToken Validate the token in the controller [ValidateAntiForgeryToken] public ActionResult FunctionToProtect() { // this is now run only if the token is valid } CSRF: Not All Defenses Are Created Equal 33
  • 34. .net MVC Applications Can Use AntiForgeryToken By Default, will only work for POST Not a problem if GET is idempotent Can be hacked to work, google for details CSRF: Not All Defenses Are Created Equal 34
  • 35. .net MVC Applications Can Use AntiForgeryToken Obvious problem: the forgetful programmer - must add to every controller and function that needs to be protected CSRF: Not All Defenses Are Created Equal 35
  • 36. Anticsrf for .net implements the double submit cookies pattern Anticsrf - For .net - Has no other requirements (like viewstate enabled, MVC, etc.) - Open source - Developed in C# Available from http://anticsrf.codeplex.com/ CSRF: Not All Defenses Are Created Equal 36
  • 37. Anticsrf for .net implements the double submit cookies pattern Generates string using Guid.NewGuid() Cookie: __CSRFCOOKIE=a22b81af-74f0-45ee-b2fd-1ead5f31f1c2; in POST __CSRFTOKEN=a22b81af-74f0-45ee-b2fd-1ead5f31f1c2 abc123 <input>=abc123 abc123 <input> abc123 CSRF: Not All Defenses Are Created Equal 37
  • 38. Anticsrf for .net implements the double submit cookies pattern Can be used in a .net web app New Token for each session Only protects POST (not a problem if GET is idempotent) - Won't work for Rest (unless you hack it) abc123 <input>=abc123 abc123 <input> abc123 CSRF: Not All Defenses Are Created Equal 38
  • 39. CSRFGuard Implements the Synchronizer Token Pattern and Makes a New Token For Each Session Made By OWASP (open source, BSD license) Java currently, PHP and .net port in progress Keeps one token per session, stored in the session - exposure of token compromises entire session CSRF: Not All Defenses Are Created Equal 39
  • 40. CSRFGuard Implements the Synchronizer Token Pattern and Makes a New Token For Each Session Modifies existing GET and POST requests Keeps one token per session, stored in the session - exposure of token compromises entire session CSRF: Not All Defenses Are Created Equal link=nonce1 action=nonce1 40
  • 41. CSRFGuard Can Also be Configured to Generate a New Token For Each Page Each link or action would get a unique token value Stored in session Feature is still experimental link=page?nonce1 action=page2?nonce2 CSRF: Not All Defenses Are Created Equal 41
  • 42. CSRFGuard Can Also be Configured to Generate a New Token For Each Page Also supports AJAX Sets the token value in an HTTP header CSRF: Not All Defenses Are Created Equal 42
  • 43. HDIV Uses Tokens With a Queue Based Expiry HDIV is a Java library that provides several security functions, including CSRF defense using the Synchronizer Token Pattern. The queue includes all generated tokens (could be dozens per page). link=page?nonce1 action=page2?nonce2 CSRF: Not All Defenses Are Created Equal 43
  • 44. These Five Libraries All Have Different Approaches To CSRF Defense ViewState User Keys (.net) Synchronizer Token Pattern - only postbacks AntiForgeryToken (.net MVC) Synchronizer Token Pattern - needs lots of code changes AntiCSRF (.net) Double Submit Cookies - only protects POST CSRF: Not All Defenses Are Created Equal 44
  • 45. These Five Libraries All Have Different Approaches To CSRF Defense CSRFGuard (Java) Synchronizer Token Pattern - can be done per session or page HDIV Synchronizer Token Pattern - per link/action - queue based expiry CSRF: Not All Defenses Are Created Equal 45
  • 46. We Can Also Implement CSRF Protection on the Server Changing code on existing applications is hard What if we asked the server to do CSRF protection CSRF: Not All Defenses Are Created Equal 46
  • 47. Tomcat 7 Includes a CSRF Prevention Filter Generates a new UUID for each page loaded - default generator is java.security.SecureRandom) Protects GET and POST - modifies links and form actions Stores the last n UUIDs in the session - default for n is 5 link=nonce1 http://server/page?org.apache.catalina.filters.CSRF_NONCE=31ACB2CA0A9... CSRF: Not All Defenses Are Created Equal 47
  • 48. Tomcat's CSRF Prevention Filter Can Cause Usability Issues for User's With Multiple Browser Tabs Open User opens a second tab (same session, same cookies, etc.) Makes n mouse clicks (default n is 5) Original tab is now broken nonce1 CSRF: Not All Defenses Are Created Equal nonce2 nonce3 nonce4 nonce5 nonce6 48
  • 49. F5's ASM Can Insert a Token in All Links and Forms to Implement the Synchronizer Token Pattern <form action=”foo”> <a href=”bar”> <form action=”foo”> <input type=”hidden” value=”12345”> <a href=”bar?csrt=12345”> CSRF: Not All Defenses Are Created Equal 49
  • 50. F5's ASM Can Insert a Token in All Links and Forms to Implement the Synchronizer Token Pattern Will protect all GET and POST requests Token are generated per session, and have an expiry time (configurable from 1-99999 seconds). Default is 600 seconds Obvious problem of timeouts CSRF: Not All Defenses Are Created Equal 50
  • 51. Imperva SecureSphere Can Detect CSRF Attacks by Checking the Referrer Header SecureSphere (Imperva's WAF) can alert and block when the referrer header of a request is from an external site GET /services/transfer.jsp HTTP/1.1 Host: mybank.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0 Accept-Language: en-US,en;q=0.5 Referer: http://t.co/xblu14l6vL Cookie: JSESSIONID=007f0100547a514c54060044; CSRF: Not All Defenses Are Created Equal 51
  • 52. Imperva SecureSphere Can Detect CSRF Attacks by Checking the Referrer Header The referrer header is not respected in all situations Bookmarks, links from external sites, and plugins that stop or tamper with the referrer header can all cause false positives CSRF: Not All Defenses Are Created Equal 52
  • 53. All Three Of The Servers We Looked At Do CSRF Defense Differently Synchronizer Token Pattern - Queue based expiry Synchronizer Token Pattern - Time based expiry Check Referrer Header - Is intended for detection, not prevention CSRF: Not All Defenses Are Created Equal 53
  • 54. CSRF Token Names Can Reveal What Library You Are Using CSRF: Not All Defenses Are Created Equal 54
  • 55. CSRF Token Names Can Reveal What Library You Are Using CSRF: Not All Defenses Are Created Equal 55
  • 56. CSRF Token Names Can Reveal What Library You Are Using Tomcat CSRFGuard 513 results 126,000 results CSRF: Not All Defenses Are Created Equal 56
  • 57. CSRF Token Names Can Reveal What Library You Are Using Almost all of the solutions we've mentioned that use tokens allow you to customize the name of the token Some require you to edit source code to do it... CSRF: Not All Defenses Are Created Equal 57
  • 58. A single XSS flaw makes all of these CSRF defenses useless There are numerous ways for a script to access the CSRF token value document.cookie document.getElementByID('csrftoken') document.forms[0].elements[0] CSRF: Not All Defenses Are Created Equal 58
  • 59. Protecting GET Requests Comes At A Cost CSRF tokens can be leaked through the referer header, and can be reused if they're still valid GET /page HTTP/1.1 Host: othersite.com Referer: http://mysite.com/page?CSRF_TOKEN=1ba5690d4ea45fbab3 CSRF: Not All Defenses Are Created Equal 59
  • 60. We Have Seen Seven Widely Used Implementations of CSRF Defense Know your defenses – which solution you select will depend on your application How many of these solutions were perfect? Security is rarely 'plug n play' CSRF: Not All Defenses Are Created Equal 60
  • 61. We Have Seen Seven Widely Used Implementations of CSRF Defense Know your defenses – which solution you select will depend on your application Environment and language used Whether this is a new app or a retrofit of an old one Idempotence Potential user impact of some solutions CSRF: Not All Defenses Are Created Equal 61
  • 62. CSRF: Not All Defenses Are Created Equal Ari Elias-Bachrach ari@defensium.com @angelofsecurity Defensium llc http://www.defensium.com CSRF: Not All Defenses Are Created Equal 62

Editor's Notes

  1. Request.Params versus Request.Form – param does GET r POST, form does only POST