SlideShare a Scribd company logo
Alan Kan Technical Manager IBM Rational Software [email_address] Get Ready for Web Application Security Testing
Run Down The Security Landscape What does it mean for Testing Professionals A Few Top Attacks and How to Test for Them What You Can Do to Prepare for Security Testing
 
 
 
The Web Ecosystem (Simplified)
 
 
LexisNexis Data Breach - Washington Post Feb 17, 2008 IndiaTimes.com Malware — InformationWeek Feb 17,2008 Hacker breaks into Ecuador’s presidential website —  Thaindian, Feb 11, 2008 Hacking Stage 6 —  Wikipedia, Feb 9 2007 Hacker steals Davidson Cos client data -  Falls Tribune, Feb 4 2008 RIAA wiped off the Net —  TheRegister, Jan 20 2008 Chinese hacker steals 18M identities - HackBase.com, Feb 10,2008 Mac blogs defaced by XSS The Register, Feb 17,  2008 Your Free MacWorld Expo Platinum Pass —  CNet, Jan 14, 2008   Hacker takes down Pennsylvania gvmt —  AP, Jan 6, 2008 Drive-by Pharming in the Wild —  Symantec, Jan 21 2008 Italian Bank hit by XSS fraudsters —  Netcraft, Jan 8 2008 Greek Ministry websites hit by hacker intrusion —  eKathimerini, Jan 31,2008
“ JB Hi-Fi's websites in Australia and New Zealand were redirecting customers to malicious web pages over the weekend in a cyber attack  ” stuff.co.nz  01/12/2009  “ Turkish defacers broke into the New Zealand based registrar Domainz.net …Companies which had their New Zealand web sites defaced include Microsoft, HSBC, Coca-Cola, F-secure, Bitdefender, Sony and Xerox   ” zone-h.org/news/id/4708  21/04/2009   “ Security Intelligence Service director Warren Tucker revealed government department websites had been attacked and information stolen ” nzherald.co.nz 12/09/2007  “ A florist which does all of its business online has had its website targeted by hackers and customers' credit card details have been stolen” abc.net.au 16/9/2007  “ Computer hackers have cracked the defences of dozens of top government and business sector internet sites this year, raising concerns about the safety of consumers' financial and personal information”  SMH.com.au 14/10/ 2007 What about in this part of the world?
 
 
Web Application Security is Neglected of all attacks on Information Security are directed to the Web Application Layer 75% of all Web Applications are vulnerable 2/3 Network Server Web Applications % of Attacks % of Dollars 75% 10% 25% 90% Security Spending
Run Down The Security Landscape What does it mean for Testing Professionals A Few Top Attacks and How to Test for Them What You Can Do to Prepare for Security Testing
Secure Applications – Who is Responsible? System Administrator? Network Administrator? Security Professional? Solution Architect? Developers? Testing Professional?
The Trend – Incorporate Security into Testing Developers SDLC Developers Developers Incorporate Security as part of Testing Ensure vulnerabilities are addressed before applications are put into production Build Coding QA Security Production
Security Testing Steps are not that different from usual Identify possible vulnerability Prove vulnerability Assess risk, scope, depth, severity and impact Create repeatable tests  Test migitation, and fixes
Run Down The Security Landscape What does it mean for Testing Professionals A Few Top Attacks and How to Test for Them What You Can Do to Prepare for Security Testing
OWASP and the OWASP Top 10 list Open Web Application Security Project – an open organization dedicated to fight insecure software “The OWASP Top Ten document represents a broad consensus about what the most critical web application security flaws are”
 
