Try it using Invoke-Atomic

Indicator Removal on Host

Description from ATT&CK

Adversaries may delete or modify artifacts generated within systems to remove evidence of their presence or hinder defenses. Various artifacts may be created by an adversary or something that can be attributed to an adversary’s actions. Typically these artifacts are used as defensive indicators related to monitored events, such as strings from downloaded files, logs that are generated from user actions, and other data analyzed by defenders. Location, format, and type of artifact (such as command or login history) are often specific to each platform.

Removal of these indicators may interfere with event collection, reporting, or other processes used to detect intrusion activity. This may compromise the integrity of security solutions by causing notable events to go unreported. This activity may also impede forensic analysis and incident response, due to lack of sufficient data to determine what occurred.

Atomic Tests

Atomic Test #1 - Indicator Removal using FSUtil

Manages the update sequence number (USN) change journal, which provides a persistent log of all changes made to files on the volume. Upon execution, no output will be displayed. More information about fsutil can be found at https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-usn

Supported Platforms: windows

auto_generated_guid: b4115c7a-0e92-47f0-a61e-17e7218b2435

Inputs:

None

Attack Commands: Run with command_prompt! Elevation Required (e.g. root or admin)

1
2
fsutil usn deletejournal /D C:

Cleanup Commands:

1
2
fsutil usn createjournal m=1000 a=100 c:

Atomic Test #2 - Indicator Manipulation using FSUtil

Finds a file by user name (if Disk Quotas are enabled), queries allocated ranges for a file, sets a file's short name, sets a file's valid data length, sets zero data for a file, or creates a new file. Upon execution, no output will be displayed. More information about fsutil can be found at https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-file

  • https://tria.ge/230601-x8x6bsgb24/behavioral2

Supported Platforms: windows

auto_generated_guid: 96e86706-6afd-45b6-95d6-108d23eaf2e9

Inputs:

Name Description Type Default Value
file_to_manipulate Path of file to manipulate path PathToAtomicsFolder..\ExternalPayloads\T1070-2.txt
file_data_length Data length to setzero integer 10

Attack Commands: Run with powershell!

1
2
3
4
if (-not (Test-Path "#{file_to_manipulate}")) { New-Item "#{file_to_manipulate}" -Force } 
echo "1234567890" > "#{file_to_manipulate}"
fsutil  file setZeroData offset=0 length=#{file_data_length} "#{file_to_manipulate}"

Cleanup Commands:

1
2
rm "#{file_to_manipulate}"

source