Skip to content

Cyber Security Interview Questions for Freshers

40 questions with answers for candidates with Freshers — 30 easy, 10 medium.

What interviewers expect: freshers

Interviews test fundamentals: CIA triad, networking, common attacks, firewalls versus IDS, hashing versus encryption, basic Windows events and Linux commands. Expect one or two simple scenarios like triaging a phishing email or failed logins, plus questions about your home lab, certifications and willingness to work shifts. Clear explanations and curiosity matter more than tool depth.

This set is weighted towards Security Fundamentals (9), GRC and Compliance (8), Cryptography and PKI (6), Network Security (5).

Networking and OS basics Common attacks and defences SIEM and log basics Home lab projects
Solved at this levelStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
3 questions free Unlock the rest in seconds
01

What is the principle of least privilege?

Save to ▾
Show answer
Least privilege means every user, service and application gets only the minimum access needed for its job, and only for as long as needed. It limits the damage from compromised accounts and insider mistakes. Examples are giving developers read-only production access, using separate admin accounts, and just-in-time elevation that expires after a few hours. Regular access reviews are needed because permissions tend to grow over time.
02

How do you check which ports are listening on a server you manage?

Save to ▾
Show answer
List listening sockets with the owning process, then compare against what the server should expose. Anything unexpected needs an owner or should be closed. # Linux sudo ss -tulpn # Windows netstat -ano | findstr LISTENING Get-NetTCPConnection -State Listen Map the PID to a process name in Task Manager or with ps to identify the service.
03

What is single sign-on and what protocols does it use?

Save to ▾
Show answer
SSO lets a user authenticate once with an identity provider and access many applications without separate passwords. SAML 2.0 uses signed XML assertions and is common for enterprise web apps. OpenID Connect, built on OAuth 2.0, uses JSON tokens and suits modern web and mobile apps. SSO reduces password reuse and helps central control, but makes the identity provider a high-value target that needs strong MFA.
04

How do you write an effective security policy?

Save to ▾
Show answer
Start from business needs and regulations, keep it short and clear, and state scope, purpose, roles, requirements and exceptions. Avoid technical detail that changes often; put that in standards. Get input from IT, HR and legal, then management approval. Publish it where staff can find it, train people, require acknowledgement and review it at least yearly or after major changes.
05

What is business continuity and disaster recovery, and what are RTO and RPO?

Save to ▾
Show answer
Business continuity keeps critical business functions running during disruption, while disaster recovery restores IT systems. Recovery Time Objective is the maximum acceptable downtime, and Recovery Point Objective is the maximum acceptable data loss measured in time. A payments system may need an RTO of one hour and an RPO near zero, which needs replication, while an internal wiki may accept a day.
06

What is memory forensics and which tool is commonly used?

Save to ▾
Show answer
Memory forensics analyses a RAM capture to find running processes, injected code, network connections, loaded DLLs, command history and encryption keys. It reveals fileless malware that leaves little on disk. Volatility 3 is the common open source framework, with plugins such as windows.pslist, windows.netscan and windows.malfind. Captures are taken with tools like WinPmem or through EDR live response.
07

How would you capture and analyse suspicious traffic using tcpdump and Wireshark?

Save to ▾
Show answer
Capture on the right interface with a filter to limit size, save to a pcap file, then open it in Wireshark. sudo tcpdump -i eth0 host 10.10.0.15 and port 53 -w dns.pcap In Wireshark, use display filters such as dns, http.request or tls.handshake.type == 1, and Statistics > Conversations to spot top talkers. Protect pcaps because they may contain sensitive data.
08

What is the difference between authentication, authorisation and accounting?

Save to ▾
Show answer
Authentication proves who you are, for example password plus an OTP or passkey. Authorisation decides what you are allowed to do after login, such as read-only access to a finance folder. Accounting, or auditing, records what you actually did, like logins, file access and admin changes. Together they are called AAA. Weak accounting is a common gap, because without logs an incident cannot be investigated.
09

What is social engineering and what are its common forms?

Save to ▾
Show answer
Social engineering manipulates people rather than technology to gain access or information. Common forms are phishing emails, spear phishing aimed at specific staff, vishing over phone calls, smishing over SMS or WhatsApp, pretexting with a fake story, baiting with infected USB drives and tailgating into offices. Defences include awareness training, phishing simulations, call-back verification for payment changes, and technical controls such as MFA and email authentication.
10

How would you check a cloud account against CIS benchmarks?

Save to ▾
Show answer
Enable the native posture service, such as AWS Security Hub with the CIS AWS Foundations standard, Microsoft Defender for Cloud with the CIS Azure benchmark, or Security Command Center on Google Cloud. Open source tools like Prowler or ScoutSuite also work. Export findings, prioritise critical ones like root MFA, public storage and open admin ports, assign owners and track remediation over time.
11

How would you build a basic home SOC lab?

Save to ▾
Show answer
Use a laptop with virtualisation, run a Windows VM with Sysmon, a Linux server and a free SIEM such as Elastic or Splunk Free, or Wazuh as an open source option. Forward logs, then simulate attacks safely with Atomic Red Team tests on your own VMs. Write detections for each test, document them on GitHub and explain them in interviews.
12

What are the most common cloud security misconfigurations?

Save to ▾
Show answer
Frequent issues are publicly accessible storage buckets, overly permissive IAM policies with wildcards, long-lived access keys, security groups open to 0.0.0.0/0 on SSH, RDP or databases, disabled audit logging, unencrypted snapshots shared publicly, and exposed instance metadata. Cloud Security Posture Management tools and native services such as AWS Security Hub, Microsoft Defender for Cloud and Google Security Command Center detect them continuously.
13

An auditor finds that access reviews were not done for two quarters. What do you do?

Save to ▾
Show answer
Acknowledge the finding and agree a remediation plan. Immediately run the overdue reviews for in-scope systems, prioritising privileged access, and revoke unneeded access. Find the cause, such as no owner or a manual process, and fix it by assigning owners, automating campaigns in the IGA tool and adding reminders and escalations. Provide evidence of completed reviews to close the finding.
14

What is a salt and why is it used in password hashing?

Save to ▾
Show answer
A salt is a unique random value stored with each password hash. It makes identical passwords produce different hashes, so precomputed rainbow tables are useless and attackers must crack each hash separately. Salts are not secret. A pepper is an additional secret kept outside the database. Combined with slow algorithms like Argon2id, bcrypt or scrypt, salting makes offline cracking much more expensive.
15

What is the difference between a SIEM and a SOAR?

Save to ▾
Show answer
A SIEM collects and correlates logs to detect threats. SOAR, Security Orchestration, Automation and Response, takes alerts and runs playbooks that enrich, decide and act, for example looking up an IP's reputation, querying EDR, disabling a user and opening a ticket. SIEM answers what is happening; SOAR speeds up the response. Many platforms now combine both, but automation still needs human approval for disruptive actions.
16

How would you hash passwords correctly in Python?

Save to ▾
Show answer
Use a dedicated password hashing library with Argon2id, which handles salts and parameters automatically. from argon2 import PasswordHasher ph = PasswordHasher() stored = ph.hash(password) try: ph.verify(stored, attempt) if ph.check_needs_rehash(stored): stored = ph.hash(attempt) except Exception: deny_login() Never use plain SHA-256 or MD5 for passwords.
17

How do you generate a strong random secret or password from the command line?

Save to ▾
Show answer
Use a cryptographically secure source, never a simple random function. OpenSSL and Python's secrets module both use the operating system CSPRNG. openssl rand -base64 32 python3 -c "import secrets; print(secrets.token_urlsafe(32))" Store the output in a password manager or secret vault, not in a text file or chat message.
18

How would you run a basic threat model for a new web application?

Save to ▾
Show answer
Draw a data flow diagram showing users, the web app, APIs, databases and third parties, and mark trust boundaries. Then apply STRIDE to each element: Spoofing, Tampering, Repudiation, Information disclosure, Denial of service and Elevation of privilege. For each threat, record the existing control, a risk rating and an owner. Repeat the model whenever the architecture changes, ideally during design reviews.
19

How do you build a risk register?

Save to ▾
Show answer
Create a table where each risk has an ID, description written as cause, event and impact, asset, owner, inherent likelihood and impact, existing controls, residual rating, treatment decision, action plan, due date and review date. Gather risks through workshops, audits, incidents and threat intelligence. Review the register monthly with owners and report top risks to leadership quarterly.
20

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

Save to ▾
Show answer
An event is any observable occurrence, like a login or a file change. An alert is an event or pattern that a tool flags as possibly malicious. An incident is a confirmed or highly likely violation of security policy that needs response, such as a compromised account. Clear definitions matter because incidents trigger escalation, legal review and regulatory reporting timelines.
21

