Cyber Security Logs Analytics


  1. 說明
    1. Email
    2. IIS Logs
    3. Windows Events
  2. 綜合分析
    1. Logs 時間軸製作工具
    2. Windows Prefetch
    3. TCP View

筆記如何使用鑑識工具操作與進行證據追蹤分析 😮 但其實就是基本的 Email, IIS Logs 以及 Windows Events 分析,以及綜合上述的 Logs 資訊來判斷作業系統是否有遭受到惡意入侵 😉

logo

說明

Email

from email import parser

with open(r'mail.eml', 'r') as f:
    mail = ''.join(f.readlines())

parse = parser.HeaderParser().parsestr(mail)

for key, value in parse.items():
    if 'Received' in key:
        print(key, value)

師傅,這邊加一個範例用的 eml 檔內容,提供分析使用:

可以使用 Google MessageHeader 分析電子郵件 Headers。

IIS Logs

  • 留意大量的 404
  • 留意 POST 使用的 cs-uri-stem

Log Parser 工具在手 紀錄我有 | IIS W3C Logs 分析指南

Windows Events

使用 Event Log Explorer 來輔助分析 Windows Events 資料,例如判別登入類型,來發現可疑的行為。

綜合分析

Logs 時間軸製作工具

Plaso dependes on Python

psteal.exe --source C:\temp\disk.dd -o l2tcsv -w c:\temp\output.csv

Windows Prefetch

Windows Prefetch 會顯示最近執行過的檔案,資料夾需要 Admins 權限存取,檔案副檔名為 pf。

C:\Windows\Prefetch

TCP View

使用 sysinternals TCP View 分析目前作業系統上 Process 的連線行為。