Closed Karmaz95 closed 1 year ago
👋 @Karmaz95 Issues is only for reporting a bug/feature request. For limited support, questions, and discussions, please join MobSF Slack channel Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.
Addressed in #2234
Hello, I am working on a project about Mach-O binaries for ARM64. I was researching the idea of stripping symbols in Mach-O binaries, and I found a False Negative scenario for this code: https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/28b7fdeca5a806a3d429593c8eec012373fe2b24/mobsf/StaticAnalyzer/views/ios/macho_analysis.py#L226
We got two Objective-C simple programs. First is not stripped:
The second is stripped (strip arc_example -o ss_example):
Then we run your function on these binaries, and we can see that it returns a True for both of them:
To sum up, there is a problem with
symbol.type & 0x0e > 0
check, which omits the types:__mh_execute_header
.I came to the below solutions for this problem:
So the final code would look like this:
These changes made the function more accurate and coped with all cases during my tests. The following screenshot shows it on
arc_example
(not stripped) andss_example
(stripped) sampleI created a pull request for this issue.