mirror of
https://gitee.com/lauix/HFish
synced 2025-02-23 19:22:14 +08:00
update
This commit is contained in:
parent
a5d6e168b0
commit
184d0d34f4
6
docs/1-1-honeypot.md
Normal file
6
docs/1-1-honeypot.md
Normal file
@ -0,0 +1,6 @@
|
||||
**蜜罐** 技术本质上是一种对攻击方进行 **欺骗的技术**,通过布置一些作为 **诱饵的主机**、**网络服务** 或者 **信息**,诱使攻击方对它们实施攻击,从而可以对攻击行为进行 **捕获** 和 **分析**,了解攻击方所使用的工具与方法,推测攻击意图和动机,能够让防御方清晰地了解他们所面对的安全威胁,并通过技术和管理手段来增强实际系统的安全防护能力。
|
||||
|
||||
**蜜罐** 好比是 **情报收集系统**。蜜罐好像是故意让人攻击的目标,**引诱黑客前来攻击**。所以攻击者入侵后,你就可以知道他是如何得逞的,随时了解针对服务器发动的最新的攻击和漏洞。还可以通过窃听黑客之间的联系,收集黑客所用的种种工具,并且掌握他们的社交网络。
|
||||
|
||||
|
||||
|
9
docs/1-2-spec.md
Normal file
9
docs/1-2-spec.md
Normal file
@ -0,0 +1,9 @@
|
||||
- 安全可靠:主打低中交互蜜罐,简单有效;
|
||||
|
||||
- 蜜罐丰富:支持SSH、FTP、TFTP、MySQL、Redis、Telnet、VNC、Memcache、Elasticsearch、Wordpress、OA系统等10多种蜜罐服务,支持用户制作自定义Web蜜罐;
|
||||
- 开放透明:支持对接微步在线X社区API、五路syslog输出、支持邮件、钉钉、企业微信、飞书、自定义WebHook告警输出;
|
||||
- 快捷管理:支持单个安装包批量部署,支持批量修改端口和服务;
|
||||
- 跨平台:支持Linux x32/x64/ARM、Windows x32/x64平台
|
||||
|
||||
|
||||
|
10
docs/1-3-workflow.md
Normal file
10
docs/1-3-workflow.md
Normal file
@ -0,0 +1,10 @@
|
||||
HFish由控制端和节点端组成,控制端用来生成和管理节点端,并接收、分析和展示节点端回传的数据,节点端接受控制端的控制并负责构建蜜罐服务。
|
||||
|
||||

|
||||
|
||||
> 融合在企业网络中
|
||||
|
||||

