<?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>DEV Community: Yoandy Ramirez Delgado</title>
    <description>The latest articles on DEV Community by Yoandy Ramirez Delgado (@yoandy).</description>
    <link>https://dev.to/yoandy</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3931672%2Ff72ae885-6254-456e-9726-998d0c2bdb6e.png</url>
      <title>DEV Community: Yoandy Ramirez Delgado</title>
      <link>https://dev.to/yoandy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yoandy"/>
    <language>en</language>
    <item>
      <title>Building an AI-Assisted Pentesting Platform Without Creating an Auto-Pwn</title>
      <dc:creator>Yoandy Ramirez Delgado</dc:creator>
      <pubDate>Wed, 02 Sep 2026 20:27:32 +0000</pubDate>
      <link>https://dev.to/evolve-space/building-an-ai-assisted-pentesting-platform-without-creating-an-auto-pwn-4jgd</link>
      <guid>https://dev.to/evolve-space/building-an-ai-assisted-pentesting-platform-without-creating-an-auto-pwn-4jgd</guid>
      <description>&lt;p&gt;AI agents are becoming increasingly capable of interacting with tools.&lt;/p&gt;

&lt;p&gt;In cybersecurity, that creates an obvious opportunity: let an agent inspect a target, run reconnaissance, interpret the output and decide what to test next.&lt;/p&gt;

&lt;p&gt;It also creates an obvious problem.&lt;/p&gt;

&lt;p&gt;What happens when the agent decides to do something that should not be done?&lt;/p&gt;

&lt;p&gt;That question became one of the design constraints behind Dark Spear, an AI-assisted platform for authorised security assessments.&lt;/p&gt;

&lt;p&gt;Dark Spear was not designed as an autonomous exploitation engine.&lt;/p&gt;

&lt;p&gt;The goal was different:&lt;/p&gt;

&lt;p&gt;Build an automated pentesting workflow that can move through an engagement while keeping scope enforcement, dangerous tool approval and evidence integrity under human control.&lt;/p&gt;

&lt;p&gt;This article explains the architecture behind that decision.&lt;/p&gt;

&lt;p&gt;The problem with “autonomous pentesting”&lt;/p&gt;

&lt;p&gt;Automation is not new in offensive security.&lt;/p&gt;

&lt;p&gt;We already automate:&lt;/p&gt;

&lt;p&gt;Port scanning.&lt;/p&gt;

&lt;p&gt;Directory discovery.&lt;/p&gt;

&lt;p&gt;Technology fingerprinting.&lt;/p&gt;

&lt;p&gt;Credential testing.&lt;/p&gt;

&lt;p&gt;Vulnerability detection.&lt;/p&gt;

&lt;p&gt;OSINT collection.&lt;/p&gt;

&lt;p&gt;Report generation.&lt;/p&gt;

&lt;p&gt;The difference with AI agents is that they can dynamically decide what to do next.&lt;/p&gt;

&lt;p&gt;That flexibility is useful.&lt;/p&gt;

&lt;p&gt;A deterministic scanner can only execute what its author anticipated.&lt;/p&gt;

&lt;p&gt;An agent can potentially react to unexpected output.&lt;/p&gt;

&lt;p&gt;But flexibility introduces a new trust boundary.&lt;/p&gt;

&lt;p&gt;If an AI agent has access to security tools, the system needs to answer several questions:&lt;/p&gt;

&lt;p&gt;What targets is the agent allowed to interact with?&lt;/p&gt;

&lt;p&gt;What tools can it execute?&lt;/p&gt;

&lt;p&gt;Which actions require explicit human approval?&lt;/p&gt;

&lt;p&gt;Can the client-side agent bypass restrictions?&lt;/p&gt;

&lt;p&gt;How are findings verified?&lt;/p&gt;

&lt;p&gt;What evidence proves a finding?&lt;/p&gt;

&lt;p&gt;Can the final report be defended and reproduced?&lt;/p&gt;

&lt;p&gt;Dark Spear treats those questions as architecture problems rather than prompt engineering problems.&lt;/p&gt;

&lt;p&gt;Architecture overview&lt;/p&gt;

&lt;p&gt;The platform has three major components.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Browser-side assessment engine&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The assessment engine contains two execution modes.&lt;/p&gt;

&lt;p&gt;The first is deterministic.&lt;/p&gt;

