SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Matthew Hughes
Who am I?
 Pen tester
 Coder
 Blogger
 All around nice guy.
Who am I?
 Ethical Hacking for Computer Security BSc 2009 - 2011
 Internship at Mad Security 2010-2011
 Internship at St Noble/MMV – 2011
 Developer at CIC 2011-2012
 Unemployed “Entrepreneur” – Current
What is this all about then?
 Most web applications are insecure.
 Secure coding is hard.
 Developers generally don’t know how to test their own
  sites.
 Insecure web applications are generally bad.
Why should you care?
 Security breaches are very expensive.
 Security breaches make you look like a moron.
 It’s fairly easy to mitigate against them.
 Hacking is fun.
 Security consultants are fucking expensive.
What will this talk cover?
 This talk is not exhaustive. It will only cover a fraction
  of the basics.
 It will discuss various kinds of attack you can expect
  your application to endure.
 It will give you an understanding of how to test for
  security vulnerabilities in your application.
What will this talk cover?
 Detection
   Reflected XSS
   Stored XSS
   XSRF
   SQLi
 Mitigation
 Vulnerability disclosure
What will this talk cover?
 This talk is an introduction. It won’t cover everything.
 Web application security is a HUGE domain.
A bit of history…
 1995 – Most websites tended to be static pages coded
  in pure HTML.
 1999 – Perl and PHP gain popularity, and their relative
  ease of use allow for beginners to make web apps.
 And it sorta goes downhill from there…
So, what happened next?
 Nobody really understood the risks involved with
  dynamic websites.
 More and more companies began to rely on web apps.
 More and more companies experienced security
  breaches…
 Which for the most part has been fun to watch…
Notable examples
 Sony PSN Hack
    77 million pieces of personally information were leaked
     via SQLi.
    Biggest leak in history.
    Outage lasted for 24 days.
    Total costs were $171 Million USD
Notable Examples
 TJX Hack
    45 million pieces of credit card information were leaked.
    Attacker used SQLi and sniffed traffic.
    Breach cost $200 million
Notable Examples
 Samy worm
    Samy Kamkar used an XSS vulnerability in MySpace to
     get anyone who viewed his profile to friend request him,
     and add “and most of all, Samy is my hero” and the
     exploit code to their profiles.
    Within 20 hours, over 1,000,000 had their pages
     compromised.
What conclusions can we draw?
 Security breaches can happen to large corporations
  with huge amounts of resources.
 Security breaches are expensive. Really expensive.
 They can also be pretty funny.
Cross Site Scripting (XSS)
 XSS happens when an input isn’t correctly sanitized
  and is either reflected in the page (reflected XSS) or
  stored within the application and rendered for each
  subsequent user (stored XSS).
 Whilst XSS attacks may seem harmless, they can be
  the precursor to social engineering attacks, XSRF
  attacks and can be used to steal cookies.
Cross Site Scripting (XSS)
 <script>alert(‘xss’)</script>
 Some sites in order to mitigate against XSS attacks
  forbid the usage of ‘alert’… This doesn’t really mitigate
  against XSS. Just use ‘prompt’. As we will see in the
  next slide…
 Tags with attribute values can be mitigated by crafting
  your attack string with “> at the front.
 “><script>alert(‘xss’);</script>
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)
SQL Injection
 Generally, most dynamic websites contain a data store.
 These are generally interacted with using SQL.
 SQL is standardized, meaning that the attack syntax
  generally works an all DBMS’
 ORM and NoSQL databases are vulnerable to injection
  attacks. Just not SQL attacks.
SQL Injection
 Consider the following SQL query
 “Select * from users where username = @param;”
 What would happen if we were to put in the following
  parameter.
 “dave’ or ‘1’ = 1”
 Since one does equal one, it will return all values.
 With union queries, one can add data into other
  tables, creating the potential to create new accounts.
SQL Injection
 SQL Injection can also be used to bypass
    authentication.
   Consider the following SQL query
   “Select * from users where username = @params and
    passworld = @params”.
   What would happen if you were to pass it the
    following
   Admin ‘ ---
   You can now authenticate against any account without
    knowing the password…
