Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

SafeSMS: On-Device Threat Detection with Gemma 4 E4B, no internet required

This is a submission for the Gemma 4 Challenge: Build with Gemma 4 What I Built SafeSMS is a privacy-first Android application designed to protect users from the rising threat of SMS-based scams, phishing, and…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

This is a submission for the Gemma 4 Challenge: Build with Gemma 4






What I Built



SafeSMS is a privacy-first Android application designed to protect users from the rising threat of SMS-based scams, phishing, and spam.



Traditional SMS scanners and spam filters often send your private text messages to the cloud for analysis, creating severe privacy concerns. SafeSMS takes a completely different approach: it brings the intelligence directly to the device.



By running a powerful, on-device AI model, it performs real-time threat detection locally on your phone. It monitors incoming messages, categorizes them (SAFE, SUSPICIOUS, or SCAM), provides a confidence score, and explains why a message is dangerous.



The app features a sleek dark-mode UI built with Jetpack Compose, including:




  • Live scanning “terminal” view

  • Detailed history logs

  • Visual analytics for inbox threat patterns









✨ Example Detection



Incoming SMS:




Your bank account will be blocked. Click immediately: http://bit.ly/xyz






SafeSMS Output:





  • Category: SCAM


  • Confidence: 92%


  • Reason:


    • Urgent language ("immediately")

    • Suspicious shortened URL

    • Impersonation of financial institution














Demo



[https://youtu.be/2NhvyiARX1c]









Code











How I Used Gemma 4



To enable real-time, completely private SMS analysis, SafeSMS uses Gemma 4 via LiteRT for on-device inference.






Model Selection: Gemma 4 E4B



I selected the E4B model because it perfectly fits mobile and edge environments:




  1. Absolute Privacy


    All SMS data stays on-device. No cloud calls, no data leakage.


  2. Zero Latency & Offline Capability


    Messages are analyzed instantly without any network dependency.


  3. Resource Efficiency


    The lightweight model runs efficiently inside a background Android service with minimal battery impact.



  4. Strong Reasoning in a Small Model


    Despite its compact size, the model effectively detects:




    • Phishing attempts

    • Social engineering patterns

    • Urgency-based scams











🧠 Prompting Strategy



The model is prompted using a structured classification + reasoning format, enabling it to return:




  • Label (SAFE / SUSPICIOUS / SCAM)

  • Confidence score

  • Explanation



This ensures both accuracy and transparency in predictions.









⚡ Performance





  • Inference Time: ~50–150 ms per SMS


  • Runs fully offline


  • Optimized for low battery usage


  • No network permissions required (privacy-first design)









🏗️ Architecture



SafeSMS follows a fully on-device architecture, ensuring privacy, speed, and reliability.






🔄 Flow Overview





  1. Incoming SMS




    • Captured via Android Broadcast Receiver




  2. Protection Service




    • Background service processes SMS in real time




  3. SafeSMS Model Controller




    • Handles preprocessing, inference, and routing




  4. On-Device AI Inference




    • Gemma 4 E4B via LiteRT

    • Classifies SMS into SAFE / SUSPICIOUS / SCAM




  5. Result Handling




    • Stored in local SQLite database

    • Sent instantly to UI




  6. User Interface (Jetpack Compose)




    • Live scan results

    • History and analytics dashboard











🧩 Architecture Components





  • SMS Layer: Broadcast Receiver


  • Processing Layer: Background Protection Service


  • AI Layer: LiteRT + Gemma 4


  • Data Layer: SQLite (local storage)


  • UI Layer: Jetpack Compose









🚀 Why This Architecture?




  • 🔒 Fully private (on-device processing only)

  • ⚡ Real-time detection with minimal latency

  • 📡 Works completely offline

  • 📊 Local analytics and history tracking

  • 🧠 Efficient AI optimized for mobile devices









🔮 Future Improvements




  • Multi-language scam detection

  • WhatsApp and email integration

  • Personalized scam pattern learning

  • Federated learning (privacy-preserving improvements)









🏁 Final Thoughts



SafeSMS demonstrates how powerful AI models like Gemma 4 can run entirely on-device, enabling real-world applications that are fast, private, and reliable.



It’s a step toward a future where user data never has to leave their device to stay safe.

1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Remote Code Execution (RCE) Defense
Syntax validiert (0 Fehler)
title: Detect Exploitation - SafeSMS: On-Device Threat Detection with Gemma 4 E4B, no internet required
id: 7f6df428-f84a-41eb-bd83-802d77bc5515
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-27
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
  - attack.t1566
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-27"
        description = "YARA Signature for "
    strings:
        $str = "SafeSMS: On-Device Threat Dete" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("SafeSMS On-Device Threat Detection with ")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*SafeSMS On-Device Threat Detection with *"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "SafeSMS On-Device Threat Detection with "
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

CTI Threat Relationship Graph5 Knoten / 4 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Analyse für identifizierte Bedrohung auf Basis von Live-CTI (ENISA EUVD): CVSS 0.0 · EPSS 0.0% · CISA KEV: nein. Handlungsableitung aus den verlinkten Hersteller-Quellen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten SafeSMS: On-Device Threat Detection with Gemma 4 E4B, no internet required

Thematisch verwandte Begriffe: SafeSMS, OnDevice, Threat, Detection · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-100739 | A vulnerability was detected in mathurvishal CloudClassroom-PHP-Project…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag