参考:
https://www.binarly.io/posts/The_Untold_Story_of_the_BlackLotus_UEFI_Bootkit/index.html
https://kn0s-organization.gitbook.io/blacklotus-analysis-stage2-bootkit-rootkit-stage/
https://socradar.io/enter-the-blacklotus-analysis-of-the-latest-uefi-bootkit/
Yara
rule win_blacklotus_auto {
meta:
author =
"Felix Bilstein - yara-signator at cocacoding dot com"
date =
"2023-03-28"
version =
"1"
description =
"Detects win.blacklotus."
info =
"autogenerated rule brought to you by yara-signator"
tool =
"yara-signator v0.6.0"
signator_config =
"callsandjumps;datarefs;binvalue"
malpedia_reference =
"https://malpedia.caad.fkie.fraunhofer.de/details/win.blacklotus"
malpedia_rule_date =
"20230328"
malpedia_hash =
"9d2d75cef573c1c2d861f5197df8f563b05a305d"
malpedia_version =
"20230407"
malpedia_license =
"CC BY-SA 4.0"
malpedia_sharing =
"TLP:WHITE"
/* DISCLAIMER
* The strings used in this rule have been automatically selected from the
* disassembly of memory dumps and unpacked files, using YARA-Signator.
* The code and documentation is published here:
* https://github.com/fxb-cocacoding/yara-signator
* As Malpedia is used as data source, please note that for a given
* number of families, only single samples are documented.
* This likely impacts the degree of generalization these rules will offer.
* Take the described generation method also into consideration when you
* apply the rules in your use cases and assign them confidence levels.
*/
strings:
$sequence_0 = {
40383
c08
7406
4080f
fcc
750
a ffc2
49f
fc3
413
bd0 }
// n = 7, score = 100
// 40383c08 | mov edx, ebx
// 7406 | dec eax
// 4080ffcc | mov dword ptr [esp + 0x20], edi
// 750a | mov cl, 1
// ffc2 | inc ebp
// 49ffc3 | xor ecx, ecx
// 413bd0 | dec eax
$sequence_1 = {
2
bc7 ffc8
0f
b71443
6683f
a7f
7604
6683
ea60 }
// n = 6, score = 100
// 2bc7 | or edx, 0xffffffff
// ffc8 | inc ebp
// 0fb71443 | xor ecx, ecx
// 6683fa7f | inc ebp
// 7604 | xor eax, eax
// 6683ea60 | lea ecx, [edx + 3]
$sequence_2 = { e8???????? b20d
408
ace
8
ad8 e8???????? b20b }
// n = 6, score = 100
// e8???????? |
// b20d | movzx ebx, byte ptr [eax + edx]
// 408ace | lea eax, [edx + 3]
// 8ad8 | inc edx
// e8???????? |
// b20b | movzx edi, byte ptr [eax + edx]
$sequence_3 = {
48897820
4863413
c
4533
c9
488
bea
458
bd1
8
b740850 }
// n = 6, score = 100
// 48897820 | jb 0x1ce4
// 4863413c | inc esp
// 4533c9 | mov eax, eax
// 488bea | xor edx, edx
// 458bd1 | dec ecx
// 8b740850 | mov ecx, ecx
$sequence_4 = {
75f
2
4d
8bc6
488d
542430
488d
4d30 e8????????
492
bfe }
// n = 6, score = 100
// 75f2 | mov dword ptr [ebp - 0x54], 0xd2f3ff10
// 4d8bc6 | mov dword ptr [ebp - 0x50], 0xec130ccd
// 488d542430 | mov dword ptr [ebp - 0x4c], 0x1744975f
// 488d4d30 | mov dword ptr [ebp - 0x59], 0x5048706c
// e8???????? |
// 492bfe | mov dword ptr [ebp - 0x55], 0xdab9edfd
$sequence_5 = {
4d
85c0
744d
458
bd1
410f
b64002
410f
b65003
48
c1e208 }
// n = 6, score = 100
// 4d85c0 | dec eax
// 744d | test eax, eax
// 458bd1 | js 0xebe
// 410fb64002 | lea eax, [ecx - 0x60]
// 410fb65003 | movzx edx, al
// 48c1e208 | dec eax
$sequence_6 = { b209
408
ace
8
ad8 e8???????? b20d }
// n = 5, score = 100
// b209 | jae 0xb55
// 408ace | inc ebp
// 8ad8 | movzx eax, cx
// e8???????? |
// b20d | inc edx
$sequence_7 = {
4
c8d4c2440
4
c8bc0
488d
0de6340000 e8????????
85
c0 }
// n = 5, score = 100
// 4c8d4c2440 | inc ecx
// 4c8bc0 | sub eax, edx
// 488d0de6340000 | inc ecx
// e8???????? |
// 85c0 | inc edx
$sequence_8 = {
480f
bfc6
488d
3d41100100 b9e8030000
8935
???????? }
// n = 4, score = 100
// 480fbfc6 | lea eax, [ecx + 2]
// 488d3d41100100 | inc edx
// b9e8030000 | mov byte ptr [eax + edx], bl
// 8935???????? |
$sequence_9 = {
48897010
48897818
4
c897020
55
488d
68c8
4881
ec30010000
4
c8bd1 }
// n = 7, score = 100
// 48897010 | jb 0x1dd1
// 48897818 | inc ebp
// 4c897020 | test eax, eax
// 55 | je 0x1cc7
// 488d68c8 | dec eax
// 4881ec30010000 | mov ebx, ecx
// 4c8bd1 | dec eax
condition:
7
of them and filesize <
181248
}
原文始发于微信公众号(Ots安全):【威胁情报】黑莲花 - UEFI Bootkit 2.3.1
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论