1 - Injection Flaws What is it? User-supplied data is sent to an interpreter as part of a command, query or data. What are the implications? SQL Injection – Access/modify data in DB SSI Injection – Execute commands on server and access sensitive data LDAP Injection – Bypass authentication …
SQL Injection User input inserted into SQL Command: Get product details by id: Select * from products where id=‘ $REQUEST[“id”] ’; Hack: send param id with value  ‘ or ‘1’=‘1 Resulting executed SQL: Select * from products where id=‘ ’ or ‘1’=‘1 ’ All products returned
SQL Injection Example I
SQL Injection Example II
SQL Injection Example - Exploit
SQL Injection Example - Outcome
Injection Flaws (SSI Injection Example)  Creating commands from input
The return is the private SSL key of the server
2. Cross-Site Scripting (XSS) What is it? Malicious script echoed back into HTML returned from a trusted site, and runs under trusted context What are the implications? Session Tokens stolen (browser security circumvented) Complete page content compromised Future pages in browser compromised
Cross Site Scripting – The Exploit Process Evil.org User bank.com 1) Link to bank.com sent to user via E-mail or HTTP 2) User sends script embedded as data 3) Script/data returned, executed by browser 4) Script sends user’s cookie and session    information without the user’s    consent or knowledge 5) Evil.org uses stolen session information to impersonate user
XSS Example I HTML code:
XSS Example II HTML code:
4 - Insecure Direct Object Reference What is it? Part or all of a resource (file, table, etc.) name controlled by user input. What are the implications? Access to sensitive resources Information Leakage, aids future hacks
Insecure Direct Object Reference - Example
Insecure Direct Object Reference – Example Cont.
Insecure Direct Object Reference – Example Cont.
Run Down The Security Landscape What does it mean for Testing Professionals A Few Top Attacks and How to Test for Them What You Can Do to Prepare for Security Testing
Get Educated on the Topic Beware of legal issues Create a Sandpit envrionment Know the latest trends – IBM X-Force Threat Reports http://www-935.ibm.com/services/nz/iss/xforce/trendreports/ Study pass and current exploits – US Computer Emergency Readiness Team http://www.kb.cert.org/vuls Learn how to test for the vulnerabilities - OWASP Testing guide http://www.owasp.org/index.php/OWASP_Testing_Guide_v3_Table_of_Contents Learn the syntax of operating system, databases, programming code Experiemnet with Tools – Web Scarab http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project Experiment with Tools – IBM Rational AppScan http ://www-01.ibm.com/software/rational/offerings/websecurity/webappsecurity.html
How Does Automated Tool Work?
Get Tools – which ones? Automated vs Manual Do it a lot quicker in a shorter timeframe Regression tests Recommendations Security-specific vs general automated testing tool Time it takes to become a security expert Time it takes to learn coding Time it takes to create report templates Fix recommendations Hard to reach places – Malware, Flash Still needs a human being to validate results Commercial vs Free tools It costs  Regular updates Usability, Quality
Tools Manual Testing OWASP WebScarab http://www.owasp.org/index.php/Category:OWASP_Project Firebug http ://getfirebug.com Automated Testing IBM Rational AppScan http://www-01.ibm.com/software/rational/offerings/websecurity/webappsecurity.html
© Copyright IBM Corporation 2010.  All rights reserved.  The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied.  IBM shall not be responsible  for any damages arising out of the use of, or otherwise related to, these materials.  Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement  governing the use of IBM software. References in these materials  to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates.  Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, the on-demand business logo, Rational, the Rational logo, and other IBM products and services are trademarks of the International Business Machines Corporation,  in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.
IBM Rational AppScan The undisputed market leader Ranked #1 in Market Share by IDC #1 in numerous industry “bake offs” Automatically scans web applications for vulnerabilities SQL Injection Cross-site Scripting Provides clear recommendations on how to fix them i.e. Character sanitization The Result? Improved security, lower costs, and the ability to meet PCI standards for application security

More Related Content

PDF
The Complete Web Application Security Testing Checklist
PDF
Testing Web Application Security
PPT
Step by step guide for web application security testing
PPTX
Security testing
PPTX
Security testing
PPTX
Security Testing for Web Application
PPT
Web Application Security
PPTX
Security Testing Training With Examples
The Complete Web Application Security Testing Checklist
Testing Web Application Security
Step by step guide for web application security testing
Security testing
Security testing
Security Testing for Web Application
Web Application Security
Security Testing Training With Examples

What's hot (20)

PDF
Web Application Security Testing Tools
PDF
Security testing presentation
PDF
Web Application Security 101
PPT
Introduction to Web Application Penetration Testing
PPS
Security testing
PPT
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
PDF
Introduction to Application Security Testing
PPTX
Owasp first5 presentation
PDF
Security-testing presentation
PDF
Owasp top 10
PPTX
PPT
Security Testing
PDF
PPTX
Owasp top 10 2017
PPTX
Web Application Penetration Testing Introduction
PPT
Web Application Security
PPTX
The bare minimum that you should know about web application security testing ...
PDF
Introduction to Security Testing
PPT
IBM AppScan Standard - The Web Application Security Solution
PPTX
Owasp top 10 security threats
Web Application Security Testing Tools
Security testing presentation
Web Application Security 101
Introduction to Web Application Penetration Testing
Security testing
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Introduction to Application Security Testing
Owasp first5 presentation
Security-testing presentation
Owasp top 10
Security Testing
Owasp top 10 2017
Web Application Penetration Testing Introduction
Web Application Security
The bare minimum that you should know about web application security testing ...
Introduction to Security Testing
IBM AppScan Standard - The Web Application Security Solution
Owasp top 10 security threats
Ad

