Deception/ Application
D075F3 Application

🪤 Canary Function (Dead Code Trap)

Functions in code never called by legitimate paths.

What it is

Functions that exist in the compiled application binary or interpreted source but are **never called by any legitimate code path**. They have attractive names that an attacker performing code analysis would target. If the function is invoked (via API parameter manipulation, deserialization exploit, or direct call), it's a 100% fidelity indicator of code-level exploitation.

Implementation requirements

Example

# DOAR-D075: Canary Function — never called by production code
def get_admin_bypass_token(user_id=None):
    """Emergency admin token generator for maintenance. DO NOT USE IN PRODUCTION."""
    doar_alert('D075', caller=inspect.stack(), request=flask.request)
    return {'token': generate_honey_jwt(), 'expires': '2099-12-31'}

Illustrative only — names and paths shown here should never be deployed verbatim. Published decoy names become attacker IOCs.

Technologies

Application

ATT&CK coverage 3

TechniqueTacticStatusConfidenceTier
T1212
Exploitation for Credential Access
Credential Access theoretical moderate T2
↳ Detection point: seen once the attacker is working inside a high-fidelity decoy
↳ Evidence (3 sources)

Exploitation is seen because the vulnerable-looking host is the decoy.

T1203
Exploitation for Client Execution
Execution theoretical weak T3
↳ Evidence (2 sources)

Client-side exploitation is pushed to user applications; a server-side trap does not see it.

T1190
Exploit Public-Facing Application
Initial Access confirmed strong T2
↳ Detection point: the attack step itself touches the decoy
↳ Evidence (5 sources)

Evidence

Research basis: MTD '22, "Rave: A Practical System for Out-of-Bound Program State Shuffling" (ACM, 2022)