一、安装Debian10 虚拟机
1. 版本说明
目前最新版T-Pot项目基于Debian10构建,本文采用Debian 10 作为实验环境
2. 下载
Debian镜像(清华大学)下载源:https://mirrors.tuna.tsinghua.edu.cn/#
3. 安装
环境说明
- 虚拟机软件:VMware Workstation Pro 15.5(需选择14.x版本以兼容公司环境)
- Debian镜像:debian-live-10.6.0-amd64-standard.iso
虚拟机安装(略)
- 配置要求:参考T-Pot安装配置需求 https://github.com/telekom-security/tpotce#system-requirements
- 安装指导:参考 https://zhuanlan.zhihu.com/p/73122221
Note: Debian系统的账户密码详情如下
用户名 | 密码 |
---|---|
root | gf_root |
二、预备知识
1. 蜜罐定义
蜜罐是一种软件应用系统,作为一种入侵诱饵,引诱攻击者前来攻击。攻击者入侵后,通过监测与分析,就可以知道他是如何入侵的,随时了解针对组织服务器发动的最新的攻击和漏洞。
2. 蜜罐分类
按交互方式分类,蜜罐可以分为三类,低交互式蜜罐,中交互式蜜罐,高交互式蜜罐。
-
低交互式蜜罐 :通常是指与操作系统交互程度较低的蜜罐系统,仅开放一些简单的服务或端口,用来检测扫描和连接,这种容易被识别。
-
中交互式蜜罐 :介于低交互式和高交互式之间,能够模拟操作系统更多的服务,让攻击者看起来更像一个真实的业务,从而对它发动攻击,这样蜜罐就能获取到更多有价值的信息。
-
高交互式 :指的是与操作系统交互很高的蜜罐,它会提供一个更真实的环境,这样更容易吸引入侵者,有利于掌握新的攻击手法和类型,但同样也会存在隐患,会对真实网络造成攻击
三、T-Pot安装
1. 前期准备
更换系统镜像源
参考: https://cloud.tencent.com/developer/article/1590080
$ sudo vi /etc/apt/source.list
推荐163源
deb http://mirrors.163.com/debian/ buster main non-free contrib
deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
中科大源
deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
安装网络工具
$ sudo apt install net-tools
设置网卡为混杂模式
混杂模式
非混杂模式,网卡只接受来自网络端口的目的地址指向自己的数据。 当网卡工作在混杂模式下时,网卡将来自接口的所有数据都捕获并交给相应的驱动程序。 网卡的混杂模式一般在网络管理员分析网络数据作为网络故障诊断手段时用到,同时这个模式也被网络黑客利用来作为网络数据窃听的入口。
ifconfig查看网卡信息
使用putty连接虚拟机,执行
$ ifconfig
更改网卡为混杂模式(Promisc)
$ ifconfig ens33 promisc
2. 下载开源项目
安装git工具
$ sudo apt install git
使用git克隆项目到本地
$ git clone https://github.com/telekom-security/tpotce
3. 开始安装
安装步骤
执行安装脚本
cd tpotce/iso/installer/
sudo ./install.sh --type=user
期间脚本会进行
- 检查root权限
- 校验安装依赖
- 校验其他资源,开始安装
可用性校验
选择STANDARD版本
设置tsec用户密码“******”
设置web用户名称为“gfadmin”
设置web用户密码“******”
开始安装,安装过程需要下载大量依赖包,需要开启代理
安装完成后,系统会自动重启
四、部署到内部网络
1. 桥接模式
更改虚拟机连接方式为桥接模式,使得蜜罐系统类似于一台真正的主机运行
2. 网卡配置
配置虚拟机网卡为静态IP
$ vi /etc/network/interfaces
3. 导出虚拟机
将虚拟机导出为OVF用于迁移
五、T-Pot使用
1. T-Pot组件总览
系统架构图
蜜罐组件简介
T-Pot集成蜜罐 | 说明 |
---|---|
ADBHoney | 一个基于TCP/IP的Android调试桥的低交互蜜罐 |
ciscoasa | Cisco ASA防火墙的低交互蜜罐,能够检测CVE-2018-0101、DoS和远程代码执行漏洞 |
citrixhoneypot | 检测和记录CVE-2019-19781(Citrix ADC的RCE)扫描和攻击尝试 |
conpot | 一个低交互式的工业控制系统的蜜罐 |
cowrie | 一个中等交互式的 SSH / Telnet 蜜罐 |
dicompot | 医学数字成像与通信(DICOM)蜜罐 |
dionaea | 一个基于 Python 开发的低交互蜜罐,设计目的是诱捕恶意攻击,获取恶意攻击会话与恶意代码程序样本 |
elasticpot | 一个 Elasticsearch 的蜜罐 |
glutton | 一款低交互蜜罐 |
heralding | 一款可收集凭证的蜜罐 |
honeypy | 一款低交互的蜜罐,但是具有更多的中等交互蜜罐的能力 |
honeysap | 一个专用于SAP服务的低交互搜索蜜罐 |
honeytrap | 一个低交互式的蜜罐,用来观察对TCP或UDP服务的攻击 |
ipphoney | 一个互联网打印协议蜜罐 |
mailoney | 一个 SMTP 蜜罐 |
medpot | 也是一款SMTP蜜罐 |
tanner | 是Glastopf(一个 Python 语言开发的 Web 蜜罐,能提供各种基于漏洞类型的模拟) 的后继 |
2. 操作指南
打开浏览器,输入网址 https://【IP】:64297/ ,进入登陆页面
username: gfadmin
password: ******
输入前面设置的web用户登录名和密码进入系统页面
Cockpit
Cockpit是一个轻量级的web图形操作界面,让用户在Web浏览器中查看服务器,然后用鼠标执行系统任务。包括启动容器,管理存储,配置网络和检查日志等。
进入Cockpit,进行登录
username: tsec
password: ******
系统
监控系统运行情况
容器
普通用户登录没有访问docker的权限,需要为其授权
后台以root登陆,将tsec加入docker组并重启docker服务
sudo usermod -aG docker tsec
sudo systemctl restart docker
终端
进入roo