Exploitation is attempting to actually leverage a discovered weakness (from scanning-and-enumeration) to gain access or capability the tester wasn’t meant to have. This note covers the major categories of vulnerability and why each one works mechanically — the conceptual grounding needed to understand a finding and its report, not a library of ready-to-fire payloads against a live target.

Injection vulnerabilities

Occur when untrusted input is passed into an interpreter (a database query, a shell command, a template engine) without being properly separated from that interpreter’s own syntax — the interpreter ends up executing part of the attacker’s input as code/commands rather than treating it purely as data.

SQL injection, the classic example: a query built by directly concatenating user input into SQL syntax.

-- vulnerable pattern (conceptual, illustrative):
query = "SELECT * FROM users WHERE username = '" + input + "'"

-- if input is:  ' OR '1'='1
-- the resulting query becomes:
SELECT * FROM users WHERE username = '' OR '1'='1'
-- '1'='1' is always true, so the WHERE clause matches every row instead of one specific user

The fix — parameterized queries — is why this class of bug is well-understood and largely preventable: the input is passed as data to a placeholder, never concatenated into the query’s syntax at all, so there’s no ambiguity between “code” and “data” for an attacker to exploit.

Command injection, template injection, and LDAP injection are the same underlying pattern (unescaped input reaching an interpreter) applied to different interpreters.

Broken authentication & session management

Weaknesses in how a system verifies identity and maintains that verification across requests: weak or default credentials, predictable session tokens, sessions that don’t expire, missing multi-factor authentication, or password reset flows with logic flaws. Often the highest-value finding in a real engagement, since a successful login bypasses the need for any other vulnerability entirely.

Cross-Site Scripting (XSS)

Occurs when a web application includes untrusted input in a page’s output without properly encoding it, letting an attacker’s input execute as script in another user’s browser — a violation of the assumption that content on a page comes only from the site itself.

<!-- vulnerable pattern, conceptual: user input reflected directly into HTML -->
<p>Search results for: <script>/* attacker-supplied input, unescaped */</script></p>

The impact ranges from defacement to session hijacking (stealing another user’s session token), depending on what the script is able to access.

Broken access control / privilege escalation

Occurs when a system fails to properly enforce that a user can only access what they’re authorized to — a regular user accessing another user’s data by changing an ID in a URL (a specific, common case called an Insecure Direct Object Reference), or a low-privilege user finding a path to admin-level actions. This is consistently one of the most common real-world findings, precisely because access control has to be enforced correctly on every relevant action, and a single missed check anywhere is enough.

Memory-safety vulnerabilities (buffer overflows and similar)

In languages without automatic memory safety (C, C++), writing more data into a fixed-size memory buffer than it was allocated to hold can overwrite adjacent memory — including, in the classic case, the return address that tells a program where to resume execution after a function call, letting a carefully crafted overflow redirect execution to attacker-controlled code. This class of bug is why memory-safe languages (Rust, and garbage-collected languages generally) structurally eliminate an entire category of vulnerability that C/C++ code remains exposed to.

Misconfigurations

Not a coding bug at all — a system that’s working exactly as configured, but configured insecurely: default credentials left unchanged, unnecessary services left running and exposed, overly permissive cloud storage settings, verbose error messages that leak internal details. Frequently the easiest category of finding to identify and among the most common in real engagements, since it requires no clever exploit development at all — just checking whether obvious hardening was done.

The OWASP Top 10 — a standard reference, not a full inventory

The OWASP Top 10 is a widely referenced, periodically updated list of the most critical web application security risks, covering the categories above and a few others (security misconfiguration, vulnerable/outdated components, insufficient logging). Worth knowing as the field’s common vocabulary and a reasonable starting checklist — not an exhaustive list of every possible vulnerability class, and real engagements go well beyond it.

Gotchas

  • Understanding why a vulnerability class works mechanically (as covered above) is what actually transfers to new, never-seen-before findings — memorizing specific known exploits transfers far less, since exact payloads are constantly patched and vary by target.
  • A vulnerability existing doesn’t automatically mean it’s exploitable in practice (a WAF, additional validation elsewhere, or a mitigating configuration can block it) — verifying actual exploitability, not just theoretical presence, is part of what separates a thorough test from a raw vulnerability scan (see scanning-and-enumeration).
  • Every action in this phase must stay within agreed scope and authorization (see rules-of-engagement-and-legal) — the same technique is either a legitimate, valuable finding or a crime, depending entirely on whether it was authorized.
↑ Back to Ethical Hacking