# codexui-android npm Supply Chain Attack — OpenAI Codex Auth Token Theft via sentry.anyclaw[.]store (friuns2 / BrutalStrike)

> The npm package codexui-android (27,000-29,000 weekly downloads), a remote web UI for OpenAI Codex by maintainer 'friuns'/'friuns2' (Igor Levochkin), was trojanized. From version 0.1.82, dist-cli/index.js reads ~/.codex/auth.json on module load, XOR-encrypts it with key 'anyclaw2026', base64-encodes it, and POSTs the full OAuth blob (access_token, refresh_token, id_token, account_id) to sentry.anyclaw[.]store/startlog. Because the Codex refresh_token does not expire, the attacker gains persistent, silent account impersonation. The same actor ships Android apps (50,000+ installs) that drag the unpinned malicious npm build onto devices via a Termux/PRoot Node.js userland.

- **Published:** 2026-06-01T00:00:00Z
- **Last reviewed:** 2026-06-01T00:00:00Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-0641
- **Card image:** https://intel.threadlinqs.com/og/threat/threat-intel-codexui-android-token-theft-tl-2026-0641.webp?v=20e10ddf (Threadlinqs threat intel: codexui-android npm Codex Token Theft: Detection & IOCs (TL-2026-0641) — High severity, 17 IOCs, 9 detection rules.)
- **ID:** TL-2026-0641
- **Severity:** HIGH
- **Category:** SUPPLY_CHAIN
- **Status:** ACTIVE
- **Actor:** BrutalStrike
- **Detections:** 9 (1 shown free below) · **IOCs:** 17 (2 shown free below)

## Description

codexui-android is an npm package providing a remote web/Android UI for OpenAI Codex, published by maintainer 'friuns' (also 'friuns2', identified as Igor Levochkin; GitHub/Play Store developer alias 'BrutalStrike'). The package first appeared as version 0.1.72 on 2026-04-10 and accumulated 27,000-29,000 weekly downloads. Approximately one month after initial release, beginning with version 0.1.82, the maintainer introduced credential-stealing code into the npm distribution only — the malicious logic is absent from the public GitHub repository (friuns2/codex-mobile), present exclusively in the published npm tarball's compiled dist-cli output.

The malicious behavior triggers at module load with zero user interaction. The CLI entrypoint dist-cli/index.js begins with `import "./chunk-PUR7OUAG.js";`, which fires before any application logic. That chunk reads the OpenAI Codex credential file at ~/.codex/auth.json (honoring the $CODEX_HOME environment variable when set). The full authentication JSON — containing access_token, refresh_token, id_token, and the account identifier — is XOR-encrypted with the hardcoded ASCII key 'anyclaw2026', then base64-encoded, and exfiltrated via an HTTPS POST to https://sentry.anyclaw[.]store/startlog. The request carries a User-Agent header of the form `codexui/{package_version}`. All errors are silently suppressed so the theft is invisible to the user. The exfiltration domain is deliberately named to masquerade as legitimate Sentry telemetry traffic, reducing the chance of analyst or proxy suspicion.

The stolen refresh_token is the critical asset: OpenAI Codex refresh tokens do not expire, so a single capture grants the attacker indefinite, silent impersonation of the victim's Codex/OpenAI account — including the ability to mint fresh access tokens, consume the victim's API quota/billing, and read code and prompts sent to Codex.

Delivery is multi-platform. The actor's Android app 'OpenClaw Codex Claude AI Agent' (package id gptos.intelligence.assistant, 50,000+ installs, ~26 MB) extracts a Termux-derived Linux userland and runs Node.js under a PRoot sandbox, then executes `pnpm add codexui-android@latest` with no version pinning — so every install/update silently pulls the trojanized build. The in-app Codex sign-in writes auth.json inside that sandbox; the package then reads it back out and exfiltrates it. A second paid app, 'Codex' (package id codex.app, 10,000+ installs), ships the identical exfiltration chain, uses the Kotlin namespace app.anyclaw.*, and registers the OAuth callback scheme anyclaw://auth/codex-callback.

The controlling domain anyclaw[.]store was registered on 2026-04-12, just two days after the first package version and weeks before the malicious code shipped — undermining the maintainer's later claim that the npm account had been compromised by a third party. Aikido Security discovered and publicly disclosed the campaign on 2026-05-27; the following day the author claimed in a GitHub issue (friuns2/codex-mobile #198) to have lost npm account access, a response later edited/deleted. The Hacker News and multiple outlets reported the campaign on 2026-06-01. At time of reporting the malicious package versions remained live on npm. This is classified as malware/supply-chain compromise rather than a CVE-class vulnerability; no CVE is assigned.

## MITRE ATT&CK

- T1583 Acquire Infrastructure
- T1586 Compromise Accounts
- T1608 Stage Capabilities
- T1587 Develop Capabilities
- T1195 Supply Chain Compromise
- T1059 Command and Scripting Interpreter
- T1204 User Execution
- T1027 Obfuscated Files or Information
- T1036 Masquerading
- T1685 Disable or Modify Tools
- T1528 Steal Application Access Token
- T1552 Unsecured Credentials
- T1005 Data from Local System
- T1560 Archive Collected Data
- T1071 Application Layer Protocol
- T1573 Encrypted Channel
- T1041 Exfiltration Over C2 Channel

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**codexui-android Token Stealer — C2/Exfiltration (SPL)** (`TL-2026-0641-SPL-003`)

