TESTING FOR VULNERABILITIES AND APPLICATION SECURITY REVIEW George-Alexandru Andrei CTO BIT SENTINEL.

Slides:



Advertisements
Similar presentations
Module XII Web Application Vulnerabilities
Advertisements

Webgoat.
Closing the Gap: Analyzing the Limitations of Web Application Vulnerability Scanners David Shelly Randy Marchany Joseph Tront Virginia Polytechnic Institute.
HI-TEC 2011 SQL Injection. Client’s Browser HTTP or HTTPS Web Server Apache or IIS HTML Forms CGI Scripts Database SQL Server or Oracle or MySQL ODBC.
Hands-on SQL Injection Attack and Defense HI-TEC July 21, 2013.
Infosec 2012 | 25/4/12 Application Performance Monitoring Ofer MAOR CTO Infosec 2012.
Hands on Demonstration for Testing Security in Web Applications
Creating Stronger, Safer, Web Facing Code JPL IT Security Mary Rivera June 17, 2011.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
WebGoat & WebScarab “What is computer security for $1000 Alex?”
INDEX  Ethical Hacking Terminology.  What is Ethical hacking?  Who are Ethical hacker?  How many types of hackers?  White Hats (Ethical hackers)
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
It’s always better live. MSDN Events Securing Web Applications Part 1 of 2 Understanding Threats and Attacks.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under.
CROSS SITE SCRIPTING..! (XSS). Overview What is XSS? Types of XSS Real world Example Impact of XSS How to protect against XSS?
Handling Security Threats in Kentico CMS Karol Jarkovsky Sr. Solution Architect Kentico Software
The 10 Most Critical Web Application Security Vulnerabilities
Presenter Deddie Tjahjono.  Introduction  Website Application Layer  Why Web Application Security  Web Apps Security Scanner  About  Feature  How.
Web Application Security Assessment and Vulnerability Assessment.
Web Application Vulnerabilities Checklist. EC-Council Parameter Checklist  URL request  URL encoding  Query string  Header  Cookie  Form field 
Web Application Security
By: Razieh Rezaei Saleh.  Security Evaluation The examination of a system to determine its degree of compliance with a stated security model, security.
W3af LUCA ALEXANDRA ADELA – MISS 1. w3af  Web Application Attack and Audit Framework  Secures web applications by finding and exploiting web application.
Introduction to Application Penetration Testing
Penetration Testing Training Day Capture the Flag Training.
HTTP and Server Security James Walden Northern Kentucky University.
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
A Framework for Automated Web Application Security Evaluation
1-Vulnerabilities 2-Hackers 3-Categories of attacks 4-What a malicious hacker do? 5-Security mechanisms 6-HTTP Web Servers 7-Web applications attacks.
Penetration Testing James Walden Northern Kentucky University.
A Security Review Process for Existing Software Applications
CSC 2720 Building Web Applications Web Application Security.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Software Security Testing Vinay Srinivasan cell:
OSI and TCP/IP Models And Some Vulnerabilities AfNOG th May 2011 – 10 th June 2011 Tanzania By Marcus K. G. Adomey.
Attacking Applications: SQL Injection & Buffer Overflows.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
Web Application Security ECE ECE Internetwork Security What is a Web Application? An application generally comprised of a collection of scripts.
Security Scanners Mark Shtern. Popular attack targets Web – Web platform – Web application Windows OS Mac OS Linux OS Smartphone.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
Introduction To Web Application Security in PHP. Security is Big And Often Difficult PHP doesn’t make it any easier.
OWASP Top Ten #1 Unvalidated Input. Agenda What is the OWASP Top 10? Where can I find it? What is Unvalidated Input? What environments are effected? How.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
APPLICATION PENETRATION TESTING Author: Herbert H. Thompson Presentation by: Nancy Cohen.
October 3, 2008IMI Security Symposium Application Security through a Hacker’s Eyes James Walden Northern Kentucky University
Web Applications Testing By Jamie Rougvie Supported by.
By Sean Rose and Erik Hazzard.  SQL Injection is a technique that exploits security weaknesses of the database layer of an application in order to gain.
Crash Course in Web Hacking
PwC New Technologies New Risks. PricewaterhouseCoopers Technology and Security Evolution Mainframe Technology –Single host –Limited Trusted users Security.
Web Security Group 5 Adam Swett Brian Marco. Why Web Security? Web sites and web applications constantly growing Complex business applications are now.
Copyright © The OWASP Foundation This work is available under the Creative Commons SA 2.5 license The OWASP Foundation OWASP Denver February 2012.
Introduction of XSS:-- Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted.
Defending Applications Against Command Insertion Attacks Penn State Web Conference 2003 Arthur C. Jones June 18, 2003.
MIS Week 5 Site:
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
Javascript worms By Benjamin Mossé SecPro
Group 18: Chris Hood Brett Poche
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
TOPIC: Web Security (Part-4)
Penetration Test Debrief
Penetration Testing following OWASP
A Security Review Process for Existing Software Applications
Intro to Ethical Hacking
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
Presentation transcript:

