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
Copy file name to clipboardExpand all lines: docs/GreedyBear/Usage.md
+98-15Lines changed: 98 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Usage
2
2
3
-
## Feeds
3
+
## Feeds API
4
4
5
5
GreedyBear is created with the aim to collect the information from the TPOTs and generate some actionable feeds, so that they can be easily accessible and act as valuable information to prevent and detect attacks.
6
6
@@ -65,7 +65,7 @@ These predictions are based on historical interaction patterns and are updated o
65
65
66
66
Check the [API specification](https://intelowlproject.github.io/docs/GreedyBear/Api-docs/#docs.Submodules.GreedyBear.api.views.feeds.feeds_advanced) or the to get all the details about how to use the available APIs.
67
67
68
-
## Advanced Feeds
68
+
## Advanced Feeds API
69
69
70
70
For authenticated users, GreedyBear offers an additional API endpoint that provides similar functionality to the Feeds API but with enhanced customization options.
71
71
```
@@ -90,7 +90,7 @@ Check the [API specification](https://intelowlproject.github.io/docs/GreedyBear/
90
90
91
91
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.
92
92
93
-
## Enrichment
93
+
## Enrichment API
94
94
95
95
GreedyBear provides an easy-to-query API to get the information available in GB regarding the queried observable (domain or IP address).
96
96
@@ -102,27 +102,110 @@ This "Enrichment" API is protected through authentication. Please reach out [Mat
102
102
103
103
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).
104
104
105
-
## Command Sequence
106
105
107
-
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.
106
+
## Cowrie Session API
108
107
108
+
For authenticated users, GreedyBear offers an API to retrieve session data from the [Cowrie](https://github.com/cowrie/cowrie) honeypot including command sequences, credentials, and session details. Queries can be performed using either an IP address to find all sessions from that source, or a SHA-256 hash to find sessions containing a specific command sequence.
109
+
110
+
You can query this API endpoint using the following URL:
- query (required): either an IP address or a SHA-256 hash of a command or a sequence of commands to search for
116
-
- include_similar (optional): when present, returns related command sequences from the same cluster
115
+
### Authentication
116
+
This 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 on the [Honeynet instance](https://greedybear.honeynet.org/) of GreedyBear.
117
+
118
+
### Query Parameters
119
+
-*query* (required): The search term, can be either an IP address or the SHA-256 hash of a command sequence. 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.
120
+
-*include_similar* (optional): When `true`, the result is expanded to include all sessions that executed command sequences belonging to the same cluster(s) as command sequences found in the initial query result. Requires CLUSTER_COWRIE_COMMAND_SEQUENCES enabled iin the `env_file`.
121
+
-*include_credentials* (optional): When `true`, the response includes all credentials used across matching Cowrie sessions. Credentials are delivered in the `username | password` format.
122
+
-*include_session_data* (optional): When `true`, the response includes detailed information about matching Cowrie sessions.
GET /api/cowrie_session?query=28ba533b0f3c4df63d6b4a5ead73860697bdf735bb353e4ca928474889eb8a15
172
+
```
119
173
120
-
- 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.
121
-
- For the `include_similar` parameter to work, `CLUSTER_COWRIE_COMMAND_SEQUENCES` must be enabled in the `env_file`.
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.
192
+
**Response:**
193
+
```json
194
+
{
195
+
"query": "60.188.124.194",
196
+
"commands": [
197
+
"uname -a",
198
+
"uname -s -m"
199
+
],
200
+
"sources": [
201
+
"60.188.124.194",
202
+
"103.106.104.87",
203
+
"183.204.86.10",
204
+
"221.203.35.59"
205
+
]
206
+
}
207
+
```
124
208
125
-
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