
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
go を用意するmake を用意するmake と入力するbin
├── 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 と識別されました。1 件はタイムアウトしただけで、もう 1 件は大幅に改変されているように見えました。
つまり、統計的に有意と言えるテスト用サンプルセットがあったわけではありません。そのため、遭遇した誤検知・誤検出(false positives / false negatives)があれば報告してください。