Xpersona
F

fofamap

CLAWHUB · Unverified

Use this skill when the user wants FOFA-based asset discovery, host profiling, distribution statistics, icon_hash generation, query refinement after zero-res...

62
Rank
84
Safety
1.2k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s177penfc4z7re7mhvkqqmvskx83m9hg:fofamap
  1. Install using `clawhub skill install s177penfc4z7re7mhvkqqmvskx83m9hg:fofamap` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/asaotomo/fofamap before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-asaotomo-fofamap/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

92,930 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: fofamap
description: Use this skill when the user wants FOFA-based asset discovery, host profiling, distribution statistics, icon_hash generation, query refinement after zero-result searches, or cautious follow-up vulnerability triage. It is for security recon tasks that need deterministic FOFA API calls instead of an interactive CLI.
homepage: https://github.com/asaotomo/FofaMap
license: MIT
metadata: {"short-description":"FOFA recon, monitoring, live checks, asset handoff, and local self-improvement","clawdbot":{"emoji":"🗺️","primaryEnv":"FOFA_API_KEY","requires":{"env":["FOFA_EMAIL","FOFA_API_KEY"],"bins":["python3"]},"files":["scripts/fofa_recon.py","references/setup.md","references/query-playbook.md","references/analysis-playbook.md","references/permission-playbook.md","references/monitor-playbook.md","references/redteam-hunt-playbook.md","references/report-templates.md","references/evolution-playbook.md","references/syntax-arsenal.md","references/syntax-corpus.tsv"]}}
---

# fofamap

## Overview

This skill turns natural-language recon requests into a stable FOFA workflow:

1. pick the right FOFA operation,
2. detect the FOFA membership tier and capability profile,
3. run deterministic API calls through `scripts/fofa_recon.py`,
4. broaden the search when FOFA returns no useful data,
5. verify live web reachability when it matters,
6. track inventory drift with snapshot comparisons when the task is recurring,
7. export clean handoff files when the user needs deliverables,
8. summarize findings with clear caveats and next steps,
9. learn from prior runs so the next query, report, and handoff improve.

This skill is distilled from the FofaMap project, but packaged for skill use instead of an interactive application. The host agent should do the reasoning, and the helper script should do the FOFA API work. The workflow keeps the project's key tactics: action routing, permission-aware field selection, zero-result reflection, live reachability verification, export-oriented delivery, and targeted follow-up suggestions. It now also keeps a bounded local memory so the skill can reflect on failed runs, recurring friction, and strong report patterns without turning into an uncontrolled self-modifying black box.

For setup, the user only needs to provide FOFA credentials:

- `FOFA_EMAIL`
- `FOFA_API_KEY`

## When To Use

Use this skill when the user asks for any of the following:

- find exposed assets, subdomains, services, or product fingerprints with FOFA
- profile a single IP or domain with FOFA host aggregation
- analyze distribution data such as country, port, title, ASN, or organization rankings
- run recurring asset monitoring and compare new, removed, or changed exposures
- derive an `icon_hash` query from a target website
- retry a failed FOFA search with broader, smarter fallback queries
- decide whether the findings justify a separate validation step such as `nuclei`

Do not use this skill for:

- general web scraping unrelated t

_meta.json

{
  "ownerId": "kn7bwn49vqgzk6pwdjxej006k982qqaq",
  "slug": "fofamap",
  "version": "1.0.1",
  "publishedAt": 1776086304597
}

references/analysis-playbook.md

# Analysis Playbook

This reference captures the original project's practical tactics so the skill can preserve its style of operation without embedding a second model backend.

## Action routing

Choose the operation that matches the user's intent before writing queries.

- `search`: user wants a concrete asset list
- `host`: user gives one IP or one domain and wants a profile
- `stats`: user wants distributions, rankings, or macro patterns
- `icon-hash`: user wants a favicon pivot
- `alive-check`: user wants a reachable subset or current HTTP reachability

This routing came from the original MCP tool design and is one of the main reasons the workflow feels like an operator assistant instead of a raw API wrapper.

## Query tactics

### 1. Permission-aware fields

Do not assume premium fields are available. Start with safe fields unless the user explicitly needs more detail. If FOFA rejects a field set, rerun with a safer baseline and explain the downgrade.

### 2. Zero-result reflection

When a query returns nothing useful, do not just say "no results." Use a deliberate broadening ladder:

1. remove the most brittle filter
2. swap exact host assumptions for content or product pivots
3. reduce to the strongest signal plus coarse scope

The skill should frame later attempts as broader fallback logic, not equivalent matches.

### 3. Human-language intent to search strategy

When the user asks in natural language, map the request to:

- target technology or product
- scope such as country, region, organization, or certificate
- whether they need list, profile, or statistics
- whether they need active follow-up later

## Host profiling tactics

When analyzing one host, preserve the original project's structure:

1. exposed surface
2. likely risk
3. plausible attack path
4. one-line overall rating

Useful cues:

- high-risk management ports such as `22`, `3389`, `445`
- common database exposure
- product hints in FOFA port products
- recency of `update_time`

Good host writeups separate what FOFA directly observed from what still needs live verification.

## Statistical analysis tactics

When writing up statistics, avoid dumping raw rankings without interpretation. Focus on:

- geographic concentration
- unusual port choices
- dominant titles or organizations
- what the distribution implies operationally

Recommended structure:

1. distribution traits
2. anomalies
3. macro impact
4. short conclusion

## Live verification tactics

Live checks are not mandatory for every search. Use them when:

- the user needs an actionable subset
- FOFA data may be stale for the task
- the output is being handed to another operator

If you run live checks:

- keep them lightweight
- treat HTTP status as a freshness signal, not as security proof
- export the checked results when the user needs deliverables