|
||||
|
||||
|
||||
|
4
docs/2-1-docker.md
Normal file
4
docs/2-1-docker.md
Normal file
@ -0,0 +1,4 @@
|
||||
### 待更新
|
||||
|
||||
……
|
||||
|
83
docs/2-1-env.md
Normal file
83
docs/2-1-env.md
Normal file
@ -0,0 +1,83 @@
|
||||
- ### HFish的网络环境
|
||||
|
||||
> Server端应部署在安全区,只向少部分有网络管理权限和安全分析能力工作的人员和设备开放web和ssh端口
|
||||
|
||||
服务端用于配置管理的web页面开启了https,默认访问端口为4433,默认页面在web目录下。(端口和目录,可以在config.ini中自行配置)。
|
||||
|
||||
```url
|
||||
# 举个例子如果您Server端的ip为192.168.11.11,那么您应该在浏览器中输入如下的URL进行访问。
|
||||
|
||||
https://192.168.11.11:4433/web/
|
||||
```
|
||||
|
||||
此外服务端还会开放另外两个端口,节点数据回传端口默认为4434,SSH服务默认访问端口为22。
|
||||
|
||||
**4433端口和22端口,“只能”被安全区的管理设备访问。4434端口,“必须能”被蜜罐节点访问。**
|
||||
|
||||
|
||||
|
||||
> OneFish服务端会主动访问如下网络域名
|
||||
|
||||
OneFish支持IPv4和IPv6地址环境,可以在完全隔离互联网的内部网络工作,但为了最大限度感知真实威胁和对接云端接口消费威胁情报,以及接受自动化升级服务,微步在线强烈建议客户允许HFish服务端访问互联网,为兼顾安全性和服务可用性,推荐用户仅允许OneFish服务端主动访问如下网络域名、地址和端口:
|
||||
|
||||
|
||||
|
||||
| 目的IP | 协议/端口 | 对应域名 | 访问目的 |
|
||||
| ------------------------------------------------------------ | --------- | ------------------- | ------------------------------------------------ |
|
||||
| 103.210.21.74 | TCP/443 | hfish.io | 用于官网升级功能,建议开启 |
|
||||
| 106.75.36.224 123.59.72.253 123.59.51.113 106.75.36.226 117.50.17.104 | TCP/443 | api.threatbook.cn | 用于威胁情报查询,如果未启用该功能,无需开放 |
|
||||
| 该域名使用CDN解析,建议用户在实际网络中解析后开放权限 | TCP/443 | open.feishu.cn | 用于飞书告警功能,如果未使用该功能,无需开放 |
|
||||
| 该域名使用CDN解析,建议用户在实际网络中解析后开放权限 | TCP/443 | oapi.dingtalk.com | 用于钉钉告警功能,如果未使用该功能,无需开放 |
|
||||
| 该域名使用CDN解析,建议用户在实际网络中解析后开放权限 | TCP/443 | qyapi.weixin.qq.com | 用于企业微信告警功能,如果未使用该功能,无需开放 |
|
||||
|
||||
|
||||
|
||||
注意:OneFish服务端仅需要通过NAT模式访问互联网,基于安全考虑,微步在线不建议用户将OneFish服务端管理接口暴露在互联网。
|
||||
|
||||
1. 如果使用邮件通知,请开启相应邮件服务器的访问权限。
|
||||
|
||||
2. 与此同时我们还支持 5 路syslog日志的发送,便于您的安全设备联动。请根据自己的情况开放权限。
|
||||
|
||||
|
||||
|
||||
|
||||
### Server端的资源要求
|
||||
|
||||
|
||||
|
||||
> 蜜罐对资源的要求根据攻击数量的区别差异很大,通常来说部署在内网的蜜罐,对性能的要求很低。
|
||||
>
|
||||
> 但接入公网的蜜罐对性能就会有更大的需求。
|
||||
|
||||
针对我们过往的测试的情况,我们给出两个配置,一个最低配置,一个是我们的推进配置。如果您的蜜罐打算接到公网,并有比较大的攻击流量,请跟进资源占用情况,提升主机的配置。
|
||||
|
||||
```wiki
|
||||
最低配置:Server端 1c2g100G、节点1c1g50G
|
||||
|
||||
建议配置:Server端 2c4g200G、节点1c2g50G
|
||||
|
||||
日志磁盘占用,受攻击数量影响较大,我们建议Server端配置200G硬盘空间以上。
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Server端的权限审核
|
||||
|
||||
|
||||
|
||||
> 对root权限的需求
|
||||
|
||||
```wiki
|
||||
直接部署安装方式服务端的过程中,对于Mysql数据的安装和配置需要root权限。Server端的部署和使用不需要root权限。
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 节点的安全配置
|
||||
|
||||
> 节点因为是直接面对攻击者的,安全配置是节点安全的重要保障
|
||||
|
||||
1. 外网节点和内网节点不能共用
|
||||
2. 如果有节点需要能被外网访问,那么建议把节点和服务端部署在DMZ区。
|
||||
3. 外网节点除了能访问Server端的4434(默认)端口外,不能有权限访问内网中的任何资产。
|
||||
4. 内网节点除了开放蜜罐服务相应端口外,其它任何端口都不应该在网络中能被用户访问到。考虑安全区设备有维护节点主机的需求,可以向有限的设备开放ssh端口。
|
45
docs/2-2-linux.md
Normal file
45
docs/2-2-linux.md
Normal file
@ -0,0 +1,45 @@
|
||||
- ### 手动安装
|
||||
|
||||
如果上述的安装脚本您无法使用,您可以尝试用手动安装完成部署。
|
||||
|
||||
到官网 [https://hfish.io](https://hfish.io/) 下载HFish最新版本安装包,按如下步骤进行安装 (以linux64位系统为例):
|
||||
|
||||
> 第一步: 在当前目录创建一个路径解压安装包
|
||||
|
||||
```
|
||||
mkdir hfish
|
||||
```
|
||||
|
||||
> 第二步:将安装文件包解压到hfish目录下
|
||||
|
||||
```
|
||||
tar zxvf hfish-*-linux-amd64.tar.gz -C hfish
|
||||
```
|
||||
|
||||
> 第三步:请防火墙开启4433或者4434,确认返回success(如果有其他服务需要打开端口,使用相同命令打开。
|
||||
|
||||
```
|
||||
firewall-cmd --add-port=4433/tcp --permanent
|
||||
firewall-cmd --add-port=4434/tcp --permanent
|
||||
firewall-cmd --reload
|
||||
```
|
||||
|
||||
> 第四步:进入安装目录直接运行server,或者后台运行 nohup ./server &
|
||||
|
||||
```
|
||||
cd hfish
|
||||
nohup ./server &
|
||||
```
|
||||
|
||||
> 第五步:登陆web界面
|
||||
|
||||
```
|
||||
登陆链接:https:// [ip]:4433/web
|
||||
账号:admin
|
||||
密码:HFish2021
|
||||
```
|
||||
|
||||
例:如果控制端的ip是192.168.1.1,登陆链接为:https://192.168.1.1:4433/web
|
||||
|
||||
控制端部署完成后,请继续参考下面的【控制端配置】完成配置
|
||||
|
20
docs/2-3-windows.md
Normal file
20
docs/2-3-windows.md
Normal file
@ -0,0 +1,20 @@
|
||||
> 第一步:下载HFish
|
||||
|
||||
访问我们官网的[下载页面](https://hfish.io/#/download),下载最新版的服务端并解压。
|
||||
|
||||
> 第二步:运行文件目录下的server.exe
|
||||
|
||||
server.exe为后台运行,启动后直接后台运行。
|
||||
|
||||
> 第三步:登陆web界面
|
||||
|
||||
```
|
||||
登陆链接:https:// [ip]:4433/web
|
||||
账号:admin
|
||||
密码:HFish2021
|
||||
```
|
||||
|
||||
例:如果控制端的ip是192.168.1.1,登陆链接为:https://192.168.1.1:4433/web
|
||||
|
||||
控制端部署完成后,请继续参考下面的【控制端配置】完成配置
|
||||
|
44
docs/2-4-mariadb.md
Normal file
44
docs/2-4-mariadb.md
Normal file
@ -0,0 +1,44 @@
|
||||
- ### 数据库相关
|
||||
|
||||
HFish系统默认使用的sqlite数据库,具体见 db/hfish.db(自带的已经初始化好的db),相关的初始化脚本见 db/sql/sqlite/V<% version %>__sqlite.sql
|
||||
|
||||
如果您想要重置 hfish.db, 可以通过下面命令生成新的 db 文件(请确保安装了sqlite3数据库)。 替换 db/hfish.db 即可。
|
||||
|
||||
```
|
||||
sqlite3 hfish.db < db/sql/sqlite/V<% version %>__sqlite.sql
|
||||
```
|
||||
|
||||
|
||||
|
||||
**sqlite数据库无需安装,使用方便,但在遭到大规模攻击,及当前版本升级时候会存在数据丢失的问题。**
|
||||
|
||||
因此,HFish同时**支持mysql**数据库,相关的初始化脚本见 db/sql/mysql/V<% version %>__mysql.sql。
|
||||
|
||||
如果您想要切换到mysql数据库,可以进行以下操作(请确认已经安装了mysql数据库,推荐5.7及以上版本)
|
||||
|
||||
> 1. 初始化数据库
|
||||
|
||||
linux环境可以在命令行执行下述命令,然后输入密码(root用户密码)。
|
||||
|
||||
```
|
||||
mysql -u root -p < db/sql/mysql/V<% version %>__mysql.sql
|
||||
```
|
||||
|
||||
windows环境可以使用远程连接工具(比如sqlyog等)导入db/sql/mysql/V<% version %>__mysql.sql 脚本。
|
||||
|
||||
|
||||
|
||||
> 2. 修改config.ini配置文件,数据库的连接方式,主要需要修改type和url,如下:
|
||||
|
||||
```
|
||||
[database]
|
||||
type = sqlite3
|
||||
max_open = 50
|
||||
max_idle = 50
|
||||
url = ./db/hfish.db?cache=shared&mode=rwc
|
||||
# type = mysql
|
||||
# url = root:HFish312@tcp(:3306)/hfish?charset=utf8&parseTime=true&loc=Local
|
||||
```
|
||||
|
||||
|
||||
|
54
docs/3-1-node.md
Normal file
54
docs/3-1-node.md
Normal file
@ -0,0 +1,54 @@
|
||||
!> 点击增加节点,选择相应版本的【节点安装包】,确定
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616171500.png" alt="image-20210616171459269" style="zoom:50%;" />
|
||||
|
||||
```wiki
|
||||
- 如果您在上面的操作中,选择的是linux安装包,在【确定】后,会出现如下页面,您可以用两种方式让您的节点主机完成部署。
|
||||
1. 一句话脚本,直接在节点主机上运行
|
||||
2. 下载可执行文件,并把这个文件上传到节点主机上运行
|
||||
|
||||
- 如果您在上面的操作中,选择的windows安装包,在【确定】后,只有一种方式供您选择。
|
||||
1. 下载可执行文件,并把这个文件上传到节点主机上运行
|
||||
```
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616172029.png" alt="image-20210616172027825" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
### 为节点选择服务模板
|
||||
|
||||
> 展开蜜罐节点,选择上面创建的蜜罐模板
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616173018.png" alt="image-20210616173015062" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
> 刚变更模板后的蜜罐服务状态为【启用】
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616173055.png" alt="image-20210616173053947" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
> 节点正常完成模板加载后,服务状态应该为【在线】。如果是【离线】,说明蜜罐服务没有正常启动,请参考我们后面的【排错说明】,找到问题。
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616173129.png" alt="image-20210616173128526" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
### 主机失陷检测
|
||||
|
||||
失陷蜜饵是部署在业务主机上的失陷检测蜜饵。在主机失陷情况下,通过部署虚假的账号、本地证书等失陷蜜饵,诱导攻击者转移攻击目标,并触发失陷告警。
|
||||
|
||||
其中,主机蜜饵是一种基于部署虚假的账号密码配置文件,诱导转移攻击者攻击目标的防御手段。
|
||||
|
||||
命令在主机运行后,会在本地生成一份虚假的“账号密码备份文件”。 当该主机被攻陷时,攻击者将被诱导,使用文件中的账号信息进行登录。借此,安全人员发现主机失陷情况。
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506162347469.png" alt="image-20210506162347469" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
###
|
136
docs/3-2-services.md
Normal file
136
docs/3-2-services.md
Normal file
@ -0,0 +1,136 @@
|
||||
### 配置工作总览
|
||||
|
||||
!> 在完成控制端的部署后,我们还需要几个配置工作让整个系统运行起来。
|
||||
|
||||
```wiki
|
||||
1. 添加【蜜罐服务】,让系统获得相应蜜罐的能力。
|
||||
2. 创建【服务模板】,模板是数个蜜罐服务的集合,在大规模部署的环境中,模板可以帮我们更高效管理我们的集群。
|
||||
3. 【增加节点】,单机版自带一个节点,集群版不带节点。系统至少需要一个节点才能正常运行。
|
||||
4. 为蜜罐节点选择【服务模板】,选择了什么服务模板,蜜罐节点就具有了模板中的蜜罐能力。
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 添加蜜罐服务
|
||||
|
||||
!> 控制端运行起来后,我们需要做的第一件事情就是下载蜜罐服务。您有2种方法可以添加蜜罐服务,任选一种即可。
|
||||
|
||||
> 【服务管理】中下载蜜罐服务
|
||||
|
||||
```wiki
|
||||
1. 登陆控制端后,打开【服务管理】页面,首次登陆页面上蜜罐服务都是灰色。
|
||||
2. 选择自己需要的蜜罐服务进行下载。
|
||||
```
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616164014.png" alt="image-20210616164012531" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
> 手动上传蜜罐服务包
|
||||
|
||||
**当您处于离线环境不方便在线安装情况下,您可以使用手动上传安装的方式。**
|
||||
|
||||
```wiki
|
||||
1. 下载最新官方服务包 http://img.threatbook.cn/hfish/svc/services-<% version %>.tar.gz
|
||||
2. 在新增服务页面上选择该服务包上传。
|
||||
```
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616165216.png" alt="image-20210616165214921" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
> *上传自定义web蜜罐
|
||||
|
||||
如果您有自定义web蜜罐的需求,我们为您准备了开发样例,您可以参考我们的[文档](https://hfish.io/#/function?id=web%e8%9c%9c%e7%bd%90%e8%87%aa%e5%ae%9a%e4%b9%89%e5%bc%80%e5%8f%91)完成蜜罐的开发工作后,进行上传。
|
||||
当然您也可以在社区中寻找其它用户开发好的蜜罐上传后使用。
|
||||
|
||||
|
||||
|
||||
### 自定义web蜜罐页面
|
||||
|
||||
#### 通过样例了解功能实现方式
|
||||
|
||||
> web蜜罐样例
|
||||
|
||||
```wiki
|
||||
# 下载自定义web蜜罐样例
|
||||
http://img.threatbook.cn/hfish/svc/web-demo.zip
|
||||
```
|
||||
|
||||
|
||||
|
||||
> 解压后获得两个文件
|
||||
|
||||
```wiki
|
||||
# index.html
|
||||
# portrait.js
|
||||
```
|
||||
|
||||
|
||||
|
||||
> index.html文件中的代码功能
|
||||
|
||||
```wiki
|
||||
<form>中的代码明确了页面上账密表单的提交方式。
|
||||
具体利用方式参考下文[制作全新的登陆页面]
|
||||
|
||||
<script>中的代码明确了调用jsonp的方式。
|
||||
```
|
||||
|
||||
|
||||
|
||||
> portrait.js 文件中的代码功能
|
||||
|
||||
```wiki
|
||||
这个文件是jsonp溯源功能的利用代码,攻击者在已登录其他社交平台的情况下,蜜罐可以获得部分社交平台的账号信息。
|
||||
|
||||
本代码因为利用了浏览器的漏洞,有一定的时效性,随着攻击者更新自己的浏览器,利用代码可能失效。并有可能让攻击者在访问该页面时,触发杀毒软件的报警。
|
||||
|
||||
在利用代码失效后,您可以选择删除index.html中的利用代码。
|
||||
|
||||
同时请关注我们的官网( https://hfish.io )和x社区( https://x.threatbook.cn ),等待我们和社区用户更新漏洞利用代码,并替换本文件和index内的利用代码,恢复溯源能力。
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 制作全新的登陆页面
|
||||
|
||||
我们可以自己制作一个全新的登陆页面,通过替换表单元素实现“定制开发”
|
||||
|
||||
```shell
|
||||
- 修改主页文件名为index.html
|
||||
|
||||
- 按照下面图片的要求,修改表单元素。
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### 打包并上传到蜜罐的管理后台
|
||||
|
||||
> 打包所有静态文件资源
|
||||
|
||||
把所有的静态文件文件打包名为“service-xxx.zip”文件。包括但不限于index.html 、portrait.js 和其它格式的静态文件、文件夹。
|
||||
|
||||
注意:文件命名为规范格式前缀必须为“service-” ; “xxx”可以自定义,但不能为“web”和“root”;必须压缩为.zip格式文件
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 打开server后台
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 配置新增服务页面
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 自定义web蜜罐添加成功
|
||||
|
||||

|
12
docs/3-3-tmpl.md
Normal file
12
docs/3-3-tmpl.md
Normal file
@ -0,0 +1,12 @@
|
||||
!> 蜜罐服务添加完成后,我们需要创建模板,把数个蜜罐服务自由组合成为模板。当前每个模板最多支持5个蜜罐服务。
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616170818.png" alt="image-20210616170816548" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
### 自定义web蜜罐传输协议
|
||||
|
||||
针对Web应用仿真、网络设备服务、安全设备服务以及IOT服务,可以根据自身业务场景和网络情况,选择其具体的传输协议(HTTP或者HTTPS),从而让蜜罐更符合当前网络结构,更好吸引攻击者视线。
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506155628363.png" alt="image-20210506155628363" style="zoom:50%;" />
|
||||
|
31
docs/3-4-check.md
Normal file
31
docs/3-4-check.md
Normal file
@ -0,0 +1,31 @@
|
||||
### 部署后的确认检查
|
||||
|
||||
- ### server端:
|
||||
|
||||
1. 使用passwd修改root账户密码,避免弱口令
|
||||
2. 使用date,确认系统时间的准确
|
||||
3. 确认防火墙已经启用,并配置了正确的端口放行,需要放行22、4433、4434端口
|
||||
|
||||
```wiki
|
||||
#centos7 检查防火墙状态
|
||||
systemctl status firewalld
|
||||
|
||||
#centos7 检查防火墙开放端口
|
||||
firewall-cmd --list-ports
|
||||
```
|
||||
|
||||
4. 检查蜜罐服务中的web服务是否已经修改为80端口
|
||||
|
||||
5. 如果server能够访问外网(建议用户有限放行对情报源的访问),检查情报对接(x & tip)是否完成?
|
||||
|
||||
6. 如果如果server能够访问通知服务(syslog、邮件、webhook),检查通知是否完成
|
||||
|
||||
|
||||
|
||||
- ### Node端:
|
||||
|
||||
1. 使用passwd修改root账户密码,避免弱口令
|
||||
|
||||
2. 使用date确认系统时间的准确
|
||||
|
||||
3. 确认防火墙已经启用,并配置了正确的端口放行,需要放行22、22122端口和Node端上启动的蜜罐服务端口(需要在server后台确认端口信息),放行方式参考上面的server端命令。
|
27
docs/4-1-attack.md
Normal file
27
docs/4-1-attack.md
Normal file
@ -0,0 +1,27 @@
|
||||

|
||||
|
||||
> 攻击列表是展示蜜罐捕获攻击数据的地方
|
||||
|
||||
攻击列表本身有一定的聚合能力,会把一段时间内,针对同一IP同一蜜罐的同一攻击者行为聚合在一起。
|
||||
|
||||
内容分为攻击概览和攻击详情两个部分。
|
||||
|
||||
- 攻击概览
|
||||
|
||||
攻击概览展示的数据有:
|
||||
|
||||
1. 被攻击蜜罐名称
|
||||
2. 被攻击数量
|
||||
3. 被攻击节点名称
|
||||
4. 攻击来源IP和所属地理位置信息
|
||||
5. 威胁情报
|
||||
6. 最后一次攻击时间
|
||||
|
||||
- 攻击详情
|
||||
|
||||
攻击详情展示的数据有:
|
||||
|
||||
1. 攻击时间
|
||||
2. 被攻击IP和所属地理位置信息
|
||||
3. 节点名称
|
||||
4. 攻击数据长度
|
18
docs/4-2-scan.md
Normal file
18
docs/4-2-scan.md
Normal file
@ -0,0 +1,18 @@
|
||||

|
||||
|
||||
> 扫描感知可以感知到针对蜜罐节点的扫描行为
|
||||
|
||||
扫描感知通过对网卡抓包,可以感知到针对该节点全端口的扫描行为。支持TCP、UDP和ICMP扫描类型。
|
||||
|
||||
|
||||
|
||||
- 目前扫描感知列表内能够展示的信息如下:
|
||||
1. 扫描IP
|
||||
2. 威胁情报
|
||||
3. 被扫描节点
|
||||
4. 被扫描IP
|
||||
5. 扫描类型
|
||||
6. 被扫描端口
|
||||
7. 节点位置
|
||||
8. 扫描开始时间
|
||||
9. 扫描持续时间
|
11
docs/5-1-source.md
Normal file
11
docs/5-1-source.md
Normal file
@ -0,0 +1,11 @@
|
||||
### 恶意IP
|
||||
|
||||
> 恶意IP页面将监控所有攻击IP的相关信息,包括微步情报及企业自定义情报。
|
||||
>
|
||||
> 另外,所有的溯源信息,最终都会呈现在恶意IP页面,并成为企业的私有情报库。
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
###
|
23
docs/5-2-asset.md
Normal file
23
docs/5-2-asset.md
Normal file
@ -0,0 +1,23 @@
|
||||
### 账号资产
|
||||
|
||||
> 用户名密码页面收集了所有被用来攻击的账号密码,可以对企业账号资产有效监控
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506152344041.png" alt="image-20210506152344041" style="zoom:50%;" />
|
||||
|
||||
> 为辅助企业进行内部账号监控,设定高级监测策略,建议输入企业的邮箱、员工姓名、企业名称等信息进行监控,从而随时监控泄漏情况
|
||||
|
||||
1.点击界面右上角查看高级监测策略
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210401150526485.png" alt="image-20210401150526485" style="zoom: 50%;" />
|
||||
|
||||
2.按照规则要求,导入csv文件。
|
||||
|
||||
**注意!务必按照提示规则进行写入**
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506153037454.png" alt="image-20210506153037454" style="zoom:33%;" />
|
||||
|
||||
3.页面可查看到所有匹配高级监测策略的数据,从而帮助运维人员精准排查泄漏账号,实现企业账号资产安全防护。
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506153041469.png" alt="image-20210506153041469" style="zoom:50%;" />
|
||||
|
||||
###
|
28
docs/6-1-intel.md
Normal file
28
docs/6-1-intel.md
Normal file
@ -0,0 +1,28 @@
|
||||
### 情报对接
|
||||
|
||||
|
||||
|
||||
> 对接精准的云端的威胁情报后,可以对攻击行为进行更准的研判,帮助我们更科学的进行处置。
|
||||
|
||||
对接了威胁情报后,当OneFish捕获到了来自外网的攻击行为后,我们可以在攻击列表中了解攻击者的IP情报。OneFish会把您在云端查询到的情报在本地缓存3天,保持您攻击情报时效性的同时,节省您的查询次数。
|
||||
|
||||

|
||||
|
||||
- 我们支持对接两种来自微步在线的威胁情报
|
||||
|
||||
> 对接微步在线云API(IP信誉接口)
|
||||
|
||||
关于该接口完整的说明,可以参考[微步在线云API文档](https://x.threatbook.cn/nodev4/vb4/API)
|
||||
|
||||
本接口在注册后可以获得每日50条云端情报的查询额度,给微步发送扩容邮件后,可以提升到每日200条的额度。详情访问[微步在线X社区](https://x.threatbook.cn/nodev4/vb4/article?threatInfoID=3101)。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 对接TIP的本地情报,您可以跟据页面的描述进行注册和使用。
|
||||
|
||||
使用该接口需要购买微步在线的TIP本地情报系统。
|
||||
|
||||

|
||||
|
50
docs/6-2-message.md
Normal file
50
docs/6-2-message.md
Normal file
@ -0,0 +1,50 @@
|
||||
### 通知配置
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 通知功能是蜜罐的核心功能之一
|
||||
|
||||
对于蜜罐捕获到的信息,跟据您不同的安全运营流程,您可能需要把该信息第一时间通知其它的安全设备,也可能需要把该信息通知给相关的安全运营人员。HFish用三种方式满足您的需求。
|
||||
|
||||
- Syslog通知
|
||||
- 邮件通知
|
||||
- Webhook通知
|
||||
|
||||
|
||||
|
||||
> 用 Syslog 联动其它安全设备
|
||||
|
||||
您可以自定义接受通知设备的地址、协议和端口,用来接受HFish捕获的攻击信息和报警。OneFish最多支持3路syslog进行通知。
|
||||
|
||||
|
||||
|
||||
> 用邮件通知相关安全人员
|
||||
|
||||
您可以通过配置相关的邮件服务器信息,来接受HFish的通知和报警。
|
||||
|
||||
|
||||
|
||||
> Webhook通知其它设备/人
|
||||
|
||||
很多的场景下我们都可以方便的使用webhook联动人或者设备。
|
||||
|
||||
- 对于当前企业办公中最为流行的3大即时通讯软件企业微信、钉钉、飞书的机器人,我们也做了适配,您在IM中建立一个机器人,把机器人的token复制到HFish的webhook配置中,就可以第一时间在IM中获取蜜罐捕获的攻击告警了。
|
||||
- 三家IM的官方文档如下,您可以对照进行参考
|
||||
|
||||
```wiki
|
||||
- 企业微信官方文档
|
||||
|
||||
https://work.weixin.qq.com/help?doc_id=13376#%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E7%BE%A4%E6%9C%BA%E5%99%A8%E4%BA%BA
|
||||
|
||||
- 钉钉官方文档
|
||||
|
||||
https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq
|
||||
|
||||
- 飞书官方文档
|
||||
https://www.feishu.cn/hc/zh-CN/articles/360040553973
|
||||
```
|
||||
|
25
docs/6-3-alarm.md
Normal file
25
docs/6-3-alarm.md
Normal file
@ -0,0 +1,25 @@
|
||||
### 告警策略
|
||||
|
||||
|
||||
|
||||
> 添加一个新的策略
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 对策略进行配置
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 通知当前分为威胁告警和系统通知两种类型
|
||||
|
||||
威胁告警是系统感知攻击时的告警;系统通知是系统自身运行状态的告警。
|
||||
|
||||
|
||||
|
||||
> 在设置通知方式前,您应该先完成了前边的通知配置
|
||||
|
||||
如果您完成了通知配置,那么这里三种不同的通知方式中就会出现您之前的配置,勾选即可。
|
600
docs/6-4-api.md
Normal file
600
docs/6-4-api.md
Normal file
@ -0,0 +1,600 @@
|
||||

|
||||
|
||||
> API配置页面是管理HFish api_key和查阅API样例的页面
|
||||
|
||||
通过HFish的API接口,能够实现把蜜罐数据同步给其它应用或设备,从而实现更自主丰富的数据展示和安全设备联动。
|
||||
|
||||
!> 相关SDK我们希望能够得到社区用户的支持,大家能够把自己对蜜罐数据的使用方案贡献出来,帮助更多人的使用。
|
||||
|
||||
|
||||
|
||||
### 已经支持的三种API接口调用示例
|
||||
|
||||
|
||||
|
||||
- 获取攻击来源
|
||||
|
||||
<!-- tabs:start -->
|
||||
|
||||
#### **cURL**
|
||||
|
||||
```curl
|
||||
curl --location --request POST 'https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"intranet": "0",
|
||||
"threat_label": [
|
||||
"Scanner"
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
#### **Python**
|
||||
|
||||
```python
|
||||
import requests
|
||||
import json
|
||||
|
||||
url = "https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY"
|
||||
|
||||
payload = json.dumps({
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"intranet": "0",
|
||||
"threat_label": [
|
||||
"Scanner"
|
||||
]
|
||||
})
|
||||
headers = {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
response = requests.request("POST", url, headers=headers, data=payload)
|
||||
|
||||
print(response.text)
|
||||
|
||||
```
|
||||
|
||||
#### **GO**
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"net/http"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
url := "https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY"
|
||||
method := "POST"
|
||||
|
||||
payload := strings.NewReader(`{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"intranet": "0",
|
||||
"threat_label": [
|
||||
"Scanner"
|
||||
]
|
||||
}`)
|
||||
|
||||
client := &http.Client {
|
||||
}
|
||||
req, err := http.NewRequest(method, url, payload)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
body, err := ioutil.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
fmt.Println(string(body))
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
#### **JAVA**
|
||||
|
||||
```java
|
||||
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||
.build();
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, "{\n \"start_time\": 0,\n \"end_time\": 0,\n \"intranet\": \"0\",\n \"threat_label\": [\n \"Scanner\"\n ]\n}");
|
||||
Request request = new Request.Builder()
|
||||
.url("https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY")
|
||||
.method("POST", body)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.build();
|
||||
Response response = client.newCall(request).execute();
|
||||
```
|
||||
|
||||
#### **JavaScript**
|
||||
|
||||
```javascript
|
||||
var settings = {
|
||||
"url": "https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY",
|
||||
"method": "POST",
|
||||
"timeout": 0,
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"data": JSON.stringify({
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"intranet": "0",
|
||||
"threat_label": [
|
||||
"Scanner"
|
||||
]
|
||||
}),
|
||||
};
|
||||
|
||||
$.ajax(settings).done(function (response) {
|
||||
console.log(response);
|
||||
});
|
||||
```
|
||||
|
||||
#### **PHP**
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, array(
|
||||
CURLOPT_URL => 'https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY',
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_ENCODING => '',
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_TIMEOUT => 0,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'POST',
|
||||
CURLOPT_POSTFIELDS =>'{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"intranet": "0",
|
||||
"threat_label": [
|
||||
"Scanner"
|
||||
]
|
||||
}',
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
'Content-Type: application/json'
|
||||
),
|
||||
));
|
||||
|
||||
$response = curl_exec($curl);
|
||||
|
||||
curl_close($curl);
|
||||
echo $response;
|
||||
|
||||
```
|
||||
|
||||
#### **Shell**
|
||||
|
||||
```shell
|
||||
wget --no-check-certificate --quiet \
|
||||
--method POST \
|
||||
--timeout=0 \
|
||||
--header 'Content-Type: application/json' \
|
||||
--body-data '{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"intranet": "0",
|
||||
"threat_label": [
|
||||
"Scanner"
|
||||
]
|
||||
}' \
|
||||
'https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY'
|
||||
```
|
||||
|
||||
<!-- tabs:end -->
|
||||
|
||||
|
||||
- 获取攻击详情
|
||||
|
||||
|
||||
<!-- tabs:start -->
|
||||
|
||||
#### **cURL**
|
||||
|
||||
```curl
|
||||
curl --location --request POST 'https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"page_no": 1,
|
||||
"page_size": 100,
|
||||
"threat_label": ["Scanner"],
|
||||
"client_id": [],
|
||||
"service_name": [],
|
||||
"info_confirm": "1"
|
||||
}'
|
||||
```
|
||||
|
||||
#### **Python**
|
||||
|
||||
```python
|
||||
import requests
|
||||
import json
|
||||
|
||||
url = "https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY"
|
||||
|
||||
payload = json.dumps({
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"page_no": 1,
|
||||
"page_size": 100,
|
||||
"threat_label": [
|
||||
"Scanner"
|
||||
],
|
||||
"client_id": [],
|
||||
"service_name": [],
|
||||
"info_confirm": "1"
|
||||
})
|
||||
headers = {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
response = requests.request("POST", url, headers=headers, data=payload)
|
||||
|
||||
print(response.text)
|
||||
|
||||
```
|
||||
|
||||
#### **GO**
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"net/http"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
url := "https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY"
|
||||
method := "POST"
|
||||
|
||||
payload := strings.NewReader(`{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"page_no": 1,
|
||||
"page_size": 100,
|
||||
"threat_label": ["Scanner"],
|
||||
"client_id": [],
|
||||
"service_name": [],
|
||||
"info_confirm": "1"
|
||||
}`)
|
||||
|
||||
client := &http.Client {
|
||||
}
|
||||
req, err := http.NewRequest(method, url, payload)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
body, err := ioutil.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
fmt.Println(string(body))
|
||||
}
|
||||
```
|
||||
|
||||
#### **JAVA**
|
||||
|
||||
```java
|
||||
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||
.build();
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, "{\n \"start_time\": 0,\n \"end_time\": 0,\n \"page_no\": 1,\n \"page_size\": 100,\n \"threat_label\": [\"Scanner\"],\n \"client_id\": [],\n \"service_name\": [],\n \"info_confirm\": \"1\"\n}");
|
||||
Request request = new Request.Builder()
|
||||
.url("https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY")
|
||||
.method("POST", body)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.build();
|
||||
Response response = client.newCall(request).execute();
|
||||
```
|
||||
|
||||
#### **JavaScript**
|
||||
|
||||
```javascript
|
||||
var settings = {
|
||||
"url": "https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY",
|
||||
"method": "POST",
|
||||
"timeout": 0,
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"data": JSON.stringify({
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"page_no": 1,
|
||||
"page_size": 100,
|
||||
"threat_label": [
|
||||
"Scanner"
|
||||
],
|
||||
"client_id": [],
|
||||
"service_name": [],
|
||||
"info_confirm": "1"
|
||||
}),
|
||||
};
|
||||
|
||||
$.ajax(settings).done(function (response) {
|
||||
console.log(response);
|
||||
});
|
||||
```
|
||||
|
||||
#### **PHP**
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, array(
|
||||
CURLOPT_URL => 'https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY',
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_ENCODING => '',
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_TIMEOUT => 0,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'POST',
|
||||
CURLOPT_POSTFIELDS =>'{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"page_no": 1,
|
||||
"page_size": 100,
|
||||
"threat_label": ["Scanner"],
|
||||
"client_id": [],
|
||||
"service_name": [],
|
||||
"info_confirm": "1"
|
||||
}',
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
'Content-Type: application/json'
|
||||
),
|
||||
));
|
||||
|
||||
$response = curl_exec($curl);
|
||||
|
||||
curl_close($curl);
|
||||
echo $response;
|
||||
|
||||
```
|
||||
|
||||
#### **Shell**
|
||||
|
||||
```shell
|
||||
wget --no-check-certificate --quiet \
|
||||
--method POST \
|
||||
--timeout=0 \
|
||||
--header 'Content-Type: application/json' \
|
||||
--body-data '{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"page_no": 1,
|
||||
"page_size": 100,
|
||||
"threat_label": ["Scanner"],
|
||||
"client_id": [],
|
||||
"service_name": [],
|
||||
"info_confirm": "1"
|
||||
}' \
|
||||
'https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY'
|
||||
```
|
||||
|
||||
<!-- tabs:end -->
|
||||
|
||||
|
||||
|
||||
- 获取该IP攻击使用的账号信息
|
||||
|
||||
|
||||
<!-- tabs:start -->
|
||||
|
||||
#### **cURL**
|
||||
|
||||
```curl
|
||||
curl --location --request POST 'https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"intranet": "0",
|
||||
"threat_label": [
|
||||
"Scanner"
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
#### **Python**
|
||||
|
||||
```python
|
||||
import requests
|
||||
import json
|
||||
|
||||
url = "https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY"
|
||||
|
||||
payload = json.dumps({
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"attack_ip": []
|
||||
})
|
||||
headers = {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
response = requests.request("POST", url, headers=headers, data=payload)
|
||||
|
||||
print(response.text)
|
||||
|
||||
```
|
||||
|
||||
#### **GO**
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"net/http"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
url := "https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY"
|
||||
method := "POST"
|
||||
|
||||
payload := strings.NewReader(`{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"attack_ip": []
|
||||
}`)
|
||||
|
||||
client := &http.Client {
|
||||
}
|
||||
req, err := http.NewRequest(method, url, payload)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
body, err := ioutil.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
fmt.Println(string(body))
|
||||
}
|
||||
```
|
||||
|
||||
#### **JAVA**
|
||||
|
||||
```java
|
||||
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||
.build();
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, "{\n \"start_time\": 0,\n \"end_time\": 0,\n \"attack_ip\": []\n}");
|
||||
Request request = new Request.Builder()
|
||||
.url("https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY")
|
||||
.method("POST", body)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.build();
|
||||
Response response = client.newCall(request).execute();
|
||||
```
|
||||
|
||||
#### **JavaScript**
|
||||
|
||||
```javascript
|
||||
var settings = {
|
||||
"url": "https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY",
|
||||
"method": "POST",
|
||||
"timeout": 0,
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"data": JSON.stringify({
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"attack_ip": []
|
||||
}),
|
||||
};
|
||||
|
||||
$.ajax(settings).done(function (response) {
|
||||
console.log(response);
|
||||
});
|
||||
```
|
||||
|
||||
#### **PHP**
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, array(
|
||||
CURLOPT_URL => 'https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY',
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_ENCODING => '',
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_TIMEOUT => 0,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'POST',
|
||||
CURLOPT_POSTFIELDS =>'{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"attack_ip": []
|
||||
}',
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
'Content-Type: application/json'
|
||||
),
|
||||
));
|
||||
|
||||
$response = curl_exec($curl);
|
||||
|
||||
curl_close($curl);
|
||||
echo $response;
|
||||
|
||||
```
|
||||
|
||||
#### **Shell**
|
||||
|
||||
```shell
|
||||
wget --no-check-certificate --quiet \
|
||||
--method POST \
|
||||
--timeout=0 \
|
||||
--header 'Content-Type: application/json' \
|
||||
--body-data '{
|
||||
"start_time": 0,
|
||||
"end_time": 0,
|
||||
"attack_ip": []
|
||||
}' \
|
||||
'https://SERVER_IP/api/v1/attack/ip?api_key=YOUR_API_KEY'
|
||||
```
|
||||
|
||||
<!-- tabs:end -->
|
||||
|
9
docs/7-1-login.md
Normal file
9
docs/7-1-login.md
Normal file
@ -0,0 +1,9 @@
|
||||

