Skip to content

Commit fb824d1

Browse files
committed
add docs for command sequence API
1 parent 43fed89 commit fb824d1

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

docs/GreedyBear/Api-docs.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
### `Feeds Pagination`
1313
:::docs.Submodules.GreedyBear.api.views.feeds.feeds_pagination
1414

15+
### `Command Sequence`
16+
:::docs.Submodules.GreedyBear.api.views.command_sequence_view
17+
1518
### `general_honeypot_list`
1619
:::docs.Submodules.GreedyBear.api.views.general_honeypot.general_honeypot_list
1720

docs/GreedyBear/Usage.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,23 @@ https://<greedybear_site>/api/enrichment?query=<observable>
126126
This "Enrichment" 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.
127127

128128
If you would like to leverage this API without the need of writing even a line of code and together with a lot of other awesome tools, consider using [IntelOwl](https://github.com/intelowlproject/IntelOwl).
129+
130+
## Command Sequence
131+
132+
This API provides information about command sequences detected by the [Cowrie](https://github.com/cowrie/cowrie) honeypot, allowing retrieval by either IP address or command sequence hash.
133+
134+
```
135+
https://<greedybear_site>/api/command_sequence?query=<observable>
136+
```
137+
138+
The available query parameters are:
139+
- query (required): either an IP address or a SHA-256 hash of a command or a sequence of commands to search for
140+
- include_similar (optional): when present, returns related command sequences from the same cluster
141+
142+
Notes:
143+
- When generating a SHA-256 hash to query a multi-line command sequence, ensure you join all command lines with a newline character (`\n`) before calculating the hash. This matches our internal hashing method which uses Python's `"\n".join(sequence)` function.
144+
- For the `include_similar` parameter to work, `CLUSTER_COWRIE_COMMAND_SEQUENCES` must be enabled in the `env_file`.
145+
146+
This "Command Sequence" 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.
147+
148+
If you would like to leverage this API without the need of writing even a line of code and together with a lot of other awesome tools, consider using [IntelOwl](https://github.com/intelowlproject/IntelOwl).

0 commit comments

Comments
 (0)