From aa0fee6a04ac07acf74a4580569f6501be1a2257 Mon Sep 17 00:00:00 2001 From: harryeetsource <95581121+harryeetsource@users.noreply.github.com> Date: Thu, 26 Jan 2023 18:49:56 -0800 Subject: [PATCH] Add files via upload --- valhalla-rules.yar | 53229 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53229 insertions(+) create mode 100644 valhalla-rules.yar diff --git a/valhalla-rules.yar b/valhalla-rules.yar new file mode 100644 index 0000000..34cf12e --- /dev/null +++ b/valhalla-rules.yar @@ -0,0 +1,53229 @@ +/* + VALHALLA YARA RULE SET - DEMO + Retrieved: 2023-01-27 02:55 + Generated for User: demo + Number of Rules: 2368 + Warning: + Note that the full rule set contains rules that require modules and threat hunting + rules with low scores (< 60) that could lead to false positives - use the Python + module valhallaAPI to retrieve a filtered set + + This is the VALHALLA demo rule set. The content represents the 'signature-base' repository + in a streamlined format but lacks the rules provided by 3rd parties. + All rules are licensed under CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/. +*/ + +import "math" +import "pe" + +rule EXPL_ManageEngine_CVE_2022_47966_Jan23_1_RID3386 : CVE_2022_47966 DEMO EXPLOIT { + meta: + description = "Detects indicators of exploitation of ManageEngine vulnerability as described by Horizon3" + author = "Florian Roth" + reference = "https://www.horizon3.ai/manageengine-cve-2022-47966-iocs/" + date = "2023-01-13 14:51:31" + score = 75 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + + tags = "CVE_2022_47966, DEMO, EXPLOIT" + minimum_yara = "1.7" + + strings: + $ = "]: com.adventnet.authentication.saml.SamlException: Signature validation failed. SAML Response rejected|" + condition: + 1 of them +} + +rule APT_MAL_RANSOM_ViceSociety_PolyVice_Jan23_1_RID361B : APT DEMO EXE MAL RANSOM { + meta: + description = "Detects NTRU-ChaChaPoly (PolyVice) malware used by Vice Society" + author = "Florian Roth" + reference = "https://www.sentinelone.com/labs/custom-branded-ransomware-the-vice-society-group-and-the-threat-of-outsourced-development/" + date = "2023-01-12 16:41:41" + score = 75 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + modified = "2023-01-13" + hash1 = "326a159fc2e7f29ca1a4c9a64d45b76a4a072bc39ba864c49d804229c5f6d796" + hash2 = "8c8cb887b081e0d92856fb68a7df0dabf0b26ed8f0a6c8ed22d785e596ce87f4" + hash3 = "9d9e949ecd72d7a7c4ae9deae4c035dcae826260ff3b6e8a156240e28d7dbfef" + tags = "APT, DEMO, EXE, MAL, RANSOM" + minimum_yara = "1.7" + + strings: + $x1 = "C:\\Users\\root\\Desktop\\niX\\CB\\libntru\\" ascii + $s1 = "C:\\Users\\root" ascii fullword + $s2 = "#DBG: target = %s" ascii fullword + $s3 = "# ./%s [-p ]/[-f ] [-e ] [-m ]" ascii fullword + $s4 = "### ################# ###" ascii fullword + $op1 = { 89 ca 41 01 fa 89 ef 8b 6c 24 24 44 89 c9 09 d1 44 31 e6 89 c8 } + $op2 = { bd 02 00 00 00 29 cd 48 0f bf d1 8b 44 46 02 01 44 53 02 8d 54 0d 00 83 c1 02 48 0f bf c2 } + $op3 = { 48 29 c4 4c 8d 74 24 30 4c 89 f1 e8 46 3c 00 00 84 c0 41 89 c4 0f 85 2b 02 00 00 0f b7 45 f2 } + condition: + uint16 ( 0 ) == 0x5a4d and filesize < 400KB and ( 1 of ( $x* ) or 2 of them ) or 4 of them +} + +rule APT_MAL_RANSOM_ViceSociety_Chily_Jan23_1_RID34E9 : APT DEMO EXE MAL RANSOM { + meta: + description = "Detects Chily or SunnyDay malware used by Vice Society" + author = "Florian Roth" + reference = "https://www.sentinelone.com/labs/custom-branded-ransomware-the-vice-society-group-and-the-threat-of-outsourced-development/" + date = "2023-01-12 15:50:41" + score = 80 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + hash1 = "4dabb914b8a29506e1eced1d0467c34107767f10fdefa08c40112b2e6fc32e41" + tags = "APT, DEMO, EXE, MAL, RANSOM" + minimum_yara = "1.7" + + strings: + $x1 = ".[Chily@Dr.Com]" ascii fullword + $s1 = "localbitcoins.com/buy_bitcoins'>https://localbitcoins.com/buy_bitcoins" ascii fullword + $s2 = "C:\\Users\\root\\Desktop" ascii fullword + $s3 = "for /F \"tokens=*\" %1 in ('wevtutil.exe el') DO wevtutil.exe cl \"%1\"" wide fullword + $s4 = "cd %userprofile%\\documents\\" wide + $s5 = "noise.bmp" wide fullword + $s6 = " Execution time: %fms (1sec=1000ms)" ascii fullword + $s7 = "/c vssadmin.exe Delete Shadows /All /Quiet" wide fullword + $op1 = { 4c 89 c5 89 ce 89 0d f5 41 02 00 4c 89 cf 44 8d 04 49 0f af f2 89 15 e9 41 02 00 44 89 c0 } + $op2 = { 48 8b 03 48 89 d9 ff 50 10 84 c0 0f 94 c0 01 c0 48 83 c4 20 5b } + $op3 = { 31 c0 47 8d 2c 00 45 85 f6 4d 63 ed 0f 8e ec 00 00 00 0f 1f 80 00 00 00 00 0f b7 94 44 40 0c 00 00 83 c1 01 } + condition: + uint16 ( 0 ) == 0x5a4d and filesize < 500KB and ( 1 of ( $x* ) or 3 of them ) or 4 of them +} + +rule SUSP_ENV_Folder_Root_File_Jan23_1_RID32AE : DEMO SCRIPT SUSP { + meta: + description = "Detects suspicious file path pointing to the root of a folder easily accessible via environment variables" + author = "Florian Roth" + reference = "Internal Research" + date = "2023-01-11 14:15:31" + score = 70 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + + tags = "DEMO, SCRIPT, SUSP" + required_modules = "pe" + minimum_yara = "3.0.0" + + strings: + $xr1 = /%([Aa]pp[Dd]ata|APPDATA)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/ wide ascii + $xr2 = /%([Pp]ublic|PUBLIC)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/ wide ascii + $xr4 = /%([Pp]rogram[Dd]ata|PROGRAMDATA)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/ wide ascii + $fp1 = "perl -MCPAN " ascii + $fp2 = "CCleaner" ascii + condition: + filesize < 20MB and 1 of ( $x* ) and not 1 of ( $fp* ) and not pe.number_of_signatures > 0 +} + +rule HKTL_NATBypass_Dec22_1_RID2E57 : DEMO G0096 HKTL T1090 { + meta: + description = "Detects NatBypass tool (also used by APT41)" + author = "Florian Roth" + reference = "https://github.com/cw1997/NATBypass" + date = "2022-12-27 11:10:21" + score = 80 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + hash1 = "4550635143c9997d5499d1d4a4c860126ee9299311fed0f85df9bb304dca81ff" + tags = "DEMO, G0096, HKTL, T1090" + minimum_yara = "1.7" + + strings: + $x1 = "nb -slave 127.0.0.1:3389 8.8.8.8:1997" ascii + $x2 = "| Welcome to use NATBypass Ver" ascii + $s1 = "main.port2host.func1" ascii fullword + $s2 = "start to transmit address:" ascii + $s3 = "^(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])" + condition: + filesize < 8000KB and ( 1 of ( $x* ) or 2 of them ) or 3 of them +} + +rule EXPL_LOG_ProxyNotShell_OWASSRF_PowerShell_Proxy_Log_Dec22_1_RID3C7E : CVE_2022_41040 CVE_2022_41082 DEMO EXPLOIT HKTL LOG SCRIPT T1028 T1059_001 T1086 T1090 { + meta: + description = "Detects traces of exploitation activity in relation to ProxyNotShell MS Exchange vulnerabilities CVE-2022-41040 and CVE-2022-41082" + author = "Florian Roth" + reference = "https://www.crowdstrike.com/blog/owassrf-exploit-analysis-and-recommendations/" + date = "2022-12-22 21:14:11" + score = 70 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + + tags = "CVE_2022_41040, CVE_2022_41082, DEMO, EXPLOIT, HKTL, LOG, SCRIPT, T1028, T1059_001, T1086, T1090" + minimum_yara = "1.7" + + strings: + $s1 = "/owa/mastermailbox%40outlook.com/powershell" ascii wide + $sa1 = " 200 " ascii wide + $sa2 = " POST " ascii wide + $fp1 = "ClientInfo" ascii wide fullword + $fp2 = "Microsoft WinRM Client" ascii wide fullword + $fp3 = "Exchange BackEnd Probes" ascii wide fullword + condition: + all of ( $s* ) and not 1 of ( $fp* ) +} + +rule EXPL_LOG_ProxyNotShell_OWASSRF_PowerShell_Proxy_Log_Dec22_2_RID3C7F : CVE_2022_41040 CVE_2022_41082 DEMO EXPLOIT HKTL LOG SCRIPT T1028 T1059_001 T1086 T1090 { + meta: + description = "Detects traces of exploitation activity in relation to ProxyNotShell MS Exchange vulnerabilities CVE-2022-41040 and CVE-2022-41082" + author = "Florian Roth" + reference = "https://www.crowdstrike.com/blog/owassrf-exploit-analysis-and-recommendations/" + date = "2022-12-22 21:14:21" + score = 60 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + + tags = "CVE_2022_41040, CVE_2022_41082, DEMO, EXPLOIT, HKTL, LOG, SCRIPT, T1028, T1059_001, T1086, T1090" + minimum_yara = "2.2.0" + + strings: + $sr1 = / \/owa\/[^\/\s]{1,30}(%40|@)[^\/\s\.]{1,30}\.[^\/\s]{2,3}\/powershell / ascii wide + $sa1 = " 200 " ascii wide + $sa2 = " POST " ascii wide + $fp1 = "ClientInfo" ascii wide fullword + $fp2 = "Microsoft WinRM Client" ascii wide fullword + $fp3 = "Exchange BackEnd Probes" ascii wide fullword + condition: + all of ( $s* ) and not 1 of ( $fp* ) +} + +rule EXPL_LOG_ProxyNotShell_OWASSRF_PowerShell_Proxy_Log_Dec22_3_RID3C80 : CVE_2022_41040 CVE_2022_41082 DEMO EXPLOIT HKTL LOG SCRIPT T1028 T1059_001 T1086 T1090 { + meta: + description = "Detects traces of exploitation activity in relation to ProxyNotShell MS Exchange vulnerabilities CVE-2022-41040 and CVE-2022-41082" + author = "Florian Roth" + reference = "https://www.crowdstrike.com/blog/owassrf-exploit-analysis-and-recommendations/" + date = "2022-12-22 21:14:31" + score = 60 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + + tags = "CVE_2022_41040, CVE_2022_41082, DEMO, EXPLOIT, HKTL, LOG, SCRIPT, T1028, T1059_001, T1086, T1090" + minimum_yara = "1.7" + + strings: + $sa1 = " POST /powershell - 444 " ascii wide + $sa2 = " POST /Powershell - 444 " ascii wide + $sb1 = " - 200 0 0 2" ascii wide + $fp1 = "ClientInfo" ascii wide fullword + $fp2 = "Microsoft WinRM Client" ascii wide fullword + $fp3 = "Exchange BackEnd Probes" ascii wide fullword + condition: + 1 of ( $sa* ) and $sb1 and not 1 of ( $fp* ) +} + +rule EXPL_LOG_ProxyNotShell_PowerShell_Proxy_Log_Dec22_1_RID39FA : CVE_2022_41040 CVE_2022_41082 DEMO EXPLOIT HKTL LOG SCRIPT T1028 T1059_001 T1086 T1090 { + meta: + description = "Detects traces of exploitation activity in relation to ProxyNotShell MS Exchange vulnerabilities CVE-2022-41040 and CVE-2022-41082" + author = "Florian Roth" + reference = "https://www.crowdstrike.com/blog/owassrf-exploit-analysis-and-recommendations/" + date = "2022-12-22 19:26:51" + score = 70 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + + tags = "CVE_2022_41040, CVE_2022_41082, DEMO, EXPLOIT, HKTL, LOG, SCRIPT, T1028, T1059_001, T1086, T1090" + minimum_yara = "1.7" + + strings: + $s1 = ",/Powershell" ascii wide nocase + $s2 = ",Kerberos,true," ascii wide + $s3 = ",200,0,,,," ascii wide + $sx1 = ";OnEndRequest.End.ContentType=application/soap+xml charset UTF-8;S:ServiceCommonMetadata.HttpMethod=POST;" + $fp1 = "ClientInfo" ascii wide fullword + $fp2 = "Microsoft WinRM Client" ascii wide fullword + $fp3 = "Exchange BackEnd Probes" ascii wide fullword + condition: + all of ( $s* ) and not 1 of ( $fp* ) +} + +rule EXPL_HKTL_macOS_Switcharoo_CVE_2022_46689_Dec22_RID3631 : CVE_2022_46689 DEMO EXPLOIT FILE HKTL MACOS T1068 { + meta: + description = "Detects POCs that exploit privilege escalation vulnerability CVE-2022-46689 on macOS" + author = "Florian Roth" + reference = "Internal Research" + date = "2022-12-19 16:45:21" + score = 80 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + hash1 = "64acd79a37b6f8443250dd33e95bd933ee39fc6d4f35ba6a987dae878d017386" + hash2 = "6c2ace75000de8a7e8786f28b1b41eed72816991a0961475c6800753bfe9278c" + hash3 = "6ce080b236ea3aa3b4c992d12af99445ab800abc709c6abbef852a9f0cf219b6" + tags = "CVE_2022_46689, DEMO, EXPLOIT, FILE, HKTL, MACOS, T1068" + minimum_yara = "1.7" + + strings: + $x1 = "vm_read_overwrite: KERN_SUCCESS:%d KERN_PROTECTION_FAILURE:%d other:%d" ascii fullword + $x2 = "Execting: %s (posix_spawn returned: %d)" ascii fullword + $x3 = "/usr/bin/sed -e \"s/rootok/permit/g\" /etc" ascii fullword + $x4 = "vm_unaligned_copy_switch_race" ascii fullword + $s1 = "RO mapping was modified" ascii fullword + $s2 = "Ran %d times in %ld seconds with no failure" ascii fullword + $opa1 = { 4c 89 ee 31 c9 41 b8 00 40 00 00 6a 01 41 5c 41 54 6a 03 58 } + $opa2 = { e8 ?? 01 00 00 48 8b 05 ?? 0? 00 00 8b 38 48 8b 13 44 8b 4b 14 48 83 ec 08 4c 89 ee 31 c9 } + $opa3 = { 48 89 45 c8 48 8d 43 08 48 89 45 d0 4c 8b 7d c8 4c 8b 6d d0 6a 64 41 5e 80 7b 60 00 } + $opb1 = { 55 48 89 e5 48 83 ec 60 48 8b 05 ?1 06 00 00 48 8b 00 48 89 45 f8 0f 28 05 ?b 07 00 00 48 8d 75 d0 } + condition: + ( filesize < 400KB and 1 of ( $x* ) ) or ( ( uint16 ( 0 ) == 0xfacf or uint16 ( 0 ) == 0xfeca ) and filesize < 400KB and 2 of them ) +} + +rule EXPL_macOS_Switcharoo_Indicator_Dec22_RID34C9 : CVE_2022_46689 DEMO EXPLOIT MACOS { + meta: + description = "Detects indicators found after exploitations of CVE-2022-46689" + author = "Florian Roth" + reference = "https://github.com/zhuowei/MacDirtyCowDemo" + date = "2022-12-19 15:45:21" + score = 65 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + + tags = "CVE_2022_46689, DEMO, EXPLOIT, MACOS" + minimum_yara = "1.7" + + strings: + $x1 = "auth sufficient pam_permit.so" ascii + condition: + filesize < 1KB and $x1 +} + +rule HKTL_Venom_LIB_Dec22_RID2DAD : DEMO EXE FILE HKTL { + meta: + description = "Detects Venom - a library that meant to perform evasive communication using stolen browser socket" + author = "Florian Roth" + reference = "https://github.com/Idov31/Venom" + date = "2022-12-17 10:42:01" + score = 75 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + + tags = "DEMO, EXE, FILE, HKTL" + minimum_yara = "1.7" + + strings: + $x1 = "[ + ] Created detached hidden msedge process: " fullword ascii + $ss1 = "WS2_32.dll" fullword ascii + $ss2 = "WSASocketW" fullword ascii + $ss3 = "WSADuplicateSocketW" fullword ascii + $ss5 = "\\Device\\Afd" wide fullword + $sx1 = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe --no-startup-window" fullword wide + $sx2 = "[ + ] Data sent!" fullword ascii + $sx3 = "[ + ] Socket obtained!" fullword ascii + $op1 = { 4c 8b f0 48 3b c1 48 b8 ff ff ff ff ff ff ff 7f } + $op2 = { 48 8b cf e8 1c 34 00 00 48 8b 5c 24 30 48 8b c7 } + $op3 = { 48 8b da 48 8b f9 45 33 f6 48 85 c9 0f 84 34 01 } + condition: + uint16 ( 0 ) == 0x5a4d and filesize < 500KB and ( ( 3 of ( $ss* ) and all of ( $op* ) ) or 2 of ( $sx* ) ) or $x1 or all of ( $sx* ) +} + +rule APT_CryWiper_Dec22_RID2D59 : APT DEMO MAL T1050 { + meta: + description = "Detects CryWiper malware samples" + author = "Florian Roth" + reference = "https://securelist-ru.translate.goog/novyj-troyanec-crywiper/106114/?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en" + date = "2022-12-05 10:28:01" + score = 75 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + + tags = "APT, DEMO, MAL, T1050" + minimum_yara = "1.7" + + strings: + $x1 = "Software\\Sysinternals\\BrowserUpdate" + $sx1 = "taskkill.exe /f /im MSExchange*" + $s1 = "SYSTEM\\CurrentControlSet\\Control\\Terminal Server" ascii + $s2 = "fDenyTSConnections" ascii + condition: + 1 of ( $x* ) or all of ( $s* ) +} + +rule MAL_RANSOM_Venus_Nov22_1_RID2F10 : CRIME DEMO EXE MAL RANSOM { + meta: + description = "Detects Venus Ransomware samples" + author = "Florian Roth" + reference = "https://twitter.com/dyngnosis/status/1592588860168421376" + date = "2022-11-16 11:41:11" + score = 85 + customer = "demo" + license = "CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/" + hash1 = "46f9cbc3795d6be0edd49a2c43efe6e610b82741755c5076a89eeccaf98ee834" + hash2 = "6d8e2d8f6aeb0f4512a53fe83b2ef7699513ebaff31735675f46d1beea3a8e05" + hash3 = "931cab7fbc0eb2bbc5768f8abdcc029cef76aff98540d9f5214786dccdb6a224" + tags = "CRIME, DEMO, EXE, MAL, RANSOM" + required_modules = "pe" + minimum_yara = "3.2.0" + + strings: + $x1 = "Venus