You can ace algorithms and system design, yet a question about firewalls or incident response can still throw you off in an interview. Cybersecurity Interview Questions sit at the crossroads of coding interview prep and practical security skills, testing authentication, encryption, penetration testing, network security, SIEM, incident response, and cloud security. This article breaks down common questions, offers clear sample answers, and practice prompts so you can confidently crack your cybersecurity interviews at any level, fresher, intermediate, or experienced, and secure your desired job in 2025.
To help with that, Interview Coder's AI Interview Assistant provides tailored mock interviews, instant feedback on answers about vulnerability assessment, secure coding, compliance, and threat hunting, and focused practice that builds absolute confidence. Want guided practice? Try it out today.
Top 41 Cyber Security Interview Questions for Freshers

1. What are the Common Cyberattacks?
Some basic cyber attacks are as follows:
- Phishing: Fraudulent emails that impersonate trusted sources to steal credentials or deliver malware.
- Social Engineering Attacks: Attacks that manipulate people to disclose information or perform actions that help the attacker.
- Ransomware: Malware that encrypts files and demands payment for the decryption key. Cryptocurrency Hijacking: Attackers run hidden mining code on victim machines to mine coins like Monero or Ethereum, wasting CPU and power.
- Botnet Attacks: Networks of compromised devices controlled by attackers to send spam, launch DDoS attacks, or harvest data.
2. What are the Elements of Cybersecurity?
There are various elements of cybersecurity as given below:
- Application Security: Incorporate security measures during software development to minimize bugs and injection risks.
- Information Security: Protect data from unauthorized access, disclosure, modification, or deletion.
- Network Security: Controls and tools to stop unauthorized access and threats across networks; admins configure firewalls, segmentation, and monitoring.
- Disaster Recovery Planning: Plans and procedures to restore services and operations after an incident, prioritized by business impact.
- Operational Security: Procedures and checks that help admins view systems from an attacker’s point of view to reduce exposure.
- End User Education: Training employees to recognize phishing attempts, avoid risky downloads, and adhere to safe practices, as human error is a common risk.
3. Define DNS?
The Domain Name System (DNS) translates human-friendly domain names into IP addresses that browsers and services use to locate machines on the Internet. Every device on a network has an IP address, and DNS maps readable names to those addresses so users can type example.com instead of a numeric IP.
4. What is a Firewall?
A firewall is a hardware or software device that monitors incoming and outgoing traffic and allows, blocks, or drops packets based on configured security rules. Firewalls enforce access policies, isolate segments, and reduce exposure to unauthorized connections.
5. What is a VPN?
VPN stands for Virtual Private Network. A VPN creates an encrypted tunnel over an insecure network like the Internet so a remote user or site can securely access a private network. It uses tunneling protocols and encryption to protect data in transit and to extend private network access across public infrastructure.
6. What are the Different Sources of Malware?
The different sources of malware are given below:
- Worms: Self-replicating malware that spreads across networks or email without needing a host file.
- Spyware: Runs in the background to collect and exfiltrate sensitive data to attackers. Ransomware: Encrypts files and demands payment to return or delete the data.
- Virus: Attaches to files or programs and executes when the host runs, spreading to other files.
- Trojan: Malicious programs disguised as legitimate software; they do not self-replicate but enable backdoors or data theft.
- Adware: Tracks user behavior to display targeted ads and can be intrusive or privacy-invasive.
7. How Does Email Work?
When a sender sends an email, the client hands it to an SMTP server. SMTP routes messages, potentially through multiple mail servers, and consults DNS to find the recipient’s mail server. The recipient’s server stores the message until the recipient retrieves it using POP or IMAP. If servers cannot connect, messages may queue and be delivered later or returned as undeliverable if delivery fails for too long.
8. What is the Difference Between Active and Passive Cyber Attacks?
- Active Cyber Attack: The attacker modifies or attempts to modify message content or system resources. Active attacks threaten integrity and availability, often producing detectable changes.
- Passive Cyber Attack: The attacker observes or copies message content without altering it. Passive attacks threaten confidentiality and are often stealthy because they do not change the system state.
9. What is a Social Engineering Attack?
Social engineering manipulates people into revealing information, granting access, or taking actions that help an attacker. Techniques include phone pretexts, phishing, and using public data like birthdays to guess credentials. Social engineering exploits trust and human routines.
10. Who Are Black Hat Hackers and White Hat Hackers?
- White Hat Hacker: A certified security professional who tests systems, conducts penetration tests, and reports vulnerabilities to improve defenses.
- Black Hat Hacker: A criminal who exploits systems for personal gain, data theft, or disruption using known hacking techniques.
11. Define Encryption and Decryption?
Encryption transforms plaintext into ciphertext using an algorithm and key so unauthorized parties cannot read it. Decryption reverses that process using the correct key to restore the original plaintext. Encryption protects confidentiality during storage and transit.
12. What is the Difference Between Plaintext and Cleartext?
Plaintext is data that has not been encrypted. Cleartext refers to information transmitted or stored without encryption and not intended to be encrypted. In both cases, the content is readable without decryption.
13. What is a Block Cipher?
A block cipher encrypts fixed-size blocks of plaintext (commonly 64 or 128 bits) into ciphertext using a symmetric key. Modes like ECB and CBC describe how blocks chain together to handle longer messages and to add randomness and integrity properties.
14. What is the CIA Triangle?
The CIA Triad stands for Confidentiality, Integrity, and Availability. These three goals guide information security policies: keep data private, keep it accurate and unaltered, and keep services available when needed.
15. What is the Three-Way Handshake?
TCP uses a three-way handshake to establish a full-duplex reliable connection. The client sends SYN, the server replies SYN plus ACK, and the client sends ACK. This exchange synchronizes sequence numbers and confirms both sides are ready to communicate.
16. How Can Identity Theft Be Prevented?
Steps to prevent identity theft:
- Use strong, unique passwords and never share PINs.
- Enable two-factor authentication for email and key services.
- Protect devices with passwords and avoid installing untrusted software.
- Limit what you post on social media and verify payment gateways before entering credentials.
- Rotate passwords and avoid giving personal data over the phone unless you initiated the call.
17. What Are Some Common Hashing Functions?
A hash function maps input data of any size to a fixed-size value used for indexing, integrity checks, or fingerprinting. Types and simple methods include:
- Division Method
- Mid Square Method
- Folding Method
- Multiplication Method
In cryptographic practice, algorithms like the SHA family and bcrypt are standard for integrity and password storage.
18. What Do You Mean by Two-Factor Authentication?
Two-factor authentication requires two independent methods to verify identity, typically something you know (password) plus something you have (token or phone) or something you are (biometrics). It raises the effort required for attackers to gain access.
19. What Does XSS Stand For? How Can It Be Prevented?
Cross-site scripting (XSS) is a vulnerability where attackers inject scripts that a web application serves to other users’ browsers. Consequences include:
- Account compromise
- Privilege escalation
- Account deletion
Prevent XSS by filtering input as it arrives, encoding user data on output for the correct context (HTML, JavaScript, URL, CSS), sending strict response headers like Content-Type and X-Content-Type-Options, and using a Content Security Policy as a last line of defense.
20. What Do You Mean By Shoulder Surfing?
A shoulder surfing attack happens when someone nearby visually observes a screen or keyboard to capture passwords, PINs, or other sensitive information. This low-tech method can lead to privacy invasion and unauthorized access if people do not shield inputs.
21. What is the Difference Between Hashing and Encryption?
- Hashing: Converts data to a short fixed value used for indexing, integrity checks, and comparisons. Hashing is one-way; you cannot recover the original data from the hash. Hash outputs are fixed length, and collisions can occur.
- Encryption: Encodes data so authorized users with the key can reverse the process and recover the original plaintext. Encrypted output size varies with input length and the right key and algorithm allow decryption.
22. Differentiate Between Information Security and Information Assurance
- Information Assurance: Focuses on managing risks to information through controls that preserve integrity, availability, authenticity, non-repudiation, and confidentiality across systems and processes.
- Information Security: Focuses on protecting information by reducing risks of unauthorized access, alteration, or disclosure, and on preventing incidents through technology and policy.
23. Write a Difference Between HTTPS and SSL
- HTTPS: Hypertext Transfer Protocol Secure combines HTTP with a cryptographic layer so browsers and servers exchange content over an encrypted channel.
- SSL: Secure Sockets Layer is a cryptographic protocol used historically to secure transport; TLS replaces it. SSL/TLS provides encryption and authentication that HTTPS uses to protect web traffic.
24. What Do You Mean by System Hardening?
System hardening is the process of reducing a system’s attack surface by:
- Removing or configuring unnecessary services
- Closing open ports
- Changing default passwords
- Applying patches and secure settings
The goal is to reduce vulnerabilities that attackers can exploit.
25. Differentiate Between Spear Phishing and Phishing
- Phishing: Mass email scams that impersonate trusted organizations to trick many recipients into revealing credentials or downloading malware.
- Spear Phishing: Targeted attacks aimed at specific individuals or organizations, using tailored messages to increase the chance of success.
26. What Do You Mean by Perfect Forward Secrecy?
Perfect Forward Secrecy generates a unique session key for each connection so that compromise of long-term keys does not expose past session traffic. With this approach, even if an attacker later obtains a private key, they cannot decrypt previously captured sessions that used ephemeral keys.
27. How to Prevent MITM?
- Use strong Wi-Fi encryption like WPA3 on access points.
- Use strong router admin credentials and disable default accounts.
- Use a VPN for sensitive connections so traffic is encrypted end to end and cannot be intercepted on public networks.
28. What is Ransomware?
Ransomware is malware that encrypts a victim’s data and demands payment for the decryption key. Attackers use it to extort money from individuals and organizations, often disrupting critical services until the victim recovers data from backups or pays the ransom.
29. What is Public Key Infrastructure?
A Public Key Infrastructure (PKI) is the framework that issues, manages, and revokes digital certificates that bind public keys to identities. PKI supports secure communications, authentication, and data protection by enabling trust in public-private key pairs.
30. What is Spoofing?
Spoofing is when an attacker impersonates a legitimate user or device to gain trust and access. Types include:
- IP Spoofing: Faking source IP addresses to bypass filters or hide origin. ARP Spoofing: Poisoning local network caches to redirect traffic through the attacker’s machine.
- Email Spoofing: Faking sender addresses and headers to phish or impersonate organizations.
31. What Do You Mean by a Null Session?
A null session occurs when a user connects without a username or password. Anonymous sessions can expose information if services accept them, so they present a security risk that administrators should block or restrict.
32. Differentiate Between Threat, Vulnerability, and Risk
- Threat: Any actor or event that can harm systems, data, or operations, such as malware, phishing, or malicious insiders.
- Vulnerability: A flaw in hardware, software, procedures, or people that a threat can exploit, like an unpatched service or a user prone to phishing.
- Risk: The probability that a threat will exploit a vulnerability multiplied by the impact of that exploitation. Risk management identifies, assesses, and treats these risks through controls and monitoring.
33. What Does XSS Stand For? How Can It Be Prevented?
XSS stands for Cross-Site Scripting. It allows attackers to inject scripts into pages viewed by other users, bypassing the same-origin protections. Prevent XSS by validating input, encoding output for the correct context, using safe response headers like Content-Type, and applying a Content Security Policy to limit what scripts can run.
34. Who Are Black Hat, White Hat, and Grey Hat Hackers?
- Black Hat Hackers: Illegal attackers who break into systems to steal data, cause damage, or disrupt services.
- White Hat Hackers: Ethical testers who find and report vulnerabilities through authorized penetration testing and audits.
- Grey Hat Hackers: Operate between those extremes, sometimes testing systems without permission and then notifying owners, often without malicious intent.
35. What Are the Types of Cybersecurity?
Cybersecurity divides into sub-domains:
- Network security: Protects networks and traffic from intruders using firewalls and monitoring.
- Application security: Keeps software safe through secure coding, patching, and testing.
- Data security: Ensures data confidentiality and integrity while stored and in transit. Identity management: Controls who has access and what they can do with that access.
- Operational security: Processes and decisions to protect data handling and storage. Mobile security: Protects data on phones, tablets, and portable devices.
- Cloud security: Protects data and services hosted on cloud providers like AWS, Azure, and Google Cloud.
36. What Do You Mean by Honeypots?
Honeypots are decoy systems designed to attract attackers so defenders can observe attack techniques and gather intelligence. Organizations and researchers use honeypots to study exploit methods and improve detection.
37. Differentiate Between Vulnerability Assessment and Penetration Testing
- Vulnerability Assessment: Scans and catalogs weaknesses across systems, ranks them, and offers remediation guidance.
- Penetration Testing: Simulates real attacks to exploit vulnerabilities and demonstrate real-world impact, often going beyond scanning to prove an attack path.
38. What Do You Mean by Brute Force in the Context of Cybersecurity?
A brute force attack attempts every possible combination of passwords, keys, or PINs until the correct one is found. Attackers automate this trial-and-error approach against login pages, encrypted files, or keys when weak credentials or unlimited attempts exist.
39. How Can You Avoid a Brute Force Attack?
Defenses include:
- Enforcing strong password policies
- Limiting failed login attempts
- Disabling remote root login via SSH
- Changing default SSH ports
- Using CAPTCHA
- Restricting login by IP ranges
- Enabling two-factor authentication
- Using unique login URLs for sensitive admin access
- Monitoring server logs for repeated attempts
40. What Do You Mean by Man-in-the-Middle Attack?
A man-in-the-middle attack occurs when an attacker intercepts and possibly alters communication between two parties who believe they are communicating directly. Attackers capture credentials, inject content, or redirect traffic on unprotected networks such as public Wi-Fi.
41. Differentiate Between Information Protection and Information Assurance
- Information protection uses controls like encryption, access controls, and security software to prevent unauthorized access to data.
- Information assurance covers the broader guarantee that data remains available, authentic, and confidential by applying policies, risk management, and technical controls that sustain trust in the data.
Related Reading
- Vibe Coding
- Leetcode Blind 75
- C# Interview Questions
- Leetcode 75
- Jenkins Interview Questions
- React Interview Questions
- Leetcode Patterns
- Java Interview Questions And Answers
- Kubernetes Interview Questions
- AWS Interview Questions
- Angular Interview Questions
- SQL Server Interview Questions
- AngularJS Interview Questions
- Vibe Coding
- Leetcode Blind 75
- C# Interview Questions
- Jenkins Interview Questions
- React Interview Questions
- Leetcode Patterns
- Java Interview Questions And Answers
- Kubernetes Interview Questions
- AWS Interview Questions
- Angular Interview Questions
- SQL Server Interview Questions
- AngularJS Interview Questions
- TypeScript Interview Questions
- Azure Interview Questions
Top 40 Cyber Security Interview Questions for Intermediate

1. What Are the Steps Involved in Hacking a Server or Network: Phases Attackers Use and How Defenders Counter Them
Attack activity usually follows repeatable phases: Reconnaissance, scanning and enumeration, exploitation, privilege escalation and persistence, lateral movement, data exfiltration, and cleanup. In reconnaissance, an attacker gathers public info and maps services; defenders mirror this with:
- Threat intel
- Asset inventories
- External attack surface management
Vulnerability Management and Remediation
Scanning and enumeration probe ports, services, and versions; defend with hardened exposure, filtered ingress, and regular vulnerability scans aligned to a risk register. During exploitation, an adversary leverages a bug or misconfiguration to gain code execution or access; defenders should apply defense in depth:
- Segmentation
- Least privilege
- WAFs
- Strong logging and patch management
Establishing Persistence and Limiting Lateral Movement
For persistence and lateral movement, attackers may create backdoors or abuse credentials. To limit scope, use:
- MFA
- Managed secrets
- EDR
- Network micro segmentation
Exfiltration and Data Loss Prevention
For exfiltration, they try to move data out via encrypted channels or covert tunnels; monitor egress, use DLP, and inspect encrypted traffic where allowed. Focus interview answers on how each phase maps to controls, detection strategies, and playbook incident response steps rather than giving operational instructions.
2. What Are the Various Sniffing Tools: Packet Capture and Network Analysis Toolbox
Common packet capture and flow tools you should know:
- Wireshark for deep packet analysis and protocol decoding
- Tcpdump for lightweight command-line capture and scripting
- WinDump as tcpdump for Windows
- NetworkMiner for passive host and file reconstruction
- SolarWinds and Paessler PRTG for flow and performance monitoring
- ManageEngine NetFlow Analyzer and Auvik for NetFlow and topology tracking.
In practice, combine packet captures with flow telemetry and endpoint logging to detect anomalies and reconstruct incidents.
3. What is SQL Injection: How Injection Breaks Application Logic and How to Prevent It
SQL injection is a class of input-based attacks where an attacker manipulates database queries by injecting SQL syntax into application inputs. Types include:
- Classic in-band
- Blind Boolean
- Time-based
- Out-of-band exfiltration
Preventing Injection Attacks
Prevent with parameterized queries or prepared statements, strong input validation, least privilege database accounts, stored procedures used safely, and an allow list for expected formats. Utilize runtime WAF rules and regular code reviews, and incorporate automated SAST scans and OWASP Top Ten checks for interview examples.
4. What is a Distributed Denial of Service Attack (DDoS): Service Disruption at Scale and Mitigation Options
A DDoS floods target resources with coordinated traffic to overwhelm capacity and deny legitimate users. Vectors range from volumetric floods to protocol attacks that exhaust state and application layer resources, mimicking legitimate requests. Mitigation strategies include:
- Upstream scrubbing
- CDNs
- Rate limiting
- Ingress filtering
- Scalable autoscaling
- Clear mitigation runbooks in the incident response plan
Discuss designing services that support graceful degradation and achieve measurable RTOs during interviews.
5. How to Avoid ARP Poisoning: Practical Mitigations for Local Network Spoofing
Prevent ARP spoofing by using Dynamic ARP Inspection on switches.
- Enabling port security and DHCP snooping
- Applying static ARP entries for critical infrastructure where feasible
Minimizing Credential Exposure and Sniffing
Network segmentation and strong physical access controls reduce exposure. Use encrypted protocols (HTTPS, SSH, TLS) and VPNs to minimize the impact of intercepted traffic, ensuring that less usable credentials or secrets are exposed. Include monitoring that:
- Flags sudden MAC to IP reassignments
- Correlates to DHCP logs
6. What is a Proxy Firewall: Application-Aware Filtering with Proxy Services
A proxy firewall terminates client connections on the firewall, inspects application-layer content, and creates a separate connection to the internal server. It enforces protocol semantics for HTTP, FTP, and SMTP, and can perform:
- Deep inspection
- URL filtering
- Content scanning
Use proxies to offload authentication, add caching, and apply fine-grained application policies. Compare proxy mode to transparent and stateful firewall modes when recommending deployment for web-facing services.
7. Explain SSL Encryption: How TLS Secures Web Traffic and What to Configure
Secure Sockets Layer historically provided transport security; modern deployments use TLS versions 1.2 and 1.3. TLS provides confidentiality via symmetric ciphers, key exchange via ECDHE or RSA, and authentication through X.509 certificates issued by CAs. Configure cipher suites to:
- Prefer ECDHE for forward secrecy
- Enable HSTS for browsers
- Keep certificates rotated and anchored in PKI
For interviews, mention certificate pinning where applicable and testing with tools like SSL Labs.
8. What Do You Mean by Penetration Testing: Active Validation of Controls Using Simulated Attacks
Penetration tests simulate real attacker techniques to exploit vulnerabilities and validate controls under authorization. Tests combine automated scans, manual reconnaissance, exploitation, and privilege escalation to produce findings with:
- Risk ratings
- Remediation advice
Complement pen tests with regular vulnerability assessments and red team exercises; ensure scope, rules of engagement, and blast radius are documented.
9. What Are the Risks Associated with Public Wi-Fi: Threats When Connecting Over Untrusted Wireless
Public Wi Fi exposes endpoints to network snooping, evil twin access points, man-in-the-middle attacks, and credential theft if apps use cleartext protocols. Attackers can push fake updates or capture session cookies to perform session hijacking. Reduce risk with:
- TLS-enforced endpoints
- VPNs
- Endpoint posture checks
- Strong endpoint protection
Ask in interviews about secure default behavior for mobile apps and session handling.
10. Explain the Main Difference Between Diffie-Hellman and RSA: Key Exchange Versus Public Key Encryption
Diffie-Hellman is a key exchange protocol that allows two parties to derive a shared symmetric key over an insecure channel without transmitting the key. Elliptic curve variants like ECDH are common for efficiency. RSA is an asymmetric algorithm used for encryption and digital signatures, where a public key encrypts and a private key decrypts or vice versa for signatures.
In practice, use ECDHE for forward secrecy during TLS handshakes and RSA only for legacy compatibility.
11. Give Some Examples of Asymmetric Encryption Algorithms: Public Key Toolset You Should Know
Examples include RSA, DSA for signatures, ECDSA, and ECDH using elliptic curves, and ElGamal variants. Elliptic curve algorithms like P-256 and Curve25519 are favored for performance and smaller key sizes. Know trade-offs: RSA requires larger keys for the same security, while ECC provides similar security with smaller keys and faster operations.
12. Explain Social Engineering and Its Attacks: Human Targeted Attacks and Practical Defenses
Social engineering manipulates people to disclose credentials or perform actions that compromise security. Common vectors include phishing, vishing, impersonation, and SMS based smishing. Defenses combine:
- Security awareness training
- Simulated phishing campaigns
- Strict caller verification procedures
- Clear escalation paths for suspicious requests
- Transaction signing for critical operations
Use role-based access and approval workflows to reduce single-point human risk.
13. State the Difference Between a Virus and Worm: Malware Propagation Patterns and Impact
A virus attaches to host files and requires user action to spread, often modifying executables or documents. A worm self-replicates across networks, exploiting vulnerabilities or weak configurations without user interaction, typically consuming bandwidth and resources. Defend with:
- Timely patches
- EDR that identifies anomalous spawning behavior
- Network segmentation
- Controlled execution environments
14. Explain the Concept of Session Hijacking: How Attackers Take Over Active Authenticated Sessions
Session hijacking occurs when an attacker gains or forges a valid session identifier to act as an authenticated user. Methods include stealing cookies via XSS, intercepting session tokens on unencrypted channels, or predicting session IDs in weak implementations. Countermeasures include:
- Secure cookie flags
- Short session lifetimes
- Re-authentication for sensitive actions
- CSRF tokens
- Content security policies to reduce XSS risk
15. Explain the Honeypot and Its Types: Deception Systems for Detection and Research
A honeypot is a deliberate decoy system designed to attract attackers for detection and research. Production honeypots are lightweight traps deployed alongside tangible assets to warn operators and divert attackers. Research honeypots are more interactive and capture attacker TTPs for analysis and threat intelligence.
Use logging, network taps, and sandboxing to analyze payloads while ensuring the honeypot cannot be used as a stepping stone into production.
16. What is IP Blocklisting: Blocking Known Bad Addresses and the Trade Offs
IP blocklisting denies traffic from specific IPs or ranges based on reputation or observed behavior. It helps reduce noise from known malicious hosts, but can cause false positives when addresses change or are shared by legitimate users.
- Combine blocklists with behavior-based detection.
- Enable listing for critical partners.
- Automate updates via threat intelligence feeds.
17. What Are Polymorphic Viruses: Malware that Changes to Evade Detection
Polymorphic viruses change their code or encryption wrapper each generation, producing unique signatures to evade static signature-based scanners. Modern defenses focus on behavior detection, heuristics, and EDR telemetry that watches for suspicious execution patterns rather than file signatures alone. Explain how mutation engines affect detection and why layered controls are necessary.
18. What is a Botnet: Distributed Malicious Networks Under Centralized Control
A botnet is a network of compromised hosts controlled by a bot master to perform coordinated actions like DDoS, spam campaigns, or crypto mining. Detection uses netflow anomalies, unusual outbound connections to C2 infrastructure, and sinkhole collaborations with ISPs. Remediation includes:
- Isolating infected hosts
- Re-imaging
- Credential resets
- Tracking infection vectors for patching
19. What is an Eavesdropping Attack: Passive Interception of Network Traffic and Defenses
Eavesdropping is the passive interception of packets to capture sensitive data. It exploits unencrypted protocols or weak link-layer protections on local networks. Use TLS for all application traffic, enforce encrypted management channels, and monitor for promiscuous mode on switches and ARP anomalies to detect sniffers.
20. Explain the Concept of Public Key Infrastructure (PKI): Certificates, Authorities, and Trust Chains
PKI is the system that issues, validates, and revokes X.509 certificates to enable authentication and encryption. It includes certificate authorities, registration authorities, certificate repositories, and revocation mechanisms like CRLs and OCSP. Operational PKI requires key lifecycle procedures:
- Generation
- Secure storage
- Rotation
- Revocation
- Audit logs to prove compliance
21. What Are the Key Elements of a Strong Security Policy: Policy Building Blocks for Operational Security
A firm security policy defines asset classification, access control models, password and MFA requirements, patch and configuration management, incident response roles and escalation, acceptable use, third-party vendor controls, and regular audits. Tie policy to measurable controls and training to enforce secure coding standards and secure system configurations.
22. How Does a Rootkit Work and How Would You Detect It: Persistent Stealthy Compromise and Detection Techniques
A rootkit hides processes, files, and network activity by modifying OS kernels or user space libraries to avoid detection. Detection uses integrity checks, kernel-level scanners, hypervisor-based inspection, and anomalous behavior signals from EDR, such as:
- Unexpected privilege escalations
- Unsigned kernel modules
Keep systems updated and instrumented to make rootkit persistence harder.
23. Explain Cross-Site Scripting and SQL Injection: Two Major Web Vulnerabilities and Testing Approaches
Cross-site scripting injects attacker-supplied scripts into pages served to other users, enabling cookie theft and CSRF bypass. SQL injection manipulates backend queries to read or modify data. Mitigation for XSS includes:
- Output encoding
- CSP headers
- Template-based rendering
For SQL injection, use prepared statements, ORM parameterization, and the principle of least privilege on DB accounts. In interviews, mention dynamic application security testing and OWASP Top Ten as standard practices.
24. What is a Zero Day Vulnerability: Undisclosed Vulnerabilities and Response Posture
A zero day is a flaw unknown to the vendor and without an available patch, making it a high risk for exploitation. Maintain compensating controls: network segmentation, application allow lists, EDR with behavioral detection, threat hunting focused on high-risk assets, and rapid patch processes for when advisories appear.
25. How Do Threat Detection Systems Work: Rules, Analytics, and Threat Hunting
Threat detection systems ingest logs, flows, and telemetry, apply correlation rules, statistical baselining, and ML models to surface anomalies and IOC matches. SIEM acts as a central aggregator while EDR provides endpoint telemetry. Effective detection:
- Ties alerts to runbooks
- Reduces false positives through tuning
- Supports proactive threat hunting guided by frameworks such as MITRE ATT&CK.
26. Explain the Principles of Ethical Hacking: Rules of Engagement and Professional Conduct
Ethical hacking tests systems for weaknesses under explicit authorization and follows rules of engagement, scopes of work, and nondisclosure. Practitioners will perform the following:
- Document findings
- Provide reproducible evidence
- Offer remediation steps while avoiding unnecessary harm
Present in interviews how you obtain permissions, proof of concept that avoids data loss, and responsible disclosure practices.
27. What Are the Different Types of Network Security: Controls Across Layers and Use Cases
Network security encompasses perimeter controls such as firewalls and VPNs, internal controls including segmentation and NAC, detection through IDS and IPS, and encryption for data in transit. Also, include micro segmentation, zero trust access models, and secure remote access. Assess how each control reduces attacker kill chain steps in practical system designs.
28. Discuss the Concept of Risk Assessment in Cybersecurity: Measuring Risk to Prioritize Remediation
Risk assessment identifies assets, threats, vulnerabilities, likelihoods, and impacts to produce prioritized remediation lists. Use quantitative or qualitative approaches, map to business criticality, and feed results to patch schedules and control investments. Include threat modeling for new features and vendor risk assessments for third-party services.
29. What is Incident Response, and How is It Managed: Phases of Containment and Recovery with Playbooks
Incident response organizes preparation, detection, analysis, containment, eradication, recovery, and post-incident learning. Maintain runbooks, incident classification levels, communication plans, legal and PR coordination, and evidence preservation. Run regular tabletop exercises and update detection and containment based on lessons learned.
30. Explain the Principle of Least Privilege: Narrowing Access to Reduce Attack Surface
Least privilege grants users and services the minimal rights needed for tasks and no more. Apply role-based access control, ephemeral credentials, just-in-time access, and regular entitlement reviews. Hardening by removing default admin accounts and avoiding shared service accounts reduces privilege abuse risks.
31. What is a Security Information and Event Management (SIEM) System: Centralized Log Analytics for Security Operations
A SIEM collects logs from endpoints, network devices, cloud services, and applications, normalizes data, correlates events, and generates alerts. It supports:
- Compliance reporting
- Incident triage
- Forensic investigations
Effective SIEM deployment requires meaningful parsers, tuned correlation rules, and retention policies that align with both legal and operational needs.
32. How Do You Manage Cryptographic Keys: Practical Key Lifecycle and Protection
Key management requires secure generation in FIPS-compliant modules or HSMs, encrypted storage, access controls, rotation policies, and documented expiration and revocation processes. For cloud services, use managed key services and enforce separation between encryption keys and data owners. Include logging and key usage audits for accountability.
33. What Are the Standard Methods for Secure Data Disposal: Making Data Unrecoverable From Media
Standard methods include cryptographic erasure by destroying encryption keys, multiple overwrite passes where secure erase is required, degaussing for magnetic media, and physical destruction for drives that leave the environment. Validate disposal with inventory reconciliation and certificates of destruction for compliance.
34. Explain the Concept of Endpoint Security: Protecting Devices at the Network Edge
Endpoint security covers anti-malware, EDR, application control, disk encryption, and vulnerability management on endpoints. Use device posture checks before granting access, restrict installs through application allow lists, and centralize telemetry for rapid containment. For interview examples, cite incident workflows triggered by EDR alerts.
35. Discuss the Role of Artificial Intelligence in Cybersecurity: Automation for Detection and Response at Scale
AI and ML help detect anomalies, cluster threat patterns, and prioritize alerts in large telemetry sets. Use supervised models for known malice detection and unsupervised models for anomaly discovery, but guard against model drift and adversarial manipulation. Combine AI insights with human analysts in the SOC to improve precision.
36. How Do Penetration Testing and Vulnerability Assessments Differ: Scanning Versus Active Exploitation
Vulnerability assessments identify and catalog weaknesses through automated scanning and configuration checks. Penetration tests go further to actively exploit issues to demonstrate impact and chain exploits into realistic attack paths. Both belong in a security program: use assessments for continuous coverage and scoped pen tests to validate high-risk areas.
37. What is a Security Operations Center (SOC): Centralized Detection and Response Team
A SOC houses analysts, tools, and processes for continuous monitoring, triage, and response to security events. It integrates SIEM, EDR, threat intel, and playbooks to manage incidents and reduce dwell time. Evaluate a SOC by its mean time to detect and mean time to respond metrics, as well as its ability to run regular exercises.
38. Discuss the Importance of Compliance in Cybersecurity: Rules, Audits, and Operational Controls
Compliance ensures organizations meet legal, contractual, and industry obligations such as:
- GDPR
- HIPAA
- PCI DSS
- ISO standards
Compliance programs drive baseline controls, documented policies, and audit readiness. Effective programs map controls to business processes and reduce legal and financial exposure.
39. What is Multi-Factor Authentication and How Does It Enhance Security: Extra Layers of User Verification
Multi-factor authentication requires two or more proof elements: something you know, something you have, and something you are. Combining a password with a hardware token or an authenticator app significantly reduces account takeover risk from credential leaks. Deploy MFA for admin accounts, high-risk operations, and remote access as part of an access control strategy.
40. What is a Three-Way Handshake: TCP Connection Establishment and What to Monitor
The TCP three-way handshake establishes a reliable session using SYN, SYN ACK, and ACK packets between client and server. It sets initial sequence numbers and state for the connection. Monitor abnormal handshake patterns to detect SYN floods or half-open sessions and implement SYN cookies and rate limiting to protect stateful servers.
Related Reading
- Cybersec
- Git Interview Questions
- Front End Developer Interview Questions
- DevOps Interview Questions And Answers
- Leetcode Roadmap
- Leetcode Alternatives
- System Design Interview Preparation
- Ansible Interview Questions
- Engineering Levels
- jQuery Interview Questions
- ML Interview Questions
- Selenium Interview Questions And Answers
- ASP.NET MVC Interview Questions
- NodeJS Interview Questions
- Deep Learning Interview Questions
Top 30+ Cyber Security Interview Questions for Experienced

1. What is the Man-in-the-Middle Attack?
A man-in-the-middle attack places an active adversary between two communicating parties to eavesdrop, modify, or inject messages while both endpoints believe they are talking directly. Advanced MITM techniques exploit:
- Weak or misconfigured TLS
- Rogue certificates
- ARP or DNS poisoning
- Proxy insertion
- OAuth token interception
Advanced Evasion and Defense in Depth
In mature environments, an attacker will combine credential harvesting, session hijacking, and protocol downgrade to persist and pivot. Defenses require:
- Strong end-to-end cryptographic guarantees
- Mutual authentication
- Certificate pinning or short-lived certificates
- Strict TLS configuration (disable SSL and legacy TLS, prefer ECDHE ciphers)
- DNSSEC
- Network segmentation
Continuous monitoring with TLS inspection is limited to controlled breaks and architectures that are documented in governance and compliance policies. Threat intelligence and telemetry from SIEM and endpoint detection accelerate detection of anomalous proxying, TLS renegotiation, or unexpected certificate chains aligned with MITRE ATT&CK techniques such as:
- Credential Access
- Network Service Scanning
2. What is a Traceroute? Why is It Used?
Traceroute enumerates hops from source to destination by sending packets with incrementally increasing TTL values and recording ICMP time exceeded or response times. It exposes routing paths, per-hop latency, and where packets are dropped or filtered. Security use cases include:
- Incident triage that involves identifying chokepoints.
- Measuring asymmetric routing that impacts packet inspection.
- Detecting suspicious detours indicative of traffic interception.
- Validating BGP or SD-WAN path changes.
Hunting Network Routing Anomalies
When used in threat hunting, combine traceroute with packet captures, BGP monitoring, and flow telemetry to correlate routing anomalies with potential route hijacks or lateral movement. Remember to respect policy and avoid active probing that may trigger IDS thresholds in production.
3. What is the Difference between HIDS and NIDS?
Host-based intrusion detection (HIDS) monitors individual hosts: file integrity checks, local logs, process behavior, kernel hooks, and configuration drift. It excels at detecting:
- Credential misuse
- Privilege escalation
- File tampering
Threat Detection with NIDS
Network-based intrusion detection (NIDS) inspects network traffic at aggregation points for signatures, anomaly patterns, and protocol misuse. It helps detect:
- Lateral movement
- Scanning
- Exfiltration patterns across segments
Unified Threat Detection and Response
In a mature detection strategy, combine both: HIDS for rich forensic artifacts and endpoint context; NIDS for broad visibility and protocol-level indicators. Integrate alerts into SOC workflows, normalize with threat intelligence, and map detections to frameworks like MITRE ATT&CK for consistent playbooks and escalation.
4. What is the Difference Between VA (Vulnerability Assessment) and PT (Penetration Testing)?
Vulnerability assessment focuses on discovery and prioritization:
- Automated scans
- Authenticated checks
- CVE/CVSS mapping
- Asset inventory
- Reporting of known misconfigurations
Vulnerability assessment informs remediation pipelines and vulnerability management.
Validation of Controls and Vulnerability Management
Penetration testing simulates adversaries:
- Targeted exploitation
- Chaining vulnerabilities
- Privilege escalation
- Post-compromise activities to validate risk and controls
Vulnerability Assessment and Penetration Testing Integration
Pen tests require scoping, rules of engagement, and evidence of impact. Use VA for continuous coverage and PT for higher assurance and business risk validation. Combine outputs with risk management frameworks such as NIST RMF or ISO 27001, and feed findings into SLA-driven patching and compensating controls like micro segmentation or WAF tuning.
5. What is RSA?
RSA is an asymmetric algorithm that uses a public key for encryption or signature verification and a private key for decryption or signing. Security relies on the computational difficulty of factoring large semiprime integers. RSA sees everyday use in:
- TLS handshakes
- Code signing
- PKI
Modern Cryptography Best Practices
Modern deployments prefer ephemeral key agreement (ECDHE) for forward secrecy and use RSA primarily for digital signatures or legacy compatibility. Key management, proper padding (e.g., RSA-PSS for signatures), safe key sizes (2048 bits minimum, 3072+ recommended for long-term), and hardware protection of private keys via HSMs are mandatory in regulated environments.
6. What is the Blowfish Algorithm?
Blowfish is a symmetric block cipher designed for speed and free licensing. It uses:
- 64 64-bit block size
- Variable keys up to 448 bits
- 16 rounds
- Precomputed P and S boxes
Limited Usability
While fast, its 64-bit block size limits safe use with large volumes of data; block collisions become a real issue, and modern guidance prefers AES with 128-bit blocks. For legacy systems, Blowfish may still be encountered; new designs should choose AES-GCM or ChaCha20-Poly1305 for authenticated encryption and better performance on modern CPUs and constrained devices.
7. What is the Difference Between a Vulnerability and an Exploit?
A vulnerability is a flaw in design, configuration, or code that allows unintended behavior. Examples include insecure deserialization, missing authentication checks, or open ports. An exploit is a technique or tool that leverages the vulnerability to achieve the attacker's objectives, such as:
- Code execution
- Data exfiltration
- Privilege escalation
Proactive Vulnerability Defense
Effective risk management separates discovery and remediation of vulnerabilities from the lifecycle of exploit development by patching, compensating controls, intrusion detection, and rapid CVE triage driven by threat intelligence.
8. What do you understand by Risk, Vulnerability, and Threat in a Network?
A threat is an actor or condition that could cause harm, from organized APT groups to opportunistic malware. A vulnerability is a weakness that an actor can exploit. Risk is the estimated impact and likelihood that a threat will exploit a vulnerability, producing loss. For qualitative assessments, use structured frameworks like:
- FAIR for quantitative risk
- NIST SP 800-30
Map assets, threat sources, controls, and residual risk; then prioritize remediation where likelihood times impact exceeds risk appetite. Embed this into governance, compliance mapping, and continuous monitoring to track changes in exposure.
9. What Do You Mean by Forward Secrecy, and How Does It Work?
Forward secrecy ensures past session keys remain confidential even if long-term private keys are later compromised. Protocols achieve this by negotiating ephemeral session keys using Diffie-Hellman variants such as DHE or ECDHE, where each session uses fresh ephemeral keys that are not derivable from a server’s static private key.
For implementation, enforce ECDHE cipher suites, avoid static RSA key exchange, and manage ephemeral key parameters and lifetimes. Forward secrecy reduces blast radius for leaked private keys and aligns with compliance expectations for cryptographic agility.
10. Discuss the Challenges and Strategies of Securing IoT Devices
IoT security faces several challenges, including device heterogeneity, constrained CPU and memory, insecure supply chains, weak or hard-coded credentials, and long device lifecycles with poor patching. Effective strategies include:
- Strong device identity is achieved via certificates or a hardware root of trust.
- Automated secure OTA updates.
- Minimal firmware attack surface and secure boot.
- Network segmentation and micro segmentation to limit lateral movement.
- Runtime monitoring and anomaly detection tailored to device behavior.
- Lifecycle processes, including vendor risk management and firmware signing.
Utilize CSPM and IoT-specific controls in cloud environments hosting device telemetry, ensuring governance and compliance with industry standards as applicable.
11. Explain Advanced Persistent Threats (APT)
An APT is a sustained, targeted intrusion by a capable adversary aiming for strategic objectives such as intellectual property theft or long-term surveillance. APT campaigns combine:
- Reconnaissance
- Spear phishing
- Zero-day exploitation
- Custom tooling
- Lateral movement
- Data exfiltration while maintaining stealth
Defense-in-Depth Strategy
Defend with layered controls, including strong identity and access management, EDR with threat hunting, network segmentation, deception tech, and robust incident response playbooks. Additionally, utilize continuous threat intelligence mapped to MITRE ATT&CK to prioritize:
- Detection coverage for persistence
- Credential dumping
- Command and control
12. How Do You Approach Securing a Large, Distributed Network?
Secure a distributed network by applying segmentation and zero trust principles, enforcing least privilege identity and device posture checks, centralizing logging and telemetry to a scalable SIEM or analytics platform, and automating policy delivery via SDN or network orchestration. Use micro segmentation to:
- Constrain east-west traffic
- Implement bastion hosts and privileged access workstations
- Adopt secure VPN and SASE models for remote users
- Deploy continuous configuration and compliance scanning
- Operationalize SOC playbooks, implement automated responses for containment, and conduct regular red team exercises to validate controls.
13. How Do You Manage Security in a DevOps Environment?
- Integrate security into CI/CD pipelines: SAST, DAST, software composition analysis, secret scanning, and infrastructure as code scanning.
- Automate security gates and fail fast on critical vulnerabilities while allowing developer velocity for low-risk items.
- Embrace policy as code for network and cloud controls, runtime protection with RASP or workload attestation, and centralized secrets management.
- Foster shared responsibility among dev, ops, and security through blameless postmortems, threat modeling during design, and continuous feedback from security test results, which informed backlog prioritization.
14. Explain the Concept of Micro-Segmentation in Network Security
Microsegmentation enforces granular east-west access controls at the workload level, often implemented via software-defined networking, host firewalls, or service meshes. It reduces the attack surface by allowing only necessary flows between services, supports least privilege, and limits the blast radius after compromise.
Practical Deployment & Security Automation
Practical deployment maps application flows, creates intent-based policies, automates enforcement tied to identity and workload labels, and integrates with CI/CD so policy follows deployment. Measure success by reduction in lateral access paths and faster containment during incidents.
15. What is Quantum Cryptography and Its Implications for Security?
Quantum cryptography includes quantum key distribution, which uses quantum states to detect eavesdropping and can provide information-theoretic secrecy for key exchange. Separately, quantum computing threatens asymmetric algorithms like RSA and ECC due to Shor’s algorithm.
Adopting Post-Quantum Cryptography (PQC)
Prepare by inventorying crypto usage, prioritizing migration of high-value assets to post-quantum algorithms, and adopting crypto agility patterns so algorithms and key sizes can be swapped with minimal disruption. Follow NIST post-quantum standards and implement hybrid schemes to combine classical and quantum-resistant primitives during transition.
16. Explain the concept of federated identity management
Federated identity lets users access multiple systems using a shared identity provider and protocols like:
- SAML
- OpenID Connect
- OAuth2
It reduces password sprawl, centralizes MFA enforcement, and facilitates cross-domain SSO. Security demands strong trust anchors, short-lived tokens, robust token revocation, and careful audience and scope controls to prevent token misuse. Map federated flows in risk assessments and ensure compliance controls for:
- Identity lifecycle
- Audit logging
- Third-party trust assessments
17. Differentiate between Stream Cipher and Block Cipher
Block ciphers encrypt fixed-size blocks (e.g., AES 128-bit) and operate in modes such as CBC, GCM, or ECB with distinct security properties. Stream ciphers generate a keystream combined with plaintext byte by byte or bit by bit; examples include ChaCha20. Stream ciphers are efficient for low-latency or streaming data and for constrained devices.
Modern guidance favors authenticated encryption like AES GCM or ChaCha20 Poly1305 to provide confidentiality and integrity. Choose based on throughput, nonce management, and whether the data requires random access.
18. What Do You Mean by Perimeter-Based and Data-Based Protection?
Perimeter protection focuses on preventing unauthorized access at network boundaries using firewalls, IDS/IPS, VPNs, and edge controls. Data-based protection secures the data regardless of location through:
- Encryption
- Tokenization
- DLP
- Classification
- Rights management
Data-Centric Security
As cloud adoption expands, defenses must shift from perimeter-centric models to data-centric controls, applying encryption in transit and at rest, robust key management, and persistent access controls so data remains protected across:
- Devices
- Cloud services
- Third-parties
19. Which is More Reliable: SSL or HTTPS?
HTTPS is HTTP transported over TLS (formerly SSL). SSL refers to obsolete protocol versions with known weaknesses; modern deployments must use TLS 1.2 or 1.3 with secure ciphers and proper certificate management. Therefore, HTTPS implemented with current TLS versions is the reliable, safe option for web traffic. Ensure TLS configurations:
- Follow industry best practices
- Disable legacy ciphers
- Enable forward secrecy
- Monitor certificate lifecycles and OCSP/CRL status for governance and compliance.
20. Differentiate between Symmetric and Asymmetric Encryption
Symmetric encryption uses a single shared secret for both encryption and decryption, performing well on bulk data (AES, ChaCha20). Asymmetric encryption uses key pairs: public keys for encryption or signature verification and private keys for decryption or signing (RSA, ECC).
Hybrid Encryption
Practical systems combine both: asymmetric algorithms establish keys or authenticate endpoints while symmetric keys provide efficient data encryption. Key management, rotation, and hardware protection differ: symmetric keys require secure distribution; asymmetric keys require secure private key custody and certificate lifecycle management.
21. What Do You Mean by a DDoS Attack? How Can You Prevent It?
A distributed denial of service attack floods targets with traffic or resource requests from many sources to degrade or deny service. Preventive measures include traffic scrubbing and volumetric defenses via:
- Cloud DDoS protection services
- Rate limiting
- Anycast load distribution
- Autoscaling
- Application layer protections (WAF)
- Redundant architecture with failover
DDoS Readiness & Response
Operational readiness demands a DDoS response plan, runbooks to reroute traffic, blackholing only as a last resort, and collaboration with ISPs and CDNs. Combine telemetry thresholds in your SOC to trigger automated mitigations and post-event forensic capture to harden defenses.
22. Differentiate between IDS and IPS in the context of Cyber Security
An intrusion detection system monitors and alerts on suspicious traffic or host behavior without directly interrupting flows. An intrusion prevention system sits inline and can block or drop traffic deemed malicious. IDS fits monitoring pipelines and forensic analysis; IPS performs active blocking at perimeter or micro segmentation enforcement points.
Choose placement based on risk tolerance: IPS can prevent known threats but may introduce false positives; IDS supports investigation and correlation in SIEM. Combine both with tuned signatures, anomaly detection, and rapid rollback capabilities.
23. What Do You Mean by Network Sniffing?
Network sniffing captures packets traversing a network segment to inspect headers and payloads. Administrators use sniffers for troubleshooting, protocol analysis, and forensic collection. Attackers use sniffing to harvest credentials, session tokens, or unencrypted data. Defenses include:
- Network encryption (TLS, IPsec)
- Port security
- Disabling promiscuous modes
- EDR to detect packet capture processes
Legal and compliance policies govern packet capture, and logged captures should preserve the chain of custody for investigations.
24. Differentiate between Black Box Testing and White Box Testing
Black box testing assesses a system from the outside with no knowledge of internals; it mirrors attacker reconnaissance and focuses on attack surface and behavior. White box testing gives full internal access to code, architecture, and configurations, enabling deeper vulnerability identification, such as:
- Logic flaws
- Insecure libraries
- Improper error handling
Use black box for validation of production defenses and white box for secure development and code-level remediation. Hybrid approaches accelerate coverage and reduce false positives in remediation cycles.
25. What Do You Mean by System Hardening?
System hardening is the disciplined process of removing unnecessary services, enforcing secure configurations, applying least privilege, disabling default accounts, patching, and implementing host-based controls such as:
- HIDS
- Application allow lists
- Secure baselines
System Hardening & Automation
Hardening covers OS, middleware, applications, databases, and network stacks. Use automated configuration management, compliance as code, and regular audits against benchmarks such as:
- CIS
- DISA STIGs
- Vendor best practices
Track deviations as remediation tickets and measure hardening maturity through reduced vulnerability exposure.
26. Differentiate Between VPN and VLAN
A virtual private network (VPN) creates an encrypted tunnel between endpoints across untrusted networks, providing confidentiality and integrity for traffic. A virtual local area network (VLAN) logically segments a switched network to separate broadcast domains within the same physical infrastructure.
VLANs vs. VPNs
VLANs support network isolation and traffic separation, but do not provide encryption by themselves. Use VLANs for internal segmentation and traffic control, and VPNs for secure remote access or inter-site connectivity. In cloud environments, combine segmentation with:
- Secure tunnels
- Identity controls
- CSPM to maintain policy consistency
27. Differentiate Between Spear Phishing and Phishing?
Phishing casts wide nets with generic social engineering content to trap many victims, while spear phishing targets specific individuals or groups with tailored messages often supported by reconnaissance and impersonation. Spear phishing yields higher success rates against high-value targets and is commonly used in APT campaigns.
Defenses include email authentication (SPF, DKIM, DMARC), targeted awareness training, simulated phishing exercises, advanced email filtering with URL and attachment sandboxing, and safe link services.
28. What Do You Mean by SQL Injection? How Do You Prevent It?
SQL injection occurs when untrusted input is incorporated into database queries without proper sanitization, allowing attackers to:
- Execute arbitrary SQL
- Exfiltrate data
- Modify records
Prevent by using parameterized queries or prepared statements, least privilege database accounts, stored procedures without string concatenation, input validation combined with allow lists, ORM safe modes, and Web Application Firewalls tuned to block injection patterns.
Maintain secure coding standards, include SAST/DAST in CI pipelines, and keep OWASP Top 10 mitigations part of your appsec program.
29. What is the Difference Between a Virus and a Worm?
A virus attaches itself to host files or executables and requires user action to propagate, often modifying or deleting files. A worm is self-propagating and spreads across networks or systems without direct user interaction, typically to consume resources or deliver payloads. Both can provide secondary payloads like ransomware.
Countermeasures include endpoint protection with behavioral detection, network segmentation, timely patching, and egress filtering to slow propagation during an outbreak.
30. How Do You Decide the Placement of the Encryption Function?
Decide placement by threat model and trust boundaries. Link encryption (e.g., TLS between hops) protects data on each link but exposes plaintext at intermediaries like proxies or load balancers. End-to-end encryption ensures only endpoints can decrypt, protecting data through intermediaries and multi-hop paths; it requires key management and endpoint trust.
Application-Level Encryption
For cloud and multi-tenant systems, prefer defense in depth: use transport encryption, application-level encryption for:
- Sensitive fields
- Tokenization
- Dedicated key management (KMS, HSM)
Consider performance, searchability, and compliance constraints when choosing placement.
31. What Do You Mean by Active Reconnaissance?
Active reconnaissance involves interacting directly with targets using probing tools such as:
- Port scanners
- Ping sweeps
- Traceroute
- Banner grabbing to enumerate services
- Versions
- Potential weaknesses
Active Reconnaissance
It yields accurate, up-to-date data but generates detectable noise and increases exposure to defensive controls. Conduct active recon in authorized tests under clear rules of engagement, correlate findings with passive intelligence feeds, and use results to simulate realistic exploitation paths during red team or purple team exercises.
32. What Do You Mean by Forward Secrecy and How Does It Work?
Forward secrecy prevents compromise of past session keys if a long-term private key is later leaked by deriving ephemeral session keys per session using Diffie-Hellman variants like DHE or ECDHE. Each session’s keys are independent; an adversary who obtains a server's private key cannot retroactively decrypt recorded traffic.
Enforce ECDHE cipher suites in TLS, rotate ephemeral parameters appropriately, and combine with certificate management and HSM protection for long-term keys to reduce exposure.
Related Reading
- Coding Interview Tools
- Jira Interview Questions
- Coding Interview Platforms
- Common Algorithms For Interviews
- Questions To Ask Interviewer Software Engineer
- Java Selenium Interview Questions
- Python Basic Interview Questions
- RPA Interview Questions
- Angular 6 Interview Questions
- Best Job Boards For Software Engineers
- Leetcode Cheat Sheet
- Software Engineer Interview Prep
- Technical Interview Cheat Sheet
- Common C# Interview Questions
Nail Coding Interviews with our AI Interview Assistant: Get Your Dream Job Today
Spending months grinding LeetCode, hoping to pass one tech interview? There's a more innovative way. Interview Coder is your AI-powered, undetectable coding assistant for coding interviews, completely undetectable and invisible to screen sharing. While your classmates stress over thousands of practice problems, you'll have an AI interview assistant that solves coding challenges in real-time during your actual interviews.
Conquering the Coding Interview
Used by 87,000+ developers landing offers at FAANG, Big Tech, and top startups. Stop letting LeetCode anxiety kill your confidence. Join the thousands who've already taken the shortcut to their dream job.
Download Interview Coder and turn your following coding interview into a guaranteed win.