🖥️
Windows DFIR
  • Introduction
  • Windows Artifacts
    • Windows Quick Tips
      • Windows Command Line
      • Workstation File/Folder Locations
      • Server File/Folder Locations
    • Account Usage
      • Authentications SAM Artifacts
        • Last Login
        • Last Failed Login
        • Last Password Change
      • Authentications (Windows Event Log)
        • Logon ID
      • Group Membership
        • Event ID: 4798
        • Event ID: 4799
      • RDP
        • Source System Artifacts - Quick Reference
        • Destination System Artifacts - Quick Reference
      • SSH
      • Rouge Local Accounts
      • CrowdStrike Searches
        • Event Name - UserLogon
        • Event Name - UserLogonFailed
        • Event Name - UserLogonFailed2
        • Event Name - SsoApplicationAccess
    • Browser Usage
      • History & Downloads
        • Viewing History Files - DB Browser
        • Transition Types
      • Auto-Complete Data
      • Bookmarks
      • Browser Preferences
      • Cache
      • Cookies
      • Extensions
      • Super Cookies (HTML5 Web Storage)
      • Media History
      • Private Browsing
      • Session Restore
      • Stored Credentials
      • Suggested/Frequent Sites
      • DB Browser Queries
        • Firefox
        • Chrome
        • Media History
      • PowerShell Scripts
        • Browser Extension Finder
        • Browser History Finder
    • Processes
      • at.exe
      • explorer.exe
      • lsass.exe
      • lsaiso.exe
      • PuTTy.exe
        • X11 Forwarding
      • runtimebroker.exe
      • services.exe
      • smss.exe
      • System
      • svchost.exe
        • Services
      • winlogon.exe
      • wininit.exe
    • Cloud Storage
    • Deleted File or File Knowledge
      • WordWheelQuery (Win 7+)
      • ACMRU (Win XP)
      • Internet Explorer file:///
      • Last Visited MRU
      • Thumbs.db (Win XP)
      • Thumbcache
      • Recycle Bin
      • User Typed Paths
      • Windows Search Database
    • File Download
      • Zone.Identifer
      • Open/Save Most Recently Used (MRU)
      • Email
      • Drive By Downloads
        • Malvertising
      • Web Browsing
        • Cache Files
      • CrowdStrike Searches
        • MoTW
    • Folder/File Opening/Creation
      • Recent Files
      • Office Recent Files
      • Shell Bags
      • .lnk Files
      • Jump Lists
        • AppIDs
      • Prefetch
      • Index.dat file://
      • PowerShell Scripts
        • .lnk Files
    • Persistence
      • Registry
        • NTUSER.DAT & HKU\SID
        • Run and Run Once
        • Shell Folders and UserInit Key
        • Services
        • Logon Scripts
        • Office Add-ins
        • Winlogon Shell
        • Image File Execution Options (IFEO)
        • AppInit_DLLs
        • Scheduled Tasks
      • Scheduled Tasks
        • Scheduled Task Destination System Artifacts
        • Scheduled Task Source System Artifacts
      • Startup
      • Tool: AutoRuns
      • Accounts
      • WMI Event Consumers
        • WMI: Source System Artifacts
        • WMI: Destination System Artifacts
        • WMI: PowerShell Analysis
      • PowerShell Scripts
        • Startup Programs
      • CrowdStrike Searches
        • Files Written to Startup Folder
        • Files Written to Startup Folder from the Internet
        • Local Account Creation/Deletion
        • Azure Account Creation/Deletion
        • Scheduled Tasks
    • Physical Location
      • Time zone
      • Wireless SSID
      • Network History (Vista/Win7–11)
      • Cookies
      • Browser Search Terms
    • Program Execution
      • Prefetch
        • Decoding Prefetch Files with Eric Zimmerman's PECmd Tool
      • BAM/DAM
      • CapabilityAccessManager
      • UserAssist
      • Last Visited MRU
      • RunMRU
      • MUI Cache
      • ShimCache
      • Amcache
      • Jump Lists
    • Shadow Copies
      • VSC Permissions
      • Event ID 8193: Volume Shadow Copy Service Error
    • USB Usage
      • Key Identification
      • Drive Letter and Volume Name
      • Connection Timestamps
      • User
      • Volume Name
      • Plug & Play Event Log
    • Windows Services
      • DoSvc (Delivery Optimization)
    • System Information
    • Event IDs
      • Authentication / Account
        • 4624 - Authentication Success
          • Logon Types
        • 4625 - Authentication Failure
          • SubStatus Codes
        • 4634 - Account Logoff
        • 4648 - Explicit Credentials Success
        • 4672 - Special Privileges
        • 4720 - Account Creation
        • 4722 - Account Enabled
        • 4732 - Addition to Local Group
        • 4738 - Account Changed
        • 4776 - Kerberos Authentication Attempt
          • Substatus Codes
        • 4771 - Kerberos Failure
        • 4768
      • File System
        • 1006
        • 4688 - Process Created
        • 4663
        • 4656
        • 6416
        • 20001
        • 20003
  • Windows DFIR & MITTR
    • Initial Access
      • Content Injection
      • Drive-by Compromise
        • Watering Hole Attack
        • Microsoft Files (Payload Execution)
        • Exploit Delivery
        • Viewing Browser History Files
      • Phishing
    • Execution
    • Persistence
    • Privilege Escalation
    • Defense Evasion
    • Credential Access
      • Logon ID
    • Discovery
    • Lateral Movement
    • Collection
    • Command and Control
    • Exfiltration
    • Impact
  • SOC Related
    • Cached Credentials
    • Domain Controller Password Spraying
