# Check where are the @rpath locationsotool-l"/Applications/VulnDyld.app/Contents/Resources/lib/binary"|grepLC_RPATH-A2cmdLC_RPATHcmdsize32path@loader_path/. (offset 12)--cmdLC_RPATHcmdsize32path@loader_path/../lib2 (offset 12)
# Check librareis loaded using @rapth and the used versionsotool-l"/Applications/VulnDyld.app/Contents/Resources/lib/binary"|grep"@rpath"-A3name@rpath/lib.dylib (offset 24)time stamp 2 Thu Jan 1 01:00:02 1970currentversion1.0.0compatibilityversion1.0.0# Check the versions
gcc-dynamiclib-current_version1.0-compatibility_version1.0-frameworkFoundation/tmp/lib.m-Wl,-reexport_library,"/Applications/VulnDyld.app/Contents/Resources/lib2/lib.dylib"-o"/tmp/lib.dylib"# Note the versions and the reexport
在库中创建的重新导出路径是相对于加载器的,让我们将其更改为库的绝对路径以进行导出:
#Check relativeotool-l/tmp/lib.dylib|grepREEXPORT-A2cmdLC_REEXPORT_DYLIBcmdsize48name@rpath/libjli.dylib (offset 24)#Change the location of the library absolute to absolute pathinstall_name_tool-change@rpath/lib.dylib"/Applications/VulnDyld.app/Contents/Resources/lib2/lib.dylib"/tmp/lib.dylib# Check againotool-l/tmp/lib.dylib|grepREEXPORT-A2cmdLC_REEXPORT_DYLIBcmdsize128name/Applications/BurpSuiteProfessional.app/Contents/Resources/jre.bundle/Contents/Home/lib/libjli.dylib (offset 24)