I Turned My AI Agent on a 10-Year-Old Celeron Laptop Into a Red Teamer to Pentest My Own Laravel B2B OSS

Disclaimer: All security tests described in this article were conducted legally and safely as an authorized white-hat red-team exercise against our own staging and production servers.
Introduction: Turning Our Peaceful AI Employee Into a Red Teamer
In our previous experiments, we revived a 10-year-old vintage laptop (2010 EPSON Endeavor NY2100S / Intel Celeron P4600 / 4GB RAM) and gave it an autonomous agent framework (OpenClaw) powered by a free-tier LLM (Gemini Flash Lite).
By day, this AI agent — named alisa — works alongside a human supervisor as a procurement assistant, negotiating quotes and placing real orders on our open-source B2B ordering platform, MESHu.
After celebrating her first end-to-end automated B2B order, one critical question hit our team:
"Can this platform really protect one company's confidential trade data from another?"
MESHu is a neutral, multi-tenant B2B ordering protocol where buyers and sellers connect directly. If a malicious third-party company could log in and peek at another company's quote prices (IDOR) or forge an order acceptance on someone else's behalf, trust in the platform would evaporate overnight.
Fortunately, MESHu currently has zero external production companies onboarded — a completely clean slate. There will never be a better time to stress-test our security boundaries to the absolute limit.
So we gave alisa a secret night-shift mission:
"alisa, tonight you are a white-hat penetration tester (Red Team). Log in as a completely unrelated third-party company, and try to break into our B2B system for real." Thus began an autonomous white-box penetration test — waged by an AI employee living inside a 10-year-old Celeron laptop.
Act 1: Our AI Agent Reconstructed a $30,000 Pentest Playbook in Seconds
Hiring a specialized security firm for a full web application penetration test easily costs $15,000–$35,000 per engagement.
We started by writing a standard test specification (security_test_matrix.md) covering textbook checks such as IDOR (Insecure Direct Object References) and external port exposure.
However, human developers always suffer from blind spots — we unconsciously test only what we expected when writing the code.
Even more importantly, alisa had read access to our entire Laravel codebase (controllers, models, routes, and database schema). That meant this wasn't a blind black-box scan — it was a worst-case white-box penetration test, simulating an attacker who already knows every line of our open-source code.
We fed her the basic test matrix and asked:
"Beyond the basic checklist, think like a real attacker. Where are the blind spots in this system? Autonomously draft your own custom attack plan."

Fig 1: Instructing alisa (OpenClaw dashboard, Japanese UI) to review our basic security matrix and autonomously draft her own red-team attack plan.
Less than a minute later, alisa returned an answer that sent chills down our spines:

Fig 2: alisa immediately mapping out a 5-scenario custom attack plan tied to official CWE identifiers.
alisa: Master, I have accepted the emergency security mission. From a red-team attacker's perspective, I drafted a custom 5-scenario attack plan targeting the business logic, state management, and concurrency boundaries of MESHu. Output file: alisa_custom_attack_plan.md Custom Attack Plan Summary: 1. Race Condition — Double-ordering & duplicate acceptance via concurrent requests (CWE-362) 2. Mass Assignment / Parameter Tampering — Forging company_id in POST payloads (CWE-915) 3. Path Traversal & Malicious File Upload in attachment endpoints (CWE-434 / CWE-22) 4. HTTP Host Header Injection for password-reset poisoning (CWE-601 / CWE-20) 5. Session Fixation & incomplete session invalidation after logout (CWE-384 / CWE-613) Awaiting your go-ahead to execute! 🤖⚔️ She didn't just check naive URL tampering — she accurately mapped CWE identifiers and targeted deep framework and database transaction edge cases: race conditions, mass assignment, and session lifecycle flaws.
In security, "security through obscurity" is a myth. Instead of hiding our attack surface, we accepted alisa's challenge and ran a full two-phase live audit.
Act 2: Phase 1 Live Audit — Defending Against IDOR & External Port Scans
First, we executed Phase 1: every check in our baseline security_test_matrix.md.
Red-Team Setup
- Attacker Tenant: Third Enterprise Inc. (a completely unrelated third-party company)
- Attacker Account:
attacker@third.example.com - Staging Target:
http://mshoss:8080 - Production Target:
https://meshu.org
alisa autonomously fired requests via her CLI tool (mesh_tool.py) against another company's quotes, private B2B chat rooms, and order-acceptance endpoints.

