RefGuard

Stop the scam before you enter your UPI PIN.

Visit Repo
RefGuard banner

About

## The problem it solves

## A scam is not a message. It is an attack in progress.

The most dangerous moment in a scam is often **before the victim realizes that they are being attacked**.

A message may say:

> “Your electricity will be disconnected tonight.”

or:

> “You have received a ₹5,000 cashback. Complete the UPI verification.”

or:

> “Your SIM will be blocked unless your KYC is completed.”

None of these messages necessarily asks for money in the first sentence.

Instead, the attacker constructs a believable story, creates urgency or fear, establishes trust, and then guides the victim toward a specific action — approving a payment, revealing an OTP, sharing credentials, installing remote-access software, or transferring money.

This creates a problem with the way scam detection is usually experienced:

**A victim does not simply need a classification. They need situational awareness.**

A warning saying **“SCAM — 94%”** still leaves critical questions unanswered:

- **Why was I flagged?**

- **Which parts of this message are actually suspicious?** - **What is the attacker trying to make me do?** - **What has already happened in the attack?** - **What is inferred rather than directly observed?** - **What is likely to happen next?** - **What should I do right now?**

### The gap: Detection vs. Understanding

RefGuard was built around this gap.

Instead of treating suspicious content as an isolated classification problem, RefGuard models it as part of a potential **scam progression**.

The system analyzes the content, extracts security signals and evidence, identifies the likely fraud archetype, constructs a **Scam Chain**, separates **OBSERVED** evidence from **INFERRED** behavior and **PREDICTED** next steps, explains the attacker's objective, and connects the assessment to an actionable response.

Its core workflow is:

**DETECT → EXPLAIN → RECONSTRUCT → PREDICT → RESPOND**

The result is not simply:

> **“This looks dangerous.”**

It is closer to:

> **“Here is what we observed, here is what it likely means, here is what the attacker is trying to accomplish, here is what may happen next, and here is what you should do now.”**

RefGuard is designed to turn a confusing scam message into an understandable security decision — **before the attack reaches its objective.**

## Challenges we ran into

## Building a security system that knows the difference between evidence and a prediction was harder than simply detecting a scam.

The hardest part of RefGuard was not making a model say **“SCAM.”**

The hard part was making the system produce an answer that a user could **trust and act upon**.

### 1. A security warning cannot confuse suspicion with evidence

An AI system can generate a convincing explanation even when the underlying evidence is weak.

That is dangerous in a security product.

We therefore designed the Scam Chain around three explicit states:

**OBSERVED** — directly supported by the submitted content or extracted evidence.

**INFERRED** — a reasoned interpretation of observed signals.

**PREDICTED** — a possible next step in the attack.

This distinction became a fundamental part of the data model and the interface. A prediction must never be presented to a victim as something that has already happened.

### 2. False positives are just as damaging as false negatives

A scam detector that labels every financial, banking or government notification as malicious quickly becomes useless.

We had to test RefGuard against both sides of the problem:

**Malicious:** UPI fraud, digital arrest, telecom/KYC scams, trading and investment fraud, fake rewards, authority impersonation and other social-engineering patterns.

**Legitimate:** CDSL/NSDL notifications, bank transaction alerts, utility notifications and legitimate government messages.

The goal was not to make the risk score larger.

The goal was to make the **reasoning better**.

### 3. Scams evolve faster than fixed keyword rules

Attackers can change names, amounts, wording, domains and stories while keeping the same underlying objective.

We therefore separated the security engine into structured signals, fraud archetypes, evidence and contextual reasoning instead of depending on one static keyword list.

This allows the system to recognize the **behavioral pattern of the attack**, not just one exact sentence.

### 4. AI could not become our single point of failure

Gemini adds contextual reasoning, but a security application cannot simply stop working because an external AI service is unavailable.

RefGuard therefore uses deterministic security logic as its foundation and AI as an intelligence layer.

We explicitly tested AI-unavailable scenarios and ensured the system can still return a structured security assessment instead of collapsing into an error.

### 5. A risk score is not an action

A user cannot protect themselves with a number like **87/100**.

The system therefore had to translate technical signals into understandable consequences:

**What happened → What it means → What the attacker wants → What may happen next → What the user should do.**

This forced us to build the product around explainability and response rather than treating the UI as a final layer placed on top of an API.

### 6. The product is handling information that should never become another privacy risk

A scam-defense application may itself receive phone numbers, payment information, OTP-like strings, account details or other sensitive content.

We therefore added sanitization, controlled evidence presentation, privacy-safe local history handling, payload validation and PII protection.

The system must protect the user **while analyzing something that may already be trying to compromise them.**

### 7. We had to make complex security intelligence understandable in seconds

The backend can produce considerably more information than an ordinary user should have to interpret.

We solved this through progressive disclosure.

The primary experience is:

**VERDICT → WHY → WHAT IS HAPPENING → ATTACKER OBJECTIVE → NEXT LIKELY STEP → WHAT TO DO**

Technical evidence remains available underneath for deeper inspection.

The challenge was therefore not simply building an intelligent detection engine.

It was building one that could be **technically defensible, explainable to a non-technical victim, resilient when AI fails, and actionable at the exact moment a decision needs to be made.**

Screenshots

RefGuard screenshot 1

Team

From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.