[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F3ST5EF0AXFD737V0WXGJ2":3,"skill-same:01M7F3ST5EF0AXFD737V0WXGJ2":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7F3ST5EF0AXFD737V0WXGJ2","race",null,"Race condition \u002F TOCTOU playbook — limit overrun (one-time codes used twice, gift cards spent twice), single-packet attack (last-byte sync) to force parallel processing, and state-confusion races (file upload + read, order before payment). Use when timing-sensitive logic could be abused — one-time codes, coupons\u002Fgift cards, balance or limit checks, double-spend.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Frace\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: race\ndescription: Race condition \u002F TOCTOU playbook — limit overrun (one-time codes used twice, gift cards spent twice), single-packet attack (last-byte sync) to force parallel processing, and state-confusion races (file upload + read, order before payment). Use when timing-sensitive logic could be abused — one-time codes, coupons\u002Fgift cards, balance or limit checks, double-spend.\nallowed-tools:\n  - http\n  - shell\n  - file_write\n---\n\n# Race \u002F TOCTOU playbook\n\nConfirm the target is in scope for stress-style testing (multiple parallel requests can look like abuse). Then identify the candidate operation.\n\nExecution rule: capture a real request for the operation and replay that request with concrete cookies\u002Fbody values. Never write literal placeholders such as `\u003Csess>` to files; ask once if a session or replayable request is missing.\n\n## Targets worth racing\n\n- Redeem a gift card \u002F promo code (does the second redeem succeed?)\n- Cast a vote \u002F claim a one-per-user reward\n- Withdraw \u002F transfer balance (does it deduct twice?)\n- Submit a 2FA code (can N parallel guesses each be checked against an unused-attempts counter?)\n- Apply a discount that's supposed to be once-per-cart\n- Send a friend \u002F invite request (creates duplicate rows \u002F privileges)\n- Confirm an email (mark verified twice with different addresses)\n- Upload then read a file (write `safe.png`, then race a swap to `evil.svg` before AV scans)\n\n## 1. Burp-style \"single packet attack\" (last-byte sync) — preferred\n\nModern servers buffer HTTP\u002F2 frames. The classic trick: send N requests where each is fully serialized *except* the last byte. Then in a single TCP write, flush the final byte of all N. The server receives them effectively simultaneously and dispatches them in parallel — bypassing nearly all software-side rate limiting.\n\nYou can do this with a small Go\u002FPython script. Skeleton (Python, HTTP\u002F2):\n\n```python\nimport asyncio, ssl\nimport httpx\n\nasync def main():\n    transport = httpx.AsyncHTTPTransport(http2=True)\n    async with httpx.AsyncClient(transport=transport, verify=False) as c:\n        # Build N partial requests, then race the last byte.\n        # In practice: use turbo-intruder or a Go h2 client for byte-level control.\n        ...\nasyncio.run(main())\n```\n\nFor the highest-fidelity version, use Burp Suite's **Turbo Intruder** (`race-single-packet-attack.py` template) — it's the de facto tool. The `shell` tool can run it if installed.\n\n## 2. Fallback: HTTP\u002F1.1 pipelined burst\n\nIf HTTP\u002F2 isn't available, fire N requests over a single keep-alive connection back-to-back without waiting for responses:\n\n```sh\n# 50 parallel uses of the same coupon code\nseq 50 | xargs -P 50 -I{} curl -s -X POST https:\u002F\u002Ftarget\u002Fredeem \\\n  -H 'Cookie: session=\u003Csess>' \\\n  -d 'code=GIFT100'\n```\n\nLess reliable than single-packet but often enough.\n\n## 3. Confirm a race actually happened\n\nFor each candidate operation, measure the *invariant* twice:\n\n- Before: query balance \u002F count \u002F state.\n- Fire N parallel requests.\n- After: query balance \u002F count \u002F state.\n\nIf invariant differs by more than 1× the per-request delta, you have a race. Example: gift card worth $50, used 5× before lockout → $250 credit. Confirmed.\n\n## 4. TOCTOU on file\u002Fauth flows\n\nTime-Of-Check \u002F Time-Of-Use bugs:\n\n- Upload + scan + serve: race the swap between AV scan and final write.\n- \"Is admin?\" check on session, then long-running task that uses the role: race a logout\u002Frole-change between the check and the use.\n- Symlink race on file-write tools that write through user-supplied paths.\n\n## 5. Mitigation patterns (so you know what defeats you)\n\nIf you see any of these, the race probably isn't winnable — refocus:\n\n- `SELECT ... FOR UPDATE` \u002F explicit row lock.\n- Optimistic concurrency: every update carries a `version` field that's CAS'd.\n- Idempotency keys on the request: server stores the key+result and replays.\n- `UNIQUE (user_id, code_id)` constraint with `ON CONFLICT DO NOTHING`.\n\n## Reporting\n\nRequired for a credible finding:\n- The exact race window measured (`N=50`, `mean=20ms apart`).\n- Before \u002F after invariant query results.\n- Concrete impact: \"$X credit overspent\" \u002F \"Y duplicate privileged rows created\" \u002F \"Z brute-force guesses processed before lockout\".\n\nA race with no measurable impact (e.g., creates a second pending order that the next cron job dedupes) is **info** at best.\n","# Race \u002F TOCTOU playbook\n\nConfirm the target is in scope for stress-style testing (multiple parallel requests can look like abuse). Then identify the candidate operation.\n\nExecution rule: capture a real request for the operation and replay that request with concrete cookies\u002Fbody values. Never write literal placeholders such as `\u003Csess>` to files; ask once if a session or replayable request is missing.\n\n## Targets worth racing\n\n- Redeem a gift card \u002F promo code (does the second redeem succeed?)\n- Cast a vote \u002F claim a one-per-user reward\n- Withdraw \u002F transfer balance (does it deduct twice?)\n- Submit a 2FA code (can N parallel guesses each be checked against an unused-attempts counter?)\n- Apply a discount that's supposed to be once-per-cart\n- Send a friend \u002F invite request (creates duplicate rows \u002F privileges)\n- Confirm an email (mark verified twice with different addresses)\n- Upload then read a file (write `safe.png`, then race a swap to `evil.svg` before AV scans)\n\n## 1. Burp-style \"single packet attack\" (last-byte sync) — preferred\n\nModern servers buffer HTTP\u002F2 frames. The classic trick: send N requests where each is fully serialized *except* the last byte. Then in a single TCP write, flush the final byte of all N. The server receives them effectively simultaneously and dispatches them in parallel — bypassing nearly all software-side rate limiting.\n\nYou can do this with a small Go\u002FPython script. Skeleton (Python, HTTP\u002F2):\n\n```python\nimport asyncio, ssl\nimport httpx\n\nasync def main():\n    transport = httpx.AsyncHTTPTransport(http2=True)\n    async with httpx.AsyncClient(transport=transport, verify=False) as c:\n        # Build N partial requests, then race the last byte.\n        # In practice: use turbo-intruder or a Go h2 client for byte-level control.\n        ...\nasyncio.run(main())\n```\n\nFor the highest-fidelity version, use Burp Suite's **Turbo Intruder** (`race-single-packet-attack.py` template) — it's the de facto tool. The `shell` tool can run it if installed.\n\n## 2. Fallback: HTTP\u002F1.1 pipelined burst\n\nIf HTTP\u002F2 isn't available, fire N requests over a single keep-alive connection back-to-back without waiting for responses:\n\n```sh\n# 50 parallel uses of the same coupon code\nseq 50 | xargs -P 50 -I{} curl -s -X POST https:\u002F\u002Ftarget\u002Fredeem \\\n  -H 'Cookie: session=\u003Csess>' \\\n  -d 'code=GIFT100'\n```\n\nLess reliable than single-packet but often enough.\n\n## 3. Confirm a race actually happened\n\nFor each candidate operation, measure the *invariant* twice:\n\n- Before: query balance \u002F count \u002F state.\n- Fire N parallel requests.\n- After: query balance \u002F count \u002F state.\n\nIf invariant differs by more than 1× the per-request delta, you have a race. Example: gift card worth $50, used 5× before lockout → $250 credit. Confirmed.\n\n## 4. TOCTOU on file\u002Fauth flows\n\nTime-Of-Check \u002F Time-Of-Use bugs:\n\n- Upload + scan + serve: race the swap between AV scan and final write.\n- \"Is admin?\" check on session, then long-running task that uses the role: race a logout\u002Frole-change between the check and the use.\n- Symlink race on file-write tools that write through user-supplied paths.\n\n## 5. Mitigation patterns (so you know what defeats you)\n\nIf you see any of these, the race probably isn't winnable — refocus:\n\n- `SELECT ... FOR UPDATE` \u002F explicit row lock.\n- Optimistic concurrency: every update carries a `version` field that's CAS'd.\n- Idempotency keys on the request: server stores the key+result and replays.\n- `UNIQUE (user_id, code_id)` constraint with `ON CONFLICT DO NOTHING`.\n\n## Reporting\n\nRequired for a credible finding:\n- The exact race window measured (`N=50`, `mean=20ms apart`).\n- Before \u002F after invariant query results.\n- Concrete impact: \"$X credit overspent\" \u002F \"Y duplicate privileged rows created\" \u002F \"Z brute-force guesses processed before lockout\".\n\nA race with no measurable impact (e.g., creates a second pending order that the next cron job dedupes) is **info** at best.\n",{"name":5,"description":7,"allowed-tools":24},[25,26,27],"http","shell","file_write","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Frace",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill race",{"tool":42,"command":43},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill race",{"tool":45,"command":46},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill race","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Frace\u002FSKILL.md",true,[],[51,58,63,70,77,84],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":59,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]