&lt;p&gt;The second is agentic.&lt;/p&gt;

&lt;p&gt;The browser orchestrates the workflow and communicates with the backend only when an approved binary needs to be executed.&lt;/p&gt;

&lt;p&gt;The main engine includes:&lt;/p&gt;

&lt;p&gt;PTES phase orchestration.&lt;/p&gt;

&lt;p&gt;Probe definitions.&lt;/p&gt;

&lt;p&gt;Vulnerability knowledge bases.&lt;/p&gt;

&lt;p&gt;Finding heuristics.&lt;/p&gt;

&lt;p&gt;LLM agent orchestration.&lt;/p&gt;

&lt;p&gt;Ollama Cloud integration.&lt;/p&gt;

&lt;p&gt;Bridge client communication.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Trusted backend bridge&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The backend is the enforcement point.&lt;/p&gt;

&lt;p&gt;This is deliberate.&lt;/p&gt;

&lt;p&gt;The browser is not trusted to enforce security boundaries.&lt;/p&gt;

&lt;p&gt;The backend applies:&lt;/p&gt;

&lt;p&gt;Tool allowlisting.&lt;/p&gt;

&lt;p&gt;Target scope locking.&lt;/p&gt;

&lt;p&gt;PTES phase gates.&lt;/p&gt;

&lt;p&gt;Dangerous action approval.&lt;/p&gt;

&lt;p&gt;Finding persistence.&lt;/p&gt;

&lt;p&gt;Evidence hashing.&lt;/p&gt;

&lt;p&gt;Encrypted API key storage.&lt;/p&gt;

&lt;p&gt;The client can request an action.&lt;/p&gt;

&lt;p&gt;The server decides whether that action is allowed.&lt;/p&gt;

&lt;p&gt;That separation is fundamental when an AI agent can generate commands dynamically.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;SecOps reporting console&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The third component is the operational layer.&lt;/p&gt;

&lt;p&gt;Security testing is only part of an engagement.&lt;/p&gt;

&lt;p&gt;The results need to be reviewed, correlated and communicated.&lt;/p&gt;

&lt;p&gt;The console provides views for:&lt;/p&gt;

&lt;p&gt;Active engagements.&lt;/p&gt;

&lt;p&gt;Tool approval.&lt;/p&gt;

&lt;p&gt;Findings.&lt;/p&gt;

&lt;p&gt;Critical vulnerabilities.&lt;/p&gt;

&lt;p&gt;Attack graphs.&lt;/p&gt;

&lt;p&gt;MITRE ATT&amp;amp;CK mapping.&lt;/p&gt;

&lt;p&gt;OSINT.&lt;/p&gt;

&lt;p&gt;Governance.&lt;/p&gt;

&lt;p&gt;Risk maturity.&lt;/p&gt;

&lt;p&gt;Remediation planning.&lt;/p&gt;

&lt;p&gt;Reporting.&lt;/p&gt;

&lt;p&gt;The goal was to avoid treating the scanning engine and the reporting system as separate projects.&lt;/p&gt;

&lt;p&gt;They are parts of the same workflow.&lt;/p&gt;

&lt;p&gt;Deterministic mode versus LLM agents&lt;/p&gt;

&lt;p&gt;One of the design decisions was to avoid making the LLM mandatory.&lt;/p&gt;

&lt;p&gt;The platform supports two modes.&lt;/p&gt;

&lt;p&gt;Deterministic playbooks&lt;/p&gt;

&lt;p&gt;The deterministic mode follows a curated catalogue of security probes.&lt;/p&gt;

&lt;p&gt;It does not require an LLM.&lt;/p&gt;

&lt;p&gt;It does not consume inference tokens.&lt;/p&gt;

&lt;p&gt;And its execution path is reproducible.&lt;/p&gt;

&lt;p&gt;The probes cover multiple categories:&lt;/p&gt;

&lt;p&gt;Injection&lt;/p&gt;

&lt;p&gt;SQL injection.&lt;/p&gt;

&lt;p&gt;NoSQL injection.&lt;/p&gt;

&lt;p&gt;Reflected XSS.&lt;/p&gt;

&lt;p&gt;Open redirects.&lt;/p&gt;

&lt;p&gt;Generic IDOR checks.&lt;/p&gt;

&lt;p&gt;Authentication and sessions&lt;/p&gt;

&lt;p&gt;Default credentials.&lt;/p&gt;

&lt;p&gt;Cookie security attributes.&lt;/p&gt;

&lt;p&gt;Missing security headers.&lt;/p&gt;

&lt;p&gt;JWT testing&lt;/p&gt;

&lt;p&gt;Weak HS256 secret cracking performed locally.&lt;/p&gt;

&lt;p&gt;alg=none validation where applicable.&lt;/p&gt;

&lt;p&gt;Active reconnaissance&lt;/p&gt;

&lt;p&gt;Technology fingerprinting.&lt;/p&gt;

&lt;p&gt;Content discovery.&lt;/p&gt;

&lt;p&gt;robots.txt analysis.&lt;/p&gt;

&lt;p&gt;CORS configuration.&lt;/p&gt;

&lt;p&gt;HTTP TRACE exposure.&lt;/p&gt;

&lt;p&gt;Code and configuration exposure&lt;/p&gt;

&lt;p&gt;Accessible .git directories.&lt;/p&gt;

&lt;p&gt;Environment files.&lt;/p&gt;

&lt;p&gt;Backup files.&lt;/p&gt;

&lt;p&gt;Source maps.&lt;/p&gt;

&lt;p&gt;Public API documentation.&lt;/p&gt;

&lt;p&gt;Metrics endpoints.&lt;/p&gt;

&lt;p&gt;Secrets exposed in JavaScript bundles.&lt;/p&gt;

&lt;p&gt;Cloud attack surface&lt;/p&gt;

&lt;p&gt;Passive WAF and CDN fingerprinting.&lt;/p&gt;

&lt;p&gt;Cloud infrastructure hints.&lt;/p&gt;

&lt;p&gt;Public storage references.&lt;/p&gt;

&lt;p&gt;SSRF checks against cloud metadata services within authorised scope.&lt;/p&gt;

&lt;p&gt;OSINT&lt;/p&gt;

&lt;p&gt;DNS records.&lt;/p&gt;

&lt;p&gt;RDAP and WHOIS data.&lt;/p&gt;

&lt;p&gt;Certificate transparency.&lt;/p&gt;

&lt;p&gt;Historical URLs.&lt;/p&gt;

&lt;p&gt;The important part is not only what the probes execute.&lt;/p&gt;

&lt;p&gt;It is how findings are evaluated.&lt;/p&gt;

&lt;p&gt;Why finding heuristics should be probe-local&lt;/p&gt;

&lt;p&gt;A common source of false positives in automated security workflows is context contamination.&lt;/p&gt;

&lt;p&gt;Imagine a scanner that accumulates all output generated during an assessment phase.&lt;/p&gt;

&lt;p&gt;A finding heuristic later searches the entire accumulated output for a pattern.&lt;/p&gt;

&lt;p&gt;A signal produced by probe A might accidentally trigger a finding that belongs to probe B.&lt;/p&gt;

&lt;p&gt;Dark Spear avoids that by evaluating each probe against its own evidence.&lt;/p&gt;

&lt;p&gt;The model is:&lt;/p&gt;

&lt;p&gt;Probe → Evidence → Probe-specific heuristic → Proposed finding&lt;/p&gt;

&lt;p&gt;Rather than:&lt;/p&gt;

&lt;p&gt;Phase → Large output blob → Generic heuristic → Finding&lt;/p&gt;

&lt;p&gt;This makes the relationship between a finding and its evidence easier to understand and debug.&lt;/p&gt;

&lt;p&gt;It also improves reproducibility.&lt;/p&gt;

&lt;p&gt;If a finding is incorrect, the auditor can inspect the exact probe that generated it.&lt;/p&gt;

&lt;p&gt;Adding an LLM without making it the authority&lt;/p&gt;

&lt;p&gt;The second execution mode uses a ReAct-style agent.&lt;/p&gt;

&lt;p&gt;The agent can analyse the current state and decide which command or action should be attempted next.&lt;/p&gt;

&lt;p&gt;This is useful when the deterministic catalogue does not cover a particular scenario.&lt;/p&gt;

&lt;p&gt;However, the agent does not become the enforcement authority.&lt;/p&gt;

&lt;p&gt;The execution flow remains conceptually similar to this:&lt;/p&gt;

