Cyber Quiz Day 34: Test Your Cybersecurity Knowledge
Welcome to Day 34 of our Cyber Quiz series! Whether you're a security analyst, developer, or IT professional, understanding cybersecurity fundamentals is critical in today's threat landscape. This quiz tests core concepts ranging from cryptography to incident response—essential knowledge for securing digital assets. We'll explore each question in-depth, unpack misconceptions, and provide actionable best practices. Let's dive in!
Table of Contents#
- Quiz Questions & Answers
- Detailed Explanations
- Cryptography Fundamentals
- Network Security
- Incident Response
- Secure Coding
- Threat Modeling
- Best Practices & Common Pitfalls
- Real-World Scenarios
- Conclusion
- References
Quiz Questions & Answers#
Question 1: Which cryptographic algorithm provides confidentiality but not authenticity?
A) AES
B) RSA
C) HMAC-SHA256
D) ECDSA
Question 2: When analyzing a suspicious email, which header field helps verify its origin?
A) Subject
B) Received-SPF
C) Date
D) Content-Type
Question 3: During incident response, what’s the FIRST step after detecting a breach?
A) Contain the attack
B) Preserve evidence
C) Notify stakeholders
D) Identify the root cause
Question 4: Which OWASP Top 10 vulnerability arises from improperly sanitized user inputs?
A) Broken Access Control
B) Cryptographic Failures
C) Injection
D) Security Misconfiguration
Question 5: In threat modeling, what does STRIDE stand for?
A) A framework for risk assessment
B) A protocol for secure data transmission
C) A malware analysis technique
Detailed Explanations#
Cryptography Fundamentals#
Answer: A) AES
- Why? AES (Advanced Encryption Standard) is a symmetric encryption algorithm ensuring confidentiality by scrambling data. It doesn’t inherently provide authenticity (e.g., verifying sender identity). RSA and ECDSA offer authenticity via digital signatures, while HMAC guarantees message integrity.
- Common Pitfall: Using AES alone without HMAC for encrypted data transfers risks man-in-the-middle attacks.
- Best Practice: Use AES-GCM or combine AES with HMAC for both confidentiality and integrity.
# Example: Encrypting data with AES and authenticating with HMAC
from Crypto.Cipher import AES
from Crypto.Hash import HMAC, SHA256
# Encrypt
cipher = AES.new(key, AES.MODE_GCM)
ciphertext, tag = cipher.encrypt_and_digest(data)
# Authenticate
hmac = HMAC.new(auth_key, digestmod=SHA256)
hmac.update(ciphertext) Network Security#
Answer: B) Received-SPF
- Why? The
Received-SPFheader validates if the sender’s IP is authorized by the domain’s SPF (Sender Policy Framework) DNS record. This helps detect email spoofing in phishing attacks. - Real-World Usage: Tools like DMARC and DKIM build upon SPF to prevent domain impersonation.
Incident Response#
Answer: A) Contain the attack
- Why? According to the NIST Incident Response Lifecycle (NIST SP 800-61), containment is the first priority to stop the attack from spreading. Evidence preservation follows after initial containment is achieved.
- Workflow:
- Contain the breach
- Preserve logs/memory
- Eradicate threats
- Recover systems
- Post-mortem analysis
Secure Coding#
Answer: C) Injection
- Why? Injection flaws (SQLi, XSS) occur when untrusted inputs execute unintended commands. OWASP recommends:
- Parameterized queries for SQL
- Output encoding for web content
// Safe SQL with PreparedStatement String query = "SELECT * FROM users WHERE email = ?"; PreparedStatement stmt = conn.prepareStatement(query); stmt.setString(1, userInput);
Threat Modeling#
Answer: A) STRIDE is a threat classification framework
- STRIDE Breakdown:
- Spoofing
- Tampering
- Repudiation
- Information Disclosure
- Denial of Service
- Elevation of Privilege
- Best Practice: Apply STRIDE during design phase using tools like Microsoft Threat Modeling Tool.
Best Practices & Common Pitfalls#
| Topic | Best Practice | Common Pitfall |
|---|---|---|
| Cryptography | Use libsodium or certified libraries; rotate keys quarterly | Rolling custom crypto; hardcoded keys |
| Email Security | Enforce DMARC policy p=reject | Ignoring SPF/DKIM alignment checks |
| Incident Response | Maintain offline backups of critical logs | Shutting down systems before evidence capture |
| Secure Coding | Adopt SAST/DAST tools; input validation | Trusting client-side validation |
| Threat Modeling | Update models after architecture changes | Treating it as a one-time activity |
Real-World Scenarios#
Scenario 1: Ransomware Attack#
Problem: Attackers encrypt databases via SQL injection.
Solution:
- Contain: Isolate the DB server.
- Eradicate: Patch the vulnerable web app.
- Recover: Restore from offline backups.
Scenario 2: Credential Theft#
Problem: Stolen passwords due to phishing.
Solution:
- Implement MFA (e.g., FIDO2 keys).
- Monitor for leaked credentials with HaveIBeenPwned API.
Conclusion#
Cybersecurity is a continuous journey. Regular quizzes like this expose knowledge gaps and reinforce critical concepts. Remember:
- Defense-in-depth > Silver bullet solutions
- Automate security controls (e.g., CI/CD pipelines with SCA/SAST)
- Update your threat models quarterly
Stay tuned for Cyber Quiz Day 35!
References#
- NIST SP 800-61 (Incident Response)
- OWASP Top 10 (2021)
- AES Encryption Best Practices (NIST)
- Microsoft Threat Modeling Tool
- DMARC Official Specification
Disclaimer: Answers reflect industry standards as of 2023. Always contextualize practices to your environment.