loggen
Synthetic log generator for SIEM and IR exercises. Reproducible, deterministic, supports arbitrary scales from MB to TB. Profiles for Windows, Linux, network, and EDR-like telemetry.
Install
pip install -e .
Quick start
from loggen import LogGen, Session
gen = LogGen(seed=42)
# Stream 1 000 mixed entries
for entry in gen.stream(["windows", "linux", "edr"], count=1000):
print(entry.asdict())
# Write 1 GB of mixed logs (gzip)
gen.write("corpus.jsonl.gz", ["windows", "linux", "network", "edr"], size="1GB")
# Run a built-in attack scenario
gen.write("attack.jsonl", [], scenario="lateral_movement", count=50)
# In-memory list
entries = gen.to_list(["network"], count=200)
Custom data pools
By default loggen ships with a built-in set of hostnames, users, and IPs.
You can replace any of them with your own data.
Inline lists
from loggen import Session, LogGen
session = Session(
seed=42,
hosts=["prod-web-01", "prod-db-01", "prod-cache-01"],
users=["alice", "bob", "charlie"],
)
gen = LogGen(session=session)
From a file
from loggen import Session, LogGen, WordList
session = Session(
seed=42,
hosts=WordList.from_file("wordlists/hosts.txt"),
users=WordList.from_file("wordlists/users.json"),
internal_ips=WordList.from_file("wordlists/ips.csv", column=0),
)
gen = LogGen(session=session)
From a JSON config file
from loggen import Session, LogGen
session = Session.from_config("config/loggen.json")
gen = LogGen(session=session)
See WIKI.md for the config file format and all supported options.
From an environment variable
from loggen import WordList
hosts = WordList.from_env("LOGGEN_HOSTS") # comma-separated
users = WordList.from_env("LOGGEN_USERS", fallback=["admin"])
CLI
# 10 000 mixed entries to stdout (JSON Lines)
python -m loggen generate -p windows -p linux -n 10000
# 500 MB of network logs, gzip, reproducible
python -m loggen generate -p network --size 500MB --seed 42 -o network.jsonl.gz
# Brute-force scenario in CEF format
python -m loggen generate --scenario brute_force -f cef -o brute.cef
# Custom profile weights
python -m loggen generate -p windows -p edr --weight windows:4 --weight edr:1 -n 50000 -o out.jsonl
# List available options
python -m loggen list-profiles
python -m loggen list-scenarios
python -m loggen list-formats
Profiles
| Profile | Covers |
|---|---|
windows |
Security events 4624/4625/4688/4672/4698/7045/5140/4104 … |
linux |
sshd auth, sudo, cron, systemd, auditd, PAM, kernel |
network |
Firewall allow/deny, DNS, HTTP proxy, DHCP |
edr |
Process/file/network/registry/module events with hashes |
Scenarios
| Scenario | Description |
|---|---|
brute_force |
Repeated logon failures → success |
lateral_movement |
Recon → SMB share access → remote execution |
priv_esc |
Service install → SYSTEM shell → 4672 |
data_exfil |
Archive creation → large outbound transfers → DNS tunnelling |
persistence |
Registry run key + scheduled task + binary drop |
Output formats
| Format | Description |
|---|---|
jsonl |
JSON Lines / NDJSON (default) |
cef |
ArcSight CEF:0 |
syslog |
RFC 5424 syslog |
See WIKI.md for full API reference.
Metadata
Release files for loggen-lg 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| loggen_lg-0.1.0.tar.gz | 25.9 kB | Without provenance | Details for loggen_lg-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| loggen_lg-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for loggen_lg-0.1.0-py3-none-any.whl |
Total release size: 57.2 kB
Release files / loggen_lg-0.1.0.tar.gz
| Download URL | loggen_lg-0.1.0.tar.gz |
|---|---|
| Size | 25.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e66dde1ce9ea02fe1f940836926ae1b0b4aab032c1ef4d8ac8884cc75aa09566
|
|
BLAKE2b-256 checksum How to use checksums |
c08e596b001598acd9d5fdbf30710cd290e4e297e482d15edd870cf6b0667bd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / loggen_lg-0.1.0-py3-none-any.whl
| Download URL | loggen_lg-0.1.0-py3-none-any.whl |
|---|---|
| Size | 31.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c186b7bf8de9f774732a597fbb89f61bf5109fe8121feab9172a6c8595660410
|
|
BLAKE2b-256 checksum How to use checksums |
e5686fe56d4c771848aa77883cfe437e474b1afec641d68086f61812dc8188ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for loggen-lg 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.