Skip to navigation

Threat reportMalwareTL-2026-1152

AI-"Vibe-Coded" PowerShell Script ("Untitled1.ps1") Used for Active Directory Enumeration and S3 Exfiltration via s5cmd/SharpShares

mediumACTIVE

Huntress observed a threat actor pivot via RDP with pre-compromised credentials, deploy an AI-generated ("vibe-coded") PowerShell script (Untitled1.ps1) to exhaustively enumerate Active Directory users, computers, groups, OUs, subnets, and trusts, then stage tools in C:\ProgramData\ and exfiltrate the collected data to Amazon S3 using the legitimate s5cmd.exe binary, alongside SharpShares.exe for network share enumeration.

Key facts

IdentifiersTL-2026-1152
Also known asUntitled1.ps1, AI-Coded AD Enumeration Incident, Vibe-Coded AD Malware
SeverityMEDIUM
Affected productsMicrosoft Active Directory Domain Services; Microsoft Windows Remote Desktop Protocol (RDP); Amazon Web Services Amazon S3
MITRE ATT&CK techniquesT1016 System Network Configuration Discovery, T1018 Remote System Discovery, T1021.001 Remote Desktop Protocol, T1027 Obfuscated Files or Information, T1030 Data Transfer Size Limits, T1033 System Owner/User Discovery, T1036.005 Match Legitimate Resource Name or Location, T1059.001 PowerShell, T1069.002 Domain Groups, T1070 Indicator Removal, T1074.001 Local Data Staging, T1078 Valid Accounts and 11 more in the attack flow
MotivationUNKNOWN
Target sectorscross-sector
Target regionsUnknown
Detection rules9 (1 shown free)
Sources9 cited sources

Detection coverage

As of 2026-07-09, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-1152 across Splunk SPL, Microsoft KQL and Sigma, covering 20 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.

Free detection: Bulk Active Directory Object Export to CSV via PowerShell

Detects PowerShell script-block activity exporting multiple AD object classes (users, computers, groups, OUs, subnets, trusts) to CSV in rapid succession, followed by a self-referential HTML summary report — the bulk-export/reporting signature of the Untitled1.ps1 AD reconnaissance tooling.

  • Languages: Splunk SPL, Microsoft KQL, Sigma
  • ATT&CK: T1087.002, T1069.002, T1482, T1119
  • Data sources: windows_powershell_operational_4104
  • Severity: high
  • Confidence: high

Splunk SPL

index=windows sourcetype="XmlWinEventLog:Microsoft-Windows-PowerShell/Operational" EventCode=4104
| eval sb=ScriptBlockText
| where like(sb, "%Export-Csv%") AND (like(sb, "%AD_Users%") OR like(sb, "%AD_Computers%") OR like(sb, "%AD_Groups%") OR like(sb, "%AD_OUs%") OR like(sb, "%AD_Trusts%"))
| bin _time span=5m
| stats dc(sb) as object_class_exports values(sb) as scriptblocks by Computer, _time
| where object_class_exports >= 2

Microsoft KQL

DeviceEvents
| where Timestamp > ago(24h)
| where ActionType == "ScriptBlockLogged"
| extend sb=tostring(AdditionalFields.ScriptBlockText)
| where sb has "Export-Csv" and (sb has "AD_Users" or sb has "AD_Computers" or sb has "AD_Groups" or sb has "AD_OUs" or sb has "AD_Trusts")
| summarize ExportCount=dcount(sb), Files=make_set(sb) by DeviceName, bin(Timestamp, 5m)
| where ExportCount >= 2

Sigma

title: Bulk Active Directory Object Export to CSV via PowerShell
id: 4c1e9a3e-1152-4a1a-9b2f-1152000001a2
status: experimental
description: Detects PowerShell exporting multiple AD object classes (users, computers, groups, OUs, trusts) to CSV within a short window, matching the Untitled1.ps1 bulk-collection pattern
references:
    - https://www.huntress.com/blog/ai-coded-malware-vibe-coding-active-directory
