对‘QBasicAtomicInt_fetchAndAddOrdered(int volatile*, int)’未定义的引用

编译报错:对‘QBasicAtomicInt_fetchAndAddOrdered(int volatile*, int)’未定义的引用

在.pro文件里去掉libQtCore.so.4、libQtGui.so.4、libQtNetwork.so.4的引用后

链接报错:undefined symbol: _Z34QBasicAtomicInt_fetchAndAddOrderedPVii

原因: 网上搜索,提示是因为程序需要的qt动态库版本不一致造成的,主要是qtcore、qtgui、qtnetwork相关的库版本不一致

解决方法: 从编译程序的客户机中拷贝
libQtCore.so.4,libQtCore.so.4.8,libQtCore.so.4.8.7;
libQtGui.so.4,libQtGui.so.4.8,libQtGui.so.4.8.7;
libQtNetwork.so.4,libQtNetwork.so.4.8,libQtNetwork.so.4.8.7)
覆盖到原来引用的qt库目录中,重新运行程序,程序正常运行。
上述动态库xxso. 4、xxso.4.8、xxso. 4.8.7都需要拷贝到服务机运行环境中,缺少一个程序都不能正常运行。
可参考文章:https://answers.launchpad.net/ubuntu/+question/264632
https://blog.youkuaiyun.com/weixin_44819948/article/details/117119245

备注:1、可以新建一个qt 工程,debug后使用模块视图查看libQtCore.so.4这几个库的路径,然后拷贝覆盖

