AutoMacTC是一个针对macOS环境的模块化自动取证分类收集框架,AutoMacTC旨在帮助研究人员轻松访问macOS环境中的各种取证信息以及数据文件,而且它还能够对这些取证文件及数据进行解析,并以可视化的形式呈现以供研究人员对其进行分析。除此之外,AutoMacTC的输出可以为研究人员解决macOS环境中的事件响应提供有价值的建议。值得一提的是,AutoMacTC可以在活动系统或固定磁盘(加载的卷)中直接运行。
1、Python 2.7(macOS原生自带了Python 2.7环境,之后该工具将增加Python 3的支持)
2、macOS目标系统,支持实时收集
3、macOS分析系统,进行已加载磁盘镜像的取证分类采集
广大研究人员可以使用git命令直接将该项目代码克隆至本地:
git clone https://github.com/CrowdStrike/automactc.git
广大研究人员可以直接使用下列命令调用AutoMacTC(注意:AutoMacTC需要使用sudo权限才能运行,应该从/usr/bin/python2.7中直接调用以确保功能的完整性):
sudo /usr/bin/python2.7 automactc.py -m all
上述命令将会使用默认配置运行所有模块(-m)。比如说,默认的输入目录为“/”,即当前卷宗的根目录,默认输出目录为“./”,默认输出文件名的前缀为“automactc-output”,默认输出文件格式为“CSV”,默认CPU优先级将被设置为“低”,所有的输出文件压缩格式为tar.gz。
查看所有的可用模块列表:
automactc.py -l
输入目录和输出目录可以使用“-i”或“-o”选项来进行相应配置:
automactc.py -i / -o /automactc_output -m all
我们还可以直接在运行参数后面加上需要包含或排除的模块名称:
automactc.py -m pslist bash profiler
或者,我们也可以排除使用特定模块:
automactc.py -x dirlist autoruns
针对每一个模块,AutoMacTC将会生成对应的输出文件,并向其中填充数据。输出文件格式默认为CSV,但是可以使用“fmt”参数来修改为JSON格式:
automactc.py -m all -fmt json
输出文件填充完成之后,文件将会被转换为.tar格式。当最后一个模块的输出文件生成之后,AutoMacTC将会使用GZIP将所有输出报告压缩为.tar.gz文档。
tar文件名遵循下列命名规范:
prefix,hostname,ip,automactc_runtime.tar
第一个perfix可以使用“-p”参数指定,如果不指定,那么前缀默认为“automactc-output”。其他的数据域会在程序运行过程中进行填充。如果你需要在多个系统中运行AutoMacTC的话,你可以尝试为单一事件生成取证报告:
automactc.py -m all -p granny-smith
若你不想生成tar文档的话,可以使用下列命令获取原始文件:
automactc.py -m all -p granny-smith -nt
-pslist(automatc运行时的当前进程列表) -lsof(automatcc运行时打开的当前文件句柄) -netstat(automatcc运行时的当前网络连接) -ASL(解析的Apple系统日志(.asl)文件) -autoruns(解析各种持久性位置和plist) -bash(为所有用户解析bash/*\u历史文件) -chrome(解析chrome访问历史和下载历史) -coreAnalytics(解析由Apple Diagnostics生成的程序执行证据) -dirlist (列出磁盘上的所有文件和目录) -firefox(解析Firefox访问历史和下载历史) -installhistory(分析程序安装历史) -mru(解析sfl和mru plist文件) -quarantines(分析QuarantineEventSv2数据库) -quicklook(分析QuickLooks数据库) -safari(解析Safari访问历史和下载历史) -spotlight(分析用户spotlight顶部搜索) -ssh(为每个用户解析已知的主机和授权的密钥文件) -syslog(分析system.log文件) -systeminfo(基本系统标识,如当前IP地址、序列号、主机名) -terminalstate(分析终端保存状态文件) -users(列出系统上现有和已删除的用户) -utmpx(列出终端上的用户会话)
禁用verbose调试日志生成:
automactc.py -m all -nl
使用静默模式运行AutoMacTC:
automactc.py -m all -q
在控制台显示调试信息:
automactc.py -m all -d
以常规CPU优先级运行AutoMacTC:
automactc.py -m all -r
usage: automactc.py [-m INCLUDE_MODULES [INCLUDE_MODULES ...] | -x EXCLUDE_MODULES [EXCLUDE_MODULES ...] | -l] [-h] [-i INPUTDIR] [-o OUTPUTDIR] [-p PREFIX] [-f] [-nt] [-nl] [-fmt {csv,json}] [-np] [-b] [-q | -d] [-K DIR_INCLUDE_DIRS [DIR_INCLUDE_DIRS ...]] [-E DIR_EXCLUDE_DIRS [DIR_EXCLUDE_DIRS ...]] [-H DIR_HASH_ALG [DIR_HASH_ALG ...]] [-S DIR_HASH_SIZE_LIMIT] [-R] [-NC] [-NM] AutoMacTC: an Automated macOS forensic triage collection framework. module filter: -m INCLUDE_MODULES [INCLUDE_MODULES ...], --include_modules INCLUDE_MODULES [INCLUDE_MODULES ...] module(s) to use, use "all" to run all modules, space separated list only -x EXCLUDE_MODULES [EXCLUDE_MODULES ...], --exclude_modules EXCLUDE_MODULES [EXCLUDE_MODULES ...] assumes you want to run all modules EXCEPT those specified here, space separated list only -l, --list_modules if flag is provided, will list available modules and exit. general arguments: -h, --help show this help message and exit -i INPUTDIR, --inputdir INPUTDIR input directory (mount dmg with mountdmg.sh script and use -f to analyze mounted HFS or APFS Volume) -o OUTPUTDIR, --outputdir OUTPUTDIR output directory -p PREFIX, --prefix PREFIX prefix to append to tarball and/or output files -f, --forensic_mode if flag is provided, will analyze mounted volume provided as inputdir -nt, --no_tarball if flag is provided, will NOT package output files into tarball -nl, --no_logfile if flag is provided, will NOT generate logfile on disk -fmt {csv,json}, --output_format {csv,json} toggle between csv and json output, defaults to csv -np, --no_low_priority if flag is provided, will NOT run automactc with highest niceness (lowest CPU priority). high niceness is default -b, --multiprocessing if flag is provided, WILL multiprocess modules [WARNING: Experimental!] console logging verbosity: -q, --quiet if flag is provided, will NOT output to console at all -d, --debug enable debug logging to console specific module arguments: -K DIR_INCLUDE_DIRS [DIR_INCLUDE_DIRS ...], --dir_include_dirs DIR_INCLUDE_DIRS [DIR_INCLUDE_DIRS ...] directory inclusion filter for dirlist module, defaults to volume root, space separated list only -E DIR_EXCLUDE_DIRS [DIR_EXCLUDE_DIRS ...], --dir_exclude_dirs DIR_EXCLUDE_DIRS [DIR_EXCLUDE_DIRS ...] directory and file exclusion filter for dirlist module. defaults are specified in README. space separated list only. put 'no-defaults' as first item to overwrite default exclusions and then provide your own exclusions -H DIR_HASH_ALG [DIR_HASH_ALG ...], --dir_hash_alg DIR_HASH_ALG [DIR_HASH_ALG ...] either sha256 or md5 or both or none, at least one is recommended, defaults to sha256\. also applies to autoruns module -S DIR_HASH_SIZE_LIMIT, --dir_hash_size_limit DIR_HASH_SIZE_LIMIT file size filter for which files to hash, in megabytes, defaults to 10MB. also applies to autoruns module -R, --dir_recurse_bundles will fully recurse app bundles if flag is provided. this takes much more time and space -NC, --dir_no_code_signatures if flag is provided, will NOT check code signatures for app and kext files. also applies to autoruns module -NM, --dir_no_multithreading if flag is provided, will NOT multithread the dirlist module
AutoMacTC:https://github.com/CrowdStrike/automactc
*参考来源:CrowdStrike,FB小编Alpha_h4ck编译,转载请注明来自FreeBuf.COM