Inspiration
Most people only think about security after something goes wrong. Passwords sit in notes apps, sensitive files travel unencrypted, and phishing links get clicked because nobody explained the warning signs. Security tools are usually built for experts, and awareness training is a separate thing nobody opens.
We wanted one platform where a student, employee or analyst can store secrets safely, check suspicious links, report incidents and learn, all in one place. That became CyberSec Management Platform.
Encrypt. Detect. Respond. Educate.
What it does
- Authentication: registration, JWT login, TOTP multi-factor authentication, password reset and session tracking
- Password Vault: AES-256-GCM encryption, secure generator, strength score, change history and expiry reminders
- File Vault: files are encrypted before they touch disk, with a SHA-256 hash for integrity checks
- Phishing Detection: scores URLs and emails as Safe, Suspicious or High Risk
- Security Chatbot: an offline assistant covering ARP spoofing, SQL injection, XSS, MFA and more
- Incident Management: report, assign and resolve incidents by severity
- User Behaviour Analytics: every login attempt gets a risk score
- Audit Logging: searchable logs with CSV export for admins
- Awareness Centre: tips, quizzes and progress tracking
- Dashboard: live charts for password health, file types, threats and weekly activity
Role-based access control separates Admin, Security Analyst and User.
How we built it
The backend is Python with FastAPI and SQLAlchemy 2. The schema targets Oracle Database, with a SQLite fallback so it runs on any laptop. The code is split into routers, services, models, schemas and a core security module.
The frontend is React with Vite and Tailwind CSS. It uses a glassmorphism theme and Chart.js for visualisation, and an axios client attaches the JWT to every request.
Phishing risk is a capped sum of weighted signals:
$$R_{phish} = \min\left(100,\; 10k + 15u + 20h + 25a\right)$$
where \(k\) is the number of suspicious keywords, \(u\) is the number of suspicious URL patterns, \(h\) is 1 if the link uses plain HTTP, and \(a\) is 1 if the URL contains an @ symbol. A score \(R \ge 70\) is High Risk and \(35 \le R < 70\) is Suspicious.
Login risk adds 40 for repeated failures, 20 for an unusual hour and 25 for a new IP address, capped at 100.
Every secret and file is encrypted with a fresh random 96-bit nonce:
$$C,\ T = \text{AES-GCM}_{K}(N,\ P)$$
Here \(K\) is the 256-bit key, \(N\) is the nonce, \(P\) is the plaintext and \(T\) is the authentication tag, so any tampering is detected on decryption.
Core encryption snippet:
def encrypt_data(plaintext: bytes):
nonce = os.urandom(12)
ciphertext = AESGCM(_get_aes_key()).encrypt(nonce, plaintext, None)
return ciphertext, nonce
Challenges we ran into
- Encryption done properly: reusing a nonce with AES-GCM breaks its security, so we generate a new one for every item and keep key handling in one module.
- Two databases: Oracle and SQLite differ in types and behaviour, so we kept the models portable.
- Enforcing roles: we built a reusable
require_rolesdependency so permission rules live in one place. - Tuning detection: early phishing rules flagged harmless text, so we adjusted weights and thresholds until results made sense.
- Reviewing our own work: auditing our code showed that a security project needs security fixes too, such as session revocation, rate limiting and reset-token handling.
What we learned
- Building security features is much harder than using them. Details like nonces, token expiry and error messages decide whether a design is safe.
- Audit logging is easiest to add early, because it touches every module.
- A good dashboard makes security data understandable to non-experts.
What's next
- Enforce session revocation and add refresh-token rotation
- Rate-limit logins and lock accounts after repeated failures
- Encrypt MFA secrets at rest and move keys into a secrets manager
- Add automated tests, database migrations and Docker support
- Replace the keyword chatbot with an LLM-backed assistant
- Deploy on cloud infrastructure
Built With
- aes-256-gcm
- axios
- bcrypt
- chart-js
- cryptography
- fastapi
- javascript
- jwt
- oracle-database
- pydantic
- pyotp
- python
- react
- rest-api
- sha-256
- sqlalchemy
- sqlite
- tailwindcss
- totp-mfa
- uvicorn
- vite