Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decoy

image

[Decoy] and PhishGuard 360 were my attempt at building a NLP based security agent (Reverse Social Engineering) that behaves well in an actual Gmail workflow and Vapi workflow, not just in isolated not[...]

The first layer is deterministic and fast. It checks for known phishing patterns, sender and domain risk signals, and high-risk linguistic combinations. You can view it as a weighted rule score over b[...]

$$s_1(e)=\sum_{i=1}^{n} w_i \cdot \mathbf{1}[\text{pattern}_i(e)].$$

If $s_1(e)\ge \tau_1$, the email is immediately flagged as a threat and no further model inference is needed. This layer is intentionally optimized for low latency and high recall on known attack temp[...]

If an email passes Layer 1, it moves to a DistilBERT classifier that estimates phishing likelihood from content. Formally: $$ p_{\text{threat}}(e)=\sigma(f_\theta(e)), $$ where $f_\theta(e)$ is the model logit and $\sigma$ is the sigmoid function. In practice, this stage serves as the statistical middle ground: it clears high-confidence benign emails and escalates bord[...]

The final layer uses Gemini with retrieval-augmented context for harder social-engineering cases. At this point the system is no longer just classifying text in isolation; it is reasoning with email c[...]

$$\hat{y}=\arg\max_{y\in{\text{safe},\text{threat}}} P(y\mid e, C_k),$$

where $C_k$ is the retrieved context set. This is the expensive stage, so it is intentionally conditional. The whole architecture follows a conditional-compute objective: keep average latency low whil[...]

$$\mathbb{E}[T]=T_1+(1-r_1)T_2+(1-r_1)(1-r_2)T_3,$$

with $T_i$ as per-layer latency and $r_i$ as stop rates from earlier layers.

Implementation-wise, this repository includes a Chrome extension (Manifest V3) for Gmail-side extraction and scan triggering, a Flask backend that orchestrates multi-layer routing, and a containerized[...]

The development dataset used here is hackathon-resources/se_phishing_test_set.csv (1000+ labeled emails). Current smoke tests confirm end-to-end operation across health checks, benign classification[...]

If you want to run it quickly:

git clone https://github.com/ashworks1706/Cybersec-360-hackathon.git
cd Cybersec-360-hackathon
cp .env.template .env
./deploy.sh

References

About

ML pipeline for anomaly detection with reverse social engineering voice agents

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Contributors

Languages