Cross Site Request Forgery (XSRF)
 Consider the following URL:
 http://bankofliverpool.com/transfer?acount=purpleak
  i&amount=9001&for=JenniferEllison
 If the user is authenticated and the site is vulnerable to
  XSRF, then Jennifer Ellison is about to get over nine
  thousand pounds from Purple Aki
 “But surely this is just a browser/local user issue?”
Cross Site Request Forgery (XSRF)
 Well, yes and no…
 The user has to be authenticated on their local
  machine and have a valid cookie.
 But… consider the following code.
 <img
  href=http://bankofliverpool.com/transfer?acount=pur
  pleaki&amount=9001&for=JenniferEllison>
 Now, this isn’t a valid image… But the browser will still
  call that URL.
Going on from here…
 This is going to be the last I’m going to talk about
    when it comes to vulnerability discovery…
   It’s a huge field.
   Web Application Hackers Handbook is a good place to
    start…
   DVWA is a great sandboxed environment where you
    can use offensive security testing techniques.
   A lot of testing can be automated and there are various
    firefox/Chrome plugins which do a lot of the legwork.
Going on from here
 OWASP is a group dedicated to web app security.
 They meet fairly often in these parts and entrance is
  free.
 Read the OWASP Top 10. Just do it.
Another valid point…
 It’s generally frowned upon to test systems that don’t
  belong to you.
 Don’t do it, unless you have permission, or you like
  prison food.
Mitigation
 A good offense is generally the best defence…
 Your best is often not good enough, especially against a
  really motivated hacker.
 Web Application firewalls are a solid line of defence
  against many attacks.
 Trustwave’s ModSecurity is very, very good.
Mitigation
 There’s no point reinforcing a door if you’re going to
  leave the windows open.
 Ensure that the underlying infrastructure is regularly
  patched, you have an IDS (Snort is free and very, very
  good) and you reduce the surface of attack by turning
  off services you don’t need and running a firewall.
Responsible vulnerability
disclosure…
 We’re all geeks. We’re curious. I know some of you will
  discard my valid point I made earlier.
 Full Disclosure is bad. Very bad.
 Responsible disclosure is good. Very good.
 Upsploit.com is a good resource for handling
  vulnerability disclosure.
Keep in touch?
 Twitter.com/matthewhughes
 me@matthewhughes.co.uk
 Facebook.com/matthewjhughes
 Matthewhughes.co.uk
Thank you!
 Any questions?

Weitere ähnliche Inhalte

Was ist angesagt?

The Cross Site Scripting Guide
The Cross Site Scripting GuideThe Cross Site Scripting Guide
The Cross Site Scripting GuideDaisuke_Dan
 
Cross Site Scripting
Cross Site ScriptingCross Site Scripting
Cross Site ScriptingAli Mattash
 
Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Ikhade Maro Igbape
 
State of Web Security RailsConf 2016
State of Web Security RailsConf 2016State of Web Security RailsConf 2016
State of Web Security RailsConf 2016IMMUNIO
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolArjun Jain
 
Cross site scripting (xss) attacks issues and defense - by sandeep kumbhar
Cross site scripting (xss) attacks issues and defense - by sandeep kumbharCross site scripting (xss) attacks issues and defense - by sandeep kumbhar
Cross site scripting (xss) attacks issues and defense - by sandeep kumbharSandeep Kumbhar
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingReflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingInMobi Technology
 
Cross-Site Scripting course made by Cristian Alexandrescu
Cross-Site Scripting course made by Cristian Alexandrescu Cross-Site Scripting course made by Cristian Alexandrescu
Cross-Site Scripting course made by Cristian Alexandrescu Cristian Alexandrescu
 
Grey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request ForgeryGrey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request ForgeryChristopher Grayson
 
Cross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxCross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxAaron Weaver
 
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”Capgemini
 
Cross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterCross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterMichael Coates
 
Cross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesCross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesMarco Morana
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionVishal Kumar
 
A8 cross site request forgery (csrf) it 6873 presentation
A8 cross site request forgery (csrf)   it 6873 presentationA8 cross site request forgery (csrf)   it 6873 presentation
A8 cross site request forgery (csrf) it 6873 presentationAlbena Asenova-Belal
 
