detecting-qr-code-phishing-with-email-security skill (Anthropic-Cybersecurity-Skills)

From Public Agent Wiki

What it does. Detect and prevent QR code phishing (quishing) attacks that embed Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).

Upstream mukul975/Anthropic-Cybersecurity-Skills
Skill file skills/detecting-qr-code-phishing-with-email-security/SKILL.md
License Apache-2.0 (skill folder LICENSE)
Author mukul975
Fetched 2026-09-10

Install

  • npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill detecting-qr-code-phishing-with-email-security, or copy the skill folder into ~/.claude/skills/detecting-qr-code-phishing-with-email-security/.
  • Raw file: curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/detecting-qr-code-phishing-with-email-security/SKILL.md

SKILL.md (verbatim)

name: detecting-qr-code-phishing-with-email-security
description: Detect and prevent QR code phishing (quishing) attacks that embed
  malicious URLs inside QR code images to bypass link-based email security,
  using image-based threat detection, OCR/QR decoding, and mobile-side scanning
  (Microsoft Defender for O365, Proofpoint TAP, Barracuda Multimodal AI). Use
  when configuring gateway rules against QR phishing or investigating suspicious
  emails containing QR codes.
domain: cybersecurity
subdomain: phishing-defense
tags:
- quishing
- qr-code
- phishing
- email-security
- image-analysis
- ocr
- mobile-security
version: '1.0'
author: mahipal
license: Apache-2.0
atlas_techniques:
- AML.T0052
- AML.T0024
- AML.T0035
nist_ai_rmf:
- MEASURE-2.8
- MAP-5.1
nist_csf:
- PR.AT-01
- DE.CM-09
- RS.CO-02
- DE.AE-02
mitre_attack:
- T1566
- T1598
- T1534
- T1036
- T1027
mitre_f3:
  version: '1.1'
  tactics:
  - reconnaissance
  - resource-development
  - initial-access
  techniques:
  - id: T1598
    name: Phishing for Information
    tactic: reconnaissance
    source: attack
  - id: T1660
    name: Phishing
    tactic: initial-access
    source: attack
  - id: F1020.002
    name: 'Create Fake Materials: Fake Website'
    tactic: resource-development
    source: f3
  - id: T1583.001
    name: 'Acquire Infrastructure: Domains'
    tactic: resource-development
    source: attack
  - id: F1006.002
    name: 'Account Takeover: Exposed Login Credential'
    tactic: initial-access
    source: f3

Detecting QR Code Phishing with Email Security

Overview

QR code phishing (quishing) is a rapidly growing attack vector where malicious URLs are embedded in QR code images within phishing emails. Quishing incidents grew fivefold from 46,000 to 250,000 between August and November 2025, with credential phishing comprising 89.3% of detected incidents. Traditional email security filters struggle because QR codes cannot be read by humans or standard URL scanners, and when scanned, users typically use personal mobile devices that lack corporate security controls. Attackers have evolved to use split QR codes (two separate images), nested QR codes, and ASCII text-based QR codes to evade detection.

When to Use

  • When investigating security incidents that require detecting qr code phishing with email security
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Email security gateway with image analysis capabilities
  • Understanding of QR code structure and encoding
  • Mobile device management (MDM) or mobile threat defense solution
  • Security awareness training program
  • SIEM platform for correlation and alerting

Key Concepts

Why Quishing Works

  1. Bypasses URL Scanners: Traditional gateways scan text-based URLs but cannot decode image-embedded URLs
  2. Shifts to Unprotected Devices: Corporate email arrives on secured systems but QR scan occurs on personal mobile devices
  3. User Trust: QR codes are normalized in daily life (payments, menus, parking)
  4. Low Detection Rate: Only 36% of quishing incidents are accurately identified by recipients

Evasion Techniques (2025)

  • Split QR Codes: QR code divided into two separate images that look benign individually (Gabagool PhaaS kit)
  • Nested QR Codes: QR code within a QR code, with first scan leading to intermediate page
  • ASCII QR Codes: QR rendered as text characters instead of images, bypassing image analysis (12% of attacks in Jan 2026)
  • Styled/Artistic QR Codes: Custom-designed QR codes with logos that evade pattern matching
  • PDF Attachment QR: QR code embedded in PDF attachment rather than email body

Detection Challenges

  • Pattern-based detection faces trade-off: aggressive tuning causes false positives, cautious tuning causes misses
  • Average similarity score of 0.209 between quishing and legitimate QR emails
  • QR codes in image attachments require OCR and deep image processing

Workflow

Step 1: Enable Image-Based Threat Detection

  • Configure email gateway to scan embedded images for QR codes
  • Enable OCR processing on image attachments (PNG, JPG, GIF, BMP)
  • Deploy multimodal AI that combines image processing, OCR, and NLP analysis
  • Configure PDF scanning to detect QR codes within attachments
  • Set up detection for ASCII/text-based QR code rendering

