Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
ba92011
build: create magefiles/ directory
jeffmahoney Sep 12, 2023
f6be5da
magefile.go: use current architecture for Linux builds
jeffmahoney Dec 12, 2022
c64950c
github: run testcases on Linux builds in new workflow
jeffmahoney Nov 21, 2022
5223974
linux: add lsattr() function to enumerate file attributes
lorddoskias Feb 2, 2022
7c29957
Linux.Detection.ImmutableFiles: Enumerate immutable files under a path
lorddoskias Feb 3, 2022
bb5fa8c
Add parser to read systemd journal on Linux
jeffmahoney Jan 14, 2022
09f2a9a
Update the Linux.Syslog.SSHLogin artifact to scan the systemd journal
jeffmahoney Jan 14, 2022
d2c07cd
Update the Linux.Events.SSHLogin artifact to scan the systemd journal
jeffmahoney Jan 17, 2022
897c889
SUSE: Add SSHLogin artifacts
jeffmahoney Mar 11, 2022
43fcc7e
SSHLogin: require _TRANSPORT != 'kernel' from watch_journal()
jeffmahoney Sep 12, 2022
540fb67
vql/linux/bpf: add support to add bpf plugins for Linux
jeffmahoney Nov 11, 2022
a4fe0b8
vql/linux/bpf/tcpsnoop: Add tcpsnoop plugin
lorddoskias Feb 25, 2022
029ecae
vql/linux/bpf/dnssnoop: Add dnssnoop() plugin
lorddoskias Apr 11, 2022
ed2872e
vql/linux/bpf/chattrsnoop: Add plugin to catch changes to inode attri…
lorddoskias Apr 12, 2022
15ffb8a
vql/linux/bpflib: add sample vmlinux.h includes for test builds
jeffmahoney Sep 14, 2023
5667a9d
Add custom artifacts for login and logout attempts recorded by auditd
guangyee Mar 16, 2022
3dfde4c
Linux.Events.ProcessExecutions: catch 32-bit execve calls
chajain Mar 31, 2022
56b9bad
Add artifact to monitor user group updates (#24)
guangyee Apr 19, 2022
1374717
file_store/directory/buffer: add direct-serialized interface
jeffmahoney May 1, 2023
fc57dde
utils/refcount: add simple refcount implementation
jeffmahoney Oct 9, 2023
2ced2e1
file_store/directory/listener_bytes: Add listener to use serialized i…
jeffmahoney May 1, 2023
16ba5f3
vql/linux/audit: use go-libaudit v2 for live audit message processing
jeffmahoney Jun 6, 2022
133f775
vql/linux/audit: rearchitect plugin for scalability
jeffmahoney Jun 16, 2022
549488e
Extend audit artifacts to use new interface
chajain May 20, 2022
c3ff009
vql/linux/cronsnoop: Add cronsnoop() plugin
lorddoskias Jul 12, 2022
bc947aa
Updating the NewFiles and ProcessStatuses Artifacts
chajain Jul 11, 2022
61df5b6
Add Linux.Sys.Bash to Server.Monitor.Shell artifact
jeffmahoney Aug 19, 2022
5203420
rpm: introduce rpm vql plugin
jeffmahoney Dec 6, 2022
922a920
vql/functions/hash: cache results on Linux
jeffmahoney Feb 5, 2023
0bade83
hash: fix nil pointer dereference panic
djoreilly Dec 5, 2023
11f4940
Fix shadowed variable in hash.go
djoreilly Mar 10, 2025
b6daf93
SUSE: add Docker files
jeffmahoney Sep 7, 2022
0560ace
SUSE: Add docker-compose environment
jeffmahoney Sep 7, 2022
04d20b1
cronsnoop: fix panic when crontab has empty line
djoreilly Oct 12, 2023
8535fed
vql/linux/audit: actually add test cases
jeffmahoney Oct 13, 2023
833e281
vql/linux/audit: don't overload EAGAIN
jeffmahoney Oct 18, 2023
afb0a4c
vql/linux/audit: gofumpt -extra
jeffmahoney Oct 18, 2023
466171b
vql/linux/audit: fix staticcheck checks
jeffmahoney Oct 18, 2023
8e27fce
bpf: add libbpf/include/uapi to the include path for bpf.h
jeffmahoney Nov 1, 2023
ef23e8c
bpf: only build libbpf in the go generate stage
jeffmahoney Nov 1, 2023
7ee57bd
vql/linux/audit: fix test suite handling
jeffmahoney Nov 13, 2023
a0c7792
vql/linux/audit: Clean up context handling in shutdown goroutine
jeffmahoney Nov 6, 2023
4e4bd22
vql/linux/audit: mainEventLoop shouldn't exit on canceled context
jeffmahoney Nov 6, 2023
29a8f82
vql/linux/audit: Make messageQueue lifetime more apparent
jeffmahoney Nov 6, 2023
62f27bb
vql/linux/audit: limit messageQueue scope to within runService
jeffmahoney Nov 9, 2023
1c614be
vql/linux/audit: Close reassembler if NewListenerBytes fails
jeffmahoney Nov 6, 2023
b9becb8
vql/linux/audit: Fix typo causing double-lock in notifyMissingRule
jeffmahoney Nov 6, 2023
f2a7ed4
vql/linux/audit: Fix DeleteRule in mock client
jeffmahoney Nov 6, 2023
fc46eeb
vql/linux/audit: Change listener lifecycle to enable testing
jeffmahoney Nov 6, 2023
c7201fa
vql/linux/audit: Fix audit client lifecycle
jeffmahoney Nov 6, 2023
093673b
vql/linux/audit: Add more client failure test cases
jeffmahoney Nov 6, 2023
a29f5af
vql/linux/audit: tests, check various rule scenarios
jeffmahoney Nov 6, 2023
4634a48
vql/linux/audit: simplify polling in listener
jeffmahoney Nov 9, 2023
0072e1b
vql/linux/audit: make stats reporting separate from debug prints
jeffmahoney Nov 9, 2023
8a3f7b4
vql/linux/audit: make explicit that goroutines in the main errgroup d…
jeffmahoney Nov 9, 2023
8107d25
vql/linux/audit: handle top-level cancelation properly
jeffmahoney Nov 9, 2023
937b9cd
vql/linux/audit: remove unused waitgroup from main event loop
jeffmahoney Nov 9, 2023
db23ac4
vql/linux/audit: remove unnecessary error handling for reassembler
jeffmahoney Nov 9, 2023
12d471f
vql/linux/audit: pull parts of shutdown into shutdown watcher
jeffmahoney Nov 9, 2023
9788b93
vql/linux/audit: add auditService.Log()
jeffmahoney Nov 10, 2023
7fa181b
vql/linux/audit: limit messageQueue to within runService
jeffmahoney Nov 14, 2023
3786d94
vql/linux/audit: fix goroutine lifetimes
jeffmahoney Nov 9, 2023
0dab048
vql/linux/audit: fix shutdown races
jeffmahoney Nov 10, 2023
88205b5
vql/linux/sdjournal: Fix open/close lifetimes
jeffmahoney Nov 10, 2023
5a6a33f
velociraptor: add dummy main function for mage
jeffmahoney Dec 12, 2023
11aa485
sdjournal: Correctly seek to current tail
xTeixeira Nov 16, 2023
51c984f
Fix audit filter key typo in Linux.Events.NewFiles
djoreilly Aug 25, 2023
4a504f2
Move NewFiles artifact to SUSE
djoreilly Feb 21, 2024
62da02b
Fix SystemLogins artifacts file extensions
djoreilly Sep 26, 2023
5755385
Fix absolute path case in ExecutableFiles artifact
djoreilly Sep 29, 2023
b7dc5d0
Add artifact to collect systemd service events
djoreilly Oct 4, 2023
40987a8
Add hash fields to Linux.Events.ProcessExecutions
djoreilly Oct 11, 2023
5034add
Add SUSE.Linux.Events.NewZeroSizeLogFile artifact
djoreilly Oct 12, 2023
6a1e3e5
SUSE.Linux.Events.Crontab: Add task execution artifacts
xTeixeira Nov 16, 2023
d2ac338
Add artifact to monitor ssh authorized_keys files
djoreilly Nov 20, 2023
3da68b1
Add SUSE.Linux.Events.Timers artifact
xTeixeira Nov 21, 2023
33b43f1
Fix Linux.Events.ImmutableFile not showing hash in GUI
djoreilly Dec 6, 2023
c8348b0
chattrsnoop: don't log.Fatal() on hash error
djoreilly Dec 6, 2023
283fb44
chattrsnoop: handle os.Stat() error properly
djoreilly Dec 6, 2023
e5201b4
chattrsnoop: include full error details in logs
djoreilly Dec 6, 2023
f9ea291
Make ImmutableFile artifact consistent with others
djoreilly Feb 21, 2024
61fe7b0
Move ImmutableFile artifact to SUSE
djoreilly Feb 21, 2024
a879655
Add artifact to collect new hidden files
djoreilly Dec 13, 2023
1e62267
Add server artifact to delete old client data on server
djoreilly Jan 9, 2024
fcb43ee
Add client monitoring artifact for RPMs
djoreilly Jan 23, 2024
56861ba
Add SUSE.Linux.Sys.At artifact
xTeixeira Dec 12, 2023
2fc8170
Raise client connection log level to ERROR
djoreilly Nov 17, 2023
e54f57e
Rename SUSE specific artifacts to have SUSE prefix
djoreilly Feb 21, 2024
a73fc3c
tcpsnoop: fix garbled results on s390
djoreilly Mar 8, 2024
be35269
Add artifact to collect new files without owner
djoreilly Feb 14, 2024
677ba24
bpf plugins: set a logger callback
djoreilly Feb 26, 2024
bfb7535
tcpsnoop: remove unused filtering code
djoreilly Feb 29, 2024
ccfbc4b
chattrsnoop: fix bpf_probe_read for s390
djoreilly Mar 7, 2024
4dc96b3
chattrsnoop: fix immutable attribute set on s390
djoreilly Mar 8, 2024
356117c
dnssnoop: fix htons() so it works on s390 too
djoreilly Mar 11, 2024
4b5988b
dnssnoop: fix loading protocol from ip header on s390
djoreilly Mar 11, 2024
c125b61
chattrsnoop: replace global variables with locals
djoreilly Mar 12, 2024
2921cde
Fix systemd Services artifact missing events
djoreilly Mar 22, 2024
c5f6a25
Fix services artifact symbol pid not found error
djoreilly Apr 2, 2024
0be9e28
chattrsnoop: fix do_vfs_ioctl kprobe failure
djoreilly Mar 28, 2024
12a8c4d
chattrsnoop: fix wrong FS_IOC_SETFLAGS value for ppc
djoreilly Mar 28, 2024
4967b7c
chattrsnoop: correct read size for flags
djoreilly Mar 28, 2024
869eb5e
github: run linux unit tests
djoreilly Jul 10, 2024
9fc471a
sdjournal: fix package causing test failures
djoreilly Jul 10, 2024
eaa2fc0
audit: prevent Windows loading audit package
djoreilly Jul 10, 2024
4a95367
audit: fix race in subscriber
djoreilly Jun 21, 2024
1669ac0
audit: fix audit client data races
djoreilly Jun 21, 2024
34ebb39
github: fix deprecated upload artifact
djoreilly Sep 17, 2024
9c97afe
audit s390x: fix arch filter rules errors
djoreilly Sep 19, 2024
a1ebb52
rpm plugin: fix ndb magic error
djoreilly Nov 6, 2024
bef8fa3
RPM artifact: start checks immediately on artifact load
djoreilly Nov 6, 2024
53e73e1
audit: fix auditBuf allocation and go vet warnings
djoreilly Apr 5, 2024
21052c4
audit: reduce FileBufferLeaseSize to ease GC overhead
djoreilly May 8, 2024
f1eb5ea
Linux.Events.ProcessExecutions: remove parent cmdline
djoreilly Jun 14, 2024
6553ad8
tcpsnoop: fix missing ipv6 outbound connections
djoreilly Sep 2, 2024
acc0280
tcpsnoop: fix ipv6 local and remote addresses order
djoreilly Sep 2, 2024
dda742c
chattrsnoop: move hashing from plugin to artifact
djoreilly Sep 16, 2024
56027d3
chattrsnoop: fix files not getting closed
djoreilly Sep 16, 2024
10513b0
bpf plugins: add context to error logs
djoreilly Sep 16, 2024
0cd98ff
bpf plugins: remove depreciated libbpfgo calls
djoreilly Sep 16, 2024
1129ede
tcpsnoop: move parsing to its own function
djoreilly Sep 16, 2024
8fe31f4
bpf: fix plugins not stopping when context cancelled
djoreilly Sep 16, 2024
e880f8c
audit: update go-libaudit dependency for pcc64le arch filter fix
djoreilly Mar 14, 2025
9096125
Add execsnoop plugin to capture execve system calls
djoreilly Jan 30, 2025
a8f8e4f
Use execsnoop plugin in artifacts when possible
djoreilly Jan 30, 2025
7c50969
audit: fix watch rules in artifacts
djoreilly Mar 14, 2025
6078dbd
Update go-rpmdb to fix panic
djoreilly Jun 18, 2025
9bbccee
Add plugin and artifact for sending client events to rsyslog
djoreilly Sep 24, 2025
74c3c20
Remove SHA1 file signatures
djoreilly Oct 14, 2025
8e1821c
Add machine-id to event artifacts
djoreilly Oct 15, 2025
e2aeda8
Fix symbol not found errors from SUSE.Linux.Events.Services
djoreilly Apr 7, 2026
f134a71
Exclude velociraptor tracee ebpf from build
djoreilly Jun 23, 2026
db198ef
Fix artifacts for different VQL array() behaviour in v0.74+
djoreilly Jun 23, 2026
a137eb5
Fix services artifact systemctl show parse errors
djoreilly Jun 23, 2026
59b4617
Fix SshAuthorizedKeys artifact to work with v0.76
djoreilly Jun 23, 2026
eb9fb50
Don't create offline yaml tool dependencies
djoreilly Jun 25, 2026
98317ca
Update fast-uri and follow-redirects npms
djoreilly Nov 2, 2026
2deb19e
Update dompurify, markdown-it and qs npms
djoreilly Nov 2, 2026
fd137a1
Update golang dependencies
djoreilly Nov 2, 2026
106ae42
github: update workflows
djoreilly Nov 2, 2026
61426c0
github: use go1.27
djoreilly Nov 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
name: Linux Build All Arches
#on: [pull_request]
on:
pull_request:
types: [closed]
branches:
- master
workflow_dispatch:

jobs:
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Only trigger when a PR is committed.
name: Linux
on: [pull_request,workflow_dispatch]

jobs:
build:
name: Test
runs-on: ubuntu-26.04
steps:

- name: Check out code and submodules into the Go module directory
uses: actions/checkout@v7
with:
submodules: recursive

- uses: actions/setup-go@v7
with:
go-version: '^1.27'

- run: go version

- name: Get dependencies
run: |
go get -v -t -d ./...
sudo apt-get update
sudo apt-get install libsystemd-dev clang llvm libelf-dev git make libzstd-dev

- name: Build GUI-less binary
run: |
mkdir ./output/
export PATH=$PATH:~/go/bin/
make linux_bare

- name: Run built-in testcases
run: |
echo "Running built-in tests."
go test -test.short -v --tags "velomain server_vql" $(go list ./... | grep -Ev "bpf|lsp|http_comms|shell")

- name: Test Golden Generic
if: always()
run: |
echo "Running OS generic tests."

output/velociraptor* -v golden artifacts/testdata/server/testcases/ --env srcDir=`pwd` --config artifacts/testdata/windows/test.config.yaml

- name: Test Golden Linux
if: always()
run: |
echo "Running Linux tests."

output/velociraptor* -v golden artifacts/testdata/linux/ --env srcDir=`pwd` --config artifacts/testdata/windows/test.config.yaml

- name: StoreBinaries
uses: actions/upload-artifact@v4
with:
name: Binaries.zip
path: output
2 changes: 0 additions & 2 deletions .github/workflows/musl.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Linux Build Musl Static
#on: [ pull_request ]
on:
pull_request:
types: [closed]
workflow_dispatch:

jobs:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/vale.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Vale linter
on:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
vale:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Windows Test
on:
pull_request:
workflow_dispatch:

jobs:
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,12 @@ __debug*
debug.test*
artifacts/testdata/server/hunts/H.*
artifacts/testdata/server/users/
build/packages/
build/packages/
.*sw?
.vim*
.env
SUSE/docker-compose/config/traefik/traefik.toml
SUSE/docker-compose/config/velociraptor/*
SUSE/docker-compose/data/velociraptor/*
SUSE/docker-compose/logs/velociraptor/*
vql/linux/bpf/*/*.bpf.o
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule ".github/vale"]
path = .github/vale
url = https://github.com/Velocidex/velociraptor-vale
[submodule "third_party/libbpfgo"]
path = third_party/libbpfgo
url = https://github.com/aquasecurity/libbpfgo
202 changes: 202 additions & 0 deletions SUSE/docker-compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
# Linux Security Sensor Deployment

## Summary

This document is intended to be a short guide to deploying the Linux Security Sensor. It is almost certainly incomplete but will cover most of the basics. If you encounter difficulties or there are inaccuracies, please contact the development team.

## Architecture

The Linux Security Sensor is designed to collect events and respond to queries from a central server. Each step in the communication process is intended to be reliable in the event of a component or network becoming unavailable. The client will cache up to 1GB of events before dropping them. The [Velociraptor](https://docs.velociraptor.app/) logscale plugin on the server formats, and forwards them to Logscale for later consumption by the IT Security team.

In many deployments, the Velociraptor server is the interface used to consume the information provided by the client, but in this deployment it is intended for Logscale to be the primary interface for information consumption and Velociraptor is used primarily for configuration of endpoints and remote access during incident response.

## Docker Compose

There is a template `docker-compose.yml` contained in this repository. The defaults should be generally sane for a test deployment but work still needs to be done to use TLS within the container. For now, the traffic between containers is unencrypted but isolated within the network created for this compose environment. The `docker-compose.yml` file can be used as-is but the user must copy `env.sample` to `.env` and fill in the missing values.

### Sensor Frontend

Source: SUSE built container

The `sensor-frontend` container holds the Velociraptor server. It requires a bit of configuration before startup.

This container exposes four ports, each of which are configurable within the `server.conf` file. This document assumes that the defaults used in the `server.conf` and `docker-compose.yml` files are unchanged. If different ports are required, the two files must be kept in sync.

- Frontend
- Port 8000
- This is the port that provides the interface for the endpoint clients to use to register themselves, send events, and receive commands from the server. It uses TLS using a self-signed internal CA and a static name of VelociraptorServer. Each client is configured to use this internal CA and the server is the only source of certificates. This port is exposed directly to the network.
- GUI:
- Port 8889
- This is the port that provides the administrative interface. It serves a React app for administrative management as well as the API endpoints to implement it. By default this uses the same TLS certificate that the Frontend uses, but that requires every user who accesses the GUI to also accept the internal certificate authority, which is awkward and unnecessary. Instead, we use a reverse proxy that obtains certificates already linked to the end user's trusted certificate list to avoid additional configuration. See [traefik](#traefik) below.
- Monitoring
- Port 8003
- This provides a way to gather runtime metrics that can be consumed by Prometheus or other similar monitoring tools. It is an unencrypted read-only interface and does not require authentication to access. In the default configuration this is not exposed to the outside network.
- API
- Port 8001
- This is the internal gRPC endpoint and does not need to be exposed to the network unless the server is operating in a large environment where multiple frontend servers are required.

The hostname and ports defined in the `sensor-frontend` block must match the ones used in the `server.conf` file.

### Sensor Client

Source: SUSE built container

This is the same container as the frontend but started in client mode. This is for convenience to ensure that the UI presents the client events interface immediately without needing to start up an external client. The client running inside a container will not have access to a number of resource including BPF and the audit netlink socket. It also cannot accept remote shell commands. Once the server has been configured it is safe to remove this container.

### Traefik

The `traefik`container is used to implement a TLS reverse proxy capable of obtaining its own certificates via the ACME protocol.

## Configuration

### Example files

Most of the configuration of the containers is done in the containers themselves and need little outside configuration. Still, there are site specific values to be defined. There are example configuration files in the Git repository that will make this easier. Copying the examples and editing them is the simplest way to proceed.. The main Velociraptor configuration file will be automatically generated but will still need to be completed for the site.

- `env.example` -> `.env` -- Defines compose variables

- `config/traefik/traefik.toml.example` -> `config/traefik/traefik.toml`

- `config/velociraptor/server.conf` -- Created by Velociraptor container but needs completion.

- `config/velociraptor/client.conf` -- Created by Velociraptor client container. No further modification is required.

- `config/velociraptor/client.conf.template` -- Created by Velociraptor container for use with clients. The server URL will need to be replaced with the real domain name of the deployed server.

- `config/traefik/acme.json` -- Empty file will be filled in by the Traefik container. No further modification is required.

### Internal TLS

Internal TLS has yet to be implemented and will require some changes to the sections below. What follows is what is required to use the Compose environment with _external_ TLS only.

### Sensor Frontend

Locations: `config/velociraptor/server.conf` `.env`

The Velociraptor container will generate its own configuration, including TLS keys/certificates at first startup, but the configuration generated will need to be supplemented with some additional fields before it can be used in this environment.

To generate the initial configuration without starting up the server for the first time, `docker-compose run sensor-frontend /generate-config.sh` will generate the configuration, place it in `config/velociraptor/server.conf`, pull out a template useful for distributing to clients in `config/velociraptor/client.conf.template` and exit.

Until internal TLS is implemented, the GUI must operate in plaintext mode within the container for Traefik to be able to provide a TLS proxy. To enable plain http mode,`use_plain_http: true` must be added to the `GUI` section of `config/velociraptor/server.conf` Since the hostname inside the container will not be used by GUI users, `public_url: https://public-facing-domain-name` must also be added to work properly. That hostname must also be added to the `SENSOR_GUI_HOSTNAME` variable defined in`.env`. These must match or authentication will not work properly (as seen by a return to the login screen instead of opening the app.)

Initial authentication is configured to use builtin `Basic` authentication using an internal database. The only user added initially is the `admin` user with a password of `admin`. If authentication using an outside authentication service is required, the following stanza must be added to the `GUI` section of `config/velociraptor/server.conf`:

GUI:
authenticator:
type: oidc
oidc_issuer: https://id.opensuse.org/openidc/
avatar: https://en.opensuse.org/images/c/cd/Button-colour.png
oauth_client_id: $OAUTH_CLIENT_ID
oauth_client_secret: $OAUTH_CLIENT_SECRET
initial_users:
- name: $USER@suse.com

The initial user must be an email address associated with a valid remote account. It will be created as an administrative-level user and can create new user accounts. **Accounts must be created manually.** Once the configuration mechanism is switched from `Basic` to `oidc`, the included `admin` account will be inaccessible.

When configuring the authentication service, the callback URI should be the same as `public_url` above but with `/auth/oidc/callback` appended. For example, `https://sensor-demo.dyn.cloud.suse.de/auth/oidc/callback`

### Traefik

An example `traefik.toml` file is provided as `config/traefik/traefik.toml.example`. Several values must be filled in and the resultant file installed in `config/traefik/traefik.toml`.

- Email Address

- Domain (without the host component)

- The URL for the ACME interface of the CA to be used to issue certificates for this host

If the CA you configure is not otherwise connected to a public chain of trust, the root certificate for the CA must be added to the system's certificate store first. Otherwise, registration will fail with an untrusted certificate error.

## Startup

Once these steps are completed, a simple `docker-compose up` will start up the application.

## Application Configuration

The events collected by Velociraptor are generated using VQL queries. Those queries can be executed manually but more often they are executed automatically using artifacts. Custom artifacts are certainly possible and will be part of any deployment, but the team has assembled a core group of artifacts to meet the requirements laid out by IT Security. This section of the documentation will describe the artifacts needed and what configuration is required. Any of the artifacts can be modified. If a built-in artifact is modified, it is saved as the same name with `Custom.` prefixed to it.

### Server Event Monitoring

The artifacts used for server monitoring include monitoring incoming events and artifacts to forward to another system. The icon to configure Server Events looks like an eye. To configure, click the edit (pencil) button and a selection of Server Event artifacts will be presented.

Select the following artifacts to configure in the next screen.

#### `Logscale.Events.Clients`
This artifact is responsible for listening to _all_ of the incoming events to the Velociraptor server and forwarding events from the selected artifacts to the Logscale ingestion endpoint.
The following parameters must be used:

- `ingestApiBase` -> `https://cloud.community.humio.com/api`

- `ingestToken` -> `appropriate-ingest-token`

- `tagFields` -> `Artifact`

For the other parameters, the defaults can be used.

Then select the required artifacts to forward to Logscale. These parameters may be updated at any time. When a new artifact is added to the system, it will not be forwarded automatically until it is added to the list of artifacts to forward.

A good starting set would be:
- `Generic.Client.Stats`

- `SUSE.Linux.Events.ExecutableFiles`

- `SUSE.Linux.Events.NewFiles`

- `Linux.Events.ProcessExecutions`

- `SUSE.Linux.Events.ProcessStatuses`

- `SUSE.Linux.Events.UserAccount`

- `Server.Monitor.Shell`

- `SUSE.Linux.Events.Crontab/Connections`

- `SUSE.Linux.Events.DNS`

- `SUSE.Linux.Events.ImmutableFile`

- `SUSE.Linux.Events.SSHLogin`

- `SUSE.Linux.Events.TCPConnections`

- `SUSE.Linux.Events.UserGroupMembershipUpdates`

These artifacts may in turn need configuration, which will be described below.

#### `Logscale.Flows.Upload`
This artifact is responsible for listening to all incoming flows to the Velociraptor server and forwarding them to the Logscale ingestion endpoint.

The following parameters must be used:

- `ingestApiBase` -> `https://cloud.community.humio.com/api`

- `ingestToken` -> `appropriate-ingest-token`

- `tagFields` -> `Artifact`

- `ArtifactNameRegex` -> `.`

#### `Server.Monitor.Shell`
This artifact is responsible for logging the output of remote shell sessions and is an important component of the audit trail. There is no configuration required.

#### `System.Hunt.Creation`
This artifact generates an event when a user of the GUI initiates a new hunt.

### Client Event Monitoring

The artifacts used for client monitoring are the primary purpose of this tool. Unfortunately, the UI to configure client events is a little clunky. It requires at least one client already be associated with the server. In order to streamline this, we've added a sensor client to the Compose environment. To configure the client event monitoring, use the pulldown to the right of the client search box at the top left of the screen. Select "Show All" and the client list will appear. Now the "Client Events" option is available on the sidebar and can be selected. Like with the Server Event Monitoring, the pencil icon configures the artifacts.

To begin, select a label group. It is possible to create arbitrary labels and add them to subsets of hosts, but for now we'll just choose "All" and then choose "Select Artifacts" at the bottom of the pane.

Select the required artifacts. The list should match what we've configured in the `Logscale.Events.Clients` artifact parameters above, ignoring anything following the `/` character as that delimits the _data source_ and we don't care about that for the client artifact. Although some of these artifacts have configurable parameters, the defaults generally do not need to be changed. Click through the rest of the buttons in the bar at the bottom until you complete the process by using the "Launch" button. This will push the new configuration to the endpoints and the new policy will take effect.

## Client Deployment

Packages for deployment on a number of SUSE Linux releases are available on the [Open Build Service](https://download.opensuse.org/repositories/security:/sensor/). The `config/client.conf.template` file (with the correct `server_url`) should be installed at `/etc/velociraptor/client.config`. The packages will otherwise create the correct directories to host the writeback and buffer files.

## Bugs / Caveats

* Internal TLS needs to be implemented
* There may be outstanding artifacts that need to be committed to the repo. Updates will be forthcoming.
* Please report any issues to the [#proj-linux-security-sensor](https://suse.slack.com/archives/C02NJAA1PEC) Slack channel and/or the GitHub [issues](https://github.com/SUSE/linux-security-sensor/issues) page.
2 changes: 2 additions & 0 deletions SUSE/docker-compose/config/traefik/acme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@


37 changes: 37 additions & 0 deletions SUSE/docker-compose/config/traefik/traefik.toml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
debug = true

logLevel = "info"
defaultEntryPoints = ["https","http"]

[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]

[retry]

[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "$DOMAIN"
watch = true
exposedByDefault = false

[acme]
email = "$EMAILADDRESS"
storage = "acme.json"
entryPoint = "https"
OnHostRule = true
caServer = "https://$CAFQDN/acme/$DOMAIN/directory"
acmeLogging = true

[acme.httpChallenge]
entryPoint = "http"
delayBeforeCheck = 10

[acme.tlsChallenge]
entryPoint = "https"
delayBeforeCheck = 10
4 changes: 4 additions & 0 deletions SUSE/docker-compose/config/velociraptor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Placeholder file
=

This file is a placeholder so that the config/velociraptor directory exists in the Git repository.
4 changes: 4 additions & 0 deletions SUSE/docker-compose/data/velociraptor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Placeholder file
=

This file is a placeholder so that the data/velociraptor directory exists in the Git repository.
Loading
Loading