Skip to content

Commit 1d4656c

Browse files
committed
Add Go domain-posture CLI with concurrent DNS/security reconnaissance
1 parent 0602286 commit 1d4656c

6 files changed

Lines changed: 530 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Use this to evaluate whether a domain is truly fronted by Cloudflare and identif
8181
| `cloudflare-detector.py` | Cloudflare signal analysis and origin exposure hints | CDN/WAF bypass investigations |
8282
| `domain_security_report.py` | Aggregated reporting workflows | Scheduled reporting and analyst summaries |
8383
| `qa_check.sh` | Local quality checks for repo scripts | Safe pre-commit validation |
84+
| `tools/domain-posture-go/domain-posture` | Multi-threaded DNS and TLS posture reconnaissance with headers, redirect, cert expiry, security.txt, and WHOIS age | Batch triage and JSON pipeline ingestion |
8485

8586
---
8687

tools/domain-posture-go/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# domain-posture (Go)
2+
3+
`domain-posture` performs multi-threaded DNS and security posture reconnaissance for one or more domains.
4+
5+
## Features
6+
7+
- Single-domain mode (`--domain`)
8+
- File input mode (`--file`, newline-delimited)
9+
- Worker pool concurrency (`--concurrency`, default `10`)
10+
- Per-domain timeout protection (8 seconds)
11+
- DNS resolution (`A` and `AAAA`)
12+
- HTTPS reachability and redirect target capture
13+
- `/.well-known/security.txt` status check
14+
- Security header capture:
15+
- `Strict-Transport-Security`
16+
- `Content-Security-Policy`
17+
- `X-Frame-Options`
18+
- TLS certificate expiry and days remaining
19+
- WHOIS creation date extraction and domain age (days)
20+
- Human-readable table output (default)
21+
- JSON output (`--json`)
22+
23+
## Build
24+
25+
```bash
26+
cd tools/domain-posture-go
27+
./build.sh
28+
```
29+
30+
## Usage
31+
32+
```bash
33+
# Single domain
34+
./domain-posture --domain example.com
35+
36+
# Batch from file
37+
./domain-posture --file domains.txt --concurrency 20
38+
39+
# JSON output
40+
./domain-posture --file domains.txt --json
41+
```
42+
43+
## Notes
44+
45+
- WHOIS parsing can vary by registrar format. When date parsing fails, the error is reported in the row without stopping the whole batch.
46+
- Output errors are per-domain and non-fatal to the overall run.

tools/domain-posture-go/build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
cd "$(dirname "$0")"
5+
6+
echo "Building domain-posture for Linux amd64"
7+
GOOS=linux GOARCH=amd64 go build -o domain-posture main.go
8+
9+
echo "Building domain-posture.exe for Windows amd64"
10+
GOOS=windows GOARCH=amd64 go build -o domain-posture.exe main.go
11+
12+
echo "Done"

tools/domain-posture-go/go.mod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module domain-posture-go
2+
3+
go 1.22
4+
5+
require github.com/likexian/whois v1.15.6
6+
7+
require golang.org/x/net v0.35.0 // indirect

tools/domain-posture-go/go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
github.com/likexian/gokit v0.25.15 h1:QjospM1eXhdMMHwZRpMKKAHY/Wig9wgcREmLtf9NslY=
2+
github.com/likexian/gokit v0.25.15/go.mod h1:S2QisdsxLEHWeD/XI0QMVeggp+jbxYqUxMvSBil7MRg=
3+
github.com/likexian/whois v1.15.6 h1:hizngFHJTNQDlhwhU+FEGyPGxy8bRnf25gHDNrSB4Ag=
4+
github.com/likexian/whois v1.15.6/go.mod h1:vx3kt3sZ4mx4XFgpaNp3GXQCZQIzAoyrUAkRtJwoM2I=
5+
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
6+
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=

0 commit comments

Comments
 (0)