// Tutorials

Bug Bounty Automation in Ruby

Build an API bug-hunting toolkit in Ruby from scratch — against a deliberately vulnerable lab API you run yourself. Stand up the target, map its surface, break object-level authorization, defeat weak auth, fuzz inputs, win a race, diff responses across runs, and package the whole thing into one scheduled scanner with a coordinated-disclosure report.

  1. Part 1The lab and your first probe

    9 min read
    RubySinatranet/httpBeginner

    Stand up a deliberately vulnerable API on your own machine, then write your first Ruby client that logs in and reads a profile back. No prior Ruby needed — by the end you have a target to hunt and a script that talks to it.

  2. Part 2Mapping the API

    4 min read
    RubyReconArraysHashes

    A spec tells you what an API wants you to see. We parse it into an inventory, then probe a wordlist to find the endpoints it left out — learning arrays, hashes, iteration, and the difference between a 404 and a 401 along the way.

  3. Part 3Breaking object-level authorization

    4 min read
    RubyIDORBOLAAuthorization

    Our token is for a normal user — so what happens when we ask for someone else's record with it? We build a checker that walks user IDs and flags every one we can read but shouldn't, then find the same flaw at the endpoint level. Along the way: methods that return values, ranges, and collecting results.

  4. Part 4Breaking authentication

    4 min read
    RubyAuthenticationTokensSecureRandom

    Part 3 abused what a token was allowed to do. Now we attack the token itself — and the login that hands it out. We forge an admin session from the username alone, then get one with a garbage password, and learn what a real token has to look like.

  5. Part 5Fuzzing the inputs

    4 min read
    RubyFuzzingMass AssignmentBlocks

    We stop sending the fields the API expects and start sending the ones it doesn't. A profile-update endpoint that merges whatever you give it becomes a way to set your own role and balance — mass assignment. We build a small fuzzer to find it, and learn blocks and yield doing it.

  6. Part 6Rate limits and races

    5 min read
    RubyConcurrencyThreadsRace Condition

    A one-time coupon behaves perfectly when you redeem it twice in a row — and falls apart when you redeem it ten times at once. We fire concurrent requests to double-spend a reward before the server can mark it used, learning threads and the check-then-act race that markets bots live and die on.

  7. Part 7Diffing across runs

    5 min read
    RubyDiffingFilesSets

    The best time to find a bug is right when it ships. We snapshot the API's surface to disk and diff each run against the last, so a new endpoint, a new field, or a changed status code surfaces on its own — the "what changed" signal a bounty bot runs on. Files, sets, and hash comparison.

  8. Part 8Reporting and wiring the bot

    6 min read
    RubyClassesOOPCapstone

    The finale. Eight scripts that each rebuild the same client become one Scanner class with a command-line interface, a scope allowlist that makes it physically unable to touch anything but the lab, and a coordinated-disclosure report as its output. Classes, OptionParser, and the ethics that belong in the code itself.

← All tutorials