&lt;p&gt;The agent proposes an action.&lt;/p&gt;

&lt;p&gt;The client sends an execution request.&lt;/p&gt;

&lt;p&gt;The backend validates the target.&lt;/p&gt;

&lt;p&gt;The backend validates the PTES phase.&lt;/p&gt;

&lt;p&gt;The backend validates the tool.&lt;/p&gt;

&lt;p&gt;Dangerous actions can require explicit operator approval.&lt;/p&gt;

&lt;p&gt;Only then can the command execute.&lt;/p&gt;

&lt;p&gt;This creates an important separation.&lt;/p&gt;

&lt;p&gt;The LLM is responsible for reasoning.&lt;/p&gt;

&lt;p&gt;The backend is responsible for enforcement.&lt;/p&gt;

&lt;p&gt;The human operator remains responsible for approval.&lt;/p&gt;

&lt;p&gt;Human-in-the-loop is not a marketing checkbox&lt;/p&gt;

&lt;p&gt;“Human-in-the-loop” is becoming a popular phrase.&lt;/p&gt;

&lt;p&gt;Sometimes it simply means that a person can watch an AI system running.&lt;/p&gt;

&lt;p&gt;That is not enough.&lt;/p&gt;

&lt;p&gt;In a security assessment, human control should exist at meaningful decision points.&lt;/p&gt;

&lt;p&gt;Dark Spear introduces operator review at two levels.&lt;/p&gt;

&lt;p&gt;Tool execution&lt;/p&gt;

&lt;p&gt;Potentially dangerous actions can require explicit approval.&lt;/p&gt;

&lt;p&gt;Findings&lt;/p&gt;

&lt;p&gt;A proposed finding does not automatically become part of the final report.&lt;/p&gt;

&lt;p&gt;The operator reviews it before accepting it.&lt;/p&gt;

&lt;p&gt;This matters because AI-generated findings can sound convincing even when the underlying evidence is weak.&lt;/p&gt;

&lt;p&gt;The system should not confuse a plausible explanation with a validated vulnerability.&lt;/p&gt;

&lt;p&gt;Evidence integrity and chain of custody&lt;/p&gt;

&lt;p&gt;A finding should not only contain a description.&lt;/p&gt;

&lt;p&gt;It should contain the evidence that supports it.&lt;/p&gt;

&lt;p&gt;When a finding is accepted, Dark Spear persists its evidence and generates an integrity hash.&lt;/p&gt;

&lt;p&gt;This creates a more defensible workflow.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;p&gt;Why did the AI say this vulnerability exists?&lt;/p&gt;

&lt;p&gt;The reviewer can ask:&lt;/p&gt;

&lt;p&gt;What evidence produced this finding?&lt;/p&gt;

&lt;p&gt;That distinction is particularly important in professional engagements.&lt;/p&gt;

&lt;p&gt;The report should be derived from validated technical evidence.&lt;/p&gt;

&lt;p&gt;Not from the memory of a conversation between a model and an operator.&lt;/p&gt;

&lt;p&gt;Mapping technical findings to security frameworks&lt;/p&gt;

&lt;p&gt;Technical findings need different forms of context depending on the audience.&lt;/p&gt;

&lt;p&gt;A developer may need remediation steps.&lt;/p&gt;

&lt;p&gt;A security manager may need risk prioritisation.&lt;/p&gt;

&lt;p&gt;A compliance team may need regulatory context.&lt;/p&gt;

&lt;p&gt;Dark Spear enriches accepted findings with mappings such as:&lt;/p&gt;

&lt;p&gt;CVSS v3.1.&lt;/p&gt;

&lt;p&gt;CWE.&lt;/p&gt;

&lt;p&gt;OWASP.&lt;/p&gt;

&lt;p&gt;MITRE ATT&amp;amp;CK.&lt;/p&gt;

&lt;p&gt;ISO 27001.&lt;/p&gt;

&lt;p&gt;ENS.&lt;/p&gt;

&lt;p&gt;NIS2.&lt;/p&gt;

&lt;p&gt;GDPR.&lt;/p&gt;

&lt;p&gt;The mapping is finding-specific.&lt;/p&gt;

&lt;p&gt;The goal is to avoid assigning frameworks purely based on severity.&lt;/p&gt;

