opa334 / ChOma

C library for manipulating MachO/FAT files and their code signatures
MIT License
337 stars 41 forks source link

The target program crashes after injection #16

Open slancyking opened 6 months ago

slancyking commented 6 months ago

I use insert_dylib and ct_bypass to inject some apps. Some can start normally, but some software will crash. For example, this log. I tried to change other frameworks that inject it, and the same is true. 1715154716176

alfiecg24 commented 6 months ago

Did you re-sign the dynamic library that it tries to load?

alfiecg24 commented 6 months ago

I believe loaded dynamic libraries need to have the same team ID as the target app.

slancyking commented 6 months ago

So I am very confused. No matter whether my library libA.dylib is signed with codesign or not, it will crash wechat, but when it is injected into youtube, it is normal. This library simply creates a thread and prints one line every 5 seconds. Just a log.

alfiecg24 commented 6 months ago

This is more likely an issue with WeChat - it may be detecting that it is sideloaded or being injected into.

slancyking commented 6 months ago

error in dyld JustInTimeLoader::loadDependents code version:1042.1 diag.error("Library not loaded: %s\n Referenced from: <%s> %s%s\n Reason: %s", loadPath, fromUuidStr, this->path(), tooNewBinaryDiag.errorMessageCStr(), depDiag.errorMessageCStr());

alfiecg24 commented 2 weeks ago

Do you know if this was ever resolved? If not, I will close this issue at the end of November as stale.