-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-overrides
- Loading branch information
Showing
115 changed files
with
1,324 additions
and
110 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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,8 @@ | ||
rule win_kill_proc_likely : high { | ||
meta: | ||
description = "httpd killer, may block future attackers from entry" | ||
strings: | ||
$ref = "killall httpd" | ||
condition: | ||
uint32(0) == 1179403647 and filesize < 1MB and $ref | ||
} |
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,12 @@ | ||
rule chmod_executable_shell_binary : high { | ||
meta: | ||
description = "executable makes another file executable" | ||
filetypes = "macho,elf" | ||
strings: | ||
$chmod = /chmod [\-\w ]{0,4}\+[rw]{0,2}x[ \$\@\w\/\.]{0,64}/ | ||
$chmod2 = /chmod [\-\w ]{0,4}\+[rw]{0,2}[75][ \$\@\w\/\.]{0,64}/ | ||
$http = "http:" | ||
$https = "https:" | ||
condition: | ||
filesize < 10MB and (uint32(0) == 1179403647 or uint32(0) == 4277009102 or uint32(0) == 3472551422 or uint32(0) == 4277009103 or uint32(0) == 3489328638 or uint32(0) == 3405691582 or uint32(0) == 3199925962) and any of ($chmod*) and any of ($http*) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
rule fakedoc : critical { | ||
meta: | ||
description = "downloads and execute a program after opening a document" | ||
strings: | ||
$http = "http://" | ||
$https = "https://" | ||
$tool_curl_o = /curl [\w\.\- :\"\/]{0,64}-\w{0,2}[oO][\w\- :\"\/\.]{0,64}/ | ||
$tool_wget_q = "wget -" | ||
$tool_lwp = "lwp-download" | ||
$cmd_bash = "bash" fullword | ||
$cmd_dot_slash = /\.\/[\.\w]{1,16}/ fullword | ||
$cmd_rm = "rm" fullword | ||
$cmd_sleep = "sleep" fullword | ||
$cmd_echo = "echo" fullword | ||
$cmd_chmod = "chmod" fullword | ||
$open_doc = /open .{0,24}\.(pdf|xls|doc|rtf|txt)/ fullword | ||
condition: | ||
filesize < 768 and $open_doc and any of ($http*) and any of ($tool*) and any of ($cmd*) | ||
} |
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,37 @@ | ||
private rule macho { | ||
strings: | ||
$not_jar = "META-INF/" | ||
$not_dwarf = "_DWARF" | ||
$not_kext = "_.SYMDEF SORTED" | ||
condition: | ||
(uint32(0) == 4277009102 or uint32(0) == 3472551422 or uint32(0) == 4277009103 or uint32(0) == 3489328638 or uint32(0) == 3405691582 or uint32(0) == 3199925962 or uint32(0) == 3405691583 or uint32(0) == 3216703178) and none of ($not*) | ||
} | ||
|
||
rule macos_chflags_hidden : critical { | ||
meta: | ||
description = "dropper that hides it's payload using chflags" | ||
hash = "e064158742c9a5f451e69b02e83eea9fb888623fafe34ff5b38036901d8419b4" | ||
filetypes = "macho" | ||
strings: | ||
$c_curl = "curl" fullword | ||
$c_chflags = "chflags" fullword | ||
$c_hidden = "hidden" fullword | ||
$c_chmod = "chmod" fullword | ||
condition: | ||
filesize < 5MB and all of them | ||
} | ||
|
||
rule cocoa_bundle_dropper : critical { | ||
meta: | ||
ref = "https://www.huntress.com/blog/lightspy-malware-variant-targeting-macos" | ||
hash_2024_Downloads_4b97 = "4b973335755bd8d48f34081b6d1bea9ed18ac1f68879d4b0a9211bbab8fa5ff4" | ||
strings: | ||
$bundle = "NSBundle" fullword | ||
$url = "NSURL" fullword | ||
$shared = "/Users/Shared" fullword | ||
$aes = "AES" fullword | ||
$download = "Download" fullword | ||
$platform = "isPlatformOrVariantPlatformVersionAtLeast" fullword | ||
condition: | ||
macho and $shared and 5 of them | ||
} |
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
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
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,30 @@ | ||
|
||
rule polkit_pkexec_exploit : critical { | ||
meta: | ||
description = "polkit pkexec exploit (CVE-2021-4034)" | ||
strings: | ||
$ref = "PATH" fullword | ||
$ref2 = "pkexec" | ||
$ref3 = "reverse_shell" | ||
$pwnkit = "PwnKit" | ||
$pwnkit2 = "pwnkit" | ||
$pwn_cve = "cve-2021-4034" | ||
$pwn_CVE = "CVE-2021-4034" | ||
condition: | ||
any of ($pwn*) and any of ($ref*) | ||
} | ||
|
||
rule polkit_pkexec_exploit2 : critical { | ||
meta: | ||
description = "polkit pkexec exploit (CVE-2021-4034)" | ||
strings: | ||
$ref = "GCONV_PATH=." | ||
$ref2 = "CMDTOEXECUTE" | ||
$ref3 = "NOTTY_PORT" | ||
$ref4 = "payload.so" | ||
$ref5 = "pkexec" | ||
$ref6 = "main.gconv_init" | ||
condition: | ||
4 of them | ||
} |
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,10 @@ | ||
rule stickies: critical { | ||
meta: | ||
description = "steals the contents of macos Stickies application" | ||
strings: | ||
$note_group = "group.com.apple.notes" | ||
$note_other = "NoteStore.sqlite" | ||
$upload = "upload" | ||
condition: | ||
all of them | ||
} |
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
Oops, something went wrong.