Cyber Security Interview Questions and Answers for Freshers (52 Questions)

Quick answer: These 52 cyber security interview questions and answers cover what freshers are asked most for SOC analyst, security analyst and junior penetration tester roles: security basics, networking, cryptography, web security (OWASP Top 10), malware and attacks, access management, incident response, ethical hacking and cloud security, plus real interview scenarios.

Read each answer, then explain it aloud in two or three sentences without looking. For quick self-testing, try the 100 cyber security MCQs after this page.

Contents

1. Security Basics

Q1. What is cyber security?

Cyber security is the practice of protecting systems, networks, applications and data from unauthorised access, attack, damage or theft. It combines technology (firewalls, encryption, monitoring), processes (patching, backups, incident response) and people (awareness training).

Q2. What is the CIA triad?

CIA stands for Confidentiality, Integrity and Availability. Confidentiality means only authorised people can read the data, integrity means the data is not altered without authorisation, and availability means systems and data are accessible when needed. Every security control protects one or more of these three.

Q3. What is the difference between a threat, a vulnerability and a risk?

A vulnerability is a weakness, such as an unpatched server. A threat is something that can exploit that weakness, such as an attacker or malware. Risk is the likelihood that the threat exploits the vulnerability multiplied by the impact if it does. You reduce risk by fixing vulnerabilities or reducing exposure.

Q4. What is defence in depth?

Defence in depth means using several layers of security so that if one control fails, another still protects the asset. For example: a firewall at the perimeter, network segmentation, endpoint protection, strong authentication, encryption and monitoring together.

Q5. What is the principle of least privilege?

Every user, program and service should get only the minimum access it needs to do its job, and only for as long as needed. It limits the damage if an account is compromised and is one of the most common interview topics.

Q6. What is the difference between authentication and authorisation?

Authentication verifies who you are, for example with a password, OTP or fingerprint. Authorisation decides what you are allowed to do after you are authenticated, for example read-only access versus admin access. Authentication always comes first.

2. Networking and Network Security

Q7. What is the difference between TCP and UDP?

TCP is connection-oriented: it uses a three-way handshake, guarantees ordered delivery and retransmits lost packets, so it suits web, email and file transfer. UDP is connectionless and faster but does not guarantee delivery, so it suits DNS, streaming, VoIP and gaming.

Q8. Explain the TCP three-way handshake.

The client sends SYN, the server replies with SYN-ACK, and the client answers with ACK. After these three steps the connection is established. A SYN flood attack abuses this by sending many SYNs and never completing the handshake.

Q9. What is a firewall and what types exist?

A firewall filters traffic between networks based on rules. Common types are packet-filtering firewalls (check IP and port), stateful firewalls (track connection state), application-level or proxy firewalls, and next-generation firewalls that add deep packet inspection and intrusion prevention.

Q10. What is the difference between IDS and IPS?

An Intrusion Detection System monitors traffic and raises alerts when it sees suspicious activity, but does not block it. An Intrusion Prevention System sits inline and can block or drop malicious traffic automatically. IDS is passive; IPS is active.

Q11. What is a VPN?

A Virtual Private Network creates an encrypted tunnel between a device and a network over the internet. It protects data on untrusted networks such as public Wi-Fi and lets remote employees reach internal systems securely.

Q12. Which common ports should every security fresher know?

Port 21 FTP, 22 SSH, 23 Telnet, 25 SMTP, 53 DNS, 80 HTTP, 110 POP3, 143 IMAP, 443 HTTPS, 445 SMB and 3389 RDP. Interviewers often ask why Telnet (23) and FTP (21) are insecure: they send credentials in plain text.

Q13. What is a DMZ?

A demilitarised zone is a separate network segment that hosts public-facing servers such as web and mail servers. It sits between the internet and the internal network, so if a public server is compromised the attacker still cannot reach internal systems directly.

3. Cryptography

Q14. What is the difference between symmetric and asymmetric encryption?

