Skip to content

Commit e0b09f2

Browse files
committed
feat: add 8 new heuristic checks and 17 new brands to enhance detection capabilities.
1 parent 56eeab4 commit e0b09f2

4 files changed

Lines changed: 460 additions & 1 deletion

File tree

.agent/agent.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This file tracks significant changes made during development sessions.
88

99
## ⚠️ CRITICAL: Version Management
1010

11-
**Current App Version: `1.18.10`** (as of December 29, 2025)
11+
**Current App Version: `1.18.11`** (as of December 29, 2025)
1212

1313
### 🔴 After Making ANY Improvements, YOU MUST Update Version Numbers:
1414

@@ -185,6 +185,48 @@ Any important notes for future agents.
185185

186186
---
187187

188+
# 🚀 December 29, 2025 (Session 10k+40) - Major Engine Upgrade
189+
190+
### Summary
191+
Upgraded the PhishingEngine with 8 new heuristics and 17 new brands to significantly improve detection capabilities.
192+
193+
## ✅ HeuristicsEngine Changes
194+
195+
| File | Changes |
196+
|------|---------|
197+
| `HeuristicsEngine.kt` | Added 8 new security checks (25 total) |
198+
199+
**New Detection Rules:**
200+
- Zero-width Unicode characters (obfuscation)
201+
- Data URI schemes (embedded code)
202+
- JavaScript URLs (execution)
203+
- Fragment hiding (URL obscuration)
204+
- Credential harvesting keywords
205+
- Suspicious ports (4444, 1337, etc.)
206+
- Lookalike Unicode characters
207+
- Domain age simulation patterns
208+
209+
## ✅ BrandDatabase Changes
210+
211+
| File | Changes |
212+
|------|---------|
213+
| `BrandDatabase.kt` | Added 17 new brands (52 total) |
214+
215+
**New Categories:**
216+
- Email: Gmail, Outlook, Yahoo, ProtonMail
217+
- Crypto: Kraken, Crypto.com, Ledger, Trezor
218+
- Government: IRS, SSA, HMRC, NHS
219+
- Tech: Uber, Lyft, Airbnb, Venmo, CashApp
220+
- Logistics: UPS, USPS
221+
222+
## ✅ Build Verification
223+
```bash
224+
./gradlew :common:test :webApp:jsBrowserDevelopmentWebpack
225+
# BUILD SUCCESSFUL in 1m 3s
226+
```
227+
228+
---
229+
188230
# 🔧 December 28, 2025 (Session 10k+39) - Threat Page Real Data Fix
189231

190232
### Summary

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ All notable changes to QR-SHIELD will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

7+
## [1.18.11] - 2025-12-29
8+
9+
### 🚀 Major Engine Upgrade: Enhanced Detection Capabilities
10+
11+
#### HeuristicsEngine: 8 New Security Checks (25 total)
12+
13+
| New Heuristic | Weight | Description |
14+
|---------------|--------|-------------|
15+
| `ZERO_WIDTH_CHARS` | 50 | Hidden Unicode characters |
16+
| `DATA_URI_SCHEME` | 60 | data: URIs with embedded code |
17+
| `JAVASCRIPT_URL` | 70 | javascript: execution URLs |
18+
| `FRAGMENT_HIDING` | 25 | Suspicious # fragment usage |
19+
| `CREDENTIAL_KEYWORDS` | 10/ea | verify, confirm, login, etc. |
20+
| `SUSPICIOUS_PORT` | 25 | Ports 4444, 1337, 31337, etc. |
21+
| `LOOKALIKE_CHARS` | 35 | Mathematical/Cyrillic lookalikes |
22+
| `DOMAIN_AGE_SIMULATION` | 20 | Generated domain patterns |
23+
24+
#### BrandDatabase: 17 New Brands (52 total)
25+
26+
**Email Providers:** Gmail, Outlook, Yahoo, ProtonMail
27+
**Crypto (Hardware):** Kraken, Crypto.com, Ledger, Trezor
28+
**Government (US/UK):** IRS, SSA, HMRC, NHS
29+
**Tech/Fintech:** Uber, Lyft, Airbnb, Venmo, CashApp
30+
**Logistics:** UPS, USPS
31+
32+
#### Build Verification
33+
```bash
34+
./gradlew :common:test :webApp:jsBrowserDevelopmentWebpack
35+
# BUILD SUCCESSFUL in 1m 3s
36+
```
37+
738
## [1.18.10] - 2025-12-29
839

940
### 🔧 Threat Page: Engine Signals Integration

common/src/commonMain/kotlin/com/qrshield/engine/BrandDatabase.kt

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,171 @@ object BrandDatabase {
420420
homographs = listOf("disсord"), // Cyrillic 'с'
421421
combosquats = listOf("discord-nitro", "discord-gift", "discord-verify"),
422422
category = BrandCategory.ENTERTAINMENT
423+
),
424+
425+
// === EMAIL PROVIDERS ===
426+
427+
"gmail" to BrandConfig(
428+
officialDomains = setOf("gmail.com", "googlemail.com"),
429+
typosquats = listOf("gmai1", "gmall", "gmaill", "gmaiI"),
430+
homographs = listOf("gmаil"), // Cyrillic 'а'
431+
combosquats = listOf("gmail-login", "gmail-verify", "gmail-security", "gmail-support"),
432+
category = BrandCategory.TECHNOLOGY
433+
),
434+
435+
"outlook" to BrandConfig(
436+
officialDomains = setOf("outlook.com", "outlook.live.com", "hotmail.com"),
437+
typosquats = listOf("out1ook", "outloook", "outlok", "outl00k"),
438+
homographs = listOf("оutlook"), // Cyrillic 'о'
439+
combosquats = listOf("outlook-login", "outlook-verify", "outlook-support"),
440+
category = BrandCategory.TECHNOLOGY
441+
),
442+
443+
"yahoo" to BrandConfig(
444+
officialDomains = setOf("yahoo.com", "ymail.com"),
445+
typosquats = listOf("yah00", "yahho", "yahooo", "yaho"),
446+
homographs = listOf("yahоo"), // Cyrillic 'о'
447+
combosquats = listOf("yahoo-login", "yahoo-mail", "yahoo-verify"),
448+
category = BrandCategory.TECHNOLOGY
449+
),
450+
451+
"protonmail" to BrandConfig(
452+
officialDomains = setOf("proton.me", "protonmail.com"),
453+
typosquats = listOf("protonmai1", "protonmall", "protonmaiI"),
454+
homographs = listOf("prоtonmail"), // Cyrillic 'о'
455+
combosquats = listOf("protonmail-login", "proton-verify"),
456+
category = BrandCategory.TECHNOLOGY
457+
),
458+
459+
// === MORE CRYPTOCURRENCY ===
460+
461+
"kraken" to BrandConfig(
462+
officialDomains = setOf("kraken.com"),
463+
typosquats = listOf("krak3n", "krakken", "krken"),
464+
homographs = listOf("krakеn"), // Cyrillic 'е'
465+
combosquats = listOf("kraken-login", "kraken-verify", "kraken-withdraw"),
466+
category = BrandCategory.FINANCIAL
467+
),
468+
469+
"crypto" to BrandConfig(
470+
officialDomains = setOf("crypto.com"),
471+
typosquats = listOf("crypt0", "cryptto", "cryto"),
472+
homographs = listOf("сrypto"), // Cyrillic 'с'
473+
combosquats = listOf("crypto-login", "crypto-verify", "crypto-wallet"),
474+
category = BrandCategory.FINANCIAL
475+
),
476+
477+
"ledger" to BrandConfig(
478+
officialDomains = setOf("ledger.com"),
479+
typosquats = listOf("ledg3r", "ledqer", "ledgerr"),
480+
homographs = listOf("lеdger"), // Cyrillic 'е'
481+
combosquats = listOf("ledger-verify", "ledger-sync", "ledger-wallet", "ledger-live"),
482+
category = BrandCategory.FINANCIAL
483+
),
484+
485+
"trezor" to BrandConfig(
486+
officialDomains = setOf("trezor.io"),
487+
typosquats = listOf("trez0r", "tresor", "trezorr"),
488+
homographs = listOf("trеzor"), // Cyrillic 'е'
489+
combosquats = listOf("trezor-verify", "trezor-sync", "trezor-wallet"),
490+
category = BrandCategory.FINANCIAL
491+
),
492+
493+
// === US GOVERNMENT ===
494+
495+
"irs" to BrandConfig(
496+
officialDomains = setOf("irs.gov"),
497+
typosquats = listOf("1rs", "irss", "irs-gov"),
498+
homographs = listOf("іrs"), // Cyrillic 'і'
499+
combosquats = listOf("irs-refund", "irs-payment", "irs-verify", "irs-tax"),
500+
category = BrandCategory.GOVERNMENT
501+
),
502+
503+
"ssa" to BrandConfig(
504+
officialDomains = setOf("ssa.gov", "socialsecurity.gov"),
505+
typosquats = listOf("ss4", "sssa", "ssa-gov"),
506+
homographs = listOf("ssа"), // Cyrillic 'а'
507+
combosquats = listOf("ssa-login", "ssa-benefits", "ssa-verify"),
508+
category = BrandCategory.GOVERNMENT
509+
),
510+
511+
// === UK GOVERNMENT ===
512+
513+
"hmrc" to BrandConfig(
514+
officialDomains = setOf("gov.uk"),
515+
typosquats = listOf("hmrcc", "hrnrc", "hmr"),
516+
homographs = listOf("hmrс"), // Cyrillic 'с'
517+
combosquats = listOf("hmrc-refund", "hmrc-tax", "hmrc-login", "hmrc-verify"),
518+
category = BrandCategory.GOVERNMENT
519+
),
520+
521+
"nhs" to BrandConfig(
522+
officialDomains = setOf("nhs.uk"),
523+
typosquats = listOf("nhss", "nsh", "n-hs"),
524+
homographs = listOf("nhѕ"), // Cyrillic 'ѕ'
525+
combosquats = listOf("nhs-login", "nhs-vaccine", "nhs-appointment"),
526+
category = BrandCategory.GOVERNMENT
527+
),
528+
529+
// === MORE TECH ===
530+
531+
"uber" to BrandConfig(
532+
officialDomains = setOf("uber.com", "ubereats.com"),
533+
typosquats = listOf("ub3r", "uberr", "ubr"),
534+
homographs = listOf("ubеr"), // Cyrillic 'е'
535+
combosquats = listOf("uber-login", "uber-verify", "uber-ride"),
536+
category = BrandCategory.TECHNOLOGY
537+
),
538+
539+
"lyft" to BrandConfig(
540+
officialDomains = setOf("lyft.com"),
541+
typosquats = listOf("1yft", "lyyft", "lyf"),
542+
homographs = listOf("lуft"), // Cyrillic 'у'
543+
combosquats = listOf("lyft-login", "lyft-ride"),
544+
category = BrandCategory.TECHNOLOGY
545+
),
546+
547+
"airbnb" to BrandConfig(
548+
officialDomains = setOf("airbnb.com"),
549+
typosquats = listOf("a1rbnb", "airnbnb", "airbnbb"),
550+
homographs = listOf("аirbnb"), // Cyrillic 'а'
551+
combosquats = listOf("airbnb-login", "airbnb-verify", "airbnb-booking"),
552+
category = BrandCategory.TECHNOLOGY
553+
),
554+
555+
"venmo" to BrandConfig(
556+
officialDomains = setOf("venmo.com"),
557+
typosquats = listOf("vemno", "venm0", "venmoo"),
558+
homographs = listOf("vеnmo"), // Cyrillic 'е'
559+
combosquats = listOf("venmo-login", "venmo-verify", "venmo-payment"),
560+
category = BrandCategory.FINANCIAL
561+
),
562+
563+
"cashapp" to BrandConfig(
564+
officialDomains = setOf("cash.app"),
565+
typosquats = listOf("cashap", "cashappp", "c4shapp"),
566+
homographs = listOf("сashapp"), // Cyrillic 'с'
567+
combosquats = listOf("cashapp-login", "cashapp-verify", "cashapp-payment"),
568+
category = BrandCategory.FINANCIAL
569+
),
570+
571+
// === MORE LOGISTICS ===
572+
573+
"ups" to BrandConfig(
574+
officialDomains = setOf("ups.com"),
575+
typosquats = listOf("upss", "u-ps", "up5"),
576+
homographs = listOf("uрs"), // Cyrillic 'р'
577+
combosquats = listOf("ups-tracking", "ups-delivery", "ups-package"),
578+
category = BrandCategory.LOGISTICS
579+
),
580+
581+
"usps" to BrandConfig(
582+
officialDomains = setOf("usps.com"),
583+
typosquats = listOf("uspss", "u-sps", "usp5"),
584+
homographs = listOf("usрs"), // Cyrillic 'р'
585+
combosquats = listOf("usps-tracking", "usps-delivery", "usps-redelivery"),
586+
category = BrandCategory.LOGISTICS
423587
)
424588
)
425589
}
590+

0 commit comments

Comments
 (0)