&lt;p&gt;A critical vulnerability is not automatically associated with every critical MITRE technique.&lt;/p&gt;

&lt;p&gt;The relationship should come from the actual type of finding.&lt;/p&gt;

&lt;p&gt;MITRE ATT&amp;amp;CK should describe what happened&lt;/p&gt;

&lt;p&gt;MITRE mapping is another area where automation can become misleading.&lt;/p&gt;

&lt;p&gt;A static matrix that always shows the same techniques looks impressive.&lt;/p&gt;

&lt;p&gt;But it does not necessarily represent the actual assessment.&lt;/p&gt;

&lt;p&gt;Dark Spear maps findings to ATT&amp;amp;CK techniques based on the characteristics of the finding.&lt;/p&gt;

&lt;p&gt;The objective is to represent detected behaviour rather than display a decorative coverage matrix.&lt;/p&gt;

&lt;p&gt;The project currently focuses on techniques relevant to non-destructive web security assessments.&lt;/p&gt;

&lt;p&gt;Destructive post-exploitation and impact-oriented behaviour are deliberately excluded from the intended scope.&lt;/p&gt;

&lt;p&gt;That is a product decision as much as a security decision.&lt;/p&gt;

&lt;p&gt;A professional assessment platform should understand what it is not supposed to do.&lt;/p&gt;

&lt;p&gt;The backend as the trust boundary&lt;/p&gt;

&lt;p&gt;One of the strongest lessons from building this architecture is that AI agents should be treated as untrusted clients.&lt;/p&gt;

&lt;p&gt;That statement may sound harsh.&lt;/p&gt;

&lt;p&gt;But it simplifies the security model.&lt;/p&gt;

&lt;p&gt;The agent can generate unexpected requests.&lt;/p&gt;

&lt;p&gt;It can misunderstand context.&lt;/p&gt;

&lt;p&gt;It can receive manipulated data from the target environment.&lt;/p&gt;

&lt;p&gt;It can attempt actions outside the intended workflow.&lt;/p&gt;

&lt;p&gt;Therefore:&lt;/p&gt;

&lt;p&gt;Never rely exclusively on the agent to enforce the rules governing the agent.&lt;/p&gt;

&lt;p&gt;The backend must independently enforce:&lt;/p&gt;

&lt;p&gt;Scope.&lt;/p&gt;

&lt;p&gt;Tools.&lt;/p&gt;

&lt;p&gt;Execution phases.&lt;/p&gt;

&lt;p&gt;Approval requirements.&lt;/p&gt;

&lt;p&gt;Prompt instructions are useful.&lt;/p&gt;

&lt;p&gt;Server-side enforcement is necessary.&lt;/p&gt;

&lt;p&gt;What I would improve next&lt;/p&gt;

&lt;p&gt;Dark Spear is an ongoing project.&lt;/p&gt;

&lt;p&gt;The architecture is designed to evolve.&lt;/p&gt;

&lt;p&gt;The areas I am most interested in exploring next include:&lt;/p&gt;

&lt;p&gt;Better evidence correlation.&lt;/p&gt;

&lt;p&gt;More structured attack path visualisation.&lt;/p&gt;

&lt;p&gt;Improved agent decision auditing.&lt;/p&gt;

&lt;p&gt;Stronger reproducibility controls.&lt;/p&gt;

&lt;p&gt;More lab validation scenarios.&lt;/p&gt;

&lt;p&gt;Better false-positive analysis.&lt;/p&gt;

&lt;p&gt;Additional enterprise reporting workflows.&lt;/p&gt;

&lt;p&gt;The interesting part of building an AI-assisted security platform is that the architecture keeps forcing new questions.&lt;/p&gt;

&lt;p&gt;How much autonomy is useful?&lt;/p&gt;

&lt;p&gt;Where should human approval happen?&lt;/p&gt;

&lt;p&gt;What should the agent be allowed to infer?&lt;/p&gt;

&lt;p&gt;What must be enforced independently?&lt;/p&gt;

&lt;p&gt;Those questions are more important than simply connecting an LLM to a terminal.&lt;/p&gt;

&lt;p&gt;Final thoughts&lt;/p&gt;

&lt;p&gt;The future of automated pentesting will probably include AI agents.&lt;/p&gt;

&lt;p&gt;But autonomous execution is not automatically better automation.&lt;/p&gt;