Symmetric encryption uses the same key to encrypt and decrypt, for example AES; it is fast but the key must be shared securely. Asymmetric encryption uses a public key to encrypt and a private key to decrypt, for example RSA and ECC; it solves key sharing but is slower. HTTPS uses both: asymmetric to agree a key, then symmetric for the data.

Q15. What is the difference between hashing and encryption?

Encryption is two-way: data can be decrypted with the right key. Hashing is one-way: it turns any input into a fixed-length digest that cannot be reversed, for example SHA-256. Hashing is used for password storage and integrity checks; encryption is used to keep data secret.

Q16. What is salting and why is it used?

A salt is a random value added to each password before hashing. Two users with the same password then get different hashes, which defeats precomputed rainbow tables. Modern systems use slow, salted algorithms such as bcrypt, scrypt or Argon2.

Q17. What is a digital signature?

A digital signature is created by hashing a message and encrypting the hash with the sender's private key. Anyone can verify it with the sender's public key. It proves who sent the message (authentication), that it was not changed (integrity) and that the sender cannot deny it (non-repudiation).

Q18. How does SSL/TLS make HTTPS secure?

During the TLS handshake the server presents a certificate signed by a trusted certificate authority, the client verifies it, and both sides agree on a session key using asymmetric cryptography. All further traffic is encrypted with that symmetric session key, protecting it from eavesdropping and tampering.

Q19. What is encoding, and is it secure?

Encoding, such as Base64 or URL encoding, only changes the format of data so it can be transmitted safely. It uses no key and anyone can decode it, so it provides no security. A common interview trap is calling Base64 encryption.

4. Web Application Security

Q20. What is the OWASP Top 10?

The OWASP Top 10 is a widely used list of the most critical web application security risks, published by the Open Worldwide Application Security Project. Categories include broken access control, cryptographic failures, injection, insecure design, security misconfiguration and vulnerable components.

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

SQL injection happens when user input is placed directly into a database query, letting an attacker change the query, for example to bypass login or dump data. Prevent it with parameterised queries (prepared statements), input validation, least-privilege database accounts and an ORM.

Q22. What is cross-site scripting (XSS)?

XSS lets an attacker inject malicious JavaScript into a page that other users view, which can steal session cookies or perform actions as the victim. The three types are stored, reflected and DOM-based. Prevent it with output encoding, input validation, a Content Security Policy and HttpOnly cookies.

Q23. What is CSRF?

Cross-site request forgery tricks a logged-in user's browser into sending an unwanted request, such as changing an email address, to a site where they are authenticated. Defences include anti-CSRF tokens, SameSite cookies and re-authentication for sensitive actions.

Q24. What is the difference between XSS and CSRF?

XSS runs the attacker's script inside the victim's browser on the trusted site, so it abuses the user's trust in the site. CSRF makes the victim's browser send a forged request, so it abuses the site's trust in the user's browser. XSS can often be used to bypass CSRF defences.

Q25. What is broken access control?

It occurs when users can act outside their intended permissions, for example by changing an ID in the URL to view another user's order (IDOR) or reaching an admin page without being an admin. Enforce access checks on the server for every request and deny by default.

5. Malware and Common Attacks

Q26. What is the difference between a virus, a worm and a trojan?

A virus attaches itself to a file and spreads when that file is run. A worm spreads by itself across networks without user action. A trojan pretends to be useful software but hides a malicious function such as a backdoor.

Q27. What is ransomware?

Ransomware encrypts a victim's files or systems and demands payment for the decryption key. The best protections are regular offline backups, timely patching, email filtering, least privilege and user awareness.

Q28. What is phishing and how can users spot it?

Phishing uses fake emails, messages or websites to trick people into revealing passwords or installing malware. Warning signs include urgent language, mismatched sender addresses, misspelt domains, unexpected attachments and requests for OTPs or passwords. Spear phishing targets a specific person.

Q29. What is a DoS and a DDoS attack?

A denial-of-service attack floods a system with traffic or requests so legitimate users cannot reach it. A distributed DoS uses many compromised machines (a botnet) at once, which makes it harder to block. Mitigations include rate limiting, CDNs and DDoS protection services.

Q30. What is a man-in-the-middle attack?

In a MITM attack the attacker secretly sits between two parties and can read or change their traffic, for example on fake public Wi-Fi or through ARP spoofing. Strong encryption with certificate validation (HTTPS), VPNs and HSTS prevent it.

Q31. What is social engineering?

Social engineering manipulates people rather than technology, for example pretending to be IT support to get a password, or tailgating into an office. Training and clear verification procedures are the main defences.

Q32. What is a zero-day vulnerability?

A zero-day is a flaw that is unknown to the vendor or has no patch yet, so defenders have had zero days to fix it. Defence relies on layered security, behaviour-based detection and rapid patching once a fix is released.

6. Identity and Access Management

Q33. What is multi-factor authentication?

MFA requires two or more different types of proof: something you know (password), something you have (phone or token) and something you are (fingerprint). It blocks most account takeovers even when a password is stolen.

Q34. What makes a strong password policy?

Long passphrases (12 or more characters) are better than short complex ones. Good policies block common and breached passwords, require MFA, encourage password managers and avoid forcing frequent changes unless a breach is suspected.

Q35. What is single sign-on (SSO)?

SSO lets a user log in once and access many applications without logging in again, using protocols such as SAML or OpenID Connect. It improves user experience and centralises control, but the SSO account must be strongly protected with MFA.

Q36. What is privilege escalation?

Privilege escalation is when an attacker gains higher access than intended. Vertical escalation moves from a normal user to admin or root; horizontal escalation accesses another user's data at the same level. Patching, least privilege and proper access checks prevent it.

7. Security Operations and Incident Response

Q37. What is a SOC?

A Security Operations Centre is a team that monitors an organisation's systems around the clock, detects and investigates alerts, and responds to incidents. SOC analyst (L1) is one of the most common entry-level cyber security jobs for freshers.

Q38. What is a SIEM?

A Security Information and Event Management system collects logs from servers, firewalls, endpoints and applications, correlates them and raises alerts on suspicious patterns. SOC analysts use the SIEM daily to triage and investigate events.

Q39. What are the phases of incident response?

A common model, based on NIST, has these phases: preparation; detection and analysis; containment, eradication and recovery; and post-incident activity (lessons learned). Interviewers want to hear that you contain first, preserve evidence and document everything.

Q40. What is the difference between an event, an alert and an incident?

An event is any observable occurrence, such as a login. An alert is an event flagged as possibly suspicious by a tool. An incident is a confirmed violation or threat to security policy that needs a response. Most alerts turn out to be false positives after investigation.

Q41. What is a false positive and a false negative?

A false positive is an alert for activity that is actually harmless; too many cause alert fatigue. A false negative is a real attack that was not detected, which is more dangerous. Tuning detection rules balances the two.

Q42. What is threat hunting?

Threat hunting is proactively searching for hidden attackers in the environment instead of waiting for alerts. Hunters form a hypothesis, for example unusual PowerShell use, and search logs and endpoint data to confirm or rule it out.

8. Ethical Hacking and Vulnerability Management

Q43. What is the difference between vulnerability assessment and penetration testing?

A vulnerability assessment scans systems and lists known weaknesses, usually with automated tools. A penetration test goes further: a tester actively tries to exploit the weaknesses, with written permission, to show the real impact. Assessments are broad; pen tests are deep.

Q44. What are the phases of ethical hacking?

Reconnaissance (gathering information), scanning and enumeration, gaining access, maintaining access and covering tracks, followed by reporting. Ethical hackers always work within a written scope and authorisation.

Q45. What is the difference between black box, white box and grey box testing?

In black box testing the tester has no internal knowledge, like an outside attacker. In white box testing the tester has full access to source code and architecture. Grey box gives partial knowledge, such as a normal user account.

