Cyber security interview questions and answers

All levels · fresher-friendly · 43 questions with answers

These are the questions that actually come up in Indian cyber security screening rounds — at service companies, product firms and SOC providers. Each answer is written the way you should say it out loud: short, concrete, and with the trade-off named. Work through them, then practise speaking them against an AI interviewer.

Reading isn't practising

You'll answer these out loud, under time pressure, with an interviewer asking follow-ups. Do a free 5-question AI mock interview and get scored feedback in minutes — no card needed.

Start free mock interview

How to use these answers

  • Answer out loud, not in your head — interviewers score how you explain, not how much you know.
  • Use a 20-second structure: what it is, why it matters, one example from your lab or project.
  • Say the trade-off. "I'd block the IP, but only after checking it isn't a shared NAT gateway" beats a textbook definition.
  • If you don't know, say how you'd find out. Silence loses points; a method does not.
  • Time yourself. Most screening rounds give you 60–90 seconds per answer.

Fundamentals

Almost every interview opens here. Get these crisp and you buy goodwill for the harder rounds.

1.What is the CIA triad?

Confidentiality, Integrity and Availability — the three properties every security control protects. Encryption protects confidentiality, hashing and signing protect integrity, and redundancy or DDoS protection protects availability. A good follow-up answer names the tension: adding strict confidentiality controls often costs availability, so you pick based on what the business loses most from.

2.Difference between a vulnerability, a threat and a risk?

A vulnerability is a weakness (unpatched Apache). A threat is an actor or event that could exploit it (a ransomware crew scanning the internet). Risk is the combination plus impact — the chance that this threat hits this vulnerability and what it costs you. Risk is what management funds; the other two are technical facts.

3.Symmetric vs asymmetric encryption — when do you use each?

Symmetric uses one shared key (AES) and is fast, so it encrypts the actual data. Asymmetric uses a key pair (RSA, ECC) and is slow, so it's used to exchange the symmetric key and to sign. TLS uses both: asymmetric for the handshake, symmetric for the session.

4.What is hashing, and how is it different from encryption?

Hashing is one-way — you cannot recover the input. It's used for password storage and integrity checks. Encryption is reversible with a key. For passwords you don't just hash: you use a slow, salted algorithm like bcrypt or Argon2 so that a leaked database can't be brute-forced cheaply.

5.What is salting and why does it matter?

A salt is a random value stored with each password hash. It makes identical passwords hash differently, which kills rainbow-table attacks and stops an attacker from spotting that 400 users share the same password.

6.Explain the difference between authentication and authorisation.

Authentication proves who you are (password, MFA, certificate). Authorisation decides what you're allowed to do once you're in (RBAC, policies). Most real breaches escalate because authorisation was too broad, not because authentication failed.

7.What is defence in depth?

Layering controls so no single failure is fatal: perimeter filtering, network segmentation, endpoint protection, least privilege, logging and backups. The test question behind it is whether you assume any one control will eventually fail — you should.

8.What is the principle of least privilege?

Every user, service and process gets only the access it needs, for only as long as it needs it. In practice that means role-based access, just-in-time admin elevation, and periodic access reviews to remove privilege that people accumulated when they changed teams.

9.What is zero trust?

Never trust based on network location. Every request is authenticated, authorised and encrypted, whether it comes from the office LAN or a café. Practically: strong identity, device posture checks, micro-segmentation and continuous verification rather than a single VPN gate.

10.What is a false positive, and why do SOC teams care so much about it?

An alert that flags benign activity as malicious. They matter because analyst time is the scarcest resource in a SOC — a noisy rule burns hours and trains people to ignore the console, which is how real alerts get missed.

Network security

1.Walk me through what happens when you type a URL and press enter.

DNS resolution, TCP handshake, TLS handshake, HTTP request, response, render. The security version names what can go wrong at each step: DNS spoofing, SYN floods, certificate mis-issuance or downgrade, injection and XSS in the response. Interviewers use this to see how deep your mental model goes.

2.TCP vs UDP, and the security implications?

TCP is connection-oriented with a handshake and ordering; UDP is fire-and-forget. UDP's lack of handshake makes it trivially spoofable, which is why DNS and NTP amplification DDoS attacks use it. TCP has its own abuse — SYN floods exhaust the connection table.

3.What is a firewall, and how does a next-generation firewall differ?

A traditional firewall filters on IP, port and protocol. An NGFW adds application awareness, user identity, TLS inspection and integrated IPS, so it can allow "Salesforce" rather than "443 to this range".

4.IDS vs IPS?

An IDS detects and alerts, sitting out of band. An IPS sits inline and can drop the traffic. IPS is stronger but riskier — a false positive becomes an outage, so tuning matters more.

5.What is network segmentation and why does it limit a breach?

Splitting the network into zones with controlled traffic between them. When an attacker lands on a user laptop, segmentation means they cannot reach the database subnet without crossing a policy point that logs and can block them. It converts a breach into an incident.

6.Explain a man-in-the-middle attack and how TLS prevents it.

The attacker relays traffic between two parties while reading or modifying it. TLS defeats it with certificate validation — the server proves it owns the domain through a CA-signed certificate — plus integrity checks on every record. It fails when clients skip validation or trust a rogue CA.

7.What is a VPN, and what does it not protect against?

It encrypts traffic between the client and a gateway. It does not protect you from malware on the endpoint, phishing, a compromised destination server, or an attacker who already has valid credentials — a common follow-up trap.

8.What ports would concern you if you saw them open on the internet?

3389 (RDP), 445 (SMB), 22 with password auth, 23 (Telnet), 1433/3306/5432 (databases), 5900 (VNC), 6379 (Redis, often unauthenticated). Say why: these are directly authenticating services with a long history of brute force and pre-auth RCE.

Application and web security

1.What is SQL injection and how do you prevent it?

User input is concatenated into a query so the attacker changes its meaning and reads or writes data they shouldn't. Prevention is parameterised queries or prepared statements — not input sanitisation, which is a fragile second line. Add least-privilege database accounts so injection doesn't hand over the whole schema.

2.Explain XSS and its types.

Cross-site scripting runs attacker JavaScript in another user's browser. Stored XSS is persisted server-side, reflected XSS comes back in the response to a crafted link, and DOM-based XSS never touches the server — the client writes untrusted data into the DOM. Fix with context-aware output encoding plus a Content Security Policy.

3.What is CSRF and how is it different from XSS?

CSRF makes a logged-in user's browser send an unwanted request using their cookies; the attacker never reads the response. XSS runs code in the victim's page and can read everything. Defend CSRF with anti-forgery tokens and SameSite cookies.

4.What is the OWASP Top 10 and can you name a few entries?

A community list of the most critical web application risks. Broken access control, cryptographic failures, injection, insecure design, security misconfiguration, vulnerable and outdated components, identification and authentication failures. Broken access control has been number one because it's logic, not a library you can patch.

5.What is SSRF?

Server-side request forgery — the application fetches a URL you control, so you make it call internal services like cloud metadata endpoints. It's severe in cloud environments because the metadata service can hand over credentials. Defend with allow-lists, blocking link-local ranges, and IMDSv2.

6.How would you securely store a password in a database?

Argon2id or bcrypt with a per-user salt and a work factor tuned to your hardware. Never MD5 or SHA-256 alone — they're fast, which is exactly wrong for passwords. Add MFA so a leak isn't game over.

7.What is a secure SDLC?

Building security into each stage instead of testing at the end: threat modelling in design, SAST and dependency scanning in CI, DAST in staging, secrets scanning on commit, and a defined process for triaging what those tools find. The last part is where most programmes fail.

Incident response and monitoring

1.Walk me through the incident response lifecycle.

Preparation, identification, containment, eradication, recovery, lessons learned. Say what makes each real: preparation is playbooks and access you already have; containment is often isolating a host before you fully understand the malware; lessons learned is the step everyone skips and the one that actually reduces repeat incidents.

2.A user reports a phishing email. What do you do?

Preserve the original with headers, extract indicators (sender, URLs, attachment hashes), check whether anyone clicked or entered credentials by searching mail and proxy logs, block the sender and URLs, reset affected credentials and revoke sessions, then send an awareness note. Report scope before you report opinions.

3.What is a SIEM and what does it actually do?

It centralises logs from endpoints, network devices, cloud and applications, normalises them, and runs correlation rules to raise alerts. Its value is correlation across sources — a failed VPN login is nothing, a failed VPN login from a new country followed by a successful one and a mailbox rule creation is an incident.

4.How do you tell a true positive from a false positive?

Enrich before you judge: who is the user, is the asset expected to do this, what happened immediately before and after, does the destination have reputation history. Then compare against a known-good baseline. Document the reasoning either way so the rule can be tuned.

5.What is threat hunting?

