Created
March 12, 2023 10:55
-
-
Save NicolaiSoeborg/da98284c268417a3a720728f4ef44094 to your computer and use it in GitHub Desktop.
hook method in binary
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
#include <string.h> | |
/* | |
gcc -c -o hook.o hook.c | |
gcc -shared -o hook.so hook.o | |
LD_PRELOAD=./hook.so ./binary | |
*/ | |
int getentropy(char *s, int size) { | |
memset(s, 0x41, size); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment