Skip to content
righelPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

honeypotz

Some session playlog Kibana Dashboard Table of Contents generated with DocToc

Just follow:

cd /etc/logstash
sudo curl -O http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
sudo gunzip GeoLiteCity.dat.gz

Add cowrie logs configuration to logstash

Copy [https://github.com/xluccianox/honeypotz/blob/master/11-cowrie-filter.conf 11-cowrie-filter.conf] to /etc/logstash/conf.d. Then run:

sudo service logstash restart

Deploying Cowrie Honeypot

sudo apt-get install docker-io
docker build -t cowrie .

Create this directory structure in /. /cowrie/ ├── docker-cowrie

│ ├── Dockerfile

├── etc

│ └── cowrie.cfg

└── log └── tty

Then:

chown -R 999:1000 /cowrie/log 
docker run -d -p 22:2222 -v /cowrie/etc/cowrie.cfg:/cowrie/cowrie-git/etc/cowrie.cfg -v /cowrie/log:/cowrie/cowrie-git/log cowrie

Changing ssh port

sudo vi /etc/ssh/sshd_config
# What ports, IPs and protocols we listen for
Port 7890
/etc/init.d/ssh restart

Save and exit.

Autorestart elasticsearch & kibana

Due to memory limitations in the droplet (2 gb), kibana or elasticsearch eventually crashes, you can set it to autorun using supervisor.

sudo apt-get install supervisor
ln -s /etc/elasticsearch/ /usr/share/elasticsearch/config
chown -R elasticsearch:elasticsearch /etc/usr/share/elasticsearch
chown -R elasticsearch:elasticsearch /var/log/elasticsearch
supervisorctl reread
supervisorctl update
sudo service supervisor restart

To list service statusses:

> sudo supervisorctl status
elasticsearch                    RUNNING    pid 22811, uptime 0:00:01
kibana                           RUNNING    pid 22812, uptime 0:00:01

Docker

Logging to ELK Server

Copy the CA Cert from ELK Server to the Honeypot machine

scp -P 7890 /etc/pki/tls/certs/logstash-forwarder.crt root@<COWRIE_HOST>:/tmp

Installing & Configuring Filebeats

Follow:

Check connection to the ELK Server

curl -v --cacert /etc/pki/tls/certs/logstash-forwarder.crt https://<ELK_SERVER_HOST>:5044

Check for cowrie logs in ELK Server

Run from a terminal inside ELK Server

curl 'http://localhost:9200/_search?q=cowrie&size=5

References and guides used

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors