SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Security of
Web Applications
   TOP 6 RISKS TO AVOID
Console.WriteLine(“Hello World”);


 I'm Audrius Kovalenko

 .NET Developer

 Hack for fun


 @slicklash

 http://www.notreallycode.com
Forecasts for Upcoming Years


         VERY CLOUDY


         SaaS GROWTH


WEB APPLICATIONS IN HIGH-DEMAND
Web Application Security Today
                                 Distribution of Attack Methods in 2011




Source: Web Hacking Incident Database (WHID)
Puzzle

How to pour all liquid into the glass?
IMPOSSIBLE

Everyone knows it
How to deliver secure product knowing
   little about application security?

If that's my bag                           Who's bag is it then?


                                                  CSRF ruce
                                                      B      r
  Agile                 Steve
                              an                  XSS Schneie
       Martin           Freem
                                                 Troy HD M
              r
       Fowle                 TDD
        Ken                                      Hunt      oo
           t       REST Design                               re
       Bec             Patt
                            erns
          k                                        Mi
           ring                                  Za cha
    Refacto                                        l ew ł     SQLi
                             DI




                                                       sk
                                                          i

                            Builder vs Breaker
Problem




We don't know what we don't know
The Unknowns


      WHAT TO LOOK FOR?


  WHAT ARE THE MAJOR RISKS?


WHAT ARE THE COUNTERMEASURES?
CWE/SANS Top 25
Most Dangerous Software Errors




       https://cwe.mitre.org/top25
Open Web Application Security Project



             OWASP
              https://www.owasp.org
What is a risk anyway?
The OWASP Top 10 6 Web Risks

A1 INJECTION



A2 CROSS SITE SCRIPTING (XSS)



A3 BROKEN AUTHENTICATION AND SESSION MANAGEMENT



A4 INSECURE DIRECT OBJECT REFERENCES



A5 CROSS SITE REQUEST FORGERY (CSRF)


A6 SECURITY MISCONFIGURATION
Injections

Breaking out of a data context into a code context



       Why is SQLi still around?
Injections (2)


var catId = Request.QueryString["Category"];
var sql = "SELECT * FROM Products WHERE [CategoryId] = " + catId;
Anti-Injection


        ORM


PARAMETERIZED QUERIES


    DON'T BE LAZY
Cross Site Scripting (XSS)
   Injection of client-side code into Web pages
               viewed by other users

public static MvcHtmlString DeviceInfoEvil(this HtmlHelper helper)
{
    string s = "<span>" + helper.ViewContext.HttpContext.Request.UserAgent + "</span>";
    return MvcHtmlString.Create(s);
}

[...]

Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5;)<script>alert(1);</script>

[...]


public static MvcHtmlString DeviceInfoGood(this HtmlHelper helper)
{
    TagBuilder userAgent = new TagBuilder("span");
    userAgent.SetInnerText(helper.ViewContext.HttpContext.Request.UserAgent);
    return MvcHtmlString.Create(userAgent.ToString());
}
Cross Site Request Forgery (CSRF)

    Forged requests executed by tricking
            authenticated victim


   <img src="https://bank.com/smth?param=1" />

   <iframe src="https://bank.com/smth?param=1" />

   <body onload="document.forms[0].submit">
     <form method="post" action="https://bank.com/smth">
         <input type="hidden" name="param" value="1" />
     </form>
   </body>
Anti-XSS


  INPUT FILTERING


 OUTPUT FILTERING


 MICROSOFT AntiXSS


ANTIFORGERY TOKENS
Broken Authentication and
       Session Management

         Poor implementation of
 authentication and session management




6.5 MILLION HASHES          450 000 PASSWORDS


   PLAIN SHA1                  PLAIN TEXT




    June 2012                   July 2012
Be careful

DON'T REINVENT THE WHEEL


NO HARDCODED “SHORTCUTS”
     OUTPUT FILTERING      Use #if DEBUG


 HASH + SALT + STRECHING    bcrypt/scrypt


          TLS

       https://www.cookiecadger.com
Insecure Direct Object References

 Unauthorized access of exposed reference
       to an internal implementation




         MASS ASSIGNMENT VULNERABILITY
Insecure Direct Object References (2)
  public class User
  {
      public string UserName { get; set; }
      public bool IsAdmin { get; set; }
  }



  [Authorize]
  [AcceptVerbs(HttpVerbs.Post)]
  public ActionResult UpdateUser(User model)
  {
      if (ModelState.IsValid)
      {
          var user = db.Users.Single(u => u.UserName == model.UserName);
          if (TryUpdateModel(user))
          {
              db.SaveChanges();
          }
      }
      return View();
  }
