2015-05-12 15:01:57 +00:00
# Cowrie
2014-05-27 20:31:54 +00:00
2015-11-19 14:05:45 +00:00
Cowrie is a medium interaction SSH honeypot designed to log brute force attacks and the shell interaction performed by the attacker.
2014-05-27 20:31:54 +00:00
2016-04-16 10:57:19 +00:00
[Cowrie ](http://github.com/micheloosterhof/cowrie/ ) is developed by Michel Oosterhof and is based on [Kippo ](http://github.com/desaster/kippo/ ) by Upi Tamminen (desaster).
2014-05-27 20:31:54 +00:00
## Features
2016-01-22 00:11:05 +00:00
2014-05-27 20:31:54 +00:00
Some interesting features:
2016-01-22 00:11:05 +00:00
2014-05-27 20:31:54 +00:00
* Fake filesystem with the ability to add/remove files. A full fake filesystem resembling a Debian 5.0 installation is included
2016-01-22 00:11:05 +00:00
* Possibility of adding fake file contents so the attacker can `cat` files such as `/etc/passwd` . Only minimal file contents are included
2014-05-28 04:13:55 +00:00
* Session logs stored in an [UML Compatible ](http://user-mode-linux.sourceforge.net/ ) format for easy replay with original timings
2015-05-12 15:01:57 +00:00
* Cowrie saves files downloaded with wget/curl or uploaded with SFTP and scp for later inspection
2014-05-27 20:31:54 +00:00
2015-05-12 15:05:54 +00:00
Additional functionality over standard kippo:
* SFTP and SCP support for file upload
* Support for SSH exec commands
* Logging of direct-tcp connection attempts (ssh proxying)
2016-04-25 14:45:44 +00:00
* Forward SMTP connections to SMTP Honeypot (e.g. [mailoney ](https://github.com/awhitehatter/mailoney ))
2015-05-12 15:05:54 +00:00
* Logging in JSON format for easy processing in log management solutions
* Many, many additional commands
2014-05-27 20:31:54 +00:00
## Requirements
2016-01-22 00:11:05 +00:00
2014-05-27 20:31:54 +00:00
Software required:
2015-10-07 19:39:27 +00:00
* Python 2.7+
2016-06-19 13:39:09 +00:00
* Zope Interface 3.6.0+
2014-05-27 20:31:54 +00:00
* Twisted 8.0+
2016-06-19 13:39:09 +00:00
* python-crypto
2016-06-19 13:36:48 +00:00
* python-cryptography
2016-02-03 13:45:24 +00:00
* python-pyasn1
* python-gmpy2 (recommended)
2016-04-14 09:37:36 +00:00
* python-mysqldb (for MySQL output)
2016-06-19 13:36:48 +00:00
2015-05-12 15:26:42 +00:00
## Files of interest:
2014-05-27 20:31:54 +00:00
2016-01-22 00:11:05 +00:00
* `cowrie.cfg` - Cowrie's configuration file. Default values can be found in `cowrie.cfg.dist`
* `data/fs.pickle` - fake filesystem
* `data/userdb.txt` - credentials allowed or disallowed to access the honeypot
* `dl/` - files transferred from the attacker to the honeypot are stored here
2016-04-28 10:46:57 +00:00
* `honeyfs/` - file contents for the fake filesystem - feel free to copy a real system here or use `bin/fsctl`
2016-01-22 00:11:05 +00:00
* `log/cowrie.json` - transaction output in JSON format
* `log/cowrie.log` - log/debug output
* `log/tty/*.log` - session logs
* `txtcmds/` - file contents for the fake commands
2016-04-28 10:46:57 +00:00
* `bin/createfs` - used to create the fake filesystem
* `bin/playlog` - utility to replay session logs
2014-05-27 20:31:54 +00:00
## Is it secure?
2016-01-22 00:11:05 +00:00
2014-05-27 20:39:50 +00:00
Maybe. See [FAQ ](https://github.com/desaster/kippo/wiki/FAQ )
2014-05-27 20:31:54 +00:00
## I have some questions!
2016-01-22 00:11:05 +00:00
2015-05-12 14:57:29 +00:00
Please visit https://github.com/micheloosterhof/cowrie/issues