SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
10 things I’ve learnt about
web application security
James Crowley
CTO, FundApps
@jamescrowley
Who has written software with bugs in before?
Learning #1 – Security vulnerabilities are bugs
OWASPTop 10 in 2013
Injection
BrokenAuthentication & Session
Management
Cross Site Scripting
Insecure Direct Object
References
Security Misconfiguration
Sensitive Data Exposure
Missing Function Level
Access Control
Cross Site Request Forgery
Using Components with Known
vulnerabilities
Unvalidated redirects and forwards
Learning #2 – If you feel confident about security,
be afraid!
Action: Hack your own applications *
Fiddler
ZED Attack Proxy
Skipfish
WATOBO
Tamper Data
WebScarab
Packaged VMs: Beef project, SamuriWTF
More here: http://resources.infosecinstitute.com/owasp-top-10-tools-and-tactics/
* Be aware of computer misuse act.
Demo!
Learning #3 – Fixing the basics are easy and
worthwhile.
Unvalidated redirects (esp MVC 1 & 2)
Secure & HttpOnly cookies
Obvious cross site scripting
vulnerabilities
Obvious SQL injection
Missing best practice headers
Allowing caching of secure pages
Autocomplete on password pages (!!)
Application errors being disclosed and
different error pages
Directory traversals
Missing XSRF protection
Things they (should) pick up…
Reminder:These are automated tools
You’re using a salted hash, right?
How many iterations?
Action: Check if you’re using 1000+ iterations on
your password hashing. If not, plan to migrate.
// use this helper or use Rfc2898DeriveBytes directly
System.Web.Helpers.Crypto.HashPassword(passwordToHash);
Learning #4 – It’s game over once you have fallen
for XSS
(those alert boxes are scary)
Demo!
Learning #5 – Do not rely on Request validation.
Not even a little bit.
Action: Validate input using white lists not black
lists.
Apply blanket validation to model binding (unless
set otherwise)
Learning #6 - Encode your output, especially with
JavaScript. Be wary with 3rd party libraries.
Action: Review encoding anywhere you’re passing
variables between server and JavaScript/Urls/Css
System.Web.HttpUtility.UrlEncode
System.Web.Security.AntiXss.AntiXssEncoder.CssEncode
System.Web.HttpUtility.JavaScriptStringEncode
Action: Review anywhere you’re accessing
parameters (such as the URL fragment) from JS
Action:Tighten up encoding using AntiXSS – uses
whitelist rather than blacklist
<httpRuntime
encoderType="System.Web.Security.AntiXss.AntiXssEncoder,
System.Web, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
Learning #7 - Be especially wary of file uploads if
you’re supporting IE 8 (or earlier)
Action: Ensure Content-Disposition is always set
Action: Ensure you white list both file extension
and mime types
Action: Use X-Content-Type-Options to disable
mime type sniffing in IE
<system.webServer>
<httpProtocol>
<customHeaders>
...
<add name="X-Content-Type-Options" value="nosniff" />
</customHeaders>
</httpProtocol>
</system.webServer>
Action: Use Content-Security-Policy-Report-Only
header to monitor JavaScript usage and then
Content-Security-Policy to restrict (and enforce
best practice!)
<add name="Content-Security-Policy" value="default-src
'self'; script-src 'self' https://apis.google.com; report-
uri http://loghost.example.com/reports.jsp" />
Learning #8 – Don’t forget about your emails
# Learning 9 – Have a reliable strategy for
preventing cross site request forgeries
Hint: ScatteringValidateAntiForgeryToken at
random on your actions doesn’t count!
Demo
Demo
Action: ApplyValidateAntiForgeryToken to all
non-GET requests. Fail secure.
https://gist.github.com/jamescrowley/a6e53957c8c0778f5e12
Learning #10 - Forward Secrecy and SSL best
practices are easier than you might think
(but it’s a moving target)
Demo: If you’re not running HTTPS…
Action: Scan your current setup for configuration
& Heartbleed
https://www.ssllabs.com/
https://filippo.io/Heartbleed/
Action: Get your ciphers in order, enable ECDHE
for forward secrecy
Action: Apply Strict-Transport-Security header
(with a long age)
<add name="Strict-Transport-Security" value="max-
age=31536000" />
Wrapping up
Go hack your own application
Run ZED Attack Proxy / SkipFish
Pass on your knowledge
Thanks for listening
– any questions?
Tweet me: @jamescrowley
Blog: www.jamescrowley.co.uk
PS FundApps is hiring! Get in touch 
Resources
Books
The Browser Hacker's Handbook
The Web Application Hacker's Handbook: Finding and Exploiting Security
Flaws
Best Practices
Troy Hunt - http://www.troyhunt.com/
“Don’t do this, do that” from the ASP.NETTeam - http://bit.ly/1fXzIH2
(article) and http://vimeo.com/68390507 (video)
OWASP - https://www.owasp.org/index.php/Category:OWASP_.NET_Project
Security news & resources
OWASP - https://www.owasp.org/index.php/Main_Page
Microsoft security response - @msftsecresponse / microsoft.com/msrcblog
SANS - http://www.sans.org/security-resources/
CVE - http://cve.mitre.org/
Specific resources
Content-Security-Policy
https://blog.twitter.com/2011/improving-browser-security-csp
http://www.html5rocks.com/en/tutorials/security/content-security-policy
Other tools to protect yourself…
Vulnerability scanning
Skipfish, WebInspect, QualysGuard…
Web Application Firewalls
Snort, Imperva, Cloudflare, ModSecurity…
PCI Scanning
HackerGuardian, QualsysGuard…

Weitere ähnliche Inhalte

Was ist angesagt?

A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...Noppadol Songsakaew
 
Phu appsec13
Phu appsec13Phu appsec13
Phu appsec13drewz lin
 
3. backup file artifacts - mazin ahmed
3. backup file artifacts - mazin ahmed3. backup file artifacts - mazin ahmed
3. backup file artifacts - mazin ahmedRashid Khatmey
 
Web application Security tools
Web application Security toolsWeb application Security tools
Web application Security toolsNico Penaredondo
 
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...Quek Lilian
 
Vulnerability Funalitics with vulners.com
Vulnerability Funalitics with vulners.comVulnerability Funalitics with vulners.com
Vulnerability Funalitics with vulners.comKirill Ermakov
 
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolfDefeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolfdrewz lin
 
XSS (Cross Site Scripting)
XSS (Cross Site Scripting)XSS (Cross Site Scripting)
XSS (Cross Site Scripting)Shubham Gupta
 
State of Web Security RailsConf 2016
State of Web Security RailsConf 2016State of Web Security RailsConf 2016
State of Web Security RailsConf 2016IMMUNIO
 
Vulners: Google for hackers
Vulners: Google for hackersVulners: Google for hackers
Vulners: Google for hackersKirill Ermakov
 
Web Security: What's wrong, and how the bad guys can break your website
Web Security: What's wrong, and how the bad guys can break your websiteWeb Security: What's wrong, and how the bad guys can break your website
Web Security: What's wrong, and how the bad guys can break your websiteAndrew Sorensen
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) securityNahidul Kibria
 
Browser Security by pratimesh Pathak ( Buldhana)
Browser Security by pratimesh Pathak ( Buldhana) Browser Security by pratimesh Pathak ( Buldhana)
Browser Security by pratimesh Pathak ( Buldhana) Pratimesh Pathak
 
The moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp SofiaThe moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp SofiaMarko Heijnen
 
Presentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web ApplicationPresentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web ApplicationMd Mahfuzur Rahman
 
[Cluj] CSP (Content Security Policy)
[Cluj] CSP (Content Security Policy)[Cluj] CSP (Content Security Policy)
[Cluj] CSP (Content Security Policy)OWASP EEE
 

Was ist angesagt? (20)

A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...
 
Phu appsec13
Phu appsec13Phu appsec13
Phu appsec13
 
2 . web app s canners
2 . web app s canners2 . web app s canners
2 . web app s canners
 
3. backup file artifacts - mazin ahmed
3. backup file artifacts - mazin ahmed3. backup file artifacts - mazin ahmed
3. backup file artifacts - mazin ahmed
 
Web application Security tools
Web application Security toolsWeb application Security tools
Web application Security tools
 
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...
 
Vulnerability Funalitics with vulners.com
Vulnerability Funalitics with vulners.comVulnerability Funalitics with vulners.com
Vulnerability Funalitics with vulners.com
 
Beef saurabh
Beef saurabhBeef saurabh
Beef saurabh
 
Cyber ppt
Cyber pptCyber ppt
Cyber ppt
 
Browser Exploit Framework
Browser Exploit FrameworkBrowser Exploit Framework
Browser Exploit Framework
 
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolfDefeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
 
XSS (Cross Site Scripting)
XSS (Cross Site Scripting)XSS (Cross Site Scripting)
XSS (Cross Site Scripting)
 
State of Web Security RailsConf 2016
State of Web Security RailsConf 2016State of Web Security RailsConf 2016
State of Web Security RailsConf 2016
 
Vulners: Google for hackers
Vulners: Google for hackersVulners: Google for hackers
Vulners: Google for hackers
 
Web Security: What's wrong, and how the bad guys can break your website
Web Security: What's wrong, and how the bad guys can break your websiteWeb Security: What's wrong, and how the bad guys can break your website
Web Security: What's wrong, and how the bad guys can break your website
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) security
 
Browser Security by pratimesh Pathak ( Buldhana)
Browser Security by pratimesh Pathak ( Buldhana) Browser Security by pratimesh Pathak ( Buldhana)
Browser Security by pratimesh Pathak ( Buldhana)
 
The moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp SofiaThe moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp Sofia
 
Presentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web ApplicationPresentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web Application
 
[Cluj] CSP (Content Security Policy)
[Cluj] CSP (Content Security Policy)[Cluj] CSP (Content Security Policy)
[Cluj] CSP (Content Security Policy)
 

Ähnlich wie 10 things I’ve learnt about web application security

Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Brian Huff
 
Java EE 6 Security in practice with GlassFish
Java EE 6 Security in practice with GlassFishJava EE 6 Security in practice with GlassFish
Java EE 6 Security in practice with GlassFishMarkus Eisele
 
Slides for the #JavaOne Session ID: CON11881
Slides for the #JavaOne Session ID: CON11881Slides for the #JavaOne Session ID: CON11881
Slides for the #JavaOne Session ID: CON11881Masoud Kalali
 
4 andrii kudiurov - web application security 101
4   andrii kudiurov - web application security 1014   andrii kudiurov - web application security 101
4 andrii kudiurov - web application security 101Ievgenii Katsan
 
Break it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure softwareBreak it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure softwareLeigh Honeywell
 
OWASP App Sec US - 2010
OWASP App Sec US - 2010OWASP App Sec US - 2010
OWASP App Sec US - 2010Aditya K Sood
 
RSA Conference 2010 San Francisco
RSA Conference 2010 San FranciscoRSA Conference 2010 San Francisco
RSA Conference 2010 San FranciscoAditya K Sood
 
OWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript DevelopersOWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript DevelopersLewis Ardern
 
OWASPTop 10
OWASPTop 10OWASPTop 10
OWASPTop 10InnoTech
 
Security risks awareness
Security risks awarenessSecurity risks awareness
Security risks awarenessJanagi Kannan
 
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFOWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFBrian Huff
 
Penetration testing dont just leave it to chance
Penetration testing dont just leave it to chancePenetration testing dont just leave it to chance
Penetration testing dont just leave it to chanceDr. Anish Cheriyan (PhD)
 
Top web apps security vulnerabilities
Top web apps security vulnerabilitiesTop web apps security vulnerabilities
Top web apps security vulnerabilitiesAleksandar Bozinovski
 
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...IBM Security
 
CMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer SystemCMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer SystemEditor IJCATR
 

Ähnlich wie 10 things I’ve learnt about web application security (20)

OWASP Top10 2010
OWASP Top10 2010OWASP Top10 2010
OWASP Top10 2010
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
 
Java EE 6 Security in practice with GlassFish
Java EE 6 Security in practice with GlassFishJava EE 6 Security in practice with GlassFish
Java EE 6 Security in practice with GlassFish
 
Slides for the #JavaOne Session ID: CON11881
Slides for the #JavaOne Session ID: CON11881Slides for the #JavaOne Session ID: CON11881
Slides for the #JavaOne Session ID: CON11881
 
4 andrii kudiurov - web application security 101
4   andrii kudiurov - web application security 1014   andrii kudiurov - web application security 101
4 andrii kudiurov - web application security 101
 
Break it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure softwareBreak it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure software
 
Web Security
Web SecurityWeb Security
Web Security
 
OWASP App Sec US - 2010
OWASP App Sec US - 2010OWASP App Sec US - 2010
OWASP App Sec US - 2010
 
RSA Conference 2010 San Francisco
RSA Conference 2010 San FranciscoRSA Conference 2010 San Francisco
RSA Conference 2010 San Francisco
 
OWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript DevelopersOWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript Developers
 
OWASPTop 10
OWASPTop 10OWASPTop 10
OWASPTop 10
 
Security risks awareness
Security risks awarenessSecurity risks awareness
Security risks awareness
 
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFOWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
 
Penetration testing dont just leave it to chance
Penetration testing dont just leave it to chancePenetration testing dont just leave it to chance
Penetration testing dont just leave it to chance
 
ASP.NET security vulnerabilities
ASP.NET security vulnerabilitiesASP.NET security vulnerabilities
ASP.NET security vulnerabilities
 
Top web apps security vulnerabilities
Top web apps security vulnerabilitiesTop web apps security vulnerabilities
Top web apps security vulnerabilities
 
Attacking HTML5
Attacking HTML5Attacking HTML5
Attacking HTML5
 
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
 
CMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer SystemCMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer System
 
Owasp top 10_-_2010 presentation
Owasp top 10_-_2010 presentationOwasp top 10_-_2010 presentation
Owasp top 10_-_2010 presentation
 

Kürzlich hochgeladen

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer 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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 

Kürzlich hochgeladen (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer 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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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...
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
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...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 

10 things I’ve learnt about web application security

  • 1. 10 things I’ve learnt about web application security James Crowley CTO, FundApps @jamescrowley
  • 2. Who has written software with bugs in before?
  • 3. Learning #1 – Security vulnerabilities are bugs
  • 4. OWASPTop 10 in 2013 Injection BrokenAuthentication & Session Management Cross Site Scripting Insecure Direct Object References Security Misconfiguration Sensitive Data Exposure Missing Function Level Access Control Cross Site Request Forgery Using Components with Known vulnerabilities Unvalidated redirects and forwards
  • 5. Learning #2 – If you feel confident about security, be afraid!
  • 6. Action: Hack your own applications * Fiddler ZED Attack Proxy Skipfish WATOBO Tamper Data WebScarab Packaged VMs: Beef project, SamuriWTF More here: http://resources.infosecinstitute.com/owasp-top-10-tools-and-tactics/ * Be aware of computer misuse act.
  • 8. Learning #3 – Fixing the basics are easy and worthwhile.
  • 9. Unvalidated redirects (esp MVC 1 & 2) Secure & HttpOnly cookies Obvious cross site scripting vulnerabilities Obvious SQL injection Missing best practice headers Allowing caching of secure pages Autocomplete on password pages (!!) Application errors being disclosed and different error pages Directory traversals Missing XSRF protection Things they (should) pick up…
  • 11. You’re using a salted hash, right? How many iterations?
  • 12. Action: Check if you’re using 1000+ iterations on your password hashing. If not, plan to migrate. // use this helper or use Rfc2898DeriveBytes directly System.Web.Helpers.Crypto.HashPassword(passwordToHash);
  • 13. Learning #4 – It’s game over once you have fallen for XSS (those alert boxes are scary)
  • 14. Demo!
  • 15. Learning #5 – Do not rely on Request validation. Not even a little bit.
  • 16. Action: Validate input using white lists not black lists. Apply blanket validation to model binding (unless set otherwise)
  • 17. Learning #6 - Encode your output, especially with JavaScript. Be wary with 3rd party libraries.
  • 18. Action: Review encoding anywhere you’re passing variables between server and JavaScript/Urls/Css System.Web.HttpUtility.UrlEncode System.Web.Security.AntiXss.AntiXssEncoder.CssEncode System.Web.HttpUtility.JavaScriptStringEncode
  • 19. Action: Review anywhere you’re accessing parameters (such as the URL fragment) from JS
  • 20. Action:Tighten up encoding using AntiXSS – uses whitelist rather than blacklist <httpRuntime encoderType="System.Web.Security.AntiXss.AntiXssEncoder, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  • 21. Learning #7 - Be especially wary of file uploads if you’re supporting IE 8 (or earlier)
  • 23. Action: Ensure you white list both file extension and mime types
  • 24. Action: Use X-Content-Type-Options to disable mime type sniffing in IE <system.webServer> <httpProtocol> <customHeaders> ... <add name="X-Content-Type-Options" value="nosniff" /> </customHeaders> </httpProtocol> </system.webServer>
  • 25. Action: Use Content-Security-Policy-Report-Only header to monitor JavaScript usage and then Content-Security-Policy to restrict (and enforce best practice!) <add name="Content-Security-Policy" value="default-src 'self'; script-src 'self' https://apis.google.com; report- uri http://loghost.example.com/reports.jsp" />
  • 26. Learning #8 – Don’t forget about your emails
  • 27. # Learning 9 – Have a reliable strategy for preventing cross site request forgeries Hint: ScatteringValidateAntiForgeryToken at random on your actions doesn’t count!
  • 28. Demo
  • 29. Demo
  • 30. Action: ApplyValidateAntiForgeryToken to all non-GET requests. Fail secure. https://gist.github.com/jamescrowley/a6e53957c8c0778f5e12
  • 31. Learning #10 - Forward Secrecy and SSL best practices are easier than you might think (but it’s a moving target)
  • 32. Demo: If you’re not running HTTPS…
  • 33. Action: Scan your current setup for configuration & Heartbleed https://www.ssllabs.com/ https://filippo.io/Heartbleed/
  • 34. Action: Get your ciphers in order, enable ECDHE for forward secrecy
  • 35. Action: Apply Strict-Transport-Security header (with a long age) <add name="Strict-Transport-Security" value="max- age=31536000" />
  • 36. Wrapping up Go hack your own application Run ZED Attack Proxy / SkipFish Pass on your knowledge
  • 37. Thanks for listening – any questions? Tweet me: @jamescrowley Blog: www.jamescrowley.co.uk PS FundApps is hiring! Get in touch 
  • 39. Books The Browser Hacker's Handbook The Web Application Hacker's Handbook: Finding and Exploiting Security Flaws
  • 40. Best Practices Troy Hunt - http://www.troyhunt.com/ “Don’t do this, do that” from the ASP.NETTeam - http://bit.ly/1fXzIH2 (article) and http://vimeo.com/68390507 (video) OWASP - https://www.owasp.org/index.php/Category:OWASP_.NET_Project
  • 41. Security news & resources OWASP - https://www.owasp.org/index.php/Main_Page Microsoft security response - @msftsecresponse / microsoft.com/msrcblog SANS - http://www.sans.org/security-resources/ CVE - http://cve.mitre.org/
  • 43. Other tools to protect yourself… Vulnerability scanning Skipfish, WebInspect, QualysGuard… Web Application Firewalls Snort, Imperva, Cloudflare, ModSecurity… PCI Scanning HackerGuardian, QualsysGuard…