Exploitation, Post-Exploitation, and Red Team Operations Questions
The hands-on offensive tradecraft of compromising, pivoting through, and persisting in systems while evading defenses. Covers exploit development, privilege escalation, Active Directory and Windows exploitation, lateral movement, persistence, command-and-control, and attack chaining, extending into adversary-emulation campaigns: red-team engagement planning and objectives, multi-stage attack planning, operational security for offensive operators, and detection and defense evasion including web application firewall detection and bypass. The advanced offensive-operations layer executed against real targets, where staying undetected is itself an objective, distinct from the methodical scoped-assessment workflow of a penetration test.
Explain the common memory corruption vulnerability classes a penetration tester should recognize when performing binary vulnerability research. For each class (for example: stack buffer overflow, heap overflow, use-after-free, format string, integer overflow), describe how it arises, why it can be exploitable, and a simple example of what a proof-of-concept exploit would try to achieve.
Sample Answer
Memory corruption vulnerabilities all share the same root shape: a program writes to, or reads from, memory outside the bounds the programmer intended, and the CPU has no inherent way to tell "attacker data" from "legitimate program state" once that boundary is crossed.
The five classes
| Class | How it arises | Why it's exploitable | What a proof-of-concept aims to show |
|---|---|---|---|
| Stack buffer overflow | Copying data into a fixed-size local (stack) buffer without checking the input length (e.g. strcpy into a 64-byte array from a longer input) | Overflow spills into adjacent stack memory, which can include the saved return address; corrupting that value redirects the program when the function returns | Cause a controlled crash first, then redirect execution to attacker-chosen code or an existing function |
| Heap overflow | The same unbounded write, but into dynamically allocated memory | Overwrites heap metadata or an adjacent allocated object, such as a stored function pointer in a neighboring structure | Corrupt an adjacent allocation so a later function-pointer call jumps somewhere attacker-controlled |
| Use-after-free | Memory is freed, but a dangling pointer to it is used again later | The freed slot can be reallocated for an object type the attacker controls before the dangling pointer is dereferenced, so the "old" pointer now points at attacker data | Get the program to call a virtual or function pointer that now resolves to attacker-supplied data |
| Format string | User input is passed directly as the format argument to a printf-style function instead of as data (printf(input) instead of printf("%s", input)) | Format specifiers like %x read stack values that were never meant to be exposed, and %n can write to an address the attacker names | Leak stack memory (an information disclosure primitive) or write a controlled value to a chosen address |
| Integer overflow | An arithmetic operation on a size or length wraps past its type's maximum, so a "too large" check passes because the value wrapped around to something small | A downstream allocation ends up undersized relative to how much data is later copied into it, producing a secondary overflow that a naive size check thought it had prevented | Trigger the undersized allocation, then the buffer overflow that check believed was impossible |
Worked example (stack overflow, the clearest case)
char buf[64]; strcpy(buf, input); where input is attacker-controlled and 200 bytes long. The extra 136 bytes land past buf in memory the function never allocated for it, which on many calling conventions includes the saved return address; when the function returns, execution jumps to whatever value now sits where that address used to be.
Trade-offs and pitfalls
Modern binaries stack multiple mitigations (stack canaries (a secret guard value placed just before a function's saved return address, so an overflow that overwrites it is caught before the function returns), ASLR (address space layout randomization, which randomizes memory addresses each run so an attacker cannot hardcode them), DEP/NX (which marks data memory non-executable so injected code will not run), and increasingly control-flow integrity (which restricts where execution is allowed to jump)) that make raw exploitation of these classes substantially harder than the textbook description suggests. An interviewer asking this question is testing root-cause reasoning, not whether you can weaponize a fully hardened target from scratch; claiming "this class is trivially exploitable" without acknowledging that mitigations exist and change the calculus is the most common wrong turn.
List operational security (OPSEC) measures a red team must follow during planning and execution to avoid accidental exposure of capabilities or harming the client. Cover both technical controls (e.g., isolation, logging) and human controls (e.g., need-to-know, handling of credentials).
Sample Answer
Direct answer
Red-team operational security (OPSEC) is the discipline that keeps the engagement itself from becoming the incident: it protects the client from accidental real-world harm, protects the firm's tradecraft and other clients from exposure, and protects the individual operator. It splits into technical controls over the infrastructure and data the team touches, and human or process controls over who knows what and how people behave.
Technical controls
- Infrastructure isolation. Use dedicated, disposable command-and-control and attack infrastructure (redirectors, domains, virtual servers) per engagement, never reused across clients, so a compromise or takedown on one job can't cross-contaminate another client's data or unmask the team's techniques for a future job.
- Attribution hygiene. Register engagement infrastructure so it doesn't obviously trace back to the firm or reveal a pattern a target's defenders, or an unrelated third party, could fingerprint and reuse against a different engagement.
- Logging and an audit trail. Keep a timestamped record of every action taken against the target, stored separately from the offensive tooling itself and access-controlled. This is what lets the team answer "did we cause that outage" definitively instead of guessing, and it's the artifact a client's incident responders will ask for if something breaks.
- Minimal-footprint data handling. Capture only enough evidence to prove a finding, such as a hash of a record or a single screenshot, rather than bulk copies of production data, so the red team itself never becomes a data-breach liability, and encrypt whatever is captured at rest.
- A real stop condition. Maintain a way to immediately pull an implant or shut down infrastructure if the target signals a production-impacting event, and watch for signs the test itself is degrading a system before the client has to raise it.
Human controls
- Need-to-know. Only the operators actually running the engagement know its target, scope, and planned techniques in detail; internal briefings don't spread tradecraft specifics to people who don't need them for their part of the job, limiting how much a single leak or mistake can expose.
- Credential handling. Anything captured during the engagement (cracked passwords, session tokens, API keys) lives in an encrypted, access-controlled vault, never in plaintext chat or shared notes, and is destroyed at engagement close rather than kept "in case it's useful later" or reused against a different client.
- A verified emergency contact. Agree on a specific point of contact on the client side before testing starts, confirmed through a channel that can't easily be spoofed, so if something goes wrong the team reaches a real decision-maker immediately rather than discovering the right person mid-crisis.
- Signed rules of engagement, followed literally. Scope, timing windows, and prohibited actions are written down and referenced during execution; any change to scope gets a fresh sign-off, never a verbal go-ahead from someone the team assumes has the authority.
- Personal operator hygiene. Operators keep engagement specifics off public channels, social media, and personal devices, and use engagement-specific accounts and personas rather than their personal identity, since an operator's own digital footprint can unmask an operation the infrastructure hygiene above was designed to protect.
Worked example
During a phishing sub-operation against a mid-size company, an operator obtains one employee's password. Handled correctly, the credential goes straight into the engagement's encrypted vault with a timestamp and a note that it was used only to validate access, visible only to the operators on that engagement, and deleted once the client accepts the final report. Handled without this discipline, the same credential gets pasted into a general team chat channel visible to people with no need to know, gets screenshotted into a slide deck for an internal debrief, or quietly gets reused two months later on an unrelated assessment because it was still sitting in someone's notes. The technique that captured the credential is identical in both cases; the OPSEC discipline is entirely about what happens to it afterward.
Trade-offs and pitfalls
Compartmentalization has a real cost: too much of it slows collaboration and creates a single-point-of-failure problem if the one person who knows the full scope is unavailable mid-engagement, so most teams designate a documented backup rather than restricting knowledge to one individual. The most common conceptual pitfall is conflating OPSEC with defense evasion: a team can be excellent at not getting caught by the target's detection tools while still being sloppy about internal infrastructure reuse or plaintext credentials in chat, an OPSEC failure that has nothing to do with how well the team evaded the target's defenses. The most common practical pitfall is treating "the report shipped" as the finish line: an engagement isn't actually closed until captured data and credentials are destroyed and infrastructure is decommissioned, and skipping that step is one of the most frequent real-world OPSEC lapses.
Outline how you would use MITRE ATT&CK to design a red team exercise targeted at testing detection capability for credential theft and lateral movement. Include objectives, selected techniques (with IDs), scope/constraints, allowed actions, and success metrics/stop conditions.
Sample Answer
Direct answer
A strong exercise starts from a clear detection-outcome objective, not a "get Domain Admin" objective: pick a small, connected set of real MITRE ATT&CK (Adversarial Tactics, Techniques, and Common Knowledge) techniques that chain credential theft into lateral movement, run them from an assumed-breach foothold inside a tightly scoped segment, and measure what the security operations center (SOC) and endpoint detection and response (EDR) tooling actually caught, not whether the team reached the final target.
Objectives
- Primary: measure whether the SOC and EDR pipeline detects and correctly triages a realistic credential-theft-to-lateral-movement chain, not whether the attacker "wins."
- Secondary: identify which specific step in the chain is the actual detection gap, so remediation is targeted instead of a vague "buy more tooling" recommendation.
- Non-objective (explicitly out of scope): full external initial-access simulation, real data exfiltration, or techniques outside the credential and lateral-movement kill chain.
Selected techniques (MITRE ATT&CK, real technique IDs)
| Tactic | Technique | ID | What it does |
|---|---|---|---|
| Credential Access (TA0006) | OS Credential Dumping: LSASS Memory | T1003.001 | Reads credential material cached in the Local Security Authority Subsystem Service (LSASS) process on a compromised workstation |
| Credential Access (TA0006) | Steal or Forge Kerberos Tickets: Kerberoasting | T1558.003 | Requests a service ticket for an account with a Service Principal Name and cracks it offline to recover that account's password |
| Credential Access (TA0006) | OS Credential Dumping: DCSync | T1003.006 | Abuses domain-replication permissions to pull password hashes directly from a domain controller without touching disk |
| Lateral Movement (TA0008) | Use Alternate Authentication Material: Pass the Hash | T1550.002 | Authenticates to another host using a captured password hash instead of the plaintext password |
| Lateral Movement (TA0008) | Remote Services: SMB/Windows Admin Shares | T1021.002 | Moves to a new host over the Server Message Block (SMB) file-sharing protocol using administrative shares |
| Defense Evasion / Persistence / Privilege Escalation / Initial Access | Valid Accounts: Domain Accounts | T1078.002 | Uses a legitimate domain account, harvested earlier in the chain, instead of malware, to blend into normal authentication traffic |
Six techniques across two tactics is deliberately small. A detection-validation exercise should isolate variables, not showcase every technique the team knows.
Scope and constraints
- Start position: assumed breach. The team is handed a low-privileged domain user account on one workstation rather than spending days on external initial access, because the objective is detecting what happens AFTER a foothold exists, not gaining one.
- Target segment: one named subnet or object set (for example, one office's workstation range plus one file server), never "the whole domain," so an unexpected finding does not turn into an unscoped incident.
- Time box: a fixed window, commonly one to two weeks, agreed in advance with the client's trusted agent (the single client-side contact read into the fact the exercise is live).
- Explicitly disallowed: disabling or evading the EDR agent itself, using unvalidated custom exploit code, and any technique outside the six listed above.
Allowed actions and rules of engagement
- The team may attempt each listed technique against in-scope hosts using well-known, widely documented tooling, not custom or unstable code.
- The trusted agent has a pre-agreed channel and a kill-switch phrase to pause testing immediately if something looks like it is affecting production.
- The team documents the exact time and host for each technique attempt in near real time, independent of whether it succeeds, so the client can later correlate any real alert against the known test timeline.
Success metrics and stop conditions
- Detection coverage: of the six techniques attempted, how many produced an actionable SOC alert. As an illustrative example, if 4 of 6 produce an alert, coverage is 4/6, about 67%, which points at exactly which two steps are blind spots instead of giving one vague overall score.
- Mean time to detect (MTTD): the time from technique execution to the first correctly triaged SOC alert for that technique, where one fires at all.
- Triage accuracy: whether the SOC correctly identified the technique's category (credential access versus lateral movement) rather than logging it as generic "suspicious process," since accurate triage drives the right response.
- Stop conditions: the trusted agent invokes the kill switch, a technique causes unintended production impact (for example, a service disruption from repeated Kerberos ticket requests), or the team reaches the pre-agreed final objective (for example, a successful DCSync run from a simulated Domain Admin-equivalent account) without the SOC having reacted to it, at which point testing pauses for a live purple-team debrief instead of escalating further.
flowchart TD
A["Define objectives: validate detection of credential theft and lateral movement"] --> B["Scope and rules of engagement: assumed-breach foothold, target segment, blast-radius limits"]
B --> C["Select ATT&CK techniques: T1003.001, T1003.006, T1558.003, T1550.002, T1021.002, T1078.002"]
C --> D["Execute chain against scoped hosts"]
D --> E{"SOC or EDR detects this step?"}
E -->|Yes| F["Log detection, continue or pause per rules of engagement"]
E -->|No| G["Continue chain toward objective"]
F --> H["Reach stop condition or objective"]
G --> H
H --> I["Purple-team debrief: map ATT&CK coverage and detection gaps"]
Trade-offs and pitfalls
- Assumed breach versus a full chain from external recon: assumed breach is faster and isolates the detection question, but it never tests whether the SOC would have caught the actual initial access; a mature program eventually needs both.
- Generic ATT&CK technique selection, as described above, versus threat-informed emulation of one named adversary group's specific tool set and sequencing: the latter, run with a platform like MITRE CALDERA or Atomic Red Team mapped to a specific group's known tactics, techniques, and procedures (TTPs), is the more rigorous version of this exercise, but it is a heavier, senior-specialist undertaking that most organizations do not need for a first detection-validation pass.
- Grading the exercise on whether the team reached Domain Admin instead of on whether each technique got detected rewards stealth over the actual purpose of the test and leaves the SOC with nothing actionable.
- Skipping live documentation is a common miss: without a timestamped log of exactly what was attempted and when, a genuine unrelated incident during the test window can get misread as caused by the red team, or the reverse.
Given a well-segmented enterprise network using VLANs, ACLs, and jump hosts, explain realistic methods attackers might use to bypass segmentation and pivot (credential reuse, abused trust, misconfigured ACLs, proxying/tunneling). For each method propose specific design or operational controls (network, host, identity) to prevent or detect that bypass.
Sample Answer
Network segmentation constrains paths, not identity trust, and most realistic bypasses exploit the fact that identity and application-layer trust routinely cross the same boundaries the network layer is trying to enforce.
Realistic bypass methods
- Credential reuse across segments. An administrator with local-admin rights on both a workstation subnet and a "protected" server subnet bridges them regardless of what the network ACLs say, because the attacker doesn't need a new network path if a session that's already trusted on both sides exists. In a hybrid environment combining on-premises Active Directory with cloud identity, this shows up in a distinct and increasingly common shape: an on-premises service account credential that is also synced or federated into a cloud identity provider lets an attacker pivot from an on-prem foothold straight into cloud resources without crossing any network-layer control at all. BloodHound is the tool of choice for surfacing exactly which cross-segment credential-reuse and delegation paths exist ahead of time, rather than discovering them by trial and error during the engagement.
- Abused trust relationships. Jump hosts and management subnets are, by design, allowed through segmentation for administrative tooling. WinRM (Windows Remote Management, the protocol underlying PowerShell remoting) is a canonical example: it's routinely permitted from an admin subnet into a protected subnet for legitimate management, so an attacker who lands on the admin subnet inherits that already-allowed path for free.
- Misconfigured ACLs. Overly broad rules left over from a migration, or a rule scoped to an entire subnet when it was only ever meant to cover one host.
- Proxying and tunneling. Once inside any single trusted segment, an attacker can chain a proxy or port-forward through a compromised pivot host to reach systems the original foothold could never route to directly, effectively laundering unauthorized traffic through a host's already-permitted path.
Path diagram
graph LR
A[Admin subnet] -->|WinRM allowed| B[Jump host]
B -->|Trusted management path| C[Protected server subnet]
A -->|Synced credential| D[Cloud identity provider]
D -->|Federated trust| E[Cloud resources]
Controls for each method
- Credential reuse: a tiered administration model, where a high-privilege credential is never used to log into a lower-tier system, and for the hybrid case specifically, avoid syncing high-privilege on-premises accounts into the cloud identity provider at all, or gate that sync behind conditional access and multi-factor authentication (MFA, a login requiring more than one proof of identity).
- Abused trust (WinRM/jump hosts): restrict WinRM listeners to accept connections only from designated jump hosts, require a distinct hardened credential for jump-host use rather than a user's everyday account, and alert on any WinRM session originating outside the approved jump-host range.
- Misconfigured ACLs: periodic review of firewall and ACL rules against an intended-state baseline, ideally with automated drift detection.
- Tunneling: egress filtering and protocol-anomaly inspection at internal segment boundaries, not only at the internet edge, since tunneled traffic is often deliberately shaped to mimic an already-allowed protocol.
Precautions to avoid impacting business services
When validating a bypass like this in a live hybrid AD-plus-cloud environment, schedule anything potentially disruptive (adding a test account to a group, forcing a credential change) outside business-critical windows, prefer read-only or benign proof where possible (confirming reachability with a harmless connectivity check rather than actually executing an administrative action), and coordinate any step that touches a protected subnet, such as exercising the jump-host path into a finance-critical system, with the client's operations contact ahead of time, so a resulting alert or minor service blip during the test isn't mistaken for a real incident and doesn't trigger an unplanned failover.
Trade-offs and pitfalls
Segmentation gives a false sense of security when it's evaluated purely as a network diagram; the identity layer, especially in a hybrid on-prem-plus-cloud environment where sync relationships are easy to lose track of, is where most real bypasses actually live. A common wrong turn is recommending "add more network ACLs" as the fix to what is actually an identity and credential-scoping problem.
Walk through a plausible exploitation chain in an Active Directory environment from initial foothold to Domain Admin. Discuss common misconfigurations and weaknesses exploited (e.g., weak lateral creds, unpatched services, unconstrained delegation), Kerberos abuses (pass-the-hash, overpass-the-hash, silver/golden tickets) conceptually, and mitigations to prevent each step.
Sample Answer
Direct answer
A realistic Active Directory (AD) compromise chain moves through five connected stages: an initial foothold, credential reuse across hosts enabled by weak or shared local credentials, exploitation of an unpatched internal service to reach a new host, abuse of delegation misconfiguration to steal a high-value cached ticket, and finally domain-wide ticket forgery for durable, any-account access. Each stage only matters because of what it enables in the NEXT stage, which is the actual thing interviewers are listening for.
Structured elaboration
flowchart LR
A[Initial foothold] --> B[Weak lateral credentials:<br/>pass-the-hash / overpass-the-hash]
B --> C[Unpatched internal service:<br/>code execution on new host]
C --> D[Unconstrained delegation abuse:<br/>steal cached high-value ticket]
D --> E[DCSync-style hash extraction]
E --> F[Golden or Silver Ticket:<br/>durable Domain Admin access]
- Weak lateral credentials. If local administrator passwords are shared, or a service account's password is weak and reused, an attacker who captures a credential hash on one host can reuse it directly against others through pass-the-hash, expanding the foothold without ever cracking a password. Overpass-the-hash is a close variant: instead of presenting the NTLM (NT LAN Manager) hash directly, the attacker uses it to request a legitimate Kerberos Ticket Granting Ticket for that account, converting an NTLM-style credential into a Kerberos ticket, useful specifically in environments that have hardened against classic pass-the-hash but not against this conversion.
- Unpatched service exploitation. An internal, unpatched service, especially a legacy management or file-sharing service with a known remote-execution flaw, can hand the attacker code execution on a new host, sometimes under a service account with unexpectedly broad domain rights.
- Unconstrained delegation abuse. A server configured with unconstrained delegation caches a copy of the Ticket Granting Ticket of ANY user who authenticates to it. If a Domain Admin (or any high-value account) ever logs into or authenticates against that server for routine administrative reasons, an attacker who already has code execution there can extract that cached ticket and impersonate the Domain Admin directly. This is one of the most direct real-world paths from "compromised ordinary server" to "Domain Admin."
- Directory-replication abuse and ticket forgery. With Domain-Admin-equivalent access in hand, the attacker can extract the domain's ticket-signing account's secret through a directory-replication abuse that mimics a domain controller's own routine hash-sync request, then forge a Golden Ticket for durable, any-account access, or a narrower Silver Ticket scoped to just one service using that service's own account hash.
Worked example
A phished, ordinary domain user's workstation shares a local administrator password with every other workstation in the fleet. The attacker dumps that local hash and reuses it (pass-the-hash) across the fleet until they land on a host running an unpatched legacy service, gaining code execution as that service's account. That service account happens to have an interactive logon history to a file server configured with unconstrained delegation, so a Domain Admin's own routine login to that file server, sometime during the assessment window, leaves a cached ticket the attacker extracts and uses directly, reaching Domain Admin without ever guessing a Domain Admin password.
Mitigations, mapped to each stage: unique local administrator passwords per machine to stop credential-reuse lateral movement; timely patching and network segmentation to shrink the unpatched-service surface; replacing unconstrained delegation with constrained or resource-based constrained delegation to remove the cached-ticket-theft path entirely; a tiered administration model that ensures a Domain Admin credential never authenticates to a lower-tier server in the first place; and monitoring plus a KRBTGT rotation policy to catch and blunt directory-replication abuse before it produces a durable forged-ticket foothold.
Trade-offs and pitfalls
Candidates often describe each technique correctly in isolation but fail to connect WHY one stage enables the next, for example explaining unconstrained delegation as dangerous in the abstract without noting that it is only dangerous because something valuable eventually authenticates to that specific box. Interviewers are testing chain reasoning here, not technique trivia.
Unlock Full Question Bank
Get access to all 32 Exploitation, Post-Exploitation, and Red Team Operations interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.