|
||||
|
||||
> 登录管理可以创建和管理登录用户,是蜜罐的账户权限管理页面
|
||||
|
||||
目前登录管理支持创建2种角色的用户:
|
||||
|
||||
1. 管理员
|
||||
2. 业务操作员
|
||||
|
5
docs/7-2-info.md
Normal file
5
docs/7-2-info.md
Normal file
@ -0,0 +1,5 @@
|
||||

|
||||
|
||||
> 系统信息页面是展示HFish系统版本信息的页面
|
||||
|
||||
在展示系统版本信息之外,HFish的“数据清理”功能也在该页面。用户可以自行选择清理“全部的数据”或“7天前的数据”
|
@ -1,42 +1,3 @@
|
||||
## 什么是蜜罐
|
||||
|
||||
**蜜罐**技术本质上是一种对攻击方进 **欺骗的技术**,通过布置一些作为**诱饵的主机**、**网络服务**以及**操作系统**等,诱使攻击方对它们实施攻击,从而可以**捕获攻击行为**进行**分析、溯源、反制**等操作。
|
||||
|
||||
了解攻击方所使用的工具与方法,推测攻击意图和动机,能够让防御方清晰地了解他们所面对的安全威胁,并通过技术和管理手段来增强实际系统的安全防护能力。
|
||||
|
||||
**蜜罐**是企业内部私有的**情报收集系统**。通过对蜜罐本身的设定以及蜜饵的铺洒与运营**引诱黑客前来攻击**。所以攻击者触碰陷阱时,你就可以知道他是如何得逞的,随时了解针对服务器发动的最新的攻击和漏洞。还可以通过窃听攻击之间的联系,收集黑客所用的种种工具,最终掌握他们的攻击路径与手法,知己知彼。
|
||||
|
||||
|
||||
|
||||
## HFish特点
|
||||
|
||||
+ 安全可靠:主打低中交互蜜罐,简单有效;
|
||||
|
||||
+ 蜜罐丰富:支持SSH、FTP、TFTP、MySQL、Redis、Telnet、VNC、Memcache、Elasticsearch、Wordpress、OA系统等10多种蜜罐服务,支持用户制作自定义Web蜜罐;
|
||||
|
||||
+ 开放透明:支持对接微步在线X社区API、五路syslog输出、支持邮件、钉钉、企业微信、飞书、自定义WebHook告警输出;
|
||||
+ 快捷管理:支持单个安装包批量部署,支持批量修改端口和服务;
|
||||
|
||||
+ 跨平台:支持Linux x32/x64/ARM、Windows x32/x64平台;
|
||||
|
||||
|
||||
|
||||
## HFish架构
|
||||
|
||||
HFish由控制端和节点端组成,控制端用来生成和管理节点端,并接收、分析和展示节点端回传的数据,节点端接受控制端的控制并负责构建蜜罐服务。
|
||||
|
||||
> 蜜罐工作原理
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 融合在企业网络中
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## HFish设计理念
|
||||
|
||||
HFish承载了全新的架构理念和实现方案,增加了蜜罐在威胁情报和诱捕溯源领域的能力,帮助企业在红蓝对抗中自动化的对攻击者进行画像和追溯。
|
||||
@ -53,3 +14,6 @@ HFish承载了全新的架构理念和实现方案,增加了蜜罐在威胁情
|
||||
|
||||
2021年2月9日,融合社区反馈和过去2年的思考,我们发布了全新概念的威胁捕捉和诱骗系统 HFish V2,采用闭源共享方式向所有用户免费授权使用。
|
||||
|
||||
## 联系我们
|
||||
|
||||

|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||

|
||||
|
||||
# HFish <sup class="version">2.4.1</sup>
|
||||
# HFish <sup class="version">2.5.0</sup>
|
||||
|
||||
# 安全、简单、有效的蜜罐平台 <sup class="version">永久免费</sup>
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
|
||||
|
||||
[Linux版](https://hfish.io/#/deploy?id=linux%e5%ae%89%e8%a3%85%e8%af%b4%e6%98%8e)
|
||||
[Windows版](https://hfish.io/#/deploy?id=windows%e5%ae%89%e8%a3%85%e8%af%b4%e6%98%8e)
|
||||
[使用手册](#什么是蜜罐)
|
||||
[Linux版](https://hfish.io/#/2-2-linux)
|
||||
[Windows版](https://hfish.io/#/2-3-windows)
|
||||
[使用手册](#HFish设计理念)
|
||||
|
||||
<!-- 背景图片 -->
|
||||
|
||||
|
@ -1,11 +1,36 @@
|
||||
* 使用手册
|
||||
|
||||
- [下载](download)
|
||||
- [控制端安装](deploy)
|
||||
- [控制端配置](config)
|
||||
- [功能说明](function)
|
||||
- [功能配置](setting)
|
||||
|
||||
* [测试样例](demo)
|
||||
* [错误排查](debug)
|
||||
- HFish介绍
|
||||
- [什么是蜜罐](1-1-honeypot)
|
||||
- [HFish特点](1-2-spec)
|
||||
- [HFish原理](1-3-workflow)
|
||||
- 快速开始
|
||||
- [环境要求](2-1-env)
|
||||
- [Docker](2-1-docker)
|
||||
- [Linux](2-2-linux)
|
||||
- [Windows](2-3-windows)
|
||||
- [数据库相关](2-4-mariadb)
|
||||
- 环境管理
|
||||
- [添加服务](3-2-services)
|
||||
- [创建模板](3-3-tmpl)
|
||||
- [新增节点](3-1-node)
|
||||
- [部署后的检查](3-4-check)
|
||||
- 威胁感知
|
||||
- [攻击列表](4-1-attack)
|
||||
- [扫描感知](4-2-scan)
|
||||
- 威胁实体
|
||||
- [攻击来源](5-1-source)
|
||||
- [账号资产](5-2-asset)
|
||||
- 系统配置
|
||||
- [情报对接](6-1-intel)
|
||||
- [通知配置](6-2-message)
|
||||
- [告警策略](6-3-alarm)
|
||||
- [API配置](6-4-api)
|
||||
- 平台管理
|
||||
- [登录管理](7-1-login)
|
||||
- [系统信息](7-2-info)
|
||||
- 进阶应用
|
||||
- [测试样例](8-1-demo)
|
||||
- [错误排查](8-2-debug)
|
||||
- [卸载蜜罐](uninstall)
|
||||
- [已知问题](known)
|
||||
- [ChangeLog](changelog)
|
||||
|
||||
|
39
docs/autorun.sh
Normal file
39
docs/autorun.sh
Normal file
@ -0,0 +1,39 @@
|
||||
# /bash/sh
|
||||
|
||||
if [ -n $(find /bin /usr/bin -name "systemctl") ]; then
|
||||
if [ -f ./server ]; then
|
||||
DESC=HFish-server
|
||||
RUN="./server"
|
||||
elif [ -f ./client ]; then
|
||||
DESC=HFish-client
|
||||
RUN="./client"
|
||||
else
|
||||
echo "Error! No Exist Program,请在HFish的程序目录下运行,或参阅 https://hfish.io 官网文档手动配置!\n" && exit 1
|
||||
fi
|
||||
|
||||
if [ $(ps -ef | grep ${RUN} | grep -v grep | wc -l) -gt 0 ]; then
|
||||
ps -ef | grep ${RUN} | grep -v grep | awk '{print $2}' | xargs kill
|
||||
fi
|
||||
|
||||
rm -rf /etc/systemd/system/${DESC}.service
|
||||
|
||||
echo "[Unit]" >> /etc/systemd/system/${DESC}.service
|
||||
echo "Description=${DESC}" >> /etc/systemd/system/${DESC}.service
|
||||
echo "After=network.target" >> /etc/systemd/system/${DESC}.service
|
||||
echo "Wants=mariadb.service syslog.target remote-fs.target \n" >> /etc/systemd/system/${DESC}.service
|
||||
echo "[Service]" >> /etc/systemd/system/${DESC}.service
|
||||
echo "Type=simple" >> /etc/systemd/system/${DESC}.service
|
||||
echo "ExecStart=/bin/bash -c 'cd $(pwd) && ${RUN}'" >> /etc/systemd/system/${DESC}.service
|
||||
echo "ExecReload=/usr/bin/kill -s HUP $MAINPID" >> /etc/systemd/system/${DESC}.service
|
||||
echo "ExecStop=/usr/bin/kill -s QUIT $MAINPID" >> /etc/systemd/system/${DESC}.service
|
||||
echo "Restart=on-failure" >> /etc/systemd/system/${DESC}.service
|
||||
echo "RestartSec=30 \n" >> /etc/systemd/system/${DESC}.service
|
||||
echo "[Install]" >> /etc/systemd/system/${DESC}.service
|
||||
echo "WantedBy=multi-user.target" >> /etc/systemd/system/${DESC}.service
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl start ${DESC}
|
||||
|
||||
else
|
||||
echo "未发现systemctl程序,服务脚本无法工作,请参阅 https://hfish.io 官网文档手动配置!\n" && exit 1
|
||||
fi
|
BIN
docs/autorun.zip
Normal file
BIN
docs/autorun.zip
Normal file
Binary file not shown.
89
docs/blog/404.html
Normal file
89
docs/blog/404.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Page Not Found</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
text-align: center;
|
||||
}
|
||||
.box {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.number {
|
||||
font-size: 80px;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
}
|
||||
.text {
|
||||
font-size: 14px;
|
||||
margin: 24px;
|
||||
color: #333;
|
||||
}
|
||||
.btn-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.btn {
|
||||
padding: 8px 24px;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
background: #fff;
|
||||
border: 2px solid #efefef;
|
||||
color: #333;
|
||||
margin: 24px;
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.footer {
|
||||
padding: 16px;
|
||||
border-top: 1px solid #efefef;
|
||||
color: #777;
|
||||
font-weight: lighter;
|
||||
}
|
||||
.footer a {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="box">
|
||||
<div class="number">4 0 4</div>
|
||||
<div class="text">
|
||||
Page not found
|
||||
</div>
|
||||
<div class="btn-container">
|
||||
<a class="btn" id="back">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 8px;">
|
||||
<path fill="none" d="M0 0h24v24H0z"/>
|
||||
<path d="M5.828 7l2.536 2.536L6.95 10.95 2 6l4.95-4.95 1.414 1.414L5.828 5H13a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H5.828z"/>
|
||||
</svg>
|
||||
Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
Powered by <a href="https://gridea.dev" target="_blank">Gridea</a>
|
||||
</footer>
|
||||
<script>
|
||||
var back = document.getElementById('back')
|
||||
back.onclick = function() { console.log('run...'); history.back() }
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
131
docs/blog/about/index.html
Normal file
131
docs/blog/about/index.html
Normal file
@ -0,0 +1,131 @@
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<title>关于 - HFish</title>
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:4000/favicon.ico?v=1625471904515">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://localhost:4000/styles/main.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dart.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/moment@2.27.0/moment.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"></script>
|
||||
<!-- DEMO JS -->
|
||||
<!--<script src="media/scripts/index.js"></script>-->
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="main gt-bg-theme-color-first">
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="navbar-brand">
|
||||
<div class="site-name gt-c-content-color-first">
|
||||
HFish
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fas fa-bars gt-c-content-color-first" style="font-size: 18px"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<div class="navbar-nav mr-auto" style="text-align: center">
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/" class="menu gt-a-link">
|
||||
首页
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/archives" class="menu gt-a-link">
|
||||
归档
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/tags" class="menu gt-a-link">
|
||||
标签
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/post/about" class="menu gt-a-link">
|
||||
关于
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<form id="gridea-search-form" style="position: relative" data-update="1625471904515" action="/search/index.html">
|
||||
<input class="search-input" autocomplete="off" spellcheck="false" name="q" placeholder="搜索文章" />
|
||||
<i class="fas fa-search gt-c-content-color-first" style="position: absolute; top: 9px; left: 10px;"></i>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="post-container">
|
||||
<div class="post-detail">
|
||||
<article class="gt-post-content">
|
||||
<div class="post-content">
|
||||
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="site-footer gt-c-content-color-first">
|
||||
<div class="slogan gt-c-content-color-first">做一款大家喜欢的产品,是一件很开心的事情。</div>
|
||||
<div class="social-container">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
Powered by <a href="https://hfish.io" target="_blank">HFish.io</a> |
|
||||
<a class="rss" href="http://localhost:4000/atom.xml" target="_blank">RSS</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad()
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
1
docs/blog/api-content/index.html
Normal file
1
docs/blog/api-content/index.html
Normal file
@ -0,0 +1 @@
|
||||
{"posts":[{"title":"我们开始写博客了","content":"这个博客主要是HFish产品团队跟大家分享自己的使用心得、实践体会和学习笔记。 目前负责维护博客的人包括3个: Ren老湿:HFish业务leader,传说中的技术大佬。 多年管理岗位后,对北京的水疗店里,哪家的小姐姐最美、哪家的性价比最高,了如指掌!在某次团建中他遭到了麻老师地供应链攻击(葡萄酒中兑了葡萄味的江小白),神志迷离状态中,说出了自己之前团队的APT编号……但联想到他笨拙的日站身手,引得大家哄堂大笑。 麻老师:HFish的新人产品经理,公司里的女明星,每天都有后援会投喂的那种。 麻老师硕士毕业论文的方向是【汽车自动控制】,读书期间原力觉醒,对提升中国物联网安全实力,迸发了超强的责任感!一毕业就加入了HFish团队。 每周的周会上,Ren老湿总是憧憬未来,如果我们的我们用户数量的柱形图有麻老师腿那么长,我们何愁大事不成! 而大家问到免费的HFish未来走向何方时?魏脑丝也总会放下自己刚点的炉火外卖给大家布道!对于我们这个团队来说,靠一款安全产品赢利,那是我们的失败!娱乐圈的钱明显要比安全圈好赚呀,放眼全球,麻老师这种“超模工程师”+“黑客狙击手”的女艺人人设,都是独一无二的!到那一天盈利对我们来说,只是我们发展的副产品而已! **魏脑丝:**HFish的产品运营,混迹娱乐圈多年,因为《限娱令》丢了工作,兜兜转转混入了技术圈。 魏脑丝技术虽然小白,但是能忽悠,不管懂不懂,他都能跟你瞎扯!据说当年面试时,HR问他:“为啥你觉得自己能胜任安全产品社区的运营工作?”他高傲地回复到:“我之前在竞争最激烈的娱乐行业,做宅男向粉丝的运营。你看安全产品社区里面的用户,还是这帮宅男,但是这个细分市场却完全没有竞争可言,我不觉得我加入这里需要谈【胜任】这个问题,我进入这个行业,是降!维!打!击!” ","link":"http://localhost:4000/post/first-blog/"}]}
|
1
docs/blog/api-info/index.html
Normal file
1
docs/blog/api-info/index.html
Normal file
@ -0,0 +1 @@
|
||||
{"posts":[{"fileName":"first-blog","abstract":"","description":"这个博客主要是HFish产品团队跟大家分享自己的使用心得、实践体会和学习笔记。 目前负责维护博客的人包括3个: Ren老湿:HFish业务leader,传说中的技术大佬。 多年管理岗位后,对北京的水疗店里,哪家的小姐姐最美、哪家的性价比...","title":"我们开始写博客了","tags":[{"name":"blog","slug":"vuXWknrCE","used":true,"link":"http://localhost:4000/tag/vuXWknrCE/"}],"feature":"http://localhost:4000/post-images/first-blog.jpeg","link":"http://localhost:4000/post/first-blog/","stats":{"text":"3 min read","time":126000,"words":624,"minutes":3},"isTop":true,"toc":"","date":"2021-07-05 09:21:15","dateFormat":"2021-07-05"}],"tags":[{"name":"blog","slug":"vuXWknrCE","used":true,"link":"http://localhost:4000/tag/vuXWknrCE/","count":1}],"menus":[{"link":"http://localhost:4000/","name":"首页","openType":"Internal"},{"link":"http://localhost:4000/archives","name":"归档","openType":"Internal"},{"link":"http://localhost:4000/tags","name":"标签","openType":"Internal"},{"link":"http://localhost:4000/post/about","name":"关于","openType":"Internal"}],"themeConfig":{"themeName":"pure","postPageSize":20,"archivesPageSize":50,"siteName":"HFish","siteDescription":"做一款大家喜欢的产品,是一件很开心的事情。","footerInfo":"Powered by <a href=\"https://hfish.io\" target=\"_blank\">HFish.io</a>","showFeatureImage":true,"domain":"http://localhost:4000","postUrlFormat":"SLUG","tagUrlFormat":"SHORT_ID","dateFormat":"YYYY-MM-DD","feedFullText":false,"feedCount":10,"archivesPath":"archives","postPath":"post","tagPath":"tag"},"customConfig":{"APP_ID":"","APP_KEY":"","about":"","avatar":"","caf":"#84fab0","ccf":"#5f6169","ccs":"#999fa7","ctf":"#ffffff","cts":"#dddddd","customCss":"","descfriend":"","dribbble":"","facebook":"","friends":[],"ga":"","github":"","isEnabledCustomColor":false,"pageSize":"5","placeholder":"Just Go Go","recordIp":false,"skin":"gray","twitter":"","vMaxWidth":"1000","vPadding":"2.5%","vPercentWidth":"100","valine":false,"visitor":false,"weibo":"","zhihu":""},"utils":{"now":1625471904515}}
|
149
docs/blog/archives/index.html
Normal file
149
docs/blog/archives/index.html
Normal file
@ -0,0 +1,149 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<title>HFish</title>
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:4000/favicon.ico?v=1625471904515">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://localhost:4000/styles/main.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dart.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/moment@2.27.0/moment.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"></script>
|
||||
<!-- DEMO JS -->
|
||||
<!--<script src="media/scripts/index.js"></script>-->
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="main gt-bg-theme-color-first">
|
||||
<div class="main-content">
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="navbar-brand">
|
||||
<div class="site-name gt-c-content-color-first">
|
||||
HFish
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fas fa-bars gt-c-content-color-first" style="font-size: 18px"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<div class="navbar-nav mr-auto" style="text-align: center">
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/" class="menu gt-a-link">
|
||||
首页
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/archives" class="menu gt-a-link">
|
||||
归档
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/tags" class="menu gt-a-link">
|
||||
标签
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/post/about" class="menu gt-a-link">
|
||||
关于
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<form id="gridea-search-form" style="position: relative" data-update="1625471904515" action="/search/index.html">
|
||||
<input class="search-input" autocomplete="off" spellcheck="false" name="q" placeholder="搜索文章" />
|
||||
<i class="fas fa-search gt-c-content-color-first" style="position: absolute; top: 9px; left: 10px;"></i>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="post-container">
|
||||
<div class="post-detail gt-bg-theme-color-first">
|
||||
<article class="gt-post-content">
|
||||
<h2 class="post-title">归档</h2>
|
||||
|
||||
|
||||
<div class="archives-container">
|
||||
|
||||
<h2 class="year gt-c-cotent-color-first">2021</h2>
|
||||
|
||||
|
||||
<article class="post">
|
||||
<a href="http://localhost:4000/post/first-blog/">
|
||||
<div class="post-title gt-c-content-color-first">
|
||||
<small><b>2021-07-05 · </b></small>
|
||||
我们开始写博客了
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pagination-container">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site-footer gt-c-content-color-first">
|
||||
<div class="slogan gt-c-content-color-first">做一款大家喜欢的产品,是一件很开心的事情。</div>
|
||||
<div class="social-container">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
Powered by <a href="https://hfish.io" target="_blank">HFish.io</a> |
|
||||
<a class="rss" href="http://localhost:4000/atom.xml" target="_blank">RSS</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad()
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
20
docs/blog/atom.xml
Normal file
20
docs/blog/atom.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<id>http://localhost:4000</id>
|
||||
<title>HFish</title>
|
||||
<updated>2021-07-05T09:49:37.010Z</updated>
|
||||
<generator>https://github.com/jpmonette/feed</generator>
|
||||
<link rel="alternate" href="http://localhost:4000"/>
|
||||
<link rel="self" href="http://localhost:4000/atom.xml"/>
|
||||
<subtitle>做一款大家喜欢的产品,是一件很开心的事情。</subtitle>
|
||||
<logo>http://localhost:4000/images/avatar.png</logo>
|
||||
<icon>http://localhost:4000/favicon.ico</icon>
|
||||
<rights>All rights reserved 2021, HFish</rights>
|
||||
<entry>
|
||||
<title type="html"><![CDATA[我们开始写博客了]]></title>
|
||||
<id>http://localhost:4000/post/first-blog/</id>
|
||||
<link href="http://localhost:4000/post/first-blog/">
|
||||
</link>
|
||||
<updated>2021-07-05T01:21:15.000Z</updated>
|
||||
</entry>
|
||||
</feed>
|
BIN
docs/blog/favicon.ico
Normal file
BIN
docs/blog/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 464 KiB |
141
docs/blog/friends/index.html
Normal file
141
docs/blog/friends/index.html
Normal file
@ -0,0 +1,141 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<title>友情链接 - HFish</title>
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:4000/favicon.ico?v=1625471904515">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://localhost:4000/styles/main.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dart.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/moment@2.27.0/moment.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"></script>
|
||||
<!-- DEMO JS -->
|
||||
<!--<script src="media/scripts/index.js"></script>-->
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="main gt-bg-theme-color-first">
|
||||
<div class="main-content">
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="navbar-brand">
|
||||
<div class="site-name gt-c-content-color-first">
|
||||
HFish
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fas fa-bars gt-c-content-color-first" style="font-size: 18px"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<div class="navbar-nav mr-auto" style="text-align: center">
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/" class="menu gt-a-link">
|
||||
首页
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/archives" class="menu gt-a-link">
|
||||
归档
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/tags" class="menu gt-a-link">
|
||||
标签
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/post/about" class="menu gt-a-link">
|
||||
关于
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<form id="gridea-search-form" style="position: relative" data-update="1625471904515" action="/search/index.html">
|
||||
<input class="search-input" autocomplete="off" spellcheck="false" name="q" placeholder="搜索文章" />
|
||||
<i class="fas fa-search gt-c-content-color-first" style="position: absolute; top: 9px; left: 10px;"></i>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="post-container">
|
||||
<div class="post-detail">
|
||||
<article>
|
||||
<!-- <div class="post-content-wrapper"> -->
|
||||
<div class="post-content">
|
||||
<div class="friends-desc">
|
||||
|
||||
</div>
|
||||
<h3 id="linklist">友链列表</h3>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</article>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="site-footer gt-c-content-color-first">
|
||||
<div class="slogan gt-c-content-color-first">做一款大家喜欢的产品,是一件很开心的事情。</div>
|
||||
<div class="social-container">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
Powered by <a href="https://hfish.io" target="_blank">HFish.io</a> |
|
||||
<a class="rss" href="http://localhost:4000/atom.xml" target="_blank">RSS</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad()
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
BIN
docs/blog/images/avatar.png
Normal file
BIN
docs/blog/images/avatar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 464 KiB |
161
docs/blog/index.html
Normal file
161
docs/blog/index.html
Normal file
@ -0,0 +1,161 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<title>HFish</title>
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:4000/favicon.ico?v=1625471904515">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://localhost:4000/styles/main.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dart.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/moment@2.27.0/moment.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"></script>
|
||||
<!-- DEMO JS -->
|
||||
<!--<script src="media/scripts/index.js"></script>-->
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="main gt-bg-theme-color-first">
|
||||
<div class="main-content">
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="navbar-brand">
|
||||
<div class="site-name gt-c-content-color-first">
|
||||
HFish
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fas fa-bars gt-c-content-color-first" style="font-size: 18px"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<div class="navbar-nav mr-auto" style="text-align: center">
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/" class="menu gt-a-link">
|
||||
首页
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/archives" class="menu gt-a-link">
|
||||
归档
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/tags" class="menu gt-a-link">
|
||||
标签
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/post/about" class="menu gt-a-link">
|
||||
关于
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<form id="gridea-search-form" style="position: relative" data-update="1625471904515" action="/search/index.html">
|
||||
<input class="search-input" autocomplete="off" spellcheck="false" name="q" placeholder="搜索文章" />
|
||||
<i class="fas fa-search gt-c-content-color-first" style="position: absolute; top: 9px; left: 10px;"></i>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="post-list-container">
|
||||
<div class="post-inner">
|
||||
|
||||
<div class="post gt-bg-theme-color-second">
|
||||
<div class="post-left">
|
||||
<div>
|
||||
|
||||
<span class="sticky-top-flag gt-bg-accent-color-first">置顶</span>
|
||||
|
||||
<a href="http://localhost:4000/post/first-blog/">
|
||||
<span class="post-title gt-c-content-color-first">我们开始写博客了</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="gt-post-content post-abstract gt-c-content-color-second">
|
||||
|
||||
</div>
|
||||
<div class="post-info">
|
||||
<time class="post-time gt-c-content-color-first">
|
||||
发布于 · 2021-07-05 ·
|
||||
</time>
|
||||
|
||||
<a href="http://localhost:4000/tag/vuXWknrCE/" class="post-tag">
|
||||
# blog
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="http://localhost:4000/post/first-blog/" class="post-feature-image"
|
||||
style="background-image: url('http://localhost:4000/post-images/first-blog.jpeg')">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pagination-container">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="site-footer gt-c-content-color-first">
|
||||
<div class="slogan gt-c-content-color-first">做一款大家喜欢的产品,是一件很开心的事情。</div>
|
||||
<div class="social-container">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
Powered by <a href="https://hfish.io" target="_blank">HFish.io</a> |
|
||||
<a class="rss" href="http://localhost:4000/atom.xml" target="_blank">RSS</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad()
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
1
docs/blog/media/README.md
Normal file
1
docs/blog/media/README.md
Normal file
@ -0,0 +1 @@
|
||||
media: 静态资源存放文件夹,可在此文件夹放 images、fonts、scripts... 等资源
|
230
docs/blog/media/gridea-search/gridea-search.js
Normal file
230
docs/blog/media/gridea-search/gridea-search.js
Normal file
@ -0,0 +1,230 @@
|
||||
/**
|
||||
* 由 宝硕(https://github.com/renbaoshuo) 修改自 https://github.com/tangkaichuan/gridea-search
|
||||
*/
|
||||
|
||||
(function () {
|
||||
//获取url参数
|
||||
function getParam(url, param) {
|
||||
if (url.indexOf('?') > -1) {
|
||||
var urlSearch = url.split('?');
|
||||
var paramList = urlSearch[1].split('&');
|
||||
for (var i = paramList.length - 1; i >= 0; i--) {
|
||||
var temp = paramList[i].split('=');
|
||||
if (temp[0] === param) {
|
||||
return temp[1];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
//获取解码后的搜索词
|
||||
function getQueryPhrase() {
|
||||
if(window.location.href.indexOf('?') == -1) return "";
|
||||
var phrase = getParam(window.location.href, 'q');
|
||||
var queryPhrase = decodeURIComponent(phrase.replace(/\+/g, ' '));
|
||||
return queryPhrase;
|
||||
}
|
||||
|
||||
//填充搜索输入框
|
||||
function fillSearchInput() {
|
||||
var searchForm = document.getElementById('gridea-search-form');
|
||||
var searchInput = searchForm.getElementsByTagName('input')[0];
|
||||
searchInput.value = getQueryPhrase();
|
||||
}
|
||||
|
||||
//Ajax异步GET请求
|
||||
function ajax(obj) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('get', obj.url, true);
|
||||
xhr.send(null);
|
||||
xhr.onreadystatechange = function () {
|
||||
//异步请求:响应状态为4,数据加载完毕
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status === 200) {
|
||||
obj.success(xhr.responseText);
|
||||
} else {
|
||||
obj.error(xhr.status);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//模糊搜索 https://github.com/krisk/fuse
|
||||
function fuzzySearch(data, phrase) {
|
||||
var options = {
|
||||
includeMatches: true,
|
||||
ignoreLocation: true,
|
||||
keys: [
|
||||
'title',
|
||||
'content'
|
||||
]
|
||||
};
|
||||
var fuse = new Fuse(data, options);
|
||||
var fuzzyResult = fuse.search(phrase);
|
||||
return fuzzyResult;
|
||||
}
|
||||
|
||||
//检查缓存是否最新
|
||||
function checkCache() {
|
||||
var caches = {};
|
||||
caches.infos = JSON.parse(localStorage.getItem('InfosCache'));
|
||||
caches.contents = JSON.parse(localStorage.getItem('ContentsCache'));
|
||||
if (caches.infos && caches.contents) {
|
||||
var cachedTime = caches.infos.utils.now.toString();
|
||||
var updateTime = document.getElementById('gridea-search-result').getAttribute('data-update');
|
||||
if (cachedTime === updateTime) {
|
||||
return caches;
|
||||
}
|
||||
}
|
||||
localStorage.removeItem('InfosCache');
|
||||
localStorage.removeItem('ContentsCache');
|
||||
return false;
|
||||
}
|
||||
|
||||
//获取博客全文api
|
||||
function getContents(callback) {
|
||||
var caches = checkCache();
|
||||
if (caches) {
|
||||
callback(caches.contents);
|
||||
}
|
||||
else {
|
||||
ajax({
|
||||
url: '../api-content/index.html' + "?_=" + Date.now(),
|
||||
success: function (data) {
|
||||
callback(JSON.parse(data));
|
||||
localStorage.setItem('ContentsCache', data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//获取博客信息api
|
||||
function getInfos(callback) {
|
||||
var caches = checkCache();
|
||||
if (caches) {
|
||||
callback(caches.infos);
|
||||
}
|
||||
else {
|
||||
ajax({
|
||||
url: '../api-info/index.html' + "?_=" + Date.now(),
|
||||
success: function (data) {
|
||||
callback(JSON.parse(data));
|
||||
localStorage.setItem('InfosCache', data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//根据一段文本调用模糊搜索
|
||||
function searchBy(phrase, callback) {
|
||||
var result = '';
|
||||
var getFuzzyResult = function (data) {
|
||||
result = fuzzySearch(data.posts, phrase);
|
||||
callback(result);
|
||||
}
|
||||
//根据全文内容获取搜索结果
|
||||
getContents(getFuzzyResult);
|
||||
}
|
||||
|
||||
//显示无搜索结果
|
||||
function showNoResult() {
|
||||
var resultDIV = document.getElementById('gridea-search-result');
|
||||
var noResult = resultDIV.getElementsByClassName('no-result')[0];
|
||||
noResult.style.display = 'block';
|
||||
resultDIV.innerHTML = noResult.outerHTML;
|
||||
}
|
||||
|
||||
//根据解码后的搜索词执行搜索
|
||||
function searchByPhrase(resultHandler) {
|
||||
var queryPhrase = getQueryPhrase();
|
||||
if (queryPhrase === '' || typeof (queryPhrase) === 'undefined') {
|
||||
showNoResult();
|
||||
} else {
|
||||
searchBy(queryPhrase, resultHandler);
|
||||
}
|
||||
}
|
||||
|
||||
//获取搜索结果列表模板的URL
|
||||
function getTemplateURL() {
|
||||
var scripts = document.getElementsByTagName('script');
|
||||
var templateURL = '';
|
||||
for (var i = 0; i < scripts.length; i++) {
|
||||
if (scripts[i].type === 'text/ejs') {
|
||||
templateURL = scripts[i].src;
|
||||
return templateURL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//渲染搜索结果列表ejs https://github.com/mde/ejs
|
||||
function renderResult(searchedInfos) {
|
||||
if (searchedInfos.posts.length > 0) {
|
||||
ajax({
|
||||
url: getTemplateURL(),
|
||||
success: function (data) {
|
||||
var resultDIV = document.getElementById('gridea-search-result');
|
||||
resultDIV.innerHTML = ejs.compile(data)(searchedInfos);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
showNoResult();
|
||||
}
|
||||
}
|
||||
|
||||
//搜索结果关键字高亮
|
||||
function keywordHighlight(searchedContent) {
|
||||
var searchedPostContent = searchedContent.item.content;//搜索结果内容预览
|
||||
var preview = '... ';
|
||||
for (var i = 0; i < searchedContent.matches.length; i++) {
|
||||
if (searchedContent.matches[i].key === 'content') {//如果匹配到文章内容,截取关键字
|
||||
var indices = searchedContent.matches[i].indices[0];
|
||||
var beforeKeyword = searchedPostContent.substring(indices[0] - 20, indices[0]);//关键字前10字
|
||||
var keyword = searchedPostContent.substring(indices[0], indices[1] + 1);//关键字
|
||||
var afterKeyword = searchedPostContent.substring(indices[1] + 1, indices[1] + 120);//关键字后70字
|
||||
preview = beforeKeyword + '<span class="searched-keyword">'
|
||||
+ keyword + '</span>' + afterKeyword;
|
||||
} else {//没有匹配到文章内容,则是标题,直接截取前80字
|
||||
preview = searchedPostContent.substring(0, 80);
|
||||
}
|
||||
}
|
||||
return preview + ' ...';
|
||||
}
|
||||
|
||||
//循环匹配搜索到的内容与展示信息
|
||||
function getResult(infos, searchedContents) {
|
||||
var searchedInfos = JSON.parse(JSON.stringify(infos));//对象深拷贝
|
||||
searchedInfos.posts = [];
|
||||
for (var i = 0; i < searchedContents.length; i++) {
|
||||
for (var j = 0; j < infos.posts.length; j++) {
|
||||
if (searchedContents[i].item.link === infos.posts[j].link) {
|
||||
infos.posts[j].searchedPreview = keywordHighlight(searchedContents[i]);// 预览关键字高亮
|
||||
infos.posts[j].content = searchedContents[i].item.content;// content注入
|
||||
searchedInfos.posts.push(infos.posts[j]);// push到所需结果中
|
||||
}
|
||||
}
|
||||
}
|
||||
return searchedInfos;
|
||||
}
|
||||
|
||||
//主方法
|
||||
function grideaSearch() {
|
||||
//搜索结果回调
|
||||
var resultHandler = function (searchedContents) {
|
||||
getInfos(function (infos) {
|
||||
// console.log(infos);
|
||||
// console.log(searchedContents);
|
||||
var searchedInfos = getResult(infos, searchedContents);
|
||||
renderResult(searchedInfos);
|
||||
});
|
||||
}
|
||||
searchByPhrase(resultHandler);
|
||||
}
|
||||
|
||||
//页面加载完执行
|
||||
window.onload = function () {
|
||||
fillSearchInput();
|
||||
grideaSearch();
|
||||
}
|
||||
})();
|
33
docs/blog/media/gridea-search/result-template.ejs
Normal file
33
docs/blog/media/gridea-search/result-template.ejs
Normal file
@ -0,0 +1,33 @@
|
||||
<div class="post-list-container">
|
||||
<div class="post-inner">
|
||||
<% posts.forEach(function(post) { %>
|
||||
<div class="post gt-bg-theme-color-second">
|
||||
<div class="post-left">
|
||||
<a href="<%= post.link %>">
|
||||
<div>
|
||||
<!-- <a href="<%= post.link %>"> -->
|
||||
<span class="post-title gt-c-content-color-first"><%= post.title %></span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div class="gt-post-content post-abstract gt-c-content-color-second">
|
||||
<p><%- post.searchedPreview %></p>
|
||||
</div>
|
||||
</a>
|
||||
<div class="post-info">
|
||||
<time class="post-time gt-c-content-color-first">
|
||||
· <%= post.dateFormat %> ·
|
||||
</time>
|
||||
<% post.tags.forEach(function(tag) { %>
|
||||
<a href="<%= tag.link %>" class="post-tag">
|
||||
# <%= tag.name %>
|
||||
</a>
|
||||
<% }); %>
|
||||
</div>
|
||||
</div>
|
||||
<% if (themeConfig.showFeatureImage && post.feature) { %>
|
||||
<a href="<%= post.link %>" class="post-feature-image" style="background-image: url('<%= post.feature %>')"></a>
|
||||
<% } %>
|
||||
</div>
|
||||
<% }); %>
|
||||
</div>
|
||||
</div>
|
1
docs/blog/media/scripts/index.js
Normal file
1
docs/blog/media/scripts/index.js
Normal file
@ -0,0 +1 @@
|
||||
console.log('Hello Gridea')
|
BIN
docs/blog/post-images/1625471849023.jpeg
Normal file
BIN
docs/blog/post-images/1625471849023.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 341 KiB |
BIN
docs/blog/post-images/first-blog.jpeg
Normal file
BIN
docs/blog/post-images/first-blog.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 341 KiB |
BIN
docs/blog/post-images/first-blog.png
Normal file
BIN
docs/blog/post-images/first-blog.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 464 KiB |
163
docs/blog/post/first-blog/index.html
Normal file
163
docs/blog/post/first-blog/index.html
Normal file
@ -0,0 +1,163 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<title>我们开始写博客了 | HFish</title>
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:4000/favicon.ico?v=1625471904515">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://localhost:4000/styles/main.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dart.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/moment@2.27.0/moment.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"></script>
|
||||
<!-- DEMO JS -->
|
||||
<!--<script src="media/scripts/index.js"></script>-->
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="main gt-bg-theme-color-first">
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="navbar-brand">
|
||||
<div class="site-name gt-c-content-color-first">
|
||||
HFish
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fas fa-bars gt-c-content-color-first" style="font-size: 18px"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<div class="navbar-nav mr-auto" style="text-align: center">
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/" class="menu gt-a-link">
|
||||
首页
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/archives" class="menu gt-a-link">
|
||||
归档
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/tags" class="menu gt-a-link">
|
||||
标签
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/post/about" class="menu gt-a-link">
|
||||
关于
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<form id="gridea-search-form" style="position: relative" data-update="1625471904515" action="/search/index.html">
|
||||
<input class="search-input" autocomplete="off" spellcheck="false" name="q" placeholder="搜索文章" />
|
||||
<i class="fas fa-search gt-c-content-color-first" style="position: absolute; top: 9px; left: 10px;"></i>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="post-container">
|
||||
<div class="post-detail gt-bg-theme-color-second">
|
||||
<article class="gt-post-content">
|
||||
<h2 class="post-title">
|
||||
我们开始写博客了
|
||||
</h2>
|
||||
<div class="post-info">
|
||||
<time class="post-time gt-c-content-color-first">
|
||||
· 2021-07-05 ·
|
||||
</time>
|
||||
|
||||
<a href="http://localhost:4000/tag/vuXWknrCE/" class="post-tags">
|
||||
# blog
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<p>这个博客主要是HFish产品团队跟大家分享自己的<strong>使用心得</strong>、<strong>实践体会</strong>和<strong>学习笔记</strong>。</p>
|
||||
<p><strong>目前负责维护博客的人包括3个:</strong></p>
|
||||
<blockquote>
|
||||
<p>Ren老湿:HFish业务leader,传说中的技术大佬。</p>
|
||||
</blockquote>
|
||||
<p>多年管理岗位后,对北京的水疗店里,哪家的小姐姐最美、哪家的性价比最高,了如指掌!在某次团建中他遭到了麻老师地供应链攻击(葡萄酒中兑了葡萄味的江小白),神志迷离状态中,说出了自己之前团队的APT编号……但联想到他笨拙的日站身手,引得大家哄堂大笑。</p>
|
||||
<blockquote>
|
||||
<p>麻老师:HFish的新人产品经理,公司里的女明星,每天都有后援会投喂的那种。</p>
|
||||
</blockquote>
|
||||
<p>麻老师硕士毕业论文的方向是【汽车自动控制】,读书期间原力觉醒,对提升中国物联网安全实力,迸发了超强的责任感!一毕业就加入了HFish团队。</p>
|
||||
<p>每周的周会上,Ren老湿总是憧憬未来,如果我们的我们用户数量的柱形图有麻老师腿那么长,我们何愁大事不成!</p>
|
||||
<p>而大家问到免费的HFish未来走向何方时?魏脑丝也总会放下自己刚点的炉火外卖给大家布道!对于我们这个团队来说,靠一款安全产品赢利,那是我们的失败!娱乐圈的钱明显要比安全圈好赚呀,放眼全球,麻老师这种“超模工程师”+“黑客狙击手”的女艺人人设,都是独一无二的!到那一天盈利对我们来说,只是我们发展的副产品而已!</p>
|
||||
<blockquote>
|
||||
<p>**魏脑丝:**HFish的产品运营,混迹娱乐圈多年,因为《限娱令》丢了工作,兜兜转转混入了技术圈。</p>
|
||||
</blockquote>
|
||||
<p>魏脑丝技术虽然小白,但是能忽悠,不管懂不懂,他都能跟你瞎扯!据说当年面试时,HR问他:“为啥你觉得自己能胜任安全产品社区的运营工作?”他高傲地回复到:“我之前在竞争最激烈的娱乐行业,做宅男向粉丝的运营。你看安全产品社区里面的用户,还是这帮宅男,但是这个细分市场却完全没有竞争可言,我不觉得我加入这里需要谈【胜任】这个问题,我进入这个行业,是降!维!打!击!”</p>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="site-footer gt-c-content-color-first">
|
||||
<div class="slogan gt-c-content-color-first">做一款大家喜欢的产品,是一件很开心的事情。</div>
|
||||
<div class="social-container">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
Powered by <a href="https://hfish.io" target="_blank">HFish.io</a> |
|
||||
<a class="rss" href="http://localhost:4000/atom.xml" target="_blank">RSS</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad()
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
139
docs/blog/search/index.html
Normal file
139
docs/blog/search/index.html
Normal file
@ -0,0 +1,139 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<title>搜索 - HFish</title>
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:4000/favicon.ico?v=1625471904515">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://localhost:4000/styles/main.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dart.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/moment@2.27.0/moment.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"></script>
|
||||
<!-- DEMO JS -->
|
||||
<!--<script src="media/scripts/index.js"></script>-->
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.0/dist/fuse.basic.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/ejs@3.1.3/ejs.min.js"></script>
|
||||
<script src="http://localhost:4000/media/gridea-search/gridea-search.js"></script>
|
||||
<script src="http://localhost:4000/media/gridea-search/result-template.ejs" type="text/ejs"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
.searched-keyword {
|
||||
background-color: yellow;
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
<div class="main gt-bg-theme-color-first">
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="navbar-brand">
|
||||
<div class="site-name gt-c-content-color-first">
|
||||
HFish
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fas fa-bars gt-c-content-color-first" style="font-size: 18px"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<div class="navbar-nav mr-auto" style="text-align: center">
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/" class="menu gt-a-link">
|
||||
首页
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/archives" class="menu gt-a-link">
|
||||
归档
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/tags" class="menu gt-a-link">
|
||||
标签
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/post/about" class="menu gt-a-link">
|
||||
关于
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<form id="gridea-search-form" style="position: relative" data-update="1625471904515" action="/search/index.html">
|
||||
<input class="search-input" autocomplete="off" spellcheck="false" name="q" placeholder="搜索文章" />
|
||||
<i class="fas fa-search gt-c-content-color-first" style="position: absolute; top: 9px; left: 10px;"></i>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div id="gridea-search-result" data-update="1625471904515">
|
||||
<div class="searching" style="font-size: 18px; margin-top: 50px;">
|
||||
<i class="fa fa-sync-alt fa-spin"></i> 搜索中......
|
||||
<br><br>
|
||||
<span style="font-size: 65%; color: #aaa">第一次搜索可能需要耗费较长时间构建索引,请耐心等待...</span>
|
||||
</div>
|
||||
<div class="no-result" style="display:none; font-size: 20px; margin-top: 50px;">
|
||||
<i class="fa fa-exclamation-triangle"></i> 未搜索到相关文章,请更换关键词
|
||||
</div>
|
||||
</div>
|
||||
<div class="site-footer gt-c-content-color-first">
|
||||
<div class="slogan gt-c-content-color-first">做一款大家喜欢的产品,是一件很开心的事情。</div>
|
||||
<div class="social-container">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
Powered by <a href="https://hfish.io" target="_blank">HFish.io</a> |
|
||||
<a class="rss" href="http://localhost:4000/atom.xml" target="_blank">RSS</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad()
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
1922
docs/blog/styles/main.css
Normal file
1922
docs/blog/styles/main.css
Normal file
File diff suppressed because it is too large
Load Diff
163
docs/blog/tag/vuXWknrCE/index.html
Normal file
163
docs/blog/tag/vuXWknrCE/index.html
Normal file
@ -0,0 +1,163 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<title>blog | HFish</title>
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:4000/favicon.ico?v=1625471904515">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://localhost:4000/styles/main.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dart.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/moment@2.27.0/moment.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"></script>
|
||||
<!-- DEMO JS -->
|
||||
<!--<script src="media/scripts/index.js"></script>-->
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="main gt-bg-theme-color-first">
|
||||
<div class="main-content">
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="navbar-brand">
|
||||
<div class="site-name gt-c-content-color-first">
|
||||
HFish
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fas fa-bars gt-c-content-color-first" style="font-size: 18px"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<div class="navbar-nav mr-auto" style="text-align: center">
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/" class="menu gt-a-link">
|
||||
首页
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/archives" class="menu gt-a-link">
|
||||
归档
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/tags" class="menu gt-a-link">
|
||||
标签
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/post/about" class="menu gt-a-link">
|
||||
关于
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<form id="gridea-search-form" style="position: relative" data-update="1625471904515" action="/search/index.html">
|
||||
<input class="search-input" autocomplete="off" spellcheck="false" name="q" placeholder="搜索文章" />
|
||||
<i class="fas fa-search gt-c-content-color-first" style="position: absolute; top: 9px; left: 10px;"></i>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="current-tag-container">
|
||||
<h2 class="title gt-c-content-color-first">
|
||||
#blog
|
||||
</h2>
|
||||
</div>
|
||||
<div class="post-list-container">
|
||||
<div class="post-inner">
|
||||
|
||||
<div class="post gt-bg-theme-color-second">
|
||||
<div class="post-left">
|
||||
<div>
|
||||
|
||||
<span class="sticky-top-flag gt-bg-accent-color-first">置顶</span>
|
||||
|
||||
<a href="http://localhost:4000/post/first-blog/">
|
||||
<span class="post-title gt-c-content-color-first">我们开始写博客了</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="gt-post-content post-abstract gt-c-content-color-second">
|
||||
|
||||
</div>
|
||||
<div class="post-info">
|
||||
<time class="post-time gt-c-content-color-first">
|
||||
发布于 · 2021-07-05 ·
|
||||
</time>
|
||||
|
||||
<a href="http://localhost:4000/tag/vuXWknrCE/" class="post-tag">
|
||||
# blog
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="http://localhost:4000/post/first-blog/" class="post-feature-image"
|
||||
style="background-image: url('http://localhost:4000/post-images/first-blog.jpeg')">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagination-container">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="site-footer gt-c-content-color-first">
|
||||
<div class="slogan gt-c-content-color-first">做一款大家喜欢的产品,是一件很开心的事情。</div>
|
||||
<div class="social-container">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
Powered by <a href="https://hfish.io" target="_blank">HFish.io</a> |
|
||||
<a class="rss" href="http://localhost:4000/atom.xml" target="_blank">RSS</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad()
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
130
docs/blog/tags/index.html
Normal file
130
docs/blog/tags/index.html
Normal file
@ -0,0 +1,130 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<title>HFish</title>
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:4000/favicon.ico?v=1625471904515">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://localhost:4000/styles/main.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dart.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/moment@2.27.0/moment.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"></script>
|
||||
<!-- DEMO JS -->
|
||||
<!--<script src="media/scripts/index.js"></script>-->
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="main gt-bg-theme-color-first">
|
||||
<div class="main-content">
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="navbar-brand">
|
||||
<div class="site-name gt-c-content-color-first">
|
||||
HFish
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fas fa-bars gt-c-content-color-first" style="font-size: 18px"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<div class="navbar-nav mr-auto" style="text-align: center">
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/" class="menu gt-a-link">
|
||||
首页
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/archives" class="menu gt-a-link">
|
||||
归档
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/tags" class="menu gt-a-link">
|
||||
标签
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
|
||||
<a href="http://localhost:4000/post/about" class="menu gt-a-link">
|
||||
关于
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<form id="gridea-search-form" style="position: relative" data-update="1625471904515" action="/search/index.html">
|
||||
<input class="search-input" autocomplete="off" spellcheck="false" name="q" placeholder="搜索文章" />
|
||||
<i class="fas fa-search gt-c-content-color-first" style="position: absolute; top: 9px; left: 10px;"></i>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="post-container">
|
||||
<div class="post-detail gt-bg-theme-color-first">
|
||||
<article class="gt-post-content">
|
||||
<h2 class="post-title">标签</h2>
|
||||
<div class="tags-container">
|
||||
|
||||
<a class="tag gt-c-content-color-first gt-a-link"
|
||||
href="http://localhost:4000/tag/vuXWknrCE/">#blog</a>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site-footer gt-c-content-color-first">
|
||||
<div class="slogan gt-c-content-color-first">做一款大家喜欢的产品,是一件很开心的事情。</div>
|
||||
<div class="social-container">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
Powered by <a href="https://hfish.io" target="_blank">HFish.io</a> |
|
||||
<a class="rss" href="http://localhost:4000/atom.xml" target="_blank">RSS</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad()
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
11
docs/changelog.md
Normal file
11
docs/changelog.md
Normal file
@ -0,0 +1,11 @@
|
||||
- V2.5.0 2021-07-28
|
||||
|
||||
> 特别注意:只支持2.4.0及其以上的版本支持顺滑升级,其他版本需要重新进行部署安装。
|
||||
|
||||
1.新增API配置功能,支持用户对攻击IP、攻击详细信息、攻击者所使用攻击账号密码导出。
|
||||
2.新增TCP端口监听服务,支持最高对10个自定义端口的灵活监听。
|
||||
3.新增蜜罐服务的支持,单个节点,最高可添加10种蜜罐服务。
|
||||
4.新增windows开机自启动能力,防止意外关机导致的程序退出。
|
||||
5.修复告警策略中,修改配置不生效的问题 。
|
||||
6.修复数据清理时,扫描数据,攻击IP及账号资产未进行清理的问题。
|
||||
7.修复部分使用交互问题。
|
@ -1,98 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
||||
# 控制端配置
|
||||
|
||||
### 配置工作总览
|
||||
|
||||
!> 在完成控制端的部署后,我们还需要几个配置工作让整个系统运行起来。
|
||||
|
||||
```wiki
|
||||
1. 添加【蜜罐服务】,让系统获得相应蜜罐的能力。
|
||||
2. 创建【服务模板】,模板是数个蜜罐服务的集合,在大规模部署的环境中,模板可以帮我们更高效管理我们的集群。
|
||||
3. 【增加节点】,单机版自带一个节点,集群版不带节点。系统至少需要一个节点才能正常运行。
|
||||
4. 为蜜罐节点选择【服务模板】,选择了什么服务模板,蜜罐节点就具有了模板中的蜜罐能力。
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 添加蜜罐服务
|
||||
|
||||
!> 控制端运行起来后,我们需要做的第一件事情就是下载蜜罐服务。您有2种方法可以添加蜜罐服务,任选一种即可。
|
||||
|
||||
> 【服务管理】中下载蜜罐服务
|
||||
|
||||
```wiki
|
||||
1. 登陆控制端后,打开【服务管理】页面,首次登陆页面上蜜罐服务都是灰色。
|
||||
2. 选择自己需要的蜜罐服务进行下载。
|
||||
```
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616164014.png" alt="image-20210616164012531" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
> 手动上传蜜罐服务包
|
||||
|
||||
**当您处于离线环境不方便在线安装情况下,您可以使用手动上传安装的方式。**
|
||||
|
||||
```wiki
|
||||
1. 下载最新官方服务包 http://img.threatbook.cn/hfish/svc/services-<% version %>.tar.gz
|
||||
2. 在新增服务页面上选择该服务包上传。
|
||||
```
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616165216.png" alt="image-20210616165214921" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
> *上传自定义web蜜罐
|
||||
|
||||
如果您有自定义web蜜罐的需求,我们为您准备了开发样例,您可以参考我们的[文档](https://hfish.io/#/function?id=web%e8%9c%9c%e7%bd%90%e8%87%aa%e5%ae%9a%e4%b9%89%e5%bc%80%e5%8f%91)完成蜜罐的开发工作后,进行上传。
|
||||
当然您也可以在社区中寻找其它用户开发好的蜜罐上传后使用。
|
||||
|
||||
|
||||
|
||||
### 创建模板
|
||||
|
||||
!> 蜜罐服务添加完成后,我们需要创建模板,把数个蜜罐服务自由组合成为模板。当前每个模板最多支持5个蜜罐服务。
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616170818.png" alt="image-20210616170816548" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
### 增加节点
|
||||
|
||||
!> 点击增加节点,选择相应版本的【节点安装包】,确定
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616171500.png" alt="image-20210616171459269" style="zoom:50%;" />
|
||||
|
||||
```wiki
|
||||
- 如果您在上面的操作中,选择的是linux安装包,在【确定】后,会出现如下页面,您可以用两种方式让您的节点主机完成部署。
|
||||
1. 一句话脚本,直接在节点主机上运行
|
||||
2. 下载可执行文件,并把这个文件上传到节点主机上运行
|
||||
|
||||
- 如果您在上面的操作中,选择的windows安装包,在【确定】后,只有一种方式供您选择。
|
||||
1. 下载可执行文件,并把这个文件上传到节点主机上运行
|
||||
```
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616172029.png" alt="image-20210616172027825" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
### 为节点选择服务模板
|
||||
|
||||
> 展开蜜罐节点,选择上面创建的蜜罐模板
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616173018.png" alt="image-20210616173015062" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
> 刚变更模板后的蜜罐服务状态为【启用】
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616173055.png" alt="image-20210616173053947" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
> 节点正常完成模板加载后,服务状态应该为【在线】。如果是【离线】,说明蜜罐服务没有正常启动,请参考我们后面的【排错说明】,找到问题。
|
||||
|
||||
<img src="http://img.threatbook.cn/hfish/20210616173129.png" alt="image-20210616173128526" style="zoom:50%;" />
|
169
docs/deploy.md
169
docs/deploy.md
@ -1,169 +0,0 @@
|
||||
# 控制端部署
|
||||
|
||||
## Linux安装说明
|
||||
|
||||
### 一键安装脚本
|
||||
|
||||
如果您部署的环境为Linux,且可以访问互联网。我们为您准备了一键部署脚本进行安装和配置,请用root用户,运行下面的脚本。
|
||||
|
||||
```
|
||||
bash <(curl -sS -L https://hfish.io/install)
|
||||
```
|
||||
|
||||

|
||||
|
||||
> 安装并运行单机版
|
||||
|
||||
这种安装方式,在安装完成后,自动在控制端上创建一个节点,并同时把控制端进程和节点端进程启动。
|
||||
|
||||
```wiki
|
||||
#控制端所在目录
|
||||
/opt/hfish/
|
||||
|
||||
#节点端所在目录
|
||||
/opt/hfish/client
|
||||
```
|
||||
|
||||
> 安装并运行集群版
|
||||
|
||||
这种安装方式,会在安装完成后,启动控制端进程,需要我们后续完成添加节点的操作。
|
||||
|
||||
!> 控制端部署完成后,请继续参考下面的【控制端配置】完成配置
|
||||
|
||||
|
||||
|
||||
### 手动安装
|
||||
|
||||
!> 如果上述的安装脚本您无法使用,您可以尝试用手动安装完成部署。
|
||||
|
||||
到官网 https://hfish.io 下载HFish最新版本安装包,按如下步骤进行安装 (以linux64位系统为例):
|
||||
|
||||
> 第一步: 在当前目录创建一个路径解压安装包
|
||||
|
||||
```
|
||||
mkdir hfish
|
||||
```
|
||||
|
||||
> 第二步:将安装文件包解压到hfish目录下
|
||||
|
||||
```
|
||||
tar zxvf hfish-*-linux-amd64.tar.gz -C hfish
|
||||
```
|
||||
|
||||
> 第三步:请防火墙开启4433或者4434,确认返回success(如果有其他服务需要打开端口,使用相同命令打开。
|
||||
|
||||
```
|
||||
firewall-cmd --add-port=4433/tcp --permanent
|
||||
firewall-cmd --add-port=4434/tcp --permanent
|
||||
firewall-cmd --reload
|
||||
```
|
||||
|
||||
> 第四步:进入安装目录直接运行server,或者后台运行 nohup ./server &
|
||||
|
||||
```
|
||||
cd hfish
|
||||
nohup ./server &
|
||||
```
|
||||
|
||||
> 第五步:登陆web界面
|
||||
|
||||
```
|
||||
登陆链接:https:// [ip]:4433/web
|
||||
账号:admin
|
||||
密码:HFish2021
|
||||
```
|
||||
|
||||
例:如果控制端的ip是192.168.1.1,登陆链接为:https://192.168.1.1:4433/web
|
||||
|
||||
!> 控制端部署完成后,请继续参考下面的【控制端配置】完成配置
|
||||
|
||||
|
||||
|
||||
## Windows安装说明
|
||||
|
||||
> 第一步:下载HFish
|
||||
|
||||
访问我们官网的[下载页面](https://hfish.io/#/download),下载最新版的服务端并解压。
|
||||
|
||||
> 第二步:运行文件目录下的server.exe
|
||||
|
||||
server.exe为后台运行,启动后直接后台运行。
|
||||
|
||||
> 第三步:登陆web界面
|
||||
|
||||
```
|
||||
登陆链接:https:// [ip]:4433/web
|
||||
账号:admin
|
||||
密码:HFish2021
|
||||
```
|
||||
|
||||
例:如果控制端的ip是192.168.1.1,登陆链接为:https://192.168.1.1:4433/web
|
||||
|
||||
!> 控制端部署完成后,请继续参考下面的【控制端配置】完成配置
|
||||
|
||||
|
||||
|
||||
## Docker安装说明
|
||||
|
||||
Docker也是我们推荐的蜜罐交付方式。而且因为容器环境本身就有一层权限隔离的原因,合理配置过的Docker运行环境,能获得更高的业务安全性。
|
||||
|
||||
> Docker镜像的下载
|
||||
|
||||
```shell
|
||||
docker pull registry.cn-beijing.aliyuncs.com/threatbook/hfish-amd64
|
||||
```
|
||||
|
||||
> 镜像的运行
|
||||
|
||||
```shell
|
||||
docker run -d -p 4433:4433 -p 4434:4434 --name=hfish --restart=always registry.cn-beijing.aliyuncs.com/threatbook/hfish-amd64
|
||||
```
|
||||
|
||||
!> 控制端部署完成后,请继续参考下面的【控制端配置】完成配置
|
||||
|
||||
|
||||
|
||||
## 数据库切换MySQL
|
||||
|
||||
HFish系统默认使用的sqlite数据库,具体见 db/hfish.db(自带的已经初始化好的db),相关的初始化脚本见 db/sql/sqlite/V<% version %>__sqlite.sql
|
||||
|
||||
如果您想要重置 hfish.db, 可以通过下面命令生成新的 db 文件(请确保安装了sqlite3数据库)。 替换 db/hfish.db 即可。
|
||||
|
||||
```
|
||||
sqlite3 hfish.db < db/sql/sqlite/V<% version %>__sqlite.sql
|
||||
```
|
||||
|
||||
|
||||
|
||||
**sqlite数据库无需安装,使用方便,但在遭到大规模攻击,及当前版本升级时候会存在数据丢失的问题。**
|
||||
|
||||
因此,HFish同时**支持mysql**数据库,相关的初始化脚本见 db/sql/mysql/V<% version %>__mysql.sql。
|
||||
|
||||
如果您想要切换到mysql数据库,可以进行以下操作(请确认已经安装了mysql数据库,推荐5.7及以上版本)
|
||||
|
||||
> 1. 初始化数据库
|
||||
|
||||
linux环境可以在命令行执行下述命令,然后输入密码(root用户密码)。
|
||||
|
||||
```
|
||||
mysql -u root -p < db/sql/mysql/V<% version %>__mysql.sql
|
||||
```
|
||||
|
||||
windows环境可以使用远程连接工具(比如sqlyog等)导入db/sql/mysql/V<% version %>__mysql.sql 脚本。
|
||||
|
||||
|
||||
|
||||
> 2. 修改config.ini配置文件,数据库的连接方式,主要需要修改type和url,如下:
|
||||
|
||||
```
|
||||
[database]
|
||||
type = sqlite3
|
||||
max_open = 50
|
||||
max_idle = 50
|
||||
url = ./db/hfish.db?cache=shared&mode=rwc
|
||||
# type = mysql
|
||||
# url = root:HFish312@tcp(:3306)/hfish?charset=utf8&parseTime=true&loc=Local
|
||||
```
|
||||
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
### WEB蜜罐自定义开发
|
||||
|
||||
为了方便企业的定制业务,管理段提供了上传自定义web服务的内容,可根据微步在线的开发规范和原则,自己对web界面进行开发,修改,并上传,使其成为真正的蜜罐服务。
|
||||
|
||||
> 1.web蜜罐文件所在目录
|
||||
|
||||
```shell
|
||||
- index.html
|
||||
在节点client安装目录./services/service_id/root 下面
|
||||
|
||||
- 其它格式的文件
|
||||
在节点client安装目录./services/service_id/root下的所有目录都可以自行定义、上传文件,用户可以在不同目录下面上传自己的样式文件和图片。
|
||||
```
|
||||
|
||||
> 2.修改页面元素
|
||||
|
||||
根据index.html文件中的信息,替换和修改相关的文件。
|
||||
|
||||
> 3.制作全新的登陆页面
|
||||
|
||||
我们可以自己制作一个全新的登陆页面,通过替换表单元素实现“定制开发”
|
||||
|
||||
```shell
|
||||
- 删除client安装目录./services/service_id/root下所有文件后,自行上传编辑完成的html页面和相关文件
|
||||
|
||||
- 修改主页文件名为index.html
|
||||
|
||||
- 按照下面图片的要求,修改表单元素。
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 4.将修改完成的服务包进行上传,完成web服务添加
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506162036933.png" alt="image-20210506162036933" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506162100883.png" alt="image-20210506162100883" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
最后,如果您希望微步为您进行规范统一开发,请邮件发送给honeypot@threatbook.cn。
|
||||
|
@ -1,69 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Document</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="description" content="Description">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<!-- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css"> -->
|
||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
|
||||
<style type="text/css">
|
||||
.cover-main {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.cover-main .anchor span {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
section.cover.has-mask .mask {
|
||||
background-color: initial;
|
||||
opacity: .8;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav>
|
||||
<a href="https://hfish.io" target="_bank">首页</a>
|
||||
<a href="https://github.com/hacklcx/HFish/releases" target="_bank">下载</a>
|
||||
</nav>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
name: '',
|
||||
repo: '',
|
||||
loadSidebar: true,
|
||||
subMaxLevel: 2,
|
||||
// coverpage: true,
|
||||
search: {
|
||||
paths: 'auto',
|
||||
maxAge: 86400000, // 过期时间,单位毫秒,默认一天
|
||||
placeholder: '请输入搜索内容',
|
||||
noData: '找不到结果!',
|
||||
depth: 2
|
||||
//tabs: {
|
||||
// persist : true, // default
|
||||
// sync : true, // default
|
||||
// theme : 'classic', // default
|
||||
// tabComments: true, // default
|
||||
// tabHeadings: true // default
|
||||
},
|
||||
repo: 'https://github.com/hacklcx/HFish'
|
||||
}
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
|
||||
<script src="//unpkg.com/prismjs/components/prism-bash.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
@ -3,25 +3,28 @@
|
||||
### HFish v<% version %>
|
||||
|
||||
```wiki
|
||||
2021年6月16日发布
|
||||
2021年7月25日发布
|
||||
|
||||
1.新增扫描感知功能,可感知到全端口范围内的TCP、UDP、ICMP扫描,支持IPv4与IPv6。
|
||||
2.新增服务在线下载及上传功能,新版发布后,进入服务列表,即可看到最新的服务。
|
||||
3.新增多用户管理功能,支持管理员与普通用户的权限区分。
|
||||
4.修复节点多网卡导致的报错问题,每个节点最高支持50个不同ip地址。
|
||||
5.修复邮件服务器配置问题,填写发件邮箱进行邮件配置测试。
|
||||
6.修复情报页面api报错问题。
|
||||
特别注意:只支持2.4.0及其以上的版本支持顺滑升级,其他版本需要重新进行部署安装。
|
||||
|
||||
1.新增API配置功能,支持用户对攻击IP、攻击详细信息、攻击者所使用攻击账号密码导出。
|
||||
2.新增TCP端口监听服务,支持最高对10个自定义端口的灵活监听。
|
||||
3.新增蜜罐服务的支持,单个节点,最高可添加10种蜜罐服务。
|
||||
4.新增windows开机自启动能力,防止意外关机导致的程序退出。
|
||||
5.修复告警策略中,修改配置不生效的问题 。
|
||||
6.修复数据清理时,扫描数据,攻击IP及账号资产未进行清理的问题。
|
||||
7.修复部分使用交互问题。
|
||||
```
|
||||
|
||||
!> 注意:如果当前使用 sqlite 数据库的话,升级时,hfish.db 文件将会被覆盖,导致之前的攻击记录丢失,请注意进行备份。如果要将之前的 db 文件导入当前版本时,请参考 mysql.sql 的语句修改 db 文件,执行导入。
|
||||
|
||||
|
||||
## 下载安装
|
||||
|
||||
### 控制端安装包
|
||||
|
||||
- [HFish-Linux-amd64](http://hfish.cn-bj.ufileos.com/hfish-<% version %>-linux-amd64.tar.gz) 为 Linux x86 架构 64 位系统使用
|
||||
- [HFish-Windows-amd64](http://hfish.cn-bj.ufileos.com/hfish-<% version %>-windows-amd64.tar.gz) 为 Windows x86 架构 64 位系统使用
|
||||
- [HFish-Linux-arm64](http://hfish.cn-bj.ufileos.com/hfish-<% version %>-linux-arm64.tar.gz) 为 Linux Arm 架构 64 位系统使用,常见于 NAS、路由器、树莓派等……
|
||||
- [HFish-Linux-amd64](https://hfish.cn-bj.ufileos.com/hfish-<% version %>-linux-amd64.tar.gz) 为 Linux x86 架构 64 位系统使用
|
||||
- [HFish-Windows-amd64](https://hfish.cn-bj.ufileos.com/hfish-<% version %>-windows-amd64.tar.gz) 为 Windows x86 架构 64 位系统使用
|
||||
- [HFish-Linux-arm64](https://hfish.cn-bj.ufileos.com/hfish-2.5.0-linux-arm64.tar.gz) 为 Linux Arm 架构 64 位系统使用,常见于 NAS、路由器、树莓派等……
|
||||
|
||||
## 文件结构
|
||||
|
||||
|
15
docs/download/hfish-last-version
Normal file
15
docs/download/hfish-last-version
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"version":"2.5.0",
|
||||
"date":"2021-07-28",
|
||||
"desc":[
|
||||
|
||||
"特别注意:只支持2.4.0及其以上的版本支持顺滑升级,其他版本需要重新进行部署安装。",
|
||||
"1.新增API配置功能,支持用户对攻击IP、攻击详细信息、攻击者所使用攻击账号密码导出。",
|
||||
"2.新增TCP端口监听服务,支持最高对10个自定义端口的灵活监听。",
|
||||
"3.新增蜜罐服务的支持,单个节点,最高可添加10种蜜罐服务。",
|
||||
"4.新增windows开机自启动能力,防止意外关机导致的程序退出。",
|
||||
"5.修复告警策略中,修改配置不生效的问题 。",
|
||||
"6.修复数据清理时,扫描数据,攻击IP及账号资产未进行清理的问题。",
|
||||
"7.修复部分使用交互问题。"
|
||||
]
|
||||
}
|
15
docs/download/hfish-test-version
Normal file
15
docs/download/hfish-test-version
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"version":"2.5.0",
|
||||
"date":"2021-07-28",
|
||||
"desc":[
|
||||
|
||||
"特别注意:只支持2.4.0及其以上的版本支持顺滑升级,其他版本需要重新进行部署安装。",
|
||||
"1.新增API配置功能,支持用户对攻击IP、攻击详细信息、攻击者所使用攻击账号密码导出。",
|
||||
"2.新增TCP端口监听服务,支持最高对10个自定义端口的灵活监听。",
|
||||
"3.新增蜜罐服务的支持,单个节点,最高可添加10种蜜罐服务。",
|
||||
"4.新增windows开机自启动能力,防止意外关机导致的程序退出。",
|
||||
"5.修复告警策略中,修改配置不生效的问题 。",
|
||||
"6.修复数据清理时,扫描数据,攻击IP及账号资产未进行清理的问题。",
|
||||
"7.修复部分使用交互问题。"
|
||||
]
|
||||
}
|
114
docs/function.md
114
docs/function.md
@ -1,114 +0,0 @@
|
||||
# 功能说明
|
||||
|
||||
### 账号资产
|
||||
|
||||
> 用户名密码页面收集了所有被用来攻击的账号密码,可以对企业账号资产有效监控
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506152344041.png" alt="image-20210506152344041" style="zoom:50%;" />
|
||||
|
||||
> 为辅助企业进行内部账号监控,设定高级监测策略,建议输入企业的邮箱、员工姓名、企业名称等信息进行监控,从而随时监控泄漏情况
|
||||
|
||||
1.点击界面右上角查看高级监测策略
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210401150526485.png" alt="image-20210401150526485" style="zoom: 50%;" />
|
||||
|
||||
2.按照规则要求,导入csv文件。
|
||||
|
||||
**注意!务必按照提示规则进行写入**
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506153037454.png" alt="image-20210506153037454" style="zoom:33%;" />
|
||||
|
||||
3.页面可查看到所有匹配高级监测策略的数据,从而帮助运维人员精准排查泄漏账号,实现企业账号资产安全防护。
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506153041469.png" alt="image-20210506153041469" style="zoom:50%;" />
|
||||
|
||||
### 主机失陷检测
|
||||
|
||||
失陷蜜饵是部署在业务主机上的失陷检测蜜饵。在主机失陷情况下,通过部署虚假的账号、本地证书等失陷蜜饵,诱导攻击者转移攻击目标,并触发失陷告警。
|
||||
|
||||
其中,主机蜜饵是一种基于部署虚假的账号密码配置文件,诱导转移攻击者攻击目标的防御手段。
|
||||
|
||||
命令在主机运行后,会在本地生成一份虚假的“账号密码备份文件”。 当该主机被攻陷时,攻击者将被诱导,使用文件中的账号信息进行登录。借此,安全人员发现主机失陷情况。
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506162347469.png" alt="image-20210506162347469" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### 恶意IP
|
||||
|
||||
> 恶意IP页面将监控所有攻击IP的相关信息,包括微步情报及企业自定义情报。
|
||||
>
|
||||
> 另外,所有的溯源信息,最终都会呈现在恶意IP页面,并成为企业的私有情报库。
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
### 自定义蜜罐传输协议
|
||||
|
||||
针对Web应用仿真、网络设备服务、安全设备服务以及IOT服务,可以根据自身业务场景和网络情况,选择其具体的传输协议(HTTP或者HTTPS),从而让蜜罐更符合当前网络结构,更好吸引攻击者视线。
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506155628363.png" alt="image-20210506155628363" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
### WEB蜜罐自定义开发
|
||||
|
||||
|
||||
|
||||
为了方便企业的定制业务,管理段提供了上传自定义web服务的内容,可根据微步在线的开发规范和原则,自己对web界面进行开发,修改,并上传,使其成为真正的蜜罐服务。
|
||||
|
||||
我们为大家准备了一个样例,请先下载我们的web模板样例。
|
||||
|
||||
http://threatbook-user-img.cn-bj.ufileos.com/hfish/svc/web-demo.zip
|
||||
|
||||
|
||||
|
||||
> 1.web蜜罐文件所在目录
|
||||
|
||||
```shell
|
||||
- index.html
|
||||
在节点client安装目录./services/service_id/root 下面
|
||||
|
||||
- 其它格式的文件
|
||||
在节点client安装目录./services/service_id/root下的所有目录都可以自行定义、上传文件,用户可以在不同目录下面上传自己的样式文件和图片。
|
||||
```
|
||||
|
||||
> 2.修改页面元素
|
||||
|
||||
根据index.html文件中的信息,替换和修改相关的文件。
|
||||
|
||||
> 3.制作全新的登陆页面
|
||||
|
||||
我们可以自己制作一个全新的登陆页面,通过替换表单元素实现“定制开发”
|
||||
|
||||
```shell
|
||||
- 删除client安装目录./services/service_id/root下所有文件后,自行上传编辑完成的html页面和相关文件
|
||||
|
||||
- 修改主页文件名为index.html
|
||||
|
||||
- 按照下面图片的要求,修改表单元素。
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 4.将修改完成的服务包进行上传,完成web服务添加
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506162036933.png" alt="image-20210506162036933" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210506162100883.png" alt="image-20210506162100883" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
最后,如果您希望微步为您进行规范统一开发,请邮件发送给honeypot@threatbook.cn。
|
||||
|
@ -63,7 +63,7 @@
|
||||
themeColor: '#e93636',
|
||||
dv: {
|
||||
model: {
|
||||
version: '2.4.1',
|
||||
version: '2.5.0',
|
||||
}
|
||||
},
|
||||
search: {
|
||||
@ -73,13 +73,22 @@
|
||||
noData: '找不到结果!',
|
||||
depth: 2
|
||||
},
|
||||
tabs: {
|
||||
persist : true, // 刷新后是否同步状态
|
||||
sync : true, // 如果有多个选项卡是否同步变化
|
||||
theme : 'classic', // default
|
||||
tabComments: true, // default
|
||||
tabHeadings: true // default
|
||||
}
|
||||
// repo: 'https://github.com/hacklcx/HFish',
|
||||
}
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/yklydxtt/docsify-version@2.0.1/dv.min.js"></script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
|
||||
<script src="//unpkg.com/prismjs/components/prism-bash.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-markdown.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
128
docs/install.sh
Normal file
128
docs/install.sh
Normal file
@ -0,0 +1,128 @@
|
||||
#!/bin/bash
|
||||
|
||||
#初始化
|
||||
initVar() {
|
||||
installType='yum -y install'
|
||||
removeType='yum -y remove'
|
||||
upgrade="yum -y update"
|
||||
echoType='echo -e'
|
||||
}
|
||||
initVar
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
#字体颜色
|
||||
echoContent() {
|
||||
case $1 in
|
||||
# 红色
|
||||
"red")
|
||||
# shellcheck disable=SC2154
|
||||
${echoType} "\033[31m${printN}$2 \033[0m"
|
||||
;;
|
||||
# 天蓝色
|
||||
"skyBlue")
|
||||
${echoType} "\033[1;36m${printN}$2 \033[0m"
|
||||
;;
|
||||
# 绿色
|
||||
"green")
|
||||
${echoType} "\033[32m${printN}$2 \033[0m"
|
||||
;;
|
||||
# 白色
|
||||
"white")
|
||||
${echoType} "\033[37m${printN}$2 \033[0m"
|
||||
;;
|
||||
"magenta")
|
||||
${echoType} "\033[31m${printN}$2 \033[0m"
|
||||
;;
|
||||
# 黄色
|
||||
"yellow")
|
||||
${echoType} "\033[33m${printN}$2 \033[0m"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
cd /opt
|
||||
|
||||
#首页菜单
|
||||
menu() {
|
||||
echoContent red "\n==============================================================\n"
|
||||
echoContent green "当前版本:v2.4.2"
|
||||
echoContent green "HFish官网 https://hfish.io "
|
||||
echoContent red "\n==============================================================\n"
|
||||
echoContent skyBlue "-------------------------安装部署-----------------------------\n"
|
||||
echoContent yellow "1.安装并运行HFish单机版"
|
||||
echoContent yellow "2.安装并运行HFish集群版控制端"
|
||||
echoContent yellow "3.退出安装"
|
||||
# echoContent yellow "4.用Docker运行HFish控制端"
|
||||
# echoContent skyBlue "\n-------------------------配置管理-----------------------------\n"
|
||||
# echoContent yellow "5.防火墙放通控制端端口(coming soon)"
|
||||
# echoContent yellow "6.将HFish添加为系统服务(coming soon)"
|
||||
# echoContent yellow "7.将控制端数据库替换为MariaDB(coming soon)"
|
||||
# echoContent skyBlue "\n-------------------------运维管理-----------------------------\n"
|
||||
# echoContent yellow "8.将错误日志反馈给开发者(coming soon)"
|
||||
# echoContent yellow "9.卸载HFish(coming soon)"
|
||||
echoContent red "\n=============================================================="
|
||||
|
||||
read -r -p "请选择:" selectMenuType
|
||||
case ${selectMenuType} in
|
||||
1):
|
||||
standaloneInstall
|
||||
;;
|
||||
2):
|
||||
serverInstall
|
||||
;;
|
||||
3)
|
||||
exitInstall
|
||||
;;
|
||||
*)
|
||||
echoContent red ' ---> 选择错误,重新选择'
|
||||
selectMenuType
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
standaloneInstall(){
|
||||
if [ $(uname -s) = 'Linux' ] && [ $(uname -m) = 'x86_64' ] && [ $(getconf LONG_BIT) = '64' ]; then
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-standalone-2.4.2-linux-amd64.tar.gz
|
||||
elif [ $(uname -m) = 'aarch64' ] && [ $(getconf LONG_BIT) = '64' ]; then
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-standalone-2.4.2-linux-arm64.tar.gz
|
||||
else
|
||||
echoContent red "未检测到系统版本,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1
|
||||
fi
|
||||
|
||||
tar -zxvf hfish-standalone*.tar.gz
|
||||
cd /opt/hfish && nohup ./server &
|
||||
sleep 2
|
||||
cd /opt/hfish/client && nohup ./client &
|
||||
}
|
||||
|
||||
serverInstall() {
|
||||
if [ $(uname -s) = 'Linux' ] && [ $(uname -m) = 'x86_64' ] && [ $(getconf LONG_BIT) = '64' ]; then
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.2-linux-amd64.tar.gz
|
||||
elif [ $(uname -m) = 'aarch64' ] && [ $(getconf LONG_BIT) = '64' ]; then
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.2-linux-arm64.tar.gz
|
||||
else
|
||||
echoContent red "未检测到系统版本,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1
|
||||
fi
|
||||
|
||||
mkdir -p hfish
|
||||
tar -zxvf hfish*.tar.gz -C hfish
|
||||
cd hfish
|
||||
nohup ./server &
|
||||
}
|
||||
|
||||
exitInstall() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# selectServiceInstall() {
|
||||
# if [ -d "/opt/hfish/packages" ]; then
|
||||
# cd /opt/hfish/packages
|
||||
# wget http://img.threatbook.cn/hfish/svc/services-2.4.0.tar.gz
|
||||
# tar zxvf services*.tar.gz
|
||||
# rm -f services-2.4.0.tar.gz
|
||||
# else
|
||||
# echoContent red "未检测到安装目录,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1
|
||||
# fi
|
||||
# }
|
||||
|
||||
menu
|
3
docs/known.md
Normal file
3
docs/known.md
Normal file
@ -0,0 +1,3 @@
|
||||
- 待更新
|
||||
|
||||
……
|
100
docs/setting.md
100
docs/setting.md
@ -1,100 +0,0 @@
|
||||
# 服务端配置
|
||||
|
||||
### 告警策略
|
||||
|
||||
|
||||
|
||||
> 添加一个新的策略
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 对策略进行配置
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
> 通知当前分为威胁告警和系统通知两种类型
|
||||
|
||||
威胁告警是系统感知攻击时的告警;系统通知是系统自身运行状态的告警。
|
||||
|
||||
|
||||
|
||||
> 在设置通知方式前,您应该先完成了前边的通知配置
|
||||
|
||||
如果您完成了通知配置,那么这里三种不同的通知方式中就会出现您之前的配置,勾选即可。
|
||||
|
||||
> 对接精准的云端的威胁情报后,可以对攻击行为进行更准的研判,帮助我们更科学的进行处置。
|
||||
|
||||
对接了威胁情报后,当HFish捕获到了来自外网的攻击行为后,我们可以在攻击列表中了解攻击者的IP情报。HFish会把您在云端查询到的情报在本地缓存7天,保持您攻击情报时效性的同时,节省您的查询次数。
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210318220204897.png" alt="image-20210318220204897" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
我们支持对接两种来自微步在线的威胁情报
|
||||
|
||||
> 对接微步在线云API(IP信誉接口)
|
||||
|
||||
关于该接口完整的说明,可以参考[微步在线云API文档](https://x.threatbook.cn/nodev4/vb4/API)
|
||||
|
||||
本接口在注册后可以获得每日50条云端情报的查询额度,给微步发送扩容邮件后,可以提升到每日200条的额度。详情访问[微步在线X社区](https://x.threatbook.cn/nodev4/vb4/article?threatInfoID=3101)。
|
||||
|
||||
如果有企业化需求,可以邮件 honeypot@threatbook.cn
|
||||
|
||||
|
||||
|
||||
> 对接TIP的本地情报,您可以跟据页面的描述进行注册和使用。
|
||||
|
||||
使用该接口需要购买微步在线的TIP本地情报系统
|
||||
|
||||

|
||||
|
||||
> 通知功能是蜜罐的核心功能之一
|
||||
|
||||
对于蜜罐捕获到的信息,跟据您不同的安全运营流程,您可能需要把该信息第一时间通知其它的安全设备,也可能需要把该信息通知给相关的安全运营人员。HFish用三种方式满足您的需求。
|
||||
|
||||
- Syslog通知
|
||||
- 邮件通知
|
||||
- Webhook通知
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210318215610629.png" alt="image-20210318215610629" style="zoom:50%;" />
|
||||
|
||||
> 用 Syslog 联动其它安全设备
|
||||
|
||||
您可以自定义接受通知设备的地址、协议和端口,用来接受OneFish捕获的攻击信息和报警。HFish最多支持5路syslog进行通知。
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210318215642971.png" alt="image-20210318215642971" style="zoom:50%;" />
|
||||
|
||||
> 用邮件通知相关安全人员
|
||||
|
||||
您可以通过配置相关的邮件服务器信息,来接受OneFish的通知和报警。
|
||||
|
||||
<img src="https://hfish.cn-bj.ufileos.com/images/image-20210318215718987.png" alt="image-20210318215718987" style="zoom:50%;" />
|
||||
|
||||
> Webhook通知其它设备/人
|
||||
|
||||
很多的场景下我们都可以方便的使用webhook联动人或者设备。
|
||||
|
||||
- 对于当前企业办公中最为流行的3大即时通讯软件企业微信、钉钉、飞书的机器人,我们也做了适配,您在IM中建立一个机器人,把机器人的token复制到OneFish的webhook配置中,就可以第一时间在IM中获取蜜罐捕获的攻击告警了。
|
||||
- 三家IM的官方文档如下,您可以对照进行参考
|
||||
|
||||
```wiki
|
||||
- 企业微信官方文档
|
||||
|
||||
https://work.weixin.qq.com/help?doc_id=13376#%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E7%BE%A4%E6%9C%BA%E5%99%A8%E4%BA%BA
|
||||
|
||||
- 钉钉官方文档
|
||||
|
||||
https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq
|
||||
|
||||
- 飞书官方文档
|
||||
https://www.feishu.cn/hc/zh-CN/articles/360040553973
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
docs/static/version
vendored
4
docs/static/version
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"version":"2.4.0",
|
||||
"date":"2021-06-11",
|
||||
"version":"2.4.2",
|
||||
"date":"2021-06-25",
|
||||
"desc":[
|
||||
"1.新增扫描感知功能,可感知到全端口范围内的TCP、UDP、ICMP扫描,支持IPv4与IPv6。",
|
||||
"2.新增服务在线下载及上传功能,新版发布后,进入服务列表,即可看到最新的服务。",
|
||||
|
95
docs/uninstall.md
Normal file
95
docs/uninstall.md
Normal file
@ -0,0 +1,95 @@
|
||||
# 卸载蜜罐的流程
|
||||
|
||||
> 卸载server端
|
||||
|
||||
1. 退出server进程
|
||||
|
||||
```shell
|
||||
# 结束./server 进程
|
||||
root@HFish~$ ps aux | grep server
|
||||
root 8435 0.2 10.2 997804 188176 ? Sl Mar23 23:54 ./server
|
||||
|
||||
root@HFish:~$ kill 8435
|
||||
```
|
||||
|
||||
2. 删除server文件夹
|
||||
|
||||
```shell
|
||||
# 默认情况下 OneFish 统一被部署到/opt/onefish目标,删除即可
|
||||
root@HFish~$ rm -rf /opt/onefish
|
||||
```
|
||||
|
||||
3. 清理数据库
|
||||
|
||||
```shell
|
||||
#删除 OneFish 数据库
|
||||
root@HFish:~$ mysql -h127.0.0.1 -uroot -p
|
||||
Enter password:*******(默认为OneFish210!)
|
||||
mysql> DROP DATABASE onefish;
|
||||
|
||||
# 停止 MySQL 服务
|
||||
root@HFish:~$ systemctl stop mysqld
|
||||
root@HFish:~$ systemctl disable mysqld
|
||||
```
|
||||
|
||||
4. 还原SSH和Firewall配置
|
||||
|
||||
```shell
|
||||
# 删除SSH config内对于访问来源的限制
|
||||
root@HFish~$ vi /etc/ssh/sshd_config
|
||||
删除 AllowUsers root@xxx 这行
|
||||
|
||||
# 重启 SSH 服务
|
||||
root@HFish~$ systemctl restart sshd
|
||||
|
||||
# 清除Firewall服务的规则
|
||||
root@HFish~$ firewall-cmd --permanent --list-all | grep ports | head -n 1 | \
|
||||
cut -d: -f2 | tr ' ' '\n' | xargs -I {} firewall-cmd --permanent --remove-port={}
|
||||
|
||||
# 重启 Firewall 服务
|
||||
root@HFish~$ systemctl restart firewalld
|
||||
```
|
||||
|
||||
|
||||
|
||||
> 卸载节点端
|
||||
|
||||
1. 退出client进程
|
||||
|
||||
```shell
|
||||
# 结束./client 进程
|
||||
root@HFish~$ ps aux | grep client
|
||||
root 1012 0.2 10.2 997804 188176 ? Sl Mar23 23:54 ./client
|
||||
|
||||
root@HFish:~$ kill -8 1012
|
||||
```
|
||||
|
||||
2. 删除client文件夹
|
||||
|
||||
```shell
|
||||
# 默认情况下 OneFish 统一被部署到/opt/onefish目标,删除即可
|
||||
root@HFish~$ rm -rf /opt/onefish
|
||||
```
|
||||
|
||||
3. 还原SSH和Firewall配置
|
||||
|
||||
```shell
|
||||
# 还原默认 SSH 端口
|
||||
root@HFish~$ vi /etc/ssh/sshd_config
|
||||
- 把 Port 22122 注释掉或修改为默认的22
|
||||
|
||||
# 删除 SSH config 内对于访问来源的限制
|
||||
root@HFish~$ vi /etc/ssh/sshd_config
|
||||
删除 AllowUsers root@xxx 这行
|
||||
|
||||
# 重启 SSH 服务
|
||||
root@HFish~$ systemctl restart sshd
|
||||
|
||||
# 清除Firewall服务的规则
|
||||
root@HFish~$ firewall-cmd --permanent --list-all | grep ports | head -n 1 | \
|
||||
cut -d: -f2 | tr ' ' '\n' | xargs -I {} firewall-cmd --permanent --remove-port={}
|
||||
|
||||
# 重启 Firewall 服务
|
||||
root@HFish~$ systemctl restart firewalld
|
||||
```
|
||||
|
45
install
45
install
@ -45,15 +45,14 @@ cd /opt
|
||||
#首页菜单
|
||||
menu() {
|
||||
echoContent red "\n==============================================================\n"
|
||||
echoContent green "当前版本:v2.4.0"
|
||||
echoContent green "当前版本:v2.4.2"
|
||||
echoContent green "HFish官网 https://hfish.io "
|
||||
echoContent red "\n==============================================================\n"
|
||||
echoContent skyBlue "-------------------------安装部署-----------------------------\n"
|
||||
echoContent yellow "1.安装并运行HFish单机版"
|
||||
echoContent yellow "2.安装并运行HFish集群版控制端"
|
||||
echoContent yellow "3.用Docker运行HFish控制端"
|
||||
echoContent yellow "4.补充不同架构蜜罐服务包"
|
||||
|
||||
echoContent yellow "3.退出安装"
|
||||
# echoContent yellow "4.用Docker运行HFish控制端"
|
||||
# echoContent skyBlue "\n-------------------------配置管理-----------------------------\n"
|
||||
# echoContent yellow "5.防火墙放通控制端端口(coming soon)"
|
||||
# echoContent yellow "6.将HFish添加为系统服务(coming soon)"
|
||||
@ -71,8 +70,8 @@ menu() {
|
||||
2):
|
||||
serverInstall
|
||||
;;
|
||||
4)
|
||||
selectServiceInstall
|
||||
3)
|
||||
exitInstall
|
||||
;;
|
||||
*)
|
||||
echoContent red ' ---> 选择错误,重新选择'
|
||||
@ -83,14 +82,14 @@ menu() {
|
||||
|
||||
standaloneInstall(){
|
||||
if [ $(uname -s) = 'Linux' ] && [ $(uname -m) = 'x86_64' ] && [ $(getconf LONG_BIT) = '64' ]; then
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/standalone-2.4.0-linux-amd64.tar.gz
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-standalone-2.4.2-linux-amd64.tar.gz
|
||||
elif [ $(uname -m) = 'aarch64' ] && [ $(getconf LONG_BIT) = '64' ]; then
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/standalone-2.4.0-linux-arm64.tar.gz
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-standalone-2.4.2-linux-arm64.tar.gz
|
||||
else
|
||||
echoContent red "未检测到系统版本,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1
|
||||
fi
|
||||
|
||||
tar -zxvf standalone*.tar.gz
|
||||
tar -zxvf hfish-standalone*.tar.gz
|
||||
cd /opt/hfish && nohup ./server &
|
||||
sleep 2
|
||||
cd /opt/hfish/client && nohup ./client &
|
||||
@ -98,28 +97,32 @@ standaloneInstall(){
|
||||
|
||||
serverInstall() {
|
||||
if [ $(uname -s) = 'Linux' ] && [ $(uname -m) = 'x86_64' ] && [ $(getconf LONG_BIT) = '64' ]; then
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.0-linux-amd64.tar.gz
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.2-linux-amd64.tar.gz
|
||||
elif [ $(uname -m) = 'aarch64' ] && [ $(getconf LONG_BIT) = '64' ]; then
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.0-linux-arm64.tar.gz
|
||||
wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.2-linux-arm64.tar.gz
|
||||
else
|
||||
echoContent red "未检测到系统版本,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1
|
||||
fi
|
||||
|
||||
mkdir -p hfish
|
||||
tar -zxvf hfish*.tar.gz -C hfish
|
||||
cd hfish
|
||||
nohup ./server &
|
||||
}
|
||||
|
||||
|
||||
selectServiceInstall() {
|
||||
if [ -d "/opt/hfish/packages" ]; then
|
||||
cd /opt/hfish/packages
|
||||
wget http://img.threatbook.cn/hfish/svc/services-2.4.0.tar.gz
|
||||
tar zxvf services*.tar.gz
|
||||
rm -f services-2.4.0.tar.gz
|
||||
else
|
||||
echoContent red "未检测到安装目录,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1
|
||||
fi
|
||||
exitInstall() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# selectServiceInstall() {
|
||||
# if [ -d "/opt/hfish/packages" ]; then
|
||||
# cd /opt/hfish/packages
|
||||
# wget http://img.threatbook.cn/hfish/svc/services-2.4.0.tar.gz
|
||||
# tar zxvf services*.tar.gz
|
||||
# rm -f services-2.4.0.tar.gz
|
||||
# else
|
||||
# echoContent red "未检测到安装目录,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1
|
||||
# fi
|
||||
# }
|
||||
|
||||
menu
|
10
readme.md
10
readme.md
@ -9,7 +9,9 @@
|
||||
<p align="center">HFish是一款安全、简单可信赖的跨平台蜜罐软件,允许商业和个人用户免费使用。</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://hfish.io/docs/#/" target="_bank">官网</a>
|
||||
<a href="https://hfish.io/" target="_bank">官网</a>
|
||||
<span>|</span>
|
||||
<a href="https://hfish.io/#/" target="_bank">使用手册</a>
|
||||
<span>|</span>
|
||||
<a href="https://github.com/hacklcx/HFish" target="_bank">Github</a>
|
||||
<span>|</span>
|
||||
@ -18,6 +20,8 @@
|
||||
<a href="https://hfish.io/docs/#/download" target="_bank">下载部署</a>
|
||||
</p>
|
||||
|
||||
## 二维码
|
||||
|
||||
## 特点
|
||||
|
||||
+ 安全可靠:主打低中交互蜜罐,简单有效;
|
||||
@ -31,7 +35,7 @@
|
||||
|
||||
|
||||
|
||||
## 链接
|
||||
## 快速开始
|
||||
|
||||
[官方网站](https://hfish.io/):更多使用蜜罐、使用场景和玩法详见官网
|
||||
|
||||
@ -147,6 +151,8 @@ HFish由控制端和节点端组成,控制端用来生成和管理节点端,
|
||||
|
||||

|
||||
|
||||
## 致谢
|
||||
|
||||
## wx群
|
||||
|
||||
如何大家有更多的建议希望能够更便捷的交流,可以添加我们的wx群。
|
||||
|
Loading…
Reference in New Issue
Block a user