DFIRVault

Setting up logontracer daemon

Step 1 – Create Bash Script:

    • Touch logontracer_run.sh

    • Chmod +x logontracer_run.sh

    • Nano logontracer_run.sh

#!/bin/bash

# Get the IPv4 address of eth0

IPV4_ADDRESS=$(ip -4 addr show eth0 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)

# Run the Docker container with the IPv4 address

docker container run --detach --publish=7474:7474 --publish=7687:7687 -publish=8080:8080 -e LTHOSTNAME=$IPV4_ADDRESS jpcertcc/docker-logontracer

(ctrl+x to save and exit)

Step 2 – Create the service

    • sudo nano /etc/systemd/system/logontracer_run.service

[Unit]

Description= Logon Tracer Service

After=network.target

[Service]

ExecStart=/home/dfir/logontracer_run.sh

Restart=on-failure

[Install]

WantedBy=multi-user.target

(ctrl + x to exit)

Step 3 – Enable the daemon:

    • sudo systemctl daemon-reload

    • sudo systemctl enable logontracer_run.service

Step 4 – Start the service:

    • sudo systemctl start logontracer_run.service

    • http://127.0.0.1:8080