1What is the difference between TCP and UDP?
TCP provides reliable, ordered delivery; UDP is connectionless and doesn't guarantee delivery.
2An attacker intercepts a JWT signed with HS256 and changes the role claim from user to admin. Will the attack work? Explain why or why not.
Normally No, Modifying the payload invaldiates the HMAC signature which the server recomputes using its shared secret
3Q: How do you stop an attacker who stole a valid JWT?
Revoke affected tokens and sessions, invalidate refresh tokens, and require reauthentication
4Q: Does issuing a new JWT invalidate an old stolen JWT?
5What is the TCP three-way handshake?
SYN → SYN-ACK → ACK establishes a TCP connection.
6What is the difference between a TCP SYN scan and a connect scan?
A SYN scan uses a partial handshake; a connect scan completes the TCP handshake.
7What do open, closed, and filtered ports mean?
Open = accepting connections; closed = reachable but not listening; filtered = blocked or obscured by filtering.
8What is DNS?
DNS translates domain names into records such as IP addresses.
9What is ARP?
ARP resolves IPv4 addresses to MAC addresses on a local network.
10What is ARP spoofing?
Forging ARP messages to redirect local traffic, potentially enabling MITM attacks.
11What is a man-in-the-middle attack?
An attacker intercepts or alters communication between two parties.
12What is the difference between IDS and IPS?
IDS detects suspicious traffic; IPS can also block it.
13What is network segmentation?
Separating networks to restrict communication and reduce lateral movement.
14What is the difference between stateful and stateless firewalls?
Stateful firewalls track connections; stateless firewalls evaluate packets against rules independently.
15What is the difference between vulnerability scanning and penetration testing?
Scanning identifies potential weaknesses; pentesting manually validates exploitability and impact.
16What is service enumeration?
Gathering information about exposed services, versions, configurations, and accessible resources.
17What is SMB signing and why is it important?
It authenticates SMB messages and helps prevent tampering and certain NTLM relay attacks.
18What would you do after discovering port 445 open?
Identify SMB details, enumerate authorized shares, review permissions, and test relevant misconfigurations.
19What is symmetric encryption?
Encryption that uses the same shared secret key for encryption and decryption.
20What is asymmetric cryptography?
Cryptography using a public/private key pair for operations like signatures and key exchange.
21What is the difference between encryption and hashing?
Encryption is reversible with a key; hashing produces a one-way digest.
22What is salting in password hashing?
Adding a unique random value to each password before hashing to prevent identical hashes and precomputed attacks.
23What is HMAC?
A keyed hash used to verify message integrity and authenticity.
24How is HMAC used in challenge-response authentication?
One party computes an HMAC of a fresh challenge; the verifier checks it using the shared key.
25What is a digital signature?
A private-key signature that verifies the signer's identity and detects message modification.
26What is a digital certificate?
A digitally signed document that binds an identity to a public key.
27What is a Certificate Authority (CA)?
A trusted entity that validates identities or domain control and signs certificates.
28What is a certificate chain of trust?
Server certificate → intermediate CA → trusted root CA.
29How does a browser validate a TLS certificate?
It checks the certificate chain, signatures, hostname, validity, and relevant constraints.
30How does TLS 1.3 establish secure communication?
It uses key exchange to derive symmetric keys and certificates/signatures to authenticate the server.
31Why does TLS use symmetric encryption after the handshake?
Symmetric encryption is efficient for protecting application data.
32What happens if certificate validation is disabled?
The client may trust an impersonating server, enabling MITM attacks.
33What is Perfect Forward Secrecy?
Past session traffic remains protected even if the server's long-term private key is later compromised.