mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
cosmetic changes
This commit is contained in:
@ -1,28 +1,25 @@
|
|||||||
# How to process cowrie output in kippo-graph
|
# How to process Cowrie output in kippo-graph
|
||||||
|
|
||||||
* (Note: work in progress, instructions are not verified)
|
* (Note: work in progress, instructions are not verified)
|
||||||
* Tested on Debian 9.
|
* Tested on Debian 9.
|
||||||
* Just work for new attacks!
|
|
||||||
|
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
* Working cowrie installation
|
* Working Cowrie installation
|
||||||
* LAMP (See below)
|
* LAMP stack (Linux, Apache, MySQL, PHP)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
We'll examine simple installation, when we install kippo-graph on the same machine that used for cowrie.
|
This covers a simple installation, with kippo-graph and Cowrie on the same server.
|
||||||
|
Please see here for installation: https://github.com/ikoniaris/kippo-graph
|
||||||
Please see here for installation:
|
|
||||||
https://github.com/ikoniaris/kippo-graph
|
|
||||||
|
|
||||||
|
|
||||||
## mySQL configuration
|
## mySQL configuration
|
||||||
|
|
||||||
Configuring cowrie requires setting up the sql tables and then telling cowrie to use them.
|
Configuring Cowrie requires setting up the SQL tables and then telling Cowrie to use them.
|
||||||
|
|
||||||
To install the tables and create the cowrie user account enter the following commands:
|
To install the tables and create the Cowrie user account enter the following commands:
|
||||||
```
|
```
|
||||||
mysql -u root -p
|
mysql -u root -p
|
||||||
CREATE DATABASE cowrie;
|
CREATE DATABASE cowrie;
|
||||||
@ -31,7 +28,7 @@ FLUSH PRIVILEGES;
|
|||||||
exit
|
exit
|
||||||
```
|
```
|
||||||
|
|
||||||
now we need to populate the table structure
|
next create the database schema:
|
||||||
```
|
```
|
||||||
cd /opt/cowrie/
|
cd /opt/cowrie/
|
||||||
mysql -u cowrie -p
|
mysql -u cowrie -p
|
||||||
@ -42,7 +39,9 @@ exit
|
|||||||
|
|
||||||
## cowrie configuration
|
## cowrie configuration
|
||||||
|
|
||||||
|
```
|
||||||
vi /opt/cowrie/cowrie.cfg
|
vi /opt/cowrie/cowrie.cfg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
* Activate output to mysql
|
* Activate output to mysql
|
||||||
@ -51,7 +50,7 @@ vi /opt/cowrie/cowrie.cfg
|
|||||||
host = localhost
|
host = localhost
|
||||||
database = cowrie
|
database = cowrie
|
||||||
username = cowrie
|
username = cowrie
|
||||||
password = secret >>> (please change!)
|
password = PASSWORD HERE
|
||||||
port = 3306
|
port = 3306
|
||||||
debug = false
|
debug = false
|
||||||
```
|
```
|
||||||
@ -64,23 +63,25 @@ sudo setfacl -Rm g:www-data:rx /opt/cowrie/log/tty/
|
|||||||
|
|
||||||
## kippo-graph Configuration
|
## kippo-graph Configuration
|
||||||
|
|
||||||
|
```
|
||||||
vi /var/www/html/kippo-graph/config.php
|
vi /var/www/html/kippo-graph/config.php
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
* Change db settings
|
* Change db settings
|
||||||
```
|
```
|
||||||
define('DB_HOST', 'localhost');
|
define('DB_HOST', 'localhost');
|
||||||
define('DB_USER', 'cowrie');
|
define('DB_USER', 'cowrie');
|
||||||
define('DB_PASS', 'secret'); >>> (please change!)
|
define('DB_PASS', 'PASSWORD HERE');
|
||||||
define('DB_NAME', 'cowrie');
|
define('DB_NAME', 'cowrie');
|
||||||
define('DB_PORT', '3306');
|
define('DB_PORT', '3306');
|
||||||
```
|
```
|
||||||
|
|
||||||
## apache2 Configuration (optional)
|
## Apache2 configuration (optional)
|
||||||
|
|
||||||
* to secure the installation
|
* to secure the installation
|
||||||
|
|
||||||
Create password database
|
Create password database:
|
||||||
```
|
```
|
||||||
cd /etc/apache2/
|
cd /etc/apache2/
|
||||||
htpasswd -c /etc/apache2/cowrie.passwd <username>
|
htpasswd -c /etc/apache2/cowrie.passwd <username>
|
||||||
@ -88,10 +89,11 @@ htpasswd /etc/apache2/cowrie.passwd <username> (second user)
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
vi /etc/apache2/sites-enabled/000-default.conf
|
vi /etc/apache2/sites-enabled/000-default.conf
|
||||||
```
|
```
|
||||||
Between the <VirtualHost> </VirtualHost> tags
|
Between the <VirtualHost> </VirtualHost> tags, add:
|
||||||
|
```
|
||||||
<Location />
|
<Location />
|
||||||
AuthBasicAuthoritative On
|
AuthBasicAuthoritative On
|
||||||
AllowOverride AuthConfig
|
AllowOverride AuthConfig
|
||||||
|
|||||||
Reference in New Issue
Block a user