author: Threadlinqs Team
date: 2026-07-09
tags:
    - attack.collection
    - attack.t1119
    - attack.t1074.001
    - attack.t1087.002
logsource:
    product: windows
    category: ps_script
detection:
    selection:
        ScriptBlockText|contains: 'Export-Csv'
    selection_objects:
        ScriptBlockText|contains:
            - 'AD_Users'
            - 'AD_Computers'
            - 'AD_Groups'
            - 'AD_OUs'
            - 'AD_Trusts'
    condition: selection and selection_objects
falsepositives:
    - Scheduled AD reporting, compliance, or audit scripts run by IT staff
level: high

Known false positives:

  • Scheduled AD reporting, compliance, or audit scripts run by IT staff

Tuning notes: Correlate with a preceding RDP logon (T1021.001) from an unusual source to raise confidence and reduce false positives from legitimate IT audit tooling.

8 more detection rules (Splunk SPL, Microsoft KQL, Sigma) · unlock with TL Creds. Sign up free to unlock the detection rules or query them with the Threadlinqs MCP server (Purple)
  • AI-Generated PowerShell Stylistic Markers in Script Block Logging · unlock with TL Creds
  • SharpShares-Style Network Share Enumeration Filtering Administrative Shares · unlock with TL Creds
  • RDP Logon Immediately Preceding AD-Enumeration Script Execution · unlock with TL Creds
  • Timestamped AD_Reports Staging Directory Creation with HTML Success Report · unlock with TL Creds
  • Archive Compression of Freshly Created Reconnaissance Directory Preceding Cloud-CLI Execution · unlock with TL Creds
  • Unedited LLM Placeholder Value and Domain Trust Enumeration in PowerShell Script Block · unlock with TL Creds
  • Redundant Multi-Method DC Discovery in PowerShell Script Block · unlock with TL Creds
  • Cloud-Storage CLI Exfiltration from Non-Standard Staging Directory (s5cmd/rclone/aws) · unlock with TL Creds

Indicators of compromise

As of 2026-07-09, Threadlinqs Intelligence tracks 20 indicators of compromise for TL-2026-1152.

20 indicators of compromise · unlock with TL Creds. Compare plans

Technical analysis

On June 3, 2026, Huntress analysts Jevon Ang and Dray Agha identified and fully reconstructed a bespoke PowerShell script — internally titled "Untitled1.ps1" and self-labeled inside its own banner text as "100% Working AD Information Gathering Script - FULLY FIXED" — deployed by a threat actor who had gained RDP access to a victim environment using pre-compromised credentials (consistent with prior VPN/edge-device credential compromise).

The actor staged tooling directly in C:\ProgramData\, a common LOLBin/dual-use staging directory that blends with legitimate application data and frequently evades naive allow-list or reputation-based controls. Untitled1.ps1 was executed first and used a cascading, five-method fallback chain to identify the domain and the primary Domain Controller: DNS-based queries, nltest command invocation, the native ActiveDirectory PowerShell module, environment-variable inspection, and a hardcoded fallback value as a last resort. This degree of redundancy — attempting the same discovery goal five separate ways inside try/catch blocks — is atypical of human-authored tradecraft, where operators generally standardize on one or two proven methods to minimize noise and script size.

Once the DC was identified, the script systematically enumerated and exported the following AD objects to CSV inside a freshly created, timestamped directory (C:\AD_Reports_<datetime>): AD_Users.csv, AD_Computers.csv, AD_Groups.csv, AD_OUs.csv, AD_Subnets.csv, AD_Trusts.csv, AD_Users_With_Email.csv, AD_Simple_Users.csv, and DNS_Subnets.txt. The script then generated a self-referential HTML success report (AD_Report.html) summarizing the enumeration results, and finally compressed the entire output directory into a single archive for staged exfiltration.

