Alerts

Kismet uses alerts to communicate wireless intrusion events and critical Kismet server events.

Alerts are generated both as text messages on the messagebus and as dedicated alert records.

For real-time monitoring of alerts, see the eventbus API.

Alert severities

Alert severities are categorized by numerical value; a higher number is more severe.

SeverityDefinitionUse
0INFOInformational alerts, such as datasource errors, Kismet state changes, etc
5LOWLow-risk events such as probe fingerprints
10MEDIUMMedium-risk events such as denial of service attempts
15HIGHHigh-risk events such as fingerprinted watched devices, denial of service attacks, and similar
20CRITICALCritical errors such as fingerprinted known exploits

Alert types

Alerts are categorized by type; alert types are free-form strings, but include:

TypeUse
DENIALPossible denial of service attack
EXPLOITKnown fingerprinted exploit attempt against a vulnerability
OTHERGeneral category for alerts which don’t fit in any existing bucket
PROBEProbe by known tools
SPOOFAttempt to spoof an existing device
SYSTEMSystem events, such as log changes, datasource errors, etc

Alert configuration

DESC
Ksimet exposes the full alert system configuration, including currently support alert types, descriptions of alert content, severity of alerts, and time and burst-rate delivery limiting.
ROLES
readonly
URI
/alerts/definitions.json
/alerts/definitions.ekjson
/alerts/definitions.prettyjson
METHODS
GET
RETURN
JSON list of all alert definition and configuration records.

All alerts

DESC

Kismet retains the past N alerts, as defiend by alertbacklog in kismet_memory.conf.

By default, Kismet retains 50 alert records.

ROLES
readonly
URI
/alerts/all_alerts.json
/alerts/all_alerts.ekjson
/alerts/all_alerts.prettyjson
METHODS
GET
RETURN
JSON list of all currently stored alerts.

Recent alerts

DESC

This endpoint returns alerts since the exact timestamp of seconds and milliseconds.

A more efficient and reliable method is to use the eventbus websocket.

ROLES
readonly
URI
/alerts/last-time/{TIMESTAMP}/alerts.json
/alerts/last-time/{TIMESTAMP}/alerts.ekjson
/alerts/last-time/{TIMESTAMP}/alerts.prettyjson
METHODS
GET
URI
PARAMETERS
TIMESTAMP number (double) REQUIRED
A double-precision timestamp of the UNix epochal second *and* a microsecond precision sub-second timestamp (such as 1234567.12345)
RETURN
JSON list of alerts since TIMESTAMP.UTIMESTAMP

Recent alerts (wrapped)

DESC

This endpoint functions identically to the recent alerts endpoint, but wraps the return in a JSON object including the timestamp when the server generated the report.

This can be used for polling UI implementations to know the exact time pass in the next alert query.

A more efficient and reliable method is to use the eventbus websocket.

ROLES
readonly
URI
/alerts/wrapped/last-time/{TIMESTAMP}/alerts.json
/alerts/wrapped/last-time/{TIMESTAMP}/alerts.ekjson
/alerts/wrapped/last-time/{TIMESTAMP}/alerts.prettyjson
METHODS
GET
URI
PARAMETERS
TIMESTAMP number (double) REQUIRED
A double-precision timestamp of the UNix epochal second *and* a microsecond precision sub-second timestamp (such as 1234567.12345)
RETURN
JSON object containing a list of alerts since TIMESTAMP.UTIMESTAMP and the exact timestamp of the return generation.

Alert table view

DESC

Alerts, with server-side paging, sorting, and searching, for displaying alerts in a table. This is the endpoint used by the alerts table in the Kismet web UI.

The paging parameters (page, length, sort, sort_dir, and search) are read from the URL query string or from form-encoded POST variables, while fields is read from the JSON request.

Only alerts in the alert backlog (the last N alerts, set by alertbacklog in kismet_memory.conf) are available.

ROLES
readonly
URI
/alerts/alerts_view.json
/alerts/alerts_view.ekjson
/alerts/alerts_view.prettyjson
METHODS
GET POST
POST
PARAMETERS
page number OPTIONAL

Page number to return, starting at 0. Setting page enables pagination, sorting, and searching, and wraps the results in a paging container.

length number OPTIONAL

Number of alerts per page. size is accepted as an alias. If no length is given, all matching alerts are returned in a single page.

sort string OPTIONAL

Field to sort by, such as kismet.alert.timestamp. Only used when page is set.

sort_dir string OPTIONAL

Sort direction; asc sorts ascending, any other value sorts descending. Only used when page is set.

search string OPTIONAL

Case-insensitive text to search for. The search is performed on every field listed in fields; if no fields are given, no searching is done. Alert severities match by name (INFO, LOW, MEDIUM, HIGH, and CRITICAL). Only used when page is set.

JSON
PARAMETERS

This endpoint takes additional parameters by using a `POST` request and supplying a JSON document or json form variable.

You can find more information about API parameters here.

fields field simplification OPTIONAL

Kismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.

You can read more about the field simplification API and how to use it here.

RETURN

Without page, a JSON list of alert records.

With page, a JSON object:

{
  "data": [ ... alert records ... ],
  "last_page": 4,
  "last_row": 200,
  "total_row": 250
}

last_page is the number of pages, last_row is the number of alerts matching the search, and total_row is the total number of alerts in the backlog.

RESPONSES
200
Success
400
Invalid field map or paging parameters

Alert by ID

DESC

Fetch a single alert by ID.

Only alerts in the alert backlog are available.

ROLES
readonly
URI
/alerts/by-id/{ALERTID}/alert.json
/alerts/by-id/{ALERTID}/alert.ekjson
/alerts/by-id/{ALERTID}/alert.prettyjson
METHODS
GET POST
URI
PARAMETERS
ALERTID number REQUIRED

Alert ID, the kismet.alert.hash value of the alert record.

JSON
PARAMETERS

This endpoint takes additional parameters by using a `POST` request and supplying a JSON document or json form variable.

You can find more information about API parameters here.

fields field simplification OPTIONAL

Kismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.

You can read more about the field simplification API and how to use it here.

RETURN
JSON alert record.
RESPONSES
200
Success
404
No alert with this ID in the backlog
500
Invalid alert ID

Define an alert

DESC

Define a new alert type, so that it can be raised with the raise alerts endpoint.

Alerts can only be defined once; an alert which is already defined (including alerts defined in the Kismet config files) can not be redefined.

ROLES
admin
URI
/alerts/definitions/define_alert.cmd
METHODS
POST
JSON
PARAMETERS

This endpoint takes additional parameters by using a `POST` request and supplying a JSON document or json form variable.

You can find more information about API parameters here.

name string REQUIRED

Name of the alert. Alert names are converted to upper case.

description string REQUIRED

Description of the alert, shown in the alert definitions.

class string REQUIRED

Class of the alert, such as SYSTEM, DENIAL, SPOOF, or EXPLOIT; see the alert types above.

severity number REQUIRED

Alert severity; one of 0, 5, 10, 15, or 20. See the alert severities above.

throttle string REQUIRED

Maximum rate of the alert, as count/unit, such as 10/min. Units are sec, min, hour, and day; with no unit, the rate is per minute. A rate of 0 disables the alert.

burst string REQUIRED

Maximum burst rate of the alert, in the same format as throttle, such as 1/sec. The burst unit must be shorter than the throttle unit.

phyname string OPTIONAL

Phy the alert applies to. If omitted, or any, the alert applies to all phys.

RESPONSES
200
Alert defined
400
Invalid request, unknown severity, unparseable throttle or burst rate, or unknown phy
503
Alert already defined
504
Alert could not be activated

Raise alerts

DESC

Raise an alert from an external tool. The alert must already be defined, either in the Kismet configuration or with the define an alert endpoint.

Raised alerts are rate limited by the alert throttle and burst rates, include the current GPS location when available, are added to the alert backlog, logged, and sent to the eventbus and messagebus like alerts generated by Kismet.

ROLES
admin
URI
/alerts/raise_alerts.cmd
METHODS
POST
JSON
PARAMETERS

This endpoint takes additional parameters by using a `POST` request and supplying a JSON document or json form variable.

You can find more information about API parameters here.

name string REQUIRED

Name of a defined alert type, in upper case.

text string REQUIRED

Alert text.

bssid string OPTIONAL

MAC address of the network (or transmitter) associated with the alert.

source string OPTIONAL

Source MAC address associated with the alert.

dest string OPTIONAL

Destination MAC address associated with the alert.

other string OPTIONAL

Other MAC address associated with the alert.

channel string OPTIONAL

Channel associated with the alert.

RESPONSES
200
Alert raised
400
Unknown alert type, invalid MAC address, or alert throttle reached