Skip to navigation

Threat reportMalwareTL-2026-1281

Suspected AI-Generated ("Vibe-Coded") PowerShell Script Used to Map Active Directory Post-RDP Compromise

mediumACTIVE

A financially motivated threat actor used pre-compromised credentials to gain RDP access to a domain-joined Windows Server, then deployed a suspected AI-generated ("vibe-coded") PowerShell script, Untitled1.ps1, to enumerate Active Directory. The actor followed up roughly 30 minutes later with the legitimate tools s5cmd and SharpShares to enumerate and exfiltrate network share data as CSV/HTML/ZIP archives.

Key facts

IdentifiersTL-2026-1281
Also known asVibe-Coded AD Enumeration Incident, Untitled1.ps1 Intrusion
SeverityMEDIUM
Affected productsMicrosoft Windows Server (domain-joined, Active Directory); Microsoft Active Directory Domain Services
MalwareUntitled1.ps1 (vibe-coded AD enumeration script)
ToolsSharpShares, s5cmd
MITRE ATT&CK techniquesT1005 Data from Local System, T1010 Application Window Discovery, T1016 System Network Configuration Discovery, T1018 Remote System Discovery, T1027 Obfuscated Files or Information, T1041 Exfiltration Over C2 Channel, T1059 Command and Scripting Interpreter, T1078 Valid Accounts, T1082 System Information Discovery, T1087 Account Discovery, T1087.002 Domain Account, T1119 Automated Collection and 6 more in the attack flow
MotivationFINANCIAL
Target sectorsunspecified
Target regionsUnknown
Detection rules9 (1 shown free)
Sources10 cited sources

Detection coverage

As of 2026-07-13, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-1281 across Splunk SPL, Microsoft KQL and Sigma, covering 21 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: RDP Logon Followed by Immediate PowerShell AD Enumeration Script (Vibe-Coded Pattern)

Detects the exploitation/initial-access chain from the Huntress-documented incident: an RDP interactive logon (Event ID 4624, LogonType 10) on a domain-joined server followed within minutes by a PowerShell process spawning with AD-enumeration or DC-discovery indicators (nltest, Get-AD*, ActiveDirectory module import). Flags the abuse of valid/pre-compromised credentials via External Remote Services to reach the host and immediately begin scripted reconnaissance.

  • Languages: Splunk SPL, Microsoft KQL, Sigma
  • ATT&CK: T1078, T1133, T1059.001
  • Data sources: wineventlog:security, sysmon
  • Severity: high
  • Confidence: high

Splunk SPL

index=wineventlog sourcetype="WinEventLog:Security" EventCode=4624 Logon_Type=10
| eval logon_time=_time
| join type=inner TargetUserName max=0
    [ search index=wineventlog sourcetype="WinEventLog:Security" EventCode=4688 (New_Process_Name="*powershell.exe" OR New_Process_Name="*pwsh.exe")
      (CommandLine="*nltest*" OR CommandLine="*Get-AD*" OR CommandLine="*ActiveDirectory*" OR CommandLine="*AD_Reports*")
    | eval ps_time=_time | rename TargetUserName as TargetUserName ]
| where ps_time >= logon_time AND ps_time <= logon_time + 900
| table logon_time, ps_time, TargetUserName, Computer, Source_Network_Address, CommandLine
| sort - ps_time

Microsoft KQL

let rdpLogons = SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 4624 and LogonType == 10
| project logonTime=TimeGenerated, Account=TargetUserName, Computer, IpAddress;
let adRecon = DeviceProcessEvents
| where TimeGenerated > ago(24h)
| where FileName has_any ("powershell.exe", "pwsh.exe")
| where ProcessCommandLine has_any ("nltest", "Get-AD", "ActiveDirectory", "AD_Reports")
| project psTime=TimeGenerated, DeviceName, AccountName, ProcessCommandLine;
rdpLogons
| join kind=inner (adRecon) on $left.Computer == $right.DeviceName
| where psTime between (logonTime .. logonTime + 15m)
| project logonTime, psTime, Account, Computer, IpAddress, ProcessCommandLine

Sigma

title: RDP Logon Followed by PowerShell AD Enumeration Script
id: 6e1f4a2b-8c3d-4e5f-9a1b-2c3d4e5f6a7b
status: experimental
description: Detects an interactive RDP logon (Type 10) closely followed by a PowerShell process invoking AD-discovery commands (nltest, Get-AD*, ActiveDirectory module), consistent with pre-compromised credential abuse followed by rapid scripted AD reconnaissance.
references:
    - https://www.huntress.com/blog/ai-coded-malware-vibe-coding-active-directory
    - https://thehackernews.com/2026/07/attacker-uses-suspected-ai-generated.html