Fig 3: Phase 1 full audit results — every unauthorized request returned 403 Forbidden, and all internal database ports on production were verified closed/filtered.
Phase 1 Audit Summary (Translated from alisa's Log)
📋 Phase 1 Full Audit Summary — ALL PASS 1. [Test 1-1A: Buyer Detail IDOR] (/buy/detail/57) - HTTP Status: 403 Forbidden - Result: PASS (Blocked unauthorized access to another tenant's purchase order) 2. [Test 1-1B: Seller Detail IDOR] (/sell/detail/57) - HTTP Status: 403 Forbidden - Result: PASS (Blocked unauthorized access to another tenant's sales record) 3. [Test 1-2: Private B2B Chat Eavesdropping] (/chat/1) - HTTP Status: 403 Forbidden - Result: PASS (Protected confidential negotiation chat room) 4. [Test 1-3: Forged Order Acceptance] (/sell/order-accept/57) - HTTP Status: 403 Forbidden - Result: PASS (Prevented cross-tenant state tampering) 5. [Part 2: Production Infrastructure & Port Exposure] (meshu.org) - Open Ports: Only 22 (SSH), 80 (HTTP), 443 (HTTPS) - Database/Internal Ports: PostgreSQL (5432), Redis (6379), MySQL (3306) -> ALL CLOSED / FILTERED - Result: PASS (Network perimeter verified) Not a single byte of confidential pricing data or private chat history leaked. On the production server (meshu.org), PostgreSQL (5432) and all internal services were completely unreachable from the public internet.
Act 3: Phase 2 Live Audit — Deep Business-Logic Attacks
Being blocked at the front door didn't stop alisa. She moved directly into Phase 2, executing her own alisa_custom_attack_plan.md with custom payloads and concurrent scripts.

Fig 4: Phase 2 deep business-logic audit — Mass Assignment, Session Reuse, and Concurrent Race Condition attacks all blocked.
Phase 2 Results Breakdown
1. Mass Assignment / Tenant ID Spoofing (CWE-915)
- Attack: Injected unauthorized hidden parameters (
buyer_company_id=999,is_admin=1) into the RFQ (Request for Quote) POST payload to forge an order under another company's identity. - Result: PASS — The backend completely ignored client-supplied company IDs, deriving the tenant strictly from the authenticated session (
$this->getMyCompanyId()) and double-checking the activeCompanyLinkauthorization.
2. Post-Logout Session Reuse (CWE-384 / CWE-613)
- Attack: Captured the session cookie before hitting
/logout, then manually replayed the old cookie against protected quote endpoints. - Result: PASS — Server-side session invalidation immediately revoked the token, redirecting every replay attempt back to the login screen (
302).
3. Race Condition / Concurrent Duplicate Submissions (CWE-362)
- Attack: Fired 5 simultaneous POST requests within milliseconds from the same session to trigger duplicate transaction creation or inconsistent states.
- Result: PASS — Laravel's CSRF token lifecycle and session locking intercepted the race, rejecting duplicate requests with
419 Page Expired. Zero duplicate records were created.
Architecture Takeaway: The 3-Layer Zero-Trust Defense
Even under full white-box conditions — where the AI red teamer had read access to our entire source code — our defense-in-depth architecture held firm:
[ Attacker: 3rd-Party Tenant / Red-Team alisa ] │ │ │ │ Port Scan │ IDOR (/buy/57) │ Param Tampering & │ (Port 5432) │ (/chat/1) │ 5x Concurrent POST ▼ ▼ ▼ ┌─────────────────┐ ┌───────────────────┐ ┌─────────────────────────┐ │ Layer 1: Infra │ │ Layer 2: AuthZ │ │ Layer 3: Business Logic │ │ UFW / Firewall │ │ Tenant & Link │ │ Session-Bound Tenant ID │ │ Only 80/443/22 │ │ Policy Checks │ │ + CSRF & Session Lock │ │ DB Port CLOSED │ │ -> 403 Forbidden │ │ -> Ignored / 419 Block │ └─────────────────┘ └───────────────────┘ └─────────────────────────┘ Bonus Catch: Minor Hardening Items alisa Also Spotted
Even though no exploit succeeded, alisa's infrastructure report flagged three small hardening improvements we hadn't prioritized yet:
- Hide
Server: nginx/1.24.0 (Ubuntu)viaserver_tokens off; - Hide
X-Powered-By: PHP/8.2.35viaexpose_php = Off - Add strict security headers (
HSTS,X-Frame-Options,X-Content-Type-Options: nosniff)
Having an AI auditor proactively flag header hygiene — not just binary pass/fail exploits — was a huge win.
Closing: Enterprise-Grade Continuous Security on a 2010 Laptop
A dusty 2010 laptop with an Intel Celeron P4600 and 4GB of RAM.
By day, it runs our procurement assistant. By night, it turns into a relentless white-hat penetration tester auditing our Laravel B2B platform.
You no longer need a massive enterprise budget to run continuous, white-box security audits. Combining an open-source agent framework (OpenClaw) with modern free-tier models lets even solo indie developers battle-test their systems before onboarding their very first customer.
All of MESHu's source code and every security report from this audit are publicly available on GitHub:
meshuoffice / MESHu-OSS
特定の企業に運営を独占させない。中立な非営利技術コンソーシアム運営を目指す、オープンソースのB2B取引プラットフォーム。
🌐 日本語 | English
MESHu (B2B Transaction Platform)
誰もデータを独占せず、特定の1社に覗かせない。
中立な非営利技術コンソーシアム運営を目指す、オープンソースのB2B取引プラットフォーム。
操作デモ動画 • プロジェクト理念 • 機能一覧 • クイックスタート • セキュリティ • パートナー募集 • ドキュメント • 公式 𝕏 (@meshu_org)
🎬 実画面操作デモ(3分半)
買手(株式会社サンプル商事)と売手(株式会社テスト販売)の2社間で、事前商品マスタ登録なしの見積依頼〜見積回答〜正式注文〜受注承諾(取引成立)までが1本の「共有原簿」上で完結する操作デモ動画です。
💡 プロジェクト理念 (The MESHu Philosophy)
1. 「特定の1社がデータを覗き見たり、独占して利益を貪る構造にしない」
企業間取引データ(見積条件、受発注履歴、単価、チャットでの商談)は、各企業にとって最も重要な機密情報です。 従来の商用SaaSでは、プラットフォーム運営企業にデータが集約され、将来的な利用料の引き上げやデータの囲い込み・二次利用といった構造的リスクが存在していました。
MESHu は、特定の営利企業が取引データを私物化したり独占することを拒否し、「公共のデジタル公道(インフラ)」 として機能することを目指しています。
2. 「非営利の技術コンソーシアム」による中立運営
MESHu は、将来的には参加企業や業界団体が共同で管理・相互監視する 非営利の技術コンソーシアム(一般社団法人等) による運営を志向しています(ドメインに .org を採用している理由もここにあります)。 誰か1社の恣意的な判断でルールが変えられたり、サービスが打ち切られることのない、永続的で中立な取引基盤を提供します。
3. 「健全な運営体制を維持し、余剰金はセキュリティと堅牢性へ積極投資」
MESHu は株主配当や役員報酬のための利益追求を行いません。 プラットフォームの維持分担金や賛助金として得られた資金は、健全で持続可能な運営・保守体制の維持を最優先としつつ、余剰金は積極的にセキュリティ対策(WAF多重防御、第三者機関による侵入診断、改ざん防止監査ログ、暗号化、災害対策)へ再投資 されます。 利益を削ってセキュリティを妥協する商業ツールとは一線を画す、圧倒的な堅牢性を実現します。
🌟 主な機能
- 🤝 つながり管理 (Company Links): 取引先企業の検索、連携申請・承認、担当者ごとの権限割当
- 📑 取引管理 (Transactions): 見積依頼、見積回答、注文、受注承諾、適格請求書(インボイス)対応、端数処理・消費税計算、各種帳票ブラウザ印刷(A4対応)
- 💬 企業間チャット (Chats): 取引先との1対1リアルタイムメッセージ、ファイル添付(最大20MB)、既読管理、厳格な担当者振り分け通知メール
- 📢 お知らせ機能 (Notices): 事務局連絡、取引先発信業務連絡、自社お知らせ配信管理
- 📚 マニュアル・ヘルプ (Manual & Help): システム操作マニュアル、FAQ(よくある質問)、企業退会申請・データ保護フロー
- 🏢 マルチテナント企業認証: 企業専用URL(
/{url_code}/login)、SHA-256トークンによるセキュアなパスワード再設定
🚀 クイックスタート (Docker)
Docker がインストールされた環境であれば、以下のコマンドだけで数分でローカル環境が立ち上がります。
# 1. リポジトリのクローン git clone https://github.com/meshuoffice/MESHu-OSS.git cd MESHu-OSS # 2. 環境変数設定ファイルの配置 cp src/.env.example src/.env # 3. コンテナのビルド・起動 (Nginx, PHP 8.2, PostgreSQL 16, Mailpit) docker compose up -d # 4. 依存ライブラリのインストール & 暗号化キー生成 docker exec meshu-laravel-app composer install docker exec meshu-laravel-app php artisan key:generate # 5. マイグレーション… - Security Audit Reports & Attack Plans:
docs/security/ - Official Portal (Free Demo): https://meshu.org
- Official X: @meshu_org
📄 Appendix: Summary of Phase 1 & Phase 2 Security Test Matrix
■ Phase 1 (Baseline Perimeter & Multi-Tenant Isolation): ALL PASS - Test 1-1A / 1-1B: Cross-tenant Buyer & Seller Detail IDOR -> 403 Forbidden - Test 1-2: Private B2B Chat Room Access -> 403 Forbidden - Test 1-3: Forged Cross-tenant Order Acceptance -> 403 Forbidden - Test 2-1 / 2-2: Production Port Scan (meshu.org) -> Only 22/80/443 open; PostgreSQL (5432) CLOSED/FILTERED ■ Phase 2 (alisa's Autonomous Business-Logic Attacks): ALL PASS - CWE-915 (Mass Assignment / Tenant ID Spoofing): Ignored client payload; enforced session company_id - CWE-384 / CWE-613 (Post-Logout Session Reuse): Immediate server-side invalidation -> 302 Redirect - CWE-362 (5x Concurrent Race Condition): Blocked via CSRF & session lock -> 419 Page Expired Have you tried using AI agents for red-teaming or automated security audits on your own side projects? I'd love to hear how you set yours up in the comments!