Penetration Testing Interview Questions — Practice Quiz
Reviewed by Mark Dickie · Last updated
Penetration testing is a simulated cyberattack against a computer system, network, or application, performed to find security weaknesses before a real attacker does. For an interview, you should know the standard phases (reconnaissance, scanning, exploitation, post-exploitation, reporting), the difference between black-box, white-box, and grey-box testing, and the core tools used at each phase. You should also understand common vulnerability classes from the OWASP Top 10, how to describe exploit chains, and how to talk through privilege escalation and lateral movement. Interviewers frequently ask you to walk through a finding from discovery to remediation, so be ready to explain both the attack and the fix in concrete terms. Difficulty on these topics ranges from 1 (basic terminology and tool identification) to 5 (multi-stage exploit scenarios and custom payload crafting). Below is a summary of the core domains you will likely be tested on.
| Domain | What you need to know | Difficulty |
|---|---|---|
| Network recon & scanning | Nmap flags, OS fingerprinting, service enumeration, evasion techniques | 1–3 |
| Web application testing | OWASP Top 10, SQL injection, XSS, SSRF, IDOR, authentication flaws | 2–5 |
| Exploitation & post-exploitation | Metasploit modules, reverse shells, privilege escalation on Linux and Windows | 3–5 |
| Wireless & social engineering | Wi-Fi attacks (evil twin, deauth), phishing pretext design, physical access testing | 2–4 |
| Reporting & remediation | Risk scoring (CVSS), writing clear findings, recommending concrete fixes | 1–3 |
What does a penetration testing interview typically cover?
Most interviews split into conceptual questions and hands-on scenarios. You may be asked to explain a tool's output, identify a vulnerability from a code snippet or HTTP request, or describe how you would chain a series of low-severity findings into a bigger impact. Some interviews include a live lab or CTF-style challenge where you demonstrate scanning, exploitation, and reporting under time pressure.
How should you prepare for penetration testing interview questions?
- Study the OWASP Top 10 and be able to explain each vulnerability class with a concrete example and a fix.
- Get comfortable reading and interpreting Nmap, Burp Suite, and Metasploit output without looking up every flag.
- Practice explaining privilege escalation paths on both Linux (SUID binaries, cron jobs, kernel exploits) and Windows (service misconfigurations, token impersonation, unquoted service paths).
- Review network fundamentals — TCP/IP, routing, firewall rules, and common port assignments — because interviewers use these as baseline questions.
- Prepare one or two real findings you have reported (or studied in detail) so you can walk through the full lifecycle: discovery, exploitation, impact, and remediation. Use the quiz below to check where you stand across these areas before your interview.
Key facts
- Tarmac has 95 Penetration Testing interview questions on this topic, 25 of them on this page, at difficulty 1–5 of 5.
- Tarmac last reviewed these Penetration Testing interview questions on 31 August 2026.
At a glance
| Questions | 25 shown · 95 in the bank |
|---|---|
| Difficulty | 1–5 of 5 |
| Formats | Multiple choice, Short answer, Design exercise, True / false, Flashcard, Fill in the blank, Multiple answer, Find the bug, Ordering |
What you'll review
- test phases
- owasp top 10
- lateral movement
- rules of engagement
- engagement types
- privilege escalation
- passive recon
- exploitation frameworks
- injection flaws
Practice questions
Penetration Testing/methodology/test-phases
What most fundamentally distinguishes a penetration test from an automated vulnerability scan?#
Options
Show answer
A penetration test manually attempts to exploit identified weaknesses — including chaining multiple low-severity findings into a higher-impact attack path — to prove real-world business impact, while an automated vulnerability scan only identifies and reports potential vulnerabilities by signature matching, without confirming exploitability. Pentesters commonly use automated scanners as a starting point, so tooling isn't the distinguishing factor — the exploitation and validation step is.
A vulnerability scan is breadth-first and automated: a tool like Nessus or Qualys fingerprints services and flags anything matching a known-vulnerable signature, without confirming exploitability. A penetration test goes further — a human tester (often using the same scanners as a starting point) actually attempts exploitation, chains together individually low-severity findings into a higher-impact attack path, and validates business impact, which is exactly the kind of business-logic and chained-exploit coverage automated scanning misses. Pentesters routinely use automated tools (Nmap, Burp, Metasploit) as part of the process — the defining difference is the exploitation and validation step, not tooling purity.
Penetration Testing/web-app-exploitation/owasp-top-10
What is the OWASP Top 10, and why do penetration testers and AppSec teams use it as a reference?#
Show answer
The OWASP Top 10 is a periodically updated (roughly every 3-4 years), community-driven awareness document ranking the most critical web application security risks, based on both real-world prevalence/incidence data contributed by testing organizations and each risk's typical severity of impact. Testers and AppSec teams use it as a shared vocabulary and a baseline checklist: when scoping an engagement or reporting findings, mapping a vulnerability to 'A03: Injection' or 'A01: Broken Access Control' communicates its category instantly to anyone familiar with the list, and using it as a minimum coverage checklist ensures the highest-prevalence risk classes are never skipped.
The OWASP Top 10 isn't a certification or a compliance mandate — it's a data-driven ranking, refreshed periodically as OWASP gathers new prevalence and impact data from contributing organizations. Its value in practice is as a shared baseline: a common vocabulary for describing risk categories and a minimum checklist so an assessment doesn't skip the classes of flaw known to be both common and high-impact.
Penetration Testing/post-exploitation/lateral-movement
You are on an engagement and have just obtained a foothold on a single Windows domain-joined workstation as a low-privileged domain user. The client has asked you to demonstrate how an attacker could move laterally to other systems in the same Active Directory environment. Design a high-level approach for performing lateral movement from this single foothold, covering: (1) what information you would gather from the compromised host to identify lateral movement targets, (2) one specific lateral movement technique you would attempt and what prerequisites it needs, and (3) how you would minimize noise that could trigger detection during the movement.#
Show answer
From the foothold I would first enumerate the domain context: run queries to list domain computers and users, check which hosts the current user has local admin rights on, and look for cached credentials or Kerberos tickets in memory using a tool like Mimikatz or SharpDPAPI. I would also dump LSASS to recover any NTLM hashes or tickets that other users left on the machine. This tells me which systems are reachable and with what credentials.
With an NTLM hash recovered from LSASS, I would use Pass-the-Hash to authenticate to another host where the corresponding account has local admin rights, then execute a payload remotely via SMB/PSExec or WMI. The prerequisites are: a valid NTLM hash, network reachability to the target, and the account associated with that hash being a local administrator on the target.
To minimize noise, I would prefer reusing existing sessions or tickets rather than creating new logon events, avoid creating new services or scheduled tasks on targets, and perform actions during normal business hours so the activity blends with legitimate usage. I would also limit the number of hosts touched and use tools that do not write binaries to disk on the target.
This is a junior-level design question asking the candidate to outline the basic post-exploitation lateral-movement workflow: enumerate, move, and stay quiet. The rubric rewards naming concrete enumeration targets, one real technique with its prerequisites, and at least one detection-minimization consideration.
Penetration Testing/post-exploitation/lateral-movement
A client wants to understand why a single compromised low-privileged account in their Linux/SSH-based infrastructure can lead to lateral movement across multiple servers. Design an explanation that covers: (1) the common credential-sharing practices in Linux environments that enable lateral movement, (2) one specific technique an attacker could use to move from one SSH-accessible server to another, and (3) one defensive control the client could implement to contain lateral movement.#
Show answer
In many Linux environments, administrators distribute the same SSH private key to multiple servers or reuse a common password for service accounts. The mechanism that makes this dangerous is that the shared key is listed in authorized_keys on every server that trusts it, so once an attacker exfiltrates that key from one compromised host, it is immediately valid for SSH login on all the others. Password reuse works similarly: credentials recovered from shell history or /proc memory on one host are accepted by the SSH daemon on every host sharing that password.
A specific lateral movement technique: the attacker locates the compromised user's private key file at ~/.ssh/id_rsa, then runs ssh -i ~/.ssh/id_rsa user@target-host to authenticate to another server that has that key in its authorized_keys. If SSH agent forwarding was used to reach the compromised host through a jump host, the attacker can instead read the SSH_AUTH_SOCK environment variable and use the forwarded agent socket to authenticate onward — without ever possessing the private key itself, because the agent performs the cryptographic signing on their behalf.
To contain this, the client should enforce unique SSH key pairs per host and per user. This breaks the lateral-movement chain because a key stolen from host A is not present in authorized_keys on host B, so ssh -i with that key against host B will be rejected. Additionally, network segmentation between server tiers prevents SSH connectivity entirely, so even a valid stolen key cannot reach its target. Disabling agent forwarding removes the SSH_AUTH_SOCK socket that an attacker would hijack on intermediate hosts, closing the agent-theft path.
Each criterion now requires a concrete mechanism or chain-breaking explanation, not just naming a concept. c1 demands the credential-transfer mechanism; c2 demands the specific file, socket, or command in the movement step (keeping agent forwarding here, not in c1, to avoid overlap); c3 demands which lateral-movement step the control prevents. A shallow answer that merely lists practices or controls without these explanations cannot earn full marks.
Penetration Testing/methodology/rules-of-engagement
True or False: A penetration tester may only test systems and applications that are explicitly listed within the agreed-upon scope defined in the Rules of Engagement, even if the tester discovers an adjacent system belonging to the same organization that appears to be vulnerable.#
Options
Show answer
True. A penetration tester may only test systems explicitly listed in the agreed-upon scope. Testing an adjacent system that was not included in the Rules of Engagement constitutes unauthorized access, even if it belongs to the same organization. The tester should flag the system to the client and request a formal scope amendment before assessing it.
Scope is a binding boundary in a penetration testing engagement. The Rules of Engagement specify exactly which assets the tester is authorized to assess. Testing any system outside that scope — even one owned by the same organization and appearing vulnerable — constitutes unauthorized access. If the tester believes an out-of-scope system is relevant, the correct action is to flag it to the client and request a formal scope amendment before testing it.
Penetration Testing/methodology/engagement-types
A penetration tester is given standard user credentials and network diagrams for the target application, but no access to its source code. What type of engagement is this?#
Options
Show answer
Being given standard user credentials and network diagrams, but no source code access, is a gray-box engagement — the tester has partial internal knowledge, which lets them cover more ground in the time box than a pure outsider, without the full visibility a white-box (source-code-included) engagement provides. Black-box means starting from nothing but the target's public footprint.
Gray-box testing sits between the two extremes: the tester gets some internal context — here, valid credentials and network diagrams — that lets them cover more ground than a pure outsider would in the time box, while still not having full visibility (no source code) the way a white-box engagement provides. Black-box means starting from nothing but a target's public footprint; white-box means full access, typically including source. Purple-teaming is a separate concept about collaborative red/blue exercises, not a knowledge-level classification.
Penetration Testing/methodology/engagement-types
A white-box penetration test — where the tester has full access to source code, architecture diagrams, and credentials — generally achieves deeper, broader coverage than a black-box test performed in the same time window, because far less tester time is spent on reconnaissance.#
Options
Show answer
True. A white-box penetration test, where the tester has source code and architecture access, spends far less time on blind reconnaissance than a black-box test does, so the same time budget goes almost entirely into finding and validating flaws — including logic bugs an outside attacker would struggle to spot. This is why white-box testing is preferred for thorough code-level assurance, while black-box testing is preferred to realistically simulate an external attacker.
True. In a black-box engagement, a meaningful share of the allotted time goes to mapping the attack surface blind — discovering endpoints, guessing technology stack, enumerating users — before any real vulnerability analysis starts. A white-box tester skips most of that: source code and architecture docs hand over the attack surface directly, so the same time budget goes almost entirely into finding and validating flaws, including logic bugs that would be very hard to spot from the outside. This is exactly why white-box (or at least gray-box) testing is preferred when the goal is thorough code-level assurance rather than realistically simulating an external attacker.
Penetration Testing/post-exploitation/privilege-escalation
What is privilege escalation in a penetration test?#
Show answer
Exploiting a bug, misconfiguration, or design flaw to gain access rights beyond what was originally granted. Vertical privilege escalation moves to a higher permission level (a regular user reaching root/SYSTEM); horizontal privilege escalation stays at the same permission level but accesses another user's equivalent resources or account (e.g. viewing another customer's data via an insecure direct object reference).
Privilege escalation is almost always the pivot point between 'found a foothold' and 'compromised the objective' in a pentest — an initial low-privileged shell or account is rarely the end goal, so testers actively hunt for escalation paths (misconfigured permissions, vulnerable SUID binaries, writable scheduled tasks) once inside.
Penetration Testing/methodology/rules-of-engagement
What does the 'scope' component of a penetration testing Rules of Engagement (RoE) document define, and why is it critical?#
Show answer
The scope defines which systems, networks, applications, and IP ranges are authorized for testing, and explicitly which are out of bounds — any target not listed in scope is off-limits regardless of discoverability.
Scope is the foundational element of the RoE: it enumerates exactly what the tester is permitted to target. Without a clearly defined scope, a tester risks attacking systems owned by third parties or production-critical infrastructure, which could lead to legal liability and service disruption.
Penetration Testing/post-exploitation/lateral-movement
A Kerberos Golden Ticket attack occurs during post-exploitation when an attacker who has compromised a domain controller extracts the hash of the _____ account and uses it to forge a _____ for any user in the domain, enabling persistent lateral movement across domain resources.#
Show answer
A Kerberos Golden Ticket attack occurs during post-exploitation when an attacker who has compromised a domain controller extracts the hash of the KRBTGT account and uses it to forge a Ticket-Granting Ticket for any user in the domain, enabling persistent lateral movement across domain resources.
The KRBTGT account's hash is the symmetric key the KDC uses to sign and encrypt Ticket-Granting Tickets (TGTs). With that hash, an attacker can forge a TGT offline for any arbitrary user with any desired group memberships, because services in the domain trust the TGT based solely on the KRBTGT signature. This forged TGT — the 'golden ticket' — grants access to any service in the domain without further interaction with the KDC, making it a powerful tool for persistent lateral movement until the KRBTGT password is reset (typically twice, to purge the old key history).
Penetration Testing/web-app-exploitation/owasp-top-10
In the OWASP Top 10:2021, which category ranks #1 — reflecting how often it's found across tested applications and how severe its typical impact is?#
Options
Show answer
Broken Access Control is #1 in the OWASP Top 10:2021 (A01), up from #5 in the prior 2017 edition, based on data showing some form of broken access control present in the large majority of tested applications. Injection, which had ranked #1 in 2017, dropped to #3 in the 2021 list.
Broken Access Control moved to #1 in the OWASP Top 10:2021 (A01), up from #5 in the 2017 edition, based on OWASP's contributed data showing some form of broken access control present in the large majority of tested applications. Injection, which had been #1 in 2017, dropped to #3 in 2021 as the underlying data shifted. XSS is no longer its own top-level category in 2021 — it was folded into the broader Injection category. Security Misconfiguration is a real 2021 category (A05), but it isn't #1.
Penetration Testing/recon-enumeration/passive-recon
Which of these are considered passive reconnaissance techniques — gathering information about a target without directly interacting with its systems? Select all that apply.#
Options
Pick every one that applies.
Show answer
Passive reconnaissance techniques gather information without sending any traffic to the target's own systems: searching WHOIS records, reviewing employee LinkedIn profiles and job postings for tech-stack clues, and searching public GitHub repositories for leaked credentials all qualify. Running an Nmap scan or fuzzing a login form both send traffic directly to the target and count as active reconnaissance instead, since either can be logged or trigger an IDS alert.
Passive recon never sends traffic to the target's own infrastructure — everything comes from third-party sources: WHOIS, LinkedIn/job postings, public GitHub repos, search engine caches, and certificate-transparency logs all fit. Running an Nmap scan (c) and fuzzing a login form (e) both send packets directly to the target and are active reconnaissance/testing — they can be logged, rate-limited, or trigger an IDS alert, which is precisely the risk passive recon is used to avoid before an engagement's active phase begins.
Penetration Testing/tools-frameworks/exploitation-frameworks
Metasploit's exploit modules only work against publicly known CVEs — the framework provides no way for a tester or researcher to write and run a custom exploit against a novel vulnerability.#
Options
Show answer
False. Metasploit is an extensible framework, not just a library of pre-built CVE exploits — it exposes Ruby APIs for writing a custom exploit module against a vulnerability a tester or researcher discovered themselves, whether or not it has a CVE assigned. Researchers routinely build proof-of-concept exploits as Metasploit modules before or independent of public disclosure.
False. Metasploit is an extensible framework, not just a library of pre-built CVE exploits. It exposes Ruby APIs (mixins) for building an exploit module from scratch — handling the network transport, encoding, and payload delivery for a vulnerability the author discovered themselves, whether or not it has been assigned a CVE. Security researchers routinely develop and test proof-of-concept exploits as Metasploit modules before, or entirely independent of, public disclosure.
Penetration Testing/web-app-exploitation/injection-flaws
During a web app assessment you find this login-lookup function. Which line is the SQL injection vulnerability?#
1| def get_user(username):
2| query = "SELECT id, email FROM users WHERE username = '" + username + "'"
3| cursor.execute(query)
4| return cursor.fetchone()Options
Show answer
Line 2 — building the SQL string by directly concatenating untrusted input, instead of using a parameterized query, lets an attacker close the quote and inject their own SQL
Concatenating user-controlled input straight into a SQL string means anything the attacker sends becomes part of the query's syntax, not just its data — a username designed to close the quoted literal early turns the WHERE clause into something always-true. The fix is a parameterized query, which sends the input as a bound parameter the database driver escapes correctly, so it can never be interpreted as SQL syntax. cursor.execute() itself is the correct, necessary call — the problem is only in how the query string on line 2 was built.
Penetration Testing/methodology/test-phases
Order the standard phases of a penetration testing engagement.#
Put these in order
Show answer
A penetration test proceeds in a fixed order: pre-engagement scoping and authorization first, then reconnaissance, then scanning and enumeration to map live hosts and services, then exploitation of discovered vulnerabilities, then post-exploitation to escalate privileges and assess real business impact, and finally reporting the findings and remediation guidance. Authorization has to come before any testing — that's the line between a pentest and unauthorized hacking.
Every widely used methodology (PTES, the EC-Council's phases, most vendor playbooks) follows this same shape: scope and authorization must exist before any testing starts (skipping this step is the difference between a pentest and unauthorized hacking), reconnaissance and scanning build the target picture before exploitation is attempted, exploitation is validated and extended through post-exploitation to show real business impact rather than stopping at initial access, and reporting is always last — it's the deliverable the whole engagement exists to produce.
Penetration Testing/methodology/rules-of-engagement
In a penetration testing Rules of Engagement (RoE) document, what are the key elements that must be explicitly defined before testing begins?#
Show answer
Key elements of a penetration testing RoE include: (1) Scope — target IP ranges, domains, applications, and excluded systems; (2) Authorization — written permission (often a Get-Out-of-Jail letter) and emergency contacts; (3) Testing window — allowed dates/times for active testing; (4) Methodologies & techniques permitted — e.g., whether social engineering, DoS, or physical entry are allowed; (5) Communication plan — escalation paths, reporting frequency, and points of contact on both sides; (6) Legal & compliance constraints — applicable laws, data-handling requirements, and non-disclosure terms; (7) Success criteria & deliverables — what the final report must contain and in what format.
Rules of Engagement define the legal and operational boundaries of a penetration test. A solid mid-level penetration tester must know that scope, authorization, testing windows, permitted techniques, communication/escalation plans, legal constraints, and deliverables are all essential components that protect both the tester and the client.
Penetration Testing/methodology/engagement-types
A client is planning a penetration test and is deciding between black-box, gray-box, and white-box engagement types. Which of the following statements about these engagement types are correct?#
Options
Pick every one that applies.
Show answer
Correct statements: black-box provides no prior knowledge, white-box provides source code/diagrams/credentials, gray-box provides partial information like network maps or low-privilege accounts, and white-box can surface insecure code patterns that black-box misses. The claim that black-box is 'always more thorough' is false — black-box better simulates an external attacker, but white-box's internal visibility typically yields broader and deeper findings.
Black-box provides no prior knowledge (a). White-box provides deep internal access including source code, diagrams, and credentials (b). Gray-box provides partial knowledge such as network maps or low-privilege accounts (c). White-box testing can reveal code-level vulnerabilities that external black-box testing would miss (e). Option d is incorrect: black-box testing simulates an external attacker more closely but is not inherently more thorough — white-box testing's internal visibility typically yields broader and deeper findings.
Penetration Testing/post-exploitation/lateral-movement
During a post-exploitation assessment, you use your compromised standard domain-user credentials to request TGS (Ticket Granting Service) tickets for multiple service accounts from the Domain Controller. You save these tickets and take them offline for password cracking. What is this attack technique called, and what specific property of the TGS ticket makes offline password cracking possible?#
Show answer
This technique is called Kerberoasting. The TGS ticket is encrypted using the target service account's password hash (commonly RC4-HMAC, which derives from the account's NTLM hash). Because the ticket can be captured by any authenticated domain user and the encryption key is derived solely from the service account's password, an attacker can perform an offline dictionary or brute-force attack against the captured ticket to recover the plaintext password without any further interaction with the KDC or the target service.
Kerberoasting exploits the fact that any authenticated domain user can request a TGS ticket for any service that has an SPN registered. The TGS ticket is encrypted with a key derived from the service account's password — when RC4-HMAC is used, that key is simply the account's NTLM hash. Since the attacker controls a copy of the encrypted ticket and the plaintext portion is known, they can test candidate passwords offline by encrypting the known data with each candidate's hash and comparing results. This requires no network interaction with the target after the initial ticket request.
Penetration Testing/web-app-exploitation/owasp-top-10
Which of these are official OWASP Top 10:2021 categories? Select all that apply.#
Options
Pick every one that applies.
Show answer
Injection (A03), Security Misconfiguration (A05), and Server-Side Request Forgery (A10) are official OWASP Top 10:2021 categories. Cross-Site Request Forgery was dropped from the 2021 list — OWASP cited a low measured incidence rate and that most modern frameworks now ship CSRF protection by default. Buffer Overflow has never been an OWASP Top 10 category; it's a memory-safety issue more associated with native-code security.
Injection (A03), Security Misconfiguration (A05), and Server-Side Request Forgery (A10, added new in 2021) are all official 2021 categories. CSRF was a category in earlier editions but was dropped from the Top 10:2021 — OWASP's own rationale cites a low measured incidence rate and the fact that most modern frameworks now ship CSRF protection by default. Buffer Overflow was never an OWASP Top 10 category at all; it's a memory-safety class of bug more associated with binary/native-code security than the web application risks OWASP's list targets.
Penetration Testing/methodology/engagement-types
Explain the tradeoff between a black-box and a white-box penetration test engagement, and when you'd choose one over the other.#
Show answer
Black-box testing gives the tester no internal knowledge — they start from only the target's public-facing footprint, which most realistically simulates what an actual external attacker sees. The cost is that a meaningful share of the time budget goes into blind reconnaissance and enumeration rather than deep vulnerability analysis, so in a fixed time window it typically achieves shallower coverage and can miss logic flaws buried deep in the application. White-box testing hands over source code and architecture up front, so almost the entire time budget goes into finding and validating flaws, achieving far broader and deeper coverage in the same window — at the cost of not testing what an attacker with zero information would actually be able to discover, and it can't validate the effectiveness of external-facing defenses like WAFs the way a black-box test would. Choose black-box when the goal is testing detection/response and the external attack surface realistically; choose white-box (or gray-box as a middle ground) when the goal is maximum code-level assurance under a fixed timeline.
The tradeoff is time spent on reconnaissance versus depth of coverage: black-box realism costs recon time and therefore coverage in a fixed window; white-box's full-knowledge head start buys deeper coverage but sacrifices the realism of testing what an actual outside attacker would need to discover on their own, including how well perimeter defenses hold up. A strong answer names both the coverage tradeoff and a concrete scenario for each choice, not just the definitions.
Penetration Testing/methodology/test-phases
The Penetration Testing Execution Standard (PTES) defines seven core phases executed in sequence: Pre-engagement Interactions, Intelligence Gathering, _____, Vulnerability Analysis, Exploitation, Post-Exploitation, and Reporting. The blank phase consumes the intelligence gathered in the previous phase and models adversary capabilities against the target's business logic, trust relationships, and data flows to identify realistic attack scenarios before any vulnerability scanning or exploitation begins.#
Show answer
The Penetration Testing Execution Standard (PTES) defines seven core phases executed in sequence: Pre-engagement Interactions, Intelligence Gathering, Threat Modeling, Vulnerability Analysis, Exploitation, Post-Exploitation, and Reporting. The blank phase consumes the intelligence gathered in the previous phase and models adversary capabilities against the target's business logic, trust relationships, and data flows to identify realistic attack scenarios before any vulnerability scanning or exploitation begins.
In PTES, Threat Modeling is the third phase, positioned between Intelligence Gathering and Vulnerability Analysis. It takes the collected intelligence (network ranges, technologies, personnel data) and applies structured threat-modeling techniques to map adversary profiles and their capabilities against the target's business processes, trust boundaries, and critical data flows. This produces prioritized attack scenarios that guide the subsequent vulnerability analysis and exploitation phases, ensuring that testing effort focuses on the most realistic and impactful attack vectors rather than scanning indiscriminately.
Penetration Testing/methodology/rules-of-engagement
The Penetration Testing Execution Standard (PTES) defines a canonical sequence of seven technical execution phases for an engagement. Arrange the phases below in the order they are performed, from first to last.#
Put these in order
Show answer
The PTES phases in order are: Pre-engagement Interactions → Intelligence Gathering → Threat Modeling → Vulnerability Analysis → Exploitation → Post-Exploitation → Reporting. Each phase feeds the next — you cannot model threats before gathering intelligence, and you cannot exploit before analyzing vulnerabilities — so the pipeline is strictly sequential.
PTES defines the execution phases in a strict pipeline: Pre-engagement Interactions establish scope and RoE; Intelligence Gathering collects OSINT and reconnaissance data; Threat Modeling maps attack surfaces and adversary profiles against that data; Vulnerability Analysis identifies exploitable weaknesses; Exploitation executes attacks against confirmed vulnerabilities; Post-Exploitation determines the value of compromise and lateral movement; Reporting delivers findings and remediation guidance. Each phase consumes the outputs of the previous one and cannot meaningfully begin before it completes.
Penetration Testing/methodology/test-phases
During the PTES Post-Exploitation phase, a tester who has compromised a host on one network segment configures that host to route traffic to a second, otherwise-inaccessible internal subnet, allowing further attacks against hosts the tester cannot reach directly from the original vantage point. This technique of using a compromised system as a network relay is commonly referred to as _____, a concept distinct from lateral movement, which describes the act of moving between accounts or hosts within the same reachable network tier.#
Show answer
During the PTES Post-Exploitation phase, a tester who has compromised a host on one network segment configures that host to route traffic to a second, otherwise-inaccessible internal subnet, allowing further attacks against hosts the tester cannot reach directly from the original vantage point. This technique of using a compromised system as a network relay is commonly referred to as pivoting, a concept distinct from lateral movement, which describes the act of moving between accounts or hosts within the same reachable network tier.
Pivoting (also called 'jumping' or using a 'pivot host') is the technique of tunneling traffic through a compromised machine so the tester can reach network segments that are not directly routable from their original position. In PTES post-exploitation, this is a key infrastructure-assessment activity: after gaining an initial foothold, the tester configures routing or tunneling (e.g., SOCKS proxy, SSH tunnel, or route table manipulation) on the compromised host to extend the attack surface into isolated subnets. This is explicitly distinguished from lateral movement, which refers to propagating access across hosts or accounts that are already reachable from the current network position.
Penetration Testing/methodology/rules-of-engagement
Before any active testing may legally begin, a penetration testing engagement must complete a Rules-of-Engagement authorization workflow. Place the following steps in the correct chronological order from first to last.#
Put these in order
Show answer
The correct order is: Define scope and objectives → Draft the Rules of Engagement → Conduct legal/compliance review → Obtain written authorization (signature) → Begin active testing. Scope definition must precede the RoE draft because the rules are built around what is in scope; legal review must precede signature so liabilities are validated; and active testing may only start after the signed authorization is in hand.
The scope and objectives must be defined first because they determine what the RoE document covers. The RoE is then drafted to codify constraints, windows, contacts, and escalation paths derived from that scope. Legal and compliance review follows drafting to validate indemnification, liability, and regulatory alignment before any commitment is made. Written authorization (signature) from an authorized party comes after legal review clears the document, establishing the legal basis for testing. Only after signed authorization is in hand may active testing commence — testing without it constitutes unauthorized access regardless of intent.
Penetration Testing/post-exploitation/privilege-escalation
You have a low-privileged shell on a Linux host. This is what you find. As a pentester, which line is the actual privilege-escalation vector?#
1| $ ls -la /opt/backup.sh
2| -rwxrwxrwx 1 root root 812 backup.sh
3| $ crontab -l -u root
4| */5 * * * * /opt/backup.shOptions
Show answer
Line 2 — /opt/backup.sh is world-writable (rwxrwxrwx) even though root's crontab executes it every 5 minutes, so a low-privileged user can overwrite it with attacker-controlled commands that cron then runs as root
The permission bits on line 2 are the whole vulnerability: rwxrwxrwx means any local user — including the low-privileged account this pentester already controls — can open the file and overwrite its contents. Because root's crontab (lines 3-4) runs that exact script every 5 minutes, writing a reverse shell or chmod +s /bin/bash into it guarantees code execution as root within minutes, with no further exploit needed. This is a canonical Linux privilege-escalation pattern: find a root-owned, root-scheduled asset with a writable path anywhere in its execution — the script itself, a directory in its $PATH, or a config it sources — and hijack it.
Related interview questions
The other 70 questions
This page shows 25. A free account opens the rest and marks your answers, which a page of answers can't do. Miss one and it returns a few days later, then a week after that, until you stop missing it.
Free · the whole bank · 100 graded answers per 30 days · written feedback and job-ad quizzes on the paid plan