Skip to main content
Mallory
← Back to News
ai-enabled-threat-activitycredential-access-methoddata-exfiltration-methodlateral-movement-method

AI-Generated PowerShell Script Used for Active Directory Enumeration

Emerging Technology Risk · 7 sources · Updated 4mo ago · First seen Jul 9, 2026

AI-Generated PowerShell Script Used for Active Directory Enumeration

An attacker used an apparently AI-generated PowerShell script to enumerate an Active Directory environment after gaining RDP access to a domain-joined Windows Server with pre-compromised credentials, according to Huntress. The script, recovered from PowerShell Operational Event ID 4104 logs as Untitled1.ps1, contained hallmarks of LLM-generated code, including the title "100% Working AD Information Gathering Script - FULLY FIXED," excessive fallback logic, colorful console output, and an unedited placeholder for a domain controller hostname.

After the reconnaissance phase, the intruder deployed s5cmd.exe, likely for data exfiltration, and later ran SharpShares.exe to identify accessible network shares while excluding common administrative shares. Huntress said the incident shows AI did not materially alter the attack chain but helped a lower-skill actor rapidly produce custom, single-use malware that is less likely to match known hashes or signatures, reinforcing the need for behavioral detection of AD enumeration and related host activity.

How do I know if I’m affected?

Start a thread with Mallory to assess this story against your environment.

Sign in to start a thread with Mallory

Why it matters

Impact assessment

This activity affects Windows enterprise environments that use Active Directory, especially organizations exposing RDP directly or through VPN and relying on credential-based remote administration. The immediate impact is elevated risk of rapid domain reconnaissance, discovery of accessible file shares, and follow-on data theft using legitimate tooling, with likely operational, financial, and reputational consequences if sensitive data is exfiltrated.

The scope is not tied to a software vulnerability or a single vendor product; it is a tradecraft pattern applicable across many AD-backed environments. There is a confirmed real-world intrusion observed by Huntress on June 3, 2026, and the key concern is that AI-assisted bespoke scripts reduce attacker effort while weakening hash- and signature-based defenses.

Affected populations

  • Organizations running domain-joined Windows Servers and Active Directory
  • Environments permitting RDP access to servers, including via VPN
  • Security teams relying heavily on static AV signatures or known-tool hashes
  • Enterprises with accessible SMB shares and sensitive data staged on user-reachable repositories

Severity and business consequences

  • High risk of data exposure after rapid internal discovery
  • Increased likelihood of successful reconnaissance by lower-skill actors using custom one-off tooling
  • Potential for broader compromise if AD mapping enables privilege escalation or lateral movement
  • Reputational and regulatory impact if exfiltrated data includes sensitive business or user information

Scope and exploitation status

  • Confirmed in-the-wild intrusion reported by Huntress
  • Likely broadly relevant across AD environments rather than narrowly targeted to one product
  • Represents an emerging operational trend: AI-assisted customization of otherwise conventional intrusion workflows
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

4 events · Jul 8, 2026 – Jul 13, 2026
  1. Jul 13, 20265mo ago

    Attacker archives AD data and exfiltrates it to a remote server

    After using the AI-generated PowerShell script and follow-on tools to enumerate Active Directory and accessible repositories, the attacker archived the CSV outputs and exfiltrated them to a remote server. The activity confirmed data theft beyond the earlier reconnaissance and tooling deployment stages.

    Attacker Uses Suspected AI-Generated PowerShell Script to Map Active Directory
  2. Jul 8, 20265mo ago

    Attacker runs SharpShares.exe to enumerate accessible shares

    Later in the intrusion, the threat actor used SharpShares.exe to identify accessible network shares while filtering out common administrative shares. The activity showed continued internal reconnaissance using additional tooling after the initial AD enumeration.

    AI-Coded Malware | Analyzing Vibe-Coded AD Enumeration | Huntress
  3. Jul 8, 20265mo ago

    Attacker deploys s5cmd.exe after reconnaissance

    Following the Active Directory reconnaissance phase, the attacker deployed s5cmd.exe, which Huntress assessed was likely used for data exfiltration. This marked an escalation from discovery activity to likely collection or transfer of data.

    AI-Coded Malware | Analyzing Vibe-Coded AD Enumeration | Huntress
  4. Jul 8, 20265mo ago

    Attacker uses AI-generated PowerShell for AD enumeration

    After gaining RDP access to a domain-joined Windows Server with pre-compromised credentials, a threat actor ran an AI-generated PowerShell script named Untitled1.ps1 to aggressively enumerate the Active Directory environment. Huntress said the script was recovered from PowerShell Operational Event ID 4104 telemetry and appeared to be LLM-generated based on its artifacts and structure.

    AI-Coded Malware | Analyzing Vibe-Coded AD Enumeration | Huntress
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Malware

1 linked

Affected products

2 linked
PowershellActive Directory
Do you run this?Follow how adversaries are adapting to this technology, and where it touches your stack today.
Track This Risk
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.