8 - Web App Pen Testing Flashcards
White-box vs Black-box vs Gray box App Pen Testing?
- White-Box: organization provides info in advance (app design, info from interviews, software requirements, risk analysis)
- Black-Box: No info provided in advance
- Gray-Box: Some info provided in advance
What is Web App Pen Testing?
Assessment to find any security weakness, technical flaw, or vulnerabilities that may exist in the application. Every possible attack is simulated.
What is a Web Application Security Frame?
Classified into the following areas:
- Input Validation
- Authentication and Authorization
- Cryptography
- Configuration Management
- Exception Management
What are the steps for web app pen testing?
- Discover Web App Default Content
- Web Enumeration
- Browse Website URL and Internal URLs
- HTML Code (read comments, tags, action attribute)
- Identify Server side tech (examine cookies, error pages, technology)
- Identify Technology used to build target website
- Discover Web App Hidden Content
- Identify Sitemap (.xml file that lists all publicly available pages)
- Web Spidering (visits every page and indexes everything)
- Mirror and Crawl Websites
- Perform Directory Brute Forcing
- Identify Restricted Directories (robots.txt)
- Extracting Common Word List
- Conduct Web Vulnerability Scanning
- Identify the Attack Surface Area
- Identify Entry Points for User Input
- Map Attack Surface
- Test for SQL Injection Vulnerabilities
- Test for XSS Vulnerabilities (Test URLs, Search Field, User Agent)
- Test for Parameter Tampering
- Test for Weak Cryptography Vulnerabilities
- Check for Weak SSL Ciphers
- Check for Insecure Cryptography Storage
- Detect Use of Weak Encoding Techniques
- Test for Security Misconfiguration Vulnerabilities
- Test Inner workings of Web App
- Test Database Connectivity
- Test Application Code (backdoors, exception handling, misuse of accts, test for HTML comments)
- Test for a WAF
- Test for Debug Parameters
- Test for Improper Error Handling
- Test for Client Side Scripting
- Identify Technologies
- App’s Reliance on Client Side Validation
- Test Client-side Controls Over User Input
- Test Transmission of Data via Client
- Test ActiveX Controls
- Test Shockwave Flash Objects
- Check for Frame Injection
- Test User Protection via Browser Settings
- Test for Broken Authentication
- Tests for Broken Session Management Vulnerabilities
- Test for Web Services Security
- Perform Web Services Attack
- Perform Web Services Probing Attack
- Test for XML Structure (DoS the XML Parser)
- Test for XML Content-level
- Test for Web Services XML Poisoning
- Test for WS HTTP GET Parameters/REST Attacks
- Test for Suspicious SOAP Attachments (attach and post a SOAP message with non-destructive virus)
- Test for XPATH Injection Attack (XPATH is language used to refer to parts of an XML document)
- Test for WS Replay
- Test for Business Logic Flaws
- Test for Logic Flaws
- Identify Key Attack Surface (Application Mapping)
- Test Multistage Processes
- Test Handling of Incomplete Input (check each parameter in turn)
- Test Trust Boundaries
- Test Transaction Logic
- Test for Web Server Vulnerabilities
- Perform HTTP Service Discovery (Scan common ports for services to exploit)
- Perform Banner Grabbing to Identify the Target Web Server
- Perform Web Server Fingerprinting using httprint (tool)
- Perform Advanced Web Server Fingerprinting using HTTPRecon
- Test for Default Creds
- Test for Dangerous HTTP Methods
- Enumerate Webserver Directories
- Test for Proxy Functionality
- Test for Virtual Hosting Misconfiguration
- Test for Web Server Software Bugs
- Web Server Vulnerability Scanner: NIKTO
- Test for Thick Clients Vulnerabilities
- Pen Testing Thick Clients
What is Identifying functionality?
Determining the core functionality of an app and check for each function it is designed to perform. Check for key security mechanisms employed by an app.
What is Netcraft used for?
Helps find:
- Background Info: Site title, rank, etc
- Hosting History: Web server IP address, web server version, OS
- Network Info: IP address. Domain registrar, organization address, host country, netblock owner, DNS admin, reverse DNS
- Site Tech: Server side, Client side
What are some common server side technologies?
- .pl: Perl CGI script
- .asp: Active Server Pages (MS IIS)
- .aspx: ASP+ (MS .NET)
- .php: PHP script
- .cfm: ColdFusion
- .nsf: Lotus Domino Server
- .jsp: Java Server Page
- .do: Java Struts
What are the most common entry points for SQL injection?
- Search Web Pages
- URL bar contents
- Web Form Input Values
- Public APIs
- DCOM methods
- Network Packets
- Profile-related web pages
- Authentication Forms
- E-Commerce related pages
- Inter-Process Communication Pipe
- Web Service Methods
What are some techniques to throw Database errors?
- Grouping: Using HAVING command to generate errors telling which columns have not been grouped
- Type Mismatch: Insert strings into numeric field
- Blind Injection: Use time delays or error signatures to extract info. (Do this when apps do not provide detailed errors)
What are some SQLi techniques to evade the IDS?
- Using ‘OR 1=1 Equivalents (‘john’ = ‘john’; 7>1)
- Using Char Encoding (ex. “root” = 114, 111, 111, 116)
- Manipulating White Spaces (drop or add white spaces between keywords can help evade IDS without altering execution of SQL statements)
- Inline Comments (/*…*/)
- Obfuscated Code
What are some methods for testing SQLi vulnerabilities?
- Identify Injection Points
- Identify SQL Injectable Entry Points in HTTP Request (GET & POST requests)
- Perform Database Fingerprinting (errors)
- Detect SQL Injection Vulnerabilities by manipulating a parameter
- Determine the Database Schema using Error-Based SQL Injection (DB, Table, Column, Field)
- Determine the Database Schema using Union-Based SQL Injection
- Determine the Database Schema using Blind SQL Injection
- Determine Privileges, DB structure, and column names
- Extract Data using Blind SQLi
- Extract 1st table entry using Blind SQLi
- Insert, Update, and Delete Data from DB
- Attempt a DoS Attack using SQLi (using very complex queries; drop table)
- Evade IDS
- Bypass Website Authentication (login as diff user, provide your own hash)
- Perform a Function-Call Injection Attack
- Perform Buffer Overflow attack
- Access System Files and Execute Remote Commands (LOAD_FILE(), INTO OUTFILE())
- Replicate DB Structure and Data (OPENROWSET)
- Use OPENROWSET to Escalate Privileges on MSSQL
- Extract SQL-Server Password Hashesa
What are some techniques for Parameter Tampering?
- URL Parameters
- Hidden Parameters
- Directory traversal
- Check for Unvalidated Redirects and Forwards
- Unrestricted File Upload Vulnerability
- HTTP Response Splitting/CRLF Injection Attack
What are some authentication testing techniques?
- Understand authentication Mechanism
- Test Password Quality
- Test for Username Enumeration
- Test Resilience to Password Guessing
- Test Account Recovery and Remember Me Function (Password Changing, Password Recovery, “Remember Me” Exploit)
- Perform password Brute-Forcing
- Session ID Prediction
- Modifying Input Fields
- HTTP Request Tampering (Query String Tampering, HTTP Headers)
- Perform Authorization Attack - Cookie Parameter Tampering
- Understand Access Control Requirements (Horizontal Segregation, Vertical Segregation)
- Testing with Multiple Accounts
- Testing with Limited Access
- Test for Insecure Access Control Methods
- Test Segregation in Shared Infrastructure
- Test Segregation in ASP-hosted Apps
- Common String Injection
- Test for Connection String Parameter Pollution (CSPP) Attacks
- Hash Stealing: Attacker has victim connect with rogue server to steal hash
- Port Scanning
- Hijacking Web Creds
- Test for Connection Pool Dos
What are some methods for testing Session Management Vulnerabilities?
- Understand Session Management Mechanism
- Test Tokens for Meaning
- Session Token Prediction
- Perform Session Token Sniffing
- Check for Insecure Transmission of Tokens
- Check for disclosure of Tokens in Logs
- Check Mapping of Tokens to Sessions
- Test Session Termination
- Test for Session Fixation Attack
- Test for Session Hijacking
- Check for XSRF (Cross-Site Request Forgery)
- Check Cookie Scope (is cookie set to a specific domain)
- Test Cookie Attacks (Modify or steal cookie)
What is the Multistage Process?
Involves a defined sequence of requests and attempt to submit these requests out of the expected sequence.
- Check if series of stages can be accessed via a series of GET or POST requests for distinct URLs.
- Verify if multistage process involves different users performing operations on the same set of data. (take each parameter submitted by one user and submit it as another)
- Check if multistage functions are accessed out of sequence