Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- adduser --disabled-password cowrie
- [install dependency)
- apt-get install git acl apt-utils python-dev python-virtualenv libssl-dev libffi-dev python3-dev (default-)libmysqlclient-dev build-essential libpython3-dev python3-minimal authbind virtualenv apache2 php libapache2-mod-php php-mysql php-gd php-curl -y
- [install kippo-graph]
- git clone https://github.com/ikoniaris/kippo-graph.git /var/www/html/kippo-graph
- chmod 777 /var/www/html/kippo-graph/generated-graphs
- cp /var/www/html/kippo-graph/config.php.dist /var/www/html/kippo-graph/config.php
- nano /var/www/html/kippo-graph/config.php
- setfacl -Rm g:www-data:rx /home/cowrie/cowrie/var/lib/cowrie/tty/
- nano /var/www/html/kippo-graph/config.php
- [install cowrie]
- su cowrie
- cd && git clone http://github.com/cowrie/cowrie
- cd cowrie
- pwd
- virtualenv cowrie-env
- source cowrie-env/bin/activate
- pip install --upgrade pip
- pip install --upgrade -r requirements.txt
- pip install mysql-python
- pip install mysqlclient
- exit
- [install mysql]
- cd /home/cowrie/cowrie/
- mysql -u root -p
- CREATE DATABASE cowrie;
- GRANT ALL ON cowrie.* TO 'cowrie'@'localhost' IDENTIFIED BY 'admin';
- FLUSH PRIVILEGES;
- USE cowrie;
- source ./docs/sql/mysql.sql;
- exit
- nano /etc/mysql/conf.d/disable_strict_mode.cnf
- [mysqld]
- sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
- [install webserver]
- (kalau apache2)
- cd /etc/apache2/
- htpasswd -c /etc/apache2/cowrie.passwd cowrie
- nano /etc/apache2/sites-enabled/000-default.conf
- (kalau nginx)
- cd /etc/nginx/
- htpasswd -c /etc/nginx/cowrie.passwd cowrie
- nano /etc/nginx/sites-enabled/default.conf
- systemctl restart nginx
- su cowrie
- nano /home/cowrie/cowrie/etc/cowrie.cfg.dist #(update cowrie config port and mysql output)
- cd /home/cowrie/cowrie/bin/
- ./cowrie start
- iptables -t nat -A PREROUTING -p tcp --dport 22 -j REDIRECT --to-port 2222
- iptables -t nat -A PREROUTING -p tcp --dport 23 -j REDIRECT --to-port 2223
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement