===================================
0x01 工具介绍
mobsfscan 是一个静态分析工具,可以在您的 Android 和 iOS 源代码中找到不安全的代码模式。支持 Java、Kotlin、Swift 和 Objective C 代码。mobsfscan 使用 MobSF 静态分析规则,由 semgrep 和 libsast 模式匹配器提供支持。
0x02 安装与使用
pip install mobsfscan需要 Python 3.7+
$ mobsfscan tests/assets/src/- Pattern Match ████████████████████████████████████████████████████████████ 3- Semantic Grep ██████ 37mobsfscan: v0.0.2 | Ajin Abraham | opensecurity.in╒══════════════╤════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╕│ RULE ID │ android_webview_ignore_ssl │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ DESCRIPTION │ Insecure WebView Implementation. WebView ignores SSL Certificate errors and accept any SSL Certificate. This application is vulnerable to MITM attacks │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ TYPE │ RegexAnd │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ PATTERN │ ['onReceivedSslError\(WebView', '\.proceed\(\);'] │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ SEVERITY │ ERROR │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ INPUTCASE │ exact │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ CVSS │ 7.4 │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ CWE │ CWE-295 Improper Certificate Validation │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ OWASP-MOBILE │ M3: Insecure Communication │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ MASVS │ MSTG-NETWORK-3 │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ REF │ https://github.com/MobSF/owasp-mstg/blob/master/Document/0x05g-Testing-Network-Communication.md#webview-server-certificate-verification │├──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│ FILES │ ╒════════════════╤═════════════════════════════════════════════════════════════════════════════════════════════╕ ││ │ │ File │ ../test_files/android_src/app/src/main/java/opensecurity/webviewignoressl/MainActivity.java │ ││ │ ├────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────┤ ││ │ │ Match Position │ 1480 - 1491 │ ││ │ ├────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────┤ ││ │ │ Line Number(s) │ 50 │ ││ │ ├────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────┤ ││ │ │ Match String │ .proceed(); │ ││ │ ├────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────┤ ││ │ │ File │ ../test_files/android_src/app/src/main/java/opensecurity/webviewignoressl/MainActivity.java │ ││ │ ├────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────┤ ││ │ │ Match Position │ 1331 - 1357 │ ││ │ ├────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────┤ ││ │ │ Line Number(s) │ 46 │ ││ │ ├────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────┤ ││ │ │ Match String │ onReceivedSslError(WebView │ ││ │ ╘════════════════╧═════════════════════════════════════════════════════════════════════════════════════════════╛ │╘══════════════╧════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╛
0x03 项目链接下载
推荐站内搜索:最好用的开发软件、免费开源系统、渗透测试工具云盘下载、最新渗透测试资料、最新黑客工具下载……




还没有评论,来说两句吧...