This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Notifiers

Interaction notifiers

Notifiers are used to send notifications to external services or log interactions to the app log.

Available notifiers: app_log, slack, discord, webhook.

Filters

Each notifier accepts a filter configuration option, compiled into a Go regexp. The notifier only fires when the filter matches — this applies to every notifier (app_log, slack, discord, webhook). The default filter is .* (match everything).

The regexp is matched against a single canonical string that is consistent across every handler:

HANDLER ACTION DETAIL from IP[,IP...]
  • HANDLER — the handler name (HTTPX, DNS, FTP, SMTP, SSH, TCP, SMB).
  • ACTION — the interaction kind (HTTP method, DNS query type, Auth, Mail, Data, …).
  • DETAIL — handler-specific specifics (HTTP path+query, DNS name, SSH user, SMB account, …).
  • IP chain — the unique source IPs. For HTTPX this is the de-duplicated X-Forwarded-For + X-Real-Ip + peer chain (client first); for other handlers it’s the peer IP.

Because the shape is uniform, one regexp can select across any handler:

GoalFilter
HTTP payload hits under /x/^HTTPX (GET|POST) /x/
Captured SMB hashes^SMB Auth
DNS lookups for a C2 domain^DNS (A|AAAA) .*\.evil\.com
SSH login attempts as root^SSH \w+ root
Admin console logins (needs notify_logins)^HTTPX Login
Anything from one source IPfrom .*10\.0\.0\.5

Example canonical strings:

HTTPX POST /x/beacon?id=1 from 203.0.113.9,10.0.0.1
HTTPX Login alice from 10.0.0.5
DNS A c2.evil.com. from 10.0.0.5
SMB Auth CORP\alice from 10.0.0.5
SSH PasswordAuth root from 10.0.0.5

The HTTPX Login events are only emitted when the HTTPX handler is configured with notify_logins: "true" (see the HTTPX handler).

Check each handler for the exact FilterString its events produce.

1 - App Log

Log to application log

Structured loggoing output

time=2025-02-26T14:57:03.838-07:00 level=INFO msg="InteractionEvent received" xodbox.pkg=github.com/defektive/xodbox/pkg/notifiers/app_log details="HTTPX: GET /l/face from 127.0.0.1:56407"

Configuration

KeyValues
notifierMust be app_log

2 - Discord

Discord notification

Discord Notification

Configuration

KeyValues
notifierMust be discord
urlWebhook URL
authorUsername to appear in slack. (optional) d
author_imageEmoji code to use for user’s avatar. (optional)
filterGolang regexp.

Messages longer than Discord’s 2 000-character content limit are automatically truncated with a trailing .

3 - Slack

Slack notifications

Slack Notification

Configuration

KeyValues
notifierMust be slack
urlWebhook URL
authorUsername to appear in slack. (optional)
author_imageEmoji code to use for user’s avatar. (optional)
channelChannel to post to, can be a user’s ID. (optional)
filterGolang regexp.

Messages longer than ~3 900 characters are automatically truncated with a trailing to keep Slack from splitting them across multiple posts.

4 - Webhook

Generic HTTP Webhook

POSTs every matching event as a JSON object to a configured URL. Slack and Discord notifiers share this codepath under the hood, but webhook can also be used directly as a standalone notifier — no custom code required. This makes it the primary integration point for external workflows: pipe NTLM hashes to a cracking service, forward SMB auth events to n8n, send everything to a SIEM, etc.

Payload shape

{
  "RemoteAddr": "203.0.113.5",
  "RemotePort": 54321,
  "UserAgent":  "curl/8.0",
  "Data":       "DELETE /probe HTTP/1.1\r\nHost: ...",
  "Details":    "HTTPX: DELETE http://.../probe from 203.0.113.5:54321",
  "Curl":       "curl -X DELETE ..."
}

Curl is only populated for HTTP events; it is omitted for other handlers. Data and Curl fields are capped at 32 KB each; Truncated is true when either field was clipped.

Configuration

KeyRequiredDefaultNotes
notifieryesMust be webhook.
urlyesDestination URL. Posted with Content-Type: application/json.
filterno.*Go regexp matched against "HANDLER ACTION DETAIL from IP". See Notifiers for the full filter reference.

Example

notifiers:
  # Forward every captured SMB hash to an external cracking pipeline.
  - notifier: webhook
    url: https://n8n.myteam.internal/webhook/ntlm-capture
    filter: "^SMB Auth"

  # Alert a SIEM on any /l path hit (the default notify path).
  - notifier: webhook
    url: https://siem.example.com/ingest/xodbox
    filter: "^HTTPX.*\\/l"

  # No filter — forward everything.
  - notifier: webhook
    url: https://my-siem.example.com/ingest

Failure handling

  • 2xx/3xx responses are treated as success.
  • 4xx/5xx responses log an error but do not propagate it to the dispatcher (a flaky webhook does not block other notifiers).
  • Connection/transport failures (DNS, refused, timeout) propagate as errors and are surfaced in the app log.