Cybersecurity tools
๐ฐ Overview
This web app is a collection of 8 beginner-friendly cybersecurity tools built with only HTML, CSS, and JavaScript, designed to simulate real-world cybersecurity concepts and practices in a user-friendly interface. It’s ideal for students, educators, and enthusiasts looking to understand security principles through interactive mini-projects.
๐ ๏ธ Tools Used
- HTML5 – structure and content
- CSS3 – styling and layout
- JavaScript (ES6) – functionality and interactivity
๐งฉ Project List and Cybersecurity Relevance
1. ๐ Password Strength Checker
๐ Purpose: Teach users how password complexity affects security.
๐ง Cybersecurity Concept: Weak passwords are easy to guess or crack. Strong passwords reduce brute-force attack success rates.
โ How it works:
- Checks length (8+ characters), uppercase letters, numbers, and symbols.
- Gives a strength rating based on these factors.
๐ Code Highlights:
if (val.length >= 8) score++;
if (/[A-Z]/.test(val)) score++;
if (/[0-9]/.test(val)) score++;
if (/[^A-Za-z0-9]/.test(val)) score++;
2. ๐ก๏ธ Phishing Email Detector
๐ Purpose: Help identify common phishing keywords and suspicious URLs.
๐ง Cybersecurity Concept: Phishing is a major attack vector where attackers trick users into revealing sensitive info.
โ How it works:
- Analyzes user-pasted email content.
- Flags words like "urgent", "verify account", or links (http://...) as suspicious.
๐ Code Highlights:
const suspicious = ["urgent", "click here", "login now", "verify account"];
if (found.length > 0 || hasLink) // show phishing warning
3. ๐ File Encryption Tool (XOR)
๐ Purpose: Demonstrate simple encryption logic using XOR.
๐ง Cybersecurity Concept: Encryption protects data confidentiality. XOR encryption is a basic example of symmetric key encryption.
โ How it works:
- User inputs text and a numeric key.
- Each character is XORed with the key.
- Encrypted output is shown in Base64.
๐ Code Highlights:
result += String.fromCharCode(text.charCodeAt(i) ^ key);
btoa(result) // convert to Base64
4. ๐ Firewall Rule Simulator
๐ Purpose: Simulate basic firewall rule logic.
๐ง Cybersecurity Concept: Firewalls block or allow network traffic based on IP rules to protect internal systems.
โ How it works:
- User inputs an IP address.
- Checks against a hardcoded list of blocked IPs.
- Displays if the IP is allowed or blocked.
๐ Code Highlights:
const blockedIPs = ["192.168.1.1", "10.0.0.5"];
if (blockedIPs.includes(ip)) // blocked
5. ๐ Packet Sniffer (Simulated)
๐ Purpose: Emulate packet capture output for educational purposes.
๐ง Cybersecurity Concept: Packet sniffing monitors data flow across networks. Used by attackers or defenders for analysis.
โ How it works:
- Generates sample network packets (e.g., DNS, HTTP requests).
- Displays them in real time like a sniffer log.
๐ Code Highlights:
const packets = [
"192.168.1.10 → 172.217.0.142 [HTTP] GET /index.html",
"192.168.1.10 → 8.8.8.8 [DNS] Query A google.com"
];
6. ๐ง Keylogger Demo
๐ Purpose: Simulate how keyloggers capture input.
๐ง Cybersecurity Concept: Keyloggers are malware that record keystrokes, often used for credential theft.
โ How it works:
- Every keystroke in the input field is logged and displayed.
- Raises awareness about malicious monitoring of user input.
๐ Code Highlights:
logger?.addEventListener('keydown', (e) => {
logged.innerText += e.key + " ";
});
7. ๐ผ๏ธ Steganography (Simulated)
๐ Purpose: Introduce the concept of hiding messages inside files/images.
๐ง Cybersecurity Concept: Steganography is the technique of hiding data in plain sight, e.g., embedding in images.
โ How it works:
- User types a secret message.
- Message is Base64 encoded and simulated as embedded in an image.
๐ Code Highlights:
const data = btoa(msg); // Base64 simulates hiding
img.alt = msg; // simulated storage in image metadata
8. ๐ฑ 2FA TOTP Simulator
๐ Purpose: Mimic Time-based One-Time Passwords (TOTP).
๐ง Cybersecurity Concept: TOTP is used in 2-Factor Authentication to add a layer of security.
โ How it works:
- Generates a pseudo-random 6-digit code every 30 seconds.
- Simulates time-based nature of real TOTP (like Google Authenticator).
๐ Code Highlights:
const time = Math.floor(Date.now() / 30000);
const code = ("000000" + (time % 1000000)).slice(-6);
๐จ UI Design Principles Applied
Feature |
Description |
Dark Mode |
Modern look, reduces eye strain |
Card Layout |
Separates functionality for clarity |
Responsive Grid |
Adapts to mobile, tablet, and desktop |
Visual Feedback |
Colors and effects on input, hover, and output |
Live Preview |
Results update instantly after actions |
๐งช How to Use / Run
- Copy the HTML code into a file named index.html.
- Open the file in a browser (Chrome, Firefox, etc.).
- Test each tool in the cards.
- Optionally, host it on GitHub Pages or Netlify for online access.
๐ก Learning Outcomes
By completing and using this app, learners will understand:
- The basics of password security
- Phishing red flags in emails
- Symmetric encryption logic
- Simple network rule enforcement
- Packet structure and sniffing concepts
- Dangers of keylogging
- Basics of steganography
- How 2FA/TOTP enhances account security
๐งฏ Disclaimer
These tools are for educational and demonstration purposes only. They simulate concepts to help users understand and practice cybersecurity fundamentals in a safe environment.
Github URL: https://github.com/brahmaputraS/cyber-security-projects.git
Demo Link: https://reactsamples-f5783.web.app/