Skip to main content

🪡 Needlecraft

External attack surface recon toolkit for red teamers. One CLI to scan, search, screenshot, and report — from first port sweep to finished deliverable.

Needlecraft ships two commands:

  • exercism — recon and scanning: ports, SSL/TLS, DNS, OSINT, screenshots, Tor.
  • salvare — turns raw findings into a polished attack surface report.

Why Needlecraft

  • 🎯 One tool, whole workflow — stop stitching together nmap, masscan, sslscan, EyeWitness, and a dozen OSINT APIs by hand.
  • 🔍 OSINT built in — Shodan, InternetDB, Dehashed, MaxMind, and WHOIS/subdomain recon out of the box.
  • 🧅 Tor-aware — screenshot .onion sites without extra plumbing.
  • 📄 Report generationsalvare compiles ports, ciphers, certs, and screenshots into a client-ready .docx.

Installation

1. Clone the repository

git clone https://github.com/H4CK-7H3-P14N37/needlecraft.git
cd needlecraft

2. Install the Python package

pip install .

3. Install system dependencies

Installs apt packages and deploys torrc. Requires root.

exercism install-deps

Tor is not started automatically. When you need it:

systemctl start tor

Configuration

Set API keys and credentials. Written to ~/.config/exercism.json and /etc/environment.

exercism config SHODANKEY=your_key HIBPKEY=your_key SECURITYTRAILSKEY=your_key
exercism config GOOGLEKEY=your_key GOOGLECX=your_cx
exercism config MAXMINDKEY=your_key
exercism config DEHASHED_EMAIL=you@example.com DEHASHED_API_KEY=your_key
exercism config GMAIL_EMAIL=you@example.com GMAIL_APP_PASSWORD=your_password

Show current config:

exercism config --show

See env.example for the full list of supported keys.

Usage

Port scan

exercism scan ips_list.txt
exercism scan ips_list.txt -u -l -p -t
exercism scan ips_list.txt -T          # top 100 TCP ports only
exercism scan ips_list.txt -N          # skip nmap, masscan results only
exercism scan ips_list.txt -e you@example.com  # email results when done

Search (IP, domain, email, CVE)

exercism search 1.1.1.1
exercism search example.com
exercism search CVE-2024-1234
exercism search user@example.com
exercism search 1.1.1.1 -s   # short output

SSL scan

exercism sslscan urls.txt

Screenshots

exercism screenshot urls.txt

Passive DNS

exercism pdns ips.txt
exercism pdns ips.txt -o output.txt

InternetDB lookup

exercism internetdb ips.txt

Dehashed credential search

exercism dehashed example.com
exercism dehashed user@example.com -s 500

Recon (WHOIS / subdomain enumeration)

exercism recon example.com

MaxMind ASN lookup

exercism maxmind -k "Company Name"
exercism maxmind -k "Company Name" -s output.json

Mass DNS lookup

exercism dns domains.txt

Tor site screenshot

exercism tor http://example.onion

Ansible → OpenSSH config

exercism ansible inventory.ini ~/.ssh/config
exercism ansible inventory.ini ~/.ssh/config -g group1,group2

Generate attack surface report

salvare genreport \
  reports/attack_surface_ports.csv \
  reports/attack_surface_ciphers.csv \
  reports/attack_surface_certs.csv \
  reports/screenshots/ \
  "Company Name" \
  scope.txt

Development install

For making changes without reinstalling:

pip install -e .

Disclaimer

Needlecraft is built for authorized security testing. Only point it at assets you own or have explicit written permission to assess.

Release files for needlecraft 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for needlecraft 1.0.3
File Size Uploaded
needlecraft-1.0.3.tar.gz 59.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for needlecraft 1.0.3
File Interpreter ABI Platform
needlecraft-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 120.9 kB

Release files / needlecraft-1.0.3.tar.gz

Download URL needlecraft-1.0.3.tar.gz
Size 59.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6478116bb054c72a22c66ec01e895a0e6ef16d5f8d21cf28ed7da1ee96d22cb2
BLAKE2b-256 checksum
How to use checksums
fdf83c86ee404d304a856102811ac37fa3571aaa95026fde29a35be7c1f43ad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / needlecraft-1.0.3-py3-none-any.whl

Download URL needlecraft-1.0.3-py3-none-any.whl
Size 61.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
949bc72a368c6e19ea2ad047c73c71c27256e88d025ab37e05343570ad1df571
BLAKE2b-256 checksum
How to use checksums
356825397ffa74b59dcc75e2e2af7cefd659c370f97511ce2254a9cf28238ef4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page