@censys/platform-sdk 0.10.3 → 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -2
- package/docs/sdks/adversaryinvestigation/README.md +625 -0
- package/docs/sdks/threathunting/README.md +8 -8
- package/funcs/threatHuntingCreateCenseyeJob.d.ts +1 -1
- package/funcs/threatHuntingCreateCenseyeJob.js +1 -1
- package/funcs/threatHuntingCreateTrackedScan.d.ts +1 -1
- package/funcs/threatHuntingCreateTrackedScan.js +1 -1
- package/funcs/threatHuntingGetCenseyeJob.d.ts +1 -1
- package/funcs/threatHuntingGetCenseyeJob.js +1 -1
- package/funcs/threatHuntingGetCenseyeJobResults.d.ts +1 -1
- package/funcs/threatHuntingGetCenseyeJobResults.js +1 -1
- package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts +1 -1
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js +1 -1
- package/funcs/threatHuntingListThreats.d.ts +1 -1
- package/funcs/threatHuntingListThreats.js +1 -1
- package/funcs/threatHuntingValueCounts.d.ts +1 -1
- package/funcs/threatHuntingValueCounts.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/package.json +1 -1
- package/sdk/adversaryinvestigation.d.ts +54 -0
- package/sdk/adversaryinvestigation.d.ts.map +1 -0
- package/sdk/adversaryinvestigation.js +82 -0
- package/sdk/adversaryinvestigation.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/threathunting.d.ts +7 -7
- package/sdk/threathunting.js +7 -7
- package/src/funcs/threatHuntingCreateCenseyeJob.ts +1 -1
- package/src/funcs/threatHuntingCreateTrackedScan.ts +1 -1
- package/src/funcs/threatHuntingGetCenseyeJob.ts +1 -1
- package/src/funcs/threatHuntingGetCenseyeJobResults.ts +1 -1
- package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +1 -1
- package/src/funcs/threatHuntingListThreats.ts +1 -1
- package/src/funcs/threatHuntingValueCounts.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/sdk/adversaryinvestigation.ts +138 -0
- package/src/sdk/sdk.ts +8 -0
- package/src/sdk/threathunting.ts +7 -7
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
Endpoints related to the
|
|
5
|
+
Endpoints related to the Adversary Investigation product
|
|
6
6
|
|
|
7
7
|
### Available Operations
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ Endpoints related to the Threat Hunting product
|
|
|
17
17
|
|
|
18
18
|
## createCenseyeJob
|
|
19
19
|
|
|
20
|
-
Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts
|
|
20
|
+
Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
21
21
|
|
|
22
22
|
### Example Usage
|
|
23
23
|
|
|
@@ -107,7 +107,7 @@ run();
|
|
|
107
107
|
|
|
108
108
|
## getCenseyeJob
|
|
109
109
|
|
|
110
|
-
Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the
|
|
110
|
+
Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
111
111
|
|
|
112
112
|
### Example Usage
|
|
113
113
|
|
|
@@ -185,7 +185,7 @@ run();
|
|
|
185
185
|
|
|
186
186
|
## getCenseyeJobResults
|
|
187
187
|
|
|
188
|
-
Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the
|
|
188
|
+
Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
189
189
|
|
|
190
190
|
### Example Usage
|
|
191
191
|
|
|
@@ -263,7 +263,7 @@ run();
|
|
|
263
263
|
|
|
264
264
|
## getHostObservationsWithCertificate
|
|
265
265
|
|
|
266
|
-
Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to
|
|
266
|
+
Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
267
267
|
|
|
268
268
|
### Example Usage
|
|
269
269
|
|
|
@@ -351,7 +351,7 @@ run();
|
|
|
351
351
|
|
|
352
352
|
## createTrackedScan
|
|
353
353
|
|
|
354
|
-
Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the
|
|
354
|
+
Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
355
355
|
|
|
356
356
|
### Example Usage
|
|
357
357
|
|
|
@@ -521,7 +521,7 @@ run();
|
|
|
521
521
|
|
|
522
522
|
## listThreats
|
|
523
523
|
|
|
524
|
-
Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the
|
|
524
|
+
Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
525
525
|
|
|
526
526
|
### Example Usage
|
|
527
527
|
|
|
@@ -599,7 +599,7 @@ run();
|
|
|
599
599
|
|
|
600
600
|
## valueCounts
|
|
601
601
|
|
|
602
|
-
Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the
|
|
602
|
+
Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
603
603
|
|
|
604
604
|
### Example Usage
|
|
605
605
|
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* CensEye: Create a pivot analysis job
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts
|
|
15
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
16
16
|
*/
|
|
17
17
|
export declare function threatHuntingCreateCenseyeJob(client: SDKCore, request: operations.V3ThreathuntingCenseyeJobsCreateRequest, options?: RequestOptions): APIPromise<Result<operations.V3ThreathuntingCenseyeJobsCreateResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=threatHuntingCreateCenseyeJob.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* CensEye: Create a pivot analysis job
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts
|
|
53
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
54
54
|
*/
|
|
55
55
|
function threatHuntingCreateCenseyeJob(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Live Discovery: Initiate a new scan
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the
|
|
15
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
16
16
|
*/
|
|
17
17
|
export declare function threatHuntingCreateTrackedScan(client: SDKCore, request: operations.V3ThreathuntingScansDiscoveryRequest, options?: RequestOptions): APIPromise<Result<operations.V3ThreathuntingScansDiscoveryResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=threatHuntingCreateTrackedScan.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* Live Discovery: Initiate a new scan
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the
|
|
53
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
54
54
|
*/
|
|
55
55
|
function threatHuntingCreateTrackedScan(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* CensEye: Get job status
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the
|
|
15
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
16
16
|
*/
|
|
17
17
|
export declare function threatHuntingGetCenseyeJob(client: SDKCore, request: operations.V3ThreathuntingCenseyeJobsGetRequest, options?: RequestOptions): APIPromise<Result<operations.V3ThreathuntingCenseyeJobsGetResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=threatHuntingGetCenseyeJob.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* CensEye: Get job status
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the
|
|
53
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
54
54
|
*/
|
|
55
55
|
function threatHuntingGetCenseyeJob(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* CensEye: Get job results
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the
|
|
15
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
16
16
|
*/
|
|
17
17
|
export declare function threatHuntingGetCenseyeJobResults(client: SDKCore, request: operations.V3ThreathuntingCenseyeJobResultsRequest, options?: RequestOptions): APIPromise<Result<operations.V3ThreathuntingCenseyeJobResultsResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=threatHuntingGetCenseyeJobResults.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* CensEye: Get job results
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the
|
|
53
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
54
54
|
*/
|
|
55
55
|
function threatHuntingGetCenseyeJobResults(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Get host history for a certificate
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to
|
|
15
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
16
16
|
*/
|
|
17
17
|
export declare function threatHuntingGetHostObservationsWithCertificate(client: SDKCore, request: operations.V3ThreathuntingGetHostObservationsWithCertificateRequest, options?: RequestOptions): APIPromise<Result<operations.V3ThreathuntingGetHostObservationsWithCertificateResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=threatHuntingGetHostObservationsWithCertificate.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* Get host history for a certificate
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to
|
|
53
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
54
54
|
*/
|
|
55
55
|
function threatHuntingGetHostObservationsWithCertificate(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* List active threats
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the
|
|
15
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
16
16
|
*/
|
|
17
17
|
export declare function threatHuntingListThreats(client: SDKCore, request: operations.V3ThreathuntingThreatsListRequest, options?: RequestOptions): APIPromise<Result<operations.V3ThreathuntingThreatsListResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=threatHuntingListThreats.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* List active threats
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the
|
|
53
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
54
54
|
*/
|
|
55
55
|
function threatHuntingListThreats(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* CensEye: Retrieve value counts to discover pivots
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the
|
|
15
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
16
16
|
*/
|
|
17
17
|
export declare function threatHuntingValueCounts(client: SDKCore, request: operations.V3ThreathuntingValueCountsRequest, options?: RequestOptions): APIPromise<Result<operations.V3ThreathuntingValueCountsResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=threatHuntingValueCounts.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* CensEye: Retrieve value counts to discover pivots
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the
|
|
53
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
54
54
|
*/
|
|
55
55
|
function threatHuntingValueCounts(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
package/jsr.json
CHANGED
package/lib/config.d.ts
CHANGED
|
@@ -34,9 +34,9 @@ export type SDKOptions = {
|
|
|
34
34
|
export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
35
35
|
export declare const SDK_METADATA: {
|
|
36
36
|
readonly language: "typescript";
|
|
37
|
-
readonly openapiDocVersion: "1.0.
|
|
38
|
-
readonly sdkVersion: "0.10.
|
|
37
|
+
readonly openapiDocVersion: "1.0.89";
|
|
38
|
+
readonly sdkVersion: "0.10.4";
|
|
39
39
|
readonly genVersion: "2.879.1";
|
|
40
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.10.
|
|
40
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.10.4 2.879.1 1.0.89 @censys/platform-sdk";
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/config.js
CHANGED
|
@@ -30,9 +30,9 @@ function serverURLFromOptions(options) {
|
|
|
30
30
|
}
|
|
31
31
|
exports.SDK_METADATA = {
|
|
32
32
|
language: "typescript",
|
|
33
|
-
openapiDocVersion: "1.0.
|
|
34
|
-
sdkVersion: "0.10.
|
|
33
|
+
openapiDocVersion: "1.0.89",
|
|
34
|
+
sdkVersion: "0.10.4",
|
|
35
35
|
genVersion: "2.879.1",
|
|
36
|
-
userAgent: "speakeasy-sdk/typescript 0.10.
|
|
36
|
+
userAgent: "speakeasy-sdk/typescript 0.10.4 2.879.1 1.0.89 @censys/platform-sdk",
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.js.map
|
package/package.json
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as operations from "../models/operations/index.js";
|
|
3
|
+
export declare class AdversaryInvestigation extends ClientSDK {
|
|
4
|
+
/**
|
|
5
|
+
* CensEye: Create a pivot analysis job
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
9
|
+
*/
|
|
10
|
+
createCenseyeJob(request: operations.V3ThreathuntingCenseyeJobsCreateRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobsCreateResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* CensEye: Get job status
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
16
|
+
*/
|
|
17
|
+
getCenseyeJob(request: operations.V3ThreathuntingCenseyeJobsGetRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobsGetResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* CensEye: Get job results
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
23
|
+
*/
|
|
24
|
+
getCenseyeJobResults(request: operations.V3ThreathuntingCenseyeJobResultsRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobResultsResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Get host history for a certificate
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
30
|
+
*/
|
|
31
|
+
getHostObservationsWithCertificate(request: operations.V3ThreathuntingGetHostObservationsWithCertificateRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingGetHostObservationsWithCertificateResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Live Discovery: Initiate a new scan
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
37
|
+
*/
|
|
38
|
+
createTrackedScan(request: operations.V3ThreathuntingScansDiscoveryRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingScansDiscoveryResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* List active threats
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
44
|
+
*/
|
|
45
|
+
listThreats(request: operations.V3ThreathuntingThreatsListRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingThreatsListResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* CensEye: Retrieve value counts to discover pivots
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
51
|
+
*/
|
|
52
|
+
valueCounts(request: operations.V3ThreathuntingValueCountsRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingValueCountsResponse>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=adversaryinvestigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adversaryinvestigation.d.ts","sourceRoot":"","sources":["../src/sdk/adversaryinvestigation.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,sBAAuB,SAAQ,SAAS;IACnD;;;;;OAKG;IACG,gBAAgB,CACpB,OAAO,EAAE,UAAU,CAAC,uCAAuC,EAC3D,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,wCAAwC,CAAC;IAQ/D;;;;;OAKG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qCAAqC,CAAC;IAQ5D;;;;;OAKG;IACG,oBAAoB,CACxB,OAAO,EAAE,UAAU,CAAC,uCAAuC,EAC3D,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,wCAAwC,CAAC;IAQ/D;;;;;OAKG;IACG,kCAAkC,CACtC,OAAO,EACL,UAAU,CAAC,wDAAwD,EACrE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,UAAU,CAAC,yDAAyD,CACrE;IAQD;;;;;OAKG;IACG,iBAAiB,CACrB,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qCAAqC,CAAC;IAQ5D;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kCAAkC,CAAC;IAQzD;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kCAAkC,CAAC;CAO1D"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AdversaryInvestigation = void 0;
|
|
7
|
+
const threatHuntingCreateCenseyeJob_js_1 = require("../funcs/threatHuntingCreateCenseyeJob.js");
|
|
8
|
+
const threatHuntingCreateTrackedScan_js_1 = require("../funcs/threatHuntingCreateTrackedScan.js");
|
|
9
|
+
const threatHuntingGetCenseyeJob_js_1 = require("../funcs/threatHuntingGetCenseyeJob.js");
|
|
10
|
+
const threatHuntingGetCenseyeJobResults_js_1 = require("../funcs/threatHuntingGetCenseyeJobResults.js");
|
|
11
|
+
const threatHuntingGetHostObservationsWithCertificate_js_1 = require("../funcs/threatHuntingGetHostObservationsWithCertificate.js");
|
|
12
|
+
const threatHuntingListThreats_js_1 = require("../funcs/threatHuntingListThreats.js");
|
|
13
|
+
const threatHuntingValueCounts_js_1 = require("../funcs/threatHuntingValueCounts.js");
|
|
14
|
+
const sdks_js_1 = require("../lib/sdks.js");
|
|
15
|
+
const fp_js_1 = require("../types/fp.js");
|
|
16
|
+
class AdversaryInvestigation extends sdks_js_1.ClientSDK {
|
|
17
|
+
/**
|
|
18
|
+
* CensEye: Create a pivot analysis job
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
22
|
+
*/
|
|
23
|
+
async createCenseyeJob(request, options) {
|
|
24
|
+
return (0, fp_js_1.unwrapAsync)((0, threatHuntingCreateCenseyeJob_js_1.threatHuntingCreateCenseyeJob)(this, request, options));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* CensEye: Get job status
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
31
|
+
*/
|
|
32
|
+
async getCenseyeJob(request, options) {
|
|
33
|
+
return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetCenseyeJob_js_1.threatHuntingGetCenseyeJob)(this, request, options));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* CensEye: Get job results
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
40
|
+
*/
|
|
41
|
+
async getCenseyeJobResults(request, options) {
|
|
42
|
+
return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetCenseyeJobResults_js_1.threatHuntingGetCenseyeJobResults)(this, request, options));
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get host history for a certificate
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
49
|
+
*/
|
|
50
|
+
async getHostObservationsWithCertificate(request, options) {
|
|
51
|
+
return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetHostObservationsWithCertificate_js_1.threatHuntingGetHostObservationsWithCertificate)(this, request, options));
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Live Discovery: Initiate a new scan
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
58
|
+
*/
|
|
59
|
+
async createTrackedScan(request, options) {
|
|
60
|
+
return (0, fp_js_1.unwrapAsync)((0, threatHuntingCreateTrackedScan_js_1.threatHuntingCreateTrackedScan)(this, request, options));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* List active threats
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
67
|
+
*/
|
|
68
|
+
async listThreats(request, options) {
|
|
69
|
+
return (0, fp_js_1.unwrapAsync)((0, threatHuntingListThreats_js_1.threatHuntingListThreats)(this, request, options));
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* CensEye: Retrieve value counts to discover pivots
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
76
|
+
*/
|
|
77
|
+
async valueCounts(request, options) {
|
|
78
|
+
return (0, fp_js_1.unwrapAsync)((0, threatHuntingValueCounts_js_1.threatHuntingValueCounts)(this, request, options));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.AdversaryInvestigation = AdversaryInvestigation;
|
|
82
|
+
//# sourceMappingURL=adversaryinvestigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adversaryinvestigation.js","sourceRoot":"","sources":["../src/sdk/adversaryinvestigation.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gGAA0F;AAC1F,kGAA4F;AAC5F,0FAAoF;AACpF,wGAAkG;AAClG,oIAA8H;AAC9H,sFAAgF;AAChF,sFAAgF;AAChF,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,sBAAuB,SAAQ,mBAAS;IACnD;;;;;OAKG;IACH,KAAK,CAAC,gBAAgB,CACpB,OAA2D,EAC3D,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gEAA6B,EAC9C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,OAAwD,EACxD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0DAA0B,EAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,oBAAoB,CACxB,OAA2D,EAC3D,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wEAAiC,EAClD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,kCAAkC,CACtC,OACqE,EACrE,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,oGAA+C,EAChE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAAwD,EACxD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kEAA8B,EAC/C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA1HD,wDA0HC"}
|
package/sdk/sdk.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClientSDK } from "../lib/sdks.js";
|
|
2
2
|
import { AccountManagement } from "./accountmanagement.js";
|
|
3
|
+
import { AdversaryInvestigation } from "./adversaryinvestigation.js";
|
|
3
4
|
import { Collections } from "./collections.js";
|
|
4
5
|
import { GlobalData } from "./globaldata.js";
|
|
5
6
|
import { ThreatHunting } from "./threathunting.js";
|
|
@@ -12,5 +13,7 @@ export declare class SDK extends ClientSDK {
|
|
|
12
13
|
get globalData(): GlobalData;
|
|
13
14
|
private _threatHunting?;
|
|
14
15
|
get threatHunting(): ThreatHunting;
|
|
16
|
+
private _adversaryInvestigation?;
|
|
17
|
+
get adversaryInvestigation(): AdversaryInvestigation;
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=sdk.d.ts.map
|
package/sdk/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,qBAAa,GAAI,SAAQ,SAAS;IAChC,OAAO,CAAC,kBAAkB,CAAC,CAAoB;IAC/C,IAAI,iBAAiB,IAAI,iBAAiB,CAEzC;IAED,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,IAAI,UAAU,IAAI,UAAU,CAE3B;IAED,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,IAAI,aAAa,IAAI,aAAa,CAEjC;CACF"}
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,qBAAa,GAAI,SAAQ,SAAS;IAChC,OAAO,CAAC,kBAAkB,CAAC,CAAoB;IAC/C,IAAI,iBAAiB,IAAI,iBAAiB,CAEzC;IAED,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,IAAI,UAAU,IAAI,UAAU,CAE3B;IAED,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,IAAI,aAAa,IAAI,aAAa,CAEjC;IAED,OAAO,CAAC,uBAAuB,CAAC,CAAyB;IACzD,IAAI,sBAAsB,IAAI,sBAAsB,CAInD;CACF"}
|
package/sdk/sdk.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.SDK = void 0;
|
|
7
7
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
8
8
|
const accountmanagement_js_1 = require("./accountmanagement.js");
|
|
9
|
+
const adversaryinvestigation_js_1 = require("./adversaryinvestigation.js");
|
|
9
10
|
const collections_js_1 = require("./collections.js");
|
|
10
11
|
const globaldata_js_1 = require("./globaldata.js");
|
|
11
12
|
const threathunting_js_1 = require("./threathunting.js");
|
|
@@ -22,6 +23,9 @@ class SDK extends sdks_js_1.ClientSDK {
|
|
|
22
23
|
get threatHunting() {
|
|
23
24
|
return (this._threatHunting ?? (this._threatHunting = new threathunting_js_1.ThreatHunting(this._options)));
|
|
24
25
|
}
|
|
26
|
+
get adversaryInvestigation() {
|
|
27
|
+
return (this._adversaryInvestigation ?? (this._adversaryInvestigation = new adversaryinvestigation_js_1.AdversaryInvestigation(this._options)));
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
exports.SDK = SDK;
|
|
27
31
|
//# sourceMappingURL=sdk.js.map
|
package/sdk/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,iEAA2D;AAC3D,qDAA+C;AAC/C,mDAA6C;AAC7C,yDAAmD;AAEnD,MAAa,GAAI,SAAQ,mBAAS;IAEhC,IAAI,iBAAiB;QACnB,OAAO,CAAC,IAAI,CAAC,kBAAkB,KAAvB,IAAI,CAAC,kBAAkB,GAAK,IAAI,wCAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC5E,CAAC;IAGD,IAAI,WAAW;QACb,OAAO,CAAC,IAAI,CAAC,YAAY,KAAjB,IAAI,CAAC,YAAY,GAAK,IAAI,4BAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAChE,CAAC;IAGD,IAAI,UAAU;QACZ,OAAO,CAAC,IAAI,CAAC,WAAW,KAAhB,IAAI,CAAC,WAAW,GAAK,IAAI,0BAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC9D,CAAC;IAGD,IAAI,aAAa;QACf,OAAO,CAAC,IAAI,CAAC,cAAc,KAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,gCAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpE,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,iEAA2D;AAC3D,2EAAqE;AACrE,qDAA+C;AAC/C,mDAA6C;AAC7C,yDAAmD;AAEnD,MAAa,GAAI,SAAQ,mBAAS;IAEhC,IAAI,iBAAiB;QACnB,OAAO,CAAC,IAAI,CAAC,kBAAkB,KAAvB,IAAI,CAAC,kBAAkB,GAAK,IAAI,wCAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC5E,CAAC;IAGD,IAAI,WAAW;QACb,OAAO,CAAC,IAAI,CAAC,YAAY,KAAjB,IAAI,CAAC,YAAY,GAAK,IAAI,4BAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAChE,CAAC;IAGD,IAAI,UAAU;QACZ,OAAO,CAAC,IAAI,CAAC,WAAW,KAAhB,IAAI,CAAC,WAAW,GAAK,IAAI,0BAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC9D,CAAC;IAGD,IAAI,aAAa;QACf,OAAO,CAAC,IAAI,CAAC,cAAc,KAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,gCAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpE,CAAC;IAGD,IAAI,sBAAsB;QACxB,OAAO,CAAC,IAAI,CAAC,uBAAuB,KAA5B,IAAI,CAAC,uBAAuB,GAAK,IAAI,kDAAsB,CACjE,IAAI,CAAC,QAAQ,CACd,EAAC,CAAC;IACL,CAAC;CACF;AA3BD,kBA2BC"}
|
package/sdk/threathunting.d.ts
CHANGED
|
@@ -5,35 +5,35 @@ export declare class ThreatHunting extends ClientSDK {
|
|
|
5
5
|
* CensEye: Create a pivot analysis job
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts
|
|
8
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
9
9
|
*/
|
|
10
10
|
createCenseyeJob(request: operations.V3ThreathuntingCenseyeJobsCreateRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobsCreateResponse>;
|
|
11
11
|
/**
|
|
12
12
|
* CensEye: Get job status
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the
|
|
15
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
16
16
|
*/
|
|
17
17
|
getCenseyeJob(request: operations.V3ThreathuntingCenseyeJobsGetRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobsGetResponse>;
|
|
18
18
|
/**
|
|
19
19
|
* CensEye: Get job results
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
|
-
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the
|
|
22
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
23
23
|
*/
|
|
24
24
|
getCenseyeJobResults(request: operations.V3ThreathuntingCenseyeJobResultsRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobResultsResponse>;
|
|
25
25
|
/**
|
|
26
26
|
* Get host history for a certificate
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to
|
|
29
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
30
30
|
*/
|
|
31
31
|
getHostObservationsWithCertificate(request: operations.V3ThreathuntingGetHostObservationsWithCertificateRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingGetHostObservationsWithCertificateResponse>;
|
|
32
32
|
/**
|
|
33
33
|
* Live Discovery: Initiate a new scan
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
-
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the
|
|
36
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
37
37
|
*/
|
|
38
38
|
createTrackedScan(request: operations.V3ThreathuntingScansDiscoveryRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingScansDiscoveryResponse>;
|
|
39
39
|
/**
|
|
@@ -47,14 +47,14 @@ export declare class ThreatHunting extends ClientSDK {
|
|
|
47
47
|
* List active threats
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
|
-
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the
|
|
50
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
51
51
|
*/
|
|
52
52
|
listThreats(request: operations.V3ThreathuntingThreatsListRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingThreatsListResponse>;
|
|
53
53
|
/**
|
|
54
54
|
* CensEye: Retrieve value counts to discover pivots
|
|
55
55
|
*
|
|
56
56
|
* @remarks
|
|
57
|
-
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the
|
|
57
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
58
58
|
*/
|
|
59
59
|
valueCounts(request: operations.V3ThreathuntingValueCountsRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingValueCountsResponse>;
|
|
60
60
|
}
|