The Red Team Vade Mecum
  • The Red Team Vade Mecum
  • Techniques
    • Defense Evasion
      • Binary Properties and Code Signing
      • ATA/ATP
        • Important Note
        • Intro
        • Lateral Movement
        • Domain Dominance
        • Identification
        • Recon
        • Blocking/Disabling Telemetry
          • Trusted Installer
      • Tips and Tricks
      • Basics
        • IOCs
          • High Level Overview of EDR technologies
        • Sandbox Evasion
        • Obfuscating Imports
          • Bootstrapping
        • Encrypting Strings
      • Disabling/Patching Telemetry
        • ETW Bypasses
        • AMSI Bypasses
      • Minimization
        • Commands to Avoid
        • Pivoting
        • Benefits of Using APIs
        • Thread-less Payload Execution
        • DLL Hollowing
      • Misdirection
        • Command Line Argument Spoofing
        • PPID Spoofing via CreateProcess
        • Switching Parents
          • Dechaining via WMI
      • Hiding our Payloads
        • Event Logs
        • File metadata
        • Registry Keys
        • ADS
      • IPC For Evasion and Control
    • Privilege Escalation
      • Hunting For Passwords
      • To System
        • New Service
        • Named Pipe Impersonation
        • Local Exploits
        • AlwaysInstallElevated
      • Hijacking Execution
        • Environment Variable interception
        • DLL Hijacking
      • Insecure Permissions
        • Missing Services and Tasks
        • Misconfigured Registry Hives
        • Insecure Binary Path
        • Unquoted Service Paths
    • Enumeration
      • Situational Awareness
      • Recon Commands
        • .NET AD Enum commands
        • WMIC commands
          • WMI queries from c++
    • Execution
      • Cool ways of Calling a Process
      • One Liners
    • Initial Access
      • Tips and Tricks
      • Tools
      • Staging/Stagers
      • MS Office
        • Macros
          • Evasion
            • VBA Stomping
            • Revert To Legacy Warning in Excel
            • Sandbox Evasion
          • Info Extraction
          • Inline Shapes
          • .MAM Files
          • PowerPoint
          • ACCDE
          • Shellcode Execution
          • Info Extraction
          • Dechaining Macros
        • Field Abuse
        • DDE
      • Payload Delivery
      • File Formats
        • MSG
        • RTF
        • REG
        • BAT
        • MSI Files
        • IQY
        • CHM
        • LNK
          • Using LNK to Automatically Download Payloads
        • HTA
    • Lateral Movement
      • Linux
        • SSH Hijacking
        • RDP
        • Impacket
      • No Admin?
      • Checking for access
      • Poison Handler
      • WinRM
      • AT
      • PsExec
      • WMI
      • Service Control
      • DCOM
      • RDP
      • SCShell
    • Code Injection
      • Hooking
        • Detours
      • CreateRemoteThread
      • DLL Injection
      • APC Queue Code Injection
      • Early Bird Injection
    • Persistence
      • Scheduled Tasks
        • AT
      • MS Office
      • SQL
      • Admin Level
        • SSP
        • Services
        • Default File Extension
        • AppCert DLLs
        • Time Provider
        • Waitfor
        • WinLogon
        • Netsh Dlls
        • RDP Backdoors
        • AppInit Dlls
        • Port Monitor
        • WMI Event Subscriptions
      • User Level
        • LNK
        • Startup Folder
        • Junction folders
        • Registry Keys
        • Logon Scripts
        • Powershell Profiles
        • Screen Savers
  • Infrastructure
    • SQL
      • MS SQL
        • Basics
        • Finding Sql Servers
        • Privilege Escalation
        • Post Exploitation
  • Other
    • Vulnerability Discovery
      • Web Vulnerabilities
        • Code Grepping
          • PHP Cheatsheet
    • Windows Internals
      • Unorganized Notes
Powered by GitBook
On this page
  • Local Recon
  • Domain/Remote Recon

Was this helpful?

  1. Techniques
  2. Defense Evasion
  3. ATA/ATP

Recon

PreviousIdentificationNextBlocking/Disabling Telemetry

Last updated 3 years ago

Was this helpful?

Local Recon

Common host recon commands could trigger alerts if they are chained due to behavior analysis capabilities. Examples of these commands are:

WMI queries are not usually flagged, and logging for them is disabled by default. We can use wmic to issue WMI queries to get info about the host:

Host recon via direct windows APIs are usually not detected as this minimizes, an example of what we can do is this:

HANDLE hToken;
PTOKEN_USER userInfo;
DWORD Length = 0;
WCHAR username[1024] = { 0 };
WCHAR domain[1024] = { 0 };

ImpersonateSelf(SecurityDelegation);

OpenThreadToken(GetCurrentThread(), TOKEN_ALL_ACCESS, true, &hToken);

if (!GetTokenInformation(hToken, TokenUser, userInfo, 4096, &Length))
    return 0;

LookupAccountSid(NULL, userInfo->User.Sid, username, &Length, domain, &Length, ...

Domain/Remote Recon

DNS recon(fierce, nslookup etc.) as well as SAMR protocol recon like "net user /domain" will be caught to due the amount of traffic it sends to the DC(where ATA is running). It's also pretty abnormal for these commands to be ran by a regular user too.

We can subvert the detection of DNS recon by just limiting the amount of commands we run, but there are better and more efficient ways to gather info.

One way to get information about the domain, is to enumerate remotely by adding /NODE:"SERVER" to your wmic queries.

Ex.

wmic /NODE:"SERVER" /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get *

Using LDAP to gather AD info can reduce the likelihood of detection as this flagging this type of traffic would lead to a high number of false positives due to the fact that this is normal/common traffic.

Powerview, and Bloodhound(use ExcludeDC flag to avoid communication to DC to avoid being detected by ATA.) can all be used to achieve domain enumeration. In fact, as long as we just avoid communication with the DC, we can enumerate however we want because ATA has no telemetry over these communications.

Commands to AvoidThe Red Team Vade Mecum
WMIC commandsThe Red Team Vade Mecum
Logo
Logo