<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Denis Sanchez Leyva</title>
    <description>The latest articles on Forem by Denis Sanchez Leyva (@denisijcu).</description>
    <link>https://forem.com/denisijcu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F719838%2Fc8216f73-57cf-4f41-a39e-546a2a35ad51.jpeg</url>
      <title>Forem: Denis Sanchez Leyva</title>
      <link>https://forem.com/denisijcu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/denisijcu"/>
    <language>en</language>
    <item>
      <title>ClawSec: Turn OpenClaw Into an Offensive Recon Assistant via Telegram</title>
      <dc:creator>Denis Sanchez Leyva</dc:creator>
      <pubDate>Fri, 24 Apr 2026 06:48:20 +0000</pubDate>
      <link>https://forem.com/denisijcu/clawsec-turn-openclaw-into-an-offensive-recon-assistant-via-telegram-4dm8</link>
      <guid>https://forem.com/denisijcu/clawsec-turn-openclaw-into-an-offensive-recon-assistant-via-telegram-4dm8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; ClawSec is a native OpenClaw skill that turns your agent into a personal recon operator. Type &lt;code&gt;/clawsec scanme.nmap.org&lt;/code&gt; in Telegram, and ~30 seconds later you get a full AI-analyzed attack-surface report — with CVE-aware risk scoring, WHOIS, and subdomain enumeration — right in your chat. No terminals. No copy-pasting. No grep-fu.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;If you've done any penetration testing or played HackTheBox, you know the loop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;nmap&lt;/code&gt;, wait&lt;/li&gt;
&lt;li&gt;Copy the output&lt;/li&gt;
&lt;li&gt;Paste into ChatGPT: &lt;em&gt;"what does this mean?"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;whois&lt;/code&gt;, copy, paste again&lt;/li&gt;
&lt;li&gt;Manually write a report&lt;/li&gt;
&lt;li&gt;Repeat for every target
It's tedious. It's slow. And honestly, it's the part nobody enjoys. The fun is the exploitation — not parsing nmap XML at midnight.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When I saw OpenClaw, I immediately thought: &lt;strong&gt;this is the missing orchestration layer.&lt;/strong&gt; What if I could just message my agent, have it run all the tools, feed the output to an LLM, and get back a structured security report — right in Telegram?&lt;/p&gt;

&lt;p&gt;That's ClawSec.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is ClawSec?
&lt;/h2&gt;

&lt;p&gt;ClawSec is a native OpenClaw skill that converts any OpenClaw instance into an offensive reconnaissance assistant. It implements &lt;strong&gt;Closed-Loop Recon Orchestration&lt;/strong&gt;: the entire cycle from natural language trigger to actionable intelligence report runs automatically, without manual intervention.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You → Telegram → OpenClaw → scope_guard.py → recon.py → LLM analysis → Report → Telegram
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In practice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/clawsec scanme.nmap.org

🦞 ClawSec Report | Vertex Coders LLC
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Target: scanme.nmap.org | quick scan | 2026-04-23T21:36:00Z

📋 Executive Summary
Target exposes 2 open ports, both running EOL software with known CVEs.
OpenSSH 6.6.1 and Apache 2.4.7 are both flagged Critical — immediate
patching or decommission recommended. Attack surface: HIGH.

🔓 Open Ports &amp;amp; Services
| Port | Service | Version         | Risk     | Reason                        |
|------|---------|-----------------|----------|-------------------------------|
| 22   | ssh     | OpenSSH 6.6.1   | Critical | OpenSSH &amp;lt;= 6.6 (CVE-laden, EOL)|
| 80   | http    | Apache httpd 2.4.7 | Critical | Apache httpd &amp;lt;= 2.4.29       |

🎯 Key Findings
- CVE-laden OpenSSH 6.6.1: multiple auth bypass and memory corruption CVEs
- Apache 2.4.7: predates CVE-2021-41773 fix — path traversal risk
- SSH banner not suppressed: version info leaked