Web Security - OWASP - SQL injection & Cross Site Scripting XSS
Web Security - OWASP - SQL injection & Cross Site Scripting XSSWeb Security - OWASP - SQL injection & Cross Site Scripting XSS
Web Security - OWASP - SQL injection & Cross Site Scripting XSSIvan Ortega
 
New Insights into Clickjacking
New Insights into ClickjackingNew Insights into Clickjacking
New Insights into ClickjackingMarco Balduzzi
 
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
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)Manish Kumar
 

Was ist angesagt? (20)

The Cross Site Scripting Guide
The Cross Site Scripting GuideThe Cross Site Scripting Guide
The Cross Site Scripting Guide
 
Cross Site Scripting
Cross Site ScriptingCross Site Scripting
Cross Site Scripting
 
Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation
 
State of Web Security RailsConf 2016
State of Web Security RailsConf 2016State of Web Security RailsConf 2016
State of Web Security RailsConf 2016
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing tool
 
Cross site scripting (xss) attacks issues and defense - by sandeep kumbhar
Cross site scripting (xss) attacks issues and defense - by sandeep kumbharCross site scripting (xss) attacks issues and defense - by sandeep kumbhar
Cross site scripting (xss) attacks issues and defense - by sandeep kumbhar
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingReflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site Scripting
 
Cross-Site Scripting course made by Cristian Alexandrescu
Cross-Site Scripting course made by Cristian Alexandrescu Cross-Site Scripting course made by Cristian Alexandrescu
Cross-Site Scripting course made by Cristian Alexandrescu
 
Grey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request ForgeryGrey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request Forgery
 
Cross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxCross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert Box
 
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
 
Cross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterCross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning Center
 
Cross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesCross Site Request Forgery Vulnerabilities
Cross Site Request Forgery Vulnerabilities
 
Phishing with Super Bait
Phishing with Super BaitPhishing with Super Bait
Phishing with Super Bait
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL Injection
 
A8 cross site request forgery (csrf) it 6873 presentation
A8 cross site request forgery (csrf)   it 6873 presentationA8 cross site request forgery (csrf)   it 6873 presentation
A8 cross site request forgery (csrf) it 6873 presentation
 
Web Security - OWASP - SQL injection & Cross Site Scripting XSS
Web Security - OWASP - SQL injection & Cross Site Scripting XSSWeb Security - OWASP - SQL injection & Cross Site Scripting XSS
Web Security - OWASP - SQL injection & Cross Site Scripting XSS
 
New Insights into Clickjacking
New Insights into ClickjackingNew Insights into Clickjacking
New Insights into Clickjacking
 
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
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)
 

Andere mochten auch

Security Testing using ZAP in SFDC
Security Testing using ZAP in SFDCSecurity Testing using ZAP in SFDC
Security Testing using ZAP in SFDCThinqloud
 
Security Automation using ZAP
Security Automation using ZAPSecurity Automation using ZAP
Security Automation using ZAPVaibhav Gupta
 
Microsoft threat modeling tool 2016
Microsoft threat modeling tool 2016Microsoft threat modeling tool 2016
Microsoft threat modeling tool 2016Rihab Chebbah
 
Security testing zap it
Security testing   zap itSecurity testing   zap it
Security testing zap itvodqancr
 
VodQA_DesignThinking_ShalabhVarma
VodQA_DesignThinking_ShalabhVarmaVodQA_DesignThinking_ShalabhVarma
VodQA_DesignThinking_ShalabhVarmavodQA
 
Introduction to Security Testing
Introduction to Security TestingIntroduction to Security Testing
Introduction to Security TestingvodQA
 

Andere mochten auch (7)

Security Testing using ZAP in SFDC
Security Testing using ZAP in SFDCSecurity Testing using ZAP in SFDC
Security Testing using ZAP in SFDC
 
Security Automation using ZAP
Security Automation using ZAPSecurity Automation using ZAP
Security Automation using ZAP
 
Microsoft threat modeling tool 2016
Microsoft threat modeling tool 2016Microsoft threat modeling tool 2016
Microsoft threat modeling tool 2016
 
Security testautomation
Security testautomationSecurity testautomation
Security testautomation
 
Security testing zap it
Security testing   zap itSecurity testing   zap it
Security testing zap it
 
VodQA_DesignThinking_ShalabhVarma
VodQA_DesignThinking_ShalabhVarmaVodQA_DesignThinking_ShalabhVarma
VodQA_DesignThinking_ShalabhVarma
 
Introduction to Security Testing
Introduction to Security TestingIntroduction to Security Testing
Introduction to Security Testing
 

Ähnlich wie Security testing for web developers

We cant hack ourselves secure
We cant hack ourselves secureWe cant hack ourselves secure
We cant hack ourselves secureEoin Keary
 
React security vulnerabilities
React security vulnerabilitiesReact security vulnerabilities
React security vulnerabilitiesAngelinaJasper
 
4774.projectb.securitysquad
4774.projectb.securitysquad4774.projectb.securitysquad
4774.projectb.securitysquadJosh Howell
 
DEFCON 17 Presentation: CSRF - Yeah, It Still Works
DEFCON 17 Presentation: CSRF - Yeah, It Still WorksDEFCON 17 Presentation: CSRF - Yeah, It Still Works
DEFCON 17 Presentation: CSRF - Yeah, It Still WorksRuss McRee
 
Cross Site Scripting(XSS)
Cross Site Scripting(XSS)Cross Site Scripting(XSS)
Cross Site Scripting(XSS)Nabin Dutta
 
Implementing a comprehensive application security progaram - Tawfiq
Implementing a comprehensive application security progaram - Tawfiq Implementing a comprehensive application security progaram - Tawfiq
Implementing a comprehensive application security progaram - Tawfiq OWASP-Qatar Chapter
 
CROSS SITE SCRIPTING.ppt
CROSS SITE SCRIPTING.pptCROSS SITE SCRIPTING.ppt
CROSS SITE SCRIPTING.pptyashvirsingh48
 
XSS- an application security vulnerability
XSS-   an application security vulnerabilityXSS-   an application security vulnerability
XSS- an application security vulnerabilitySoumyasanto Sen
 
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 security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearyWeb security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearydrewz lin
 
Online Gaming Cyber security and Threat Model
Online Gaming Cyber security and Threat ModelOnline Gaming Cyber security and Threat Model
Online Gaming Cyber security and Threat ModelEoin Keary
 
Sql Injection Attacks And A Web Application Environment
Sql Injection Attacks And A Web Application EnvironmentSql Injection Attacks And A Web Application Environment
Sql Injection Attacks And A Web Application EnvironmentSheri Elliott
 
Making the case for sandbox v1.1 (SD Conference 2007)
Making the case for sandbox v1.1 (SD Conference 2007)Making the case for sandbox v1.1 (SD Conference 2007)
Making the case for sandbox v1.1 (SD Conference 2007)Dinis Cruz
 
Things that go bump on the web - Web Application Security
Things that go bump on the web - Web Application SecurityThings that go bump on the web - Web Application Security
Things that go bump on the web - Web Application SecurityChristian Heilmann
 

Ähnlich wie Security testing for web developers (20)

We cant hack ourselves secure
We cant hack ourselves secureWe cant hack ourselves secure
We cant hack ourselves secure
 
React security vulnerabilities
React security vulnerabilitiesReact security vulnerabilities
React security vulnerabilities
 
4774.projectb.securitysquad
4774.projectb.securitysquad4774.projectb.securitysquad
4774.projectb.securitysquad
 
XSS.pdf
XSS.pdfXSS.pdf
XSS.pdf
 
XSS.pdf
XSS.pdfXSS.pdf
XSS.pdf
 
DEFCON 17 Presentation: CSRF - Yeah, It Still Works
DEFCON 17 Presentation: CSRF - Yeah, It Still WorksDEFCON 17 Presentation: CSRF - Yeah, It Still Works
DEFCON 17 Presentation: CSRF - Yeah, It Still Works
 
Cross Site Scripting(XSS)
Cross Site Scripting(XSS)Cross Site Scripting(XSS)
Cross Site Scripting(XSS)
 
Implementing a comprehensive application security progaram - Tawfiq
Implementing a comprehensive application security progaram - Tawfiq Implementing a comprehensive application security progaram - Tawfiq
Implementing a comprehensive application security progaram - Tawfiq
 
CROSS SITE SCRIPTING.ppt
CROSS SITE SCRIPTING.pptCROSS SITE SCRIPTING.ppt
CROSS SITE SCRIPTING.ppt
 
Starwest 2008
Starwest 2008Starwest 2008
Starwest 2008
 
XSS- an application security vulnerability
XSS-   an application security vulnerabilityXSS-   an application security vulnerability
XSS- an application security vulnerability
 
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
 
Xss talk, attack and defense
Xss talk, attack and defenseXss talk, attack and defense
Xss talk, attack and defense
 
Web security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearyWeb security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-keary
 
Online Gaming Cyber security and Threat Model
Online Gaming Cyber security and Threat ModelOnline Gaming Cyber security and Threat Model
Online Gaming Cyber security and Threat Model
 
Sql Injection Attacks And A Web Application Environment
Sql Injection Attacks And A Web Application EnvironmentSql Injection Attacks And A Web Application Environment
Sql Injection Attacks And A Web Application Environment
 
Web hack & attacks
Web hack & attacksWeb hack & attacks
Web hack & attacks
 
Website Security: A Guide to Defending Your Website
Website Security: A Guide to Defending Your WebsiteWebsite Security: A Guide to Defending Your Website
Website Security: A Guide to Defending Your Website
 
Making the case for sandbox v1.1 (SD Conference 2007)
Making the case for sandbox v1.1 (SD Conference 2007)Making the case for sandbox v1.1 (SD Conference 2007)
Making the case for sandbox v1.1 (SD Conference 2007)
 
Things that go bump on the web - Web Application Security
Things that go bump on the web - Web Application SecurityThings that go bump on the web - Web Application Security
Things that go bump on the web - Web Application Security
 

