Created
March 15, 2023 13:21
-
-
Save andriitishchenko/1cb7b2684620fbbbde9079b68336488e to your computer and use it in GitHub Desktop.
XProtect test
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
/** | |
https://yara.readthedocs.io/en/stable/commandline.html | |
$ clang terget.c | |
$ brew install yara | |
$ yara /Library/Apple/System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.yara terget.out | |
XProtect_MACOS_644e18d terget.out | |
*/ | |
#include <stdio.h> | |
int main() { | |
/* | |
Some random rule from /Library/Apple/System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.yara | |
rule XProtect_MACOS_644e18d | |
{ | |
meta: | |
description = "MACOS.644e18d" | |
strings: | |
$a = { 63 6f 6e 6e 65 63 74 54 6f 50 72 6f 78 79 4d 61 6e 61 67 65 72 } | |
$b = { 63 6f 6e 6e 65 63 74 54 6f 44 65 73 74 69 6e 61 74 69 6f 6e } | |
$c = { 68 65 61 72 74 62 65 61 74 53 65 6e 64 65 72 } | |
$d = { 63 6f 6e 6e 65 63 74 54 6f 43 6e 63 } | |
$e = { 70 72 6f 78 69 74 2e 63 6f 6d 2f 70 65 65 72 } | |
condition: | |
Macho and 2 of them | |
} | |
*/ | |
char *a = "connectToProxyManager"; | |
char *b = "heartbeatSender"; | |
char *c = "connectToCnc"; | |
char *d = "proxit.com/peer"; | |
printf("Hello, World!"); | |
printf("%s", a); | |
printf("%s", b); | |
printf("%s", c); | |
printf("%s", d); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment