<?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: LoFa Labs</title>
    <description>The latest articles on DEV Community by LoFa Labs (lofalabs).</description>
    <link>https://dev.to/lofalabs</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%2Forganization%2Fprofile_image%2F16640%2F6ccb16fd-1e27-46c4-b693-533dbd620948.jpg</url>
      <title>DEV Community: LoFa Labs</title>
      <link>https://dev.to/lofalabs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lofalabs"/>
    <language>en</language>
    <item>
      <title>We let hackers into a haunted server: building Haunted Honeypot with Kiro</title>
      <dc:creator>Mancho Lovette F.</dc:creator>
      <pubDate>Tue, 01 Dec 2026 21:00:34 +0000</pubDate>
      <link>https://dev.to/lofalabs/we-let-hackers-into-a-haunted-server-building-haunted-honeypot-with-kiro-3o9d</link>
      <guid>https://dev.to/lofalabs/we-let-hackers-into-a-haunted-server-building-haunted-honeypot-with-kiro-3o9d</guid>
      <description>&lt;p&gt;In its first four days on the internet, our server was attacked by &lt;strong&gt;274 different addresses&lt;/strong&gt;. They tried to log in &lt;strong&gt;1,826 times&lt;/strong&gt;, and &lt;strong&gt;55 of them got in&lt;/strong&gt;. Nobody told them the server existed. They found it on their own, because bots scan the whole internet all day.&lt;/p&gt;

&lt;p&gt;That was the plan. The server is a trap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Haunted Honeypot&lt;/strong&gt; is our entry for Kiroween 2026, in the Frankenstein category. It pretends to be a forgotten municipal records server, &lt;code&gt;records-srv-09&lt;/code&gt;, decommissioned in 2013. It lets attackers in, records everything they do, explains the attack in plain English, and writes the rules to protect a real server from it. We built it with &lt;a href="https://kiro.dev" rel="noopener noreferrer"&gt;Kiro&lt;/a&gt;, spec-first, and this post is about how that went: what worked, what broke, and what the bots did once they were inside.&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%2Fxz8m0fj8zux3447ijg9u.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%2Fxz8m0fj8zux3447ijg9u.png" alt="The Live Monitor: attempts, unique attackers and break-ins in real time" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What we built
&lt;/h2&gt;

&lt;p&gt;Four parts, stitched together like Frankenstein's creature:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Trap&lt;/strong&gt;: a fake SSH server on port 22. It accepts the weak passwords bots love, such as &lt;code&gt;root&lt;/code&gt; / &lt;code&gt;123456&lt;/code&gt;, and records every keystroke.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Ghost Shell&lt;/strong&gt;: it answers commands like &lt;code&gt;whoami&lt;/code&gt;, &lt;code&gt;uname -a&lt;/code&gt; and &lt;code&gt;cat /etc/passwd&lt;/code&gt; from a fake filesystem. &lt;strong&gt;Nothing the attacker types is ever executed.&lt;/strong&gt; It can ask Gemini to improvise replies to unusual commands, with a scripted fallback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Brain&lt;/strong&gt;: it reads the session logs, maps each move to &lt;a href="https://attack.mitre.org/" rel="noopener noreferrer"&gt;MITRE ATT&amp;amp;CK&lt;/a&gt; techniques, rates the session Class 1, 3 or 5, writes a plain-English lab note, and saves dangerous links in a safe "defanged" form like &lt;code&gt;hxxp://198[.]51[.]100[.]77/xmrig&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Containment&lt;/strong&gt;: it turns what attackers did into a hardening checklist and ready-to-run rules for a real server, such as turning off password logins or blocking outgoing crypto-mining ports.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All of it shows up in a dashboard themed as a "Frankenstein Lab Cam": dripping green titles, copper rivets, a blinking REC dot. Attack sessions are "tapes" you can replay keystroke by keystroke.&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%2F0u9xj9zsewwnbxr2p6io.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%2F0u9xj9zsewwnbxr2p6io.png" alt="Replaying an attack tape keystroke by keystroke" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Planning with Kiro specs
&lt;/h2&gt;

&lt;p&gt;We started with specs, not code. A Kiro spec is three files: &lt;code&gt;requirements.md&lt;/code&gt; (what it must do), &lt;code&gt;design.md&lt;/code&gt; (how) and &lt;code&gt;tasks.md&lt;/code&gt; (a checklist Kiro works through). We wrote five:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;trap-core&lt;/strong&gt;: the fake SSH server and ghost shell&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ghost-llm&lt;/strong&gt;: the Gemini improvisation, with a daily limit and a fallback&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;brain&lt;/strong&gt;: log ingestion, ATT&amp;amp;CK mapping, severity, lab notes and the API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;dashboard&lt;/strong&gt;: the Lab Cam interface&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tape-navigation&lt;/strong&gt;: triage for thousands of tapes, added after real traffic arrived&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Specs mattered here because the parts never call each other directly. The trap writes log files, the Brain reads them, and the dashboard asks the Brain through an API. If those hand-offs are vague, each part works alone and the whole thing fails. Writing the contracts down first meant Kiro built each part against the same agreement.&lt;/p&gt;

&lt;p&gt;The tape-navigation spec is a good example of specs evolving. After a few days live, the tape list was too long to scroll, and finding a specific kind of attack meant opening tapes one by one. So we wrote a new spec: filters by severity, date and technique, review marks, keyboard shortcuts, and a badge for attackers who keep coming back.&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%2Fo8e8ogrr2nf2barjun1h.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%2Fo8e8ogrr2nf2barjun1h.png" alt="Filtering tapes by severity, review status and technique" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Steering, a hook and property tests
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Steering files&lt;/strong&gt; are documents Kiro reads on every task. We had four:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;security.md&lt;/code&gt;: the one rule that matters most in a honeypot. &lt;strong&gt;Attacker input is data, never code.&lt;/strong&gt; No &lt;code&gt;eval&lt;/code&gt;, no &lt;code&gt;exec&lt;/code&gt;, no &lt;code&gt;subprocess&lt;/code&gt; on anything an attacker sends; safe YAML loading; escaped rendering in the dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;product.md&lt;/code&gt;: the lab's vocabulary (specimen, tape, lab voltage, containment), so the UI, the API and the lab notes all use the same words.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;design.md&lt;/code&gt;: the colours, fonts and spacing of the Lab Cam theme, which Kiro applied to every page.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tech.md&lt;/code&gt;: the stack and conventions. We added a rule here after Kiro corrupted two files on Windows (more on that below), and it did not happen again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;An agent hook&lt;/strong&gt; runs every time a Python file in the trap or its tests is saved: Kiro runs &lt;code&gt;ruff&lt;/code&gt; (style), &lt;code&gt;bandit&lt;/code&gt; (security) and &lt;code&gt;pytest&lt;/code&gt;. The trap is the only code attackers touch, so a security mistake there gets flagged the moment it is written, not in review.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Property-based tests&lt;/strong&gt; check rules against thousands of random inputs instead of a few hand-picked ones, using Hypothesis in Python and fast-check in TypeScript. For example: "no input crashes the shell or reaches &lt;code&gt;subprocess&lt;/code&gt;", and "two attackers' sessions never leak into each other". The project ended with over 500 automated tests.&lt;/p&gt;

&lt;p&gt;We also used Claude (Anthropic) as an assistant alongside Kiro, for planning, reviews, debugging and deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  What broke, and what we learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"All tests pass" can still mean broken.&lt;/strong&gt; The Brain passed its tests and the dashboard passed its tests, but together the dashboard crashed. The Brain sent severity as &lt;code&gt;"Class 5 — Critical"&lt;/code&gt; while the dashboard expected &lt;code&gt;"Class_5"&lt;/code&gt;. The fix: save real API responses as fixtures and test the dashboard against them. Lesson: test the hand-offs between parts, not just the parts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An AI edit can corrupt a file quietly.&lt;/strong&gt; A bulk edit on Windows turned every &lt;code&gt;i&lt;/code&gt; in &lt;code&gt;main.tsx&lt;/code&gt; into &lt;code&gt;m&lt;/code&gt; and every line break into an invisible null character. Another turned &lt;code&gt;—&lt;/code&gt; into &lt;code&gt;â€”&lt;/code&gt;. The tests did not catch the first, because no test imports &lt;code&gt;main.tsx&lt;/code&gt;. &lt;code&gt;git diff --stat&lt;/code&gt; did: a source file showed up as &lt;code&gt;Bin&lt;/code&gt; (binary). We added a steering rule, and it did not happen again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment has its own bugs.&lt;/strong&gt; On a Google Cloud VM, the web server crashed because an empty domain setting turned its config into something else. Later, rebuilt dashboards never appeared, because a shared Docker volume only fills on first creation. Each one took a few minutes to fix once we read the logs line by line, and much longer when we guessed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Port 22 has to belong to the trap.&lt;/strong&gt; That means moving your own admin login somewhere else first, without locking yourself out. We moved it to a hidden port reachable only through Google's private tunnel.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the attackers actually did
&lt;/h2&gt;

&lt;p&gt;The first bots arrived within minutes of the trap going live. A few patterns stood out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keyboard-walk passwords.&lt;/strong&gt; &lt;code&gt;1qaz2wsx#&lt;/code&gt; and &lt;code&gt;qazxsw&lt;/code&gt; are columns of a keyboard typed top to bottom. &lt;code&gt;Admin.123456&lt;/code&gt; and &lt;code&gt;Dell123&lt;/code&gt; target devices left with factory-style passwords.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Log in, then leave.&lt;/strong&gt; One bot guessed the root password, logged in, and disconnected after &lt;strong&gt;one second&lt;/strong&gt; without typing anything. That is typical of a password checker: it confirms the login works and reports it, so a second wave can come back later.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low and slow.&lt;/strong&gt; One address returned again and again, every few minutes, with &lt;strong&gt;one password per visit&lt;/strong&gt;. Tools like fail2ban ban an address after several failures in a short window; one guess at a time stays under that line. Seeing it needs a view of each attacker across many sessions, not one session at a time, which is what the repeat-attacker badge in our dashboard is for.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these became a tape with an ATT&amp;amp;CK label: &lt;strong&gt;T1110&lt;/strong&gt; for brute force, &lt;strong&gt;T1078&lt;/strong&gt; for a successful login with a valid account, and &lt;strong&gt;T1105&lt;/strong&gt; and &lt;strong&gt;T1496&lt;/strong&gt; when our own test attack downloaded and ran a crypto-miner, the way real bots do.&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%2Fwxxpmh0sat5ies1hzizj.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%2Fwxxpmh0sat5ies1hzizj.png" alt="Containment: hardening steps generated from what attackers did" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;The code is open source under the MIT licence, &lt;code&gt;.kiro&lt;/code&gt; folder included, so you can read every spec, steering file and hook we used: &lt;a href="https://github.com/lovettemancho-hue/haunted-honeypot" rel="noopener noreferrer"&gt;github.com/lovettemancho-hue/haunted-honeypot&lt;/a&gt;. The README has a Docker Compose quick start.&lt;/p&gt;

&lt;p&gt;The biggest thing Kiro changed for us was the order of work. Writing requirements and contracts first felt slow for a day, then saved us every day after: when parts disagreed, the spec said which one was wrong.&lt;/p&gt;

&lt;p&gt;If you run a server on the internet, it is already being knocked on. A honeypot is a safe way to see who is knocking.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Built by Mancho Lovette Feseng and Favour N. Emmanuel for Kiroween 2026.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>cybersecurity</category>
      <category>ai</category>
      <category>hackathon</category>
    </item>
  </channel>
</rss>
