Cyber Security Interview Questions: 20 Questions With Model Answers
Interviews for cyber security roles test three things: whether you understand the fundamentals, whether you can reason through problems you have not seen before and whether you communicate clearly. Memorised definitions rarely impress; clear explanations with examples do. This lesson gives you twenty commonly asked questions with model answers, a method for answering scenario questions, tips for practical tests and a preparation plan. Use the answers as a pattern, then rewrite them in your own words with your own lab experience.
How to Answer Well
- Listen and clarify. Restate the question and ask about assumptions if needed.
- Answer in layers. Start with a one-sentence definition, then give an example, then mention a trade-off.
- Use the STAR method for experience questions: Situation, Task, Action, Result.
- Be honest about gaps. “I have not used that tool, but here is how I would approach it” is respected; bluffing is not.
- Think out loud during scenarios so that the interviewer can follow your reasoning.
- Tie answers to business risk, not only technology.
Part 1: Fundamentals
Q1. What is the CIA triad?
Model answer: Confidentiality means only authorised people can see information; integrity means information is accurate and unaltered; availability means systems and data are accessible when needed. Encryption supports confidentiality, hashing and digital signatures support integrity and redundancy and backups support availability. Real controls often involve trade-offs: heavy access restrictions can reduce availability, so security means balancing all three according to the business need. See Core Security Concepts and the CIA Triad.
Q2. What is the difference between a threat, a vulnerability and a risk?
Model answer: A threat is something that could cause harm, such as a ransomware group. A vulnerability is a weakness it could use, such as an unpatched server. Risk is the combination of the likelihood of the threat exploiting the vulnerability and the impact if it does. Patching removes the vulnerability, while risk can also be reduced by lowering impact through backups or segmentation.
Q3. Explain symmetric and asymmetric encryption, and where each is used.
Model answer: Symmetric encryption uses one shared key for both encrypting and decrypting; it is fast and used for bulk data, such as AES in disk encryption and TLS sessions. Asymmetric encryption uses a public and private key pair; it solves key distribution and enables digital signatures, but is slower. In practice TLS uses asymmetric methods to authenticate the server and agree a session key, then symmetric encryption for the data. See Cryptography Fundamentals.
Q4. Hashing, encryption and encoding: what is the difference?
Model answer: Encoding, such as Base64, changes the format of data and is reversible by anyone, so it provides no security. Encryption is reversible with the right key and protects confidentiality. Hashing is one-way and produces a fixed-length fingerprint, used for integrity checks and for storing passwords. For passwords I would use a slow, salted algorithm such as Argon2, bcrypt or scrypt, not a fast hash like MD5 or plain SHA-256.
Q5. Walk me through what happens when you type a web address into a browser and press Enter, from a security viewpoint.
Model answer: The browser checks its caches, then resolves the domain through DNS, which could be attacked by spoofing unless protected by DNSSEC or encrypted DNS. It opens a TCP connection, then a TLS handshake in which the server presents a certificate that the browser validates against trusted certificate authorities, checking the name, validity and chain. The browser and server agree on session keys, often with forward secrecy. The HTTP request is then sent, carrying cookies, and the server responds. Security issues at each step include DNS poisoning, interception on untrusted networks, invalid certificates, session theft and application flaws. See PKI, Certificates and TLS.
Q6. What are the differences between TCP and UDP, and why does it matter for security?
Model answer: TCP is connection-oriented and reliable with a three-way handshake; UDP is connectionless and faster with no delivery guarantee. For security, TCP scanning relies on handshake behaviour (open, closed, filtered), while UDP scanning is slower and less certain. Some attacks, such as amplification denial-of-service, exploit UDP services that respond to spoofed requests. Firewalls and monitoring must treat them differently. See Networking Fundamentals for Security.
Part 2: Attacks and Defences
Q7. Explain SQL injection and how to prevent it.
Model answer: SQL injection happens when user input is concatenated into a database query so that input can change the query’s structure. The main prevention is parameterised queries, which keep code and data separate. Additional layers are input validation, least-privilege database accounts, generic error messages and a web application firewall as a safety net. I would also scan code for string-built queries and test for it with an authorised scanner. See SQL Injection Explained and Prevented.
Q8. What is the difference between XSS and CSRF?
Model answer: XSS makes a victim’s browser run attacker-controlled script in the context of a trusted site because the site outputs untrusted data without encoding. CSRF tricks a logged-in user’s browser into sending an unwanted request, exploiting the site’s trust in the browser’s cookies. Defences for XSS are context-aware output encoding and a Content Security Policy; for CSRF, anti-CSRF tokens and SameSite cookies. XSS can bypass CSRF protections, because script can read tokens. See XSS and CSRF Explained.
Q9. What is the OWASP Top 10 and which item do you consider most important?
Model answer: It is an awareness list of the most critical web application security risk categories. I would highlight Broken Access Control because it is ranked first, is easy to introduce and often has severe impact: users reading or changing data that is not theirs. The fix is server-side authorisation on every request with deny-by-default and automated tests with multiple roles. See OWASP Top 10 Explained.
Q10. How would you defend against phishing in an organisation?
Model answer: In layers: email filtering with SPF, DKIM and DMARC; link and attachment sandboxing; phishing-resistant MFA so stolen passwords are not enough; least privilege so one account cannot do everything; regular awareness training with easy reporting; and monitoring and a response playbook for compromised accounts. I would measure the report rate as well as the click rate, because staff who report quickly are an early warning system. See Social Engineering and Phishing Defence.
Q11. What is a man-in-the-middle attack and how do you mitigate it?
Model answer: An attacker positions themselves between two parties to observe or alter traffic, for example on an open Wi-Fi network or through ARP or DNS spoofing. TLS with proper certificate validation, HSTS, VPNs on untrusted networks, network access control, dynamic ARP inspection and user education about certificate warnings all reduce the risk. See Network Attacks and Defences.
Q12. What is ransomware and what would you do to prepare for it?
Model answer: Ransomware encrypts or steals data and demands payment. Preparation includes tested offline or immutable backups (3-2-1-1-0), prompt patching of internet-facing systems, MFA on remote access and email, EDR, network segmentation, restricted administrative privileges, an incident response plan and exercises. Recovery depends on clean backups and a rebuild of identity systems rather than hoping a payment will restore data. See Ransomware: How It Works, Defence and Recovery.
Part 3: Operations and Practice
Q13. How do you prioritise vulnerabilities when there are thousands?
Model answer: I combine severity (CVSS), evidence of exploitation (CISA KEV and EPSS), exposure (is it internet-facing?), asset criticality and compensating controls. A medium vulnerability that is being exploited on a public server can outrank a critical one on an isolated test machine. I then agree target timelines per priority, verify fixes with rescans and report metrics such as mean time to remediate. See Vulnerability Management.
Q14. You see 200 failed logins for one account in five minutes, followed by a success. What do you do?
Model answer: I would treat it as a likely brute-force or credential-stuffing success. First, check the source IP, geolocation and whether it is a known address. Then contain: disable or reset the account and revoke sessions. Investigate what the account did after the successful login, such as mailbox rules, file access or new tokens, and check whether the same source targeted other accounts. Escalate according to severity, preserve logs and later add rate limiting, MFA and detections. See SIEM, Logging and SOC Operations.
Q15. Describe the incident response lifecycle.
Model answer: Preparation; detection and analysis; containment, eradication and recovery; and post-incident review. Preparation covers plans, roles, tools and exercises. In detection I confirm and scope the incident and preserve evidence. Containment limits spread, eradication removes the cause and persistence, and recovery restores systems safely with monitoring. The lessons-learned phase turns the experience into improvements. See Incident Response Process and Playbooks.
Q16. What is the difference between IDS and IPS, and what are false positives?
Model answer: An IDS detects and alerts, usually from a copy of traffic; an IPS sits inline and can block. A false positive is an alert on harmless activity; a false negative is a missed attack. Inline prevention needs careful tuning because false positives can interrupt legitimate services, so many teams start in detection mode and move rules to blocking when confident.
Q17. What is the principle of least privilege and how would you implement it?
Model answer: Users, applications and systems should have only the access required for their tasks, and for only as long as needed. Implementation includes role-based access control, separate admin accounts, just-in-time elevation, regular access reviews, removing unused accounts and permissions and monitoring privileged activity. It limits the damage when an account is compromised. See Identity and Access Management (IAM).
Q18. How do you secure a new cloud account?
Model answer: Protect the root account with strong MFA and stop using it, create role-based administrative access with MFA, enforce least privilege, enable audit logging for all regions, block public storage by default, encrypt data, use private networking, set budget alerts, scan infrastructure-as-code and monitor for risky events. The shared responsibility model means that configuration is my job. See Cloud Security Fundamentals.
Part 4: Professional Questions
Q19. You find a serious vulnerability on a website you do not own. What do you do?
Model answer: I stop testing immediately; I should not have been probing a system without permission. I would document only what I already observed, without accessing any data, and report it through the organisation’s vulnerability disclosure or security contact, or through a national coordinator such as CERT-In if no channel exists, with enough detail to reproduce but not to harm. I would not publish details until it is fixed, and I would not demand payment. Ethics and law are central: unauthorised access is a crime in most countries. See Ethical Hacking: Law, Ethics, Scope and Rules of Engagement.
Q20. Tell me about a time you learned something technical on your own.
Model answer (STAR example, adapt with your own story): Situation: I wanted to understand how attacks appear in logs, but had no work environment. Task: Build something I could safely experiment on. Action: I created a home lab with two virtual machines, installed Wazuh, generated failed logins and a new admin account myself and wrote three detection rules, testing each until it fired. Result: I documented the lab in a write-up with screenshots, which I used in my portfolio, and I can now explain from experience how brute force and persistence look in log data. Use a true story from your own practice; never invent experience.
Scenario Method: How to Think Through Unfamiliar Questions
- Clarify the context: what is the asset, who is affected, what is the goal?
- Identify risks and attack paths using a framework such as STRIDE or MITRE ATT&CK.
- Prioritise by impact and likelihood.
- Propose layered controls: preventive, detective and responsive.
- Consider constraints: cost, usability, legacy systems, time.
- State how you would test and measure that the solution works.
Example scenario: “Design security for a small clinic’s patient booking website.” A strong answer maps data flows, identifies personal and health data under privacy law, proposes HTTPS, strong authentication, authorisation, input validation, encrypted storage, backups, logging, patching, a vulnerability scan and incident plan, and explains how the clinic would check these regularly.
Practical and Technical Tests
- Take-home labs: follow the instructions exactly, document your steps and findings, and include a short executive summary.
- Live exercises: narrate your thinking, and if you are stuck, say what you would check next.
- Log analysis tasks: look for time, source, user and outcome; build a timeline; state confidence and next actions.
- Code review tasks: look first for input handling, authentication, authorisation, secrets and error handling.
- Report writing tests: structure matters; see How to Write a Penetration Test Report.
Questions to Ask the Interviewer
- What does a typical week look like in this role?
- How does the security team work with developers and the business?
- What tools and logging sources are in place today?
- How are incidents handled and how do you support on-call staff?
- What training and certification support is offered?
- What would success look like in my first six months?
Preparation Plan: Two Weeks
| Days | Focus |
|---|---|
| 1 to 3 | Review fundamentals: CIA, cryptography, networking, authentication; practise explaining aloud |
| 4 to 6 | Web and application security: OWASP Top 10, SQL injection, XSS, access control |
| 7 to 9 | Operations: logging, SIEM, incident response, vulnerability management; walk through two scenarios |
| 10 to 11 | Cloud, identity and Zero Trust basics |
| 12 | Prepare three STAR stories and your portfolio walkthrough |
| 13 | Mock interview with a friend; record yourself and review |
| 14 | Research the company, review the job advert, prepare questions and rest |
Common Mistakes in Interviews
- Reciting definitions without examples.
- Claiming experience with tools you have never used.
- Jumping to a solution without asking clarifying questions.
- Speaking about attack techniques in a way that sounds irresponsible or boastful.
- Forgetting the business perspective: cost, impact and usability.
Practice Exercises
- Record yourself answering any five of the twenty questions in under two minutes each, then listen and improve clarity.
- Write three STAR stories from your labs, studies or work experience.
- Create ten flashcards of terms you find hardest and explain each to a non-technical friend.
- Take any lesson from this series and prepare a three-minute explanation as if teaching a colleague.
- Run a mock scenario with a friend: “an employee reports they clicked a link and now their screen behaves oddly.” Practise the first ten minutes of the response.
Mentor tip: Interviewers hire people they would trust to be on call with. Show curiosity, calm reasoning, honesty about limits and genuine care about protecting people. Those qualities matter as much as any single answer.
Educational use only: model answers are examples; adapt them to your own experience and never misrepresent your background.
- Explain concepts in layers: definition, example, trade-off.
- Use STAR for experience questions and a structured method for scenarios.
- Show ethics and legal awareness; be honest about what you do not know.
- Practise aloud and prepare a portfolio walkthrough.
- Tie technical answers to business risk and clear communication.