
محلل سجلات وأحداث أندرويد وبروتوبوف

إذا كنت تريد المساهمة، راسلني هنا: https://abrignoni.github.io
المقالات هنا: https://leapps.org/blog
بايثون 3.10 أو أحدث
تبعيات بيئة بايثون الخاصة بك مذكورة في requirements.txt. قم بتثبيتها باستخدام الأمر أدناه. تأكد من
أن جزء py صحيح لبيئتك، مثل py أو python أو python3 وما إلى ذلك.
py -m pip install -r requirements.txt
أو
pip3 install -r requirements.txt
للتشغيل على لينكس، ستحتاج أيضًا إلى تثبيت tkinter بشكل منفصل كما يلي:
sudo apt-get install python3-tk
للتحويل إلى ملف تنفيذي حتى تتمكن من تشغيل هذا على نظام بدون تثبيت بايثون.
نظام ويندوز
لإنشاء 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
لينكس
لإنشاء 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
كل إضافة هي ملف مصدر بايثون يجب إضافته إلى مجلد scripts/artifacts والذي سيتم تحميله ديناميكيًا في كل مرة يتم فيها تشغيل ALEAPP.
يجب أن يحتوي ملف مصدر الإضافة على قاموس باسم __artifacts_v2__ في بداية الوحدة، والذي يعرّف الأدلة الرقمية التي تعالجها الإضافة. يجب أن تكون المفاتيح في قاموس __artifacts_v2__ معرفات للأدلة الرقمية ويجب أن تكون فريدة داخل ALEAPP. يجب أن تكون القيم قواميس تحتوي على المفاتيح التالية:
name: اسم الدليل الرقمي كنص.description: وصف الدليل الرقمي كنص.author: مؤلف الإضافة كنص.version: إصدار الدليل الرقمي كنص.date: تاريخ آخر تحديث للدليل الرقمي كنص.requirements: أي متطلبات لمعالجة الدليل الرقمي كنص.category: فئة الدليل الرقمي كنص.notes: أي ملاحظات إضافية كنص.paths: مجموعة (tuple) من النصوص تحتوي على أنماط بحث 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
من المتوقع عمومًا أن توفر الإضافات مخرجات بصيغة HTML الخاصة بـ ALEAPP، وصيغة 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.