🖥️
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:
  • Overview
  • Detection
  • Application Log Content
  • File Creation
  • Process Creation
  • Network Connection Creation
  • Browser History

Was this helpful?

  1. Windows DFIR & MITTR
  2. Initial Access

Drive-by Compromise

Key Points:

  1. Overview: Attackers exploit web browsers and hacked websites for system access, targeting specific user groups through various methods.

  2. Drive-by Compromise: Users land on websites with attacker-controlled content, where vulnerabilities are exploited to gain control over their systems.

  3. Hacked Websites: Malicious apps on hacked websites can steal Application Access Tokens, often appearing as popups on legitimate sites.

  4. Detection Methods: Use Application Log Content, File Creation, Process Creation, Network Connection Creation, and Browser History analysis to identify suspicious activities and signs of compromise.

  5. Browser History: Review browser history for ad traffic, malicious URLs, and file downloads when investigating web traffic-related incidents.

Overview

Attackers can break into a system when a user browses a website. This usually involves hacking the user's web browser, but attackers can also use hacked websites in different ways, like getting hold of Application Access Tokens.

There are several methods to trick a browser (also known as Drive-by Target), such as:

  1. Hacking a trusted website to inject harmful code like JavaScript, iFrames, or cross-site scripting.

  2. Altering script files on a legitimate website linked to a public cloud storage that anyone can edit.

  3. Buying and placing malicious ads on legitimate ad networks (known as Malvertising).

  4. Using built-in features of web apps to insert harmful web content or scripts (like in forum posts or comments).

Attackers often use websites popular with specific groups, like government employees or certain industries, to target particular users. This tactic, aimed at a group with common interests, is called strategic web compromise or a watering hole attack.

Here's how a typical drive-by compromise works:

  • A user lands on a website hosting attacker-controlled content.

  • Scripts run automatically, checking the browser and plugins for weak spots.

  • The user might need to enable scripts or ignore safety warnings.

  • Once a vulnerability is found, the browser gets hit with an exploit.

  • If the attack works, the attacker can control the user's system, unless there are other safeguards.

  • Sometimes, the user needs to visit the website twice before the attack launches.

This technique differs from exploiting public-facing applications because it targets client-side software when visiting a website, often leading to access to internal networks instead of just external systems in a DMZ.

Attackers can also use hacked websites to direct a user to a malicious app designed to steal Application Access Tokens, like OAuth tokens, for accessing secure apps and information. These malicious apps are often deployed via popups on legitimate websites.

Detection

Application Log Content

  • Firewall and Proxy Inspection: Windows systems use firewalls and proxies to scrutinize URLs for signs of malicious activity.

  • Reputation Analysis: These tools assess a website's reputation based on domain age, registration details, presence on known bad lists, and user traffic frequency.

Example Event Log (Event ID 5157):

An example of a Windows Firewall event (Event ID 5157) could be:

The Windows Filtering Platform has blocked a connection.
Application Information:
    Process ID: 1234
    Application Name: C:\Program Files (x86)\Internet Explorer\iexplore.exe
Network Information:
    Direction: Outbound
    Source Address: 10.0.0.1
    Source Port: 12345
    Destination Address: 192.168.1.1
    Destination Port: 80
    Protocol: 6
Filter Information:
    Filter Run-Time ID: 75325
    Layer Name: Connect
    Layer Run-Time ID: 48

Explanation:

  • Process ID and Name: Indicate which application attempted the connection.

  • Network Information: Shows the direction, source, and destination of the attempted connection.

  • Filter Information: Provides details on what part of the firewall blocked the connection.

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 Connection Creation

  • Review EDR, Firwall and Proxy logs to identify network connection events.

  • Utilize proxy logs to identify web ptraffic patterns and GET requests for files.

  • Utilize EDR logs for process & network creation events.

  • Utilize Firewall logs to identify network connections to unknown endpoints.

Browser History

  • Browser History can be extremely helpful when investigating suspicious activity that sources from web traffic.

  • Look for ad traffic, malicious URLs and file downloads.

PreviousContent InjectionNextWatering Hole Attack

Last updated 1 year ago

Was this helpful?

Review on how to review browser history files.

this guide