Web Application Attacks
Summary
PDF p.228Web application attacks target applications accessible over the Internet, exploiting vulnerabilities to gain unauthorized access, steal data, disrupt services, or perform other malicious activities. These attacks often exploit poor input validation, misconfigured security settings, and outdated software.
In plain words
Supplementary — not from your PDFWeb apps are reachable by anyone on the Internet, so weak input validation, misconfigurations and old software are quickly abused. Session problems include predictable session IDs, session fixation and session hijacking. Cross-site scripting (XSS) abuses the browser's trust in a site to run injected script: reflected XSS comes through a crafted link, stored XSS is saved in the site's data, and DOM-based XSS lives in client-side scripts. SQL injection abuses unsafe query building to read or change database data. Defenses: validate input, encode output, use parameterized queries, manage sessions securely, and add a WAF.
Detailed explanation
PDF p.228-
Characteristics
- Exploitation: Poor input validation, misconfigured security settings, outdated software.
- Client-Server Model: Requires bypassing network and application-level security controls.
- Remote Exploitation: Can be exploited by any attacker on the Internet.
-
Session Management
- HTTP Statelessness: Each request is independent; sessions managed using cookies or session IDs.
- Improper Management: Predictable session IDs, session fixation, session hijacking.
-
Cross-Site Scripting (XSS)
- Definition: Exploits the browser's trust in scripts from a trusted site.
-
Types
- Reflected (Nonpersistent): Malicious input from a crafted link.
- Stored (Persistent): Malicious code inserted into a back-end database or content management system.
- DOM-Based: Exploits vulnerabilities in client-side scripts manipulating the Document Object Model (DOM).
- Impact: Defacing sites, stealing cookies, intercepting information, installing malware.
-
SQL Injection (SQLi)
- Definition: Exploits insecure processing of requests and queries.
- Impact: Extract or insert information into the database, execute arbitrary code.
- Example: Modifying SQL queries to return all user records or change fields.
Important terms
taken from the text above- Exploitation
- Poor input validation, misconfigured security settings, outdated software.
- Client-Server Model
- Requires bypassing network and application-level security controls.
- Remote Exploitation
- Can be exploited by any attacker on the Internet.
- HTTP Statelessness
- Each request is independent; sessions managed using cookies or session IDs.
- Improper Management
- Predictable session IDs, session fixation, session hijacking.
- Cross-Site Scripting (XSS)
- Exploits the browser's trust in scripts from a trusted site.
- Reflected (Nonpersistent)
- Malicious input from a crafted link.
- Stored (Persistent)
- Malicious code inserted into a back-end database or content management system.
- DOM-Based
- Exploits vulnerabilities in client-side scripts manipulating the Document Object Model (DOM).
- SQL Injection (SQLi)
- Exploits insecure processing of requests and queries.
Examples & real-world scenarios
Supplementary — not from your PDF- Parameterized queries so user input is never treated as SQL code.
- Output encoding so user-supplied text is shown, not executed.
- Random session IDs with the HttpOnly and Secure cookie flags.
Scenario
Reviewing web server logs, an analyst sees form submissions containing database query syntax in a name field. That's an indicator of attempted SQL injection. The fix is parameterized queries in the code, with a WAF as an extra layer.
Common mistakes
Supplementary — not from your PDF- Mixing up stored XSS (saved on the server) and reflected XSS (delivered through a link).
- Relying on client-side validation alone. It can be bypassed, so the server must validate too.
Practical skills
Supplementary — not from your PDF- Explain XSS and SQL injection and their main defenses.
- Recognize injection indicators in web logs.
What I should remember
Key Points PDF p.228-
Characteristics
- Exploitation: Input validation, security settings, software updates.
- Client-Server Model: Bypass security controls.
- Remote Exploitation: Internet-accessible.
-
Session Management
- HTTP Statelessness: Independent requests.
- Improper Management: Predictable IDs, fixation, hijacking.
-
Cross-Site Scripting (XSS)
- Definition: Browser trust in scripts.
- Types: Reflected, stored, DOM-based.
- Impact: Defacing, stealing data, intercepting info, malware.
-
SQL Injection (SQLi)
- Definition: Insecure request processing.
- Impact: Database manipulation, arbitrary code execution.
- Example: Modifying SQL queries.