NewAI pentesting that proves every finding
INSECUREWEB
Documentation menu

    Developers

    Webhooks

    Send new findings to your SIEM, ticketing or automation tools as they happen. Set-up, event types, the payload, retries, security and logs.

    Last updated on

    A webhook is an automatic web request that InsecureWeb sends to your server when it finds something new. Use it to open tickets, feed your SIEM, alert a chat channel through your automation tool, or update a client portal, without polling the API.

    Where new findings are sent

    Webhook retries
    Up to 10
    Records per request
    10,000
    Blocklists updated
    Daily
    An illustration. Feed guides cover Suricata, Cisco, Fortinet and Wazuh.

    Who can use it

    Company and MSP accounts on a paid plan. The account owner sets it up.

    Setting it up

    Open Webhook in the console.

    1. Webhook URL: the HTTPS address of your receiver.
    2. Headers: add the headers your receiver needs, such as an authorization token. Tick Header is a secret for any value that must stay hidden; secret values are stored encrypted and never shown again.
    3. Active: while it is off, nothing is sent and nothing is queued to catch up later.
    4. Save, then Test Webhook. The test sends 20 sample Dark Web records to your endpoint.

    Each account has one webhook endpoint. Events from every service go to it, each marked with its type, so your receiver can route them or ignore the ones it does not need.

    The Webhook page: the endpoint address, the headers sent with every event, secret headers hidden, and the Active switch
    The Webhook page: the endpoint address, the headers sent with every event, secret headers hidden, and the Active switchSample data from fictional companies · click to enlarge

    Events

    webhookTypeSent when
    DARKWEB_WEBHOOKA Dark Web run finds new leaks for an organization
    COMPANY_IMPERSONATION_WEBHOOKA Company Impersonation run finds new lookalike domains
    THREAT_INTELLIGENCE_WEBHOOKA Threat Intelligence scan finishes with results
    VULNERABILITY_WEBHOOKA vulnerability scan run finds at least one vulnerability
    REPUTATION_SHIELD_WEBHOOKA Reputation Shield search finds something

    Each event is sent once per finished run, with the new findings of that run. Events for penetration tests and Data Removal are coming soon.

    The payload

    Every event is a POST with a JSON body in the same envelope:

    {
      "organizationId": 1234,
      "organizationUUID": "0f8fad5b-d9cb-469f-a165-70867728950e",
      "organization": "Example Corp",
      "webhookType": "DARKWEB_WEBHOOK",
      "eventId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "totalRecords": 2,
      "recordsSent": 2,
      "data": [
        { "...": "one record per new finding" }
      ]
    }
    FieldMeaning
    organizationId, organizationUUID, organizationThe organization the findings belong to. Reputation Shield events are not tied to an organization and leave these out.
    webhookTypeThe event type, from the table above
    eventIdThe event’s ID. It is the same on every page of an event and on every resend.
    totalRecordsHow many records the whole event has
    recordsSentHow many records this request carries
    dataThe records. Their fields match what the console shows for that service; the API reference describes them.

    Large events

    One request carries up to 10,000 records. A larger event is split across several requests that share the same eventId and totalRecords. Count recordsSent until it adds up to totalRecords.

    Headers we send

    • Content-Type: application/json
    • X-InsecureWeb-TraceId and X-InsecureWeb-SpanId: quote these to our support team if a delivery needs investigating.
    • Every header you configured.

    Delivery and retries

    • Your endpoint has 15 seconds to answer. Answer with a 2xx status as soon as you have stored the request, and do the slow work afterwards.
    • On a timeout, or a 502, 503 or 504 answer, InsecureWeb retries after 2, 4 and 8 seconds, then again later.
    • Any other error status is not retried. If your receiver is temporarily unable to process an event, answer 503.
    • After 10 failed attempts in a row, deliveries to your account pause for 100 minutes, and you receive a “webhook failed” notification.

    When your endpoint does not answer in time

    Time to answer
    15 s
    Records per request
    10,000
    Pause after 10 failures
    100 min
    Other error answers are not retried. Answer 503 when you want an event sent again.

    Because events can be resent, make your receiver safe to call twice: remember which eventId values and records you have processed, and skip repeats.

    Security

    • Use HTTPS, and a secret header that your receiver checks on every request. Requests are not signed, so this header is how your receiver knows the request came from InsecureWeb. Reject anything without it.
    • Protect what you receive. Dark Web events carry leaked data, which can include passwords. Store and forward them like any other credential data.
    • Reputation Shield evidence links in events expire after 24 hours. Copy the evidence you need.

    Logs

    Webhook Logs shows every delivery: when it was sent, the endpoint, the headers, the organization, the event type, the number of records, the HTTP status your server returned, the response body and the event ID. Filter by status, date range, organization and event type.

    Example receiver

    A minimal receiver in Python with Flask, checking a secret header named X-Webhook-Token:

    import hashlib, hmac, os
    from flask import Flask, request, abort
    
    app = Flask(__name__)
    TOKEN = os.environ["INSECUREWEB_WEBHOOK_TOKEN"]
    seen = set()  # use a database in production
    
    @app.post("/insecureweb")
    def receive():
        if not hmac.compare_digest(request.headers.get("X-Webhook-Token", ""), TOKEN):
            abort(401)
        event = request.get_json()
        # One event can arrive in several pages, and any page can be resent:
        # the event ID plus a fingerprint of the page identifies it.
        key = (event["eventId"], hashlib.sha256(request.get_data()).hexdigest())
        if key not in seen:
            seen.add(key)
            queue_for_processing(event)  # your code: open tickets, send to your SIEM...
        return "", 204