🧭 Next Steps
- Test path traversal: curl http://scanme.nmap.org/cgi-bin/.%2e/etc/passwd
- Enumerate SSH keys / check for weak ciphers: ssh-audit scanme.nmap.org
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ For authorized use only | github.com/Denisijcu/clawsec
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One Telegram message. One AI-analyzed report. Zero manual work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;ClawSec is a native OpenClaw skill — a folder with a &lt;code&gt;SKILL.md&lt;/code&gt; manifest plus Python scripts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~/.openclaw/skills/clawsec/
├── SKILL.md                     &lt;span class="c"&gt;# Agent workflow — the brain&lt;/span&gt;
├── recon.py                     &lt;span class="c"&gt;# Recon engine (nmap XML + whois + subdomains)&lt;/span&gt;
├── scope_guard.py               &lt;span class="c"&gt;# Target validation&lt;/span&gt;
├── tests/
│   ├── test_scope_guard.py      &lt;span class="c"&gt;# 19 unit tests&lt;/span&gt;
│   └── test_risk.py             &lt;span class="c"&gt;# 11 unit tests&lt;/span&gt;
└── wordlists/
    └── subdomains-top200.txt    &lt;span class="c"&gt;# 200-entry bundled wordlist&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  SKILL.md — The Brain
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;SKILL.md&lt;/code&gt; is where OpenClaw magic happens. It's a markdown file with YAML frontmatter that tells the agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;When to activate&lt;/strong&gt; — trigger keywords: &lt;code&gt;scan&lt;/code&gt;, &lt;code&gt;recon&lt;/code&gt;, &lt;code&gt;nmap&lt;/code&gt;, &lt;code&gt;hackthebox&lt;/code&gt;, &lt;code&gt;htb&lt;/code&gt;, &lt;code&gt;ctf target&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What binaries it needs&lt;/strong&gt; — &lt;code&gt;python3&lt;/code&gt;, &lt;code&gt;nmap&lt;/code&gt;, &lt;code&gt;whois&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The 5-step workflow&lt;/strong&gt; — parse request → scope guard → run recon → LLM analysis → send report
The key insight: &lt;strong&gt;skills are operational instructions, not code.&lt;/strong&gt; You write a playbook in plain English/markdown, and the agent executes it. No SDK. No compilation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  recon.py — The Engine (v0.2.0)
&lt;/h3&gt;

&lt;p&gt;Three modules, pure Python stdlib, no heavy dependencies:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 1: Nmap with XML parsing&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;SCAN_PROFILES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;quick&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-sV&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-T4&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--open&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-F&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;full&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-sV&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-sC&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-T3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--open&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-p-&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stealth&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-sS&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-sV&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-T2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--open&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-F&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We parse nmap's &lt;code&gt;-oX -&lt;/code&gt; (XML to stdout) instead of regex on text output. This gives us &lt;code&gt;product&lt;/code&gt;, &lt;code&gt;version&lt;/code&gt;, &lt;code&gt;cpe&lt;/code&gt;, &lt;code&gt;extrainfo&lt;/code&gt;, &lt;code&gt;scripts&lt;/code&gt;, &lt;code&gt;os_matches&lt;/code&gt;, and &lt;code&gt;hostnames&lt;/code&gt; — everything the LLM needs for deep analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 2: WHOIS with TLD fallback&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Standard &lt;code&gt;whois&lt;/code&gt; often returns malformed data for &lt;code&gt;.org&lt;/code&gt;, &lt;code&gt;.io&lt;/code&gt;, &lt;code&gt;.dev&lt;/code&gt;, &lt;code&gt;.ai&lt;/code&gt; domains. ClawSec retries with the authoritative registrar server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;WHOIS_SERVERS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;org&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;whois.publicinterestregistry.org&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;io&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;whois.nic.io&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;dev&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;whois.nic.google&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ai&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;whois.nic.ai&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Module 3: Subdomain enumeration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Auto-detects the best available method:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Priority&lt;/th&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;When&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;subfinder&lt;/code&gt; (passive)&lt;/td&gt;
&lt;td&gt;If installed on &lt;code&gt;$PATH&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;amass enum -passive&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If installed, subfinder not&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Built-in DNS bruteforce&lt;/td&gt;
&lt;td&gt;Always available&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Bundled 200-entry wordlist included. Bring your own with &lt;code&gt;--wordlist&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Version-aware risk scoring&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the part that makes the reports actually useful. Every open port gets scored using three signals:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Known-bad version patterns → Critical&lt;/strong&gt; with a human-readable reason:

