hbit 信息收集工具使用简要指南 Kali Linux

发布于:2025-05-16 ⋅ 阅读:(11) ⋅ 点赞:(0)

前言:在 Kali Linux 系统中,使用 Docker 快速部署并运行 hbit 子域名信息收集工具

GitHub - alwaystest18/hbit一款用于安全测试中信息收集的自动化工具. Contribute to alwaystest18/hbit development by creating an account on GitHub.https://github.com/alwaystest18/hbit

任务一 更新安装Docker

apt update && apt install docker.io

任务二 启动Docker 

systemctl start docker


 

任务三 拉取镜像 

docker pull registry.cn-hangzhou.aliyuncs.com/dhub18/hbit:latest

 任务四 下载-添加文件

git clone https://github.com/alwaystest18/hbit

domain.txt(目标域名列表)
路径:/root/Desktop/hbit-master/domain.txt
内容示例(每行一个一级域名):

baidu.com
test.cn
provider-config.yaml(API 配置,可选但推荐)
路径:/root/Desktop/hbit-master/provider-config.yaml
内容格式如下:

yaml
fofa:
  - 你的邮箱:你的FOFA_API_KEY
zoomeyeapi:
  - 你的ZOOMEYE_API_KEY

任务五 运行开始扫描 

docker run -it --rm \
  -v /root/Desktop/hbit-master:/tools/hbit \
  -v /root/Desktop/hbit-master/domain.txt:/tools/hbit/domain.txt \
  -v /root/Desktop/hbit-master/provider-config.yaml:/root/.config/subfinder/provider-config.yaml \
  registry.cn-hangzhou.aliyuncs.com/dhub18/hbit:latest \
  /bin/bash -c "cd /tools/hbit && ./hbit -df domain.txt"
可能遇到的错误 /bin/bash: ./hbit: No such file or directory
目录下只有 hbit.go 源码,而没有可执行文件 hbit,说明还没有编译过
# 安装 Go
apt update && apt install golang -y

export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

#使用国内代理

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct

#编译

go clean -modcache
go build -o hbit hbit.go

nano /root/Desktop/hbit-master/config/config.yaml

替换内容:

shuffledns:
  ShufflednsPath: "/root/Desktop/hbit-master/shuffledns/shuffledns"
  ResolversFile: "/root/Desktop/hbit-master/dnsVerifier/resolvers.txt"
  TrustResolversFile: "/root/Desktop/hbit-master/trustDns"
  BigWordListFile: "/root/Desktop/hbit-master/dict/domain_20000"
  SmallWordListFile: "/root/Desktop/hbit-master/dict/small_domain_dict"
  RateLimit: 10000
  RunAsRoot: true

./hbit -df domain.txt 

任务六  资产


网站公告

今日签到

点亮在社区的每一天
去签到