Detects the command-and-control/exfiltration phase of TL-2026-0641: the outbound HTTPS POST of the stolen, XOR+base64-encoded auth.json to the /startlog endpoint on *.anyclaw.store, and/or any request carrying the distinctive codexui/{version} User-Agent (a Sentry-telemetry masquerade fronted by Cloudflare).

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1071.001, T1041, T1036.005, T1573.001
- **Data sources:** proxy, zeek, edr, dns
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

```spl
index=proxy (sourcetype="squid:access" OR sourcetype="pan:traffic" OR sourcetype="zscalernss-web" OR sourcetype="bluecoat:proxysg:access:syslog" OR sourcetype="stream:http") (dest_host="*.anyclaw.store" OR dest_host="anyclaw.store" OR url="*anyclaw.store*" OR http_user_agent="codexui/*" OR uri_path="/startlog") | stats count min(_time) AS firstTime max(_time) AS lastTime values(url) AS urls values(http_user_agent) AS user_agents values(http_method) AS methods by src_ip dest_host | where (like(user_agents,"codexui/%") OR like(urls,"%anyclaw.store%")) | sort - count
```

### Microsoft KQL

```kql
DeviceNetworkEvents
| where Timestamp > ago(7d)
| where RemoteUrl has "anyclaw.store" or RemoteUrl endswith "/startlog"
| where InitiatingProcessFileName in~ ("node.exe","node","pnpm.exe","python.exe","powershell.exe","curl.exe")
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteUrl, RemoteIP, RemotePort
| order by Timestamp desc
```

### Sigma

```yaml
title: anyclaw Codex Token Exfiltration — sentry.anyclaw.store/startlog
id: a1f0c641-1003-4e21-9b51-0a1b2c3d4e03
status: experimental
description: Detects the credential exfiltration HTTPS POST of TL-2026-0641 — an outbound request to the /startlog endpoint on *.anyclaw.store and/or a request bearing the distinctive codexui/{version} User-Agent (Sentry-telemetry masquerade fronted by Cloudflare).
references:
    - https://www.aikido.dev/blog/codex-remote-ui-steals-ai-tokens
    - https://thehackernews.com/2026/06/openai-codex-authentication-tokens.html
author: Threadlinqs Team
date: 2026/06/01
tags:
    - attack.command_and_control
    - attack.t1071.001
    - attack.exfiltration
    - attack.t1041
    - attack.defense_evasion
    - attack.t1036.005
    - attack.t1573.001
logsource:
    category: proxy
detection:
    selection_host:
        cs-host|endswith: 'anyclaw.store'
    selection_uri:
        c-uri|contains: '/startlog'
    selection_ua:
        cs-User-Agent|startswith: 'codexui/'
    condition: (selection_host and selection_uri) or selection_ua
falsepositives:
    - None expected; anyclaw.store is attacker-controlled and the codexui/ User-Agent is unique to the malware
level: critical
```

**Known false positives:**

- None expected — anyclaw.store is attacker-controlled and the codexui/ User-Agent is unique to the malware

**Tuning notes:** 172.64.80.1 is a shared Cloudflare anycast IP fronting the domain — match on hostname/SNI and the User-Agent, NOT the IP, to avoid blocking unrelated Cloudflare-hosted sites. Add *.anyclaw.store to DNS/proxy egress blocklists and alert on first-seen resolution of the domain.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- [indicator] Token Stealer — Exploitation (KQL) (locked: unlock with TL Creds)
- [indicator] Token Stealer — Post-Exploitation (KQL) (locked: unlock with TL Creds)
- [indicator] Token Stealer — C2/Exfiltration (KQL) (locked: unlock with TL Creds)
- [indicator] Token Stealer — Exploitation (SIG) (locked: unlock with TL Creds)
- [indicator] Token Stealer — Post-Exploitation (SIG) (locked: unlock with TL Creds)
- [indicator] Token Stealer — C2/Exfiltration (SIG) (locked: unlock with TL Creds)
- [indicator] Token Stealer — Exploitation (SPL) (locked: unlock with TL Creds)
- [indicator] Token Stealer — Post-Exploitation (SPL) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (2 of 17)

Defanged, TLP:CLEAR.

- IP address: `172.64.80[.]1`
- Domain: `anyclaw[.]store`

Full set of 17 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [Legitimate-Looking Codex Remote UI Secretly Steals Your AI Tokens](https://www.aikido.dev/blog/codex-remote-ui-steals-ai-tokens)
- [OpenAI Codex Authentication Tokens Stolen in codexui-android npm Supply Chain Attack](https://thehackernews.com/2026/06/openai-codex-authentication-tokens.html)
- [Credential exfiltration code found in published npm package (Issue #198)](https://github.com/friuns2/codex-mobile/issues/198)
- [27,000-Download Codex UI Tool Secretly Stole OpenAI Refresh Tokens](https://hackread.com/codex-ui-tool-secretly-stole-openai-refresh-tokens/)
- [Hackers caught hiding OpenAI token-stealing malware in Codex npm package](https://cybernews.com/security/openai-codex-tool-malware-token-theft/)
- [Legitimate-Looking Codex Remote UI Steals OpenAI Codex Authentication Tokens](https://cybersecuritynews.com/legitimate-looking-codex-remote-ui/)
- [Fake Codex Remote UI Steals OpenAI Auth Tokens](https://gbhackers.com/fake-codex-remote-ui-steals-openai/)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-0641
