LogonTracer v2.0: Mapping Windows Logon Events into a Neo4j Graph
Investigate malicious Windows logon by visualizing and analyzing Windows event log
At a glance
- What is it?
- LogonTracer turns Windows Active Directory event logs into a host-and-account graph in Neo4j. Version 2.0 adds an OpenAI-driven analysis agent and bundled Sigma rules, but the tool still assumes you can run Neo4j and parse EVTX files yourself.
- Who is it for?
- Adopt LogonTracer if you already run Neo4j and want a graph view of Windows logon events rather than a flat SIEM search. Skip it if you need a managed appliance or cannot host a database next to your evidence.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 115 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- JPCERTCC/LogonTracer3,307 ★ · +54
| Repository | 2026-09-24 | 2026-11-24 |
|---|---|---|
| JPCERTCC/LogonTracer | 3.3k | 3.3k |
54 Stars in the last 61 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What LogonTracer Is For in an Active Directory Investigation
A Windows domain controller writes thousands of logon events a day. Reading them as a list tells you that account X logged on to host Y at time Z, but it does not show you that the same account touched eleven hosts in four minutes, or that a host is the common node between two compromised accounts. LogonTracer exists to make that second question answerable.
The README states the concept directly: the tool "associates a host name (or an IP address) and account name found in logon-related events and displays it as a graph." The audience is the blue team and DFIR analyst working a suspected Active Directory compromise, not a general sysadmin. The event IDs it parses are the logon and account-management ones: 4624 and 4625 for successful and failed logons, 4672 for special privileges, 4768 and 4769 for Kerberos TGT and service ticket requests, 4776 for NTLM, plus group membership changes and directory service object creation and deletion.
That scope is the point. A tool that ingested every Windows event would drown the graph in noise. LogonTracer deliberately ignores process creation, file writes and registry events, so if your investigation hinges on what a process did after logon, this is not the layer that answers it.
How the Graph, PageRank and ChangeFinder Pipeline Fit Together
The data flow is a three-stage pipeline. First, logontracer.py parses EVTX or XML files and writes nodes and relationships into Neo4j, with hosts and accounts as the entities and logon events as the edges. Second, the analysis layer runs graph and statistical algorithms over that data. Third, Flask serves a web UI that renders the graph, a timeline, and ranked lists.
The ranking is where the project's own research angle shows. The README says LogonTracer uses PageRank, a Hidden Markov Model, and ChangeFinder "to detect malicious hosts and accounts from event logs." PageRank on a bipartite host-account graph surfaces nodes that many logon paths pass through, which is a reasonable proxy for a pivot host or a shared service account. ChangeFinder looks for change points in time series, and the HMM models sequences. These are heuristics, not detections. The documentation does not state precision or false positive rates for any of them, and there is no published evaluation in the README. Treat the ranked list as a place to start reading, not as an alert queue.
Version 2.0 adds a second analysis path. The AI engine sends graph query results to OpenAI GPT models and returns a risk assessment with MITRE ATT&CK tactic mapping. A separate autonomous agent, described in the README as generating and executing Cypher queries against Neo4j iteratively, runs without a human choosing each query. Both paths require an OpenAI API key, which the requirements list as optional and needed "only for AI analysis features." The practical consequence is that an AI analysis run sends derived graph content to an external API. For an incident involving sensitive account names, that is a decision the analyst has to make deliberately, and the README does not describe a redaction step.
Installing LogonTracer and Importing Your First EVTX File
The project assumes Python 3.9 or later, with 3.12 recommended, and a Neo4j 5.x instance, Community or Enterprise. Clone the repository and install the pinned dependency list:
git clone https://github.com/JPCERTCC/LogonTracer.git
cd LogonTracer
pip3 install -r requirements.txtStart Neo4j separately, set its initial password, and note the Bolt port, which the README gives as 7687 by default. Then edit config/config.yml. The README marks the password fields as things to change before first run:
settings:
logontracer:
WEB_PORT: "8080"
default_user: "neo4j"
default_password: "password"
neo4j:
NEO4J_USER: "neo4j"
NEO4J_PASSWORD: "password"
NEO4J_SERVER: "localhost"
WS_PORT: "7687"Start the web application and open the browser at the port you configured:
python3 logontracer.py --runFor a first real import, the README's example uses the -e flag for an EVTX file, -z for the UTC offset, and the Neo4j connection flags. The sample directory ships a Security.evtx you can use to confirm the pipeline works before pointing it at production evidence:
python3 logontracer.py -e <path/to/Security.evtx> -z <UTC offset> -s <Neo4j server> -u <user> -p <password>After the import finishes, the graph view in the web UI should show host and account nodes connected by the logon events in the file. To append a second file without wiping the database, add --add. To run Sigma detection during the import, add --sigma. The same operations are available in the web UI under Upload Event Log, where you select files, choose the UTC offset, and optionally enable Add additional files or Run scan using Sigma rules.
The Operational Cost of Running LogonTracer
LogonTracer is not a single binary. It is a Python application plus a Neo4j database, and the repository carries four docker-compose directories: docker-compose/, docker-compose-with-nginx/, docker-compose-with-elasticstack/, and docker-compose-localllm/. That last one is worth noting because it implies a local LLM path exists as an alternative to the OpenAI API, though the README excerpt does not document how to configure it. If you need the AI features without sending data to a third party, that directory is where to look, and you should expect to read the compose file rather than the README.
Upgrade cost is low in one sense and unpredictable in another. The jump from v1.6.1 in November 2023 to v2.0.0 in April 2026 was a major version with a new AI subsystem, new dependencies (openai, pysigma, pysigma-backend-sqlite, aiohttp), and a new Sigma rules directory. The last push to the repository was on 2026-08-02, which is recent enough that the project is being touched, but the README does not document a migration path from v1.x data or a schema version field for the Neo4j graph. If you have a populated graph from an older release, verify compatibility before upgrading rather than assuming it.
On licensing, the repository carries LICENSE.txt and the GitHub metadata reports NOASSERTION, meaning the licence could not be classified automatically. Read LICENSE.txt yourself before deploying this in a commercial incident response product. The bundled SigmaHQ rules under sigma/ carry their own upstream licensing, which is separate from LogonTracer's.
Where LogonTracer Breaks Down
The clearest limitation is the dependency on Neo4j. If your evidence-handling policy keeps analysis on an isolated workstation, you now have a database server to install, secure and back up alongside the tool. There is no documented single-file mode that skips the graph store.
The second limitation is scope. LogonTracer parses logon-related events. It does not parse process creation, PowerShell script block logging, Sysmon network events, or file system events. An intrusion that never produces a logon event on a monitored host, or one where the relevant evidence lives in Sysmon, will produce a thin graph. The README's event table is the authoritative list, and it is short.
The third is the AI layer. The autonomous agent generates and executes Cypher queries on its own. The agent implementation tracks a maximum iteration count; assess its current query controls and behavior with malformed or expensive queries before running it against a large graph. Running an unconstrained query generator against a database holding live incident data is a risk you are accepting, not one the documentation has addressed.
Finally, timezone handling is manual. Every import takes a -z offset, and the README gives no guidance on what happens if you get it wrong. A wrong offset will not fail loudly; it will silently shift your timeline, which is the kind of error that ruins a correlation between two log sources.
LogonTracer Compared with BloodHound and Plain Elasticsearch
The closest conceptual neighbour is BloodHound, which also builds a graph of Active Directory relationships. The difference is the data source and the question. BloodHound collects directory configuration and ACL relationships through its own collectors and answers "what can this account reach." LogonTracer reads historical event logs and answers "what actually happened, and when." One is a map of permissions, the other is a record of activity. They are complementary, and neither substitutes for the other.
The other realistic alternative is what most teams already have: shipping the same EVTX files into Elasticsearch and searching them. The repository acknowledges this path by shipping docker-compose-with-elasticstack/ and an es-index/ directory, and logontracer.py accepts --es with --es-server to import from an existing Elasticsearch instance. The trade-off is real. Elasticsearch gives you full-text search across every event type and a mature query language. LogonTracer gives you the graph and the ranking algorithms, which is exactly what a flat index is bad at. If your question is "show me every event mentioning this account," use Elasticsearch. If your question is "which host connects these accounts," that is the graph.
Editorial conclusion
Adopt LogonTracer if you already run Neo4j and want a graph view of Windows logon events rather than a flat SIEM search. Skip it if you need a managed appliance or cannot host a database next to your evidence. Before relying on it, verify that your EVTX timezone offset is correct, that the bundled sigma/ rules load under pysigma, and that your Neo4j password is changed from the default in config/config.yml.
Frequently asked questions
What is LogonTracer used for?
It visualizes Windows Active Directory logon-related event logs as a graph of hosts and accounts, so an analyst can see which account logged on to which host. It also runs PageRank, a Hidden Markov Model and ChangeFinder over that graph to rank hosts and accounts for review.
How do I install LogonTracer?
Clone the repository, run pip3 install -r requirements.txt, start Neo4j 5.x, edit config/config.yml with your Neo4j credentials, then run python3 logontracer.py --run and open the web port. The README recommends Python 3.12.
Which Windows event IDs does LogonTracer parse?
The README lists 4624, 4625, 4662, 4672, 4719, 4720, 4726, 4728/4732/4756, 4729/4733/4757, 4768, 4769, 4776, 5137 and 5141. These cover successful and failed logons, special privileges, Kerberos and NTLM authentication, group membership changes and directory service object changes.
Does LogonTracer require an OpenAI API key?
No. The requirements list openai as optional, needed only for the AI analysis features added in v2.0. The graph visualization, ranking and Sigma scanning work without it.
Can LogonTracer import logs without deleting existing data?
Yes. Adding --add to the import command appends additional logs without clearing the database, and the web upload page has an Add additional files option that does the same.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/jpcertcc-logontracer)Star history chart for your README
[](https://hysenlabs.com/projects/jpcertcc-logontracer)Was this useful?