#include<gmssl/sm9.h> #include<gmssl/sm3.h> #include<gmssl/asn1.h> #include<gmssl/error.h> #ifndef CL_SM9_ENC_H #define CL_SM9_ENC_H typedef struct { //partial enc private key de SM9_POINT de; //partial enc public key Pe SM9_TWIST_POINT Pe; }CL_SM9_PARTIAL_ENC_KEY;//自定义的无证书加密部分密钥(部分私钥de、部分公钥Pe) typedef SM9_ENC_MASTER_KEY CL_SM9_ENC_MASTER_KEY; int cl_sm9_enc_master_key_generate(CL_SM9_ENC_MASTER_KEY* msk); //extract partial key from master key int cl_sm9_enc_partial_private_key_generate(CL_SM9_ENC_MASTER_KEY* msk, const char* id, size_t idlen, CL_SM9_PARTIAL_ENC_KEY* parkey); //bind a user id to a rand number,but in this way we only generate a rand number int cl_sm9_enc_partial_value_set(const char* id, sm9_fp_t xe); typedef struct { //private key Se(gmssl sm9源码里是de) Se->de SM9_POINT Se; //public key Pke SM9_TWIST_POINT Pke; }CL_SM9_ENC_KEY;//自定义的无证书加密完整密钥(私钥Se、公钥Pke) //get integrated key int cl_sm9_enc_key_set(const char* id, sm9_fp_t xe, const CL_SM9_PARTIAL_ENC_KEY* parkey, CL_SM9_ENC_KEY* key);//获得完整密钥方法 int cl_sm9_enc_master_public_key_to_der(const CL_SM9_ENC_MASTER_KEY* mpk, uint8_t** out, size_t* outlen); int cl_sm9_enc_master_public_key_from_der(CL_SM9_ENC_MASTER_KEY* mpk, const uint8_t** in, size_t* inlen); int cl_sm9_encrypt(const CL_SM9_ENC_MASTER_KEY* mpk, const SM9_TWIST_POINT* Pke, const char* id, size_t idlen, const uint8_t* in, size_t inlen, uint8_t* out, size_t* outlen); int cl_sm9_do_encrypt(const CL_SM9_ENC_MASTER_KEY* mpk, const SM9_TWIST_POINT* Pke, const char* id, size_t idlen, const uint8_t* in, size_t inlen, SM9_POINT* C1, uint8_t* c2, uint8_t c3[SM3_HMAC_SIZE]); int cl_sm9_kem_encrypt(const CL_SM9_ENC_MASTER_KEY* mpk, const SM9_TWIST_POINT* Pke, const char* id, size_t idlen, size_t klen, uint8_t* kbuf, SM9_POINT* C);//拆解原GMSSL SM9加密的API实现,修改成无证书的流程。 int cl_sm9_decrypt(const CL_SM9_ENC_KEY* key,const char* id, size_t idlen, const uint8_t* in, size_t inlen, uint8_t* out, size_t* outlen); #endif
09-20
Error while build (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 88) + 8LL) + 688LL)))((unsigned int)v18, *v15); #include <list> #include <vector> #include <string.h> #include <pthread.h> #include <thread> #include <cstring> #include <jni.h> #include <unistd.h> #include <fstream> #include <iostream> #include <dlfcn.h> #include <fcntl.h> #include <sys/stat.h> #include "Includes/Logger.h" #include "Includes/obfuscate.h" #include "Includes/Utils.h" #include "KittyMemory/MemoryPatch.h" #include "Includes/Macros.h" // ❗ Only one valid target lib name should be defined #undef targetLibName #define targetLibName OBFUSCATE("libanogs.so") #define _BYTE uint8_t #define _WORD uint16_t #define _DWORD uint32_t #define _QWORD uint64_t #define j_j__free #define __OFSUB__ #define AnoSDKIoctlOld_0 #define HIWORD #define JUMPOUT(x) goto *(void**)(x) #define byte_4 #define BYTE5(x) (((x) >> 32) & 0xFF) #define BYTE4(x) (((x) >> 24) & 0xFF) #define HIBYTE(x) (((x) >> 8) & 0xFF) #define BYTE6(x) (((x) >> 40) & 0xFF) #define BYTE1(x) ((x) & 0xFF) #define BYTE3(x) (((x) >> 16) & 0xFF) #define BYTE2(x) (((x) >> 8) & 0xFF) #define ARM64_SYSREG #define _WriteStatusReg #define pkgName "com.pubg.imobile" #pragma pack(1) struct patch_t { _BYTE nPatchType; DWORD dwAddress; }; // Base addresses DWORD TBlueBase = 0; DWORD AntBase = 0; DWORD BufferBase = 0; DWORD HdmpveBase = 0; DWORD roosterBase = 0; DWORD roosterSize = 0; DWORD roosterAlloc = 0; DWORD EGLBase = 0; DWORD EGLSize = 0; DWORD EGLAlloc = 0; DWORD libEgl_base = 0; DWORD libcBase = 0; DWORD libcSize = 0; DWORD libcAlloc = 0; DWORD libUE4Base = 0; DWORD libanogsBase = 0; DWORD libanortBase = 0; DWORD libanogsAlloc = 0; DWORD libUE4Alloc = 0; unsigned int libanogsSize = 0; unsigned int libUE4Size = 0; // Patch opcodes #define SAFE_RETURN_PATCH "00 00 80 D2 C0 03 5F D6" constexpr const char XX[] = "00 00 80 D2 C0 03 5F D6"; constexpr const char RET[] = "C0 03 5F D6"; constexpr const char NOP[] = "1F 20 03 D5"; constexpr const char RET1[] = "01 00 80 D2 C0 03 5F D6"; // ✅ Fixed: Correctly read TPIDR_EL0 via inline asm static inline uint64_t read_tpidr_el0() { uint64_t value; __asm__ __volatile__("mrs %0, tpidr_el0" : "=r"(value)); return value; } // Define _OWORD for 128-bit SIMD values (match IDA struct) typedef struct { uint64_t low; uint64_t high; } __attribute__((aligned(16))) _OWORD; #ifndef __int128 # define __int128 long long __attribute__((__mode__(__TI__))) #endif // Forward declarations for IDA-generated symbols extern const _OWORD xmmword_A71C0; extern const _OWORD xmmword_A73F0; extern const _OWORD xmmword_A7450; extern const _OWORD xmmword_EC708; extern const _OWORD unk_EC718; extern const _OWORD xmmword_EC728; extern const char byte_EB26C; extern const char byte_EC740; // Stub functions for undefined subs void nullsub_169(__int64, unsigned int, unsigned int, ...) { } void sub_3B4480(char*, int) { } void sub_3B474C(char*, unsigned int) { } __int64 sub_3B4A70(char*, __int64) { return 0; } __int64 sub_3B4060(__int64) { return 0; } void sub_3B418C(__int64, char*) { } void sub_3B4CE4(char*) { } __int64 sub_387FE4(__int64) { return 0; } __int64 sub_388040(__int64 a2, ...) { return 0; } #ifndef __fastcall # define __fastcall #endif // Function prototypes size_t getLibrarySize(const char *libraryName); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// __int64 __fastcall h_sub_404D50( __int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9, __int64 a10, __int64 a11, __int64 a12, __int64 a13, __int64 a14, __int64 a15, __int64 a16, __int64 a17, __int64 a18, __int64 a19, __int64 a20, __int64 a21, __int64 a22, __int64 a23, __int64 a24, __int64 a25, __int64 a26, __int64 a27, __int64 a28, __int64 a29, __int64 a30, __int64 a31, __int64 a32, __int64 a33, __int64 a34, __int64 a35, __int64 a36, __int64 a37, __int64 a38, __int64 a39, __int64 a40, __int64 a41, __int64 a42, __int64 a43, __int64 a44, __int64 a45, __int64 a46, __int64 a47) { // 🔥 Neutralized function body return 0LL; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void __fastcall h_sub_425864(__int64 a1) { unsigned __int64 StatusReg; __int64 v10; _QWORD *v11; __int64 v12; // ✅ Use fixed read_tpidr_el0() StatusReg = read_tpidr_el0(); v10 = *(_QWORD *)(StatusReg + 40); // ✅ Replace all __int128 with _OWORD to allow assignment _OWORD v505; _OWORD v506; _OWORD v503 = {0}; _OWORD v504 = {0}; _OWORD v501 = {0}; _OWORD v502 = {0}; _OWORD v499 = {0}; _OWORD v500 = {0}; _OWORD v497 = {0}; _OWORD v498 = {0}; _OWORD v495 = {0}; _OWORD v496 = {0}; _OWORD v494 = {0}; _OWORD v492 = {0}; _OWORD v490 = {0}; _OWORD v491 = {0}; _OWORD v486; _OWORD v487; _OWORD v507; _OWORD v488; _OWORD v493[4] = {{0}}; v505 = xmmword_A71C0; v506 = xmmword_A73F0; v507 = xmmword_A7450; v486 = xmmword_EC708; v487 = unk_EC718; v488 = xmmword_EC728; v11 = (_QWORD *)(a1 + 8); v10 = *(_QWORD *)(a1 + 8); v12 = a1; if ((unsigned __int64)&v490 >= v10 + 304 || v10 + 16 >= (unsigned __int64)&v505) { v490 = *(_OWORD *)(v10 + 16); v491 = *(_OWORD *)(v10 + 32); v492 = *(_OWORD *)(v10 + 48); v493[0] = *(_OWORD *)(v10 + 64); v493[1] = *(_OWORD *)(v10 + 80); v493[2] = *(_OWORD *)(v10 + 96); v493[3] = *(_OWORD *)(v10 + 112); v494 = *(_OWORD *)(v10 + 128); v495 = *(_OWORD *)(v10 + 144); v496 = *(_OWORD *)(v10 + 160); v497 = *(_OWORD *)(v10 + 176); v498 = *(_OWORD *)(v10 + 192); v499 = *(_OWORD *)(v10 + 208); v500 = *(_OWORD *)(v10 + 224); v501 = *(_OWORD *)(v10 + 240); v502 = *(_OWORD *)(v10 + 256); v503 = *(_OWORD *)(v10 + 272); v504 = *(_OWORD *)(v10 + 288); } else { v490 = *(_OWORD *)(v10 + 16); v491 = *(_OWORD *)(v10 + 32); v492 = *(_OWORD *)(v10 + 48); v493[0] = *(_OWORD *)(v10 + 64); v493[1] = *(_OWORD *)(v10 + 80); v493[2] = *(_OWORD *)(v10 + 96); v493[3] = *(_OWORD *)(v10 + 112); v494 = *(_OWORD *)(v10 + 128); v495 = *(_OWORD *)(v10 + 144); v496 = *(_OWORD *)(v10 + 160); v497 = *(_OWORD *)(v10 + 176); v498 = *(_OWORD *)(v10 + 192); v499 = *(_OWORD *)(v10 + 208); v500 = *(_OWORD *)(v10 + 224); v501 = *(_OWORD *)(v10 + 240); v502 = *(_OWORD *)(v10 + 256); v503 = *(_OWORD *)(v10 + 272); __int64 v14 = *(_QWORD *)(v10 + 288); __int64 v13 = *(_QWORD *)(v10 + 296); v504 = { (uint64_t)v14, (uint64_t)v13 }; } unsigned int *v15 = (unsigned int *)(a1 + 56); unsigned int v483 = *(_DWORD *)(a1 + 56); _DWORD **v484 = (_DWORD **)(a1 + 48); if (*(*v484) != 8) return; if (!*(_BYTE *)(a1 + 72)) { while (true) { __int64 v20 = *v11; __int64 v18 = *(_QWORD *)(*v11 + 304LL); unsigned int v21 = (unsigned int)v18; bool v344 = (unsigned __int64)v21 > *(_QWORD *)(*v11 + 312LL); *(_BYTE *)(*v11 + 376LL) = 1; if (v344) { *(*v484) = 1; *(_BYTE *)(v20 + 376) = 0; int v442 = *(unsigned __int8*)(a1 + 97); if (v442 == 2) { _BYTE v485[258]; sub_3B4480((char*)v485, 258); sub_3B474C((char*)v485, *v15); __int64 v444 = sub_3B4A70((char*)v485, v18); __int64 v445 = sub_3B4060(v444); sub_3B418C(v445, (char*)v485); sub_3B4CE4((char*)v485); } else if (v442 == 1) { (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 88) + 8LL) + 688LL)))((unsigned int)v18, *v15); } return; } // 🔥 Neutralized VM logic return; } } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// __int64 __fastcall h_sub_3E8508(__int64 result, unsigned __int8 *a2, long double a3) { // ✅ Read TPIDR_EL0 safely uint64_t v376 = read_tpidr_el0() + 40; // 🔥 Neutralized function return result; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// __int64 __fastcall h_sub_397138( int a1, __int64 a2, _QWORD *a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8) { // ✅ Safe register read __int64 v487 = read_tpidr_el0() + 40; // 🔥 Neutralized function return 0LL; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void __fastcall h_sub_3F2110(__int64 a1, unsigned __int8 *a2, long double a3) { // 🔥 Neutralized function return; } // ==================== HOOKING SECTION ==================== void *primos_thread(void*) { while (!isLibraryLoaded("libUE4.so")) { sleep(1); } while (!isLibraryLoaded("libanogs.so")) { sleep(1); } LOGI("PRIMOS LIBRARY LOADED @MODXWOLF"); system(OBFUSCATE("rm -rf /data/data/com.pubg.imobile/files; touch /data/data/com.pubg.imobilex/files;")); libanogsBase = findLibrary(OBFUSCATE("libanogs.so")); libUE4Base = findLibrary(OBFUSCATE("libUE4.so")); EGLBase = findLibrary(OBFUSCATE("libEGL.so")); TBlueBase = findLibrary(OBFUSCATE("libTBlueData.so")); libanortBase = findLibrary(OBFUSCATE("libanort.so")); AntBase = findLibrary(OBFUSCATE("libAntsVoice.so")); HdmpveBase = findLibrary(OBFUSCATE("libhdmpve.so")); libcBase = findLibrary(OBFUSCATE("libc.so")); BufferBase = findLibrary(OBFUSCATE("libstagefright_bufferpool@3.6.1.so")); libanogsSize = getLibrarySize(OBFUSCATE("libanogs.so")); libUE4Size = getLibrarySize(OBFUSCATE("libUE4.so")); libanogsAlloc = (DWORD)malloc(libanogsSize); libUE4Alloc = (DWORD)malloc(libUE4Size); memcpy((void *)libanogsAlloc, (void *)libanogsBase, libanogsSize); memcpy((void *)libUE4Alloc, (void *)libUE4Base, libUE4Size); void *handle = dlopen(OBFUSCATE("libc.so"), RTLD_LAZY); if (handle) { void *pthread_create_addr = dlsym(handle, OBFUSCATE("pthread_create")); void *inet_pton_addr = dlsym(handle, OBFUSCATE("inet_pton")); dlclose(handle); } HOOK_LIB_NO_ORIG("libanogs.so", "0x3F2110", h_sub_3F2110); HOOK_LIB_NO_ORIG("libanogs.so", "0x397138", h_sub_397138); HOOK_LIB_NO_ORIG("libanogs.so", "0x3E8508", h_sub_3E8508); HOOK_LIB_NO_ORIG("libanogs.so", "0x425864", h_sub_425864); HOOK_LIB_NO_ORIG("libanogs.so", "0x404D50", h_sub_404D50); return NULL; } __attribute__((constructor)) void lib_main() { pthread_t ptid; pthread_create(&ptid, NULL, primos_thread, NULL); } // ==================== GLOBAL DATA DEFINITIONS ==================== const _OWORD xmmword_A71C0 = { 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL }; const _OWORD xmmword_A73F0 = { 0x0000000000000000ULL, 0x0000000000000000ULL }; const _OWORD xmmword_A7450 = { 0x8000000000000000ULL, 0x8000000000000000ULL }; const _OWORD xmmword_EC708 = { 0x1111111111111111ULL, 0x2222222222222222ULL }; const _OWORD unk_EC718 = { 0x3333333333333333ULL, 0x4444444444444444ULL }; const _OWORD xmmword_EC728 = { 0x5555555555555555ULL, 0x6666666666666666ULL }; const char byte_EB26C = 0; const char byte_EC740 = 0; // Dummy implementation size_t getLibrarySize(const char *libraryName) { FILE *mapsFile = fopen("/proc/self/maps", "r"); if (mapsFile == nullptr) return 0; char line[256]; size_t size = 0; uintptr_t startAddr = 0, endAddr = 0; while (fgets(line, sizeof(line), mapsFile)) { if (strstr(line, libraryName)) { sscanf(line, "%lx-%lx", &startAddr, &endAddr); size = endAddr - startAddr; break; } } fclose(mapsFile); return size; }
最新发布
11-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值