Insecure Direct Object References (3)

public ActionResult UpdateUser([Bind(Exclude="IsAdmin")] User model) //Black Listing - NO

[...]

public ActionResult UpdateUser([Bind(Include="UserName")] User model) //White Listing – OK

[...]

public class UserViewModel //Secure by Design - BEST
{
    public string UserName { get; set; }
}
Countermeasures

    NO COPY-PASTE


   ACCESS CHECKS


    CODE REVIEWS
Security Misconfiguration

Improper application configuration
Web.Config Security Analyzer




  https://sourceforge.net/projects/wcsa
Introducing in development

                            ?

     DEDICATED PERSON


     SPECIAL TRAINING


       SELF TRAINING      LEARN

                         PRACTICE

                        UNDERSTAND
Common Excuses

NO ONE WILL HACK US   Ignorance



 TIGHT DEADLINESS      Budget
The Real Issue

WRONG PERSON IN WRONG PLACE      Architect

                                 Manager

                              Lazy Co-Worker
Security is hard but possible
      when you know
Don't forget
Drowning is your personal problem
Further Reading
Highly Recommended

ACADEMIC




                         HACKER




       ENTERPRISE
Learning From The Breakers


       Hacking Illustrated
        Video from Security Conferences

        http://www.irongeek.com

Weitere ähnliche Inhalte

Was ist angesagt?

Web Single sign on system
Web Single sign on systemWeb Single sign on system
Web Single sign on systemSwati Sinha
 
Authentication and Single Sing on
Authentication and Single Sing onAuthentication and Single Sing on
Authentication and Single Sing onguest648519
 
Identity Management Overview: CAS and Shibboleth
Identity Management Overview: CAS and ShibbolethIdentity Management Overview: CAS and Shibboleth
Identity Management Overview: CAS and ShibbolethAndrew Petro
 
Peeples authentication authorization_services_with_saml_xacml_with_jboss_eap6
Peeples authentication authorization_services_with_saml_xacml_with_jboss_eap6Peeples authentication authorization_services_with_saml_xacml_with_jboss_eap6
Peeples authentication authorization_services_with_saml_xacml_with_jboss_eap6Kenneth Peeples
 
CAS Enhancement
CAS EnhancementCAS Enhancement
CAS EnhancementGuo Albert
 
Presentation sso design_security
Presentation sso design_securityPresentation sso design_security
Presentation sso design_securityMarco Morana
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetShivanand Arur
 
Spring security4.x
Spring security4.xSpring security4.x
Spring security4.xZeeshan Khan
 
Fast and Free SSO: A Survey of Open-Source Solutions to Single Sign-on
Fast and Free SSO: A Survey of Open-Source Solutions to Single Sign-onFast and Free SSO: A Survey of Open-Source Solutions to Single Sign-on
Fast and Free SSO: A Survey of Open-Source Solutions to Single Sign-onCraig Dickson
 
Security Threats and Solutions of Cloud Computing
Security Threats and Solutions of Cloud ComputingSecurity Threats and Solutions of Cloud Computing
Security Threats and Solutions of Cloud ComputingKartik Shenoy
 
Single sign on (SSO) How does your company apply?
Single sign on (SSO) How does your company apply?Single sign on (SSO) How does your company apply?
Single sign on (SSO) How does your company apply?Đỗ Duy Trung
 
CAS state of the project: Open Apereo 2015
CAS state of the project: Open Apereo 2015CAS state of the project: Open Apereo 2015
CAS state of the project: Open Apereo 2015Misagh Moayyed
 
Asp.net membership anduserroles_ppt
Asp.net membership anduserroles_pptAsp.net membership anduserroles_ppt
Asp.net membership anduserroles_pptShivanand Arur
 
Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?Anil Saldanha
 

Was ist angesagt? (20)

Atelier Technique - F5 - #ACSS2019
Atelier Technique - F5 - #ACSS2019Atelier Technique - F5 - #ACSS2019
Atelier Technique - F5 - #ACSS2019
 
Web Single sign on system
Web Single sign on systemWeb Single sign on system
Web Single sign on system
 
Authentication and Single Sing on
Authentication and Single Sing onAuthentication and Single Sing on
Authentication and Single Sing on
 
Identity Management Overview: CAS and Shibboleth
Identity Management Overview: CAS and ShibbolethIdentity Management Overview: CAS and Shibboleth
Identity Management Overview: CAS and Shibboleth
 
Peeples authentication authorization_services_with_saml_xacml_with_jboss_eap6
Peeples authentication authorization_services_with_saml_xacml_with_jboss_eap6Peeples authentication authorization_services_with_saml_xacml_with_jboss_eap6
Peeples authentication authorization_services_with_saml_xacml_with_jboss_eap6
 
CAS Enhancement
CAS EnhancementCAS Enhancement
CAS Enhancement
 
Presentation sso design_security
Presentation sso design_securityPresentation sso design_security
Presentation sso design_security
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.Net
 
Mini-Training: SSO with Windows Identity Foundation
Mini-Training: SSO with Windows Identity FoundationMini-Training: SSO with Windows Identity Foundation
Mini-Training: SSO with Windows Identity Foundation
 
Spring security4.x
Spring security4.xSpring security4.x
Spring security4.x
 
Fast and Free SSO: A Survey of Open-Source Solutions to Single Sign-on
Fast and Free SSO: A Survey of Open-Source Solutions to Single Sign-onFast and Free SSO: A Survey of Open-Source Solutions to Single Sign-on
Fast and Free SSO: A Survey of Open-Source Solutions to Single Sign-on
 
Security Threats and Solutions of Cloud Computing
Security Threats and Solutions of Cloud ComputingSecurity Threats and Solutions of Cloud Computing
Security Threats and Solutions of Cloud Computing
 
Single sign on (SSO) How does your company apply?
Single sign on (SSO) How does your company apply?Single sign on (SSO) How does your company apply?
Single sign on (SSO) How does your company apply?
 
OWASP
OWASPOWASP
OWASP
 
Saml sso by Tamil on nullblrmeet 21st July 2015
Saml sso by Tamil on nullblrmeet 21st July 2015Saml sso by Tamil on nullblrmeet 21st July 2015
Saml sso by Tamil on nullblrmeet 21st July 2015
 
SINGLE SIGN-ON
SINGLE SIGN-ONSINGLE SIGN-ON
SINGLE SIGN-ON
 
CAS state of the project: Open Apereo 2015
CAS state of the project: Open Apereo 2015CAS state of the project: Open Apereo 2015
CAS state of the project: Open Apereo 2015
 
Asp.net membership anduserroles_ppt
Asp.net membership anduserroles_pptAsp.net membership anduserroles_ppt
Asp.net membership anduserroles_ppt
 
Single sign on
Single sign onSingle sign on
Single sign on
 
Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?
 

Ähnlich wie Security of Web Applications: Top 6 Risks To Avoid

Securing Your BBC Identity
Securing Your BBC IdentitySecuring Your BBC Identity
Securing Your BBC IdentityMarc Littlemore
 
Blue team reboot - HackFest
Blue team reboot - HackFest Blue team reboot - HackFest
Blue team reboot - HackFest Haydn Johnson
 
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
 
The Principles of Secure Development - David Rook
The Principles of Secure Development - David RookThe Principles of Secure Development - David Rook
The Principles of Secure Development - David RookSecurity B-Sides
 
Jan 2008 Allup
Jan 2008 AllupJan 2008 Allup
Jan 2008 Allupllangit
 
OWASPTop 10
OWASPTop 10OWASPTop 10
OWASPTop 10InnoTech
 
2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIAguestfdcb8a
 
Problems with parameters b sides-msp
Problems with parameters b sides-mspProblems with parameters b sides-msp
Problems with parameters b sides-mspMike Saunders
 
AllDayDevOps Security Chaos Engineering 2019
AllDayDevOps Security Chaos Engineering 2019 AllDayDevOps Security Chaos Engineering 2019
AllDayDevOps Security Chaos Engineering 2019 Aaron Rinehart
 
Security Best Practices
Security Best PracticesSecurity Best Practices
Security Best PracticesClint Edmonson
 
Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008abhijitapatil
 
Cisco Connect Toronto 2017 - Security Through The Eyes of a Hacker
Cisco Connect Toronto 2017 -  Security Through The Eyes of a HackerCisco Connect Toronto 2017 -  Security Through The Eyes of a Hacker
Cisco Connect Toronto 2017 - Security Through The Eyes of a HackerCisco Canada
 
Web security leeds sharp dot netnotts
Web security leeds sharp dot netnottsWeb security leeds sharp dot netnotts
Web security leeds sharp dot netnottsJohn Staveley
 
Dave Lewis - The Se7en Deadly Sins Of Web Security - Codemotion Berlin 2018
Dave Lewis - The Se7en Deadly Sins Of Web Security - Codemotion Berlin 2018Dave Lewis - The Se7en Deadly Sins Of Web Security - Codemotion Berlin 2018
Dave Lewis - The Se7en Deadly Sins Of Web Security - Codemotion Berlin 2018Codemotion
 
SQL Injection - The Unknown Story
SQL Injection - The Unknown StorySQL Injection - The Unknown Story
SQL Injection - The Unknown StoryImperva
 
How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?Graham Charters
 
Protecting Your Web Site From SQL Injection & XSS
Protecting Your Web SiteFrom SQL Injection & XSSProtecting Your Web SiteFrom SQL Injection & XSS
Protecting Your Web Site From SQL Injection & XSSskyhawk133
 

Ähnlich wie Security of Web Applications: Top 6 Risks To Avoid (20)

Securing Your BBC Identity
Securing Your BBC IdentitySecuring Your BBC Identity
Securing Your BBC Identity
 
Blue team reboot - HackFest
Blue team reboot - HackFest Blue team reboot - HackFest
Blue team reboot - HackFest
 
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...
 
The Principles of Secure Development - David Rook
The Principles of Secure Development - David RookThe Principles of Secure Development - David Rook
The Principles of Secure Development - David Rook
 
Jan 2008 Allup
Jan 2008 AllupJan 2008 Allup
Jan 2008 Allup
 
Starwest 2008
Starwest 2008Starwest 2008
Starwest 2008
 
Hackers vs developers
Hackers vs developersHackers vs developers
Hackers vs developers
 
OWASPTop 10
OWASPTop 10OWASPTop 10
OWASPTop 10
 
2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA
 
Problems with parameters b sides-msp
Problems with parameters b sides-mspProblems with parameters b sides-msp
Problems with parameters b sides-msp
 
AllDayDevOps Security Chaos Engineering 2019
AllDayDevOps Security Chaos Engineering 2019 AllDayDevOps Security Chaos Engineering 2019
AllDayDevOps Security Chaos Engineering 2019
 
PHPUG Presentation
PHPUG PresentationPHPUG Presentation
PHPUG Presentation
 
Security Best Practices
Security Best PracticesSecurity Best Practices
Security Best Practices
 
Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008
 
Cisco Connect Toronto 2017 - Security Through The Eyes of a Hacker
Cisco Connect Toronto 2017 -  Security Through The Eyes of a HackerCisco Connect Toronto 2017 -  Security Through The Eyes of a Hacker
Cisco Connect Toronto 2017 - Security Through The Eyes of a Hacker
 
Web security leeds sharp dot netnotts
Web security leeds sharp dot netnottsWeb security leeds sharp dot netnotts
Web security leeds sharp dot netnotts
 
Dave Lewis - The Se7en Deadly Sins Of Web Security - Codemotion Berlin 2018
Dave Lewis - The Se7en Deadly Sins Of Web Security - Codemotion Berlin 2018Dave Lewis - The Se7en Deadly Sins Of Web Security - Codemotion Berlin 2018
Dave Lewis - The Se7en Deadly Sins Of Web Security - Codemotion Berlin 2018
 
SQL Injection - The Unknown Story
SQL Injection - The Unknown StorySQL Injection - The Unknown Story
SQL Injection - The Unknown Story
 
How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?
 
Protecting Your Web Site From SQL Injection & XSS
Protecting Your Web SiteFrom SQL Injection & XSSProtecting Your Web SiteFrom SQL Injection & XSS
Protecting Your Web Site From SQL Injection & XSS
 

Kürzlich hochgeladen

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...apidays
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
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 AmsterdamUiPathCommunity
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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
 
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 challengesrafiqahmad00786416
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
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 businesspanagenda
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
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 WoodJuan lago vázquez
 
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 Pakistandanishmna97
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
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
 

Kürzlich hochgeladen (20)

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...
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
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
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 