Kürzlich hochgeladen

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 Processorsdebabhi2
 
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
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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 FMESafe Software
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
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 DiscoveryTrustArc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Kürzlich hochgeladen (20)

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
 
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
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Security testing for web developers

  • 2. Who am I?  Pen tester  Coder  Blogger  All around nice guy.
  • 3. Who am I?  Ethical Hacking for Computer Security BSc 2009 - 2011  Internship at Mad Security 2010-2011  Internship at St Noble/MMV – 2011  Developer at CIC 2011-2012  Unemployed “Entrepreneur” – Current
  • 4. What is this all about then?  Most web applications are insecure.  Secure coding is hard.  Developers generally don’t know how to test their own sites.  Insecure web applications are generally bad.
  • 5. Why should you care?  Security breaches are very expensive.  Security breaches make you look like a moron.  It’s fairly easy to mitigate against them.  Hacking is fun.  Security consultants are fucking expensive.
  • 6. What will this talk cover?  This talk is not exhaustive. It will only cover a fraction of the basics.  It will discuss various kinds of attack you can expect your application to endure.  It will give you an understanding of how to test for security vulnerabilities in your application.
  • 7. What will this talk cover?  Detection  Reflected XSS  Stored XSS  XSRF  SQLi  Mitigation  Vulnerability disclosure
  • 8. What will this talk cover?  This talk is an introduction. It won’t cover everything.  Web application security is a HUGE domain.
  • 9. A bit of history…  1995 – Most websites tended to be static pages coded in pure HTML.  1999 – Perl and PHP gain popularity, and their relative ease of use allow for beginners to make web apps.  And it sorta goes downhill from there…
  • 10. So, what happened next?  Nobody really understood the risks involved with dynamic websites.  More and more companies began to rely on web apps.  More and more companies experienced security breaches…  Which for the most part has been fun to watch…
  • 11. Notable examples  Sony PSN Hack  77 million pieces of personally information were leaked via SQLi.  Biggest leak in history.  Outage lasted for 24 days.  Total costs were $171 Million USD
  • 12. Notable Examples  TJX Hack  45 million pieces of credit card information were leaked.  Attacker used SQLi and sniffed traffic.  Breach cost $200 million
  • 13. Notable Examples  Samy worm  Samy Kamkar used an XSS vulnerability in MySpace to get anyone who viewed his profile to friend request him, and add “and most of all, Samy is my hero” and the exploit code to their profiles.  Within 20 hours, over 1,000,000 had their pages compromised.
  • 14. What conclusions can we draw?  Security breaches can happen to large corporations with huge amounts of resources.  Security breaches are expensive. Really expensive.  They can also be pretty funny.
  • 15. Cross Site Scripting (XSS)  XSS happens when an input isn’t correctly sanitized and is either reflected in the page (reflected XSS) or stored within the application and rendered for each subsequent user (stored XSS).  Whilst XSS attacks may seem harmless, they can be the precursor to social engineering attacks, XSRF attacks and can be used to steal cookies.
  • 16. Cross Site Scripting (XSS)  <script>alert(‘xss’)</script>  Some sites in order to mitigate against XSS attacks forbid the usage of ‘alert’… This doesn’t really mitigate against XSS. Just use ‘prompt’. As we will see in the next slide…  Tags with attribute values can be mitigated by crafting your attack string with “> at the front.  “><script>alert(‘xss’);</script>
  • 19. SQL Injection  Generally, most dynamic websites contain a data store.  These are generally interacted with using SQL.  SQL is standardized, meaning that the attack syntax generally works an all DBMS’  ORM and NoSQL databases are vulnerable to injection attacks. Just not SQL attacks.
  • 20. SQL Injection  Consider the following SQL query  “Select * from users where username = @param;”  What would happen if we were to put in the following parameter.  “dave’ or ‘1’ = 1”  Since one does equal one, it will return all values.  With union queries, one can add data into other tables, creating the potential to create new accounts.
  • 21. SQL Injection  SQL Injection can also be used to bypass authentication.  Consider the following SQL query  “Select * from users where username = @params and passworld = @params”.  What would happen if you were to pass it the following  Admin ‘ ---  You can now authenticate against any account without knowing the password…
  • 22. Cross Site Request Forgery (XSRF)  Consider the following URL:  http://bankofliverpool.com/transfer?acount=purpleak i&amount=9001&for=JenniferEllison  If the user is authenticated and the site is vulnerable to XSRF, then Jennifer Ellison is about to get over nine thousand pounds from Purple Aki  “But surely this is just a browser/local user issue?”
  • 23. Cross Site Request Forgery (XSRF)  Well, yes and no…  The user has to be authenticated on their local machine and have a valid cookie.  But… consider the following code.  <img href=http://bankofliverpool.com/transfer?acount=pur pleaki&amount=9001&for=JenniferEllison>  Now, this isn’t a valid image… But the browser will still call that URL.
  • 24. Going on from here…  This is going to be the last I’m going to talk about when it comes to vulnerability discovery…  It’s a huge field.  Web Application Hackers Handbook is a good place to start…  DVWA is a great sandboxed environment where you can use offensive security testing techniques.  A lot of testing can be automated and there are various firefox/Chrome plugins which do a lot of the legwork.
  • 25. Going on from here  OWASP is a group dedicated to web app security.  They meet fairly often in these parts and entrance is free.  Read the OWASP Top 10. Just do it.
  • 26. Another valid point…  It’s generally frowned upon to test systems that don’t belong to you.  Don’t do it, unless you have permission, or you like prison food.
  • 27. Mitigation  A good offense is generally the best defence…  Your best is often not good enough, especially against a really motivated hacker.  Web Application firewalls are a solid line of defence against many attacks.  Trustwave’s ModSecurity is very, very good.
  • 28. Mitigation  There’s no point reinforcing a door if you’re going to leave the windows open.  Ensure that the underlying infrastructure is regularly patched, you have an IDS (Snort is free and very, very good) and you reduce the surface of attack by turning off services you don’t need and running a firewall.
  • 29. Responsible vulnerability disclosure…  We’re all geeks. We’re curious. I know some of you will discard my valid point I made earlier.  Full Disclosure is bad. Very bad.  Responsible disclosure is good. Very good.  Upsploit.com is a good resource for handling vulnerability disclosure.
  • 30. Keep in touch?  Twitter.com/matthewhughes  me@matthewhughes.co.uk  Facebook.com/matthewjhughes  Matthewhughes.co.uk
  • 31. Thank you!  Any questions?