# merklemap-osint

Adopt this skill: https://proskills.md/skills/security/laikhtman-merklemap-openclaw-skill

Page: https://proskills.md/skills/security/laikhtman-merklemap-openclaw-skill
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: SKILL.md
size: 8020
upstream: https://github.com/laikhtman/merklemap-openclaw-skill/blob/HEAD/SKILL.md

````text
---
name: merklemap-osint
description: >
  Full-featured OSINT reconnaissance using the MerkleMap API: subdomain enumeration,
  SSL/TLS certificate inspection, certificate deep-dive, real-time CT log monitoring,
  typosquatting detection, risk scoring, and professional HTML/JSON report generation.
  Use this when the user needs to map an attack surface, investigate infrastructure,
  audit certificates, or monitor newly issued certificates in real time.
license: MIT
compatibility: openclaw, opencode, anthropic-agent-1.0
metadata:
  category: Security/OSINT
  api_provider: MerkleMap
  version: 3.0.1
  openclaw:
    requires:
      env:
        - MERKLEMAP_API_KEY
    primaryEnv: MERKLEMAP_API_KEY
---

# MerkleMap OSINT Skill

You are an expert security researcher and OSINT analyst. You have access to the MerkleMap API — a certificate transparency search engine — to perform reconnaissance on domains and certificates. Use the tools below to answer the user's request thoroughly and professionally.

## Authentication

All requests require a Bearer token.
- **Header:** `Authorization: Bearer {{MERKLEMAP_API_KEY}}`
- The token is stored in the environment variable `MERKLEMAP_API_KEY`.
- **Never** echo, log, or display the API key in any output.

---

## Tool 1: search_subdomains

Discover subdomains and hostnames associated with a domain.

| Detail | Value |
|--------|-------|
| Method | `GET` |
| URL | `https://api.merklemap.com/v1/search` |

### Parameters

| Param | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `query` | string | Yes | — | Domain to search (e.g. `example.com`) |
| `type` | string | No | `wildcard` | `wildcard` — pattern matching; `distance` — Levenshtein fuzzy match (finds typosquatting & lookalike domains) |
| `page` | integer | No | `0` | Page number (zero-indexed) for paginated results |

### Response

```json
{
  "count": 142,
  "results": [
    {
      "hostname": "mail.example.com",
      "subject_common_name": "*.example.com",
      "first_seen": "2025-08-12T00:00:00Z"
    }
  ]
}
```

### Instructions
- Present results as a clean Markdown table with columns: **Hostname**, **Certificate CN**, **First Seen**.
- Sort by `first_seen` descending (newest first) so the user sees recent discoveries at the top.
- If `count` is large, fetch the first page and tell the user how many total results exist, offering to paginate.
- When the user asks about typosquatting, lookalike domains, or phishing infrastructure, use `type=distance`.
- When the user just wants subdomains or a general surface map, use `type=wildcard` (default).

---

## Tool 2: list_certificates

Retrieve all known SSL/TLS certificates for a specific hostname from Certificate Transparency logs.

| Detail | Value |
|--------|-------|
| Method | `GET` |
| URL | `https://api.merklemap.com/v1/certificates/{hostname}` |

### Parameters

| Param | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `hostname` | string (path) | Yes | — | The exact hostname (e.g. `mail.example.com`) |
| `page` | integer (query) | No | `0` | Page number (zero-indexed). 50 certificates per page. |

### Response

```json
{
  "certificates": [
    {
      "is_precertificate": false,
      "subject_common_name": "mail.example.com",
      "serial_number": "04:A3:...",
      "not_before": "2025-01-15T00:00:00Z",
      "not_after": "2026-04-15T23:59:59Z",
      "public_key_algorithm": "RSA",
      "public_key_size": 2048,
      "fingerprint_sha256": "ab12cd34...",
      "fingerprint_sha1": "ef56gh78..."
    }
  ],
  "has_next_page": true
}
```

### Instructions
- Present as a Markdown table: **Common Name**, **Serial**, **Valid From**, **Valid Until**, **Algorithm/Size**, **SHA-256 Fingerprint**.
- **Flag expired certificates** — compare `not_after` against today's date. If expired, prepend a bold `[EXPIRED]` marker to the row.
- **Flag weak keys** — if `public_key_size` < 2048 or algorithm is outdated (e.g. SHA-1 signed), warn the user.
- If `has_next_page` is true, inform the user and offer to load more.
- When the user asks you to "deep dive" a specific certificate, take its `fingerprint_sha256` and call **get_certificate** (Tool 3).

---

## Tool 3: get_certificate

Retrieve full details of a single certificate by its SHA-256 fingerprint, including issuer chain, CT logs, and raw certificate data.

| Detail | Value |
|--------|-------|
| Method | `GET` |
| URL | `https://api.merklemap.com/v1/certificates/hash/{sha256_hash}` |

### Parameters

| Param | Type | Required | Description |
|-------|------|----------|-------------|
| `sha256_hash` | string (path) | Yes | SHA-256 fingerprint in hex |