Approximately thirty minutes after the AD enumeration completed, the actor deployed s5cmd.exe — a legitimate, high-performance, open-source command-line utility for interacting with Amazon S3 and S3-compatible object storage — into the same C:\ProgramData\ staging location and used it to transfer the compressed AD reconnaissance archive to an actor-controlled Amazon S3 bucket, entirely off traditional network egress channels that many organizations do not inspect or restrict (a technique previously documented by Huntress as a broader LOLBin exfiltration TTP and separately observed in Agenda/Qilin ransomware intrusions, where s5cmd was used to stage and exfiltrate data to cloud object storage ahead of encryption). In parallel, the actor ran SharpShares.exe, a publicly available multithreaded .NET share-enumeration assembly, deliberately filtering out common administrative shares ($C$, ADMIN$, IPC$) to instead surface user-facing and file-server share repositories more likely to contain sensitive data of value.

Huntress did not attribute the intrusion to any named actor or group, and no CVE, malware family, hash, domain, or IP indicator was published with the original advisory — the incident is notable purely for its tradecraft novelty: the first widely reported case of an intrusion using single-use, LLM ("vibe-coded") PowerShell tooling for full-spectrum AD reconnaissance. Huntress's SIEM detected the activity behaviorally, via Microsoft-Windows-PowerShell/Operational Event ID 4104 script-block logging, rather than through file-hash or static signature matching — the analysts explicitly noted the script "has never existed before and will likely never be compiled in this exact configuration again," making it fundamentally resistant to hash-based or YARA-style detection.

Multiple secondary indicators point to AI/LLM generation of the script rather than manual authorship: (1) the script's own title banner reads "100% Working AD Information Gathering Script - FULLY FIXED," language characteristic of iterative prompt-engineering and LLM self-correction cycles rather than deliberate human naming; (2) the script contains an unedited LLM placeholder value (an example/generic server name) that the operator failed to customize for the target environment, indicating low operator diligence or over-reliance on generated output; (3) redundant, over-engineered logic (five DC-discovery fallback methods where one or two would suffice) reflecting an LLM's tendency toward defensive/exhaustive code generation rather than efficient, minimal human coding style; (4) extensive cosmetic console output using colored Write-Host statements (cyan, green, red, yellow) for a non-interactive reconnaissance tool with no operational need for visual polish; and (5) unusually verbose, explanatory inline comments throughout the script, a hallmark of LLM code-generation output and atypical of hastily written offensive tooling.

This incident is significant for defenders because it demonstrates that generative-AI tooling has now measurably lowered the skill floor required to produce bespoke, evasive, single-use AD reconnaissance malware — a capability historically requiring PowerShell scripting proficiency. Huntress's core defensive recommendation is that signature and hash-based detection is structurally incapable of catching this class of threat, and that defenders must instead detect the underlying behavioral mechanics of AD enumeration (mass LDAP/ADSI queries, DC discovery chains, bulk CSV export of directory objects, and off-host cloud-storage-CLI network activity) rather than the surface syntax of any individual script.

MITRE ATT&CK techniques by tactic:

Discovery

T1016 System Network Configuration Discovery; T1018 Remote System Discovery; T1033 System Owner/User Discovery; T1069.002 Domain Groups; T1087 Account Discovery; T1087.002 Domain Account; T1135 Network Share Discovery; T1482 Domain Trust Discovery

Lateral Movement

T1021.001 Remote Desktop Protocol

Defense Evasion

T1027 Obfuscated Files or Information; T1036.005 Match Legitimate Resource Name or Location; T1070 Indicator Removal

Exfiltration

T1030 Data Transfer Size Limits; T1537 Transfer Data to Cloud Account; T1567.002 Exfiltration to Cloud Storage

Execution

T1059.001 PowerShell

Collection

T1074.001 Local Data Staging; T1119 Automated Collection; T1560.001 Archive via Utility

Initial Access

T1078 Valid Accounts; T1133 External Remote Services

Credential Access

T1552 Unsecured Credentials

Resource Development

T1588.002 Tool

Remediation

