
안드로이드 로그 이벤트 및 Protobuf 파서

기여하고 싶다면 여기로 연락주세요: 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 OS
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__ 딕셔너리의 키는 ALEAPP 내에서 고유해야 하는 아티팩트의 ID여야 합니다. 값은 다음 키를 포함하는 딕셔너리여야 합니다:
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__ 딕셔너리에서 진입점으로 참조되는 함수는 다음 인수를 받아야 합니다:
FileSeekerBase 타입)예를 들어:
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가 제공했습니다.