Analyze Security Event Log with Microsoft Message Analyzer

日本語の解説は、本記事の後半に記載しています。

 

Hello, my name is Kazuo Wakabayashi, Premier Field Engineer in Windows Platform technologies. Today, I would like to explain how to analyze EventLogs easily using Microsoft Message Analyzer (MMA). Microsoft Message Analyzer is a powerful tool for capturing, displaying, and analyzing data. You can download latest version (currently version 1.3.1) from download center.

 

Microsoft Message Analyzer

https://www.microsoft.com/en-us/download/details.aspx?id=44226

 

For more information about MMA, please see the Operating Guide or Message Analyzer team's blog.

 

Microsoft Message Analyzer Operating Guide

https://technet.microsoft.com/en-us/library/jj649776.aspx

 

MessageAnalyzer (MessageAnalyzer team's blog)

https://blogs.technet.com/b/messageanalyzer/

 

I would like to resolve this request using MMA.

-Request

There are one Windows Server 2012 R2 Domain Controller, and many client computers. I would like to get information about logon to the domain.

 

 

I want to discover logon information about the Administrator. I can find that information by analyzing the EvengLog that is collected from a domain controller.

 

Request

Result

How many times did Administrator log on to the domain?

 

How many different computers did the Administrator log on to the domain?

 

How many times did administrator log on to the domain from a computer of 192.168.1.3?

 

When did administrator log on to the domain from a computer of 192.168.1.3 recently?

 

- Analysis example

I would like to explain an analysis method of security event ID 4768. Event ID 4768 is logged when user logs on to the domain. A Kerberos authentication ticket (TGT) is requested at the first stage of the logon to the domain, and Event ID 4768 is logged.

Event ID 4768 contains data like:

  • User name who logged on to the domain.

  • IP address of the client computer

  • Date and time

Using this information from Event ID 4768 you can answer questions like:

  • Who did logon to domain?

  • Where did user logon to domain?

  • What time did user logon to domain?

Here is the example Event ID 4768.

  

Users can log on to the domain from various client computers. As a result, many Event 4768 IDs are logged. In this case, 1296 events were recorded. MMA can analyze the event log from the many angles. This request can also be analyzed quickly by MMA.

Let’s analyze the EventLog using MMA and answer the 4 questions.

Request

Result

How many times did Administrator log on to the domain?

 

How many is the computer by which Administrator operated logon to domain?

 

How many times did administrator log on to the domain from a computer of 192.168.1.3?

 

When did administrator log on to the domain from a computer of 192.168.1.3 recently?

 

Analysis Procedure

Overview:

  • Step 1. Read security EventLog using MMA

  • Alternate Step 1. Save Security Event Log to the evtx file on the domain controller

  • Step 2. Analyze captured data or evtx file using MMA

Step1. Read security EventLog using MMA

MMA can read EventLog from a remote computer. In this example, Message Analyzer will capture Event ID 4768 from the domain controller.  

1a. Click "New Session", and Click "Event Logs" in the Add Data Source

1b. In the "New Session" dialog, Check "Security", and type "Eventlog.EventID == 4768 " in filter window. MMA will collect Event ID 4768 from the Computer you specify.

To read EventLog from remote computer, type the remote computer name next to “Computer” in the New Session dialog.

Note : You must allow "Remote Event Log Management" in the firewall rules. Also, sometimes MMA can't display event descriptions. If so, it's possible to gather the evtx logs manually using this alternate step..

Additional Step. Save Security EventLog to the evtx file on the domain controller

Save only Event ID 4768 to evtx file on the domain controller

 

1a. Log on to the domain controller, and start Event Viewer

Right click Windows Logs – Security, and click "Filter Current Log..."

 

1b. At the "Includes Event IDs", type 4768 and click OK.

1c. Right click Windows Logs – Security, and click "Save Filtered Log File As..."

(Save only Event ID 4768 to evtx file)

Setp2: Analyze Event Log using MMA

You should install MMA and analyze on a computer that is not the domain controller. If you collected the evtx file on the domain controller, copy it to the computer where MMA is installed.

If you used MMA to collect the EventLog data remotely, skip to step 2b.

2a. Start MMA, and Open evtx file.

2b. Click a message in Analysis Grid and expand EventData (in Details view).

2c. Right click "TargetUserName ", and click "Add Grouping for 'TargetUserName'"

After step 2c, Data is classified by the TargetUserName in the Analysis Grid. In this case, "EventData.TargetUserName (153): Administrator" means Administrator logged on 153 times.

Request 1 is resolved.

 

Request

Result

How many times did Administrator log on to the domain?

153

How many is the computer by which Administrator operated logon to domain?

 

How many times did administrator log on to the domain from a computer of 192.168.1.3?

 

When did administrator log on to the domain from a computer of 192.168.1.3 recently?

 

 

2-d. Right click "IpAddress ", and click "Add Grouping for 'IpAddress'"


 

After step 2d, Data is classified by the TargetUserName and 'IpAddress'. In this case, "EventData.TargetUserName (6): Administrator" means Administrator logged on from 6 computers.

EventData.IpAddress shows IP address of computers. In this case, " EventData.IpAddress (5) : ::ffff:192.168.1.3" means Administrator logged on 5 times from 192.168.1.3

 

 

Request 2 and 3 are now answered.

Request

Result

How many times did Administrator log on to the domain?

153

How many is the computer by which Administrator operated logon to domain?

6

How many times did administrator log on to the domain from a computer of 192.168.1.3?

5

When did administrator log on to the domain from a computer of 192.168.1.3 recently?

 

Expand EventData.IpAddress, You can also check the date and time logon generated.

I resolved all request.

Request

Result

How many times did Administrator log on to the domain?

153

How many is the computer by which Administrator operated logon to domain?

6

How many times did administrator log on to the domain from a computer of 192.168.1.3?

5

When did administrator log on to the domain from a computer of 192.168.1.3 recently?

4/30/2015、20:17:55

Thank you. If this article is useful to you, I'm very happy.

 

Microsoft Message Analyzer でセキュリティログ解析

 

はじめまして。主に Windows プラットフォームを担当している、プレミアフィールド エンジニアの若林 和雄です。

今回は、Microsoft Message Analyzer (MMA) を用いたイベントログ解析を紹介します。

Microsoft Message Analyzerは、Microsoft Network Monitor の後継ツールであり、また Network Monitor よりも機能を充実させた、調査支援ツールです。

現時点の最新バージョン 1.3.1 は、以下からダウンロード可能です。

Microsoft Message Analyzer

https://www.microsoft.com/en-us/download/details.aspx?id=44226

MMA では、従来の Nework Monitor では採取できなかった、Loopback Adapter のパケットを採取できる機能や、様々なログを多角的に診断できる機能が備わっています。

MMA に関する詳細情報は、以下 Operating Guide や MessageAnalyzer 開発チームの blog をご参照ください。

-参考情報 : Microsoft Message Analyzer Operating Guide

https://technet.microsoft.com/en-us/library/jj649776.aspx

-参考情報 : MessageAnalyzer ( MessageAnalyzer 開発チームの blog )

https://blogs.technet.com/b/messageanalyzer/

 

今回は、次の依頼を MMA を利用して解決していきます。

-依頼内容

Windows Server 2012 R2 のドメイン コントローラー 1 台、多数のクライアントがドメインに参加している環境における、ドメインへのログオン状況を調査したい。

 

依頼ですが、今回は Administrator のログオン情報を必要としています。ドメイン コントローラーから採取したイベントログから、以下の情報が必要です。

調査事項

確認結果

Administrator がドメインへログオンした回数は?

 

Administrator がドメインへのログオンを行ったクライアントコンピュータの台数は?

 

Administrator が 192.168.1.3 のコンピューターからドメインへログオンした回数は?

 

Administrator が 192.168.1.3 のコンピューターからドメインへログオンした最近の日時は?

 

-解析例

ドメインへログオンする際に記録されるEvent ID 4768 のセキュリティイベントログの分析方法を解説します。

ドメインへのログオンの最初の段階では、Kerberos認証チケット(TGT) が要求されます。このタイミングでセキュリティイベントログの Event ID 4768 が記録されます。

Event ID 4768 には、ログオンを開始したユーザーの名前や、ログオン操作を行ったクライアント コンピューターの IP アドレスなどがイベントデータに記録されます。

従って、いつ、誰が (どのユーザーが)、どこから (どのクライアント コンピューターから)ドメインへログオンしたのか、を追跡することができます。

 

以下、Event ID 4768 の一例です。

 

通常、ドメインには様々なユーザーが、様々なクライアント コンピューターからログオンするため、イベントID 4768 が大量に記録されます。

今回の依頼では、イベント ID 4768 が 1296 件記録されていました。

MMA を使用すれば大量に記録されたイベントログを解析し、様々な角度からデータを分類することができます。今回の依頼も MMA で素早く解析可能です。

今回は、次の 4 つの依頼について MMA で解析を行います。

依頼事項

確認結果

Administrator がドメインへログオンした回数は?

 

Administrator がドメインへログオン操作したコンピューターの台数は?

 

Administrator が 192.168.1.3 のコンピューターからドメインへログオンした回数は?

 

Administrator が 192.168.1.3 のコンピューターからドメインへログオンした最近の日時は?

 

次の手順で解析を進めます。

手順1. MMA からセキュリティイベントログを読み込み

参考手順.ドメインコントローラー上でセキュリティイベントログを evtx ファイルに保存

手順2. MMA から evtx ファイルを解析

 

手順1. MMA からセキュリティイベントログを読み込み

MMA では、任意のコンピューターのイベントログを読み込む事ができます。

ここでは、ドメインへコントローラーから ID 4768 のセキュリティイベントログを読み込みます。

 

1a. MMA の New Session をクリックし、" New Session " の画面の Add Data Source から " Event Logs " をクリックします。

 

1b. " New Session " の画面で " Security " をチェックし、フィルター条件に" Eventlog.EventID == 4768 " を指定し、Start をクリックします。セキュリティイベントログ、ID 4768 がMMA に読み込まれます。

 

上記 " New Session " の Computer でリモートのコンピューターを指定し、別のコンピューターのイベントログを読み込む事ができます。この場合は、リモートのコンピューター (イベントのデータ元) のファイアーウォールで " リモート イベントのログ管理 " の通信を許可して下さい。

また、リモートからイベントログを表示した場合、イベントの説明が表示されない場合があります。この場合、後述の参考手順の方法で対処する事ができます。

参考手順.ドメインコントローラー上でセキュリティイベントログを evtx ファイルに保存

ここでは、ドメインコントローラー上で イベントID 4768 の情報だけを evtx ファイルに保存します。

a. ドメインコントローラーにログオンし、イベントビューアを起動します。Windows ログのセキュリティを右クリックし、" 現在のログをフィルター (L)... " をクリックします。

 

b. "現在のログをフィルター" の画面の、"イベント ID を含める" の欄に 4768 を指定し、OK ボタンで適用します。

c. Windows ログのセキュリティを右クリックし、" フィルターされたログ ファイルの名前を付けて保存(G)... " から、イベントID 4768 の情報だけを evtx ファイルに保存します。

 

手順2.MMA から evtx ファイルを解析

MMA は、ドメインコントローラーとは別のコンピューターにインストールして実行してください。手順 1 で保存した evtx ファイルを、MMA が動作しているコンピューターへコピーし、次の手順を実行します。(MMA から直接イベントログを読み込んでいる場合、2a の手順は省略できます)

 

2a. MMA を起動し、Open から手順 1 で保存した evtx ファイルを開きます。

2b.画面中央に表示されるデータの中から任意のデータをクリックし、画面下側の "Details 1 " に表示されるデータの EventData を展開します。

2c. EventData を展開して表示される " TargetUserName " をポイントした状態で右クリックします。表示されるメニューの " Add Grouping for 'TargetUserName' " をクリックします。

 

2c の手順を実行すると、MMA の Grouping 機能により、データがユーザー単位で分類されます。

 

この例では、2008R2-2$ や 2012R2-DC$ や、Administrator などのユーザー単位で分類されています。末尾に $ がついたユーザーはコンピューター アカウントです。また、ユーザー名の前の () の数字は、各ユーザーのログオン回数を示しています。Administrator では " (153) "と表示されています。

 

これで、1 つ目の依頼に対する答えが出ました。

依頼事項

確認結果

Administrator がドメインへログオンした回数は?

153 回

Administrator がドメインへログオン操作したコンピューターの台数は?

 

Administrator が 192.168.1.3 のコンピューターからドメインへログオンした回数は?

 

Administrator が 192.168.1.3 のコンピューターからドメインへログオンした最近の日時は?

 

 

次に、ログオン操作が行われたクライアント コンピューターの IP アドレスの分類も追加します。

 

2d. EventData を展開して表示される " IpAddress " をポイントした状態で右クリックします。表示されるメニューの " Add Grouping for 'IpAddress' "をクリックします。

 

2d の手順を実行すると、データはユーザー単位と IP アドレス単位で分類されます。この例では、EventData.TargetUserName Administratorを展開しています。

ユーザー名の Administrator の前に " (6) " と表示されているため、Administrator は 6 台のコンピューターからドメインへのログオンを行ったことが解ります。

EventData.IpAddress の列には、ログオン操作を行ったクライアント コンピューターの IP アドレスが表示されます。この例では、Administrator は、IP アドレス 192.168.1.3 のコンピューターからは 5 回、ログオンを行っていることが解ります。

 

これで、2 と 3 の依頼に対する答えが出ました。

依頼事項

確認結果

Administrator がドメインへログオンした回数は?

153 回

Administrator がドメインへログオン操作したコンピューターの台数は?

6台

Administrator が 192.168.1.3 のコンピューターからドメインへログオンした回数は?

5 回

Administrator が 192.168.1.3 のコンピューターからドメインへログオンした最近の日時は?

 

 

EventData.IpAddress の列を展開すれば、ログオンが発生した日時も確認する事ができます。

 

 

これで、全ての依頼に対する答えが出ました。

依頼事項

確認結果

Administrator がドメインへログオンした回数は?

153 回

Administrator がドメインへログオン操作したコンピューターの台数は?

6台

Administrator が 192.168.1.3 のコンピューターからドメインへログオンした回数は?

5 回

Administrator が 192.168.1.3 のコンピューターからドメインへログオンした最近の日時は?

 2015/4/30 の、20:17:55

 

MMA を利用したセキュリティイベントログの解析例、最後まで読んで下さいましてありがとうございました。本記事が皆様のお役に立てば幸いです。