Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. [add resipatory]
  2. nano /etc/apt/sources.list
  3.  
  4. deb http://ftp.de.debian.org/debian stretch main
  5.  
  6. adduser --disabled-password cowrie
  7.  
  8. [install dependency)
  9. 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
  10.  
  11. [install kippo-graph]
  12. git clone https://github.com/ikoniaris/kippo-graph.git /var/www/html/kippo-graph
  13. chmod 777 /var/www/html/kippo-graph/generated-graphs
  14. cp /var/www/html/kippo-graph/config.php.dist /var/www/html/kippo-graph/config.php
  15. nano /var/www/html/kippo-graph/config.php
  16. setfacl -Rm g:www-data:rx /home/cowrie/cowrie/var/lib/cowrie/tty/
  17. nano /var/www/html/kippo-graph/config.php
  18.  
  19. [install cowrie]
  20.  
  21. su cowrie
  22. cd && git clone http://github.com/cowrie/cowrie
  23. cd cowrie
  24. pwd
  25. virtualenv cowrie-env
  26. source cowrie-env/bin/activate
  27. pip install --upgrade pip
  28. pip install --upgrade -r requirements.txt
  29. pip install mysql-python
  30. pip install mysqlclient
  31. exit
  32.  
  33. [install mysql]
  34. cd /home/cowrie/cowrie/
  35. mysql -u root -p
  36.  
  37. CREATE DATABASE cowrie;
  38. GRANT ALL ON cowrie.* TO 'cowrie'@'localhost' IDENTIFIED BY 'Adminsmk5';
  39. FLUSH PRIVILEGES;
  40. USE cowrie;
  41. source ./docs/sql/mysql.sql;
  42. exit
  43.  
  44.  
  45. nano /etc/mysql/conf.d/disable_strict_mode.cnf
  46. [mysqld]
  47. sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
  48.  
  49.  
  50. [install webserver]
  51. (kalau apache2)
  52. cd /etc/apache2/
  53. htpasswd -c /etc/apache2/cowrie.passwd cowrie
  54. nano /etc/apache2/sites-enabled/000-default.conf
  55. systemctl restart apache2
  56.  
  57. (kalau nginx)
  58. cd /etc/nginx/
  59. htpasswd -c /etc/nginx/cowrie.passwd cowrie
  60. nano /etc/nginx/sites-enabled/default.conf
  61. systemctl restart nginx
  62.  
  63. su cowrie
  64. nano /home/cowrie/cowrie/etc/cowrie.cfg.dist #(update cowrie config port and mysql output)
  65. cd /home/cowrie/cowrie/bin/
  66. ./cowrie start
  67.  
  68. iptables -t nat -A PREROUTING -p tcp --dport 22 -j REDIRECT --to-port 2222
  69. iptables -t nat -A PREROUTING -p tcp --dport 23 -j REDIRECT --to-port 2223
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement