确认某个 ip:port 是否托管了 Empire。未来将支持其他 C2。
# Direct single query
❯❯ bothan -v localhost:8080
DEBU[2020-01-19T20:25:02-05:00] Requesting... host="localhost:8080"
INFO[2020-01-19T20:25:02-05:00] SUCCESS host="http://localhost:8080" tool=empire
# Take a pre-existing list of host:port lines
❯❯ bothan -v -f hostslist.txt
DEBU[2020-01-19T20:25:10-05:00] Requesting... host="localhost:8080"
INFO[2020-01-19T20:25:10-05:00] SUCCESS host="http://localhost:8080" tool=empire
# Take Stdin
❯❯ cat masscan.oD.txt | jq -r '. | "\(.ip):\(.port)"' | bothan -f -
ERRO[2020-01-19T20:25:25-05:00] Get https://1.1.1.1:53: EOF host="1.1.1.1:53"
INFO[2020-01-19T20:25:25-05:00] SUCCESS host="http://192.168.1.199:8080" tool=empire
# For masscan specifically, there's an option to parse its -oD json output format
❯❯ masscan 192.168.1.0/24 -p 8080 -oD - | bothan --masscan -f -
INFO[2020-01-19T20:25:31-05:00] SUCCESS host="http://192.168.1.199:8080" tool=empire
成功的结果写入 Stdout,所有其他日志写入 Stderr。
go get github.com/audibleblink/bothan
gomakemakebin
├── 386
│ ├── bothan.darwin
│ ├── bothan.linux
│ └── bothan.windows.exe
├── amd64
│ ├── bothan.darwin
│ ├── bothan.linux
│ └── bothan.windows.exe
├── arm
│ └── bothan.linux
└── arm64
└── bothan.linux
4 directories, 8 files
在开发此工具进行测试时,我最初以默认状态运行 Empire,然后进行自定义。之后,我依赖公开威胁情报源列出的服务器进行测试;大约 100 台。
其中 98 台被识别为 Empire。一台只是超时,另一台看起来经过大量修改。
也就是说,我并没有一个我认为具有统计意义的样本集来进行测试,所以如果你遇到任何误报/漏报,请报告。