Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // cradle.cpp
- #include <stdio.h>
- #include <stdlib.h>
- #include <dlfcn.h>
- #include <cstdint>
- typedef void (*func_t)(unsigned int, char*);
- int main()
- {
- void *lib = dlopen("./liblzma.so.5.4.1", RTLD_NOW);
- if (!lib)
- {
- puts("Lib failed to load");
- return 0;
- }
- unsigned char *version = (unsigned char*) dlsym(lib, "lzma_version_string");
- // Calculate decrypt function location
- func_t decrypt = (func_t)(version + 0x4760);
- char key[] = "\x48\x7a\x40\xc5"
- "\x94\x3d\xf6\x38\xa8\x18\x13\xe2\xde\x63\x18\xa5\x07\xf9\xa0\xba"
- "\x2d\xbb\x8a\x7b\xa6\x36\x66\xd0\x8d\x11\xa6\x5e\xc9\x14\xd6\x6f"
- "\xf2\x36\x83\x9f\x4d\xcd\x71\x1a\x52\x86\x29\x55\x58\x58\xd1\xb7"
- "\xf9\xa7\xc2\x0d\x36\xde\x0e\x19\xea\xa3\x05\x96\xda\x59\xb9\xb9";
- puts("Call starting");
- decrypt(0xF96, key);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement