You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An ip range finding creates a new ip range for a project. IP addresses are in the IPv4 format.
132
+
An ip range finding creates a new ip range for a project. IP addresses are in the IPv4 format.`IpRangeFindings` can also be used to attach information to an IP Range resource.
Dynamic findings allow jobs to attach custom data to resources.
372
+
Custom findings attach finding field information to a resource. There are custom findings for every type of resources. When you do not specify the _type of finding_ that you are logging, you are creating a custom finding for the associated resource type.
Here is an example of a **custom finding** for a port with the python SDK. In this example, the port will show the custom information _This port
384
+
runs an HTTP server_, with a text field attached to it:
298
385
299
-
```json
300
-
{
301
-
"type": "CustomFinding",
302
-
"domainName": "red-kite.io",
303
-
"fields": [
304
-
{
305
-
"type": "text",
306
-
"label": "Domain greatness level",
307
-
"data": "This domain is great, would recommend"
308
-
}
309
-
]
310
-
}
386
+
```python
387
+
from stalker_job_sdk import PortFinding, log_finding, TextField
388
+
port =80
389
+
ip ="0.0.0.0"
390
+
log_finding(
391
+
PortFinding(
392
+
"PortFunFact", ip, port, "tcp", "This is a fun fact about a port", [
393
+
TextField('myfieldkey', 'My field title', 'My field data')
394
+
]
395
+
)
396
+
)
311
397
```
312
398
313
-
Here is an example of a custom finding for a port with the python SDK. In this example, the port will show the custom information _This port
314
-
runs an HTTP server_:
399
+
Notice how the key `PortFunFact` can be anything, how information is provided through `TextField`s and how the finding type is not provided to use the default value.
400
+
401
+
To compare, here is an example of how to create a port with the `PortFinding` class, which here is **not** used as a custom finding. You will see that the key is `PortFinding`, no fields are provided, and the type is `PortFinding` as well:
315
402
316
403
```python
317
404
from stalker_job_sdk import PortFinding, log_finding
318
405
port =80
319
406
ip ="0.0.0.0"
320
407
log_finding(
321
408
PortFinding(
322
-
"PortFunFact", ip, port, "tcp", "This is a fun fact about a port"
Copy file name to clipboardExpand all lines: docs/docs/concepts/project.md
+2-6
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,9 @@ description: Organizing your data through projects
6
6
7
7
# Projects
8
8
9
-
Projects are the way to organize and centralize resources. Resources are unique per project, and deleting the project will delete all its
9
+
Projects are the way to organize and centralize [resources](./resources.md). Resources are unique per project, and deleting the project will delete all its
10
10
resources and related information.
11
11
12
12
The project's name must be unique, but it can always be changed. You can also add a logo for display purposes, but it is not mandatory.
13
13
14
-
## Subnets
15
-
16
-
In the case where a target owns a public subnet, you can add the different subnets in the projects page.
17
-
18
-
For a subnet of `127.0.0.1/24`, you would simply add `127.0.0.1` in the _IP Address_ field, and the `/24` in the _Short Mask_ field.
14
+
> Red Kite allows to work on multiple projects at once, but using the global project filter in the navigation bar, you can also focus your work on a single project at a time. It will pre-filter data in displays such as tables and metrics.
Resources represent the core entities of an exposed network. They are used to store and show the data found by
@@ -22,29 +24,40 @@ up-to-date. Want to dive deeper? Check out the section on [learn more about find
22
24
## Types of Resources
23
25
24
26
Resources come in various types, each created by specific findings. Some findings are generated through the user interface, while others
25
-
originate from the API. Regardless of their origin, every resource is tied to a specific project.
27
+
originate from the API. Regardless of their origin, every resource is [tied to a specific project](./project.md).
26
28
27
29
### Domains
28
30
29
31
The domains represent domain names or a subdomains, such as `example.com` or `subdomain.example.com`. They store and display DNS-related
30
32
information and can be managed via the `Domains` page in the user interface.
31
33
32
34
Domains can be created using the `HostnameFinding`, via the API. They can also be created through the user interface's `Add domains`
33
-
functionality.
35
+
functionality. Adding a new domain will seed the automation process and start a scan.
34
36
35
37
Typically, a domain resolves to one or more IP addresses, which are represented as host resources. A domain can be linked to one or more
36
38
hosts through the `HostnameIpFinding`. If a `HostnameIpFinding` identifies a new domain or host, it will create these resources
37
39
automatically.
38
40
39
-
Importantly, each domain's name, combined with its project identifier, must is unique within the database.
41
+
The combination of a domain's name and its project identifier is unique in the database.
42
+
43
+
44
+
### IP Ranges
45
+
46
+
IP ranges consist in a network IP address and a network mask, and allow to designate full subnetworks as part of a project. These ranges would be owned, for instance, by your target, and they are a likely place to find relevant [hosts](#hosts). They can be found in the user interface under the `IP ranges` page.
47
+
48
+
You can create an IP range by either adding it in the interface through the `Add IP ranges` capabilities, or by emitting an `IpRangeFinding` in a job. When an IP range is added, a **scan** for the range is **immediatly started**. A scan is also launched every two weeks to find new hosts and refresh data.
49
+
50
+
The combination of an IP range's IP, mask and project identifier is unique in the database.
51
+
52
+
> At the moment, only IPv4 addresses are supported.
40
53
41
54
### Hosts
42
55
43
56
The hosts represent an exposed IP address: or a computer's network interface listening on the network. Hosts are leveraged to represent the
44
57
links between _domains_, hosts and _ports_. They can be seen in the user interface under the `Hosts` page.
45
58
46
59
A host can be created through the `IpFinding` for a standalone host, or through a `HostnameIpFinding` for a host that is linked to a
47
-
_domain_. `IpFinding`s can be emitted by the API through the user interface's `Add hosts` capabilities.
60
+
_domain_. `IpFinding`s can be emitted by the API through the user interface's `Add hosts` capabilities. Adding a new host will seed the automation process and start a scan.
48
61
49
62
An existing host can be linked to a _domain_ through the `HostnameIpFinding`. A host can be linked to one or many domains.
50
63
@@ -136,8 +149,9 @@ by remembering its existence.
136
149
137
150
### Exporting Resources
138
151
139
-
In Red Kite Enterprise, resources can be exported from the list views in the `JSON` or `CSV` format. The `JSON` format is recommended as it
140
-
is more flexible than CSV, and therefore better suited to the task.
152
+
<EnterpriseNotice />
153
+
154
+
Resources can be exported from the list views in the `JSON` or `CSV` format. The `JSON` format is intended to be used by programs, while the `CSV` format is designed for humans.
Every frontend-available data and more is accessible through the API. Simply create your API key in your profile, and then add it as a header when querying the API.
4
+
5
+
The API is available at `/api/`. You can do an unauthenticated request at `/api/ping` that replies a simple string, and an authenticated request at `/api/` that gets the version.
6
+
7
+
Unauthenticated `GET` request to `/api/ping`:
8
+
9
+
```bash
10
+
curl https://your-red-kite-url/api/ping
11
+
```
12
+
13
+
# API Key
14
+
15
+
Generate your API key in your profile page, giving it a meaningful name and an expiration date. Then, use it as a header in your following requests.
0 commit comments