T1070.007 Google Chronicle · YARA-L

Detect Clear Network Connection History and Configurations in Google Chronicle

Adversaries may clear or remove evidence of malicious network connections in order to clean up traces of their operations. Configuration settings as well as various artifacts that highlight connection history may be created on a system and/or in application logs from behaviors that require network connections, such as Remote Services or External Remote Services. Network connection history may be stored in Windows Registry values under HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default and Servers, in files such as Default.rdp and RDP cache files, or in system logs on macOS and Linux. Adversaries may delete or modify this data to conceal indicators and impede defensive analysis.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1070 Indicator Removal
Sub-technique
T1070.007 Clear Network Connection History and Configurations
Canonical reference
https://attack.mitre.org/techniques/T1070/007/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule t1070_007_clear_network_connection_history {
  meta:
    author = "Argus Detection Engineering"
    description = "Detects T1070.007 - Adversary clearing of RDP connection history via registry deletion, RDP file removal, or CLI-based network config erasure commands"
    mitre_attack_technique = "T1070.007"
    mitre_attack_tactic = "Defense Evasion"
    mitre_attack_subtechnique = "Clear Network Connection History and Configurations"
    severity = "HIGH"
    confidence = "HIGH"
    version = "1.0"
    created = "2024-01-01"

  events:
    (
      // Detection 1: RDP Registry History Deletion
      (
        $e.metadata.event_type = "REGISTRY_MODIFICATION" and
        (
          re.regex($e.target.registry.registry_key,
            `(?i)Software\\Microsoft\\Terminal Server Client\\(Default|Servers)`) or
          re.regex($e.target.registry.registry_key,
            `(?i)Terminal Server Client\\(Default|Servers)`)
        )
      ) or
      // Detection 2: RDP File History Deletion
      (
        $e.metadata.event_type = "FILE_DELETION" and
        (
          re.regex($e.target.file.full_path, `(?i)Default\.rdp`) or
          re.regex($e.target.file.full_path, `(?i)Terminal Server Client.Cache`)
        )
      ) or
      // Detection 3: CLI Network History Cleanup via process execution
      (
        $e.metadata.event_type = "PROCESS_LAUNCH" and
        (
          re.regex($e.target.process.command_line,
            `(?i)netsh\s+(wlan\s+delete|advfirewall\s+reset|int\s+ip\s+reset|interface\s+ip\s+reset)`) or
          re.regex($e.target.process.command_line,
            `(?i)(Clear-DnsClientCache|ipconfig\s+/flushdns|dnscmd\s+/clearcache)`) or
          re.regex($e.target.process.command_line, `(?i)arp\s+-d`) or
          re.regex($e.target.process.command_line, `(?i)route\s+delete`) or
          re.regex($e.target.process.command_line,
            `(?i)(del|Remove-Item|erase|reg\s+delete).*(Terminal Server Client|Default\.rdp)`)
        )
      )
    )

  condition:
    $e
}
high severity high confidence

Google Chronicle YARA-L 2.0 rule detecting T1070.007 across three UDM event types: REGISTRY_MODIFICATION events targeting Terminal Server Client registry paths (RDP connection history), FILE_DELETION events for Default.rdp and RDP cache artifacts, and PROCESS_LAUNCH events where the command line contains network state erasure commands including netsh resets, arp -d, route delete, and DNS cache flushing.

Data Sources

Google Chronicle SIEM (UDM events)Microsoft Windows Sysmon (via Chronicle Forwarder)Windows Security Events (via Chronicle Forwarder)Elastic Endpoint Security events forwarded to Chronicle

Required Tables

UDM Events (REGISTRY_MODIFICATION)UDM Events (FILE_DELETION)UDM Events (PROCESS_LAUNCH)

False Positives & Tuning

  • Group Policy Objects or Intune configuration profiles that enforce removal of RDP connection history across managed devices as part of organizational hardening standards
  • IT help desk technicians flushing DNS resolver cache and resetting IP configurations on endpoints as part of standard network troubleshooting procedures
  • Enterprise VPN clients (Cisco AnyConnect, GlobalProtect) programmatically modifying routing tables via route delete commands during connection and disconnection lifecycle events
Download portable Sigma rule (.yml)

Other platforms for T1070.007


Testing Methodology

Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Delete RDP Connection History from Registry

    Expected signal: Sysmon Event ID 12 (RegistryEvent - Object Delete): TargetObject will contain 'Software\Microsoft\Terminal Server Client\Default' and 'Software\Microsoft\Terminal Server Client\Servers'. Sysmon Event ID 1 (Process Create): reg.exe with CommandLine containing 'reg delete' and 'Terminal Server Client'. Security Event ID 4688 (if command line auditing enabled) showing the reg.exe execution.

  2. Test 2Delete Default RDP Connection File

    Expected signal: Sysmon Event ID 11 (File Create): TargetFilename will show the creation of Default.rdp. Sysmon Event ID 23 (File Delete, if enabled): TargetFilename will show the deletion of Default.rdp. Sysmon Event ID 1 (Process Create): cmd.exe with CommandLine containing 'del' and 'Default.rdp'.

  3. Test 3Clear DNS Client Cache to Remove Connection Evidence

    Expected signal: Sysmon Event ID 1 (Process Create): ipconfig.exe with CommandLine 'ipconfig /flushdns'. Security Event ID 4688 (if command line auditing enabled) with same data. Note: this is a common operation so additional context (time of day, parent process, user account) is needed to distinguish malicious use.

  4. Test 4Reset Windows Firewall Configuration via Netsh

    Expected signal: Sysmon Event ID 1 (Process Create): netsh.exe with CommandLine 'netsh advfirewall reset'. Security Event ID 4688 (if command line auditing enabled). Additionally, Security Event ID 4950 (Windows Firewall setting has changed) may be generated in the Windows Firewall with Advanced Security operational log.

  5. Test 5PowerShell Removal of RDP Cache Directory Contents

    Expected signal: Sysmon Event ID 1 (Process Create): powershell.exe with CommandLine containing 'Remove-Item' and 'Terminal Server Client'. Sysmon Event ID 23 (File Delete): TargetFilename showing deletion within the Terminal Server Client\Cache path. PowerShell ScriptBlock Log Event ID 4104 with the full script content.

Unlock Pro Content

Get the full detection package for T1070.007 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections