Cybersecurity & Cryptography MCQ
Test your Cybersecurity & Cryptography knowledge with 100 multiple choice questions covering fundamentals to advanced concepts, with instant feedback and explanations.
How This Practice Test Works
Every question below expands right on this page — click a question to reveal its four options, pick the one you think is correct, and you'll get instant feedback along with the correct answer and a short explanation of the reasoning. Questions are grouped by difficulty, so start with the 40 beginner questions to confirm your fundamentals, work through the 40 intermediate ones, and finish with the 20 advanced questions that mirror what exams and technical screenings actually ask. There's no sign-up, no timer, and no limit — retake the test as often as you like.
Curated by Tech Baithak Editorial Team · Last updated: June 2026
1
What is the CIA triad in cybersecurity?
Correct Answer
Confidentiality, Integrity, Availability — the three core principles of information security
Explanation
The CIA triad: Confidentiality (only authorized access), Integrity (data is accurate and unmodified), Availability (systems accessible when needed). All security controls map to one or more of these principles.
2
What is encryption?
Correct Answer
Transforming plaintext into ciphertext using an algorithm and key, making it unreadable without the correct key
Explanation
Encryption protects data confidentiality. Symmetric encryption uses the same key for encrypt/decrypt. Asymmetric uses a public/private key pair. Decryption reverses the process with the correct key.
3
What is a hash function in cryptography?
Correct Answer
A one-way function producing a fixed-size digest from any input, where it is computationally infeasible to reverse or find two inputs with the same output
Explanation
Cryptographic hash functions (SHA-256, SHA-3) are one-way (no reversal), deterministic, and collision-resistant. Used for password storage, digital signatures, and data integrity checks.
4
What is the difference between symmetric and asymmetric encryption?
Correct Answer
Symmetric uses the same key for encrypt and decrypt (fast); asymmetric uses public/private key pairs (slower but solves key distribution)
Explanation
Symmetric (AES, ChaCha20): fast, same key both ways — key distribution is the challenge. Asymmetric (RSA, ECC): public key encrypts/verifies; private key decrypts/signs. TLS uses both: asymmetric for key exchange, symmetric for data.
5
What is a digital signature?
Correct Answer
A cryptographic mechanism using the signer's private key to prove authenticity and integrity of a message
Explanation
A digital signature: hash the message, encrypt with private key. Verifier decrypts with public key, compares hashes. Proves authenticity (from key owner) and integrity (message unchanged).
6
What is a public key certificate?
Correct Answer
A digitally signed document binding a public key to an identity, issued and signed by a Certificate Authority (CA)
Explanation
X.509 certificates bind a public key to a domain/entity, signed by a trusted CA. Browsers trust the CA hierarchy. Used in TLS/HTTPS for server authentication.
7
What is phishing?
Correct Answer
A social engineering attack tricking users into revealing credentials or installing malware via deceptive emails or websites
Explanation
Phishing uses deceptive emails/sites mimicking legitimate ones. Spear phishing targets specific individuals/organizations. Protections: email authentication (SPF, DKIM, DMARC), user training, multi-factor authentication.
8
What is two-factor authentication (2FA)?
Correct Answer
Requiring two independent factors — typically something you know (password) and something you have (phone/token) — to verify identity
Explanation
2FA/MFA combines factors: knowledge (password), possession (TOTP app, hardware key), inherence (biometrics). Even if a password is stolen, attackers need the second factor.
9
What is a firewall?
Correct Answer
A network security system monitoring and filtering traffic based on predefined rules to block unauthorized access
Explanation
Firewalls enforce access control based on IP, port, protocol, and state. Packet filters, stateful inspection, and NGFWs (with DPI, application awareness) provide increasing sophistication.
10
What is SQL injection?
Correct Answer
An attack inserting malicious SQL code into user inputs to manipulate database queries, bypassing authentication or extracting data
Explanation
SQL injection: entering ' OR '1'='1 in a login form may yield SELECT * WHERE username='' OR '1'='1' — always true. Prevented by parameterized queries/prepared statements.
11
What is Cross-Site Scripting (XSS)?
Correct Answer
An attack injecting malicious JavaScript into web pages viewed by other users, stealing cookies, credentials, or redirecting users
Explanation
XSS: stored (persisted in DB), reflected (in URL), or DOM-based. Attacker injects <script>document.cookie</script>. Prevented by output encoding, CSP headers, and input validation.
12
What is a VPN?
Correct Answer
A Virtual Private Network creating an encrypted tunnel over public internet for secure, private communication
Explanation
VPNs encrypt traffic between client and VPN server, hiding content from ISPs and providing remote network access. Common protocols: OpenVPN, WireGuard, IKEv2/IPSec.
13
What is malware?
Correct Answer
Malicious software designed to damage, disrupt, or gain unauthorized access to systems
Explanation
Malware types: virus (attaches to programs), worm (self-replicates via networks), trojan (disguises as legitimate), ransomware (encrypts data for ransom), spyware (monitors activity), adware.
14
What is ransomware?
Correct Answer
Malware that encrypts victim's files and demands payment (ransom) for the decryption key
Explanation
Ransomware (WannaCry, Ryuk, Conti) encrypts data and demands cryptocurrency payment. Prevention: offline backups, patch management, EDR, network segmentation. Paying ransom is not guaranteed to restore data.
15
What is a brute force attack?
Correct Answer
Systematically trying all possible password/key combinations until the correct one is found
Explanation
Brute force is mitigated by: account lockouts, rate limiting, long random passwords, MFA, CAPTCHAs, and PBKDF2/bcrypt/Argon2 password hashing to slow offline attacks.
16
What is a DoS (Denial of Service) attack?
Correct Answer
Flooding a target with traffic or requests to exhaust resources and make it unavailable to legitimate users
Explanation
DoS floods targets with traffic (SYN flood, HTTP flood, ICMP flood). DDoS uses many systems (botnets). Mitigations: rate limiting, anycast, scrubbing centers (Cloudflare, Akamai).
17
What is the principle of least privilege?
Correct Answer
Granting users and processes only the permissions they need to perform their function — no more
Explanation
Least privilege limits damage from compromised accounts. If an employee's account is hijacked, they can only access what that role requires. Apply to users, service accounts, and application permissions.
18
What is a zero-day vulnerability?
Correct Answer
A security flaw unknown to the software vendor with no patch available, making it immediately exploitable by attackers
Explanation
Zero-day: vendor has had "zero days" to patch it. Exploits may be sold on dark web. Defense: defense-in-depth (assume breach), EDR/behavioral detection, network segmentation, microsegmentation.
19
What is a Man-in-the-Middle (MITM) attack?
Correct Answer
An attack where an attacker secretly intercepts and potentially alters communication between two parties who believe they are communicating directly
Explanation
MITM: attacker intercepts traffic (ARP poisoning, rogue Wi-Fi, DNS spoofing) to eavesdrop or inject malicious content. TLS/HTTPS prevents MITM by authenticating the server via certificates.
20
What is port scanning?
Correct Answer
Probing a host's network ports to discover open services, typically the first step in network reconnaissance
Explanation
Port scanning (nmap) identifies open TCP/UDP ports and running services. Used by attackers for reconnaissance and by defenders for security audits. SYN scan (-sS) is stealthy; it sends SYN but no ACK.
21
What is the difference between authentication and authorization?
Correct Answer
Authentication verifies identity (who you are); authorization determines permissions (what you are allowed to do)
Explanation
Authentication: "Are you who you claim to be?" (username/password, certificates, biometrics). Authorization: "Are you allowed to do this?" (RBAC, ACLs, policies). Both are required for access control.
22
What is an SSL/TLS certificate and what does it contain?
Correct Answer
An X.509 digital certificate containing a public key, domain name, validity period, and CA signature, used for HTTPS authentication
Explanation
TLS certificates authenticate servers to clients. They contain: subject (domain), issuer (CA), public key, validity dates, and CA signature. Certificate chains link to trusted root CAs in the browser/OS trust store.
23
What is network segmentation?
Correct Answer
Dividing a network into separate segments using VLANs/firewalls to limit lateral movement and contain breaches
Explanation
Network segmentation limits blast radius: if one segment is compromised, attackers can't easily reach other segments. Zero trust goes further, requiring verification for every access request.
24
What is a security audit?
Correct Answer
A systematic evaluation of an organization's security posture against policies, standards, or regulations
Explanation
Security audits review controls, configurations, access logs, policies, and compliance. Penetration tests actively simulate attacks. Vulnerability assessments scan for known weaknesses.
25
What does HTTPS provide over HTTP?
Correct Answer
Encryption (confidentiality), authentication (server identity verification), and integrity (data not tampered in transit)
Explanation
HTTPS = HTTP over TLS. TLS provides: encryption (eavesdroppers can't read traffic), authentication (server cert validates identity), and integrity (MAC prevents tampering). Port 443 vs HTTP's 80.
26
What is a password salt?
Correct Answer
A random value added to a password before hashing to ensure identical passwords produce different hashes and defeat rainbow table attacks
Explanation
Without salt: identical passwords produce identical hashes (rainbow tables work). With salt: each password has a unique random salt prepended, making precomputed attacks infeasible. bcrypt/Argon2 handle salting automatically.
27
What is penetration testing?
Correct Answer
An authorized simulated attack on a system to identify security vulnerabilities before malicious actors can exploit them
Explanation
Pen testing (ethical hacking) follows phases: recon, scanning, exploitation, post-exploitation, reporting. Black-box (no knowledge), white-box (full knowledge), gray-box (partial). Used for compliance and security validation.
28
What is the purpose of HTTPS certificate pinning?
Correct Answer
Hardcoding expected certificate or public key hashes in an application, rejecting connections with different certificates even if signed by a trusted CA
Explanation
Certificate pinning prevents rogue CA attacks: even if an attacker has a CA-signed certificate, the app rejects it if it doesn't match the pinned hash. Challenges: certificate rotation requires app updates.
29
What is social engineering in cybersecurity?
Correct Answer
Manipulating people through psychological tactics to reveal confidential information or perform actions that compromise security
Explanation
Social engineering exploits human psychology: phishing, pretexting (fake identity), baiting (malicious USB drives), tailgating (physical access). Technical controls don't prevent human manipulation — training is key.
30
What is a botnet?
Correct Answer
A network of compromised computers (bots) controlled by an attacker to perform coordinated tasks like DDoS, spam, or credential stuffing
Explanation
Botnets (Mirai, Emotet) infect devices (PCs, IoT) with malware. The command-and-control (C2) server issues commands. Used for DDoS, spam, cryptomining, and data theft.
31
What is the purpose of input validation in web security?
Correct Answer
Checking and sanitizing user input to prevent injection attacks, XSS, and other vulnerabilities caused by malicious data
Explanation
Input validation: whitelist acceptable characters/formats, reject or sanitize others. Prevents SQL injection, XSS, command injection, and path traversal. Defense-in-depth: validate on both client and server.
32
What is the OWASP Top 10?
Correct Answer
A regularly updated list of the most critical web application security risks, published by the Open Web Application Security Project
Explanation
OWASP Top 10 (2021): Broken Access Control, Cryptographic Failures, Injection, Insecure Design, Security Misconfiguration, Vulnerable Components, Authentication Failures, SSRF, etc. Industry-standard reference.
33
What is vulnerability scanning?
Correct Answer
Automated scanning of systems and applications to identify known vulnerabilities against CVE databases
Explanation
Vulnerability scanners (Nessus, OpenVAS, Qualys) check for known CVEs, misconfigurations, missing patches, and weak configurations. Not the same as penetration testing (which actively exploits).
34
What is a CVE?
Correct Answer
Common Vulnerabilities and Exposures — a public database assigning unique identifiers to known security vulnerabilities
Explanation
CVEs (mitre.org/cve) provide a standard way to reference vulnerabilities. CVE-2021-44228 is Log4Shell. CVSS scores rate severity (0-10). Vendors reference CVEs in security advisories.
35
What is encryption at rest?
Correct Answer
Encrypting data stored on disk/databases to protect against physical theft or unauthorized access to storage media
Explanation
Encryption at rest (AES-256) protects data on disk if storage media is stolen. Full disk encryption (BitLocker, FileVault) or database-level encryption (TDE in SQL Server). Complement to encryption in transit (TLS).
36
What is encryption in transit?
Correct Answer
Encrypting data as it travels over a network to prevent eavesdropping and interception
Explanation
Encryption in transit (TLS) protects data moving between client and server from network eavesdroppers. Mandatory for all sensitive data. HSTS (HTTP Strict Transport Security) enforces HTTPS.
37
What is a rootkit?
Correct Answer
Malware that hides itself and other malicious software at a low system level (often kernel-level) to evade detection
Explanation
Rootkits modify the OS to hide processes, files, and network connections from security tools. They operate at kernel level (kernel rootkit), hypervisor level (hyperjacking), or firmware level (hardest to remove).
38
What is a CSRF (Cross-Site Request Forgery) attack?
Correct Answer
An attack tricking authenticated users into unknowingly sending malicious requests to a site where they are logged in
Explanation
CSRF: victim's browser sends a forged request using their session cookies. Example: a hidden form on evil.com submits a bank transfer to bank.com using victim's session. CSRF tokens prevent this.
39
What is security through obscurity?
Correct Answer
Relying on secrecy of implementation or design details as a primary security measure — generally considered a weak, supplementary approach
Explanation
Security through obscurity (hiding algorithms, source code) is not a standalone security measure. Kerckhoffs's principle: a system should be secure even if everything about it except the key is public.
40
What is an intrusion detection system (IDS)?
Correct Answer
A system that monitors network/system activity for malicious activity or policy violations and alerts administrators
Explanation
IDS detects and alerts; IPS (Intrusion Prevention System) also blocks. NIDS monitors network traffic; HIDS monitors host activity. Signature-based detection uses known attack patterns; anomaly-based detects deviations.
1
What is AES and why is it the standard symmetric cipher?
Correct Answer
Advanced Encryption Standard — chosen through open NIST competition, efficient in hardware and software, with 128/192/256-bit keys and no known practical attacks
Explanation
AES (Rijndael, 2001 NIST standard) replaced DES. Block cipher with 128-bit blocks and 128/192/256-bit keys. Modes: CBC, CTR, GCM (AEAD). AES-NI hardware acceleration makes it fast on modern CPUs.
2
What is the difference between TLS 1.2 and TLS 1.3?
Correct Answer
TLS 1.3 removes weak ciphers and RSA key exchange, mandates forward secrecy, reduces handshake to 1-RTT (0-RTT possible), and eliminates vulnerable features like renegotiation
Explanation
TLS 1.3 removes MD5/SHA-1, RSA key exchange (no forward secrecy), CBC mode, and compression. Only ephemeral key exchanges (ECDHE/DHE) allowed. 1-RTT handshake (vs 2-RTT for 1.2) improves latency.
3
What is forward secrecy (Perfect Forward Secrecy)?
Correct Answer
The property that compromise of long-term keys does not compromise past session keys — achieved by generating fresh ephemeral key pairs per session
Explanation
PFS: each TLS session uses ephemeral DH/ECDH keys. If the server's private key is later compromised, past sessions cannot be decrypted. TLS 1.3 mandates PFS; TLS 1.2 made it optional.
4
What is RSA encryption and what are its limitations?
Correct Answer
An asymmetric cryptosystem based on the difficulty of factoring large integers, used for key exchange and signatures but too slow for bulk encryption
Explanation
RSA (Rivest-Shamir-Adleman) relies on factoring n=p*q being hard. Used for key encapsulation and signatures. Disadvantages: slow (1000x slower than AES), key size (2048-4096 bits needed), vulnerable to quantum (Shor's algorithm).
5
What is elliptic curve cryptography (ECC)?
Correct Answer
An asymmetric cryptography approach based on elliptic curve discrete logarithm, offering equivalent security to RSA with much smaller keys
Explanation
ECC provides the same security as RSA with far smaller keys: 256-bit ECC ≈ 3072-bit RSA. More efficient for TLS, mobile devices, and IoT. Used in ECDSA (signatures) and ECDH (key exchange).
6
What is Diffie-Hellman key exchange?
Correct Answer
A key exchange protocol allowing two parties to establish a shared secret over an insecure channel without prior shared secrets, based on discrete logarithm hardness
Explanation
DH allows A and B to compute the same shared secret without transmitting it. An eavesdropper sees only public values. ECDH uses elliptic curves for efficiency. Used in TLS for session key establishment.
7
What is a rainbow table attack?
Correct Answer
An attack using precomputed hash-to-password lookup tables to crack password hashes without brute force computation at attack time
Explanation
Rainbow tables store hash:password chains. Fast lookup to crack unsalted hashes. Defeated by salting: each password has a unique random salt, making precomputed tables useless.
8
What is the purpose of HMAC?
Correct Answer
Hash-based Message Authentication Code — using a key with a hash function to authenticate both message integrity and sender identity
Explanation
HMAC(K, M) = H(K ⊕ opad || H(K ⊕ ipad || M)). It requires a shared secret key, providing both integrity and authentication. Used in JWT signatures (HS256), TLS, and API authentication.
9
What is a certificate authority (CA)?
Correct Answer
A trusted entity that issues and signs digital certificates, vouching for the binding between a public key and an identity in the PKI trust model
Explanation
CAs (DigiCert, Let's Encrypt, Google Trust Services) sign certificates after verifying domain ownership (DV) or organization identity (OV/EV). Browsers/OSes include root CAs in trust stores.
10
What is certificate revocation and why is it important?
Correct Answer
The process of invalidating a certificate before its expiration (due to key compromise or mis-issuance) via CRL or OCSP
Explanation
CRL (Certificate Revocation List): large, infrequently updated. OCSP (Online Certificate Status Protocol): real-time but adds latency. OCSP Stapling: server pre-fetches and caches OCSP response. Let's Encrypt 90-day certs make revocation less critical.
11
What is the OAuth 2.0 authorization framework?
Correct Answer
An authorization framework allowing third-party applications to access user resources without sharing credentials, using access tokens
Explanation
OAuth 2.0 flows (Authorization Code, Client Credentials, Implicit, Device Code) issue access tokens. Applications use tokens to access APIs on behalf of users without knowing their password. PKCE prevents authorization code interception.
12
What is OpenID Connect?
Correct Answer
An identity authentication layer built on OAuth 2.0 that provides ID tokens (JWTs) to prove who the user is, not just what they can access
Explanation
OIDC adds authentication to OAuth 2.0. The ID token (JWT) contains claims about the user (sub, email, name). Used for SSO across applications (Google, Facebook login buttons use OIDC).
13
What is a JSON Web Token (JWT)?
Correct Answer
A compact, URL-safe token consisting of a header, payload, and signature (or encryption) for transmitting claims between parties
Explanation
JWT = base64url(header).base64url(payload).signature. Signed with HS256 (HMAC) or RS256 (RSA). Stateless: server verifies signature without session storage. Claims: iss, sub, exp, aud. Never store sensitive data in payload (it's not encrypted by default).
14
What is SAML (Security Assertion Markup Language)?
Correct Answer
An XML-based standard for exchanging authentication and authorization data between identity providers and service providers for enterprise SSO
Explanation
SAML 2.0 enables enterprise SSO: the Identity Provider (IdP, e.g., Okta, Azure AD) authenticates users and sends signed XML assertions to Service Providers (SPs). Used in corporate environments alongside OIDC/OAuth 2.0.
15
What is a WAF (Web Application Firewall)?
Correct Answer
A security appliance or service filtering HTTP/HTTPS traffic to detect and block web attacks like SQLi, XSS, and CSRF
Explanation
WAFs (Cloudflare WAF, AWS WAF, ModSecurity) inspect HTTP requests/responses for attack signatures and anomalies. They operate at Layer 7 and can block OWASP Top 10 attacks.
16
What is defense in depth?
Correct Answer
A layered security strategy where multiple independent security controls protect assets so that if one fails, others remain
Explanation
Defense in depth: perimeter (firewall), network (IDS/segmentation), host (antivirus, hardening), application (WAF, SAST), data (encryption), and user (MFA, training). No single point of failure.
17
What is the difference between a vulnerability, exploit, and payload?
Correct Answer
Vulnerability: security weakness; Exploit: code/technique leveraging a vulnerability; Payload: the malicious action executed after exploitation
Explanation
Vulnerability (e.g., buffer overflow in sshd). Exploit: the code that triggers the overflow. Payload: what executes after exploitation (reverse shell, ransomware dropper). Metasploit separates exploit modules from payloads.
18
What is privilege escalation?
Correct Answer
An attack gaining higher access permissions than initially obtained — vertical (user to admin) or horizontal (accessing another user's resources)
Explanation
Vertical privilege escalation: user→admin via sudo misconfiguration, SUID binaries, or kernel exploits. Horizontal: accessing other users' data. Least privilege minimizes escalation impact.
19
What is a supply chain attack?
Correct Answer
Compromising software or hardware components during development, distribution, or update processes to target downstream users
Explanation
SolarWinds, XZ Utils, npm malicious packages: attackers inject malicious code into legitimate software updates. Defenses: software bill of materials (SBOM), code signing, reproducible builds, third-party audits.
20
What is SSRF (Server-Side Request Forgery)?
Correct Answer
An attack making the server issue requests to internal resources the attacker cannot access directly, often exposing cloud metadata or internal services
Explanation
SSRF: attacker controls a URL the server fetches (e.g., image URL). They set URL to http://169.254.169.254/metadata (AWS IMDSv1) to steal cloud credentials. Defense: validate URLs, block internal IP ranges, use IMDSv2.
21
What is path traversal?
Correct Answer
An attack using sequences like ../../ to access files outside the intended directory, potentially reading sensitive files
Explanation
Path traversal (directory traversal): http://site.com/files?name=../../etc/passwd reads the password file. Prevented by canonicalizing paths and ensuring they stay within the web root.
22
What is cryptographic agility?
Correct Answer
Designing systems to easily swap cryptographic algorithms without major refactoring, crucial for quantum-resistant migration
Explanation
Cryptographic agility: abstracting crypto operations so algorithms can be replaced (SHA-1→SHA-2, RSA→ECC→CRYSTALS-Kyber for PQC). Systems without agility require major rewrites when algorithms are deprecated.
23
What is FIDO2/WebAuthn?
Correct Answer
A web authentication standard using public-key cryptography and hardware authenticators (passkeys, security keys) to eliminate password-based authentication
Explanation
WebAuthn (W3C) + CTAP2 = FIDO2. Uses device-bound private keys (no password server-side). Phishing-resistant: signatures are bound to the origin. Passkeys (synced credentials) extend this to multi-device use.
24
What is memory safety and how do it relate to security vulnerabilities?
Correct Answer
The property of a programming language preventing memory errors (buffer overflows, use-after-free, null dereferences) that cause ~70% of critical vulnerabilities in C/C++ codebases
Explanation
Microsoft and Google report ~70% of critical CVEs are memory safety issues in C/C++. Memory-safe languages (Rust, Go, Swift) prevent these at compile time. NSA and CISA recommend memory-safe languages.
25
What is the difference between a pentest and a red team engagement?
Correct Answer
A pentest focuses on finding vulnerabilities in a defined scope; a red team simulates full adversary TTPs (tactics, techniques, procedures) against all defenses over a longer period
Explanation
Pentest: defined scope (web app, network), find and report vulns. Red team: adversary simulation — phishing, persistence, lateral movement, data exfiltration — testing people, processes, and technology holistically.
26
What is SIEM (Security Information and Event Management)?
Correct Answer
A platform aggregating and correlating security events from multiple sources in real-time to detect threats and support incident response
Explanation
SIEMs (Splunk, IBM QRadar, Elastic SIEM) collect logs from firewalls, IDS, endpoints, and cloud services. Correlation rules and machine learning detect anomalies and generate alerts for SOC analysts.
27
What is the purpose of a nonce in cryptographic protocols?
Correct Answer
A number used only once in a cryptographic communication to prevent replay attacks and ensure uniqueness of encrypted output
Explanation
A nonce (number used once) ensures that encrypting the same plaintext twice produces different ciphertext, and prevents attackers from replaying captured messages. Used in TLS handshakes, AES-GCM, and authentication protocols.
28
What is the difference between block ciphers and stream ciphers?
Correct Answer
Block ciphers encrypt fixed-size chunks of data using modes of operation; stream ciphers encrypt data one bit or byte at a time by combining it with a keystream
Explanation
Block ciphers (AES) process fixed-size blocks (e.g., 128 bits) and need a mode of operation (CBC, GCM, CTR). Stream ciphers (ChaCha20, RC4) generate a continuous keystream XORed with plaintext, suiting real-time data like video calls.
29
What is a man-in-the-browser (MitB) attack?
Correct Answer
Malware infecting a web browser that intercepts and modifies transactions in real time, such as altering bank transfer details after the user submits them
Explanation
MitB malware (e.g., banking trojans like Zeus) hooks browser APIs to alter form data or displayed content without the user noticing, even over a legitimate HTTPS connection, since the tampering happens after decryption on the endpoint.
30
What is DNS spoofing (cache poisoning)?
Correct Answer
Inserting forged DNS records into a resolver's cache so it returns malicious IP addresses for legitimate domain names
Explanation
DNS cache poisoning corrupts a resolver's cache with fake records, redirecting users to attacker-controlled servers (often for phishing or malware delivery). DNSSEC mitigates this by cryptographically signing DNS responses.
31
What is the purpose of Subresource Integrity (SRI) in web security?
Correct Answer
Allowing browsers to verify that fetched resources (scripts, stylesheets) from third-party CDNs have not been tampered with, by comparing a cryptographic hash
Explanation
SRI uses an integrity attribute containing a base64-encoded hash (e.g., sha384-...). The browser computes the hash of the fetched file and refuses to execute it if it doesn't match, protecting against compromised CDNs.
32
What is the purpose of a Content Security Policy (CSP) header?
Correct Answer
An HTTP response header instructing the browser which sources of scripts, styles, and other resources are allowed to load, mitigating XSS and data injection attacks
Explanation
CSP lets servers declare an allowlist (e.g., script-src 'self' https://trusted.cdn.com). Browsers block any resource not matching the policy, significantly reducing the impact of injected scripts even if an XSS flaw exists.
33
What is credential stuffing and how does it differ from brute forcing?
Correct Answer
Credential stuffing tries username/password pairs leaked from other breaches against many sites, exploiting password reuse, while brute forcing guesses unknown passwords through exhaustive combinations
Explanation
Credential stuffing leverages the fact that users often reuse passwords across services — attackers replay breached credential lists at scale using automation/bots. Defenses include MFA, breached-password checks, and rate limiting.
34
What is the role of a key derivation function (KDF) such as PBKDF2 or Argon2?
Correct Answer
Deriving one or more cryptographic keys from a password or master secret using a deliberately slow, configurable algorithm to resist brute-force and hardware-accelerated attacks
Explanation
KDFs apply many iterations (and, for Argon2, memory-hard computation) to slow down attackers performing offline guessing, especially with GPUs or ASICs. They are essential for securely storing passwords and deriving encryption keys from passphrases.
35
What is typosquatting in the context of cybersecurity?
Correct Answer
Registering domain names that closely resemble legitimate ones (misspellings or different TLDs) to deceive users into visiting malicious sites
Explanation
Typosquatters register domains like "gooogle.com" or "paypa1.com" to capture mistyped traffic for phishing, ad fraud, or malware distribution. Brand owners often proactively register common misspellings to prevent abuse.
36
What is the purpose of network address translation (NAT) from a security perspective?
Correct Answer
It hides internal IP addresses behind a single public address, making direct inbound connections to internal hosts harder for external attackers
Explanation
NAT was designed for IP address conservation, but as a side effect it obscures internal network topology and prevents unsolicited inbound connections from reaching internal hosts directly — though it is not a substitute for a firewall.
37
What is the purpose of code signing?
Correct Answer
Applying a digital signature to software or scripts so users and operating systems can verify the publisher's identity and confirm the code has not been altered since signing
Explanation
Code signing uses the publisher's private key to sign a hash of the executable; operating systems and package managers verify the signature with the publisher's certificate, blocking tampered or unsigned code (e.g., Windows SmartScreen, macOS Gatekeeper).
38
What is the difference between vertical and horizontal scaling of security monitoring, in the context of a Security Operations Center (SOC) maturity model?
Correct Answer
Vertical scaling deepens detection and response capability within existing data sources (better correlation, automation, threat hunting); horizontal scaling expands the breadth of monitored sources (new log types, business units, cloud platforms)
Explanation
A maturing SOC grows in two complementary directions: going deeper (vertical) by improving analytics, automation (SOAR), and threat-hunting on existing telemetry, and going wider (horizontal) by onboarding new data sources such as cloud, OT, or SaaS logs.
39
What is an evil twin attack in wireless network security?
Correct Answer
A rogue Wi-Fi access point set up to mimic a legitimate network's SSID, tricking users into connecting so the attacker can intercept their traffic
Explanation
An evil twin AP broadcasts the same name as a trusted network (e.g., "Airport_WiFi"). Victims who connect have their traffic routed through the attacker, enabling credential theft and MITM attacks. Mitigated by using VPNs and verifying network certificates.
40
What is the purpose of DNSSEC (Domain Name System Security Extensions)?
Correct Answer
Cryptographically signing DNS records so resolvers can verify that responses genuinely originate from the authoritative source and have not been tampered with in transit
Explanation
DNSSEC adds a chain of digital signatures (RRSIG records validated against DNSKEY/DS records up to the root) so resolvers can detect forged or altered responses, directly countering DNS cache-poisoning and spoofing attacks. Note it provides integrity and authenticity, not confidentiality — that is the role of DNS-over-HTTPS/TLS.
1
What is post-quantum cryptography (PQC)?
Correct Answer
Cryptographic algorithms believed to be resistant to attacks by quantum computers, currently being standardized by NIST
Explanation
Shor's algorithm breaks RSA/ECC. Grover's algorithm halves symmetric key security. NIST PQC standards (2024): CRYSTALS-Kyber (KEM), CRYSTALS-Dilithium, FALCON, SPHINCS+ (signatures) — based on lattices and hash trees.
2
What is Spectre/Meltdown and what class of vulnerability are they?
Correct Answer
Microarchitectural side-channel attacks exploiting CPU speculative execution to read arbitrary memory across security boundaries
Explanation
Meltdown: exploits out-of-order execution to read kernel memory from user space. Spectre: exploits branch prediction to leak data from other processes. Patches (KPTI, retpoline) have significant performance overhead.
3
What is a timing attack?
Correct Answer
A side-channel attack inferring secret information (keys, passwords) by measuring time differences in cryptographic operations or comparisons
Explanation
Timing attacks: comparing secret strings with == leaks length/value via timing differences. bcrypt uses constant-time comparison. RSA implementations must use constant-time modular exponentiation. TLS: padding oracle attacks exploit timing.
4
What is return-oriented programming (ROP) and how does it bypass DEP/NX?
Correct Answer
An exploit technique chaining existing code gadgets (sequences ending in RET) from the process's own memory, bypassing DEP/NX since no new code is injected
Explanation
DEP/NX marks pages non-executable. ROP reuses existing executable code. Attackers build "gadget chains" on the stack — small code sequences ending in RET. Combined with ASLR bypass (info leak), enables arbitrary code execution.
5
What is Kernel Address Space Layout Randomization (KASLR) and its limitations?
Correct Answer
Randomizing the kernel's base address to make exploits harder — limited by info-leak vulnerabilities that reveal the actual address
Explanation
KASLR randomizes kernel base at boot, making hardcoded addresses fail. But side-channel attacks (KASLR bypass via TLB timing, prefetch timing) can leak the kernel address, negating protection. SMEP/SMAP provide complementary defenses.
6
What is the principle of complete mediation in security?
Correct Answer
Every access to every object must be checked for authorization — no cached or bypassed access controls — ensuring no security bypass
Explanation
Complete mediation (Saltzer-Schroeder): check every access, not just login. Cache invalidation attacks exploit cached authorization decisions. Reference monitors must be invoked for every access to enforced objects.
7
What is the Trusted Platform Module (TPM)?
Correct Answer
A dedicated hardware security chip storing cryptographic keys, enabling secure boot, disk encryption, and remote attestation
Explanation
TPM (ISO/IEC 11889) stores keys in hardware (can't be extracted by software). Used for: BitLocker (binds disk encryption to platform state), measured boot (PCR registers capture boot chain), remote attestation.
8
What is security by design and what does it entail?
Correct Answer
Integrating security considerations from the earliest design phases — threat modeling, secure defaults, minimal attack surface, fail-safe defaults, and defense in depth
Explanation
Security by design (shift-left): threat modeling (STRIDE, PASTA), secure coding standards, secure defaults (deny by default, minimal permissions), review processes, and security requirements alongside functional requirements.
9
What is lattice-based cryptography and why is it quantum-resistant?
Correct Answer
Cryptographic schemes based on the hardness of lattice problems (Learning With Errors, Ring-LWE) which quantum computers cannot solve efficiently
Explanation
CRYSTALS-Kyber/Dilithium are lattice-based. The Learning With Errors (LWE) problem is NP-hard under quantum computing models. No efficient quantum algorithm exists for LWE (unlike factoring/discrete log).
10
What is a hardware security module (HSM)?
Correct Answer
A dedicated tamper-resistant hardware device for safeguarding cryptographic keys and performing cryptographic operations, never exposing keys to software
Explanation
HSMs (Thales Luna, AWS CloudHSM, YubiHSM) physically protect private keys. They perform signing and decryption inside the device. Even with root access to the server, keys cannot be extracted.
11
What is the MITRE ATT&CK framework?
Correct Answer
A globally accessible knowledge base of real-world adversary tactics, techniques, and procedures (TTPs) used for threat modeling, detection, and red team operations
Explanation
ATT&CK (Adversarial Tactics, Techniques, and Common Knowledge) documents how adversaries operate: Initial Access (phishing), Execution, Persistence, Privilege Escalation, Lateral Movement, Exfiltration. Used by SOCs for detection coverage mapping.
12
What is oblivious RAM (ORAM) and its security purpose?
Correct Answer
A cryptographic construction enabling access to memory such that an observer cannot determine which data is being accessed, hiding access patterns from adversaries
Explanation
Even with encrypted memory, access patterns leak information (which blocks are accessed). ORAM shuffles and re-encrypts blocks on each access, hiding patterns. Used in secure enclaves (Intel SGX) and privacy-preserving computation.
13
What is the difference between a CRL and OCSP Stapling?
Correct Answer
CRL is a large downloadable list with update latency; OCSP Stapling pre-fetches and attaches the OCSP response to the TLS handshake, improving performance and privacy
Explanation
OCSP Stapling: server fetches its own OCSP response, signs it, and includes it in the TLS handshake. Client doesn't need to contact the CA (faster, private). Must-Staple extension enforces stapling to prevent soft-fail degradation.
14
What is a confused deputy problem in security?
Correct Answer
A vulnerability where a component with sufficient privilege is tricked by another into misusing its authority — e.g., CSRF uses the browser (deputy) to make requests with victim's credentials
Explanation
Confused deputy: the deputy has authority but uses it on behalf of an attacker without knowing. CSRF tricks the browser (which has the user's cookies) to send requests. SSRF makes the server (with internal access) fetch attacker-chosen URLs.
15
What is Secure Multi-Party Computation (MPC)?
Correct Answer
A cryptographic technique enabling multiple parties to jointly compute a function over their inputs without any party revealing their private inputs to others
Explanation
MPC (Yao's garbled circuits, secret sharing, homomorphic encryption): parties compute f(x₁,x₂,...,xₙ) and learn only the output, not each other's inputs. Used in private set intersection, privacy-preserving ML, and threshold signatures.
16
What is homomorphic encryption?
Correct Answer
An encryption scheme allowing computations to be performed on ciphertext, producing encrypted results that match operations on plaintext when decrypted
Explanation
FHE (Fully Homomorphic Encryption — Gentry 2009) allows arbitrary computation on encrypted data. Cloud can process encrypted data without decryption. Still ~1 million times slower than plaintext computation. CKKS/BFV schemes in active deployment for privacy-preserving ML.
17
What is cyber threat intelligence (CTI) and how is it used?
Correct Answer
Evidence-based knowledge about adversaries — their TTPs, infrastructure, motivations — used to inform proactive defenses, incident response, and threat hunting
Explanation
CTI levels: strategic (executive risk), operational (campaign details), tactical (malware indicators). STIX/TAXII standards for sharing. CTI feeds enrich SIEM rules, firewall blocklists, and inform red team emulation (ATT&CK TTPs).
18
What is the concept of zero trust architecture?
Correct Answer
A security model treating every request as potentially hostile regardless of network location, requiring continuous verification before granting access to any resource
Explanation
Zero Trust (NIST SP 800-207): "never trust, always verify." Eliminates implicit trust based on network location. Requires: strong identity, device health checks, least-privilege access, micro-segmentation, and continuous monitoring.
19
What is differential privacy and how is it used in practice?
Correct Answer
A mathematical privacy framework adding calibrated noise to query results, providing a provable guarantee that the presence of any individual in the dataset cannot be inferred
Explanation
Differential privacy (Dwork 2006): f(D) and f(D') produce outputs within ε of each other where D and D' differ by one record. Apple (keyboard suggestions), Google (RAPPOR), and the US Census use DP to release statistics without revealing individuals.
20
What is a zero-knowledge proof (ZKP) and what core property makes it useful in cryptography?
Correct Answer
A protocol allowing one party (the prover) to convince another (the verifier) that a statement is true without revealing any information beyond the truth of the statement itself
Explanation
ZKPs satisfy completeness (a true statement convinces an honest verifier), soundness (a false statement cannot convince the verifier except with negligible probability), and zero-knowledge (the verifier learns nothing beyond validity). zk-SNARKs and zk-STARKs apply this to blockchains and private authentication.