Viewers also liked (20)

PDF
Improve the Security of Your Application Portfolio in a Few Days with On-Dema...
PDF
Web application security & Testing
PPTX
Mobile App Security: Enterprise Checklist
PPT
Web Application Security Testing
PPTX
Security testing fundamentals
PPTX
Story Testing Approach for Enterprise Applications using Selenium Framework
PPTX
Next level of Appium
PPTX
Automate you Appium test like a pro!
PPTX
Gerrit is Getting Native with RPM, Deb and Docker
PPTX
Introduction to Bdd and cucumber
PDF
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
PDF
Testing Microservices with a Citrus twist
PDF
Capybara testing
PPTX
Testing Java EE apps with Arquillian
PDF
Bdd (Behavior Driven Development)
PPTX
Workshop calabash appium
PDF
Lunch and learn: Cucumber and Capybara
PDF
Arquillian & Citrus
PPTX
Pruebas funcionales de Software
PPTX
Automated Acceptance Tests & Tool choice
Improve the Security of Your Application Portfolio in a Few Days with On-Dema...
Web application security & Testing
Mobile App Security: Enterprise Checklist
Web Application Security Testing
Security testing fundamentals
Story Testing Approach for Enterprise Applications using Selenium Framework
Next level of Appium
Automate you Appium test like a pro!
Gerrit is Getting Native with RPM, Deb and Docker
Introduction to Bdd and cucumber
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
Testing Microservices with a Citrus twist
Capybara testing
Testing Java EE apps with Arquillian
Bdd (Behavior Driven Development)
Workshop calabash appium
Lunch and learn: Cucumber and Capybara
Arquillian & Citrus
Pruebas funcionales de Software
Automated Acceptance Tests & Tool choice
Ad

Similar to Get Ready for Web Application Security Testing (20)

PPT
Web Application Testing for Today’s Biggest and Emerging Threats
PPT
How PCI And PA DSS will change enterprise applications
PDF
Security in the cloud protecting your cloud apps
PDF
Sql Injection Attacks And A Web Application Environment
PDF
Solvay secure application layer v2015 seba
PPT
Bank One App Sec Training
PPTX
Security risks awareness
PPT
IBM AppScan - the total software security solution
PDF
Essentials of Web Application Security: what it is, why it matters and how to...
PDF
Social Enterprise Rises! …and so are the Risks - DefCamp 2012
PDF
Web Application Security Testing Guide | Secure Web Apps
PPTX
We cant hack ourselves secure
PPTX
Web Application Security
PPT
Developing Secure Applications and Defending Against Common Attacks
PDF
IRJET - Web Vulnerability Scanner
PDF
C01461422
PPT
Presentación AMIB Los Cabos
KEY
EISA Considerations for Web Application Security
PDF
Are you fighting_new_threats_with_old_weapons
PDF
Cybersecurity update 12
Web Application Testing for Today’s Biggest and Emerging Threats
How PCI And PA DSS will change enterprise applications
Security in the cloud protecting your cloud apps
Sql Injection Attacks And A Web Application Environment
Solvay secure application layer v2015 seba
Bank One App Sec Training
Security risks awareness
IBM AppScan - the total software security solution
Essentials of Web Application Security: what it is, why it matters and how to...
Social Enterprise Rises! …and so are the Risks - DefCamp 2012
Web Application Security Testing Guide | Secure Web Apps
We cant hack ourselves secure
Web Application Security
Developing Secure Applications and Defending Against Common Attacks
IRJET - Web Vulnerability Scanner
C01461422
Presentación AMIB Los Cabos
EISA Considerations for Web Application Security
Are you fighting_new_threats_with_old_weapons
Cybersecurity update 12

More from Alan Kan (13)

PPTX
DevOps at Scale with Containers and the Cloud
PPTX
Accelerate Software Delivery with DevOps
PPT
Teaching with Cloud at Unitec
PPTX
Sharpening your test skills in the age of collaboration and automation
PPT
The Agile Revolution of IBM
PDF
IBM Collaborative Lifecycle Management
PPT
Rational Quality Manager
PPT
Software Delivery in the Web 2.0 Style
PPT
Understanding IBM Rational Asset Manager
PPT
Define and Manage Requirements with IBM Rational Requirements Composer
PPT
Business and IT alignment through effective Project & Program Portfolio Manag...
PPT
Business and IT alignment through effective Project & Program Portfolio Manag...
PPT
How Does IBM Do Agile
DevOps at Scale with Containers and the Cloud
Accelerate Software Delivery with DevOps
Teaching with Cloud at Unitec
Sharpening your test skills in the age of collaboration and automation
The Agile Revolution of IBM
IBM Collaborative Lifecycle Management
Rational Quality Manager
Software Delivery in the Web 2.0 Style
Understanding IBM Rational Asset Manager
Define and Manage Requirements with IBM Rational Requirements Composer
Business and IT alignment through effective Project & Program Portfolio Manag...
Business and IT alignment through effective Project & Program Portfolio Manag...
How Does IBM Do Agile

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
cuic standard and advanced reporting.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Big Data Technologies - Introduction.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Electronic commerce courselecture one. Pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Unlocking AI with Model Context Protocol (MCP)
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
20250228 LYD VKU AI Blended-Learning.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
cuic standard and advanced reporting.pdf
Spectral efficient network and resource selection model in 5G networks
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
Big Data Technologies - Introduction.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Electronic commerce courselecture one. Pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Get Ready for Web Application Security Testing

  • 1. Alan Kan Technical Manager IBM Rational Software [email_address] Get Ready for Web Application Security Testing
  • 2. Run Down The Security Landscape What does it mean for Testing Professionals A Few Top Attacks and How to Test for Them What You Can Do to Prepare for Security Testing
  • 3.  
  • 4.  
  • 5.  
  • 6. The Web Ecosystem (Simplified)
  • 7.  
  • 8.  
  • 9. LexisNexis Data Breach - Washington Post Feb 17, 2008 IndiaTimes.com Malware — InformationWeek Feb 17,2008 Hacker breaks into Ecuador’s presidential website — Thaindian, Feb 11, 2008 Hacking Stage 6 — Wikipedia, Feb 9 2007 Hacker steals Davidson Cos client data - Falls Tribune, Feb 4 2008 RIAA wiped off the Net — TheRegister, Jan 20 2008 Chinese hacker steals 18M identities - HackBase.com, Feb 10,2008 Mac blogs defaced by XSS The Register, Feb 17, 2008 Your Free MacWorld Expo Platinum Pass — CNet, Jan 14, 2008 Hacker takes down Pennsylvania gvmt — AP, Jan 6, 2008 Drive-by Pharming in the Wild — Symantec, Jan 21 2008 Italian Bank hit by XSS fraudsters — Netcraft, Jan 8 2008 Greek Ministry websites hit by hacker intrusion — eKathimerini, Jan 31,2008
  • 10. “ JB Hi-Fi's websites in Australia and New Zealand were redirecting customers to malicious web pages over the weekend in a cyber attack ” stuff.co.nz 01/12/2009 “ Turkish defacers broke into the New Zealand based registrar Domainz.net …Companies which had their New Zealand web sites defaced include Microsoft, HSBC, Coca-Cola, F-secure, Bitdefender, Sony and Xerox ” zone-h.org/news/id/4708 21/04/2009 “ Security Intelligence Service director Warren Tucker revealed government department websites had been attacked and information stolen ” nzherald.co.nz 12/09/2007 “ A florist which does all of its business online has had its website targeted by hackers and customers' credit card details have been stolen” abc.net.au 16/9/2007 “ Computer hackers have cracked the defences of dozens of top government and business sector internet sites this year, raising concerns about the safety of consumers' financial and personal information” SMH.com.au 14/10/ 2007 What about in this part of the world?
  • 11.  
  • 12.  
  • 13. Web Application Security is Neglected of all attacks on Information Security are directed to the Web Application Layer 75% of all Web Applications are vulnerable 2/3 Network Server Web Applications % of Attacks % of Dollars 75% 10% 25% 90% Security Spending
  • 14. Run Down The Security Landscape What does it mean for Testing Professionals A Few Top Attacks and How to Test for Them What You Can Do to Prepare for Security Testing
  • 15. Secure Applications – Who is Responsible? System Administrator? Network Administrator? Security Professional? Solution Architect? Developers? Testing Professional?
  • 16. The Trend – Incorporate Security into Testing Developers SDLC Developers Developers Incorporate Security as part of Testing Ensure vulnerabilities are addressed before applications are put into production Build Coding QA Security Production
  • 17. Security Testing Steps are not that different from usual Identify possible vulnerability Prove vulnerability Assess risk, scope, depth, severity and impact Create repeatable tests Test migitation, and fixes
  • 18. Run Down The Security Landscape What does it mean for Testing Professionals A Few Top Attacks and How to Test for Them What You Can Do to Prepare for Security Testing
  • 19. OWASP and the OWASP Top 10 list Open Web Application Security Project – an open organization dedicated to fight insecure software “The OWASP Top Ten document represents a broad consensus about what the most critical web application security flaws are”
  • 20.  
  • 21. 1 - Injection Flaws What is it? User-supplied data is sent to an interpreter as part of a command, query or data. What are the implications? SQL Injection – Access/modify data in DB SSI Injection – Execute commands on server and access sensitive data LDAP Injection – Bypass authentication …
  • 22. SQL Injection User input inserted into SQL Command: Get product details by id: Select * from products where id=‘ $REQUEST[“id”] ’; Hack: send param id with value ‘ or ‘1’=‘1 Resulting executed SQL: Select * from products where id=‘ ’ or ‘1’=‘1 ’ All products returned
  • 27. Injection Flaws (SSI Injection Example) Creating commands from input
  • 28. The return is the private SSL key of the server
  • 29. 2. Cross-Site Scripting (XSS) What is it? Malicious script echoed back into HTML returned from a trusted site, and runs under trusted context What are the implications? Session Tokens stolen (browser security circumvented) Complete page content compromised Future pages in browser compromised
  • 30. Cross Site Scripting – The Exploit Process Evil.org User bank.com 1) Link to bank.com sent to user via E-mail or HTTP 2) User sends script embedded as data 3) Script/data returned, executed by browser 4) Script sends user’s cookie and session information without the user’s consent or knowledge 5) Evil.org uses stolen session information to impersonate user
  • 31. XSS Example I HTML code:
  • 32. XSS Example II HTML code:
  • 33. 4 - Insecure Direct Object Reference What is it? Part or all of a resource (file, table, etc.) name controlled by user input. What are the implications? Access to sensitive resources Information Leakage, aids future hacks
  • 34. Insecure Direct Object Reference - Example
  • 35. Insecure Direct Object Reference – Example Cont.
  • 36. Insecure Direct Object Reference – Example Cont.
  • 37. Run Down The Security Landscape What does it mean for Testing Professionals A Few Top Attacks and How to Test for Them What You Can Do to Prepare for Security Testing
  • 38. Get Educated on the Topic Beware of legal issues Create a Sandpit envrionment Know the latest trends – IBM X-Force Threat Reports http://www-935.ibm.com/services/nz/iss/xforce/trendreports/ Study pass and current exploits – US Computer Emergency Readiness Team http://www.kb.cert.org/vuls Learn how to test for the vulnerabilities - OWASP Testing guide http://www.owasp.org/index.php/OWASP_Testing_Guide_v3_Table_of_Contents Learn the syntax of operating system, databases, programming code Experiemnet with Tools – Web Scarab http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project Experiment with Tools – IBM Rational AppScan http ://www-01.ibm.com/software/rational/offerings/websecurity/webappsecurity.html
  • 39. How Does Automated Tool Work?
  • 40. Get Tools – which ones? Automated vs Manual Do it a lot quicker in a shorter timeframe Regression tests Recommendations Security-specific vs general automated testing tool Time it takes to become a security expert Time it takes to learn coding Time it takes to create report templates Fix recommendations Hard to reach places – Malware, Flash Still needs a human being to validate results Commercial vs Free tools It costs Regular updates Usability, Quality
  • 41. Tools Manual Testing OWASP WebScarab http://www.owasp.org/index.php/Category:OWASP_Project Firebug http ://getfirebug.com Automated Testing IBM Rational AppScan http://www-01.ibm.com/software/rational/offerings/websecurity/webappsecurity.html
  • 42. © Copyright IBM Corporation 2010. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, the on-demand business logo, Rational, the Rational logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.
  • 43. IBM Rational AppScan The undisputed market leader Ranked #1 in Market Share by IDC #1 in numerous industry “bake offs” Automatically scans web applications for vulnerabilities SQL Injection Cross-site Scripting Provides clear recommendations on how to fix them i.e. Character sanitization The Result? Improved security, lower costs, and the ability to meet PCI standards for application security