What is a false positive and a false negative in SOC alerts?

Save to ▾
Show answer
A false positive is an alert on benign activity, such as an admin running a legitimate script flagged as malicious. A false negative is a real attack that produced no alert, which is more dangerous. Too many false positives cause alert fatigue and missed real incidents. Analysts tune rules with allowlists, thresholds and context, and test detections against simulated attacks to find false negatives.
22

Where do you see yourself in five years in cyber security?

Save to ▾
Show answer
A strong answer is specific yet flexible. For example: in five years I want to lead incident response or security engineering work for a large environment. I plan to master SOC operations first, then specialise through hands-on cloud and IR projects and certifications such as CySA+ and later CISSP. I also want to mentor junior analysts, since teaching strengthens my own skills.
23

How do you decode and check a JWT during troubleshooting?

Save to ▾
Show answer
A JWT has header, payload and signature separated by dots. Decode the first two parts to read claims, but never trust them without verifying the signature. echo $TOKEN | cut -d. -f2 | base64 -d 2>/dev/null Check iss, aud, exp and nbf claims. In code, verify with a library using the expected algorithm and issuer keys, and reject alg none.
24

What should a post-incident review include?

Save to ▾
Show answer
A blameless review covers the timeline, root cause, how the attacker got in, what detected it, what slowed response, business impact and decisions made. It ends with specific actions that have owners and dates, such as enabling MFA on all VPN users or adding a detection rule. Tracking these actions to completion matters more than the report itself, otherwise the same incident repeats.
25

A user on the office LAN reports repeated certificate warnings and you suspect ARP spoofing. What is happening and how do you stop it?

Save to ▾
Show answer
ARP has no authentication, so an attacker on the same LAN can send fake ARP replies linking their MAC address to the gateway's IP. Victims then send traffic through the attacker, enabling man-in-the-middle interception. Defences include Dynamic ARP Inspection with DHCP snooping on switches, port security, network access control, and encrypting traffic end to end with TLS so intercepted data is useless.
26

Describe a time you handled a stressful outage or security issue.

Save to ▾
Show answer
Situation: during my internship the office internet went down during a client demo because of a broadcast storm. Task: restore service quickly. Action: I checked switch logs, found a looped cable creating a loop, removed it, and then enabled spanning tree and storm control with my senior. Result: service returned in 20 minutes, and I wrote a short runbook so the team could resolve similar issues faster.
27

How do you scan your own network for open ports with Nmap, with permission?

Save to ▾
Show answer
Only scan networks you own or have written approval for. Start with host discovery, then service and version detection on key ports. nmap -sn 10.10.0.0/24 nmap -sV -T3 -p 1-1000 10.10.0.15 nmap -sV --top-ports 100 -oA scan_results 10.10.0.0/24 Compare results with the approved service list and raise tickets for unexpected open ports.
28

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

Save to ▾
Show answer
A vulnerability is a weakness, such as an unpatched server. A threat is anything that can exploit it, such as a ransomware group. Risk is the likelihood that the threat exploits the vulnerability multiplied by the business impact. For example, an unpatched internet-facing VPN is high risk, while the same flaw on an isolated lab machine is low risk because likelihood and impact are smaller.
29

How do you calculate annual loss expectancy?

Save to ▾
Show answer
Single Loss Expectancy is asset value times exposure factor, and Annual Loss Expectancy is SLE times Annual Rate of Occurrence. SLE = Asset Value x Exposure Factor ALE = SLE x ARO Example: a server worth 20 lakh rupees, 50 percent loss per incident, expected once in four years: SLE = 20,00,000 x 0.5 = 10,00,000 ALE = 10,00,000 x 0.25 = 2,50,000 per year
30

How do you encrypt and decrypt a file using GPG?

Save to ▾
Show answer
For sharing, use the recipient's public key; for personal storage, use symmetric mode with a strong passphrase. gpg --encrypt --recipient analyst@example.in report.pdf gpg --output report.pdf --decrypt report.pdf.gpg gpg --symmetric --cipher-algo AES256 backup.tar Verify the recipient key fingerprint out of band before trusting it.
31

What is the difference between a policy, a standard, a procedure and a guideline?

Save to ▾
Show answer
A policy is a high-level management statement of intent, such as all data must be classified. A standard sets mandatory specific requirements, like AES-256 for confidential data. A procedure gives step-by-step instructions to meet the standard. A guideline is recommended but optional advice. This hierarchy lets policies stay stable while standards and procedures change with technology.
32

