SlideShare a Scribd company logo
2011 NSAA IT Pre-Conference WorkshopPenetration Testing For Maximum BenefitWEB APP HACKING
Web Application TestingA concise OverviewScott JohnsonPrincipal Security ConsultantEmagined SecurityIntroductions
Grasp of the web application testing processConvinced of the necessityKnowledge of core toolsConfident that “I can do this”Goals
OverviewTesting PhasesDemonstrationAgenda
Black Art or Science?A penetration test is a method of evaluating the security of a computer system or network by simulating an attack. A Web Application Penetration Test focuses only on evaluating the security of a web application. The process involves an active analysis of the application for any weaknesses, technical flaws, or vulnerabilities. (OWASP)Targets the legitimate business functions users use everyday.
The supporting infrastructure is generally off limits
It is not a code reviewWhat is Web Application Testing?
Common Misnomers“Our site is safe”:We have firewalls in placeWe encrypt our data We have IDS / IPSWe have a privacy policy Why Test?
Web App Hacking in the News
The firewall is going to let them inEncryption will hide most of the attacksPrivacy? Like they care!Your Front Door Hacker
How does it work?SQL injection over  HTTPS (port 443)Database returnsAccount PasswordsNetwork Security Controlsacme.bank.comFirewallIDS / IPSData Base Server
You Don’t have to look like thisYou can perform web app testing if:Basic understanding of HTTP protocol
Methodical
Tenacious curiosityUber NerdFounder and CTO of eEye Security Marc Maiffret
Passive PhaseInformation gatheringUnderstanding the logicObserving normal behaviorActive PhaseTargeted testingApplying methodologiesTesting Phases
ReconnaissanceReconnaissance is a mission to obtain information by visual observation or other detection methods, about the activities and resources of an enemy or potential enemy, (US Army FM 7-92; Chap 4)Know your target before you begin, its worth the effortDetermine Application types and versionsCross reference vulnerabilities with OSVDB / NVDhttp://web.nvd.nist.gov/view/vuln/searchObserve normal behaviorAdvanced Google searchingAka Google hackinghttp://en.wikipedia.org/wiki/Google_hackingApplication MappingSpidering / Web crawlingDirectory bustingPassive Phase
The Attack PlanConfiguration Management Business Logic Authentication Session Management Authorization Data Validation Denial of Service Web Services Testing Active Phase
Deploying Your AssetsBrowser (prefer Firefox and friends)Foxyproxy, Live HTTP Headers, Firebug, Web Developer, etc…Web ProxyAserver (a computer system or an application program) that acts as an intermediary for requests from clients seeking resources from other servers.ExamplesBURPWebscarabParosTools
ScannerTool that automates many of the tests methods described earlierMany commercial tools – AppScan, Web Inspect, Accunetix, etc..W3AF Web Application Attack and Audit FrameworkOWASP ZAPFree open source web scanner.Pro’s – Fast and the tester quickly target weak spotsCon’s prone to false positives, poor session managementDoes not replace manual testingTools - continued
Definition: A software testing technique, often automated or semi-automated, that involves providing invalid, unexpected, or random data to the inputs of a computer program. The program is then monitored for exceptions such as crashes or failing built-in code assertions. (Wikipedia)Fundamental technique in web application testingParametersForm fieldsCookiesHTTP HeadersCan uncover many kinds of vulnerabilities: SQL injection, XSS, improper error handling, DDoS, etc…Fuzzing
SQL InjectionFuzzing aimed at the database layer of an applicationImproper user input filtering is the root cause‘1 or 1=1 classic test stringMany variations, automated fuzzing helpful
Bypass access controlsHijack sessionsDisclose sensitive information.Persistent – lives on the serverNon Persistent – malicious linkTargets users not your site!Cross Site Scripting<script>alert(“You Won!”)</script>
https://stg.acmesite.com/home/EP_SelectionIB.aspx?request=Ayn0G3lQ7l………BbK9M1vm8m3s%3df22b5<script> function changeSrc() {document.getElementById("myframe").src="http://www.emagined.com";}</script><body bgcolor="Red"><table bgcolor=”red”><p><iframe  align=top” width=”40%” height=”400” id="myframe" src="https://stg.xyz.com"><p>Your browser does not support iframes.</p></iframe><br> An Error Occurred<p><input type="button" onclick="changeSrc()" value="Click to Continue" /><p><p><p><p></body></script>f973c1e3be0XSS - Example
Using a Web ProxyBasic Recon.Platform Back TrackStarting BURPConfiguring your browserStarting Web Goathttp://x.x.x.x:8080/webgoat/attackguest / guestCapturing TrafficSQL Injection ExampleCross Site Scripting (XSS) ExampleDemonstration Overview
Google Hacking
Inurl:
Site:
Filetype:Entire books on the subjecthttp://www.gnucitizen.org/blog/google-hacking-for-penetration-testers-second-edition/Reference:http://www.ethicalhacker.net/content/view/41/2/http://www.google.com/intl/en/help/operators.htmlDemo 1. – Reconnaissance
Finding Indexessite:sc.govintitle:index.ofDemo 1. Reconnaissance
Finding login pagesSite:sc.gov login | logonDemo 1. Reconnaissance
Site:sc.govintitle:error | warningDemo. 1 – Error Pages
Demo 1- Passwords?
Demo 1 - PasswordsYou Bet!
Spidering / Web CrawlingOWASPWebscarabZAPPortswiggerBurp SuiteDemo 1 - Reconnaissance
Demo 1. ZAP - Spider
Demo 2 - Setup	Make sure the port number is the sameIn this case port 8008
Browse to webgoathttp://x.x.x.x:8080/webgoat/attackUser ID = guestPassword = guestDemo 2 - Setup
Demo 2 – SQL Injection
Why does that work?Make the SQL statement evaluate as true!1=1 right?Answer:1+'or+'1'=’1Demo. 2 - SQL Injection - Answer
Demo 2  XSS (persistent)
W3AF Vulnerability ScannerPlatform Back TrackStarting W3AFLayout and configurationDefining the TargetSelecting PluginsAnalyzing Results and ReportingDemonstration 3
Demo. 3 – W3AF Layout
Demo. 3 – W3AF Results

More Related Content

PPTX
Cross Site Scripting ( XSS)
PDF
Web Application Penetration Testing
PPT
Application Security
PDF
Web application security & Testing
PDF
Penetration testing web application web application (in) security
PPT
Introduction to Web Application Penetration Testing
PPT
Penetration Testing Basics
PPT
Web Application Security
Cross Site Scripting ( XSS)
Web Application Penetration Testing
Application Security
Web application security & Testing
Penetration testing web application web application (in) security
Introduction to Web Application Penetration Testing
Penetration Testing Basics
Web Application Security

What's hot (20)

PPTX
Web application security
PPTX
OWASP Top 10 2021 What's New
PPTX
Analysis of web application penetration testing
PPTX
Penetration testing reporting and methodology
PPT
Cross Site Request Forgery
PPTX
NETWORK PENETRATION TESTING
PDF
PPTX
What is Penetration Testing?
PDF
Malware and security
PPTX
Vulnerabilities in modern web applications
PPT
Introduction To OWASP
PPTX
Introduction to Web Application Penetration Testing
PDF
OWASP Top 10 Web Application Vulnerabilities
PPTX
Footprinting and reconnaissance
PPTX
WTF is Penetration Testing v.2
PPTX
Reflective and Stored XSS- Cross Site Scripting
PPTX
OWASP TOP 10 VULNERABILITIS
PPTX
Introduction To Vulnerability Assessment & Penetration Testing
Web application security
OWASP Top 10 2021 What's New
Analysis of web application penetration testing
Penetration testing reporting and methodology
Cross Site Request Forgery
NETWORK PENETRATION TESTING
What is Penetration Testing?
Malware and security
Vulnerabilities in modern web applications
Introduction To OWASP
Introduction to Web Application Penetration Testing
OWASP Top 10 Web Application Vulnerabilities
Footprinting and reconnaissance
WTF is Penetration Testing v.2
Reflective and Stored XSS- Cross Site Scripting
OWASP TOP 10 VULNERABILITIS
Introduction To Vulnerability Assessment & Penetration Testing
Ad

Viewers also liked (20)

