Penetration Testing Interview Questions & Answers
52+ penetration testing interview questions with expanded answers — beginner fundamentals through Active Directory, web, network, cloud, API security, reporting, and HR questions.
How do you prepare for a penetration testing interview? Master methodology and ethics first, then practice explaining OWASP risks with impact and fixes, know core AD and network attack paths at a conceptual level, and prove hands-on skill with labs or write-ups. Interviewers hire pentesters who can validate findings, prioritize business risk, and write clear reports — not candidates who only list tool names.
Beginner Penetration Testing Interview Q&A
Foundational questions covering methodology, scoping, and core offensive security concepts interviewers expect every candidate to explain clearly.
What is penetration testing?
Penetration testing is an authorized security assessment in which ethical hackers simulate real-world attacks to identify, validate, and demonstrate vulnerabilities before malicious actors exploit them.
A strong answer also mentions scope, rules of engagement, written permission, and the goal of producing actionable remediation guidance — not just a list of scanner findings.
What is the difference between vulnerability assessment and penetration testing?
Vulnerability assessment focuses on discovering and ranking potential weaknesses, often through scanning and configuration review.
Penetration testing goes further by attempting controlled exploitation to prove real impact, chaining issues, and demonstrating business risk. VA answers “what might be wrong”; pentesting answers “what can actually be abused and how far can an attacker go.”
What are the main phases of a penetration test?
A common lifecycle is:
- Planning and scoping (rules of engagement, targets, constraints)
- Reconnaissance (passive and active information gathering)
- Scanning and enumeration (services, versions, attack surface)
- Vulnerability analysis
- Exploitation
- Post-exploitation (privilege escalation, lateral movement, data access)
- Reporting and remediation support
Interview tip: emphasize that reporting and debriefing are part of the engagement, not an afterthought.
What is reconnaissance in penetration testing?
Reconnaissance is the information-gathering phase before and during attacks. Passive recon uses public sources without directly touching the target; active recon interacts with systems.
Examples include WHOIS, DNS enumeration, certificate transparency, Google dorking, OSINT on employees and tech stacks, subdomain discovery, and port/service identification. Good recon often determines engagement quality more than exotic exploits.
What is Black Box, White Box, and Grey Box testing?
- Black Box: little or no internal knowledge — closest to an external attacker view
- White Box: full knowledge, including architecture docs, credentials, or source code — efficient for deep coverage
- Grey Box: partial knowledge, such as a standard user account — common for realistic internal or authenticated web tests
Mention that box color affects time, cost, coverage, and the kinds of findings you can reach.
What is a CVE?
CVE (Common Vulnerabilities and Exposures) is a public identifier for a known security vulnerability. Example format: CVE-2024-12345.
In interviews, connect CVEs to exploitability: not every CVE is reachable in a given environment, and prioritization should consider exposure, asset criticality, and available exploits — not only the CVE number.
What is CVSS?
CVSS (Common Vulnerability Scoring System) provides a standardized severity score for vulnerabilities, typically 0.0–10.0.
Explain base score components at a high level (exploitability and impact) and note that business context can raise or lower real priority versus the raw CVSS number.
What is exploitation?
Exploitation is taking advantage of a vulnerability to achieve unauthorized access, code execution, data exposure, or other attacker goals within the authorized scope.
Professional pentesters document steps, minimize operational risk, avoid destructive actions unless approved, and capture evidence for the report.
What is privilege escalation?
Privilege escalation is moving from a lower-privileged context to higher privileges after initial access — for example, from a standard user to local admin, or from a compromised host to domain admin.
Mention common Windows and Linux themes: weak service permissions, unquoted service paths, sudo misconfigurations, kernel issues, credential dumping, and token impersonation.
What is lateral movement?
Lateral movement is expanding access from one compromised system to other systems in the environment to reach higher-value targets.
Techniques can include Pass-the-Hash, remote service abuse, RDP/WinRM, SSH key reuse, and living-off-the-land binaries. Defenders look for unusual authentication patterns; attackers look for trust relationships and reusable credentials.
Intermediate Penetration Testing Interview Q&A
Deeper questions on OWASP Top 10, tooling, and the web vulnerabilities interviewers use to separate tool operators from real testers.
Explain the OWASP Top 10.
The OWASP Top 10 is a consensus list of the most critical web application security risks. A current high-level set includes:
- Broken Access Control
- Cryptographic Failures
- Injection
- Insecure Design
- Security Misconfiguration
- Vulnerable and Outdated Components
- Identification and Authentication Failures
- Software and Data Integrity Failures
- Security Logging and Monitoring Failures
- Server-Side Request Forgery (SSRF)
Interviewers often ask you to explain one risk with a real example and a remediation, not just recite names.
What tools do penetration testers commonly use?
Tool choice depends on scope, but common categories include:
- Recon/scanning: Nmap, Masscan, Amass, subfinder, httpx
- Web testing: Burp Suite, OWASP ZAP, ffuf, Gobuster, sqlmap, Nuclei
- Network/exploit frameworks: Metasploit, Impacket, CrackMapExec/NetExec
- AD/internal: BloodHound, Rubeus, Mimikatz (authorized contexts), Responder
- Traffic analysis: Wireshark, tcpdump
- Custom: Python/Bash scripts for unique app logic
Strong answer: tools accelerate work; methodology and manual validation prevent false confidence.
Explain SQL Injection.
SQL Injection occurs when untrusted input is interpreted as part of a SQL query, allowing attackers to read, modify, or destroy data, and sometimes achieve RCE via database features.
Discuss types (in-band, blind, out-of-band), detection (error-based, boolean/time-based), and fixes: parameterized queries/prepared statements, least-privilege DB accounts, input validation as defense-in-depth, and WAF only as a compensating control.
What is Cross-Site Scripting (XSS)?
XSS lets an attacker execute script in a victim’s browser in the context of a trusted site. Main types: Stored, Reflected, and DOM-based.
Impact includes session theft, account takeover actions, phishing inside the app, and malware delivery. Mitigations: context-aware output encoding, CSP, HttpOnly/Secure cookies, and avoiding dangerous sinks in JavaScript.
What is CSRF?
Cross-Site Request Forgery tricks a victim’s browser into sending authenticated requests to a target site without the user’s intent.
Classic defenses: anti-CSRF tokens synchronized with the session, SameSite cookies, re-authentication for sensitive actions, and avoiding state-changing GET requests.
What is SSRF?
Server-Side Request Forgery forces a server-side component to make HTTP (or other protocol) requests to attacker-chosen destinations.
Impact can include cloud metadata credential theft, internal port scanning, and access to admin panels not exposed externally. Defenses: allowlists, block internal IP ranges/metadata IPs, disable unnecessary URL fetch features, and network segmentation.
Explain IDOR.
Insecure Direct Object Reference is an access-control failure where changing an object identifier (user id, invoice id, file name) grants unauthorized access to another user’s data.
Test by swapping IDs across accounts and roles. Fix with server-side authorization checks on every object access, unpredictable identifiers as a weak secondary control, and consistent deny-by-default access logic.
What is Remote Code Execution (RCE)?
RCE allows an attacker to execute arbitrary commands or code on a target system remotely. It is among the highest-impact findings because it often leads to full host compromise.
Causes include unsafe deserialization, command injection, template injection, unpatched services, and file upload flaws. Always describe containment, evidence, and business impact in interviews.
Explain command injection.
Command injection occurs when application input is passed to a system shell or command interpreter without proper separation, enabling OS command execution.
Contrast with code injection and SQLi. Mitigations: avoid shells, use safe APIs with argument arrays, strict allowlists, least privilege, and input validation that never relies on blacklists alone.
What is the difference between authentication and authorization?
Authentication verifies identity (who you are). Authorization decides what an authenticated identity is allowed to do (what you can access).
Many critical bugs are authorization failures after successful login — IDOR, privilege escalation, and broken function-level access control. Interviewers love candidates who test both.
Active Directory Interview Q&A
Common AD attack paths and concepts for internal network and red team style interviews.
What is Kerberos?
Kerberos is the primary authentication protocol in Active Directory. Clients obtain tickets from a Key Distribution Center (KDC) to prove identity to services without sending passwords to every host.
Key terms: AS-REQ/AS-REP, TGT, TGS, SPN, and the KRBTGT account. Many modern AD attacks abuse ticket material or weak service account passwords.
Explain NTLM.
NTLM is a legacy Windows authentication protocol still encountered in many environments for compatibility.
It is relevant to Pass-the-Hash, NTLM relay, and coerced authentication attacks. Hardening includes reducing NTLM usage, SMB signing, LDAP signing/channel binding, and monitoring NTLM authentications.
What is Pass-the-Hash?
Pass-the-Hash authenticates with an NTLM password hash instead of the plaintext password, often after credential dumping from memory or disk.
It enables lateral movement when the same local admin hash is reused. Defenses: LAPS/unique local admin passwords, Credential Guard, privileged access workstations, and detecting unusual lateral auth patterns.
What is a Golden Ticket attack?
A Golden Ticket is a forged Kerberos TGT created with the KRBTGT account hash, granting long-lived, highly privileged domain access that can bypass normal authentication controls.
It requires deep compromise (KRBTGT secret). Recovery involves KRBTGT password resets (twice, carefully planned), hunting persistence, and rebuilding trust in the domain’s ticket-issuing path.
What is Kerberoasting?
Kerberoasting requests service tickets for accounts with SPNs and offline-cracks them to recover service account passwords.
It thrives on weak service account passwords and over-privileged service accounts. Defenses: long random passwords or gMSA, least privilege, and detecting unusual TGS requests.
Explain LLMNR/NBT-NS poisoning.
When name resolution fails, Windows hosts may broadcast LLMNR/NBT-NS queries. An attacker on the network can respond and capture or relay authentication material (often with tools like Responder).
Mitigations: disable LLMNR/NBT-NS where possible, enforce SMB signing, use strong name resolution, and monitor for poisoner activity.
Web Application Security Interview Q&A
Modern web security concepts beyond basic OWASP name recall.
What is Content Security Policy (CSP)?
CSP is an HTTP response header (and meta) mechanism that tells browsers which sources of script, style, image, and other content are allowed.
A well-designed CSP reduces XSS impact. Weak CSPs with unsafe-inline or overly broad wildcards provide limited value. Mention report-only mode for safe rollout.
Explain CORS.
Cross-Origin Resource Sharing is a browser mechanism controlling which origins may read responses from another origin using credentialed or non-credentialed requests.
Misconfigured CORS (for example, reflecting arbitrary Origin with Access-Control-Allow-Credentials: true) can enable cross-site data theft. CORS is not an authentication substitute.
What is clickjacking?
Clickjacking (UI redressing) overlays or frames a target page so users click hidden actions.
Defenses include frame-busting historically, and modern protections like CSP frame-ancestors and X-Frame-Options.
What is XXE?
XML External Entity injection abuses XML parsers that resolve external entities, potentially disclosing local files, causing SSRF-like requests, or enabling denial of service.
Fix by disabling external entity resolution and DTDs in XML parsers, and preferring safer data formats when possible.
Explain common JWT attacks.
JSON Web Tokens can be abused via algorithm confusion (alg:none or RS256/HS256 key confusion), weak signing secrets, accepting unsigned tokens, insecure kid injection, and long-lived tokens without revocation.
Hardening: explicit algorithm allowlists, strong keys, short expiry, audience/issuer validation, and secure storage on the client.
Network Penetration Testing Interview Q&A
Protocols, local network attacks, and internal movement concepts.
What is the difference between TCP and UDP?
TCP is connection-oriented and reliable (handshake, sequencing, retransmission). UDP is connectionless and lower-overhead, used where speed or simplicity matters (DNS, many real-time services).
For pentesting: TCP port states and service banners matter for enumeration; UDP scanning is noisier and less reliable, so methodology and timing matter.
What is ARP spoofing?
ARP spoofing poisons local ARP caches so traffic is redirected through an attacker host, enabling man-in-the-middle on a LAN segment.
Related controls: dynamic ARP inspection, port security, 802.1X, and encrypted protocols that reduce sniffing value.
What is VLAN hopping?
VLAN hopping attempts to break VLAN segmentation, historically via switch spoofing or double tagging, to reach traffic in other VLANs.
Modern hardened switch configs greatly reduce classic techniques, but misconfigured trunks and weak segmentation still appear in assessments.
Explain SMB enumeration.
SMB enumeration discovers shares, users, groups, policies, and permissions over ports 445/139 to identify attack paths.
Useful intel includes readable shares with credentials, writable shares for payload drops, and domain information that feeds BloodHound-style graphing.
What is pivoting?
Pivoting uses a compromised host as a foothold to reach networks not directly accessible from the tester’s machine — via SOCKS proxies, SSH tunnels, VPN-like tunnels, or native routing techniques.
Discuss scope boundaries: pivots must stay inside authorized ranges and be documented carefully.
Cloud Security Interview Q&A
Cloud misconfigurations and attack paths that appear in modern pentest interviews.
How do you assess AWS S3 bucket security?
Review public access blocks, bucket policies, ACLs, encryption (SSE-S3/SSE-KMS), logging, versioning, and whether sensitive prefixes are exposed via misconfigured policies or static website hosting.
Also check for overly broad IAM principals and cross-account access. Public list/get on sensitive data is a classic critical finding.
What is cloud metadata exploitation?
Cloud instances expose a metadata service (for example, AWS IMDS) that can provide temporary credentials and instance identity data.
If an app is vulnerable to SSRF or an attacker gains code execution on the instance, they may query metadata to steal roles. IMDSv2 hop-limit controls and blocking instance metadata from app layers are key defenses.
What Docker security concerns matter in assessments?
Common issues: containers run as root, privileged containers, exposed Docker sockets, weak image supply chain, secrets in images/env vars, and breakout risks from kernel sharing.
Recommend least privilege, read-only filesystems where possible, image scanning, and not mounting docker.sock into untrusted containers.
What is IAM misconfiguration?
Identity and Access Management misconfiguration means users, roles, or policies grant excessive permissions — for example, wildcards on sensitive actions, privilege escalation paths through iam:PassRole, or public principals.
Cloud pentests often focus on identity graph abuse more than classic network exploits.
API Security Interview Q&A
API-specific vulnerabilities and testing techniques for modern application interviews.
What is BOLA?
Broken Object Level Authorization (OWASP API1) is unauthorized access to API objects by manipulating object IDs — essentially IDOR for APIs.
Test with two users: authenticate as user A, request user B’s resources by ID. Fix with authorization checks on every object reference, every time.
What API authentication methods should you know?
- API keys (simple, often overexposed in clients)
- HTTP Basic (rarely appropriate alone for public APIs)
- JWT bearer tokens
- OAuth 2.0 / OIDC
- mTLS for service-to-service
Discuss token storage, rotation, scope limitation, and replay risks.
What GraphQL security issues are common?
GraphQL risks include introspection exposure in production, overly deep nested queries (DoS), batching abuse, injection via resolvers, and broken authorization at field/object level.
Controls: disable or protect introspection, query depth/cost limits, strong authZ in resolvers, and least-privilege data access.
What is API fuzzing?
API fuzzing sends unexpected, malformed, or boundary inputs to endpoints to discover crashes, validation gaps, injection points, and logic bugs.
Combine schema-aware testing (OpenAPI/GraphQL) with auth-context switching. Fuzzing finds anomalies; manual analysis proves impact.
Reporting & Communication Interview Q&A
How you document findings — often the difference between a junior tool user and a hireable consultant.
How do you write a penetration test report?
A professional report typically includes: engagement overview and scope, methodology, executive summary, technical findings with evidence, risk ratings, reproduction steps, impact, remediation, and appendices (tools, timelines, raw data as appropriate).
Write for two audiences: executives need business risk; engineers need fix guidance.
What should an executive summary include?
High-level scope, overall security posture narrative, the most important risks in business language, potential impact scenarios, and prioritized recommendations.
Avoid dumping CVEs without context. Executives should understand what matters this quarter.
What is a proof of concept (PoC)?
A PoC is reproducible evidence that a vulnerability is real — screenshots, requests/responses, short scripts, or redacted data access proofs.
Good PoCs are minimal, safe, and clear enough that a developer can reproduce and verify the fix.
How do you prioritize vulnerabilities?
Combine severity (CVSS or similar), exploitability, asset criticality, exposure (internet-facing vs internal), and business impact.
A medium CVSS on a public payment API may outrank a high CVSS on an isolated lab host. Mention compensating controls and attacker prerequisites honestly.
HR & Behavioral Interview Questions
Motivation, communication, and culture-fit questions that still decide offers.
Tell us about yourself.
Give a 60–90 second structured pitch: background → security focus area (web/AD/cloud) → hands-on proof (labs, CTFs, projects, internships) → what role you want and why this company.
Avoid reciting your entire resume. End with enthusiasm for authorized offensive work and clear reporting.
Why penetration testing?
Connect curiosity about how systems fail with a professional ethic: helping organizations fix issues before criminals abuse them.
Mention enjoyment of methodology, puzzle-solving, and communicating risk. Avoid sounding like you only want to “hack things” without client outcomes.
What certifications do you have?
List role-aligned credentials honestly (for example CEEH, KLSFP, CKCC, eJPT, OSCP, PNPT) and immediately pair each with practical proof — labs, write-ups, or engagements.
If still preparing, say what you are studying and what you can already demonstrate.
Explain your home lab.
Describe architecture (hypervisor, vulnerable targets, AD lab, Kali/attacker host, logging if any), what attacks you practice, and what you documented.
Interviewers listen for intentional design and learning outcomes, not just “I installed Kali.”
Final Preparation Tips for Pentest Interviews
Practical habits that turn theory into interview-ready confidence.
Practice on HTB / TryHackMe
Solve boxes and write short notes on recon → foothold → privesc. Interviewers prefer structured storytelling over tool name-dropping.
Build a home lab
AD + web app + Linux targets beat passive video watching. Document attacks and detections if you can.
Learn report writing
Practice turning a finding into impact, PoC, and remediation. Consultant-ready communication wins interviews.
Understand the why
For every vulnerability, explain root cause and fix. Tool output without reasoning fails technical screens.
Stay current
Follow major CVEs, cloud identity abuse, and web authz research. Mention one recent technique thoughtfully.
Why Practice With A7 Security Hunters
Each response emphasizes authorized testing, validation, impact, and remediation — the language consulting and product security teams expect.
Pair these Q&As with home labs, HTB/THM practice, and certifications so your answers map to proof on GitHub and in live screens.
Connect interview prep with resume templates, career reality guidance, salary benchmarks, and hands-on A7 training paths.
Frequently Asked Questions About Pentest Careers & Interviews
Yes. Demand remains strong across consulting firms, product companies, financial services, healthcare, and government suppliers. Compensation grows with specialization (appsec, cloud, AD/red team) and the ability to deliver clear business-risk reporting — not only exploit demos.
Python for automation and exploit glue code, Bash for Linux workflows, PowerShell for Windows/AD assessments, JavaScript for browser and Node app context, and SQL for injection and data-layer understanding. You do not need to be a software engineer, but you must read and write scripts confidently.
Yes. Start with networking, Linux, Windows fundamentals, and web security, then build labs and complete structured practice (HTB/THM/PortSwigger). Entry paths often include SOC, IT admin, bug bounty, or junior appsec before pure consulting pentest roles.
Cover fundamentals (methodology, scope, ethics), web (OWASP, authz), at least one specialty (AD or cloud), tooling-with-reasoning, and reporting. Depth on 40–60 well-understood topics beats memorizing 200 shallow definitions.
Practical certs carry weight: eJPT, PJPT/PNPT, OSCP, CRTO, and cloud security certs depending on role. A7 paths such as CEEH, KLSFP, and CKCC help structure learning. Always back certs with labs and write-ups.
Pentests are usually scoped assessments to find and demonstrate vulnerabilities within agreed targets and timeboxes. Red teaming emphasizes objective-based adversary simulation, stealth, and testing detection/response — often with broader TTPs and longer timelines.
State the weakness, how you validated it, who could exploit it, business impact, evidence, and a concrete fix. Mention false-positive checks. Interviewers hire people who reduce risk, not people who paste tool banners.
No. Emphasize authorized testing, labs, CTFs, bug bounty programs with clear rules, and professional ethics. Unauthorized access is a disqualifier for serious employers.
Clear writing, calm client communication, time management under scope limits, teamwork with blue team/IT, and honesty about residual risk. Many engagements fail on communication, not on missing a niche CVE.
Often a recruiter screen, technical discussion (concepts + past work), practical exercise or live Burp/methodology walkthrough, and a client-communication or report sample review. Prepare stories from labs if you lack commercial experience.
Rules of engagement define authorized targets, time windows, forbidden techniques, data handling, and emergency contacts. Violating ROE can cause outages and legal issues. Interviewers listen for professionalism here.
Know Kerberos basics, common attack paths (Kerberoasting, PTH, relay families at a conceptual level), BloodHound purpose, and defensive controls. Be able to narrate an attack path from foothold to DA without skipping detection implications.
Not always. OSCP helps, but many juniors enter with strong portfolios, eJPT/PNPT-level skills, bug bounty proof, and excellent fundamentals. Target the job description: appsec-heavy roles may value PortSwigger-style depth more than AD certs.
Claiming tools you cannot explain, ignoring scope/ethics, memorizing definitions without examples, dismissing reporting, and overstating impact. Another failure mode: inability to prioritize findings for business risk.
Continue Your Offensive Security Prep
See what pentesters and SOC analysts actually do day to day — tools, workflows, and hireable proof.
Career RealityEthical hacker and pentester resume structure, ATS tips, and project bullets that survive interviews.
Resume TemplatesBlue-team interview practice if you are targeting SOC or hybrid security roles.
Analyst Q&AStart Your Penetration Testing Career
Build practical skills in web, network, API, and Active Directory security through hands-on labs, certifications, and interview-ready practice with A7 Security Hunters.