API Documentation
Enrichment
Handle enrichment requests for a specific observable (domain or IP address).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object containing query parameters. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
A JSON response indicating whether the observable was found, |
|
and if so, the corresponding IOC. |
Source code in docs/Submodules/GreedyBear/api/views/enrichment.py
Feeds
Handle requests for IOC feeds with specific parameters and format the response accordingly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required | |
feed_type
|
str
|
Type of feed (e.g., log4j, cowrie, etc.). |
required |
attack_type
|
str
|
Type of attack (e.g., all, specific attack types). |
required |
age
|
str
|
Age of the data to filter (e.g., recent, persistent). |
required |
format_
|
str
|
Desired format of the response (e.g., json, csv, txt). |
required |
exclude_mass_scanners
|
bool
|
query parameter flag to exclude IOCs that are known mass scanners. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
The HTTP response with formatted IOC data. |
Source code in docs/Submodules/GreedyBear/api/views/feeds.py
Advanced Feeds
Handle requests for IOC feeds based on query parameters and format the response accordingly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required |
Supported query parameters are:
- **feed_type**: Type of feed to retrieve. (supported: `cowrie`, `log4j`, etc.; default: `all`)
- **attack_type**: Type of attack to filter. (supported: `scanner`, `payload_request`, `all`; default: `all`)
- **max_age**: Maximum number of days since last occurrence. E.g. an IOC that was last seen 4 days ago is excluded by default. (default: 3)
- **min_days_seen**: Minimum number of days on which an IOC must have been seen. (default: 1)
- **include_reputation**: `;`-separated list of reputation values to include, e.g. `known attacker` or `known attacker;` to include IOCs without reputation. (default: include all)
- **exclude_reputation**: `;`-separated list of reputation values to exclude, e.g. `mass scanner` or `mass scanner;bot, crawler`. (default: exclude none)
- **feed_size**: Number of IOC items to return. (default: 5000)
- **ordering**: Field to order results by, with optional `-` prefix for descending. (default: `-last_seen`)
- **verbose**: `true` to include IOC properties that contain a lot of data, e.g. the list of days it was seen. (default: `false`)
- **paginate**: `true` to paginate results. This forces the json format. (default: `false`)
- **format_**: Response format type. Besides `json`, `txt` and `csv` are supported but the response will only contain IOC values (e.g. IP adresses) without further information. (default: `json`)
Returns:
Name | Type | Description |
---|---|---|
Response |
The HTTP response with formatted IOC data. |
Source code in docs/Submodules/GreedyBear/api/views/feeds.py
Feeds Pagination
Handle requests for paginated IOC feeds based on query parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
The paginated HTTP response with IOC data. |
Source code in docs/Submodules/GreedyBear/api/views/feeds.py
general_honeypot_list
Retrieve a list of all general honeypots, optionally filtering by active status.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object containing query parameters. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
A JSON response containing the list of general honeypots. |
Source code in docs/Submodules/GreedyBear/api/views/general_honeypot.py
Statistics
Bases: ViewSet
A viewset for viewing and editing statistics related to feeds and enrichment data.
Provides actions to retrieve statistics about the sources and downloads of feeds, as well as statistics on enrichment data.
Source code in docs/Submodules/GreedyBear/api/views/statistics.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
__aggregation_response_static_ioc(annotations)
Helper method to generate IOC response based on annotations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
annotations
|
dict
|
Dictionary containing the annotations for the query. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
Response
|
A JSON response containing the aggregated IOC data. |
Source code in docs/Submodules/GreedyBear/api/views/statistics.py
__aggregation_response_static_statistics(annotations)
Helper method to generate statistics response based on annotations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
annotations
|
dict
|
Dictionary containing the annotations for the query. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
Response
|
A JSON response containing the aggregated statistics. |
Source code in docs/Submodules/GreedyBear/api/views/statistics.py
__parse_range(request)
staticmethod
Parse the range parameter from the request query string to determine the time range for the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required |
Returns:
Name | Type | Description |
---|---|---|
tuple |
A tuple containing the delta time and basis for the query range. |
Source code in docs/Submodules/GreedyBear/api/views/statistics.py
enrichment(request, pk=None)
Retrieve enrichment statistics, including the number of sources and requests.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required | |
pk
|
str
|
The type of statistics to retrieve (e.g., "sources", "requests"). |
None
|
Returns:
Name | Type | Description |
---|---|---|
Response |
A JSON response containing the requested statistics. |
Source code in docs/Submodules/GreedyBear/api/views/statistics.py
feeds(request, pk=None)
Retrieve feed statistics, including the number of sources and downloads.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required | |
pk
|
str
|
The type of statistics to retrieve (e.g., "sources", "downloads"). |
None
|
Returns:
Name | Type | Description |
---|---|---|
Response |
A JSON response containing the requested statistics. |
Source code in docs/Submodules/GreedyBear/api/views/statistics.py
feeds_types(request)
Retrieve statistics for different types of feeds, including Log4j, Cowrie, and general honeypots.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
A JSON response containing the feed type statistics. |