-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix: Dbghelp/Dbgcore DLL Loaded By Uncommon/Suspicious Process - Add multiple new FP filters seen in the wild fix: Potential System DLL Sideloading From Non System Locations - Add multiple new FP filters seen in the wild new: CrackMapExec File Indicators remove: CrackMapExec File Creation Patterns remove: Suspicious Epmap Connection
- Loading branch information
Showing
6 changed files
with
140 additions
and
82 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
.../file_event_win_crackmapexec_patterns.yml → .../file_event_win_crackmapexec_patterns.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...nection/net_connection_win_susp_epmap.yml → ...windows/net_connection_win_susp_epmap.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
rules-threat-hunting/windows/image_load/image_load_dll_dbghelp_dbgcore_susp_load.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
title: Dbghelp/Dbgcore DLL Loaded By Uncommon/Suspicious Process | ||
id: 0e277796-5f23-4e49-a490-483131d4f6e1 | ||
related: | ||
- id: bdc64095-d59a-42a2-8588-71fd9c9d9abc # Unsigned Loading | ||
type: similar | ||
status: test | ||
description: | | ||
Detects the load of dbghelp/dbgcore DLL by a potentially uncommon or potentially suspicious process. | ||
The Dbghelp and Dbgcore DLLs export functions that allow for the dump of process memory. Tools like ProcessHacker, Task Manager and some attacker tradecraft use the MiniDumpWriteDump API found in dbghelp.dll or dbgcore.dll. | ||
As an example, SilentTrynity C2 Framework has a module that leverages this API to dump the contents of Lsass.exe and transfer it over the network back to the attacker's machine. | ||
Keep in mind that many legitimate Windows processes and services might load the aforementioned DLLs for debugging or other related purposes. Investigate the CommandLine and the Image location of the process loading the DLL. | ||
references: | ||
- https://docs.microsoft.com/en-us/windows/win32/api/minidumpapiset/nf-minidumpapiset-minidumpwritedump | ||
- https://www.pinvoke.net/default.aspx/dbghelp/MiniDumpWriteDump.html | ||
- https://medium.com/@fsx30/bypass-edrs-memory-protection-introduction-to-hooking-2efb21acffd6 | ||
author: Perez Diego (@darkquassar), oscd.community, Ecco | ||
date: 2019/10/27 | ||
modified: 2024/03/01 | ||
tags: | ||
- attack.credential_access | ||
- attack.t1003.001 | ||
- detection.threat_hunting | ||
logsource: | ||
category: image_load | ||
product: windows | ||
detection: | ||
selection: | ||
ImageLoaded|endswith: | ||
- '\dbghelp.dll' | ||
- '\dbgcore.dll' | ||
Image|endswith: | ||
- '\bash.exe' | ||
- '\cmd.exe' | ||
- '\cscript.exe' | ||
- '\dnx.exe' | ||
- '\excel.exe' | ||
- '\monitoringhost.exe' | ||
- '\msbuild.exe' | ||
- '\mshta.exe' | ||
- '\outlook.exe' | ||
- '\powerpnt.exe' | ||
- '\regsvcs.exe' | ||
- '\rundll32.exe' | ||
- '\sc.exe' | ||
- '\scriptrunner.exe' | ||
- '\winword.exe' | ||
- '\wmic.exe' | ||
- '\wscript.exe' | ||
# - '\powershell.exe' # Note: Triggered by installing common software | ||
# - '\regsvr32.exe' # Note: triggered by installing common software | ||
# - '\schtasks.exe' # Note: triggered by installing software | ||
# - '\svchost.exe' # Note: triggered by some services | ||
filter_main_tiworker: | ||
# Note: This filter requires "CommandLine" field enrichment | ||
CommandLine|startswith: 'C:\WINDOWS\WinSxS\' | ||
CommandLine|endswith: '\TiWorker.exe -Embedding' | ||
filter_main_generic: | ||
# Note: This filter requires "CommandLine" field enrichment | ||
Image|endswith: '\svchost.exe' | ||
CommandLine|endswith: | ||
- '-k LocalServiceNetworkRestricted' | ||
- '-k WerSvcGroup' | ||
filter_main_rundll32: | ||
# Note: This filter requires "CommandLine" field enrichment | ||
Image|endswith: '\rundll32.exe' | ||
CommandLine|contains: | ||
- '/d srrstr.dll,ExecuteScheduledSPPCreation' | ||
- 'aepdu.dll,AePduRunUpdate' | ||
- 'shell32.dll,OpenAs_RunDL' | ||
- 'Windows.Storage.ApplicationData.dll,CleanupTemporaryState' | ||
condition: selection and not 1 of filter_main_* | ||
falsepositives: | ||
- Debugging scripts might leverage this DLL in order to dump process memory for further analysis. | ||
level: medium |
31 changes: 31 additions & 0 deletions
31
rules/windows/file/file_event/file_event_win_hktl_crackmapexec_indicators.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
title: CrackMapExec File Indicators | ||
id: 736ffa74-5f6f-44ca-94ef-1c0df4f51d2a | ||
related: | ||
- id: 9433ff9c-5d3f-4269-99f8-95fc826ea489 | ||
type: obsoletes | ||
status: experimental | ||
description: Detects file creation events with filename patterns used by CrackMapExec. | ||
references: | ||
- https://github.com/byt3bl33d3r/CrackMapExec/ | ||
author: Nasreddine Bencherchali (Nextron Systems) | ||
date: 2024/03/11 | ||
tags: | ||
- attack.credential_access | ||
- attack.t1003.001 | ||
logsource: | ||
product: windows | ||
category: file_event | ||
detection: | ||
selection_path: | ||
TargetFilename|startswith: 'C:\Windows\Temp\' # The disk extension is hardcoded in the tool. | ||
selection_names_str: | ||
TargetFilename|endswith: | ||
- '\temp.ps1' # https://github.com/byt3bl33d3r/CrackMapExec/blob/3c3e412193cb6d3237abe90c543e5d995bfa4447/cme/modules/keepass_trigger.py#L42C41-L42C68 | ||
- '\msol.ps1' # https://github.com/byt3bl33d3r/CrackMapExec/blob/3c3e412193cb6d3237abe90c543e5d995bfa4447/cme/modules/msol.py#L48C98-L48C106 | ||
selection_names_re: | ||
- TargetFilename|re: '\\[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.txt$' # https://github.com/byt3bl33d3r/CrackMapExec/blob/3c3e412193cb6d3237abe90c543e5d995bfa4447/cme/protocols/wmi/wmiexec.py#L86 | ||
- TargetFilename|re: '\\[a-zA-Z]{8}\.tmp$' # https://github.com/byt3bl33d3r/CrackMapExec/blob/3c3e412193cb6d3237abe90c543e5d995bfa4447/cme/protocols/smb/atexec.py#L145C19-L146 | ||
condition: selection_path and 1 of selection_names_* | ||
falsepositives: | ||
- Unknown | ||
level: high |
59 changes: 0 additions & 59 deletions
59
rules/windows/image_load/image_load_dll_dbghelp_dbgcore_susp_load.yml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters