Executable Atomic Red Team test cases for exercising this technique in a lab. Copy a command, run it on the listed platform, confirm your detections fire.
command_promptelevatedwindowsShutdown System - Windows
This test shuts down a Windows system.
shutdown /s /t #{timeout}
command_promptelevatedwindowsRestart System - Windows
This test restarts a Windows system.
shutdown /r /t #{timeout}
shelevatedlinux, macosRestart System via `shutdown` - FreeBSD/macOS/Linux
This test restarts a FreeBSD/macOS/Linux system.
shutdown -r #{timeout}
shelevatedlinux, macosShutdown System via `shutdown` - FreeBSD/macOS/Linux
This test shuts down a FreeBSD/macOS/Linux system using a halt.
shutdown -h #{timeout}
shelevatedlinux, macosRestart System via `reboot` - FreeBSD/macOS/Linux
This test restarts a FreeBSD/macOS/Linux system via `reboot`.
reboot
shelevatedlinuxShutdown System via `halt` - FreeBSD/Linux
This test shuts down a FreeBSD/Linux system using `halt`.
halt -p
shelevatedlinuxReboot System via `halt` - FreeBSD
This test restarts a FreeBSD system using `halt`.
halt -r
bashelevatedlinuxReboot System via `halt` - Linux
This test restarts a Linux system using `halt`.
halt --reboot
shelevatedlinuxShutdown System via `poweroff` - FreeBSD/Linux
This test shuts down a FreeBSD/Linux system using `poweroff`.
poweroff
shelevatedlinuxReboot System via `poweroff` - FreeBSD
This test restarts a FreeBSD system using `poweroff`.
poweroff -r 3
bashelevatedlinuxReboot System via `poweroff` - Linux
This test restarts a Linux system using `poweroff`.
poweroff --reboot
command_promptelevatedwindowsLogoff System - Windows
This test performs a Windows system logoff as seen in [dcrat backdoor capabilities](https://www.mandiant.com/resources/analyzing-dark-crystal-rat-backdoor)
shutdown /l
command_promptwindowsESXi - Terminates VMs using pkill
In VMWARE ESXi, process names starting with vmx are associated with running VMs. An adversary can use the pkill command to kill all processes with a prefix vmx.
[Reference](https://www.crowdstrike.com/blog/hypervisor-jackpotting-ecrime-actors-increase-targeting-of-esxi-servers/)
echo "" | "#{plink_file}" "#{vm_host}" -ssh -l "#{vm_user}" -pw "#{vm_pass}" -m "#{cli_script}"
command_promptwindowsESXi - Avoslocker enumerates VMs and forcefully kills VMs
Avoslocker malware has inbuilt functionality to enumerate the VM instances and uses the esxcli command to forcefully power off them.
[Reference](https://blogs.vmware.com/security/2022/02/avoslocker-modern-linux-ransomware-threats.html)
echo "" | "#{plink_file}" "#{vm_host}" -ssh -l "#{vm_user}" -pw "#{vm_pass}" -m "#{cli_script}"
command_promptwindowsESXi - vim-cmd Used to Power Off VMs
Adversaries may power off VMs to facilitate the deployment of ransomware payloads.
[Reference](https://lolesxi-project.github.io/LOLESXi/lolesxi/Binaries/vim-cmd/#power%20off%20vm)
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "for i in `vim-cmd vmsvc/getallvms | awk 'NR>1 {print $1}'`; do vim-cmd vmsvc/power.off $i & done"
bashelevatedlinuxAbuse of Linux Magic System Request Key for Reboot
adversaries with root or sufficient privileges to silently manipulate or destabilize a system. By writing to /proc/sysrq-trigger, they can forced to reboot.
echo "b" > /proc/sysrq-trigger