PPTX
Web application penetration testing
PPTX
Pen Testing Explained
PDF
Metasploit for Penetration Testing: Beginner Class
PDF
Bảo mật ứng dụng web
PPTX
Vtb final
PPTX
Banking malware zeu s zombies are using in online banking theft.
PPTX
G3t R00t at IUT
PPTX
Everybody loves html5,h4ck3rs too
PDF
Axoss Web Application Penetration Testing Services
PPTX
Web application Testing
PDF
Introduction to penetration testing
PDF
Nessus scan report using the defualt scan policy - Tareq Hanaysha
PPTX
Sending a for ahuh. win32 exploit development old school
PPTX
Leveraging Existing Tests in Automated Test Generation for Web Applications
PPTX
Scaling application with RabbitMQ
PDF
Attack All The Layers - What's Working in Penetration Testing
PDF
What is pentest
PDF
Thick Application Penetration Testing - A Crash Course
PDF
Introduction to Windows Dictionary Attacks
PPTX
Vulnerability Assessment and Rapid Warning System Enhancements in
Web application penetration testing
Pen Testing Explained
Metasploit for Penetration Testing: Beginner Class
Bảo mật ứng dụng web
Vtb final
Banking malware zeu s zombies are using in online banking theft.
G3t R00t at IUT
Everybody loves html5,h4ck3rs too
Axoss Web Application Penetration Testing Services
Web application Testing
Introduction to penetration testing
Nessus scan report using the defualt scan policy - Tareq Hanaysha
Sending a for ahuh. win32 exploit development old school
Leveraging Existing Tests in Automated Test Generation for Web Applications
Scaling application with RabbitMQ
Attack All The Layers - What's Working in Penetration Testing
What is pentest
Thick Application Penetration Testing - A Crash Course
Introduction to Windows Dictionary Attacks
Vulnerability Assessment and Rapid Warning System Enhancements in
Ad

Similar to Web Application Penetration Testing Introduction (20)

PDF
Romulus OWASP
PPTX
Hogy néz ki egy pentest meló a gyakorlatban?
PDF
Common Web Application Attacks
PPT
Andrew and Zac RVA-Beyond-Automated-Testing-2016.ppt
PPT
Beyond Automated Testing - RVAsec 2016
PPTX
Web application vulnerability assessment
PPTX
Security_Testing_Presentation
PPTX
Hacker Halted Miami , USA 2010
PPT
BSidesDC 2016 Beyond Automated Testing
PDF
Web application penetration testing lab setup guide
PPTX
Pentesting Tips: Beyond Automated Testing
PPTX
Security testing for web developers
PDF
CNIT 129S: Ch 4: Mapping the Application
PPT
Starwest 2008
PDF
(Ebook) Web security testing guide by elie saad, rick mitchell
PDF
Web Application Penetration Testing - Types, Steps & Benefits.pdf
PPTX
Hacking WebApps for fun and profit : how to approach a target?
PDF
TriplePlay-WebAppPenTestingTools
DOC
Semi-Automated Security Testing of Web applications
ODP
Introduction to OWASP & Web Application Security
Romulus OWASP
Hogy néz ki egy pentest meló a gyakorlatban?
Common Web Application Attacks
Andrew and Zac RVA-Beyond-Automated-Testing-2016.ppt
Beyond Automated Testing - RVAsec 2016
Web application vulnerability assessment
Security_Testing_Presentation
Hacker Halted Miami , USA 2010
BSidesDC 2016 Beyond Automated Testing
Web application penetration testing lab setup guide
Pentesting Tips: Beyond Automated Testing
Security testing for web developers
CNIT 129S: Ch 4: Mapping the Application
Starwest 2008
(Ebook) Web security testing guide by elie saad, rick mitchell
Web Application Penetration Testing - Types, Steps & Benefits.pdf
Hacking WebApps for fun and profit : how to approach a target?
TriplePlay-WebAppPenTestingTools
Semi-Automated Security Testing of Web applications
Introduction to OWASP & Web Application Security

Web Application Penetration Testing Introduction

  • 1. 2011 NSAA IT Pre-Conference WorkshopPenetration Testing For Maximum BenefitWEB APP HACKING
  • 2. Web Application TestingA concise OverviewScott JohnsonPrincipal Security ConsultantEmagined SecurityIntroductions
  • 3. Grasp of the web application testing processConvinced of the necessityKnowledge of core toolsConfident that “I can do this”Goals
  • 5. Black Art or Science?A penetration test is a method of evaluating the security of a computer system or network by simulating an attack. A Web Application Penetration Test focuses only on evaluating the security of a web application. The process involves an active analysis of the application for any weaknesses, technical flaws, or vulnerabilities. (OWASP)Targets the legitimate business functions users use everyday.
  • 6. The supporting infrastructure is generally off limits
  • 7. It is not a code reviewWhat is Web Application Testing?
  • 8. Common Misnomers“Our site is safe”:We have firewalls in placeWe encrypt our data We have IDS / IPSWe have a privacy policy Why Test?
  • 9. Web App Hacking in the News
  • 10. The firewall is going to let them inEncryption will hide most of the attacksPrivacy? Like they care!Your Front Door Hacker
  • 11. How does it work?SQL injection over HTTPS (port 443)Database returnsAccount PasswordsNetwork Security Controlsacme.bank.comFirewallIDS / IPSData Base Server
  • 12. You Don’t have to look like thisYou can perform web app testing if:Basic understanding of HTTP protocol
  • 14. Tenacious curiosityUber NerdFounder and CTO of eEye Security Marc Maiffret
  • 15. Passive PhaseInformation gatheringUnderstanding the logicObserving normal behaviorActive PhaseTargeted testingApplying methodologiesTesting Phases
  • 16. ReconnaissanceReconnaissance is a mission to obtain information by visual observation or other detection methods, about the activities and resources of an enemy or potential enemy, (US Army FM 7-92; Chap 4)Know your target before you begin, its worth the effortDetermine Application types and versionsCross reference vulnerabilities with OSVDB / NVDhttp://web.nvd.nist.gov/view/vuln/searchObserve normal behaviorAdvanced Google searchingAka Google hackinghttp://en.wikipedia.org/wiki/Google_hackingApplication MappingSpidering / Web crawlingDirectory bustingPassive Phase
  • 17. The Attack PlanConfiguration Management Business Logic Authentication Session Management Authorization Data Validation Denial of Service Web Services Testing Active Phase
  • 18. Deploying Your AssetsBrowser (prefer Firefox and friends)Foxyproxy, Live HTTP Headers, Firebug, Web Developer, etc…Web ProxyAserver (a computer system or an application program) that acts as an intermediary for requests from clients seeking resources from other servers.ExamplesBURPWebscarabParosTools
  • 19. ScannerTool that automates many of the tests methods described earlierMany commercial tools – AppScan, Web Inspect, Accunetix, etc..W3AF Web Application Attack and Audit FrameworkOWASP ZAPFree open source web scanner.Pro’s – Fast and the tester quickly target weak spotsCon’s prone to false positives, poor session managementDoes not replace manual testingTools - continued
  • 20. Definition: A software testing technique, often automated or semi-automated, that involves providing invalid, unexpected, or random data to the inputs of a computer program. The program is then monitored for exceptions such as crashes or failing built-in code assertions. (Wikipedia)Fundamental technique in web application testingParametersForm fieldsCookiesHTTP HeadersCan uncover many kinds of vulnerabilities: SQL injection, XSS, improper error handling, DDoS, etc…Fuzzing
  • 21. SQL InjectionFuzzing aimed at the database layer of an applicationImproper user input filtering is the root cause‘1 or 1=1 classic test stringMany variations, automated fuzzing helpful
  • 22. Bypass access controlsHijack sessionsDisclose sensitive information.Persistent – lives on the serverNon Persistent – malicious linkTargets users not your site!Cross Site Scripting<script>alert(“You Won!”)</script>
  • 23. https://stg.acmesite.com/home/EP_SelectionIB.aspx?request=Ayn0G3lQ7l………BbK9M1vm8m3s%3df22b5<script> function changeSrc() {document.getElementById("myframe").src="http://www.emagined.com";}</script><body bgcolor="Red"><table bgcolor=”red”><p><iframe align=top” width=”40%” height=”400” id="myframe" src="https://stg.xyz.com"><p>Your browser does not support iframes.</p></iframe><br> An Error Occurred<p><input type="button" onclick="changeSrc()" value="Click to Continue" /><p><p><p><p></body></script>f973c1e3be0XSS - Example
  • 24. Using a Web ProxyBasic Recon.Platform Back TrackStarting BURPConfiguring your browserStarting Web Goathttp://x.x.x.x:8080/webgoat/attackguest / guestCapturing TrafficSQL Injection ExampleCross Site Scripting (XSS) ExampleDemonstration Overview
  • 27. Site:
  • 28. Filetype:Entire books on the subjecthttp://www.gnucitizen.org/blog/google-hacking-for-penetration-testers-second-edition/Reference:http://www.ethicalhacker.net/content/view/41/2/http://www.google.com/intl/en/help/operators.htmlDemo 1. – Reconnaissance
  • 30. Finding login pagesSite:sc.gov login | logonDemo 1. Reconnaissance
  • 33. Demo 1 - PasswordsYou Bet!
  • 34. Spidering / Web CrawlingOWASPWebscarabZAPPortswiggerBurp SuiteDemo 1 - Reconnaissance
  • 35. Demo 1. ZAP - Spider
  • 36. Demo 2 - Setup Make sure the port number is the sameIn this case port 8008
  • 38. Demo 2 – SQL Injection
  • 39. Why does that work?Make the SQL statement evaluate as true!1=1 right?Answer:1+'or+'1'=’1Demo. 2 - SQL Injection - Answer
  • 40. Demo 2 XSS (persistent)
  • 41. W3AF Vulnerability ScannerPlatform Back TrackStarting W3AFLayout and configurationDefining the TargetSelecting PluginsAnalyzing Results and ReportingDemonstration 3
  • 42. Demo. 3 – W3AF Layout
  • 43. Demo. 3 – W3AF Results
  • 44. Web ProxyBURPParosWebscarab / ZapFuzzingWS FuzzerBrute ForcingBrutusPassword CrackingJohn The RipperScannerW3AFZapDon’t forget the shellTool Starter KitThere are many tools Some technology centric: Citrix, Flash, javascript, etc… Back Track is your starter kit
  • 45. OWASP Testing GuideComprehensive Guidehttps://www.owasp.org/index.php/Testing:_Introduction_and_objectivesBURPhttp://portswigger.net/burp/W3AFhttp://w3af.sourceforge.net/Fire Fox & Friendshttps://addons.mozilla.org/en-US/firefox/collections/adammuntner/webappsec/Back Track –Every tool you need to get startedhttp://www.backtrack-linux.org/References
  • 48. Increase the likelihood of a successful testCommunication and CooperationReaffirm scope of testValidate functionality and user accountsTechnical support on the readyNo unforeseen outages or code changesPre-Flight Checks
  • 50. W3AF

Editor's Notes

  • #3: 10 years in the industryLast 4 solely dedicated to pentestingBoth Infrastructure and Web Application penetration testing Worked both sides : Defense (security operations) and Offense (pentesting)
  • #4: Take away with you that web app testing is a necessary piece to securing you dataI could spend a week on this topic. This will be brief. Hopefully you will walk away with enough knowledge to get started.I highly recommend reading material from OWASP
  • #5: Focus will be on the demonstrationI will need to spend some time giving overview of methodology and some termsDemonstrationsLike the bank robber in the image, hackers are looking for items of value. The applications are the gateway to this data.[Image Explained]Long gone are the days of defacing a web site. Hackers are going after your data
  • #6: The key word is ”method” in the definitionThe focus is on the application not the infrastructure.The goal is to take advantage of a weakness in a legitimate function for nefarious purposes.Anywhere from stealing money to stealing your identity to controlling the machine to stage another attack.Testing methods are well documented. You don’t have to be a hacker to test your apps.
  • #7: [Answerthe question / misnomers after the video]You just audited my network / infrastructure! I must be secure?This is not an infrastructure test, a different focus that a infrastructure test will not coverBefore I answer, watch this video
  • #8: Hackers retaliate to the shutdown of Wiki LeaksSo how does it work?
  • #9: [Answerthe misnomers on this page]Firewall lets the hacker in, IPS / IDS is almost useless when the traffic is encrypted (SSL port 443). The cartoon image is dead on. You let him into your network. Network security was uselessYou are going to assume the role of the “Hacker”So how does this work?
  • #11: Wrong! Pentesting is teachable. There are plenty of materials online and in books.You just need a little aptitude for details and have voracious curiosity.[ story about meeting Marc Maiffre founder of eEye ---short , mountain dew drinking little nerd. Little rich nerd though.]The Code Red worm was a computer worm observed on the Internet on July 13, 2001. It attacked computers running Microsoft&apos;s IIS web server.The Code Red worm was first discovered and researched by eEye Digital Security employees Marc Maiffret and Ryan Permeh. The worm was named the .ida &quot;Code Red&quot; worm because Code Red Mountain Dew was what they were drinking at the time, and because of the phrase &quot;Hacked by Chinese!&quot; with which the worm defaced websites.[1]
  • #12: Before we start hacking, a little background…TWO PHASE APPROACH. Don’t be tempted to jump to phase two, could miss something or make inefficient use of timeThe passive phase will help refine your approach for phase IIYou will save time and get better resultsYou will deploy the same tactics and techniques as a hacker would!!! !!Trust me a competent hacker does his homework.
  • #13: Is it Apache 2.x or IIS 7.xYou can look up know vulnerabilities by application type and version. This is public knowledge and very helpfulKnowing how the application works normally and its logic will help you determine abnormal behavior. Google knows all about your site if its on the Internet. You’d be surprised what types of documents are out on your site. You might find someone&apos;s password.Spidering allows you to map out the site based on hyperlinks!!!NVD – a ton of information can be found here to help determine vulnerabilities
  • #14: Now you get to Hack! This phase is where the real testing begins. All the work up to now has prepared you for this moment.The attack plan is a list of all the exploitation categories. Your recon will allow you to tailor your attacks to and focus on certain categories.The items in the list are general categories for various attacks. Your research will help you determine which of the test categories are more likely to yield results. Configuration Management – Did you find a backend administrative page during phase 1. Maybe there is a default password enabledBusiness Logic – what would happen if I skipped step “B” and sent my browser to step “C”? Session Management – can more than one user login with the same account. Are cookies properly disposed of?Data validation – Classic XSS and SQL Injection. Session hijacking and database dumps. Web Services: SOAP REST, XML oh my!! This is a sub category of web application testing and is out of scope but the same phase approach applies. Some additional tools are needed.NOTE about the Image: “If McClellan had done his homework, he would have know that he had a3:1 advantage , Lee’s back was to the Potomac and could have ended the war. But McClellan belived Lee had twice as many men as he actually did and as a result was overly cautious. The result, the battle of Antietam was effectively a draw, Lee escaped, and the war drug out for another three years. Shortly after the battle Lincoln fired McClellan (again).
  • #15: Introduction to type of toolsYou don’t need many tools to begin, these are the basics. All can be found on Back TrackA browser, I prefer Firefox because it has many plugins that really helpWeb Developer, Tamper Data, Live Http Headers, XSS and SQL inject me, Foxy Proxy, etc..Web Proxy, I’ll used BURP in the demonstrations.Briefly explain what a web proxy is, refer to the pirate image
  • #16: Scanner – can be used as the initial instrument in phase II, still need to perform phase I manually. Review the Pros’s and Cons
  • #17: The majority of phase two testing is somehow related to fuzzingFuzzing equals abusive user input.What happens when the program gets data it does not expect? -1 versus +1 , large strings of data, inserting codeIdeally the application gives you a very generic error message and rejects data that is inappropriate. But…Error pages can reveal a lot of information especially if debugging is enabled.Example, database schema or data, location of files, software versionsSummaryThe majority of web app testing can be summed up as “using the app in ways the developer did not intend”.Next two slides, Classic examples of fuzzing (SQL Injection and XSS)
  • #18: The attack is through the web application to the database, not a direct attack on the database!!!!!Sql injection changes the query string to something other than the intended query.Often the application will respond with detailed errors, giving away schema and or the contents of the database.This vulnerability can disclose sensitive data in your database.
  • #19: XSS can be discovered by fuzzingXSS enables attackers to inject client-side scripts into web pages or trick users into sending malicious code to a vulnerable web serverOften a part of a Phishing Attack
  • #20: This is a non persistent example, very ugly exampleAn actual example I created to prove a pointNo filtering at all!Focus on the content between the &lt;script&gt; tagsThis example injects an iframe that calls in data from a third party website. The “request” parameter is injected with the attack string
  • #21: To follow along, have BackTrack bootedGoalUse a web proxy with Firefox and attack a vulnerable applicationTarget is webgoatWill show two sample atttacks (SQL Injection and XSS)
  • #22: With Google Hacking you cand findAny type of file, remote login via citrix, login pages, directory listings, text files, even passwords.
  • #23: Directory listing of pages Here you will look for files to help you gain more knowledge about the sitePasswordsConfiguration filesOffice related files – metadata may disclose a user name
  • #24: This is good for finding configuration Mgt. admin pages : Jboss,
  • #25: This error gives me valuabe information about the databaseTable name = t.MenumenuID is a numeric value. I could use a tool to enumerate the menuID’s Can start to craft a SQL injection attack with this data
  • #28: ZAP and Webscarab have Spidering capabilitiesRecord distinct URI’s(Uniform Resource Identifier) URI is the string of identifiers that makes a URL uniqueWebscarab is designed for more manual testingZAP has an automated scanner (parameter manipulator, not a vulnerability database)Burp Suite Pro (paid vor version) is like the previous two combined
  • #29: Setup firefox to use the ZAP proxy.ZAP is in BackTrack under web-application proxiesUnder Tools  Options you can configure the local proxy, I used port 8088Capture a web site and run the spider toolNote that Burp is used in much the same mannerIf time permits run the scanner tool. Alternatively run it and come back later to the results
  • #30: Xlose ZAP and open up BurpStart Burp Suite (webproxy) for capturing trafficEnsure the proxy is running, sometimes it does not turn on by default.Configure Firefox to use a proxyBrowse to a URL, make sure it shows up in the targets in BURP and then run the spider.
  • #31: Log into webgoatDefine Webgoat – An insecure web application for the purpose of teaching how to perform web application pentests. It is a tutorial with several modules. Has various hints and and solutions .If there is time use Burp to spider webgoatShow how to capture trafficSend a packet to repeaterSQL and XSS examples
  • #32: Web Goat DemoPurpose: To access Nevile&apos;s admin account with out knowing his passwordShow that you cant login with random passwords, show the failure noticeFlaw Exploited:The security flaw is that users have the ability (although limited but enough) to modify the SQL query directly in the password fieldHint: This is the code for the query being built and issued by WebGoat: &quot;SELECT * FROM employee WHERE userid = &quot; + userId + &quot; and password = &quot; + passwordGoal : Make the SQL statement evaluate as true!Answer:sql string to inject in the password field: 1+&apos;or+&apos;1&apos;=&apos;1the &quot;+&quot; signs are used to fill in blank spaces and the &quot;--&quot; is a sql statement that this is the end of the query. The &quot;a&quot; can be anything, it just needs to be a false answer to the password does not match the userid&apos;s password entry in the database. The Single quotes make it a litteal &quot;1&quot;. Sometimes you need the quotes in a sql injection attack, other times you don&apos;t. To find out which permutation will work can take time. it can be done manually or more easily done with a brute force method. The Intruder function in BURP can help with this.
  • #33: The fix is to use stored procedures and disallow characters like the single quote
  • #34: Test:In Webgoatgoto Cross-Site Scripting, Stage 1 Stored XSSGoal: Execute a Stored Cross Site Scripting (XSS) attack.Answer:In the Street field of theuser’s profile type in a javascript&lt;script&gt;alert(“You Won”)&lt;/script&gt;Or&lt;script&gt; function showcookie() document.write(document.cookie); &lt;/script&gt;&lt;body&gt;&lt;br&gt;&lt;input type=&quot;button&quot; onclick=&quot;showcookie()&quot; value=&quot;See Cookie&quot; /&gt;&lt;/body&gt;Logout as Tom and log in as Jerry and see if its there.The ultamate issue is that the user input is unfiltered, allowing one to insert code.
  • #35: Start W3AF in Backtrack
  • #36: If webgoat is availabe, have them scan it.There is a command line version of w3af, a little more stable, lighter weight.
  • #37: Sample results of a scan
  • #38: These are your “Hand Tools” they will do the job, not flashy and not necessarily easy to useYour Power tools are the commercial scannersBacktrack has all you need to get started.
  • #42: Security Development Life Cycle is out of scope.But web app testing Should be part of the development life cycle!! Ask your self, ”Where is my valuable data on line?” !! help decide what to test firstRisk and Cost analysis is out of scopeBut, given tests generally run over the course of a week or two, you need to do some set up work to make things go smoothlyYou don’t want to inadvertently test a subdomain or function. Some tests may be very targetedAccess can be complicated in testing environments, vpn’s, client certificates, user accountsIn the event of a problem, you can call someone and vice versa. Communication with all groups is key. If a development team does not know about the test and pushed up a new code base, the test can become invalid.Obviously if you cant access the site due to scheduled maintenance, you can’t test and time is money.