我们使用 MobSF 测试了我们的一款 iOS 应用程序,报告强调该二进制文件已设置运行路径搜索路径 (@rpath)。在某些情况下,攻击者可以滥用此功能来运行任意可执行文件以执行代码和权限升级。
我运行了otool -L二进制文件来检查涉及哪些依赖项。事实证明,所有 pod(Cocaopod)和一些系统库都受到关注。
name @rpath/Alamofire.framework/Alamofire (offset 24)
name @rpath/libswiftCoreAudio.dylib (offset 24)
name @rpath/libswiftCoreData.dylib (offset 24)
name @rpath/libswiftCoreFoundation.dylib (offset 24)
Run Code Online (Sandbox Code Playgroud)
我想知道如何解决这个问题。Runpath Search Paths如果项目构建设置不包含 $(inherited),Cocoapods 会打印警告。
使用 @rpath 被认为有害吗?任何帮助/信息表示赞赏。