TESTING FOR VULNERABILITIES AND APPLICATION SECURITY REVIEW George-Alexandru Andrei CTO BIT SENTINEL

ABOUT ME  I am security a engineer and IT fanatic. Devoting his past 4 years to Security, not just IT Security but also physical and personal security he likes to tinker with just about every gadget that he can get his hands on. His technical skills pirouette around network security, penetration testing, security testing, wireless insecurity and of course setting up hackable machines for others to play with. He is also the main guy to go to at Defcamp if you want to “Hack The Machine”.

WHY FIND VULNERABILITIES?  Nobody believes their software is vulnerable  “If the software works, then it must be secure”  Finding flaws starts you on the path  If you’re not finding them, you’re allowing them Find Flaws Fix Find Flaws Improve Find Flaws Improve

SOFTWARE IS A BLACK BOX  Complex  Millions of lines of code  Layers of leaky abstractions  Massively interconnected  Compiled  Difficult to reverse engineer  Different on every platform  Legal Protections  No peeking  We’re not liable

SECURITY ANALYSIS TECHNIQUES  Find Vulnerabilities Using the Running Application  Combining All Four Techniques is Most Effective  Find Vulnerabilities Using the Source Code Automated Vulnerability Scanning Automated Static Code Analysis Manual Penetration Testing Manual Code Review

OWASP TESTING GUIDE  OWASP TESTING GUIDE V4.4 pdf pdf  Part of an appsec body of knowledge…

BLACK BOX VS GREY BOX The penetration tester does not have any information about the structure of the application, its components and internals Black Box The penetration tester has partial information about the application internals. E.g.: platform vendor, sessionID generation algorithm Gray Box

TESTING STEPS  Planning  Reconnaissance  Infrastructure  Input validation  Denial of Service (DoS)  Authentication & Authorization  Information Disclosure  Code Review  Reporting

PLANNING  Change Management  Don’t get fired  Communicate fully  Get approvals in writing  Clearly defined scope  Test or production  Which web servers will be targeted  Can vulnerabilities be exploited  Can modifications be made via exploits  Will Denial of Service be tested  Are brute force attacks allowed  White box vs. black box

PLANNING - TOOLS  Presenter's favorites  BurpSuite– Testing proxy, fuzzer, spider, more  Nessus – General vulnerability scanner  Nikto– Signature-based web scanning, Google reconnaissance  Nmap – Port scanner & fingerprinting  WireShark (Ethereal) – Packet capture  Other free tools  Wikto– Signature-based web scanning  Pantera – tool from OWASP, automated scanning  Paros – Testing proxy, spider  WebScarab– Testing proxy, more

RECONNAISSANCE & AUTOMATED SCANNING  Google (Wikto) – Can find some vulnerabilities, pages difficult to navigate to  Spider (WebScarab)  Specialized Web scanners (Wikto, commercial) – Known web- app vulnerabilities; simple cases of XSS, SQL injection, etc.  Try to identify what off-the-shelf software is being used, then research vulnerabilities (securityfocus.com)  Source code  Look on open file shares  Look for unsecured code repositories

INFRASTURCTURE  Port scan (nmap)  General vulnerability scan (Nessus)  Unsecured HTTP management ports  Web Server attacks  Application framework attacks: WebMethods, WebLogic, other J2EE, ColdFusion, etc  Miscellaneous vulnerable services; NetBIOS, RPC, etc.

INPUT VALIDATION  SQL Injection  Cross Site Scripting (XSS)  Buffer Overflows

SQL INJECTION  Caused by failure to properly validate user-provided input  Allows arbitrary commands to be executed in the database  Example for a login:  Username = alex  Password = very_secure

SQL INJECTION SELECT count(userID) FROM users WHERE username = ‘alex' AND password = 'very_secure'

SQL INJECTION  Username: alex' OR 1=1 -- SELECT count(userID) FROM users WHERE username = 'byrned' OR 1=1 -- ' AND password = 'very_secure'

SQL INJECTION  Test by inserting string delimiting characters such as a single quote  Look for error messages

CROSS SITE SCRIPTING (XSS)  Allows an attacker to imbed arbitrary HTML inside a web page  Can be persistent (e.g. a bulletin board) or dynamic (e.g. a URL)  JavaScript can  Redirect the browser to an attack site  Monitor and report browsing activity using frames  Launch attacks against browser vulnerabilities  Steal cookies  Perform actions while impersonating user (MySpace worm)

CROSS SITE SCRIPTING (XSS)  Look for any content in a web page that was based on user- provided input  Check the source: The content might be in the HTML, but not displayed  Input isn’t limited to visible form fields. Look at cookies, HTTP headers, URL query strings, hidden fields  Standard pages aren’t the only source of XSS; error pages (even 404s) are frequently vulnerable

BUFFER OVERFLOWS  Not common with modern web environments  With black box, send long strings for different parameters, >1024 bytes; might have to switch to POST

DENIAL OF SERVICE (DOS)  Locking Customer Accounts  Buffer Overflows  User Specified Object Allocation  User Input as a Loop Counter  Writing User Provided Data to Disk  Failure to Release Resources  Storing too Much Data in Session  r_Denial_of_Service_%28DoS%29_attacks

INFORMATION DISCLOSURE  Directory traversal & listing  HTML & JavaScript comments  Error messages can divulge:  Operating System environmental parameters  Web Server settings  Database drivers in use  SQL queries run on a page  Software versions

CODE REVIEW  SQL queries  Stored procedures  User-supplied input as part of output  Operating System / shell commands  Error handling routines  Source code storage & access  Authentication & authorization mechanisms 

REPORTING  Severity  Category (OWASP Top 10)  Location (e.g. line 23 of /search/main.php)  Example exploit  Impact of exploit (e.g. theft of credit card data)  Recommended remediation  Third party documentation (vendor or OWASP)

REPORTING - CATEGORIZE SEVERITY  PCI severity levels: 1.pdf 5Urgent Trojan Horses; file read and writes exploit; remotecommand execution 4Critical Potential Trojan Horses; file read exploit 3High Limited exploit of read; directory browsing; DoS 2Medium Sensitive configuration information can be obtained by hackers 1Low Information can be obtained by hackers on configuration  Common Vulnerability Scoring System (CVSS v2)  Remote vs. local expliot  Attack complexity  Authentication required  Availability of exploit  Type of fix available  C/A/I impact  Impact value rating  Organization specific potential for loss  Percentage of vulnerable systems  Level of vulnerability confirmation

EXAMPLE FINDING 11. Improper use of varchar data types Severity: Critical Category: Injection Flaws Exploitation prerequisites: Internet access; authentication may not be required for all pages Description Some pages handle numeric data types as “varchars” (character string). This makes SQL injection possible, despite the “cfqueryparam” tag; since there is no quote to break out of, escaping quote characters won’t help. This occurs in many pages. Example \dsg\createNewPage.cfm; line 54 select user_name from users (nolock) where user_number = Recommendation Every file should be reviewed for how each SQL query or stored procedure is called. Change all numeric SQL parameters to use CF_SQL_INTEGER. References

APP2OWN CONTEST

QUESTIONS?

THANK YOU