Skip to content

Commit

Permalink
Create T1025.yaml (#2962)
Browse files Browse the repository at this point in the history
* Create T1025.yaml

* Update T1025.yaml

Edit command key structre.

---------

Co-authored-by: Bhavin Patel <[email protected]>
  • Loading branch information
krdmnbrk and patel-bhavin authored Oct 25, 2024
1 parent 487dd6f commit e701a4a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions atomics/T1025/T1025.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
attack_technique: T1025
display_name: Data from Removable Media
atomic_tests:
- name: Identify Documents on USB and Removable Media via PowerShell
description: |
This test simulates an attack where PowerShell is used to detect connected USB or other removable storage devices and gather a list of specific document files
(e.g., .docx, .xls, .txt, .pdf). The command works by first identifying removable drives on the system and then recursively searching through each one for files
matching the targeted extensions. If no removable drives are present, the script will return a message stating that no media is detected. This behavior mimics
how adversaries might scan for sensitive documents on removable devices for exfiltration or analysis.
supported_platforms:
- windows
executor:
name: command_prompt
command: |
powershell.exe -c "Get-Volume | Where-Object {$_.DriveType -eq 'Removable'} | ForEach-Object { Get-ChildItem -Path ($_.DriveLetter + ':\*') -Recurse -Include '*.doc*','*.xls*','*.txt','*.pdf' -ErrorAction SilentlyContinue | ForEach-Object {Write-Output $_.FullName} } ; if (-not (Get-Volume | Where-Object {$_.DriveType -eq 'Removable'})) { Write-Output 'No removable media.' }"

0 comments on commit e701a4a

Please sign in to comment.