Inspiration

Phishing messages around us don’t look like the old “you won a lottery” emails anymore. They look like bank alerts, college notices, OTP requests, and even professor messages. We noticed that most filters only block obvious spam but fail at social-engineering attacks. The idea was to build something that behaves less like a spam filter and more like a cautious human — something that asks “why does this message want urgency or credentials?” AI-PowerShield started as an attempt to simulate a basic security analyst in software.

What it does

AI-PowerShield analyzes suspicious text, URLs, and uploaded documents and produces a risk score instead of a simple yes/no prediction. It checks language patterns, psychological pressure phrases, domain properties, and possible credential exposure. The system combines multiple signals and outputs a final level: Low, Medium, High, or Critical. The goal is not just detection, but explanation — the user sees why a message is dangerous, not just that it is dangerous.

How we built it

I began by fine-tuning a DistilBERT sequence classification model on publicly available SMS and email phishing datasets to detect semantic phishing patterns. The model was integrated into a FastAPI backend that exposes REST endpoints for message analysis. Around the ML core, i implemented additional security modules: a URL analyzer using domain entropy, subdomain depth, and WHOIS-based heuristics; a credential exposure detector using regex and Luhn validation for cards/OTP/password patterns; and a behavioral detector that flags urgency and manipulation phrases.

To make the system usable in real time, i exported the trained PyTorch model to ONNX Runtime and loaded it through an optimized inference pipeline. The outputs of all modules are combined inside a custom risk engine:

𝑅𝑖𝑠𝑘 𝑆𝑐𝑜𝑟𝑒 = 𝑤1𝑃𝑛𝑙𝑝 + 𝑤2𝑈𝑢𝑟𝑙 + 𝑤3𝐶𝑐𝑟𝑒𝑑 + 𝑤4𝐵𝑏𝑒ℎ𝑎𝑣𝑖𝑜𝑟

Finally, a lightweight HTML/CSS/JavaScript frontend sends user inputs to the API and displays the generated explanations and risk level.

Challenges we ran into

The biggest issue was not model accuracy — it was reliability. Running transformers directly in PyTorch made inference slow and inconsistent across systems. Another challenge was combining rule-based logic with probabilistic outputs without producing false alarms. Also, packaging the project so someone else could run it without downloading massive model files required restructuring the repository and using external model hosting.

Accomplishments that we're proud of

I turned a trained ML model into a working security tool. The system doesn’t just classify messages; it explains them. Exporting the transformer to ONNX reduced latency significantly and made the project runnable on CPU-only laptops. I have also implemented a modular risk engine where multiple detectors contribute to one decision instead of relying on a single classifier.

What we learned

I learned that building an AI model is easier than deploying it. Model optimization, inference speed, and reproducibility matter more than raw accuracy in real applications. It also taught how social engineering works technically — many attacks rely more on psychology than on technical exploits. Finally, I understood the importance of designing systems that fail gracefully and remain usable on different machines.

What's next for AI-Powershield

Next, I want to add browser-level protection and real-time link checking. A Chrome extension that scans text fields and links before submission is a natural step. I have also planned to add continual learning so the system can adapt to new phishing styles and improve explanations using feedback. In Long-term, the goal is to make a lightweight personal security assistant that runs locally and protects users without requiring cloud processing.

Built With

Share this project:

Updates

Submission history