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.
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.
Describe the differences between a Kerberos TGT (Ticket Granting Ticket) and service (TGS) tickets. Then briefly explain Kerberoasting: what an attacker requests, how an attacker extracts offline password material, and a high-level defense that reduces its effectiveness.
Sample Answer
Direct answer
A Ticket Granting Ticket (TGT) is issued once, after a client proves knowledge of their password to the domain's Key Distribution Center (KDC), and lets the client request further tickets without re-entering credentials. A service ticket (issued by the KDC's Ticket Granting Service, hence TGS) is requested afterward, using the TGT, for one specific service, and it is encrypted with a key derived from THAT SERVICE ACCOUNT's password, not the domain's own signing key. That single difference is exactly what makes Kerberoasting possible.
Structured elaboration
- TGT. Obtained through an initial authentication exchange with the KDC. It is encrypted with a key derived from the secret of the domain's ticket-signing account (commonly called KRBTGT). Its purpose is to let the client repeatedly ask for service tickets without re-proving their password each time.
- TGS (service ticket). Requested from the KDC using a valid TGT, for a specific service identified by its Service Principal Name (SPN). Critically, this ticket is encrypted with a key derived from the TARGET SERVICE ACCOUNT's own password hash, because that service, not the domain controller, needs to be able to validate it.
- Kerberoasting. Because any authenticated domain user, no matter how low-privileged, can request a service ticket for any account that has a registered SPN, an attacker only needs ordinary domain credentials to request tickets for high-value service accounts, which are frequently over-privileged and configured with old, never-rotated passwords. The attacker takes the returned ticket offline and attempts to guess the service account's password by checking which candidate password would produce the correct encryption key, entirely without touching the domain controller again after the initial request, so there's no lockout risk from repeated failed guesses.
- High-level defense. Require long, random, regularly rotated passwords for service accounts, or migrate them to a managed account type where the domain itself generates and rotates a long random secret instead of a human choosing one. Disabling the older, weaker ticket encryption type in favor of a modern one also makes offline password recovery far more computationally expensive.
Worked example
A newly compromised, ordinary domain user account requests service tickets for every account in the domain that has a registered SPN, a request that is entirely legitimate-looking from the domain controller's point of view. One of those service tickets belongs to a database service account whose password was set five years ago and never rotated. The attacker takes that ticket offline and, because the password is a common dictionary word with a year appended, recovers it within a short offline attempt, gaining that service account's full set of privileges without ever alerting the domain controller.
Trade-offs and pitfalls
A frequent misconception is that Kerberoasting requires administrative or Domain Admin rights to attempt; it doesn't, it only requires any valid domain credential, which is exactly what makes it dangerous as an early-stage technique rather than a late-stage one. A second common gap is describing the offline password-guessing step without explaining why it can happen offline at all, namely that the ticket's encryption key is derived from the service account's password, so the attacker never needs to interact with the domain controller during the guessing phase.
What are the common ways an attacker establishes persistence on a compromised Linux host during host triage, and what artifacts would each leave behind for a defender to find?
Sample Answer
Direct answer
On a compromised Linux host, the common persistence mechanisms are scheduled execution (cron jobs or systemd timers), a malicious systemd service, shell startup file modification, SSH key injection, legacy boot scripts, and, at the most severe end, a backdoored kernel module. Each leaves a distinguishable artifact, though the highest-severity option is specifically designed to hide its own artifacts.
Structured elaboration
- Cron jobs and systemd timers. An entry added to the system crontab, a user's crontab, or a systemd timer unit that relaunches the implant. Artifact: the crontab entry itself, or a timer/service unit file, plus execution history in system logs.
- Systemd services. A malicious unit file installed to start at boot. Artifact: the unit file on disk, and its start events in the system journal.
- Shell startup file modification (a user's shell configuration file, or a system-wide profile script). Appending a command that runs whenever a shell starts. Artifact: an unexpected addition to an otherwise-static file, often visible as an unusual modification timestamp relative to the file's normal change history.
- SSH authorized-keys injection. Adding an attacker-controlled public key to a user's list of keys allowed to log in without a password. Artifact: an unexpected key entry, identifiable by comparing its comment or fingerprint against known legitimate operator keys, plus authentication log entries showing key-based logins from unfamiliar source addresses.
- Legacy boot scripts. Older init-time script hooks that some systems still execute at startup. Artifact: modified script content and its execution timestamp.
- Backdoored kernel modules or rootkits. The most severe option, since a loaded kernel module can provide both persistence and active concealment of files, processes, or network connections from the host's own normal tools. Artifact: an unexpected entry in the list of loaded kernel modules, kernel log anomalies, or a mismatch against known-good module hashes during an integrity check. The core difficulty is that a well-built rootkit actively hides these very artifacts from the live system's own tools, which is why detecting one often depends on offline or out-of-band forensic analysis rather than trusting anything the compromised host reports about itself.
Worked example
A defender reviewing a suspected-compromised host checks the obvious places, cron and systemd services, and finds nothing unusual. A closer review of a specific administrative user's authorized-keys file turns up an extra public key with no matching comment or known owner, and the authentication log shows successful key-based logins from an unfamiliar external address on a regular, unattended schedule, exactly the pattern an SSH-key backdoor produces and one that is easy to miss if the investigation stops at the more commonly-checked locations.
Trade-offs and pitfalls
SSH key persistence is quiet, simple, and frequently under-checked, which is exactly why it's a favorite for real operators. Kernel module persistence is more powerful but riskier for the attacker too, since it introduces real stability risk and, if caught, is unambiguous, undeniable evidence of compromise, which makes it overkill for a standard assessment where the goal is to demonstrate risk, not to plant the most sophisticated possible backdoor. A common investigative mistake is checking only cron and missing systemd timers, which have largely replaced cron as the default scheduling mechanism on modern distributions.
Explain the 'pass-the-hash' technique at a conceptual level: what credential material is used, why it works on Windows authentication stacks, and list three enterprise mitigations that significantly reduce the risk of successful pass-the-hash attacks.
Sample Answer
Direct answer
Pass-the-hash abuses the fact that Windows' NTLM (NT LAN Manager) authentication protocol only requires proving knowledge of a fixed-size cryptographic hash of the password, never the plaintext password itself. An attacker who obtains just the hash, for example from a compromised machine's memory or from a stolen local credential database, can present that hash directly to authenticate to another machine, without ever cracking it back into a plaintext password.
Structured elaboration
Why it works. NTLM's challenge-response exchange is entirely a mathematical function of the hash. There is no step in the protocol that re-derives or checks the underlying plaintext, so from the protocol's own point of view, the hash IS the credential. Windows also caches these hashes in memory for convenience, so a single sign-on experience across a network is possible, which is exactly what makes them recoverable and reusable by an attacker who gets code execution on the box.
Three enterprise mitigations:
- Restrict or disable NTLM authentication in favor of Kerberos wherever the environment allows it, using domain policy to audit and eventually block NTLM on servers that don't genuinely need it.
- Deploy unique, randomized local administrator passwords per machine rather than sharing one local admin password fleet-wide, so a stolen local-admin hash on one host cannot simply be replayed against every other host.
- Enable memory-isolation protections for cached credentials (a virtualization-based security feature that keeps authentication secrets out of reach of even an administrator on the same box), and restrict high-privilege logons to a small number of hardened, dedicated administrative workstations so that a compromised low-tier machine never has a high-value credential cached on it in the first place.
Worked example
An organization sets the same local administrator password across its entire workstation fleet for ease of management. An attacker compromises a single low-value workstation, dumps its local credential store, and recovers the shared local administrator hash. Because that exact hash is valid for every other workstation in the fleet, the attacker authenticates to dozens of machines using pass-the-hash without ever needing the plaintext password or touching a domain controller.
Trade-offs and pitfalls
The single most common interview mix-up is treating pass-the-hash as a form of password cracking; it is the opposite, the whole point is that the attacker never needs to recover the plaintext at all. A second common gap is naming a mitigation like disabling NTLM without acknowledging that some legacy applications and devices still require it, meaning the real-world fix is usually a staged reduction and monitoring plan rather than an instant flip of a single setting.
Explain the exploitation lifecycle and the post-exploitation phases in a penetration test. In your answer describe: reconnaissance and target selection, initial access/exploitation, payload delivery and command-and-control establishment, system and network enumeration, credential harvesting, privilege escalation, lateral movement, persistence, data discovery and exfiltration, and cleanup/reporting. For each phase mention objectives, common techniques/tools, how you ethically validate a finding without causing operational impact, and what artefacts you collect to support a finding.
Sample Answer
Direct answer: The exploitation and post-exploitation lifecycle is the sequence a tester moves through from being handed a target to closing out the engagement: get a foothold, prove it can be turned into meaningful access, show what that access could reach or extract, and then leave no trace while documenting everything precisely enough for the client to fix it. Every phase applies the same four-part discipline to a different problem: what you're trying to prove, how you prove it, how you prove it without causing real harm, and what evidence backs the claim.
The lifecycle, phase by phase
| Phase | Objective | Common techniques / tools | Ethical validation | Artifacts collected |
|---|---|---|---|---|
| 1. Reconnaissance & target selection | Map what's reachable and worth attacking before touching anything risky | Passive research (public records, employee and social footprint), DNS lookups, port/service scans (e.g. Nmap) | Stay inside the agreed scope; favor passive, low-noise scanning first; log every target touched | Asset inventory, scan output, screenshots of exposed services, timestamps |
| 2. Initial access / exploitation | Get the first foothold: code execution or valid credentials on an in-scope system | Exploiting an unpatched vulnerability, phishing a credential or malicious document, a web app flaw, or a leaked/weak password | Use the least destructive proof possible (a harmless command instead of altering data); get sign-off before anything that could crash a service | Command output, request/response captures, a session screenshot, timestamp and target ID |
| 3. Payload delivery & command-and-control (C2) establishment | Turn a one-shot execution into a stable channel the operator can keep using | Deploying an agent that "calls back" to attacker infrastructure at intervals (a beacon), so access survives the first process exiting | Use only client-cleared infrastructure; keep beacon frequency proportionate to the agreed noise level; avoid destructive droppers | C2 session logs, beacon check-in timestamps, indicators of compromise (IOCs) for the defenders' after-action review |
| 4. System and network enumeration | Learn what the foothold can see and reach: local privileges, other hosts, trust relationships | Listing local users, processes, and software; scanning the surrounding network for other reachable hosts and services | Prefer read-only queries; avoid noisy full-network scans the client didn't agree to; flag anything resembling an unrelated live incident | Enumeration output, screenshots, a running notes file mapping the environment |
| 5. Credential harvesting | Collect credentials or credential material reusable to move further | Extracting credentials cached in memory or on disk, capturing password hashes on the network, reusing passwords found via phishing | Never use real employees' personal passwords beyond proving the finding; store captured material encrypted; purge it at engagement close | A redacted proof the extraction worked (partial username/hash, never full plaintext), a log of what was captured and when |
| 6. Privilege escalation | Turn a low-privilege foothold into administrator/root/SYSTEM-level control | Exploiting a local misconfiguration (weak file or service permissions, a binary misconfigured to run with the file owner's privileges) or an unpatched local vulnerability | Prefer a reversible misconfiguration-based path over a kernel exploit that risks crashing the host; confirm before anything with known stability risk | Privilege level before/after (e.g. an identity-check command's output), the specific misconfiguration found, a screenshot of elevated access |
| 7. Lateral movement | Extend access from one compromised host to others in scope | Reusing harvested credentials against other hosts, abusing trust relationships between systems, pivoting through one host to reach an otherwise unreachable segment | Move only to in-scope hosts; avoid mass credential-spraying that could lock out real accounts; coordinate timing with the client in sensitive environments | A map of the path taken host-to-host, authentication logs at each hop, session evidence at each stop |
| 8. Persistence | Show access would survive a reboot or a single credential rotation, without leaving it in place long-term | Scheduled tasks or cron jobs, auto-run registry entries, a new service, or a secondary set of credentials | Use a mechanism you can fully and verifiably remove; document its exact location; never leave anything that weakens the client's posture after the test | Exact name/location of the mechanism, a removal record, confirmation it was deleted at test end |
| 9. Data discovery and exfiltration | Prove sensitive data could actually be located and removed, usually the real business risk a client cares about | Searching file shares or databases for sensitive-looking data, staging it, moving it out over a plausible channel | Never move real sensitive data; substitute a client-approved decoy file of the same size, type, and location so the technique and volume are proven without real exposure | A log of what was located (metadata only), a record of the decoy transfer, a screenshot showing arrival at the destination |
| 10. Cleanup and reporting | Leave the environment exactly as found; turn the work into a narrative stakeholders can act on | Removing every dropped tool, account, scheduled task, and persistence mechanism; compiling a findings report that chains the steps into overall risk | Verify removal against your own artifact log rather than memory; keep a record of what was removed and when | A cleanup checklist signed off against the phase-by-phase artifact log; the final report mapping each finding to impact and remediation |
Worked example: one small engagement, start to finish
Recon turns up an internal-looking web app accidentally exposed to the internet with an outdated plugin. Exploiting the plugin's known vulnerability (initial access) drops a lightweight agent that beacons out every 60 seconds (C2 established). Enumeration from that foothold shows the host is joined to the internal network and has a cached service-account credential. That credential (harvested) doesn't have admin rights on its own host, but a misconfigured scheduled task running as a privileged account (privilege escalation) grants SYSTEM. With SYSTEM, the same credential authenticates cleanly to two other servers (lateral movement). A scheduled task is added on one server as proof persistence would survive a reboot, then removed before the day ends. A search of a file share on that server turns up a folder that would plausibly hold customer records; a same-sized decoy file is moved to a controlled destination to prove exfiltration was possible without touching real data. At close, every dropped agent, task, and credential use is checked off against the running artifact log, and the final report chains all seven steps into one risk narrative for the client's leadership.
Trade-offs & pitfalls: this is a mental model, not a strict pipeline; real engagements loop back constantly (new enumeration after lateral movement often restarts credential harvesting on the new host). Treating it as a checklist to recite is a common interview mistake: what's actually being tested is the judgment call embedded in "ethical validation" at every single phase, not just the technique names. Skipping that judgment under time pressure, for example running a destructive proof instead of a safe one because it's faster, is the most common way a legitimate test causes real operational damage.
Unlock Full Question Bank
Get access to all 13 Exploitation, Post-Exploitation, and Red Team Operations interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.