## Export tactics

The original project cared about operator handoff, not only terminal output. Preserve that.

- choose `xlsx` for analyst handoff and review
- cho

references/evolution-playbook.md

# Evolution Playbook

This skill now has a bounded self-improvement loop.

The goal is not uncontrolled self-modification. The goal is to make `fofamap` learn from real runs so the next query, report, and handoff are better.

## What It Learns Automatically

After `search`, `search-next`, `host`, `stats`, `project-run`, and `monitor-run`, the helper records:

- what mode ran
- whether it succeeded or failed
- which report profile was used
- whether FOFA dropped requested fields
- whether zero-result broadening lessons appeared
- whether alive-check showed stale inventory
- whether high-signal ports, abnormal exposure markers, attack-infrastructure hints, or takeover hints appeared
- what next-action guidance should be preserved

## Memory Layout

By default, local memory is written to:

`results/fofamap_memory/`

Important files:

- `runs.jsonl`: append-only episodic memory
- `semantic-patterns.json`: aggregated pattern counts and recurring lessons
- `latest_reflection.json`: last run's structured reflection
- `latest_reflection.md`: last run's human-readable reflection
- `latest_review.md`: latest explicit review generated by `learn-review`

Optional environment variables:

- `FOFAMAP_MEMORY_DIR`: override the memory directory
- `FOFAMAP_DISABLE_LEARNING=1`: disable the learning loop

## Self-Repair

The skill self-repairs operationally by:

- recording failed runs instead of discarding them
- turning repeated failures into stable lessons
- remembering tier-related field drops
- warning when a query strategy is too brittle
- reminding the next operator to broaden by signal family instead of repeating the same dead query

This is operational self-repair, not silent code mutation.

## Self-Reflection

Run:

```bash
python3 scripts/fofa_recon.py learn-review
```

Or write the review to a file:

```bash
python3 scripts/fofa_recon.py learn-review --output evolution_review.md
```

The review summarizes:

- strongest learned patterns
- recurrent friction
- frequently rejected FOFA fields
- report profile usage
- recent episodes
- guidance for the next operator

## Self-Evolution

Each successful or failed run updates the semantic memory. That means the skill gradually accumulates:

- which lenses produce better reports
- which failure patterns happen repeatedly
- which FOFA constraints most often bite the workflow
- which exposure classes recur in the current environment

The helper also returns `learning_artifacts` with `evolution_hints`, so the host agent can adapt its next step immediately.

## How The Host Agent Should Use This

When the task is recurring, long-running, or team-oriented:

1. read `latest_reflection.md` if it exists
2. inspect `semantic-patterns.json` when you need a stronger sense of recurring lessons
3. prefer the report profile that matches the strongest recurring mission
4. keep separating indexed evidence from live validation

## Guardrails

- Learning is local to the current workspace unless the user redirects the memory direc

references/monitor-playbook.md

# Monitor Playbook

## When to use it

Use `monitor-run` when the user wants recurring asset watch instead of a one-off search.

Typical asks:

- daily or monthly monitoring for a known organization or product set
- alert on newly exposed or missing assets
- keep a professional Markdown report after each run
- preserve snapshot history for later review

## Core model

`monitor-run` is designed to be scheduler-friendly.

- first run: establish baseline
- later runs: compare against `latest_snapshot.json`
- outputs: `latest_snapshot.json`, `latest_diff.json`, `latest_report.md`, timestamped archives, optional current exports

The skill itself handles the monitoring logic. Scheduling can be done by OpenClaw automations or any external scheduler, but the command should always use a stable `--state-dir`.

## Recommended patterns

### Small recurring watch

```bash
python3 scripts/fofa_recon.py monitor-run \
  --query 'org="Example Corp"' \
  --state-dir results/monitor_example \
  --report-output results/monitor_example/latest_report.md
```

### Larger recurring watch

```bash
python3 scripts/fofa_recon.py monitor-run \
  --query-file queries.txt \
  --use-search-next \
  --max-pages 3 \
  --state-dir results/monitor_monthly \
  --fail-on-change
```

### Higher-confidence operational watch

```bash
python3 scripts/fofa_recon.py monitor-run \
  --query 'app="nginx" && country="US"' \
  --alive-check \
  --split-exports \
  --suggest-nuclei \
  --state-dir results/monitor_nginx
```

## Operating rules

- Keep `--state-dir` stable across runs.
- Prefer `--use-search-next` when the result set is large or the user explicitly wants continuous paging.
- Use `--fail-on-change` when the caller should treat asset drift as an alert condition.
- Use `--alive-check` when live reachability changes the user's decision.
- Use `--split-exports` when different teams or queries need separate handoff files.

## Report expectations

A good monitoring report should answer:

- Did the asset set grow, shrink, or stay stable?
- Which queries changed?
- Which new assets are worth reviewing first?
- Are any new assets on high-signal ports?
- Are there changes in HTTP status, title, server, or stack hints?

The generated report already includes:

- executive judgment
- per-query drift summary
- newly observed assets
- removed or missing assets
- changed existing assets
- current exposure snapshot
- recommended actions
- output file inventory

## Alert interpretation

- `alert_level: none`: no drift, or first run establishing a baseline
- `alert_level: low`: asset metadata changed, but inventory count stayed stable
- `alert_level: medium`: assets were added or removed
- `alert_level: high`: new assets appeared on ports that usually deserve faster review

## Practical advice for the agent

- Do not treat the first baseline run as an incident.
- If assets disappear, mention the chance of FOFA indexing delay before calling it decommissioning.
- If new assets appear on `22`, `3389`, 

Sponsored

Ads related to fofamap and adjacent AI workflows.