工具:从日志中找出APT痕迹

admin 2025-12-14 22:47:30 网络安全文章 来源:ZONE.CI 全球网 0 阅读模式

文章总结: APT-Hunter是一款针对Windows事件日志的威胁搜索工具,可检测隐藏在日志中的APT活动,加速日志分析过程。该工具支持CSV和EVTX格式日志,通过正则表达式提取关键事件字段,生成Excel报告和TimeSketch兼容的CSV文件,帮助安全分析师快速识别可疑活动。工具使用简单,只需安装Python3和所需库,通过命令行参数指定日志路径和输出文件名即可。 综合评分: 85 文章分类: 安全工具,威胁情报,应急响应,漏洞分析,安全运营


cover_image

工具:从日志中找出APT痕迹

原创

MicroPest

MicroPest

2021年1月26日 23:35

APT-Hunter 是一个针对 windows 事件日志的威胁搜索工具,这个工具由《purple team》提供,可以检测隐藏在 windows 事件日志海洋中的 APT 动作,从而减少发现可疑活动的时间。此工具将充分利用收集的 windows 事件日志,并确保不遗漏被配置为检测的关键事件。

    这个工具将用于加速 windows日志分析,但永远不会取代深入的日志分析。请注意,这个工具是一个测试版本,可能包含错误。

一、使用简介

   首先要做的就是收集日志。如果没有的话,使用 powershell 日志收集器可以很容易地自动收集所需的日志。

1、要收集 EVTX 格式的日志,

windows-log-collector-full-v3-EVTX.ps1

2、要以 CSV 格式收集日志,

windows-log-collector-full-v3-CSV.ps1

3、APT-Hunter 使用 python3,先安装所需库:

 Python3 -m pip install -r Requirements.txt

4、python3 APT-Hunter.py -h

usage: APT-Hunter.py [-h] [-p PATH] [-o OUT] [-t {csv,evtx}]

-h, –help show this help message and exit

-p PATH, –path PATH path to folder containing windows event logs generated by the APT-Hunter-Log-Collector.ps1

-o OUT, –out OUT output file name

-t {csv,evtx}, –type {csv,evtx} csv ( logs from get-eventlog or windows event log GUI or logs from Get-WinEvent ) , evtx ( EVTX extension windows event log )

–security SECURITY Path to Security Logs

–system SYSTEM Path to System Logs

–scheduledtask SCHEDULEDTASK Path to Scheduled Tasks Logs

–defender DEFENDER Path to Defender Logs

–powershell POWERSHELL Path to Powershell Logs

–powershellop POWERSHELLOP Path to Powershell Operational Logs

–terminal TERMINAL Path to TerminalServices LocalSessionManager Logs

–winrm WINRM Path to Winrm Logs

–sysmon SYSMON Path to Sysmon Logs

-p : provide path to directory containing the extracted using the powershell log collectors ( windows-log-collector-full-v3-CSV.ps1 , windows-log-collector-full-v3-EVTX.ps1 ) .

-o : name of the project which will be used in the generated output sheets

-t : the log type if its CSV or EVTX

    分析 CSV 日志:APT-hunter使用内建库(CSV)解析CSV日志文件,然后使用Regex为APT-hunter中使用的每个事件提取字段,用户可以使用提取的字段来创建他们的用例。

二、举例

1、3个例子:

python3 APT-Hunter.py -t evtx -p c:\wineventlogs -o Project1

python3 APT-Hunter.py -t csv -p c:\wineventlogs -o Project1

python3 APT-Hunter.py -t evtx –security evtx\security.evtx –powershell evtx\powershell.evtx -o Project2

对照上面的参数,按图索骥即可。

2、分析图:

Project1_report.xlsx: 这个excel将包括从提供给 APT-Hunter 的每个窗口日志中检测到的所有事件。

Project1_TimeSketch.csv: 这个CSV文件,你可以上传到Timesketch分析,以便有时间线分析,将帮助您看到攻击的全貌。

上传CSV文件到TimeSketch实例的截图;

每个日志来源的发现。

用于终端服务的统计数据,以便用户能够以交互方式访问服务器 GUI 终端或使用 RDP。

成功/失败身份验证的统计数字,以便为身份验证提供摘要,从而帮助您检测不应登录到设备的异常或用户。

三、工具下载

链接:https://pan.baidu.com/s/1sCUYv-PzwMuRY0t2QTBNsA

提取码:3cfg


评论:0   参与:  9