Q46. What is CVE and CVSS?

CVE (Common Vulnerabilities and Exposures) gives each publicly known vulnerability a unique ID, such as CVE-2021-44228 for Log4Shell. CVSS (Common Vulnerability Scoring System) rates its severity from 0 to 10 so teams can prioritise patching.

Q47. Which free tools should a fresher practise with?

Nmap for network scanning, Wireshark for packet analysis, Burp Suite Community for web testing, Metasploit Framework, and Kali Linux which bundles them. Practise only on your own lab or legal platforms such as TryHackMe and Hack The Box; scanning systems without permission is illegal under the IT Act, 2000.

9. Cloud Security, Compliance and Scenarios

Q48. What is the shared responsibility model in cloud?

The cloud provider secures the underlying infrastructure (data centres, hardware, hypervisor), while the customer secures what they put in the cloud: data, identities, access settings and configurations. Most cloud breaches come from customer misconfiguration, such as public storage buckets.

Q49. What is Zero Trust?

Zero Trust means never trust, always verify: no user or device is trusted just because it is inside the network. Every request is authenticated, authorised and checked continuously, with least privilege and micro-segmentation.

Q50. Which security standards and laws should freshers know in India?

ISO/IEC 27001 for information security management, PCI DSS for card payment data, the IT Act, 2000 and CERT-In directions (including incident reporting within 6 hours), and the Digital Personal Data Protection Act, 2023 for personal data.

Q51. Scenario: a user reports a suspicious email with an attachment. What do you do?

Ask the user not to open or forward it, collect the email with full headers, check the sender, links and attachment hash in a sandbox or threat intelligence tool, search whether others received it, block the sender and indicators if malicious, and document the case. If anyone opened it, isolate their machine and escalate.

Q52. Scenario: you see many failed logins followed by a success from a new country. What does it suggest?

It suggests a brute-force or password-spraying attack that finally succeeded. Disable or lock the account, force a password reset, revoke active sessions, check what the account accessed, confirm with the user and make sure MFA is enabled.

How to Crack a Cyber Security Interview

  1. Master the basics: OSI and TCP/IP models, common ports, the CIA triad and the OWASP Top 10 come up in almost every interview.
  2. Show hands-on practice: mention labs you completed on legal platforms such as TryHackMe or Hack The Box, and what you learnt.
  3. Build two or three projects: a port scanner, a phishing URL detector or a log analyser gives you real things to talk about.
  4. Practise scenarios: walk through how you would handle a phishing email or a suspicious login, step by step.
  5. Be honest: if you do not know an answer, explain how you would find it. Interviewers value a clear thinking process.

Next steps: build portfolio work from our 36 cyber security projects, revise with the cyber security MCQs, and strengthen your scripting with Python projects for beginners.

Want to build it with a mentor? We teach Python, DSA, machine learning and cyber security through live online classes arranged around your free time – you write and understand every line yourself. We also run mock interviews for SOC and security analyst roles. Message us on WhatsApp or email engineersrworld@gmail.com.

Frequently Asked Questions

How should a fresher prepare for a cyber security interview?

Be strong in networking basics (OSI model, TCP/IP, ports), the CIA triad, common attacks and the OWASP Top 10. Practise hands-on labs on legal platforms, build two or three small projects, and be ready to explain one incident response scenario step by step.

Is coding required for cyber security jobs?

For SOC analyst and GRC roles, basic scripting is enough. Python and Bash help you automate log analysis and tasks. Penetration testing and application security roles need more coding to read and test code.

Which certification is best for beginners in cyber security?

CompTIA Security+ is a widely recognised entry-level certification. Free courses and labs are enough to start; choose a certification once you know whether you want SOC, penetration testing or GRC.

What salary can a cyber security fresher expect in India?

Pay depends on city, company and role. SOC L1 analyst roles are the most common entry point, and practical skills, labs and projects usually matter more than marks in getting shortlisted.

Scroll to Top