&lt;p&gt;In professional security assessments, control and accountability matter.&lt;/p&gt;

&lt;p&gt;A useful architecture should combine:&lt;/p&gt;

&lt;p&gt;Deterministic automation where reproducibility matters.&lt;/p&gt;

&lt;p&gt;AI reasoning where exploration adds value.&lt;/p&gt;

&lt;p&gt;Server-side enforcement for scope and execution.&lt;/p&gt;

&lt;p&gt;Human approval for meaningful decisions.&lt;/p&gt;

&lt;p&gt;Evidence-backed findings.&lt;/p&gt;

&lt;p&gt;Reporting that connects technical results to business and governance requirements.&lt;/p&gt;

&lt;p&gt;That is the design direction behind Dark Spear.&lt;/p&gt;

&lt;p&gt;Not an auto-pwn.&lt;/p&gt;

&lt;p&gt;A controlled, evidence-driven platform for authorised security assessments.&lt;/p&gt;

&lt;p&gt;The code is available under the MIT license:&lt;/p&gt;

&lt;p&gt;Dark Spear — Yoandy Ramírez Delgado&lt;/p&gt;

&lt;p&gt;The project is intended exclusively for authorised security testing, controlled laboratories and engagements with explicit permission.&lt;/p&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fupj4dn8hu7gkw01gjvvm.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fupj4dn8hu7gkw01gjvvm.png" alt=" " width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu18n9sw51f5asvvh3kn1.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu18n9sw51f5asvvh3kn1.png" alt=" " width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe1fsky3il22sjpq18rgj.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe1fsky3il22sjpq18rgj.png" alt=" " width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F40la9tnuwjw5qsdvoogp.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F40la9tnuwjw5qsdvoogp.png" alt=" " width="800" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6pe1s8np5ia2sco1ojkh.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6pe1s8np5ia2sco1ojkh.png" alt=" " width="799" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fll34x3nrfbmxqckqgnky.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fll34x3nrfbmxqckqgnky.png" alt=" " width="800" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd8mco7yi6104rkudbp3i.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd8mco7yi6104rkudbp3i.png" alt=" " width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhjcm6kgusihuyqh645rg.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhjcm6kgusihuyqh645rg.png" alt=" " width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpxxu56yy38bf3u84lasi.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpxxu56yy38bf3u84lasi.png" alt=" " width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7erwogi86h02df2u5oxy.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7erwogi86h02df2u5oxy.png" alt=" " width="800" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>redteam</category>
      <category>cybersecurity</category>
      <category>automatedpentesting</category>
    </item>
    <item>
      <title>Monté un mini-SOC en mi portátil con honeypot, Wazuh e IA local — proyecto del Máster en Evolve</title>
      <dc:creator>Yoandy Ramirez Delgado</dc:creator>
      <pubDate>Sat, 16 May 2026 15:34:13 +0000</pubDate>
      <link>https://dev.to/evolve-space/monte-un-mini-soc-en-mi-portatil-con-honeypot-wazuh-e-ia-local-proyecto-del-master-en-evolve-52mc</link>
      <guid>https://dev.to/evolve-space/monte-un-mini-soc-en-mi-portatil-con-honeypot-wazuh-e-ia-local-proyecto-del-master-en-evolve-52mc</guid>
      <description>&lt;p&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%2F0tdgg79n84e7t902r3pd.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%2F0tdgg79n84e7t902r3pd.png" alt=" " width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Monté un mini-SOC en mi portátil con honeypot, Wazuh e IA local — proyecto del Máster en Evolve
&lt;/h1&gt;

&lt;p&gt;Cuando empecé el proyecto final del Máster en Ciberseguridad en &lt;a href="https://evolve.es" rel="noopener noreferrer"&gt;Evolve&lt;/a&gt;, tenía claro qué &lt;em&gt;no&lt;/em&gt; quería: otro informe PDF que nadie vuelva a abrir. Quería algo que se viera en una entrevista en treinta segundos — logs reales, alertas que suben solas y una interfaz donde un analista pueda trabajar sin pelearse con veinte pestañas.&lt;/p&gt;

&lt;p&gt;Eso acabó siendo &lt;strong&gt;Valhalla SOC&lt;/strong&gt;: un centro de operaciones pequeño pero completo, montado con Docker en local, sin mandar datos a la nube.&lt;/p&gt;

