The Cowrie honeypot can store collected data in MySQL or MongoDB. This REST API written in Java serves that data in JSON format. It can be used by web front-ends to display honeypot statistics and analyze the collected data.
Development in progress
GET /sessions/{id}
Get session identified by the given ID
Sample request:
GET /sessions/5962f1d02874
Sample response:
{
"id":"c2a7c72a8d34",
"ip":"192.168.0.11",
"sensor":"cowrie",
"startTime":"2020-07-20T00:00:09",
"endTime":"2020-07-20T00:00:15",
"client":"SSH-2.0-libssh-0.6.3"
}
GET /sessions?date=today
Get all sessions for the current day
GET /sessions?date=yesterday
Get all sessions for the previous day
GET /sessions?date={year}{month}{day}
Get all sessions for the given day.
Sample request:
GET /sessions?date=20191108
- JDK 11
- Apache Maven 3.6.1+
- Clone the repository
- Configure the database access in src/main/resources/application.properties
- From the project directory run
mvn spring-boot:run
- By default, the API is running on port 8080
- (optional) Build a war file which you can deploy with Apache Tomcat
mvn clean package
- Provide further data from the honeypot
- Data aggregation
- Pagination
- API authentication