&lt;ul&gt;
&lt;li&gt;OpenSSH ≤ 6.6 (CVE-laden, EOL)&lt;/li&gt;
&lt;li&gt;Apache httpd ≤ 2.4.29&lt;/li&gt;
&lt;li&gt;vsftpd 2.3.4 &lt;strong&gt;backdoor&lt;/strong&gt; (CVE-2011-2523)&lt;/li&gt;
&lt;li&gt;PHP 5.x (EOL since 2018)&lt;/li&gt;
&lt;li&gt;Samba 3.x (EternalBlue range)&lt;/li&gt;
&lt;li&gt;MySQL/MariaDB ≤ 5.5&lt;/li&gt;
&lt;li&gt;IIS ≤ 7.x&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port category → High/Medium/Low&lt;/strong&gt; (RDP, SMB, FTP, MSSQL, Redis → High; SSH, HTTP → Medium)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Everything else → Info&lt;/strong&gt;
### scope_guard.py — The Safety Layer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Runs &lt;strong&gt;before every scan&lt;/strong&gt;. Returns &lt;code&gt;ALLOWED&lt;/code&gt; or &lt;code&gt;BLOCKED&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;python3 scope_guard.py 192.168.1.1
BLOCKED

&lt;span class="nv"&gt;$ &lt;/span&gt;python3 scope_guard.py scanme.nmap.org  
ALLOWED

&lt;span class="nv"&gt;$ &lt;/span&gt;python3 scope_guard.py &lt;span class="nt"&gt;--allow-lab&lt;/span&gt; 10.10.11.42
ALLOWED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Default blocks:&lt;/strong&gt; RFC1918, loopback, link-local, multicast, cloud metadata endpoints (&lt;code&gt;169.254.169.254&lt;/code&gt;, &lt;code&gt;metadata.google.internal&lt;/code&gt;), &lt;code&gt;.local&lt;/code&gt;/&lt;code&gt;.internal&lt;/code&gt; domains.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;--allow-lab&lt;/code&gt; flag:&lt;/strong&gt; Opens only well-known lab ranges for HTB/Offsec without disabling the rest of the guard:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;10.10.0.0/16&lt;/code&gt; — HackTheBox classic&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;10.129.0.0/16&lt;/code&gt; — HackTheBox Enterprise&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;10.11.0.0/16&lt;/code&gt; — Offsec/OSCP labs
Metadata endpoints and loopback are &lt;strong&gt;hardcoded always-blocked&lt;/strong&gt; — &lt;code&gt;--allow-lab&lt;/code&gt; cannot override them.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Setup (Kali / Ubuntu 24.04)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Denisijcu/clawsec.git
&lt;span class="nb"&gt;cd &lt;/span&gt;clawsec
bash setup_vm.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script handles everything: &lt;code&gt;nmap&lt;/code&gt;, &lt;code&gt;whois&lt;/code&gt;, &lt;code&gt;python3&lt;/code&gt;, Node.js 20, pnpm, OpenClaw installation, skill copy to &lt;code&gt;~/.openclaw/skills/clawsec/&lt;/code&gt;, allowlist seed, and self-tests.&lt;/p&gt;

&lt;p&gt;Then onboard OpenClaw:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openclaw onboard     &lt;span class="c"&gt;# set API key + connect Telegram/Discord&lt;/span&gt;
openclaw gateway start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;From any connected channel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/clawsec scanme.nmap.org                              &lt;span class="c"&gt;# quick scan&lt;/span&gt;
/clawsec example.com full                             &lt;span class="c"&gt;# all 65535 ports  &lt;/span&gt;
/clawsec 10.10.11.42 quick &lt;span class="nt"&gt;--htb&lt;/span&gt;                      &lt;span class="c"&gt;# HTB machine&lt;/span&gt;
/clawsec example.com stealth &lt;span class="nt"&gt;--modules&lt;/span&gt; ports,whois,subdomains
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or run the scripts directly for debugging:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 ~/.openclaw/skills/clawsec/scope_guard.py scanme.nmap.org
python3 ~/.openclaw/skills/clawsec/recon.py &lt;span class="nt"&gt;--target&lt;/span&gt; scanme.nmap.org &lt;span class="nt"&gt;--scan&lt;/span&gt; quick
&lt;span class="nb"&gt;cat&lt;/span&gt; /tmp/clawsec_results.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Tests &amp;amp; CI
&lt;/h2&gt;