Powered by GitBook
On this page
  • Key Points:
  • Detection
  • File Creation
  • Process Creation
  • Network Traffic Content
  • Mitigation
  • Restrict Web-Based Content
  • Encrypt Sensitive Information

Was this helpful?

  1. Windows DFIR & MITTR
  2. Initial Access

Content Injection

Key Points:

  • Adversaries may gain access and continuously communicate with victims by injecting malicious content into systems through online network traffic.

  • Content injection is often the result of compromised upstream communication channels, for example at the level of an internet service provider (ISP) as is the case with "lawful interception."

  • Look for file creation events for suspicious files (Event ID 4663).

  • Look for process creation events for suspicious processes (Event ID 4668)

  • Look for suspicious network traffic.

Adversaries can access and communicate with victims by injecting malicious content into online traffic, either in the middle of client-server communications or as fake responses to legitimate server requests. This often exploits compromised ISP channels, enabling further payload deliveries to compromised systems.

Detection

File Creation

Monitor for unexpected and abnormal file creations that may indicate malicious content injected through online network communications.

  • Example: An unexpected executable file created in the user's AppData folder.

  • Windows Event Log: Event ID 4663 in the Security log (An attempt was made to access an object).

Windows Event 4663 example:

An attempt was made to access an object.
Subject:
  Security ID: SYSTEM
  Account Name: WIN-SERVER$
  Account Domain: WORKGROUP
  Logon ID: 0x3E7
Object:
  Object Name: C:\Users\user\AppData\Local\Temp\malicious.exe
  Object Type: File
Process Information:
  Process ID: 0x1f4
  Process Name: C:\Windows\System32\cmd.exe
Access Request Information:
  Accesses: WriteData (or AddFile)
  Access Mask: 0x2
  • This log entry indicates an attempt to access (write or create) a file.

  • Security ID, Account Name, and Account Domain - identify the user account involved.

  • Object Name - points to the file path, here indicating a potentially suspicious executable in the Temp folder.

  • Process Information - shows the process that attempted the file creation, in this case, cmd.exe, which is notable as command-line tools can be used in attacks.

  • Accesses:WriteData - For a file object, the right to write data to the file. For a directory object, the right to create a file in the directory (FILE_ADD_FILE).

    • AddFile - For a directory, the right to create a file in the directory.

Process Creation

  • Example: A browser process creating unexpected child processes or executable files.

  • Windows Event Log: Event ID 4688 in the Security log (A new process has been created).

Windows Event ID 4688 example:

A new process has been created.
Subject:
  Security ID: SYSTEM
  Account Name: WIN-SERVER$
  Account Domain: WORKGROUP
  Logon ID: 0x3E7
New Process ID: 0x1f4
New Process Name: C:\Program Files (x86)\Internet Explorer\iexplore.exe
Token Elevation Type: TokenElevationTypeDefault (1)
Creator Process ID: 0x1e0
Creator Process Name: C:\Windows\Explorer.exe
Process Command Line: "C:\Program Files (x86)\Internet Explorer\iexplore.exe"
  • This log records the creation of a new process.

  • Security ID and related fields again provide account information.

  • New Process ID and Name detail the process started, here iexplore.exe, Internet Explorer.

  • Creator Process ID and Name indicate the initiating process, in this case, Explorer.exe.

  • Process Command Line gives the command used to start the process, which can reveal whether additional, potentially malicious, parameters were used.

Network Traffic Content

  • Example: Unusual outbound traffic to unknown domains or IP addresses.

  • Windows Event Log: No direct Windows Event Log; typically monitored using network traffic analysis tools.

  • If an EDR solution is in place, reference the file/process creations with outbound network connections or DNS requests.

Mitigation

Restrict Web-Based Content

  • Consider blocking download/transfer and execution of potentially uncommon file types known to be used in adversary campaigns.

    • Executable files (.exe, .dll, .scr, .bat, .ps1).

    • Script files (.vbs, .js).

    • Office documents with macros (.docm, .xlsm).

    • Compressed files (.zip, .rar).

    • Portable Executable (PE).

    • Dynamic link library files (.dll).

Encrypt Sensitive Information

  • Where possible, ensure that online traffic is appropriately encrypted through services such as trusted VPNs.

    • Use HTTPS Protocols: Ensure websites use HTTPS to encrypt data in transit. This is crucial for any site handling sensitive information.

    • Encrypt Database Information: Use encryption for data at rest, especially for databases storing sensitive information.

    • Email Encryption: Implement email encryption solutions for sensitive communications.

    • File Encryption: Encourage the use of encrypted file formats, especially for documents containing personal or confidential data.

    • Training and Policies: Regularly train staff on the importance of encryption and establish clear policies for handling sensitive data.

PreviousInitial AccessNextDrive-by Compromise

Last updated 1 year ago

Was this helpful?