Skip to content
Tutorials Center
My learning

Topics

Lesson 52 of 53 ยท Practice and Review

Interview Questions

Prepare for security interviews with model answers on fundamentals, web, networks, cryptography, scenarios, ethics and reporting for junior roles.

Security interviews test two things at once: whether you know the material and whether you can be trusted with access. Interviewers listen for clear reasoning, honest limits ("I would check that first") and an instinct to stay inside authorization. Memorized definitions help less than being able to explain why a defense works.

This lesson lists common questions with model answers, grouped by topic. Everything is read-only, since interviews are conversations, not code runs. Use the answers as a guide, put them in your own words, and give examples from your lab work. Questions about attack techniques are answered at the concept and defense level, which is also what a responsible interviewer wants to hear.

What interviewers look for

Reasoning Explain why, not only what.
Ethics Scope and permission first.
Communication Make risk clear to non-experts.
Curiosity Show lab work and learning.
1 / 2

Fundamentals

What is the difference between a vulnerability, a threat and a risk? A vulnerability is a weakness. A threat is something or someone that could exploit it. Risk is the likelihood and impact of that happening, often written as likelihood times impact (Threat Modeling).

Explain the CIA triad. Confidentiality (only the right people can read data), Integrity (data is not changed without authorization) and Availability (systems work when needed). Most security controls protect one or more of these, and attacks target them.

What is the difference between a penetration test and a vulnerability scan? A scan is automated and finds known weaknesses. A penetration test is scoped, human-driven work that tries to chain issues, shows real impact, removes false positives and ends with a report and retest (The Penetration Testing Process).

What is defense in depth? Layering controls so one failure does not mean a breach: for example network segmentation, patching, least privilege, monitoring and backups together.

What is the principle of least privilege? Give every user, process and service only the access needed for its job, nothing more. It limits what an attacker gains from any single compromised account.

Web security

How does SQL injection happen and how do you prevent it? It happens when untrusted input is concatenated into a query so the database treats part of it as code. Prevent it with parameterized queries, input validation as a second layer, and a database account with minimal permissions (SQL Injection).

What is the difference between stored, reflected and DOM XSS? Stored XSS keeps the payload on the server (for example in a comment) and serves it to many users. Reflected XSS bounces it from the request into the response. DOM XSS happens entirely in browser-side code that writes untrusted data into the page. The main fix for all is context-aware output encoding, supported by a Content Security Policy (XSS and CSRF).

What is CSRF and what stops it? Cross-site request forgery makes a logged-in user's browser send an unwanted request. Anti-CSRF tokens, SameSite cookies and checking request origin stop it.

What is the same-origin policy? A browser rule that stops a page from one origin (scheme, host and port) from reading data of another. It is why scripts on evil.test cannot read your bank's responses (Web Application Security Basics).

What is IDOR (broken object-level authorization)? A user changes an identifier, such as /orders/1001 to /orders/1002, and sees someone else's data because the server did not check ownership. Fix it by authorizing every object access on the server (Authentication Flaws).

What is SSRF? Server-side request forgery makes the server fetch a URL chosen by the attacker, possibly reaching internal services or cloud metadata. Defend with allow-lists of destinations, blocking internal address ranges, and network-level egress controls (Server-Side Flaws).

Networks and systems

What happens when you type a URL in a browser? DNS resolves the name, TCP connects (handshake), TLS negotiates encryption and verifies the certificate, the browser sends an HTTP request, and the server responds with content that the browser renders. A strong answer notes where attacks can occur at each step (Networking Essentials).

What is the difference between TCP and UDP, and why does it matter for scanning? TCP is connection-oriented with a handshake, so open ports reply predictably. UDP has no handshake, so silence is ambiguous and scanning is slower and less certain (Port Scanning Concepts).

How would you detect that someone is scanning your network? Look for one source contacting many ports or hosts in a short time, many connection resets, and IDS alerts, and correlate firewall and flow logs in a central system (Logging and SIEM).

How do you harden a Linux server? Patch regularly, remove unneeded services, use key-based SSH with root login disabled, apply a host firewall, enforce least privilege and file permissions, centralize logs, and measure against a baseline such as CIS (OS Hardening).

How do symmetric and asymmetric encryption differ? Symmetric uses one shared key and is fast, so it encrypts bulk data. Asymmetric uses a public and a private key and solves key exchange and signatures. TLS combines them (Cryptography Essentials).

Hashing, encryption and encoding: what is the difference? Encoding (such as Base64) is reversible by anyone and gives no secrecy. Encryption is reversible with a key. Hashing is one-way, used for integrity and, with salts and slow algorithms, for passwords.

Scenario questions

You find a critical flaw on a customer's production site during an authorized test. What do you do? Stop exploiting beyond proof, document evidence safely, and follow the rules of engagement for critical findings, which usually mean telling the client contact immediately rather than waiting for the final report. Avoid reading or copying real customer data.

An employee says they clicked a phishing link and entered their password. What are your first steps? Treat it as an incident: have them change the password, revoke sessions and tokens, check for MFA changes or inbox rules, search logs for logins from unusual places, warn other staff if the campaign is wider, and record a timeline (Incident Response).

How would you prioritize 500 scanner findings? Remove false positives, group duplicates, and rank by exposure, known exploitation, asset value and CVSS, then set deadlines per priority with owners (Vulnerability Scanning and Triage).

How would you secure a login page? Slow salted password hashing, rate limiting and temporary lockout, generic error messages, MFA, secure random session tokens with HttpOnly/Secure/SameSite cookies, HTTPS, and monitoring of failures (Project: Build and Harden a Login Flow).

Ethics, law and reporting

What would you do if you accidentally access data outside your scope? Stop immediately, do not view, copy or keep it, and report it to the client contact and your lead right away, in writing. Honesty here protects everyone and is often what separates trusted testers from risky ones (Law, Scope and Rules of Engagement).

How do you explain a finding to a non-technical executive? Start with business impact in plain words ("a stranger could read other customers' orders"), give severity and likelihood, and offer a clear fix and timeline. Keep technical detail for the appendix (Writing a Penetration Test Report).

What makes a good finding in a report? A clear title, affected asset, description, impact, reproduction steps, evidence, severity with reasoning, and a specific remediation. A developer should be able to fix it without calling you.

How do you keep learning without breaking the law? Use your own lab, legal practice platforms and CTFs, and bug bounty programs within their published rules (Certifications, Practice Platforms and Careers).

Questions to ask the interviewer

Good candidates also ask: how findings turn into fixes, how the team handles out-of-scope discoveries, what training and mentoring exist, how they measure quality, and how they support staff who make honest mistakes. These questions show maturity and tell you whether the job suits you.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. In an interview you are asked about an attack technique. What is the strongest style of answer?

    Interviewers want understanding plus a defensive mindset, not operational instructions.
  2. 2. You realize you opened data outside your authorized scope. What should you do?

    Prompt, honest reporting limits harm and preserves trust. Hiding it makes the situation far worse.
  3. 3. What is the difference between hashing and encoding?

    Base64 only changes representation. A hash cannot be reversed to the original input.
  4. 4. How should you present a finding to executives?

    Decision makers need impact and next steps in plain language; technical evidence goes in an appendix.

Summary

  • Interviews test knowledge, judgement and trustworthiness together.
  • Explain attacks at concept level and always pair them with detection and prevention.
  • Scope, authorization and honest reporting are core professional skills.
  • Prepare scenario answers: critical findings, phishing, triage, and secure login design.
  • Back your answers with lab experience, and ask thoughtful questions in return.

Next: Defensive Security Cheat Sheet.