&lt;p&gt;30 unit tests across two suites:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 tests/test_scope_guard.py   &lt;span class="c"&gt;# 19 tests — scope validation&lt;/span&gt;
python3 tests/test_risk.py          &lt;span class="c"&gt;# 11 tests — version risk scoring&lt;/span&gt;

Ran 19 tests &lt;span class="k"&gt;in &lt;/span&gt;0.021s — OK
Ran 11 tests &lt;span class="k"&gt;in &lt;/span&gt;0.001s — OK
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CI runs on push/PR via GitHub Actions across Python 3.11, 3.12, and 3.13 with &lt;code&gt;nmap&lt;/code&gt; + &lt;code&gt;whois&lt;/code&gt; installed, including CLI smoke tests.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned Building This
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. The &lt;code&gt;SKILL.md&lt;/code&gt; description field is everything.&lt;/strong&gt;&lt;br&gt;
OpenClaw uses it to decide whether to activate the skill. Vague description = skill gets ignored. I spent more time on 5 lines of frontmatter than on the entire scope_guard implementation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Parse XML, not text.&lt;/strong&gt;&lt;br&gt;
Our first version parsed nmap's text output with regex. It worked until it didn't — edge cases everywhere. Switching to &lt;code&gt;-oX -&lt;/code&gt; (XML to stdout) made the parser bulletproof and gave us CPE data for free, which the LLM uses for CVE correlation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Scope guard is not optional.&lt;/strong&gt;&lt;br&gt;
If your skill executes shell commands based on user input, you need a validation layer. Especially via Telegram where anyone can message your bot. The &lt;code&gt;--allow-lab&lt;/code&gt; flag was the cleanest solution for the HTB use case — open only what you need, keep everything else locked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. WHOIS is a mess.&lt;/strong&gt;&lt;br&gt;
The default &lt;code&gt;whois&lt;/code&gt; command returns garbage for &lt;code&gt;.org&lt;/code&gt;, &lt;code&gt;.io&lt;/code&gt;, &lt;code&gt;.dev&lt;/code&gt;, and &lt;code&gt;.ai&lt;/code&gt; domains. The TLD fallback to authoritative servers fixed it cleanly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. The VM constraint is a feature.&lt;/strong&gt;&lt;br&gt;
Isolated environment = reproducible results, clean snapshots, and no risk to your main machine. Build your recon tools in a VM. Always.&lt;/p&gt;




&lt;h2&gt;
  
  
  Roadmap
&lt;/h2&gt;

&lt;p&gt;The MVP covers the full recon-to-report loop. What's next:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;V1.0 — Async Engine&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Celery + Redis task queue for parallel scans without blocking&lt;/li&gt;
&lt;li&gt;LangChain ReAct agent for intelligent tool chaining&lt;/li&gt;
&lt;li&gt;PostgreSQL for scan history and long-term context
&lt;strong&gt;V2.0 — Intelligence Platform&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Automatic tool chaining: LLM decides next step based on findings
(port 80 found → auto-run &lt;code&gt;ffuf&lt;/code&gt;; SMB found → auto-run &lt;code&gt;enum4linux&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;ChromaDB RAG: &lt;em&gt;"What did you find on this host last week?"&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  - PDF/JSON report export directly from Telegram chat
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Repo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Denisijcu/clawsec" rel="noopener noreferrer"&gt;github.com/Denisijcu/clawsec&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Built by &lt;strong&gt;Denis&lt;/strong&gt; @ &lt;a href="https://github.com/vertex-coders" rel="noopener noreferrer"&gt;Vertex Coders LLC&lt;/a&gt; — Miami, FL&lt;br&gt;
AI Automation &amp;amp; Cybersecurity | HTB Creator Program&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Submitted to the DEV Community OpenClaw in Action Challenge — April 2026&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Automate the tedious recon. Focus on the exploitation."&lt;/em&gt; 🦞&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83v0on706f1l49z306d0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83v0on706f1l49z306d0.png" alt="ClawSec Report | Vertex Coders LLC | Target: scanme.nmap.org (45.33.32.156)  "&gt;&lt;/a&gt; &lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>openclawchallenge</category>
      <category>openclaw</category>
      <category>security</category>
    </item>
  </channel>
</rss>