author: Threadlinqs Team
date: 2026-07-13
tags:
    - attack.initial_access
    - attack.t1078
    - attack.t1133
    - attack.execution
    - attack.t1059.001
    - attack.discovery
    - attack.t1087.002
logsource:
    product: windows
    category: process_creation
detection:
    selection_logon:
        EventID: 4624
        LogonType: 10
    selection_ps:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
        CommandLine|contains:
            - 'nltest'
            - 'Get-AD'
            - 'ActiveDirectory'
            - 'AD_Reports'
    timeframe: 15m
    condition: selection_logon and selection_ps
falsepositives:
    - Legitimate remote AD administration via RDP by domain admins performing routine audits
level: high

Known false positives:

  • Legitimate domain administrators performing scheduled AD health checks or audits immediately after RDP login

Tuning notes: Narrow the 15-minute join window if false positives arise from batch admin scripts; scope to servers with no legitimate RDP-based AD administration and cross-reference Source_Network_Address/IpAddress against known-admin subnets.

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)
  • Cascading Redundant Domain Controller Discovery Methods in a Single PowerShell Session · unlock with TL Creds
  • Unsigned/Unmanaged .NET Assembly (SharpShares-Style) Performing Domain-Wide SMB Share Enumeration · unlock with TL Creds
  • Delayed Secondary-Tooling Burst Following Initial PowerShell AD Enumeration (Correlation Rule) · unlock with TL Creds
  • AD Enumeration CSV/HTML/ZIP Artifact Creation Under ProgramData or AD_Reports Directory · unlock with TL Creds
  • Placeholder/Template Artifact Indicating Unreviewed AI-Generated PowerShell Script · unlock with TL Creds
  • RDP-Originated Session Staging Executables in [indicator] Prior to AD Recon and Exfil Tooling · unlock with TL Creds
  • High-Volume Sequential AD Object Enumeration and CSV Export from Single PowerShell Session · unlock with TL Creds
  • s5cmd.exe Execution from Non-Standard Path with S3 Sync/Cp to External Bucket · unlock with TL Creds

Indicators of compromise

As of 2026-07-13, Threadlinqs Intelligence tracks 21 indicators of compromise for TL-2026-1281.

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

Technical analysis

On June 3, 2026, Huntress incident responders identified an intrusion against a domain-joined Windows Server in which an unidentified, likely financially motivated threat actor used pre-compromised credentials to establish a Remote Desktop Protocol (RDP) session. After staging tools in C:\ProgramData, the actor deployed a PowerShell script named Untitled1.ps1 within minutes of gaining access. The script bore multiple hallmarks of AI/LLM ("vibe-coded") generation: an internal title of "100% Working AD Information Gathering Script - FULLY FIXED" consistent with iterative prompt refinement, an unedited placeholder hostname ("Server1.HR.local") left inside its Domain Controller discovery fallback logic, five redundant and cascading DC-discovery methods (DNS query, nltest, Active Directory PowerShell module, environment-variable inspection, and a hardcoded fallback) where one or two would normally suffice, heavily repetitive boilerplate try/catch error handling, and excessive, unnecessary colorized Write-Host console output (cyan, green, red, yellow).

