cd /news/developer-tools/cracking-wmi-exec-in-rust-by-turning… · home topics developer-tools article
[ARTICLE · art-84335] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Cracking WMI-exec in Rust by turning impacket into a byte-level oracle

A developer building ADhammer, an Active Directory audit toolkit in Rust, implemented wmiexec from scratch by using impacket as a byte-level debugging oracle. The project, built with Claude Code, involves a from-scratch DCE/RPC, NTLM, SMB2, and Kerberos stack, and the developer diffed wire bytes against a real domain controller until they matched byte-for-byte.

read1 min views1 publishedAug 3, 2026

How I implemented wmiexec from scratch in Rust — DCOM activation, OXID resolution, and MS-WMIO object marshaling — by using impacket not as a library but as a debugging oracle, and diffing my wire bytes against it until a Windows DC accepted them byte-for-byte.

This is a build log from ADhammer, an Active Directory audit + validation toolkit I'm writing in Rust on a from-scratch DCE/RPC · NTLM · SMB2 · Kerberos stack (think "impacket for Rust"). The whole project is built with Claude Code, and this post is the single best example of what that actually looks like — not autocomplete, but a tight loop of hypothesis → capture live traffic → diff → fix against a real domain controller.

The goal: wmiexec, from scratch

wmiexec is the classic "quiet" remote-code-execution technique: instead of creating a service (psexec/SVCCTL) or a scheduled task (atexec), you talk to WMI over DCOM and call Win32_Process.Create. No service-install event, different host telemetry.

Under the hood it's three stages, each a different flavour of pain:

── more in #developer-tools 4 stories · sorted by recency
── more on @adhammer 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/cracking-wmi-exec-in…] indexed:0 read:1min 2026-08-03 ·