Proactively searching for adversary activity that existing detections missed, driven by a hypothesis — for example "if an attacker used this technique, I'd see this parent-child process pair". The output is either a finding or a new detection rule.

6.What are IOCs and how do you use them?

Indicators of compromise — hashes, IPs, domains, registry keys. You sweep your estate for them after intelligence lands, and you extract them from your own incidents to detect repeat activity. They're brittle on their own, which is why behaviour-based detection sits alongside them.

7.What is MITRE ATT&CK and how have you used it?

A knowledge base of adversary tactics and techniques. Teams use it to map detection coverage, describe incidents in a shared vocabulary, and prioritise what to build next. Even as a fresher, saying you mapped your home-lab detections to ATT&CK techniques lands well.

Reading isn't practising

You'll answer these out loud, under time pressure, with an interviewer asking follow-ups. Do a free 5-question AI mock interview and get scored feedback in minutes — no card needed.

Start free mock interview

Cloud and identity

1.What is the shared responsibility model?

The cloud provider secures the infrastructure; you secure your configuration, identity, data and code. The exact line moves with the service — with IaaS you patch the OS, with a managed database you don't. Most cloud breaches are on the customer side of the line: public buckets and over-permissive IAM.

2.How would you secure an S3 bucket?

Block public access at the account level, enforce encryption at rest, use bucket policies scoped to specific principals, enable versioning and access logging, and use pre-signed URLs instead of making objects public. Then monitor for policy changes.

3.What is IAM least privilege in practice on cloud?

No wildcard actions, no long-lived access keys where a role will do, permission boundaries on developer roles, and regular review of unused permissions using access analyzers. Attach policies to roles and groups, not individual users.

4.What is MFA fatigue and how do you defend against it?

The attacker has valid credentials and spams push notifications until the user accepts one. Defend with number matching, push rate limiting, and phishing-resistant factors like FIDO2 security keys or passkeys.

5.What is SSO and what is the risk of it?

One identity provider authenticates the user across many applications, which improves control and user experience. The risk is concentration — if the IdP account is compromised, everything downstream is. That's why IdP admin accounts need the strongest controls in the organisation.

HR and behavioural round

This round decides as many outcomes as the technical one, and it's where most freshers lose the offer.

1.Why did you choose cyber security?

Give a specific origin, not a slogan. Something you actually did — a CTF you got stuck on for two days, a phishing mail you analysed for a family member, a lab you built — then connect it to the role. Avoid "because it's a growing field"; every candidate says it.

2.Tell me about a project you've worked on.

Use context, action, result. What was the goal, what did you personally build or find, what changed because of it. If it's a home lab, treat it as a real project: what you deployed, what attack you simulated, what detection caught it, what you'd do differently.

3.How do you keep up with security news?

Name real sources you actually follow and one thing you learned recently that you can discuss for two minutes. A specific recent CVE or incident, with your take on why it mattered, beats a list of newsletter names.

4.Where do you see yourself in three years?

Be concrete and role-adjacent: strong in detection engineering, or moving from SOC L1 to threat hunting, plus the certification or skill path that gets you there. Ambition that stays inside the function reassures the interviewer you won't leave in six months.

5.You disagree with a senior analyst's triage decision. What do you do?

Bring evidence, not opinion. State what you observed, ask what they saw that you didn't, escalate through the documented process if it's high impact, and accept the decision once it's made. Interviewers are checking that you can push back without being difficult.

6.Do you have any questions for us?

Always yes. Ask about the detection stack, how alerts get tuned, what the on-call rotation looks like, and how a new joiner is ramped in the first 90 days. These signal that you're thinking about doing the job, not just getting it.

Frequently asked questions

How many questions are asked in a cyber security interview?

A screening round is usually 8–12 questions in 30 minutes. Technical rounds go deeper on 4–6 areas with follow-ups, and the HR round adds another 5–8 behavioural questions.

What should a fresher study first for a cyber security interview?

Networking fundamentals, the CIA triad and OWASP Top 10, basic Linux and Windows logging, and one hands-on project you can talk about for five minutes. Depth in a small area beats shallow coverage of everything.

Are these questions relevant for Indian companies?

Yes — they're the patterns used in Indian service-company screening rounds, product-company technical rounds and managed SOC hiring, which is where most entry-level cyber security hiring in India happens.

Continue preparing

Reading isn't practising

You'll answer these out loud, under time pressure, with an interviewer asking follow-ups. Do a free 5-question AI mock interview and get scored feedback in minutes — no card needed.

Start free mock interview
Practise these free