The script systematically enumerated Active Directory users (in standard, email-enabled, and simplified formats), computers, groups, organizational units, domain trusts, and DNS-derived subnets, writing each category to CSV, generating an HTML summary report (AD_Report.html), and compressing all output into a timestamped ZIP archive under a directory named C:\AD_Reports_<datetime>. Approximately 30 minutes after the initial PowerShell-based enumeration, the actor deployed two additional, legitimate tools: s5cmd.exe (a high-performance, open-source Amazon S3 command-line utility, here abused for bulk exfiltration to attacker-controlled cloud storage rather than its intended AWS use case) and SharpShares.exe (an open-source, multithreaded C#/.NET assembly, github.com/mitchmoser/SharpShares, used to enumerate domain-accessible network shares and identify further data repositories for exfiltration).

Huntress researchers reconstructed the full script contents from Windows Event ID 4104 (PowerShell Script Block Logging) telemetry in the PowerShell Operational event log, since the script itself was deleted or otherwise unavailable for direct recovery, and noted that because the script was functionally unique to this intrusion, traditional hash- and signature-based antivirus detection was ineffective; detection instead relied on behavioral telemetry (sequential AD module calls, unusual CSV/ZIP creation in ProgramData, and abnormal PowerShell script-block volume). The case, publicly reported by Huntress and covered by The Hacker News, Cybersecurity News, Infosecurity Magazine, IT Security Guru, and Cyberpress on and around July 8, 2026, is notable not for a novel exploitation technique or CVE, but because it demonstrates that generative-AI/LLM assistance is measurably lowering the skill barrier and execution time for attackers to conduct competent Active Directory reconnaissance and share-based data theft, a trend separately highlighted in industry reporting on AI-enabled attacker speed and scale.

MITRE ATT&CK techniques by tactic:

Collection

T1005 Data from Local System; T1119 Automated Collection; T1560 Archive Collected Data

Discovery

T1010 Application Window Discovery; T1016 System Network Configuration Discovery; T1018 Remote System Discovery; T1082 System Information Discovery; T1087 Account Discovery; T1087.002 Domain Account; T1135 Network Share Discovery; T1482 Domain Trust Discovery

Defense Evasion

T1027 Obfuscated Files or Information

Exfiltration

T1041 Exfiltration Over C2 Channel; T1567 Exfiltration Over Web Service

Execution

T1059 Command and Scripting Interpreter

Initial Access

T1078 Valid Accounts; T1133 External Remote Services

Resource Development

T1587 Develop Capabilities

Remediation

Immediate actions

  • Hunt for PowerShell Event ID 4104 script-block logs containing repeated Active Directory module calls, nltest invocations, or CSV/HTML export logic within a short time window
  • Alert on creation of CSV, HTML, or ZIP files under C:\ProgramData or newly created C:\AD_Reports_<datetime> style directories
  • Flag execution of s5cmd.exe or any AWS CLI-style binary from non-standard install paths, especially with sync/cp arguments targeting external buckets
  • Flag execution of SharpShares.exe or any unsigned/unmanaged .NET assembly performing SMB share enumeration across the domain
  • Rotate and audit any RDP-exposed credentials, especially where RDP is reachable without MFA or jump-host brokering
  • Review RDP access logs for the affected Windows Server for anomalous logon times, source IPs, or geolocations

Workarounds

  • Disable or tightly restrict direct RDP exposure to domain-joined servers pending MFA/jump-host enforcement
  • Constrain PowerShell execution policy and enable AMSI/Constrained Language Mode on servers not requiring full scripting capability

Longer-term hardening

  • Shift detection engineering from static hash/signature rules to behavioral analytics for AD enumeration and mass file-export activity, since AI-generated scripts are functionally unique per-incident
  • Enforce MFA and/or RDP gateway/jump-host brokering for all remote administrative access to domain-joined servers
  • Deploy tiered administration and reduce standing domain-admin exposure on internet- or VPN-reachable RDP hosts
  • Enable and centrally forward PowerShell Script Block Logging (Event ID 4104) and Module Logging across all domain-joined hosts
  • Restrict outbound network access from servers to cloud storage endpoints (S3, Azure Blob, etc.) via egress filtering/allow-listing
  • Deploy EDR with behavioral detection tuned to AD reconnaissance patterns (bulk AD queries, share enumeration, mass CSV export) rather than static IOCs

Affected and fixed versions

  • Microsoft — Windows Server (domain-joined, Active Directory)
    Vulnerable versions: Any domain-joined Windows Server reachable via RDP with valid/compromised credentials
  • Microsoft — Active Directory Domain Services
    Vulnerable versions: Any on-premises Active Directory forest reachable from a compromised domain-joined host

Timeline

  • Harvested AD and share-enumeration data (CSV/HTML/ZIP artifacts) is exfiltrated using s5cmd, abusing its legitimate Amazon S3 bulk-transfer capability to move data to attacker-controlled cloud storage.
  • Approximately 30 minutes after the initial PowerShell enumeration, the actor deploys s5cmd.exe and SharpShares.exe to enumerate accessible network shares and identify further data repositories.
  • locked-ioc-10 exports enumerated AD data to multiple CSV files, generates an HTML summary report (locked-ioc-9), and compresses the output into a timestamped ZIP archive under locked-ioc-2.
  • Within minutes of RDP access, the actor executes the suspected AI-generated PowerShell script locked-ioc-10 to discover the Domain Controller and enumerate AD users, computers, groups, OUs, trusts, and subnets.
  • Threat actor establishes RDP session on a domain-joined Windows Server using pre-compromised credentials and stages tools in locked-ioc-7.
  • Sygnia publishes separate research emphasizing that AI-enabled attackers do not require novel malware or zero-days, but instead achieve intrusions at markedly greater speed and scale.
  • The Hacker News, Cybersecurity News, Infosecurity Magazine, IT Security Guru, and Cyberpress publish coverage of the Huntress findings.
  • Huntress publishes 'AI-Coded Malware: Analyzing Vibe-Coded AD Enumeration,' reconstructing the full script from PowerShell Event ID 4104 script-block logging telemetry and detailing the AI-generation indicators.

Sources cited

Previous and next in malware

Drafted by the Threadlinqs research pipeline from 10 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