iOS利用dumpdecrypted.dylib注入解密時出現如下警告
dyld: warning: could not load inserted library 'dumpdecrypted.dylib' into hardened process because no suitable image found. Did find:
dumpdecrypted.dylib: code signature in (dumpdecrypted.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
Abort trap: 6
經分析是 dumpdecrypted.dylib缺少簽名,重新給dumpdecrypted.dylib簽名後再用即可。
方法如下:
1、終端指令找出電腦中可簽名證書
security find-identity -v -p codesigning
2、cd到dumpdecrypted.dylib目錄,給dumpdecrypted.dylib簽名
codesign --force --verify --verbose --sign "iPhone Developer: Test TestName (1234TESTCODE)" dumpdecrypted.dylib
得到結果為
dumpdecrypted.dylib: signed Mach-O universal (armv7 armv7s arm64) [dumpdecrypted]