Skip to content

Commit 356f351

Browse files
authored
Merge pull request #46 from drona-gyawali/api/asn
docs(GreedyBear): add ASN aggregated feeds API
2 parents 92543a6 + 59c816e commit 356f351

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

docs/GreedyBear/Api-docs.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
### `Advanced Feeds`
1212
:::docs.Submodules.GreedyBear.api.views.feeds.feeds_advanced
1313

14+
### `ASN Aggregated Feeds`
15+
:::docs.Submodules.GreedyBear.api.views.feeds.feeds_asn
16+
1417
### `Feeds Pagination`
1518
:::docs.Submodules.GreedyBear.api.views.feeds.feeds_pagination
1619

docs/GreedyBear/Usage.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,44 @@ Check the [API specification](https://intelowlproject.github.io/docs/GreedyBear/
9090

9191
This "Advanced Feeds" API is protected through authentication. Please reach out [Matteo Lodi](https://twitter.com/matte_lodi) or another member of [The Honeynet Project](https://twitter.com/ProjectHoneynet) if you are interested in gain access to this API.
9292

93+
### ASN Aggregated Feeds API
94+
_Available from version >= 3.0.0_
95+
96+
For authenticated users, GreedyBear offers an API endpoint that aggregates IOC data by ASN (Autonomous System Number).
97+
```
98+
https://<greedybear_site>/api/feeds/asn/?<query_params>
99+
```
100+
101+
### Query Parameters
102+
- `feed_type` (optional): See [Feeds API](#feeds) for valid feed types. Default: `all`.
103+
- `attack_type` (optional): See [Feeds API](#feeds) for valid attack types. Default: `all`.
104+
- `max_age` (optional): Maximum age of IOCs in days. Default: 3.
105+
- `min_days_seen` (optional): Minimum days an IOC must have been observed. Default: 1.
106+
- `exclude_reputation` (optional): `;`-separated reputations to exclude (e.g., `mass scanner`). Default: none.
107+
- `ordering` (optional): Aggregation ordering field (e.g., `total_attack_count`, `asn`). Default: `-ioc_count`.
108+
- `asn` (optional): Filter results to a specific ASN.
109+
110+
### Responses
111+
- Response (200): JSON array of ASN aggregation objects. Each object containing:
112+
113+
- `asn` (int): ASN number.
114+
- `ioc_count` (int): Number of IOCs for this ASN.
115+
- `total_attack_count` (int): Sum of attack_count for all IOCs.
116+
- `total_interaction_count` (int): Sum of interaction_count for all IOCs.
117+
- `total_login_attempts` (int): Sum of login_attempts for all IOCs.
118+
- `honeypots` (list[str]): Sorted list of unique honeypots that observed these IOCs.
119+
- `expected_ioc_count` (float): Sum of `recurrence_probability` for all IOCs, rounded to 4 decimals.
120+
- `expected_interactions` (float): Sum of `expected_interactions` for all IOCs, rounded to 4 decimals.
121+
- `first_seen` (datetime): Earliest `first_seen` timestamp among IOCs.
122+
- `last_seen` (datetime): Latest `last_seen` timestamp among IOCs.
123+
124+
- Response (400): Bad Request - Missing or invalid query parameter.
125+
126+
Check the [API specification](https://intelowlproject.github.io/docs/GreedyBear/Api-docs/) or the to get all the details about how to use the available APIs.
127+
128+
This "ASN Aggregated Feeds" API is protected through authentication. Please reach out [Matteo Lodi](https://twitter.com/matte_lodi) or another member of [The Honeynet Project](https://twitter.com/ProjectHoneynet) if you are interested in gaining access to this API.
129+
130+
93131
## Enrichment API
94132

95133
GreedyBear provides an easy-to-query API to get the information available in GB regarding the queried observable (domain or IP address).

0 commit comments

Comments
 (0)