Cybersecurity Simulation

Test your security skills and learn how to protect systems from threats

1
Find Vulnerability
2
Stop Attack
3
Secure System

Stage 1: Find the Vulnerability

Scan the code below and identify the security vulnerability. Click on the vulnerable line when you find it.

function login(username, password) {
const query = `SELECT * FROM users WHERE username='${username}' AND password='${password}'`;
return db.query(query); // SQL Injection vulnerability!
}
function processPayment(amount) {
if (amount < 0) {
return 'Invalid amount';
}
return paymentGateway.charge(amount);
}

Stage 2: Stop the Attack

An active SQL injection attack is detected. Choose the best defense mechanism to stop it immediately.

Active Attack Detected

SQL Injection attempt detected: admin' OR '1'='1

Attack source: External IP | Severity: Critical

Block IP Address
Temporarily blocks the attacking IP
Use Parameterized Queries
Prevents SQL injection by using prepared statements
Increase Firewall Rules
Adds more firewall restrictions
Restart Server
Reboots the server to clear connections

Stage 3: Secure the System

Implement comprehensive security measures to prevent future attacks. Select all recommended security practices.

Input Validation & Sanitization
Validate and sanitize all user inputs before processing
Parameterized Database Queries
Use prepared statements to prevent SQL injection
Regular Security Audits
Conduct periodic security assessments and penetration testing
Access Control & Authentication
Implement strong authentication and role-based access control
Security Monitoring & Incident Response
Set up 24/7 monitoring and automated threat detection

🎉 Simulation Complete!

You've successfully secured the system. Here's how Cyber Somaliland can help protect your business:

Cybersecurity & Compliance

Risk assessments, threat modeling, pentesting & reference security architecture to protect your systems.

Custom Software Development

Secure, end-to-end applications built with security-first principles and best practices.

Managed IT & Helpdesk

24/7 support, monitoring, patching, and incident response to keep your systems secure.