
如果你想贡献,请在这里联系我:https://abrignoni.github.io
博客文章在这里:https://leapps.org/blog
Python 3.10 或更高版本
适用于你的 Python 环境的依赖项列在 requirements.txt 中。使用以下命令安装它们。确保 py 部分对于你的环境是正确的,例如 py、python 或 python3 等。
py -m pip install -r requirements.txt
或
pip3 install -r requirements.txt
要在 Linux 上运行,你还需要单独安装 tkinter,如下所示:
sudo apt-get install python3-tk
编译为可执行文件,以便你可以在没有安装 Python 的系统上运行此工具。
Windows 操作系统
要创建 aleapp.exe,请运行:
pyinstaller scripts\pyinstaller\aleapp.spec
要创建 aleappGUI.exe,请运行:
pyinstaller scripts\pyinstaller\aleappGUI.spec
macOS
要创建 aleapp,请运行:
pyinstaller scripts/pyinstaller/aleapp_macOS.spec
要创建 aleappGUI.app,请运行:
pyinstaller scripts/pyinstaller/aleappGUI_macOS.spec
Linux
要创建 aleapp,请运行:
pyinstaller scripts/pyinstaller/aleapp_Linux.spec
要创建 aleappGUI,请运行:
pyinstaller scripts/pyinstaller/aleappGUI_Linux.spec
$ python aleapp.py -t <zip | tar | fs | gz> -i <path_to_extraction> -o <path_for_report_output>
$ python aleappGUI.py
$ python aleapp.py --help
每个插件都是一个 Python 源文件,应添加到 scripts/artifacts 文件夹中,该文件夹中的插件会在每次运行 ALEAPP 时被动态加载。
插件源文件必须在模块的最开头包含一个名为 __artifacts_v2__ 的字典,该字典定义了插件要处理的工件。__artifacts_v2__ 字典中的键应为工件 ID,且必须在 ALEAPP 内唯一。值应为包含以下键的字典:
name:工件的名称,以字符串表示。description:工件的描述,以字符串表示。author:插件作者,以字符串表示。version:工件的版本,以字符串表示。date:工件上次更新的日期,以字符串表示。requirements:处理工件所需的任何要求,以字符串表示。category:工件的类别,以字符串表示。notes:任何附加说明,以字符串表示。paths:一个字符串元组,包含用于匹配插件预期工件数据路径的 glob 搜索模式。function:作为工件处理入口点的函数名称,以字符串表示。例如:
__artifacts_v2__ = {
"cool_artifact_1": {
"name": "Cool Artifact 1",
"description": "Extracts cool data from database files",
"author": "@username",
"version": "0.1",
"date": "2022-10-25",
"requirements": "none",
"category": "Really cool artifacts",
"notes": "",
"paths": ('*/com.android.cooldata/databases/database*.db',),
"function": "get_cool_data1"
},
"cool_artifact_2": {
"name": "Cool Artifact 2",
"description": "Extracts cool data from XML files",
"author": "@username",
"version": "0.1",
"date": "2022-10-25",
"requirements": "none",
"category": "Really cool artifacts",
"notes": "",
"paths": ('*/com.android.cooldata/files/cool.xml',),
"function": "get_cool_data2"
}
}
在 __artifacts__ 字典中被引用为入口点的函数必须接受以下参数:
例如:
def get_cool_data1(files_found, report_folder, seeker, wrap_text):
pass # do processing here
插件通常需要以 ALEAPP 的 HTML 输出格式、TSV 格式提供输出,并可选择将记录提交到时间线。用于生成这些输出的函数可以在 artifact_report 和 ilapfuncs 模块中找到。从高层来看,一个示例可能如下所示:
__artifacts_v2__ = {
"cool_artifact_1": {
"name": "Cool Artifact 1",
"description": "Extracts cool data from database files",
"author": "@username", # Replace with the actual author's username or name
"version": "0.1", # Version number
"date": "2022-10-25", # Date of the latest version
"requirements": "none",
"category": "Really cool artifacts",
"notes": "",
"paths": ('*/com.android.cooldata/databases/database*.db',),
"function": "get_cool_data1"
}
}
import datetime
from scripts.artifact_report import ArtifactHtmlReport
import scripts.ilapfuncs
def get_cool_data1(files_found, report_folder, seeker, wrap_text):
# let's pretend we actually got this data from somewhere:
rows = [
(datetime.datetime.now(), "Cool data col 1, value 1", "Cool data col 1, value 2", "Cool data col 1, value 3"),
(datetime.datetime.now(), "Cool data col 2, value 1", "Cool data col 2, value 2", "Cool data col 2, value 3"),
]
headers = ["Timestamp", "Data 1", "Data 2", "Data 3"]
# HTML output:
report = ArtifactHtmlReport("Cool stuff")
report_name = "Cool DFIR Data"
report.start_artifact_report(report_folder, report_name)
report.add_script()
report.write_artifact_data_table(headers, rows, files_found[0]) # assuming only the first file was processed
report.end_artifact_report()
# TSV output:
scripts.ilapfuncs.tsv(report_folder, headers, rows, report_name, files_found[0]) # assuming first file only
# Timeline:
scripts.ilapfuncs.timeline(report_folder, report_name, rows, headers)
此工具是 DFIR 社区中许多人共同努力的成果。
ALEAPP 徽标由 Derek Eiri 提供。