JPCERTCC / LogonTracer
- воскресенье, 3 декабря 2017 г. в 03:14:49
Investigate malicious Windows logon by visualizing and analyzing Windows event log
Investigate malicious logon by visualizing and analyzing Windows active directory event logs.
LogonTracer uses PageRank and ChangeFinder to detect malicious hosts and accounts from event log.
This tool can visualize the following event id related to Windows logon based on this research.
The following tools are used
Download and install Neo4j community edition.
Clone or download LogonTracer.
$ git clone https://github.com/JPCERTCC/LogonTracer.git
$ cd LogonTracer/static
$ npm install neo4j-driver
$ pip install -r requirements.txt
or
$ pip install numpy py2neo python-evtx lxml changefinder flask
If statsmodels installation fails, install numpy first.
Start LogonTracer by the following command option -r.
Use -h to see help message.
$ python3 logontracer.py -r -o 8080 -u neo4j -p password -s localhost
Access http://[LogonTracer_Server]:8080/ via Web browser.
Import the event log using Web GUI or logontracer.py.
Event log can be imported with upload EVTX button.
Event log can be imported by logontracer.py option -e.
$ python3 logontracer.py -e Security.evtx -z +9 -u neo4j -p password -s localhost
Using the navigation bar to search for account name, host name, IP address, event id and event count.
Export button can download graph data of CSV, JPG, PNG and JSON.
Using the side-bar to search for account names matching specific criteria.
PageRank is an algorithm for checking the importance of web pages.
LogonTracer uses PageRank to examine the importance of accounts and hosts in a domain network.
An account with high PageRank logs on to many hosts and may be used by the attackers' lateral movement.
Timeline button displays hourly event log counts in time series.
Hosts with drastic changes are highlighted.
For anomaly detection using this index, use change point analysis algorithm Change Finder.
For downloading timeline summary and detailed CSV data, click "Download".
If you are using Docker, you can pull the following image.
https://hub.docker.com/r/jpcertcc/docker-logontracer/
$ docker run \
--detach \
--publish=7474:7474 --publish=7687:7687 --publish=8080:8080 \
-e LTHOSTNAME=[IP Address] \
jpcertcc/docker-logontracer
Event logs that LogonTracer analyzes are not recorded by default settings.
If you have not enabled the audit policy, you need to enable the audit policy.
You can change the audit policy from Local Group Policy Editor (gpedit.msc).
Computer Configuration > Windows Settings > Security Settings > Advanced Audit Policy Configuration > System Audit Policies - Local Group Policy Object
By enabling the following items, the event ID will be recorded.