What is the difference between a vulnerability assessment and a penetration test?

Save to ▾
Show answer
A vulnerability assessment uses scanners to find and rank as many known weaknesses as possible across many assets, and it is broad and frequent. A penetration test is a time-boxed, authorised attempt to exploit weaknesses and show real impact, such as reaching sensitive data. Assessments answer what is wrong; pen tests answer what an attacker could actually achieve. Most programmes run monthly scans and annual or release-based pen tests.
33

How do you find overly permissive security groups with the AWS CLI?

Save to ▾
Show answer
Query security groups that allow ingress from anywhere, then review each. aws ec2 describe-security-groups \ --filters Name=ip-permission.cidr,Values=0.0.0.0/0 \ --query 'SecurityGroups[*].[GroupId,GroupName]' --output table Pay attention to ports 22, 3389, 3306 and 5432. Replace them with VPN, bastion or session manager access.
34

What does GRC stand for in cyber security?

Save to ▾
Show answer
GRC is Governance, Risk and Compliance. Governance sets direction, policies, roles and accountability for security. Risk management identifies, assesses and treats risks to an acceptable level. Compliance ensures the organisation meets laws, regulations, contracts and standards such as the DPDP Act, RBI directions, ISO 27001 and PCI DSS. GRC analysts write policies, run risk assessments, manage audits and track remediation.
35

How do you scan a container image for vulnerabilities in CI?

Save to ▾
Show answer
Use a scanner like Trivy or Grype and fail the build on serious findings. trivy image --severity HIGH,CRITICAL --exit-code 1 myapp:1.4.2 trivy config ./terraform Run it on every build, rescan images in the registry daily because new CVEs appear, and prefer minimal base images to reduce findings.
36

What is a digital signature and how does it work?

Save to ▾
Show answer
A digital signature proves who created data and that it has not changed. The signer hashes the data and signs the hash with their private key using algorithms like RSA-PSS, ECDSA or Ed25519. Anyone with the public key can verify it. Signatures give integrity, authentication and non-repudiation, and are used in software updates, TLS certificates, e-sign documents and signed emails.
37

What is the difference between IDS and IPS?

Save to ▾
Show answer
An Intrusion Detection System monitors traffic or hosts and raises alerts but does not block. An Intrusion Prevention System sits inline and can drop malicious packets in real time. IDS is safer for tuning because false positives do not break traffic, while IPS gives active protection. Detection can be signature based, as in Snort and Suricata rules, or anomaly based using baselines of normal behaviour.
38

A developer wants to write their own encryption algorithm for customer data. How do you respond?

Save to ▾
Show answer
I would advise against it. Custom cryptography almost always has flaws that experts would find, and it fails audits. Instead, use well-reviewed libraries such as libsodium, platform crypto APIs, or the cloud KMS with AES-GCM and envelope encryption. I would offer to help choose the right library and key management design, and include a security review in the feature's pull request.
39

What is defence in depth?

Save to ▾
Show answer
Defence in depth means using several independent layers of controls so that one failure does not lead to a breach. A typical stack has perimeter firewalls, email filtering, endpoint EDR, MFA, network segmentation, least privilege, logging and backups. If a phishing email gets past the filter, MFA and EDR can still stop the attacker. The trade-off is cost and complexity, so layers should target the most likely attack paths.
40

Describe a time you had to admit you did not know something in a technical discussion.

Save to ▾
Show answer
Situation: in a design review, an architect asked me whether our VPN supported post-quantum key exchange. Task: give an accurate answer. Action: I said I did not know rather than guessing, checked the vendor documentation and release notes that afternoon and shared a short summary with options. Result: the team trusted my answers more, and the finding was added to our cryptography roadmap.

Frequently asked questions

What is asked in Cyber Security interviews for Freshers?

Interviews test fundamentals: CIA triad, networking, common attacks, firewalls versus IDS, hashing versus encryption, basic Windows events and Linux commands. Expect one or two simple scenarios like triaging a phishing email or failed logins, plus questions about your home lab, certifications and willingness to work shifts. Clear explanations and curiosity matter more than tool depth.

How many questions should I practise before a Cyber Security interview?

Work through all 40 questions here, then the company-wise sets for the employers you are targeting. Quality matters more than count: be able to explain why each answer is right.

Which topics matter most for Freshers?

Focus first on Networking and OS basics, Common attacks and defences, SIEM and log basics, Home lab projects.