Editor's Notes

  • #22: Injection flaws occur when user supplied data, is sent to an interpreter as a part of a command, query or data. The main issue here is that user input is not sanitized, and is embedded in pre-existing commands. Injection flaws can occur in: SQL queries (known as SQL Injection) Server Side Includes (execute commands on the web server) LDAP queries – used to bypass authentication
  • #23: SQL Injection occurs when user input is embedded as-is inside a pre-built SQL query. For example: Let’s assume that our web application receives a product ID as input, and presents that product’s page. The SQL query looks like this: “ Select * from products where id=‘” + $REQUEST[‘id’]; You should note, that the query is basically a text string, and user input is concatenated to it. In this example, the user string is surrounded by apostrophes. Let’s take a look at what will happen if we submit the product ID value of ‘ or ‘’=‘ The query will be: SELECT * from products where id=‘’ or ‘’=‘’; You should pay attention to the fact that the WHERE criteria here is basically a Boolean TRUE. Since the results of this query matches every entry in the database, all the products will be returned.
  • #24: Let’s take a look at how SQL Injection can assist a hacker to bypass the login mechanism of a banking application: - First, in order to sense that SQL Injection is possible, the hacker will injection the character apostrophe (‘), as the user name
  • #25: This yields a very informative SQL error message, which helps the attacker to devise the next phase of the injection
  • #26: Now, the hacker attempts to send the username: ‘ or 1=1— Note: the apostrophe is used to close the string context in which our input is embedded in 1=1 is a Boolean TRUE -- is used in MS SQL to comment out everything after the – sign, so we don’t have to worry about the rest of the SQL query
  • #27: After sending this SQL injection payload, we will be logged into the application, as the first user in the user's table - without having to supply actual credentials.
  • #28: Comments at one level can be command at another
  • #30: A Cross Site Scripting attack, attempts to echo back a malicious script in the HTML returned from a trusted site. Since the script is echoed back from a trusted site, it runs in the context of that site. The implications of XSS are: Stealing HTTP session tokens Page content may be compromised (this may include “local” site defacement, or hijacking of the browser’s session using scripting) Future pages may be contaminated as well (by hijacking the session)
  • #31: Let’s take a look at the chain of events during a XSS attack The attack creates and sends the victim a link to bank.com (a trusted site). The link contains a search string (or any other string that is echoed back), which contains a malicious JavaScript code The victim, clicks on this link, since he/she trusts the bank.com web site The bank.com web application, echoes back the malicious JavaScript code inside the response page. This JavaScript is executed in the security context of bank.com, since it is echoed by from that site. This means that it has access to DOM elements belonging to this domain/session The malicious script, sends the current cookie and session information, without the victim’s consent, to the evil.org web site, where the hacker is waiting for it.
  • #32: Let’s take a look at the following banking web site – this site contains a search function, that allows users to search the site for specific text. If we type the string “asdf”, the response to the search will contain that string, inside the results page, in what we call “free HTML context”. What will happen if instead of typing “asdf”, we will type some JavaScript code? Let’s try to type the following JavaScript code: <script>alert(document.cookie)</script>
  • #33: As you can see – the piece of JavaScript code that we wrote, was echoed back by the site’s search function – since it was returned from the banking application, it had access to the Document Object Model (DOM), and could access the current session cookie. In this situation, I myself planted this JavaScript code in the web page, but in a XSS attack, it is the attacker who creates a link that contains the malicious JavaScript, and then sends this link to the victim. When the victim clicks on the link, the malicious JavaScript will be echoed back from the trusted site.
  • #34: In several scenarios, it may be possible for an attacker to manipulate the web application to disclose a resource such as a sensitive file. This can occur by either guessing a common file name and location and attempting to request it, or by manipulating a parameter value that is used to access a file, as will be seen in the next example. The implications of Insecure Direct Object Reference is usually information leakage or access to sensitive resources.
  • #35: In this example, we see that a web application that uses a parameter called “content”, which points to the contents of the page to be displayed. An attacker might attempt to manipulate the parameter value, from “business_deposit.htm”, which is the valid page, to some other file – for example, the Boot.ini which is a system file.
  • #36: The attempt failed, and the system disclosed that it only allows parameter value (file names) that end with either txt or htm as their file extension. Let’s try a little trick called “Poison Null Byte”, we’ll write the file we actually want to open which is Boot.ini, but append a NULL character and the extension the application is looking for (in this example .htm)
  • #37: Bingo! – we managed to circumvent the file extension validation, and open a sensitive system file. Using this technique, we can manipulate the application to hand us the contents of other, more sensitive files, such as databases, customer files, etc.
  • #43: Thank you!