&lt;h2&gt;
  
  
  El problema que quería resolver
&lt;/h2&gt;

&lt;p&gt;En muchos laboratorios de seguridad practicas con PCAPs viejos o ejercicios ya masticados. Yo quería el ruido de fondo de internet: bots que prueban &lt;code&gt;root&lt;/code&gt;/&lt;code&gt;admin&lt;/code&gt;, descargas con &lt;code&gt;wget&lt;/code&gt;, intentos de persistencia… pero en un entorno controlado, en mi máquina.&lt;/p&gt;

&lt;p&gt;La idea era encadenar tres piezas:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Una trampa&lt;/strong&gt; que parezca un servidor SSH de verdad.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Un SIEM&lt;/strong&gt; que clasifique lo que pasa ahí.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Una capa de análisis&lt;/strong&gt; que no dependa de APIs de pago ni de subir alertas a terceros.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  El entorno: de dónde salen los datos
&lt;/h2&gt;

&lt;p&gt;No hay un CSV de Kaggle detrás. El “dataset” son los propios atacantes (y el contenedor de laboratorio que lanza ataques automáticos).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cowrie&lt;/strong&gt; escucha en el puerto &lt;strong&gt;2222&lt;/strong&gt; y finge ser OpenSSH. Todo queda en JSON: logins, comandos, descargas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wazuh&lt;/strong&gt; lee esos logs, aplica decoders y reglas propias (fuerza bruta, malware, reverse shell, etc.) y los mapea a &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenSearch&lt;/strong&gt; (indexer de Wazuh) guarda el histórico para consultas y dashboards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama&lt;/strong&gt; en el host, con &lt;strong&gt;qwen2.5-coder:7b&lt;/strong&gt;, recibe las alertas más graves y devuelve un resumen corto — dos frases, sin novela.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Encima monté un &lt;strong&gt;frontend + API&lt;/strong&gt; (React y FastAPI) para tickets, workspace tipo kanban, mapa de amenazas, integración con VirusTotal y chat entre operadores. No sustituye a Wazuh Dashboard; lo complementa para el día a día del analista.&lt;/p&gt;

&lt;p&gt;El reto técnico no fue solo “que funcione”, sino &lt;strong&gt;que aguante en Windows&lt;/strong&gt; (sí, con Docker Desktop, Ollama fuera del compose y el clásico lío del event loop de Python con PostgreSQL async). La primera vez que levanté todo, el backend moría al arrancar y el frontend devolvía 500. Horas perdidas hasta entender que uvicorn en Windows necesita un bucle distinto. Cosas que no salen en los diagramas de arquitectura.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cómo lo monté (sin saltarme pasos)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Infra con Docker Compose&lt;/strong&gt;: Wazuh manager + indexer + dashboard, Cowrie, Postgres para la app, nginx como puerta de entrada, y un contenedor “attacker” para generar ruido en el laboratorio.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reglas a medida&lt;/strong&gt; en &lt;code&gt;wazuh_config/rules/&lt;/code&gt; — por ejemplo detección de fuerza bruta (varios fallos en ventana corta), login exitoso en honeypot, descargas con &lt;code&gt;wget&lt;/code&gt;/&lt;code&gt;curl&lt;/code&gt;, o intentos de desactivar el firewall.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integración Ollama&lt;/strong&gt; vía script en &lt;code&gt;wazuh_config/integrations/custom-ollama.py&lt;/code&gt;: solo alertas de nivel ≥ 5, prompt acotado, respuesta indexada como insight adicional.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt; con autenticación por cookie httpOnly, CSRF en mutaciones, auditoría de acciones y sincronización de alertas Wazuh → tickets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI&lt;/strong&gt; con tema oscuro/claro, workspace de incidentes, SIEM propio consultando OpenSearch, y runbooks enlazados a tickets.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Para levantarlo en limpio: clonar repo, copiar &lt;code&gt;.env.example&lt;/code&gt; a &lt;code&gt;.env&lt;/code&gt;, &lt;code&gt;ollama pull qwen2.5-coder:7b&lt;/code&gt;, &lt;code&gt;docker compose up -d --build&lt;/code&gt;, y los scripts de dashboards/monitores. En el README dejo el detalle; no voy a repetir aquí quince comandos.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resultados que sí se pueden enseñar
&lt;/h2&gt;

