加入收藏 | 设为首页 | 会员中心 | 我要投稿 源码网 (https://www.900php.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > 建站资源 > 策划 > 正文

网络蜜罐的前世今生

发布时间:2019-04-29 04:32:12 所属栏目:策划 来源:Cherishao
导读:副标题#e# 一个接入互联网的网站,只要能和外部产生通信,就有被黑客攻击的可能;使用某种陷阱来引诱攻击者,就可以避免自身不被攻击,这种引诱黑客攻击的 陷阱 就是 蜜罐 。蜜罐是存在漏洞的、暴漏在互联网中的一个虚假的服务(器) 其价值在于被扫描、攻击和

(3) 拉取部署文件

  1. root@VM-0-3-debian:/opt# su cowrie 
  2. cowrie@VM-0-3-debian:/opt$ cd ~ 
  3. cowrie@VM-0-3-debian:~$ git clone https://github.com/cowrie/cowrie.git 
  4. Cloning into 'cowrie'... 
  5. remote: Enumerating objects: 26, done. 
  6. remote: Counting objects: 100% (26/26), done. 
  7. remote: Compressing objects: 100% (20/20), done. 
  8. remote: Total 12330 (delta 6), reused 24 (delta 6), pack-reused 12304 
  9. Receiving objects: 100% (12330/12330), 8.09 MiB | 1.14 MiB/s, done. 
  10. Resolving deltas: 100% (8561/8561), done. 
  11. cowrie@VM-0-3-debian:~$ ls 
  12. cowrie 
  13. cowrie@VM-0-3-debian:~$ cd cowrie/ 

(4) 设置虚拟环境

设置为 python2 的虚拟环境

  1. cowrie@VM-0-3-debian:~/cowrie$ pwd 
  2. /home/cowrie/cowrie 
  3. cowrie@VM-0-3-debian:~/cowrie$ virtualenv --python=python2 cowrie-env 
  4. Running virtualenv with interpreter /usr/bin/python2 
  5. New python executable in /home/cowrie/cowrie/cowrie-env/bin/python2 
  6. Also creating executable in /home/cowrie/cowrie/cowrie-env/bin/python 
  7. Installing setuptools, pkg_resources, pip, wheel...done. 

激活虚拟环境并安装包:

  1. cowrie@VM-0-3-debian:~/cowrie$  source cowrie-env/bin/activate 
  2. (cowrie-env) cowrie@VM-0-3-debian:~/cowrie$ pip install --upgrade pip 
  3. Requirement already up-to-date: pip in ./cowrie-env/lib/python2.7/site-packages (19.0.3) 
  4. (cowrie-env) cowrie@VM-0-3-debian:~/cowrie$ pip install --upgrade -r requirements.txt 
  5. Collecting twisted>=17.1.0 (from -r requirements.txt (line 1)) 
  6.   Using cached https://files.pythonhosted.org/packages/f8/2b/a80a70f71eb2b86992ffa5aaae41457791ae67faa70927fd16b76127c2b7/Twisted-19.2.0.tar.bz2 
  7. Collecting cryptography>=0.9.1 (from -r requirements.txt (line 2)) 
  8. ...... 
  9. Successfully built twisted tftpy pycparser...... 
  10. Successfully installed Automat-0.7.0 ...... 

(5) 安装配置文件

要启用telnet,请创建cowrie.cfg并仅输入以下内容:

  1. (cowrie-env) cowrie@VM-0-3-debian:~/cowrie$ pwd 
  2. /home/cowrie/cowrie 
  3. (cowrie-env) cowrie@VM-0-3-debian:~/cowrie$ vim cowrie.cfg 
  4. #写入以下文件,启用 telnet 
  5. [telnet] 
  6. enabled = true 

(6) 启动 Cowrie

  1. (cowrie-env) cowrie@VM-0-3-debian:~/cowrie/bin$ ./cowrie start 
  2.  
  3. Join the Cowrie community at: http://bit.ly/cowrieslack 
  4.  
  5. Using activated Python virtual environment "/opt/cowrie/cowrie-env" 
  6. Starting cowrie: [twistd   --umask=0022 --pidfile=var/run/cowrie.pid --logger cowrie.python.logfile.logger cowrie ]... 
  7. (cowrie-env) cowrie@VM-0-3-debian:/opt/cowrie/bin$ ./cowrie status 
  8. cowrie is running (PID: 13215). 

(7) 端口重定向

有三种方法可以在默认的 SSH 端口(22)上访问 Cowrie:iptables,authbind 和 setcap。

更多输出配置,可参见:

https://blog.csdn.net/Kevinhanser/article/details/79282309

3. 基于 Docker 的高交互 t-pot

t-pot 是一个基于 Docker 的高交互蜜罐平台,集成了Conpot、Cowrie、Dionaea、Honeytrap 等多个蜜罐。t-pot 对于资源的要求也比较高(t-pot 安装需要至少 6-8 GB RAM 和128 GB可用磁盘空间 (SSD) 以及可用的互联网连接),目前的最新版本为 19.03。可采用镜像 (ISO)的方式进行安装。

项目地址:https://github.com/dtag-dev-sec/tpotce

安装部署:

下载镜像,虚拟机安装,安装过程和常规的 Linux 安装差不多,需要选择 t-pot 安装类型及设置账户及密码,安装好之后界面如下:

(编辑:源码网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读