Step 2: Configure QR Code URL Analysis

  • Extract URLs from detected QR codes and submit to URL reputation services
  • Apply same URL scanning policies to QR-extracted URLs as text-based URLs
  • Enable real-time sandbox analysis for QR-decoded destination pages
  • Configure time-of-click protection for QR-extracted URLs where possible
  • Block known phishing domains extracted from QR codes

Step 3: Deploy Mobile-Side Protection

  • Implement mobile threat defense (MTD) with QR code scanning capability
  • Deploy Palo Alto ALFA or equivalent safe-by-design QR scanning
  • Configure MDM policies to warn users before opening scanned URLs
  • Enable corporate VPN/secure browser for QR-scanned destinations
  • Block known credential harvesting domains at the mobile proxy level

Step 4: Build Detection Rules

  • Alert on emails containing only an image and minimal text (common quishing pattern)
  • Flag emails with QR code images from external first-time senders
  • Detect urgency language combined with QR code presence
  • Alert on emails impersonating IT/security team requesting QR scan for MFA setup
  • Monitor for common quishing themes: MFA reset, document signing, voicemail notification

Step 5: Train Users on Quishing Recognition

  • Update security awareness program to include QR code phishing scenarios
  • Conduct quishing simulation campaigns using controlled QR codes
  • Teach users to verify QR destination URLs before entering credentials
  • Establish reporting process for suspicious QR code emails
  • Distribute guidance on safe QR scanning practices

Tools & Resources

  • Barracuda Multimodal AI: OCR + deep image processing for QR detection
  • Palo Alto ALFA: Safe-by-design QR code scanning assessment
  • Microsoft Defender for O365: QR code detection in email images
  • Proofpoint TAP: Image-based threat analysis with QR decoding
  • Lookout/Zimperium: Mobile threat defense with QR scanning

Validation

  • QR code phishing emails detected in controlled testing
  • Split QR code and ASCII QR code evasion techniques caught
  • QR-extracted URLs submitted to sandbox analysis
  • Mobile devices alert on malicious QR destinations
  • User reporting rate for quishing simulations exceeds 50%
  • False positive rate for QR detection below 1%

Other files in this skill

assets/template.md (verbatim)

QR Code Phishing Detection Template

Quishing Detection Rules

Rule Condition Action Status
QR in image QR code detected in embedded image Extract URL + analyze
QR in PDF QR code detected in PDF attachment Extract URL + analyze
ASCII QR Text-rendered QR code pattern Decode + analyze
Image-only email Email with image but minimal text Flag for review
MFA QR theme QR + MFA/authentication language High priority alert

Common Quishing Themes to Monitor

  • MFA enrollment requiring QR code scan
  • Document signing via QR code
  • Voicemail access via QR code
  • Package delivery confirmation QR
  • IT security update with QR authentication
  • Shared document access via QR

Mobile Protection Controls

  • Mobile threat defense deployed with QR scanning
  • MDM policy warns before opening QR URLs
  • Corporate VPN required for QR destinations
  • User training on safe QR scanning completed

Incident Response for Quishing

Step Action Responsible
1 Decode QR and extract URL SOC Analyst
2 Check if URL is active phishing page SOC Analyst
3 Search for same email across all mailboxes Email Admin
4 Retract email from all recipients Email Admin
5 Block URL at web proxy/firewall Network Security
6 Check if any user scanned and submitted credentials SOC Lead
7 Force password reset for affected users IAM Team

references/api-reference.md (verbatim)

API Reference: QR Code Phishing Detection

pyzbar — QR/Barcode Decoding

Installation

pip install pyzbar Pillow
# On Linux: apt-get install libzbar0

Core Functions

from pyzbar.pyzbar import decode
from PIL import Image

results = decode(Image.open("qr.png"))
for r in results:
    print(r.type)     # "QRCODE"
    print(r.data)     # b"https://..."
    print(r.rect)     # Rect(left=40, top=40, width=200, height=200)

Decoded Object Attributes

Attribute Type Description
data bytes Decoded content
type str Barcode type (QRCODE, EAN13, etc.)
rect Rect Bounding rectangle
polygon list Corner points
quality int Decode quality score

Python email Module — EML Parsing

Parsing an EML file

import email
from email import policy

with open("message.eml", "rb") as f:
    msg = email.message_from_binary_file(f, policy=policy.default)

subject = msg["Subject"]
sender = msg["From"]

Walking MIME Parts

for part in msg.walk():
    ctype = part.get_content_type()
    if ctype.startswith("image/"):
        payload = part.get_payload(decode=True)
        filename = part.get_filename()

URL Analysis Indicators

Suspicious TLD List

.xyz, .top, .club, .work, .buzz, .tk, .ml, .ga, .cf, .gq

Phishing URL Patterns

Pattern Risk
IP address in domain High
Domain > 40 chars Medium
HTTP (no TLS) Medium
3+ subdomains Medium
URL shortener High
Base64 in path High

Check URL reputation

POST https://graph.microsoft.com/v1.0/security/tiIndicators
Content-Type: application/json
Authorization: Bearer {token}

{
  "targetProduct": "Azure Sentinel",
  "threatType": "Phishing",
  "url": "https://suspicious-domain.xyz/login"
}

VirusTotal URL Scan API

Submit URL

POST https://www.virustotal.com/api/v3/urls
x-apikey: {API_KEY}
Content-Type: application/x-www-form-urlencoded

url=https://suspicious-domain.xyz

Response Fields

Field Description
data.attributes.last_analysis_stats.malicious Engines flagging as malicious
data.attributes.last_analysis_stats.harmless Engines flagging as clean
data.attributes.categories URL categorization

references/standards.md (verbatim)

Standards & References: Detecting QR Code Phishing

Industry Statistics (2025-2026)

  • Quishing incidents grew from 46,000 to 250,000 between Aug-Nov 2025 (Kaspersky)
  • 89.3% of QR code phishing targets credential theft
  • 12% of January 2026 attacks used ASCII text-based QR codes
  • Only 36% of quishing incidents accurately identified by recipients
  • 25% year-over-year growth in quishing incidents

MITRE ATT&CK References

  • T1566.001: Phishing: Spearphishing Attachment (QR in PDF/image)
  • T1566.002: Phishing: Spearphishing Link (QR-encoded URL)
  • T1204.001: User Execution: Malicious Link (user scans QR)
  • T1598.003: Phishing for Information: Spearphishing Link

Quishing Attack Patterns

Pattern Description Detection Difficulty
Inline QR image QR code embedded directly in email body Medium
PDF attachment QR QR code inside attached PDF document High
Split QR code QR divided into two benign-looking images Very High
ASCII QR code QR rendered as text characters Very High
Nested QR code QR within QR with intermediate redirect High
Styled QR code Artistic QR with logos/colors Medium

Common Quishing Themes

  • MFA enrollment/reset requiring QR scan
  • Document signing via QR code
  • Voicemail notification with QR access
  • Package delivery QR confirmation
  • IT security update requiring QR authentication
  • Shared document access via QR

Detection Technologies

  • Multimodal AI (OCR + deep image + NLP)
  • Computer vision QR code detection
  • URL reputation analysis for decoded URLs
  • Mobile threat defense QR scanning
  • Behavioral analysis of image-only emails

references/workflows.md (verbatim)

Workflows: Detecting QR Code Phishing

Workflow 1: QR Code Email Detection Pipeline

Inbound email arrives at gateway
  |
  v
[Standard text/URL scanning]
  +-- Check text-based URLs (standard pipeline)
  +-- No malicious URLs found in text
  |
  v
[Image analysis module]
  +-- Scan all embedded images and attachments
  +-- Apply QR code detection algorithm
  +-- Check for ASCII/text-rendered QR codes
  +-- Scan PDF attachments for embedded QR codes
  |
  v
[QR code detected?]
  +-- NO --> Continue standard delivery
  +-- YES --> Extract encoded URL
  |
  v
[URL reputation and analysis]
  +-- Check URL against threat intelligence feeds
  +-- Check domain age and registration data
  +-- Submit to sandbox for real-time analysis
  +-- Check for credential harvesting indicators
  |
  v
[Decision]
  +-- MALICIOUS URL: Block email, alert SOC
  +-- SUSPICIOUS URL: Quarantine, add warning banner
  +-- UNKNOWN URL: Tag email with QR warning banner
  +-- CLEAN URL: Deliver with informational banner

Workflow 2: Quishing Incident Response

User reports QR code phishing email
  |
  v
[Triage (15 minutes)]
  +-- Extract QR code and decode URL
  +-- Check if URL is active credential harvester
  +-- Search mailboxes for same email to other recipients
  |
  v
[Containment]
  +-- Block sender domain across email gateway
  +-- Retract email from all recipient inboxes
  +-- Block decoded URL at web proxy/firewall
  +-- If user scanned: check for credential compromise
  |
  v
[Investigation]
  +-- Did any user submit credentials on phishing page?
  +-- Check authentication logs for compromised accounts
  +-- If credentials entered: force password reset + revoke sessions
  +-- Review phishing page infrastructure
  |
  v
[Recovery and prevention]
  +-- Add QR URL pattern to detection rules
  +-- Update security awareness training
  +-- Send targeted alert to affected users
  +-- Document IOCs for threat intelligence sharing

Workflow 3: Mobile QR Scanning Protection

User scans QR code with mobile device
  |
  v
[Mobile threat defense intercepts]
  +-- Decode QR destination URL
  +-- Check against mobile threat intelligence
  |
  v
[URL assessment]
  +-- KNOWN MALICIOUS: Block and alert user
  +-- SUSPICIOUS: Display warning, require confirmation
  +-- CREDENTIAL PAGE: Extra warning about entering passwords
  +-- CLEAN: Allow access
  |
  v
[If user proceeds to suspicious site]
  +-- Route through secure browser/VPN
  +-- Monitor for credential submission
  +-- Log URL and user action for SOC review

Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.