### Clone Kismet Repository Source: https://www.kismetwireless.net/docs/readme/installing/linux Clones the Kismet source code from the official git repository. This command is used for initial setup. ```git git clone https://www.kismetwireless.net/git/kismet.git ``` -------------------------------- ### Install rtl-433 Tool on Debian-based Systems Source: https://www.kismetwireless.net/docs/readme/installing/linux Installs the rtl-433 tool, which is necessary for RTL-433 SDR support, on Debian-based systems via apt. ```bash sudo apt install rtl-433 ``` -------------------------------- ### Install Kismet Core Dependencies on Debian-based Systems Source: https://www.kismetwireless.net/docs/readme/installing/linux Installs essential libraries and development headers required to compile Kismet on Debian, Ubuntu, Kali, Mint, and similar distributions using apt. ```bash sudo apt install build-essential git libwebsockets-dev pkg-config \ zlib1g-dev libnl-3-dev libnl-genl-3-dev libcap-dev libpcap-dev \ libnm-dev libdw-dev libsqlite3-dev libprotobuf-dev libprotobuf-c-dev \ protobuf-compiler protobuf-c-compiler libsensors-dev libusb-1.0-0-dev \ python3 python3-setuptools python3-protobuf python3-requests \ python3-numpy python3-serial python3-usb python3-dev python3-websockets \ libubertooth-dev libbtbb-dev libmosquitto-dev librtlsdr-dev ``` -------------------------------- ### Install Kismet Core Dependencies on Fedora-based Systems Source: https://www.kismetwireless.net/docs/readme/installing/linux Installs essential libraries and development headers required to compile Kismet on Fedora and similar distributions using dnf. ```bash sudo dnf install gcc gcc-c++ zlib-devel sqlite3 sqlite-devel openssl-devel \ libwebsockets libwebsockets-devel libpcap libpcap-devel libusb1 libusb1-devel \ rtl-sdr rtl-sdr-devel mosquitto mosquitto-devel lm_sensors lm_sensors-devel \ libnl3-devel NetworkManager-libnm-devel ``` -------------------------------- ### Check Setup Status Source: https://www.kismetwireless.net/docs/api/login This API is used to check if Kismet has completed its initial configuration setup. It is primarily used by the Kismet web UI but is available for other full-UI replacements. Most API endpoints are unavailable if the account setup process has not been completed. ```APIDOC ## GET /session/check-setup-ok ### Description Checks if Kismet has completed its initial configuration setup. The majority of API endpoints will not be available if the account setup process has not been completed. ### Method GET ### Endpoint `/session/check-setup-ok` ### Parameters #### Query Parameters None #### Path Parameters None ### Request Body None ### Request Example None ### Response #### Success Response (200) Indicates that the initial login setup has been completed. #### Error Response (406) Returned if the credentials are hard-coded into a configuration file, or if the initial setup has not been completed and the user must configure a password to continue. #### Response Example None (Success is indicated by HTTP status code 200. Errors are indicated by HTTP status code 406.) ### Notes If the password is set in the Kismet configuration files, this API will not be available and will return `HTTP 406`. ``` -------------------------------- ### Kismet Customization - kismet_site.conf Example Source: https://www.kismetwireless.net/docs/readme/configuring/configfiles Provides an example of a `kismet_site.conf` file, used for site-specific customizations. Options in this file override any default configurations, allowing for persistent custom settings across Kismet upgrades. ```kismet_config server_name=Some server server_description=Building 2 floor 3 gps=serial:device=/dev/ttyACM0,name=laptop remote_capture_listen=0.0.0.0 remote_capture_port=3501 source=wlan1:name=SomeServerWlan1 source=wlan2:name=SomeServerWlan2 ``` -------------------------------- ### Update Kismet Repository Source: https://www.kismetwireless.net/docs/readme/installing/linux Updates an existing Kismet git repository checkout to the latest version. This command should be run from within the Kismet directory. ```git cd kismet git pull ``` -------------------------------- ### Kismet Configuration Override Example Source: https://www.kismetwireless.net/docs/readme/configuring/configfiles This example demonstrates how to create a Kismet configuration override file to customize server name, source, and log title. The override is then applied when launching Kismet using the `--override` command-line option. ```bash server_name=Kismet RTL source=rtl433-0 log_title=KismetRtl433 ``` ```bash kismet --override rtl ``` ```bash kismet --override=/home/foo/some_config.conf ``` -------------------------------- ### Example Kismet Regex Filter for SSIDs Source: https://www.kismetwireless.net/docs/api/command_param An example demonstrating how to filter devices based on their advertised SSIDs using regular expressions. This specific example targets SSIDs that start with 'SomePrefix' or are exactly 'Linksys'. ```json regex = [ [ 'dot11.device/dot11.device.advertised_ssid_map/dot11.advertisedssid.ssid', '^SomePrefix.*' ], [ 'dot11.device/dot11.device.advertised_ssid_map/dot11.advertisedssid.ssid', '^Linksys$' ] ] ``` -------------------------------- ### Start a log Source: https://www.kismetwireless.net/docs/api/logging Opens a new log instance of a specified type. If a log of the same type is already open, a new instance with a sequential identifier will be created. ```APIDOC ## Start a log ### Description Open a new log; if the same type of log is closed and opened multiple times in one session, it will have multiple log instances (such as `Kismet-foo-2022-10-03-1.pcap`, `kismet-foo-2022-10-03-2.pcap` ). ### Method GET, POST ### Endpoint /logging/by-class/{LOGCLASS}/start.cmd ### Parameters #### Path Parameters - **LOGCLASS** (string) - REQUIRED - Log class / type to start. #### Query Parameters None #### Request Body (for POST requests) - **title** (string) - OPTIONAL - Alternate file name / log title. - **json** (object) - OPTIONAL - Additional parameters for the log, provided as a JSON document. ### Request Example (GET) ``` GET /logging/by-class/pcap/start.cmd ``` ### Request Example (POST) ```json { "title": "my_custom_log", "json": { "capture_source": "wlan0", "packet_limit": 10000 } } ``` ### Response #### Success Response (200) - **message** (string) - Success or failure message of log opening. #### Response Example ```json { "status": "success", "message": "Log started successfully.", "uuid": "abcdef12-3456-7890-abcd-ef1234567890" } ``` #### Error Response - **error** (string) - Error message, such as malformed log class or permissions error. #### Error Example ```json { "status": "error", "message": "Invalid log class specified." } ``` ``` -------------------------------- ### Timestamp Proxy Example in C++ Source: https://www.kismetwireless.net/docs/dev/tracked_components This C++ example demonstrates using `__Proxy` to handle a timestamp field. It shows how to map a standard `time_t` to an internal `uint64_t` tracker type, enabling transparent conversion during get and set operations. ```cpp public: __Proxy(timestamp, uint64_t, time_t, time_t, timestamp); ``` -------------------------------- ### GET /datasource/types.json Source: https://www.kismetwireless.net/docs/api/datasources Retrieves a list of all supported datasource types. This is useful for clients to determine if Kismet has been started with the required plugins or to display all possible datasource types. ```APIDOC ## GET /datasource/types.json ### Description Retrieves a list of all supported datasource types. This is useful for clients to determine if Kismet has been started with the required plugins or to display all possible datasource types. ### Method GET ### Endpoint /datasource/types.json ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **datasource_types** (array) - A list of available datasource types. #### Response Example { "datasource_types": [ { "name": "drone", "description": "Drone capture" }, { "name": "wlan", "description": "Wi-Fi capture" } ] } ``` -------------------------------- ### Kismet Source Startup Configuration Source: https://www.kismetwireless.net/docs/readme/tuning/tuning These options control how Kismet brings up multiple local data sources, especially useful when dealing with a large number of interfaces to prevent system instability. Tuning these can help alleviate kernel contention and timeouts during startup. ```ini source_stagger_threshold = [number] source_launch_group = [number] source_launch_delay = [seconds] ``` -------------------------------- ### Nginx Reverse Proxy Configuration for Kismet Source: https://www.kismetwireless.net/docs/readme/configuring/webserver Example nginx `location` stanza to proxy requests to a Kismet instance. It includes essential headers for WebSocket support and proper request forwarding. Note the trailing slash on `proxy_set_header` and `add_header` lines. ```nginx location /kismet/ { proxy_pass http://localhost:2501; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Scheme $scheme; proxy_set_header X-Proxy-Dir kismet/; add_header X-Proxy-Dir kismet/; proxy_http_version 1.1; client_max_body_size 0; } ``` -------------------------------- ### Kismet Configuration - Repeated Definitions Example Source: https://www.kismetwireless.net/docs/readme/configuring/configfiles Demonstrates how certain Kismet configuration options, like `source`, support repeated definitions to specify multiple instances. Each `source` line defines a separate Kismet data source. ```kismet_config source=wlan0 source=wlan1 ``` -------------------------------- ### HTTP GET Variable and Authentication Support Source: https://www.kismetwireless.net/docs/api/major_changes The API now properly supports HTTP GET variables and provides enhanced authentication mechanisms. ```APIDOC ## HTTP GET Variable and Authentication Support ### Description This update ensures proper support for HTTP GET variables and introduces robust API key and role-based authentication. ### Features: - **HTTP GET Variables:** Properly supported for requests. - **API Keys and Roles:** Users can now authenticate using API keys, which can be assigned specific roles. - **JSON Data Acceptance:** The API accepts JSON data via `application/json` in addition to `application/x-form-urlencoded`. - **Authentication Methods:** Authentication can be provided via `user`, `password`, or `KISMET` GET URL variables. ``` -------------------------------- ### KDSOPENSOURCE Source: https://www.kismetwireless.net/docs/dev/datasources Initiates a Kismet datasource. This command is sent for IPC sources or remote capture sources that have completed the initial handshake, requiring the source definition. ```APIDOC ## KDSOPENSOURCE (KismetDatasource.OpenSource) ### Description Kismet will start a datasource by sending a `KDSOPENSOURCE`; this will be sent for an IPC source or a remote capture source which has completed the initial handshake. ### Method Kismet -> Datasource ### Parameters #### Request Body - **definition** (string) - Required - Kismet source definition ### Response #### Success Response (200) `KDSOPENSOURCEREPORT` KismetDatasource.OpenSourceReport ``` -------------------------------- ### Kismet Configuration - Optional Include Directive Example Source: https://www.kismetwireless.net/docs/readme/configuring/configfiles Illustrates the use of `opt_include` to include optional configuration files. If an optional file does not exist, Kismet will issue a warning but continue operation. ```kismet_config opt_include= kismet_custom_plugins.conf ``` -------------------------------- ### Example Kismet RRD Dataset Structure (JSON) Source: https://www.kismetwireless.net/docs/api/rrd An example of a Kismet RRD dataset, illustrating the storage of day, minute, and hour vectors along with serialization and blank values. ```json { "kismet.packetchain.processed_packets_rrd": { "kismet.common.rrd.day_vec": [ 68, 73, 121, 134, 124, 69, 98, 103, 69, 92, 98, 104, 79, 128, 107, 92, 82, 71, 72, 75, 68, 71, 72, 75 ], "kismet.common.rrd.blank_val": 0, "kismet.common.rrd.last_time": 1673302851, "kismet.common.rrd.serial_time": 1673302851, "kismet.common.rrd.minute_vec": [ 95, 87, 28, 116, 158, 128, 47, 13, 271, 159, 165, 2, 60, 49, 149, 27, 55, 157, 130, 169, 51, 50, 108, 103, 85, 33, 62, 244, 53, 109, 13, 155, 105, 37, 51, 174, 51, 41, 40, 173, 49, 155, 5, 54, 88, 106, 64, 54, 71, 164, 62, 12, 154, 2, 156, 36, 47, 47, 127, 1 ], "kismet.common.rrd.hour_vec": [ 71, 81, 78, 67, 68, 74, 63, 66, 74, 75, 73, 82, 96, 89, 73, 75, 74, 73, 90, 82, 87, 61, 73, 66, 81, 71, 67, 65, 90, 67, 66, 80, 68, 76, 66, 62, 70, 68, 63, 59, 67, 61, 67, 67, 66, 74, 70, 72, 71, 71, 83, 75, 78, 69, 68, 78, 80, 74, 77, 73 ] } } ``` -------------------------------- ### API /auth/apikey Listing Source: https://www.kismetwireless.net/docs/api/login Fetches a list of all created API tokens, their descriptions, and associated roles. Access to token details is dependent on the `httpd_allow_auth_view` configuration setting. ```APIDOC ## GET /auth/apikey/list.json ## GET /auth/apikey/list.ekjson ## GET /auth/apikey/list.prettyjson ### Description Fetches a list of all created API tokens, their descriptions, and associated roles. If `httpd_allow_auth_view` is set to `false` in the Kismet configuration, the results will not include the API tokens, and the user must inspect the Kismet configuration files to view previously created API keys. ### Method GET ### Endpoint /auth/apikey/list.json /auth/apikey/list.ekjson /auth/apikey/list.prettyjson ### Response #### Success Response (200) JSON array of provisioned API keys. #### Error Response On failure. ``` -------------------------------- ### Curl Example for Kismet Regex Filter Source: https://www.kismetwireless.net/docs/api/command_param This example shows how to use `curl` to send a POST request to a Kismet API endpoint with a regex filter. It demonstrates filtering for devices with SSIDs matching '^Linksys$'. ```bash $ curl -d \ 'json={"regex": [["dot11.device/dot11.device.advertised_ssid_map/dot11.advertisedssid.ssid", "^Linksys$"]]}' \ http://user:password@server:2501/devices/views/phydot11_accesspoints/devices.json ``` -------------------------------- ### KDSLISTINTERFACES Source: https://www.kismetwireless.net/docs/dev/datasources Requests a list of supported interfaces from Kismet. This is used to populate the Data Sources display, allowing users to activate available sources. ```APIDOC ## KDSLISTINTERFACES (KismetDatasource.ListInterfaces) ### Description Request a list of supported interfaces; Kismet uses this to populate the Data Sources display where a user can activate available sources. ### Method Kismet -> Datasource ### Parameters #### Request Body _None_ ### Response #### Success Response (200) `KDSINTERFACESREPORT` KismetDatasource.InterfacesReport ``` -------------------------------- ### POST /devices/multikey/as-object/devices Source: https://www.kismetwireless.net/docs/api/devices Fetches devices matching any of multiple device keys and returns them as a JSON dictionary indexed by device key. Useful for monitoring target devices. ```APIDOC ## POST /devices/multikey/as-object/devices ### Description Fetch devices matching any of multiple device keys. Typically this endpoint would be used to monitor the presence of target devices. This API returns a JSON dictionary of devices, indexed by device key. ### Method POST ### Endpoint `/devices/multikey/as-object/devices.json` `/devices/multikey/as-object/devices.ekjson` `/devices/multikey/as-object/devices.prettyjson` ### Parameters #### Request Body - **devices** (list of strings) - Required - A list of device keys to search. - **fields** (string) - Optional - Field simplification for reduced data return. ### Response #### Success Response (200) - **devices** (object) - A JSON dictionary of device objects, indexed by device key. #### Error Response - **ERROR** - Request error, such as a malformed device key ``` -------------------------------- ### macOS CoreWLAN Wi-Fi Channel Control Examples Source: https://www.kismetwireless.net/docs/readme/datasources/wifi-macos Configuration examples for controlling Wi-Fi channel behavior on the macOS CoreWLAN source. This includes disabling channel hopping, setting a specific channel, and defining a fixed list of channels to monitor. ```text source=wlan0:name=Foo,channel_hop=false,channel=6 ``` ```text source=wlan1:name=Wifi6eCard,channel_hop=false,channel=1W6e ``` ```text source=wlan0:name=Foo,channels="1,2,3,4,5,6,36HT40+" ``` ```text kismet -c 'wlan0:name=Foo,channels="1,2,3,4,5,6,36HT40+"' ``` -------------------------------- ### GET /gps/all_gps.json Source: https://www.kismetwireless.net/docs/api/gps Retrieves a list of all GPS devices that have been configured within Kismet. ```APIDOC ## GET /gps/all_gps.json ### Description Fetch a list of all configured GPS devices. ### Method GET ### Endpoint /gps/all_gps.json /gps/all_gps.ekjson /gps/all_gps.prettyjson ### Parameters None ### Request Example None ### Response #### Success Response (200) (List of configured GPS devices) #### Response Example ```json [ { "uuid": "some-uuid", "type": "driver1", "definition": "gpsd://localhost:2947" } ] ``` ``` -------------------------------- ### List available log types Source: https://www.kismetwireless.net/docs/api/logging Fetches a list of all available logging drivers. Each driver corresponds to a specific log output format. ```APIDOC ## List available log types ### Description Fetch a list of all available log drivers. Each logging driver handles a log output format. ### Method GET ### Endpoint /logging/drivers.json /logging/drivers.ekjson /logging/drivers.prettyjson ### Parameters None ### Request Example None ### Response #### Success Response (200) - **drivers** (array) - A list of available logging drivers. #### Response Example ```json { "drivers": [ "pcap", "kismetdb", "netsniff", "null" ] } ``` ``` -------------------------------- ### GET /gps/drivers.json Source: https://www.kismetwireless.net/docs/api/gps Fetches a list of supported GPS driver types available in Kismet. ```APIDOC ## GET /gps/drivers.json ### Description Fetch a list of supported GPS driver types. ### Method GET ### Endpoint /gps/drivers.json /gps/drivers.ekjson /gps/drivers.prettyjson ### Parameters None ### Request Example None ### Response #### Success Response (200) (List of supported GPS driver types) #### Response Example ```json [ "driver1", "driver2" ] ``` ``` -------------------------------- ### Kismet Configuration - Include Directive Example Source: https://www.kismetwireless.net/docs/readme/configuring/configfiles Shows how to include other configuration files into the main Kismet configuration. The `include` directive requires the specified file to exist, otherwise Kismet will exit with an error. ```kismet_config include= kismet_httpd.conf ``` -------------------------------- ### GET /gps/by-uuid/{UUID}/location.json Source: https://www.kismetwireless.net/docs/api/gps Fetches the current location of a specific GPS device, identified by its UUID. ```APIDOC ## GET /gps/by-uuid/{UUID}/location.json ### Description Fetch the current location of a specific GPS, identified by UUID. ### Method GET, POST ### Endpoint /gps/by-uuid/{UUID}/location.json /gps/by-uuid/{UUID}/location.ekjson /gps/by-uuid/{UUID}/location.prettyjson ### Parameters #### Path Parameters - **UUID** (string) - REQUIRED - UUID of the GPS device. #### Query Parameters - **fields** (string) - OPTIONAL - Field simplification to reduce returned data. #### Request Body (for POST method) - **fields** (string) - OPTIONAL - Field simplification to reduce returned data. ### Request Example (GET) ``` /gps/by-uuid/some-uuid/location.json?fields=lat,lon ``` ### Request Example (POST) ```json { "fields": "lat,lon" } ``` ### Response #### Success Response (200) (Current GPS location data for the specified device) #### Response Example ```json { "latitude": 34.0522, "longitude": -118.2437, "altitude": 71.0, "speed": 0.0, "timestamp": 1678886400 } ``` ``` -------------------------------- ### POST /auth/apikey/generate.cmd Source: https://www.kismetwireless.net/docs/api/login Creates a new API token with a specified name, role, and duration. Token creation is only permitted if `httpd_allow_auth_creation` is set to `true`. Tokens can only be viewed at the time of creation unless `httpd_allow_auth_view` is also `true`. ```APIDOC ## POST /auth/apikey/generate.cmd ### Description Creates a new API token with a specified name, role, and duration. Token creation is only permitted if `httpd_allow_auth_creation` is set to `true`. If `httpd_allow_auth_view` is not set to `true`, API tokens may only be viewed at the time of creation or by inspecting the session file. Users should be prompted to copy the API token immediately after creation. ### Method POST ### Endpoint /auth/apikey/generate.cmd ### Parameters #### Request Body - **name** (string) - Required - Name of the API key; each API key must have a unique name. - **role** (string) - Required - Role of the API key, restricting access. - **duration** (string) - Required - Duration in seconds for token validity. `0` indicates a permanent token. ### Request Example ```json { "name": "my_api_key", "role": "admin", "duration": "3600" } ``` ### Response #### Success Response (200) On success, a plain-text response containing the newly created token. #### Error Response On failure to create a token due to improper creation data or other issues. `httpd_allow_auth_creation` must be `true` or this API will return an error. ```