Security / Penetration Tester interview questions and answers
10 Security / Penetration Tester interview questions with concise model answers: 2 junior, 5 mid-level and 3 senior. Topics: access control, auth, automation, engagement, injection, logic. Answer aloud first, then reveal the model answer and compare.
10 of 10 questions shown
-
Explain authentication versus authorization with an IDOR example.
Model answer. Authentication proves who you are; authorization decides what you may do. In an IDOR, GET /invoices/1042 returns another customer's invoice because the server checks that you are logged in but not that you own the record. Test by replaying requests with a second account's session and swapped identifiers.
Tools: Burp Suite
-
Describe reflected, stored and DOM-based XSS and the primary defence.
Model answer. Reflected: input in the request is echoed in the response. Stored: the payload is saved and served to other users. DOM-based: client-side script writes untrusted data into a dangerous sink such as innerHTML. The primary defence is context-aware output encoding and safe DOM APIs, with a Content Security Policy as defence in depth.
-
How do you confirm SQL injection when the application returns no errors?
Model answer. Use boolean-based tests where true and false conditions change the response, time-based tests (SLEEP or pg_sleep) and out-of-band interactions. Stay within the agreed scope. The fix is parameterised queries, not input filtering.
Tools: Burp Suite
-
How does the SameSite cookie attribute change CSRF risk?
Model answer. SameSite=Lax, the default in Chromium browsers, withholds cookies on cross-site subrequests and POSTs but still sends them on top-level GET navigations. Strict withholds them everywhere. State-changing requests should still use anti-CSRF tokens, and GET must never change state.
-
What do you check when testing JWT authentication?
Model answer. Accepting alg none, RS256 to HS256 key confusion, weak HMAC secrets, missing validation of exp, aud and iss, kid injection, revocation and storage location. Remember the payload is only base64url encoded, so it must not hold secrets.
Tools: Burp Suite, Postman
-
What is SSRF and how do you test for it?
Model answer. The server fetches a URL the attacker controls. Test URL parameters, webhooks and image fetchers by pointing them at 127.0.0.1 and cloud metadata at 169.254.169.254, try redirects, DNS rebinding and alternative IP encodings. Mitigate with allow-lists, IMDSv2 and egress filtering.
-
Give an example of a business-logic flaw and how you find it.
Model answer. A coupon that can be redeemed several times by sending parallel requests, a race condition. Scanners miss these, so map the intended workflow, then abuse order, repetition and concurrency (Burp Turbo Intruder) and negative or oversized values in price and quantity fields.
Tools: Burp Suite
-
What do you agree before starting a penetration test?
Model answer. Written authorisation, in-scope and out-of-scope assets, testing windows and permitted techniques (denial of service, social engineering). Also data handling, emergency contacts, test accounts for each role and the reporting and retest process.
-
How do you rate and report a finding so it drives action?
Model answer. Combine CVSS base score with business context, give clear reproduction steps and evidence, describe impact in business terms and offer specific remediation. Open the report with a prioritised summary and avoid severity inflation, which erodes trust.
-
How do you add security scanning to CI without drowning teams in false positives?
Model answer. Run ZAP baseline (passive) scans on pull requests and authenticated active scans nightly on staging, and add dependency and static analysis. Fail the build only on new high-confidence findings, and document each suppression with a reason and an owner.
Tools: OWASP ZAP
No question matches those filters. Clear the search or choose All.
Practise like an interview
- Say your answer out loud before revealing the model answer.
- Add a real example from your work. Interviewers remember stories, not definitions.
- Mark what you can answer cleanly and repeat the rest tomorrow.
- Notice the trade-offs in each answer; senior questions are scored on judgement.
Know the stack
Skills interviewers look for: OWASP Top 10, Burp Suite, Scripting, Threat modelling, Reporting.
Interview questions for other roles
AI / LLM Evaluation QA
Evaluates model outputs, writes rubrics and builds regression sets for AI features.
Accessibility Tester
Audits products against WCAG 2.2 with assistive technology and automation.
Data / ETL QA Engineer
Validates pipelines, warehouses and reports so the numbers can be trusted.
Game QA Tester
Plays builds on PC, console and mobile to find bugs before players do.
Localization QA Tester
Checks translated products for language, layout and cultural fit in-market.
Mobile QA Engineer
Tests native and cross-platform apps on real devices, with and without automation.