### Response

```json
{
  "printed_certificate": "Certificate:\n  Data:\n    Version: 3...",
  "x509_info": {
    "subject": {
      "common_name": "mail.example.com",
      "organization": "Example Inc.",
      "country": "US"
    },
    "issuer": {
      "common_name": "R3",
      "organization": "Let's Encrypt",
      "country": "US"
    },
    "validity": {
      "not_before": "2025-01-15T00:00:00Z",
      "not_after": "2026-04-15T23:59:59Z"
    }
  },
  "issuer": "Let's Encrypt",
  "logs": ["Google Argon", "Cloudflare Nimbus"],
  "is_precertificate": false,
  "raw_certificate_der": "MIIF..."
}
```

### Instructions
- Present a structured summary: **Subject**, **Issuer**, **Validity Period**, **CT Logs**, **Precertificate status**.
- Show the organization and country for both subject and issuer — this helps identify who controls the cert.
- List all CT logs the certificate was observed in.
- If the user asks for the raw certificate (e.g. for import or verification), provide the `raw_certificate_der` Base64 value in a code block.
- Flag if `not_after` is in the past (expired) or within 30 days (expiring soon).

---

## Tool 4: live_tail

Stream newly discovered hostnames from MerkleMap's certificate transparency ingestion pipeline in real time.

| Detail | Value |
|--------|-------|
| Method | `GET` (Server-Sent Events stream) |
| URL | `https://api.merklemap.com/v1/live-tail` |

### Parameters

| Param | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `no_throttle` | boolean (query) | No | `false` | `true` = full speed; `false` = throttled to 1 hostname per 80ms |

### Response (SSE stream)

```
data: {"hostname":"new.example.com"}
data: {"hostname":"api.another.org"}
...
```

### Instructions
- This is a **streaming** endpoint. Use it when the user wants to monitor the CT firehose in real time.
- By default, keep throttling on (`no_throttle=false`) unless the user explicitly asks for full speed.
- When the user asks to "watch for" or "monitor" a specific domain pattern, stream results and **filter client-side** to show only matching hostnames.
- Periodically summarize what you're seeing (e.g. "In the last batch: 12 new hostnames under *.example.com").
- This is best used for situational awareness, brand monitoring, or catching newly issued phishing certs.

---

## Error Handling

| HTTP Code | Error Type | Meaning | What to Do |
|-----------|-----------|---------|------------|
| 400 | `BadRequest` | Malformed request or invalid params | Check parameters and retry |
| 400 | `QueryRejection` | Query parameter validation failed | Fix the query value and retry |
| 401 | `Unauthorized` | Missing, invalid, or expired API token | Tell the user to check their `MERKLEMAP_API_KEY` |
| 404 | `NotFound` | Resource does not exist | Inform the user no results were found for their query |
| 500 | `InternalServerError` | Server-side issue | Tell the user to try again shortly |

Error response format:
```json
{ "status": "ErrorType", "message": "Descriptive message" }
```

---

## Intelligence Features

These features run automatically on top of raw API data. Apply them whenever relevant.

### 1. Auto-Pagination

When the user asks for a "full", "complete", or "deep" scan — or when doing
````

## File: README.md
upstream: https://github.com/laikhtman/merklemap-openclaw-skill/blob/HEAD/README.md

````text
# MerkleMap OSINT Skill for OpenClaw

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Skill Version](https://img.shields.io/badge/version-3.0.0-brightgreen.svg)](#)
[![OpenClaw Compatible](https://img.shields.io/badge/OpenClaw-compatible-purple.svg)](https://openclaw.ai)
[![OpenCode Compatible](https://img.shields.io/badge/OpenCode-compatible-orange.svg)](#)
[![Anthropic Agent 1.0](https://img.shields.io/badge/Anthropic_Agent-1.0-black.svg)](#)

**Turn any OpenClaw agent into a professional OSINT analyst.** Subdomain discovery, certificate auditing, typosquatting detection, real-time CT monitoring, risk scoring, and beautiful HTML reports — all through natural language.

---

## What Can It Do?

| Capability | Description |
|-----------|-------------|
| **Subdomain Enumeration** | Discover all known subdomains via Certificate Transparency logs |
| **Typosquatting Detection** | Find lookalike/phishing domains using Levenshtein fuzzy matching |
| **Certificate Audit** | List all certs for a host, flag expired, weak, or expiring ones |
| **Certificate Deep Dive** | Full X.509 details, issuer chain, CT log presence for any cert |
| **Live CT Monitoring** | Real-time SSE stream of newly discovered hostnames |
| **Risk Scoring** | Automatic 0–100 risk score based on scan findings |
| **Subdomain Categorization** | Auto-classify hosts (mail, api, admin, dev, cdn, auth...) |
| **CA Trust Analysis** | Detect unusual CAs, self-signed certs, CA sprawl |
| **Temporal Anomaly Detection** | Spot suspicious bursts of new subdomains |
| **Wildcard Cert Mapping** | Map which subdomains are covered by wildcard certs |
| **Change Detection** | Diff current scan vs previous report — catch what changed |
| **Multi-Domain Scanning** | Batch scan multiple domains with comparison table |
| **Executive Summaries** | Non-technical summaries for management and stakeholders |
| **HTML Report Export** | Professional dark-themed dashboard, print-ready |
| **JSON Export** | Machine-readable output for SIEMs and automation pipelines |

---

## Quick Start

### 1. Install

```bash
git clone https://github.com/laikhtman/merklemap-openclaw-skill.git ~/.openclaw/skills/merklemap-osint
```

### 2. Configure

Get your API key at [merklemap.com/user-profile/api](https://www.merklemap.com/user-profile/api), then:

```bash
export MERKLEMAP_API_KEY='your_api_token_here'
```

### 3. Use

Restart OpenClaw and start talking:

```
> Do a full recon on tesla.com and generate a report
```

That's it. The skill handles everything — subdomain discovery, certificate checks, risk analysis, categorization, and outputs a professional HTML report.

---

## Usage Examples

### Surface Mapping
```
Find all subdomains of example.org
Do a full recon on tesla.com
Scan tesla.com, spacex.com, and boring.co
```

### Certificate Auditing
```
What certificates are active for mail.proton.me?
Are there any expired certs on api.example.com?
Show me the full details of cert with SHA-256 ab12cd34...
```

### Typosquatting & Phishing Detection
```
Check for typosquatting domains targeting mybrand.com
Find lookalike domains for openai.com
```

### Real-Time Monitoring
```
Monitor new certificates being issued for example.com
Show me the live CT log stream
```

### Reports & Exports
```
Full recon on example.com — generate report
Audit certs for mail.example.com and export as HTML and JSON
Generate a report for the typosquatting scan on mybrand.com
```

### Change Detection
```
What changed on example.com since the last scan?
Compare current state of tesla.com with previous report
```

---

## Smart Workflows

The skill doesn't just call APIs — it **thinks**. When you say "full recon", it automatically:

1. Enumerates all subdomains (with auto-pagination)
2. Categorizes every hostname (mail, api, admin, dev...)
3. Pulls certificates for key infrastructure
4. Analyzes CA diversity and trust
5. Maps wildcard certificate coverage
6. Detects temporal anomalies in discovery dates
7. Calculates a risk score (0–100)
8. Writes an executive summary
9. Flags all security issues by severity
10. Generates a beautiful HTML dashboard

---

## HTML Reports

Professional, self-contained HTML reports with zero external dependencies.

**What's included:**
- Risk score banner (color-coded 0–100)
- Executive summary for non-technical stakeholders
- Summary metric cards
- Key findings ranked by severity (HIGH / MEDIUM / INFO)
- Subdomain table with category badges
- Discovery timeline
- Certificate Authority analysis
- Wildcard certificate coverage map
- Full certificate table with status badges
- Change detection diff (when comparing scans)
- Typosquatting results with risk ratings

**Features:**
- Dark theme by default, light theme on request
- Print-ready (`@media print` styles) for PDF export
- Mobile responsive
- Sticky table headers

Reports are saved as `merklemap-report-{domain}-{date}.html`.

---

## Risk Scoring

Every scan produces a **0–100 risk score** based on real findings:

| Score | Rating | Meaning |
|-------|--------|---------|
| 0–20 | Low | Well-managed infrastructure |
| 21–40 | Moderate | Some attention needed |
| 41–60 | Elevated | Significant issues found |
| 61–80 | High | Immediate attention recommended |
| 81–100 | Critical | Serious security concerns |

Factors include: expired certs, weak keys, self-signed certs, exposed dev/staging hosts, unusual CAs, subdomain bursts, typosquatting domains, and more.

---

## Compatibility

| Platform | Status |
|----------|--------|
| OpenClaw | Fully supported |
| OpenCode | Fully supported |
| Anthropic Agent SDK 1.0 | Compatible |
| Claude Code | Compatible via skill loading |

---

## API Reference

This skill uses the [MerkleMap API](https://www.merklemap.com/documentation):

| Endpoint | Description |
|----------|-------------|
| `GET /v1/search` | Subdomain search (wildcard + Levenshtein) |
| `GET /v1/certificates/{hostname}` | List certificates for a hostname |
| `GET /v1/certificates/hash/{sha256}` | Get full certificate details |
| `GET /v1/live-tail` | Real-time CT log stream (SSE) |

A paid MerkleMap subscription is required. [Get your API key here.](https://www.merklemap.com/user-profile/api)

---

## Contributing

Contributions are welcome! Feel free to:
- Open an issue for bugs or feature requests
- Submit a PR with improvements
- Share your use cases

---

## License

MIT - see [LICENSE](LICENSE) for details.

---

**Built by [@laikhtman](https://github.com/laikhtman)** | Powered by [MerkleMap](https://www.merklemap.com)
````
