Skip to content

Commit

Permalink
注释修改
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAshers committed Apr 23, 2024
1 parent 67800df commit 525d343
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion mobsf/StaticAnalyzer/views/android/cert_analysis.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf_8 -*-
"""Module holding the functions for code analysis."""
"""Module holding the functions for cert analysis."""

import hashlib
import logging
Expand Down
14 changes: 10 additions & 4 deletions mobsf/StaticAnalyzer/views/android/static_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def static_analyzer(request, checksum, api=False):
app_dic['app_dir'],
True,
)
# Set Manifest link
# 设置 Manifest 连接
man_data_dic = manifest_data(app_dic['parsed_xml'], ns)

app_name = app_dic['real_name']
Expand All @@ -215,8 +215,10 @@ def static_analyzer(request, checksum, api=False):
msg = f'Performing Static Analysis on: {subject}'
logger.info(msg)

# get_app_details 获取 APP 详细数据
app_dic['playstore'] = get_app_details(
man_data_dic['packagename'])
# manifest_analysis 是对 AndroidManifest.xml 文件的处理
man_an_dic = manifest_analysis(
app_dic['parsed_xml'],
ns,
Expand All @@ -233,25 +235,29 @@ def static_analyzer(request, checksum, api=False):
# apktool should run before this
get_icon_apk(apk, app_dic)

# elf_analysis 是二进制分析
elf_dict = library_analysis(
app_dic['app_dir'],
app_dic['md5'],
'elf')
# cert_info是对证书的分析
cert_dic = cert_info(
apk,
app_dic,
man_data_dic)
# apkid_analysis 是对 apkid 的分析
apkid_results = apkid.apkid_analysis(app_dic[
'app_dir'], app_dic['app_path'], app_dic['app_name'])
# Trackers 追踪检测
tracker = Trackers.Trackers(
app_dic['app_dir'], app_dic['tools_dir'])
tracker_res = tracker.get_trackers()

# apk_2_java 反编译为 Java 代码
apk_2_java(app_dic['app_path'], app_dic['app_dir'],
app_dic['tools_dir'])

# dex_2_smali 反编译为 smali 代码
dex_2_smali(app_dic['app_dir'], app_dic['tools_dir'])

# code_analysis 代码分析
code_an_dic = code_analysis(
app_dic['app_dir'],
'apk',
Expand Down
1 change: 1 addition & 0 deletions mobsf/StaticAnalyzer/views/common/shared_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ def get_avg_cvss(findings):
if find['cvss'] != 0:
cvss_scores.append(find['cvss'])
if cvss_scores:
# 四舍五入
avg_cvss = round(sum(cvss_scores) / len(cvss_scores), 1)
if not getattr(settings, 'CVSS_SCORE_ENABLED', False):
avg_cvss = None
Expand Down
3 changes: 2 additions & 1 deletion mobsf/templates/general/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
<h1>关于 AndroMSF</h1>

<p class="lead">
AndroMSF 是2020级计算机学院周梓豪做的毕业设计,是一个基于 Androguard 的 Android 应用安全分析系统。
AndroMSF 是南京审计大学 2020 级计算机学院周梓豪做的毕业设计,是一个基于 Androguard 的 Android 应用安全分析系统。AndroMSF 使用 Django 框架开发,使用 sqlite 进行存储
</p>
<p> <strong>项目地址:</strong> <a href="https://github.com/MrAshers/AGMSF.git">MrAshers/AGMSF</a> </p>
<p> <strong>作者:</strong> <a href="https://mrashers.github.io">MrAshers</a> </p>

</div>
Expand Down
4 changes: 2 additions & 2 deletions mobsf/templates/general/not_found.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h3>检测的HASH记录没找到</h3>
<p class="lead">找不到匹配的MD5 HASH记录</p>
<h3>检测的 HASH 记录没找到</h3>
<p class="lead">找不到匹配的 MD5 HASH 记录</p>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions mobsf/templates/pdf/android_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ <h2><i class="fas fa-fingerprint"></i> APKID 分析</h2>
</table>
{% endif %}
{% if browsable_activities %}
<h2><i class="fas fa-clone"></i> BROWSABLE ACTIVITIES</h2>
<h2><i class="fas fa-clone"></i> 可浏览的 ACTIVITIES</h2>
<table class="basic">
<thead>
<tr>
Expand Down Expand Up @@ -758,7 +758,7 @@ <h2><i class="fa fa-braille"></i> 滥用权限</h2>
</thead>
<tbody>
<tr>
<td>恶意权限</td>
<td>顶级恶意权限</td>
<td>{{ malware_permissions.top_malware_permissions | length}}</b>/{{malware_permissions.total_malware_permissions}}</td>
<td>
{{ malware_permissions.top_malware_permissions | join:", "}}
Expand All @@ -775,7 +775,7 @@ <h2><i class="fa fa-braille"></i> 滥用权限</h2>
</table>
<hr>
<p>
<h3>恶意权限:</h3> 已知恶意软件广泛滥用的顶级权限。
<h3>顶级恶意权限:</h3> 已知恶意软件广泛滥用的顶级权限。
<br/>
<h3>其他常见权限:</h3> 已知恶意软件通常滥用的权限。
</p>
Expand Down
6 changes: 3 additions & 3 deletions mobsf/templates/static_analysis/android_binary_analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<a href="#browsable" class="nav-link">
<i class="nav-icon fas fa-clone"></i>
<p>
BROWSABLE ACTIVITIES
可浏览的 ACTIVITIES
</p>
</a>
</li>
Expand Down Expand Up @@ -838,7 +838,7 @@ <h3>{{ providers | length }}</h3>
<div class="card">
<div class="card-body">
<p>
<strong><i class="fas fa-clone"></i> BROWSABLE ACTIVITIES</strong>
<strong><i class="fas fa-clone"></i> 可浏览的 ACTIVITIES</strong>
</p>
<div class="table-responsive">
<table id="table_browsable" class="table table-bordered table-hover table-striped">
Expand Down Expand Up @@ -1756,7 +1756,7 @@ <h5 class="description-header">{{ code_analysis.summary.suppressed }}</h5>
</div>
<hr>
<p>
<strong>恶意权限</strong> 是已知恶意软件广泛滥用的顶级权限。
<strong>顶级恶意权限</strong> 是已知恶意软件广泛滥用的顶级权限。
<br/>
<strong>其他常见权限</strong> 是已知恶意软件通常滥用的权限。
</p>
Expand Down
4 changes: 2 additions & 2 deletions mobsf/templates/static_analysis/android_source_analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<a href="#browsable" class="nav-link">
<i class="nav-icon fas fa-clone"></i>
<p>
BROWSABLE ACTIVITIES
可浏览的 ACTIVITIES
</p>
</a>
</li>
Expand Down Expand Up @@ -687,7 +687,7 @@ <h3>{{ providers | length }}</h3>
<div class="card">
<div class="card-body">
<p>
<strong><i class="fas fa-clone"></i> BROWSABLE ACTIVITIES</strong>
<strong><i class="fas fa-clone"></i> 可浏览的 ACTIVITIES</strong>
</p>
<div class="table-responsive">
<table id="table_browsable" class="table table-bordered table-hover table-striped">
Expand Down
6 changes: 3 additions & 3 deletions mobsf/templates/static_analysis/compare.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<a href="#browsable" class="nav-link">
<i class="nav-icon fas fa-clone"></i>
<p>
BROWSABLE ACTIVITIES
可浏览的 ACTIVITIES
</p>
</a>
</li>
Expand Down Expand Up @@ -634,7 +634,7 @@ <h4 class="box-title">仅在 {{ second_app.name_ver }}</h4>
<div class="card">
<div class="card-body">
<p>
<strong><i class="fas fa-clone"></i> BROWSABLE ACTIVITIES</strong>
<strong><i class="fas fa-clone"></i> 可浏览的 ACTIVITIES</strong>
</p>
{% if browsable_activities %}
<div class="table-responsive">
Expand Down Expand Up @@ -842,7 +842,7 @@ <h4 class="box-title">仅在 {{ second_app.name_ver }}</h4>
</table>
</div>
{% else %}
<p align="center"><strong>出错了/ 没有 browsable activities</strong></p>
<p align="center"><strong>出错了/ 没有可浏览的 activities</strong></p>
{% endif %}
</div>
</div><!-- /.card -->
Expand Down

0 comments on commit 525d343

Please sign in to comment.