差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:monitoring:09_log_monitoring [2025/08/24 06:01] junichija:documentation:pandorafms:monitoring:09_log_monitoring [2025/08/24 06:25] (現在) – [Unix システムの例] junichi
行 295: 行 295:
 <wrap #ks3_2_1_5 /> <wrap #ks3_2_1_5 />
  
-=== Unix システムの例 ===+== module_eventtype ==
  
-For version 782 or later, the following lines must be added to retrieve **Syslog**  messages. As an example, the messages coming from the **dnf**  command are excluded with the ''module_pattern_exclude''  directive:+It is an optional attribute used to filter the type of event (depending on the version of MS Windows®<wrap :en>Error, Warning, Information, Audit success, Audit failure …</wrap>). It is expressed as a value that can be observed in the Windows event viewer.
  
-バージョン 782 以降では、**Syslog** メッセージ取得するには、以下の行を追加す必要があります。例えば、**dnf** コマンドからメッセージは、''module_pattern_exclude'' ディクティブによって除外されます。+これは、イベントの種類(MS Windows®のバージョンによって異なります:<wrap :en>Error, Warning, Information, Audit success, Audit failure…</wrap>フィルタリングするため使用されるオプション属性です。これは、Windowsイベントビューアで確認でき値として表現されます。 
 + 
 +^Code^Event type| 
 +|0  |Correct audit  | 
 +|1  |Critical 
 +|2  |Error 
 +|3  |Warning 
 +|4  |Information 
 + 
 +{{  :wiki:pfms-log_monitoring-module_eventtype_01.png  }} 
 + 
 +{{  :wiki:pfms-log_monitoring-module_eventtype_02.png  }} 
 + 
 +This example would take level 3 (warning) safety events: 
 + 
 +例では、レベル 3 (警告) の安全イベントが採用されます。
  
 <code> <code>
 +
 +module_begin
 +module_logchannel
 +module_name Security_Events_Warning
 +module_type log
 +module_source Security
 +module_event_type 3
 +module_source_type ossec
 +module_end
 +
 +</code>
 +
 +<wrap #ks3_2_1_6 />
 +
 +== module_eventcode ==
 +
 +Optional parameter. Allows to use a specific event ID to filter only events with that ID. It is perhaps the most accurate filter.
 +
 +オプションパラメータ。特定のイベントIDを使用して、そのIDを持つイベントのみをフィルタリングできます。おそらく最も正確なフィルタです。
 +
 +As you can see in this screenshot, the ''eventID''  is referenced in the event viewer:
 +
 +このスクリーンショットでわかるように、イベントビューアーでは ''eventID'' が参照されています。
 +
 +{{  :wiki:pfms-log_monitoring-module_eventcode.png  }}
 +
 +This example would take level 3 (warning) safety events:
 +
 +この例では、レベル 3 (警告) の安全イベントが採用されます。
 +
 +<code>
 +module_begin
 +module_logchannel
 +module_name Security_Events_4798
 +module_type log
 +module_source Security
 +module_eventcodee 4798
 +module_source_type ossec
 +module_end
 +
 +</code>
 +
 +<wrap #ks3_2_1_7 />
 +
 +== module_application ==
 +
 +Origin of the event. This is an **optional field**.
 +
 +イベントの発生源。これは**オプションのフィールド**です。
 +
 +To obtain the name of the event provider, it will be necessary to specify the exact name of the event provider that appears in the ''name''  field of the detailed event list. To do this, in the Windows event viewer, after right-clicking on it, select **Properties**  and copy the parameter <wrap :en>**Full name**</wrap>, required for ''module_application'', as shown in the screenshot below:
 +
 +イベントプロバイダーの名前を取得するには、詳細なイベントリストの ''name'' フィールドに表示されるイベントプロバイダーの正確な名前を指定する必要があります。これを行うには、Windowsイベントビューアで、イベントプロバイダーを右クリックし、**プロパティ** を選択し、''module_application'' に必要なパラメータ <wrap :en>**Full name**</wrap> をコピーします(以下のスクリーンショットを参照)。
 +
 +{{  :wiki:pfms-log_monitoring-module_application.png  }}
 +
 +These are some common examples of vendor names that appear in the Windows Event Viewer, but there may be many more, as each application will use a specific name.
 +
 +これらは、Windows イベントビューアーに表示されるベンダー名の一般的な例ですが、各アプリケーションが特定の名前を使用するため、さらに多くの例が存在する可能性があります。
 +
 +Operating system providers:
 +
 +オペレーティングシステムプロバイダー:
 +
 +  * Microsoft-Windows-Winlogon
 +  * Microsoft-Windows-Security-Auditing
 +  * Microsoft-Windows-User Profiles Service
 +  * Microsoft-Windows-WindowsUpdateClient
 +  * Microsoft-Windows-DNS-Client
 +  * Microsoft-Windows-GroupPolicy
 +  * Microsoft-Windows-TaskScheduler
 +  * Microsoft-Windows-TerminalServices-LocalSessionManager
 +  * Microsoft-Windows-Eventlog
 +  * Microsoft-Windows-WMI
 +  * Microsoft-Windows-Application-Experience
 +  * Microsoft-Windows-PrintService
 +  * Microsoft-Windows-Time-Service
 +
 +Common application or service providers:
 +
 +一般的なアプリケーションまたはサービスプロバイダー:
 +
 +  * MSSQLSERVER
 +  * Microsoft Outlook
 +  * Microsoft Office Alerts
 +  * VSS
 +  * Microsoft Exchange Server
 +  * Application Error
 +  * Windows Defender
 +  * Windows Firewall
 +
 +Specific examples of events relevant to advanced diagnostics:
 +
 +高度な診断に関連するイベントの具体的な例:
 +
 +  * Microsoft-Windows-Kernel-General
 +  * Microsoft-Windows-DistributedCOM
 +  * Microsoft-Windows-Power-Troubleshooter
 +  * Microsoft-Windows-Kernel-Boot
 +  * Microsoft-Windows-Resource-Exhaustion-Detector
 +  * Microsoft-Windows-Ntfs
 +  * Microsoft-Windows-Kernel-Processor-Power
 +
 +Here are some examples of common vendors (not Microsoft):
 +
 +一般的なベンダーの例をいくつか示します (Microsoft 以外)。
 +
 +  * Google Chrome
 +  * Mozilla Firefox
 +  * VMware Tools
 +  * Citrix Broker Service
 +  * Oracle Database
 +  * Symantec Endpoint Protection
 +  * McAfee Security
 +  * ESET Security
 +  * Apache Service
 +  * TeamViewer
 +  * Adobe Acrobat
 +  * Backup Exec
 +  * Dropbox Update
 +
 +These providers serve as filtering criteria to collect or exclude events through the Pandora FMS agent. If it has spaces, **quotes should not be used**, for example, in the case of "Pandora FMS" it would be:
 +
 +これらのプロバイダは、Pandora FMS エージェントを通じてイベントを収集または除外するためのフィルタリング基準として機能します。スペースが含まれる場合でも、**引用符を使用しないでください**。例えば、"Pandora FMS" の場合は以下のようになります。
 +
 +<code>
 +module_begin
 +module_name Pandora_Events_Windows
 +module_type log
 +module_logchannel
 +module_application Pandora FMS
 +module_source Application
 +module_end
 +
 +</code>
 +
 +<wrap #ks3_2_1_8 />
 +
 +== Windows および Sysmon イベント ==
 +
 +  * **What is Sysmon?**
 +
 +  * **Sysmon とは?**
 +
 +Sysmon<wrap :en>(**System Monitor**</wrap>) is a free tool developed by Microsoft as part of the <wrap :en>**Sysinternals Tools**</wrap>, designed to significantly improve the monitoring and logging of detailed events on Windows operating systems.
 +
 +Sysmon<wrap :ja>(**システムモニター**</wrap>) は、Microsoft が <wrap :en>**Sysinternals Tools**</wrap> の一部として開発した無料のツールで、Windows オペレーティングシステムでの詳細なイベントの監視とログ記録を大幅に改善するように設計されています。
 +
 +Its main purpose is to record activities related to system and application security, which are usually not recorded in sufficient detail in the standard event viewer.
 +
 +その主な目的は、システムとアプリケーションのセキュリティに関連するアクティビティを記録することです。これらのアクティビティは通常、標準のイベントビューアーでは十分な詳細が記録されません。
 +
 +  * **What is Sysmon for?**
 +
 +  * **Sysmon の用途は?**
 +
 +Sysmon is primarily focused on monitoring and early detection of security incidents through comprehensive logging of key system events, such as:
 +
 +Sysmon は、次のような主要なシステムイベントを包括的に記録することで、セキュリティインシデントの監視と早期検出に主に焦点を当てています。
 +
 +  - Creation and execution of processes.
 +  - Network connections (incoming and outgoing).
 +  - Windows registry modifications.
 +  - Loading of DLL libraries.
 +  - File access and modifications.
 +  - Suspicious memory and process usage.
 +  - Code injections in legitimate processes.
 +
 +  - プロセスの作成と実行。
 +  - ネットワーク接続(受信および送信)。
 +  - Windows レジストリの変更。
 +  - DLL ライブラリの読み込み。
 +  - ファイルへのアクセスと変更。
 +  - 不審なメモリおよびプロセスの使用。
 +  - 正規のプロセスへのコードインジェクション。
 +
 +These activities are typically exploited by malware or attackers during intrusion attempts or lateral movements within a corporate network.
 +
 +これらのアクティビティは通常、マルウェアや攻撃者によって企業ネットワークへの侵入試行やネットワーク内での拡大に悪用されます。
 +
 +  * **How does Sysmon work?**
 +
 +  * **Sysmon はどのように動くのか?**
 +
 +Sysmon works by installing a driver in **kernel mode**, collecting real-time information about operating system activities. This data is then sent to the Windows Event Viewer (<wrap :en>**Event Viewer**</wrap>).
 +
 +Sysmonは、**カーネルモード**でドライバーをインストールすることで動作し、オペレーティングシステムのアクティビティに関するリアルタイム情報を収集します。収集されたデータは、Windowsイベントビューアー(<wrap :en>**Event Viewer**</wrap>)に送信されます。
 +
 +  * **How does Sysmon improve monitoring with Pandora FMS?**
 +
 +  * **Sysmon は Pandora FMS による監視をどのように改善しますか?**
 +
 +Pandora FMS can use the Windows agent to collect these detailed events directly from the Sysmon channel and send them to the Pandora central server.
 +
 +Pandora FMS は Windows エージェントを使用して、これらの詳細なイベントを Sysmon チャネルから直接収集し、Pandora 中央サーバに送信できます。
 +
 +This combined approach (Sysmon + Pandora FMS + Pandora SIEM) provides great advantages in the monitoring and security of a Windows-based host:
 +
 +この組み合わせたアプローチ (Sysmon + Pandora FMS + Pandora SIEM) は、Windows ベースのホストの監視とセキュリティに大きな利点をもたらします。
 +
 +  - //Deep security visibility//: Provides a level of detail far superior to traditional event logging. Enables comprehensive analysis of suspicious behavior, identifying anomalies and potential threats in real time.
 +  - //Early detection of advanced attacks//: Facilitates detection of sophisticated attacks such as lateral movement, execution of malicious scripts or connection to suspicious servers.
 +  - //Immediate response capability//: Pandora FMS can generate automatic alerts based on rules defined in Sysmon events (e.g., execution of suspicious processes, log accesses or unusual connection attempts).
 +  - //Historical and correlation//: Pandora FMS allows to store, consult and correlate historical events generated by Sysmon during long periods, which is essential in forensic investigations or security audits.
 +  - //Advanced Reporting//: Automated extraction enables easy creation of reports for cyber security audits, compliance or post-incident analysis.
 +
 +  - //詳細なセキュリティ可視性//:従来のイベントログをはるかに凌駕する詳細な情報を提供します。疑わしい動作を包括的に分析し、異常や潜在的な脅威をリアルタイムで特定できます。
 +  - //高度な攻撃の早期検知//:ラテラルムーブメント、悪意のあるスクリプトの実行、疑わしいサーバへの接続といった高度な攻撃を容易に検知できます。
 +  - //即時対応機能//:Pandora FMSは、Sysmonイベントで定義されたルール(疑わしいプロセスの実行、ログへのアクセス、異常な接続試行など)に基づいて自動アラートを生成できます。
 +  - //履歴と相関分析//:Pandora FMSは、Sysmonによって長期間にわたって生成された履歴イベントを保存、参照、相関分析できます。これは、フォレンジック調査やセキュリティ監査に不可欠です。
 +  - //高度なレポート//:自動抽出機能により、サイバーセキュリティ監査、コンプライアンス、インシデント事後分析用のレポートを簡単に作成できます。
 +
 +  * **Practical example of integration**.
 +
 +  * **統合の実例**
 +
 +Suppose a Sysmon alert sent through the Pandora agent indicating that:
 +
 +Pandora エージェントを通じて Sysmon アラートが送信され、次のような内容を示しているとします。
 +
 +  - An unknown process has created an outgoing connection to a suspicious IP address.
 +  - An unknown DLL has been loaded into memory.
 +  - An attempt was made to modify the Windows registry by an unexpected process.
 +  - Pandora FMS would receive these detailed events, generate an immediate alert, and allow to act quickly on the incident before significant damage is done.
 +
 +  - 不明なプロセスが疑わしいIPアドレスへの送信接続を作成した。
 +  - 不明なDLLがメモリにロードされた。
 +  - 予期しないプロセスによってWindowsレジストリが変更されようとした。
 +  - Pandora FMS はこれらの詳細なイベントを受信し、即座にアラートを生成し、重大な損害が発生する前にインシデントに迅速に対応できるようにします。
 +
 +  * **Installation and use of Sysmon**.
 +
 +  * **Sysmon のインストールと使用**
 +
 +Sysmon is included in the official Microsoft "Sysinternals Suite" and is available for Intel 32-bit and 64-bit systems as well as the new ARM 64-bit architecture (Windows 11).
 +
 +Sysmon は、Microsoft 公式の "Sysinternals Suite" に含まれており、Intel 32 ビットおよび 64 ビット システム、および新しい ARM 64 ビット アーキテクチャ (Windows 11) でも利用できます。
 +
 +Sysmon has a fairly extensive configuration file to indicate what it should "monitor". Monitoring "everything" would affect both the host performance and the system that collects all this information. Pandora FMS agents incorporate a base configuration file that can be improved by the user, by default it will generate a lot of security information.
 +
 +Sysmon は、何を「監視」すべきかを指定するための、かなり詳細な設定ファイルを持っています。「すべて」を監視すると、ホストのパフォーマンスと、このすべての情報を収集するシステムの両方に影響を与えます。Pandora FMS エージェントには、ユーザが変更できる基本設定ファイルが組み込まれており、デフォルトでは多くのセキュリティ情報が生成されます。
 +
 +For more information on how to use Sysmon, check the documentation [[:en:documentation:pandorafms:cybersecurity:21_siem|SIEM]].
 +
 +Sysmon の使用方法の詳細については、ドキュメント [[:ja:documentation:pandorafms:cybersecurity:21_siem|SIEM]] を参照してください。
 +
 +<WRAP center round important 90%>
 +
 +If Sysmon events are to be used, the specific module name must be used to identify them as Sysmon so that they are processed as such by the SIEM. This module is used for this purpose:
 +
 +</WRAP>
 +
 +<WRAP center round important 90%>
 +
 +Sysmon イベントを使用する場合は、SIEM によって Sysmon として処理されるように、特定のモジュール名を使用して Sysmon として識別する必要があります。このモジュールは、以下の目的で使用されます。
 +
 +</WRAP>
 +
 +<code>
 +
 +module_begin
 +module_name WinEvtLog
 +module_type log
 +module_logchannel
 +module_source Microsoft-Windows-Sysmon/Operational
 +module_source_type windows
 +module_end
 +
 +</code>
 +
 +Unlike other events, it uses ''module_source_type windows''  instead of ''module_source_type ossec''. Also, it uses the name ''WinEvtLog'', as defined in the [[:en:documentation:pandorafms:cybersecurity:21_siem#ks8|SIEM rules]] provided with Pandora SIEM. **If other names and/or types are used, it will not work as expected**.
 +
 +他のイベントとは異なり、このイベントでは ''module_source_type ossec'' ではなく ''module_source_type windows'' を使用します。また、Pandora SIEM に付属の[[:ja:documentation:pandorafms:cybersecurity:21_siem#ks8|SIEMルール]]で定義されている ''WinEvtLog'' という名前を使用します。**他の名前やタイプを使用した場合、期待どおりに動作しません**。
 +
 +<wrap #ks3_2_2 />
 +
 +=== Linux/Unix イベント収集 ===
 +
 +Log example:
 +
 +ログの例:
 +
 +<code>
 +
 module_begin module_begin
 module_name Syslog module_name Syslog
-module_description Syslog main log file+module_description Sample log collection of syslog messages file
 module_type log module_type log
 module_regexp /var/log/messages module_regexp /var/log/messages
 module_pattern .* module_pattern .*
-# Sample exclude patter to avoid any dnf messages +module_pattern_exclude DEBUG
-module_pattern_exclude dnf +
-module_source_type syslog+
 module_end module_end
  
 </code> </code>
  
-By using the ''module_type log''  directiveit is indicated //not to// store it in the database, but to send it to the //log//  collector. Any module with this type of data will be sent to the collector, as long as it is enabled//otherwise information will be discarded//.+For more information about the description of log type modulesplease refer to the following section about [[:en:documentation:pandorafms:installation:05_configuration_agents#module_regexp|Specific Directives]].
  
-''module_type log'' ディレクティブを使用すると、ログデータをデータベースに保存するのではなく、ログコレクターに送信するように指定できます。このタイプのデータを持つモジュールは、ログコレクターが有効になっいる限り、ログコレクターに送信れます。有効になってない場合、ログコレクターから情報は破棄されます+ログタイプモジュールの説明の詳細については、[[:ja:documentation:pandorafms:installation:05_configuration_agents#module_regexp|特定のディレクティブ]]の章を参照しください。
  
-For more information about log module descriptionplease refer to the [[:en:documentation:pandorafms:installation:05_configuration_agents#ks6_2|Specific directives]].+By defining this type of tag, ''module_type log''you indicate that **not**  to be stored in the database, but to be sent to the log collector. Any module with this type of data will be sent to the //logs//  collector, as long as it is enabled. **Otherwise the information will be discarded**.
  
-ログタイプモジュールの説明の詳細については、[[:ja:documentation:pandorafms:installation:05_configuration_agents|特定のディレクティブ]] を参照し次のセクションを確認しください。+このタイプのタグ ''module_type log'' を定義することで、**データベースに保存されず**、ログコレクターに送信されることを示します。このタイプのデータを持つモジュールは、ログコレクターが有効になっいる限り、すべログコレクターに送信れます。**有効になってない場合、情報は破棄されます**
  
-For version 774 or later, the following lines must be configured for //log// retrieval:+<WRAP center round info 90%>
  
-バージョン 774 以降では、//ログ// 取得ために次の行設定する必要があります。+In the past other methods were used to collect logs in the Linux agent (plugins), from version 781 onwards it is recommended to use only this method. 
 + 
 +</WRAP> 
 + 
 +<WRAP center round info 90%> 
 + 
 +以前は、Linux エージェント (プラグイン) でログを収集するために他の方法が使用されていましたが、バージョン 781 以降では方法使用することをお勧めします。 
 + 
 +</WRAP> 
 + 
 +More complete examples: 
 + 
 +より完全な例:
  
 <code> <code>
  
-# Logs extraction +module_begin 
-#module_begin +module_name apache_access 
-#module_name Syslog +module_type log 
-#module_description Logs extraction module +module_regexp /var/log/httpd/access_log 
-#module_type log +module_pattern .* 
-#module_regexp /var/log/logfile.log +module_pattern_exclude \s200\s|\s301\s 
-#module_pattern .* +module_source_type web-log 
-#module_end+module_end 
 + 
 +</code> 
 +<code> 
 + 
 +module_begin 
 +module_name Audit denied 
 +module_type log 
 +module_regexp /var/log/audit/audit.log 
 +module_pattern denied 
 +module_end 
 + 
 +</code> 
 + 
 +<code> 
 +module_begin 
 +module_name Syslog 
 +module_type log 
 +module_regexp /var/log/messages 
 +module_pattern error|fail|panic|segfault|denied|timeout|critical|alert|emergency|memory|core_dumped|failure|attack|bad|illegal|refused|unauthorized|fatal|failed|Segmentation|Corrupted 
 +module_end 
 + 
 +</code> 
 +<code> 
 + 
 +module_begin 
 +module_name Secure 
 +module_type log 
 +module_regexp /var/log/secure 
 +module_pattern Failed|failure|invalid|denied|accepted|root 
 +module_end
  
 </code> </code>
  • ja/documentation/pandorafms/monitoring/09_log_monitoring.1756015316.txt.gz
  • 最終更新: 2025/08/24 06:01
  • by junichi