&lt;p&gt;En una sesión de laboratorio típica (con el honeypot expuesto y el atacante automático corriendo) el sistema se comporta como un SOC en miniatura:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Miles de eventos en el dashboard de Cowrie — en mis pruebas llegué a ver &lt;strong&gt;más de 8000 alertas críticas&lt;/strong&gt; en la vista dedicada, con timeline y top de IPs.&lt;/li&gt;
&lt;li&gt;Reglas disparando técnicas MITRE concretas (T1110 fuerza bruta, T1105 transferencia de herramientas, T1059 ejecución, etc.).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitores&lt;/strong&gt; en Wazuh cada pocos minutos para brute force, malware, reverse shell, persistencia en crontab…&lt;/li&gt;
&lt;li&gt;Tickets creados desde alertas Wazuh, asignables y movibles por estados en el workspace.&lt;/li&gt;
&lt;li&gt;Respuestas de Ollama del estilo: “están bajando un script desde una IP externa; tratar como intento de implant” — útil como primera lectura, no como veredicto legal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Capturas que recomiendo subir en el artículo (están en el repo bajo &lt;code&gt;docs/img/&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dashboard Cowrie en tiempo real (&lt;code&gt;04-cowrie-honeypot.png&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Cobertura MITRE en agente (&lt;code&gt;02-agente-mitre.png&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Pantalla de login de Valhalla (&lt;code&gt;11-login-valhalla.png&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lo que me llevé (y lo que cambiaría)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Aprendizajes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Un honeypot enseña más en una tarde que una semana leyendo solo teoría de SIEM.&lt;/li&gt;
&lt;li&gt;La IA local tiene sentido en SOC &lt;strong&gt;si acotas el prompt y el modelo&lt;/strong&gt;; no hace falta un LLM gigante para resumir una alerta.&lt;/li&gt;
&lt;li&gt;La parte dura es la &lt;strong&gt;integración&lt;/strong&gt; (certificados Wazuh, rutas de logs, webhooks, CORS, CSRF), no el CSS del login.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Si lo retomara mañana:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Endurecería producción (webhooks firmados, websockets autenticados, cero contraseñas por defecto).&lt;/li&gt;
&lt;li&gt;Documentaría un “modo demo” de un solo comando para corrección en clase.&lt;/li&gt;
&lt;li&gt;Separaría más el módulo honeypot del repo principal — ahora todo vive junto y pesa, pero para el máster tenía sentido mostrar el stack entero.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hice además una auditoría de seguridad sobre el propio código (auth, API, Docker) y salieron hallazgos serios — buena lección: &lt;strong&gt;montar un SOC no te convierte automáticamente en secure by default&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Código y cómo reproducirlo
&lt;/h2&gt;

&lt;p&gt;Todo el proyecto está en GitHub, público, con README paso a paso, manual de usuario y capturas:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repositorio:&lt;/strong&gt; &lt;a href="https://github.com/heindall92/Proyecto-Master-Ciberseguridad-Evolve-Yoandy" rel="noopener noreferrer"&gt;github.com/heindall92/Proyecto-Master-Ciberseguridad-Evolve-Yoandy&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/heindall92/Proyecto-Master-Ciberseguridad-Evolve-Yoandy.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stack principal: &lt;strong&gt;Python · FastAPI · React · Docker · Wazuh · Cowrie · Ollama · PostgreSQL · OpenSearch&lt;/strong&gt; (TypeScript ~60 % del código según GitHub).&lt;/p&gt;




&lt;p&gt;Proyecto académico desarrollado durante el &lt;strong&gt;Máster en Ciberseguridad de &lt;a href="https://evolve.es" rel="noopener noreferrer"&gt;Evolve&lt;/a&gt;&lt;/strong&gt;. Si estás montando tu primer laboratorio SOC en casa, espero que te ahorre algún tropezón con Docker — o al menos que sepas que no eres el único al que el backend le devuelve 500 un domingo a las once de la noche.&lt;/p&gt;

&lt;p&gt;¿Has montado honeypots en clase o en casa? Me interesa saber qué regla fue la primera que te hizo decir “vale, esto ya parece un SOC de verdad”.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>python</category>
      <category>infosec</category>
      <category>networking</category>
    </item>
  </channel>
</rss>
