Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update T1564.yaml #2510

Merged
merged 3 commits into from Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 36 additions & 0 deletions atomics/T1564/T1564.yaml
Expand Up @@ -88,3 +88,39 @@ atomic_tests:
sc.exe delete #{service_name}
name: command_prompt
elevation_required: true
- name: Command Execution with NirCmd
description: |
NirCmd is used by threat actors to execute commands, which can include recon and privilege escalation via running commands via the SYSTEM account
See https://www.kroll.com/en/insights/publications/cyber/black-basta-technical-analysis
supported_platforms:
- windows
input_arguments:
nircmd_location:
description: Location of nircmd executable
type: Path
default: PathToAtomicsFolder\..\ExternalPayloads\nircmd.exe
command_to_execute:
description: Command for nircmd to execute
type: Path
default: win child class "Shell_TrayWnd" hide class "TrayClockWClass"
cleanup_command_to_execute:
description: Cleanup command to undo the arbitrary command ran by nircmd
type: Path
default: win child class "Shell_TrayWnd" show class "TrayClockWClass"
dependency_executor_name: powershell
dependencies:
- description: |
The Nircmd executable must exist at (#{nircmd_location})
prereq_command: |
if (Test-Path #{nircmd_location}) {exit 0} else {exit 1}
get_prereq_command: |
New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null
invoke-webrequest "https://www.nirsoft.net/utils/nircmd-x64.zip" -outfile "PathToAtomicsFolder\..\ExternalPayloads\nircmd.zip"
expand-archive -path "PathToAtomicsFolder\..\ExternalPayloads\nircmd.zip" -destinationpath PathToAtomicsFolder\..\ExternalPayloads\
executor:
command: |
cmd /c #{nircmd_location} #{command_to_execute}
cleanup_command: |
cmd /c #{nircmd_location} #{cleanup_command_to_execute} -erroraction silentlycontinue | out-null
name: powershell
elevation_required: false