Security of Web Applications: Top 6 Risks To Avoid

  • 1. Security of Web Applications TOP 6 RISKS TO AVOID
  • 2. Console.WriteLine(“Hello World”); I'm Audrius Kovalenko .NET Developer Hack for fun @slicklash http://www.notreallycode.com
  • 3. Forecasts for Upcoming Years VERY CLOUDY SaaS GROWTH WEB APPLICATIONS IN HIGH-DEMAND
  • 4. Web Application Security Today Distribution of Attack Methods in 2011 Source: Web Hacking Incident Database (WHID)
  • 5. Puzzle How to pour all liquid into the glass?
  • 7. How to deliver secure product knowing little about application security? If that's my bag Who's bag is it then? CSRF ruce B r Agile Steve an XSS Schneie Martin Freem Troy HD M r Fowle TDD Ken Hunt oo t REST Design re Bec Patt erns k Mi ring Za cha Refacto l ew ł SQLi DI sk i Builder vs Breaker
  • 8. Problem We don't know what we don't know
  • 9. The Unknowns WHAT TO LOOK FOR? WHAT ARE THE MAJOR RISKS? WHAT ARE THE COUNTERMEASURES?
  • 10. CWE/SANS Top 25 Most Dangerous Software Errors https://cwe.mitre.org/top25
  • 11. Open Web Application Security Project OWASP https://www.owasp.org
  • 12. What is a risk anyway?
  • 13. The OWASP Top 10 6 Web Risks A1 INJECTION A2 CROSS SITE SCRIPTING (XSS) A3 BROKEN AUTHENTICATION AND SESSION MANAGEMENT A4 INSECURE DIRECT OBJECT REFERENCES A5 CROSS SITE REQUEST FORGERY (CSRF) A6 SECURITY MISCONFIGURATION
  • 14. Injections Breaking out of a data context into a code context Why is SQLi still around?
  • 15. Injections (2) var catId = Request.QueryString["Category"]; var sql = "SELECT * FROM Products WHERE [CategoryId] = " + catId;
  • 16. Anti-Injection ORM PARAMETERIZED QUERIES DON'T BE LAZY
  • 17. Cross Site Scripting (XSS) Injection of client-side code into Web pages viewed by other users public static MvcHtmlString DeviceInfoEvil(this HtmlHelper helper) { string s = "<span>" + helper.ViewContext.HttpContext.Request.UserAgent + "</span>"; return MvcHtmlString.Create(s); } [...] Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5;)<script>alert(1);</script> [...] public static MvcHtmlString DeviceInfoGood(this HtmlHelper helper) { TagBuilder userAgent = new TagBuilder("span"); userAgent.SetInnerText(helper.ViewContext.HttpContext.Request.UserAgent); return MvcHtmlString.Create(userAgent.ToString()); }
  • 18. Cross Site Request Forgery (CSRF) Forged requests executed by tricking authenticated victim <img src="https://bank.com/smth?param=1" /> <iframe src="https://bank.com/smth?param=1" /> <body onload="document.forms[0].submit"> <form method="post" action="https://bank.com/smth"> <input type="hidden" name="param" value="1" /> </form> </body>
  • 19. Anti-XSS INPUT FILTERING OUTPUT FILTERING MICROSOFT AntiXSS ANTIFORGERY TOKENS
  • 20. Broken Authentication and Session Management Poor implementation of authentication and session management 6.5 MILLION HASHES 450 000 PASSWORDS PLAIN SHA1 PLAIN TEXT June 2012 July 2012
  • 21. Be careful DON'T REINVENT THE WHEEL NO HARDCODED “SHORTCUTS” OUTPUT FILTERING Use #if DEBUG HASH + SALT + STRECHING bcrypt/scrypt TLS https://www.cookiecadger.com
  • 22. Insecure Direct Object References Unauthorized access of exposed reference to an internal implementation MASS ASSIGNMENT VULNERABILITY
  • 23. Insecure Direct Object References (2) public class User { public string UserName { get; set; } public bool IsAdmin { get; set; } } [Authorize] [AcceptVerbs(HttpVerbs.Post)] public ActionResult UpdateUser(User model) { if (ModelState.IsValid) { var user = db.Users.Single(u => u.UserName == model.UserName); if (TryUpdateModel(user)) { db.SaveChanges(); } } return View(); }
  • 24. Insecure Direct Object References (3) public ActionResult UpdateUser([Bind(Exclude="IsAdmin")] User model) //Black Listing - NO [...] public ActionResult UpdateUser([Bind(Include="UserName")] User model) //White Listing – OK [...] public class UserViewModel //Secure by Design - BEST { public string UserName { get; set; } }
  • 25. Countermeasures NO COPY-PASTE ACCESS CHECKS CODE REVIEWS
  • 27. Web.Config Security Analyzer https://sourceforge.net/projects/wcsa
  • 28. Introducing in development ? DEDICATED PERSON SPECIAL TRAINING SELF TRAINING LEARN PRACTICE UNDERSTAND
  • 29. Common Excuses NO ONE WILL HACK US Ignorance TIGHT DEADLINESS Budget
  • 30. The Real Issue WRONG PERSON IN WRONG PLACE Architect Manager Lazy Co-Worker
  • 31. Security is hard but possible when you know
  • 32. Don't forget Drowning is your personal problem
  • 34. Highly Recommended ACADEMIC HACKER ENTERPRISE
  • 35. Learning From The Breakers Hacking Illustrated Video from Security Conferences http://www.irongeek.com