EXPL_HKTL_macOS_Switcharoo_CVE_2022_46689_Dec22
Description
Detects POCs that exploit privilege escalation vulnerability CVE-2022-46689 on macOS
Query · yara
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 or uint16(0) == 0xfacf or uint32(0) == 0xbebafeca ) ) and
filesize < 400KB and
2 of them
)