RnW_WEB
RnW_WEB
Introduction To Web
Application Security Testing
Course Introduction
+ Understanding of Web Application
Course +
+
Web Application Architecture
Understanding of Web Application Security
Topic +
+
Web Application Testing Basics
OWASP TOP 10
Overview +
+
Reporting & Mitigation
Bug Bounty
Basic familiarity with Linux.
Familiarity with Cyber Security Prerequisites
terms and concepts.
CAPTAIN
GET The GET method is used to retrieve data from the server. It requests the resource specified in the URL and does not modify the server's state. It is
a safe and idempotent method, meaning that making the same GET request multiple times should not have any side effects.
The POST method is used to submit data to be processed by the server. It typically includes data in the request body, and the server may perform
POST
actions based on that data. POST requests can cause changes to the server's state, and they are not idempotent.
The PUT method is used to update or create a resource on the server at the specified URL. It replaces the entire resource with the new
PUT
representation provided in the request body. If the resource does not exist, PUT can create it.
The DELETE method is used to remove the resource specified by the URL from the server. After a successful DELETE request, the resource will
DELETE
no longer be available at that URL.
PATCH The PATCH method is used to apply partial modifications to a resource. It is similar to the PUT method but only updates specific parts of the
resource rather than replacing the entire resource.
HEAD The HEAD method is similar to the GET method but only retrieves the response headers and not the response body. It is often used to check the
headers for things like resource existence or modification dates.
OPTIONS The OPTIONS method is used to retrieve information about the communication options available for the target resource. It allows clients to
determine the supported methods and headers for a particular resource.
Common HTTP Status Code
1xx - Informational:
1. 100 Continue: Indicates the initial part of a request has been received and the
client can continue.
2xx - Success:
1. 200 OK: The request was successful, and the server returned the desired data.
2. 201 Created: The request was successful, and a new resource was created.
3. 204 No Content: The request was successful, but there is no content to return.
Common HTTP Status Code
3xx - Redirection:
1. 301 Moved Permanently: The requested resource has been permanently
moved to a new URL.
2. 302 Found: The requested resource resides temporarily at a different URL.
3. 304 Not Modified: The requested resource has not been modified since the last
request.
Common HTTP Status Code
vulnerabilities.
Understanding of
Web Application Security
Fundamental of Web Applications Security
The primary aim of web application security is to ensure the CIA triad:
Confidentiality: Protecting sensitive information from unauthorized access.
Example: Preventing unauthorized users from viewing data or credit card details.
Cross-Site Scripting (XSS) Attackers inject malicious scripts into web pages viewed by other users, leading to unauthorized access to user
data, session hijacking, and browser manipulation.
Attackers manipulate user input to inject malicious SQL code into the application's database, leading to
SQL Injection (SQLi)
unauthorized data access, data manipulation, or database compromise.
Attackers trick authenticated users into unknowingly performing actions on a web application, such as changing
Cross-Site Request Forgery (CSRF)
account details, by exploiting their active sessions.
Improperly configured servers, databases, or application frameworks can expose sensitive data or provide entry
Security Misconfigurations
points for attackers.
Sensitive Data Exposure Failure to adequately protect sensitive data, such as passwords or personal information, can lead to data
breaches and identity theft.
Brute-Force and Credential Stuffing Attacks Attackers use automated tools to guess usernames and passwords, attempting to gain unauthorized access to
user accounts.
File Upload Vulnerabilities Insecure file upload mechanisms can enable attackers to upload malicious files, leading to remote code
execution or unauthorized access to the server.
CAPTAIN
Common Web Application Threats & Risks
Threat/Risk Description
Denial-of-Service (DoS) and Distributed Denial- DoS and DDoS attacks aim to overwhelm web application servers, causing service disruptions and denying
of-Service (DDoS) legitimate users access.
Server-Side Request Forgery (SSRF) Attackers use SSRF to make requests from the server to internal resources or external networks, potentially
leading to data theft or unauthorized access.
Inadequate Access Controls Weak access controls may allow unauthorized users to access restricted functionalities or sensitive data.
Using Components with Known Vulnerabilities Integrating third-party components with known security flaws can introduce weaknesses into the web application.
Broken Access Control Inadequate access controls can allow unauthorized users to access restricted functionalities or sensitive data.
CAPTAIN
CAPTAIN
LAB SETUP
Tools
Kali Linux
Burp Suite
OWASP ZAP
NESSUS
NMAP
FEROXBUSTER
SQLMAP
NIKTO
OWASP TOP 10
Broken Access Control
2. Cryptographic Failures
This refers to the improper implementation of cryptographic mechanisms,
leading to exposure of sensitive data such as passwords, credit card numbers,
or API keys.
Examples:
Storing passwords in plain text.
Using outdated or weak encryption algorithms like MD5.
Mitigation: Use modern encryption standards (e.g., AES-256, RSA-2048), ensure
proper key management, and enforce HTTPS.
Injection
3. Injection
Injection vulnerabilities occur when untrusted data is sent to an interpreter as
part of a command or query, allowing attackers to execute malicious code.
Examples:
SQL Injection through unsanitized input fields.
Command Injection via shell commands.
Mitigation: Use parameterized queries, stored procedures, and input validation.
Insecure Design
5. Security Misconfiguration
This occurs when security settings are improperly configured, exposing the
application to unnecessary risks.
Examples:
Default credentials left unchanged.
Unnecessary features like directory listing enabled.
Mitigation: Regularly review and update configurations, disable unused
features, and apply the principle of least privilege.
Vulnerable and Outdated Components
SSRF occurs when an attacker tricks the server into making unintended
requests to external or internal systems, potentially exposing sensitive
information or causing harm.
Examples:
Exploiting a file upload feature to make unauthorized HTTP requests.
Querying internal services like metadata endpoints.
Mitigation: Validate and sanitize user inputs, implement allow lists for URLs, and
enforce network segmentation.
Bug Bounty
How It Works:
1. Companies Set Up a Bug Bounty Program
They define the scope (which systems can be tested).
They list the types of vulnerabilities they are interested in.
They specify reward amounts based on the severity of the bugs.
2. Hackers Search for Vulnerabilities
Security researchers test the system using ethical hacking techniques.
They follow responsible disclosure policies.
3. Reporting and Validation
Hackers report the found vulnerabilities.
The company's security team verifies and confirms the bug.
4. Rewards and Fixes
The hacker gets paid based on the severity of the bug (low, medium, high, critical).
The company fixes the vulnerability to improve security.