Immediate actions

  • Enable and centrally collect PowerShell Script Block Logging (Event ID 4104) and Module Logging across all endpoints and domain controllers
  • Audit and restrict RDP access to domain controllers and hypervisors to jump-hosts/PAWs only, enforcing MFA on all remote-access paths
  • Block or tightly control outbound network access to *.amazonaws.com and other cloud object-storage endpoints from endpoints that are not designated data-transfer hosts
  • Alert on execution of s5cmd.exe, aws.exe, rclone.exe, and other cloud-storage CLI utilities from non-standard directories such as C:\ProgramData\
  • Alert on process execution of files matching *sharpshares.exe or other share-enumeration tool signatures
  • Rotate and audit all VPN/remote-access credentials suspected of prior compromise

Workarounds

  • Restrict PowerShell execution policy and Constrained Language Mode on endpoints not requiring administrative scripting
  • Deploy honeytoken AD accounts/objects to detect bulk enumeration activity

Longer-term hardening

  • Deploy EDR/behavioral analytics tuned to detect AD enumeration patterns (mass LDAP queries, bulk CSV export of directory objects, DC discovery chains) independent of script hash or filename
  • Implement application allow-listing (WDAC/AppLocker) restricting execution of unsigned or unapproved binaries from C:\ProgramData\ and other writable staging directories
  • Deploy network egress monitoring/DLP capable of inspecting and alerting on large outbound transfers to cloud object storage APIs
  • Establish a threat-hunting program specifically oriented around behavioral AD reconnaissance patterns rather than static IOC matching, given the rise of single-use LLM-generated tooling
  • Harden and monitor VPN/edge devices, the most common initial-access vector preceding this class of intrusion

Affected and fixed versions

  • Microsoft — Active Directory Domain Services
    Vulnerable versions: All supported versions
    Fixed in: Not applicable (tradecraft/behavioral technique, not a software vulnerability)
  • Microsoft — Windows Remote Desktop Protocol (RDP)
    Vulnerable versions: All supported versions
    Fixed in: Not applicable (abused legitimate access via compromised credentials)
  • Amazon Web Services — Amazon S3
    Vulnerable versions: Not applicable — abused as legitimate exfiltration destination
    Fixed in: Not applicable

Timeline

  • Huntress analysts Jevon Ang and Dray Agha fully reconstruct locked-ioc-11 from captured Event ID 4104 script-block telemetry for analysis
  • Huntress SIEM detects the activity behaviorally via Microsoft-Windows-PowerShell/Operational Event ID 4104 script-block logging telemetry, rather than via file-hash or static signature matching
  • Actor uses locked-ioc-16 to exfiltrate the compressed AD reconnaissance archive to an actor-controlled Amazon S3 bucket
  • Approximately 30 minutes after AD enumeration, actor deploys locked-ioc-16 into C:\ProgramData\ for Amazon S3 interaction
  • locked-ioc-7 executed to enumerate accessible network shares, deliberately filtering out common administrative shares
  • Script generates locked-ioc-9 as a self-referential success/summary report and compresses the full output directory into an archive
  • Script enumerates AD users, computers, groups, OUs, subnets, and trusts, exporting each object class to CSV inside a new timestamped directory C:\AD_Reports_<datetime>
  • locked-ioc-11 executed; script runs a five-method fallback chain (DNS, nltest, ActiveDirectory module, environment variables, hardcoded value) to identify the domain and primary Domain Controller
  • Actor stages locked-ioc-11 and supporting tooling in C:\ProgramData\ on the compromised host
  • Threat actor establishes RDP access to victim environment using pre-compromised credentials, likely originating from prior VPN/edge-device compromise
  • Incident receives broad security-media coverage (IT Security Guru, CyberPress, Infosecurity Magazine) as an early public example of AI/LLM-generated intrusion tooling
  • Huntress publishes public blog analysis "AI-Coded Malware | Analyzing Vibe-Coded AD Enumeration" disclosing the incident, script characteristics, and AI-generation indicators

Sources cited

Previous and next in malware

Drafted by the Threadlinqs research pipeline from 9 sources; published ; last updated —.

Threadlinqs Intelligence — Real-Time Threat Detection Platform

// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level

Latest Threats