Defend
Break my app
A runbook for the common request: "I have X on my machine, find the hole and report it."
The agent confirms scope, runs the read-only pass, picks one class, proves it, and writes the report. It does not spray.
Intake#
Ask four questions:
- What is the artifact and where is it?
- Do you own it, or is it in a bounty scope?
- Read-only, or may I send payloads?
- What proof do you need: note, report, PoC, or fix?
If the user says "just break it", default to read-only and one narrow active test on the same target. Stop at the first reproducible proof.
Gate#
An active test needs a record:
./beril verify --new app.example # publish the token, then:
./beril verify --verify app.example
or an explicit --owned acknowledgement. A scope file narrows hosts and paths:
./beril scan --target https://app.example --active --scope scope.txt
Without a record the active scan exits before the first payload. Details:
docs/verification.md.
Reader#
Pick a profile before writing:
engineer: the person who fixes it.bugbounty: program triage, CVSS and request pair.smb: one-page SMB report, traffic light, KVKK note.maintainer: open source disclosure.
Never mix two profiles in one report.
Web app#
./beril scan --target https://app.example
Read the scan. Open references/techniques.md and pick one class that fits the stack: auth, IDOR, injection, logic, upload, SSRF.
Then:
- Create two accounts.
- Capture one normal request.
- Change one field or object id.
- Compare the response with a clean baseline.
- Prove the impact with the smallest request pair.
Do not brute force. Do not dump a database.
APK#
./beril scan --target ./app.apk --deep
Then:
- Read the manifest and list exported components.
- Test the deep link with
adb shell am start. - Check
allowBackup, cleartext, and the JS bridge. - Hook one method with
scripts/frida_hook.json an emulator. - Prove data access or an action another app can trigger.
EXE or ELF#
./beril scan --target ./sample --deep
Then:
- Map imports, strings, and mitigations.
- Open the file in Ghidra or rizin.
- Pick one input source and follow it to a sink.
- Confirm in a debugger with a minimal input.
- Name the primitive and the blocked mitigation.
Do not run the sample on the host unless you have a snapshot.
Source tree#
./beril scan --target ./source --tools
Then:
- Triage the scanner hits by reachability.
- Trace one source to one sink by hand.
- Write a failing test or a request.
- Fix the check at the right layer.
- Add a regression test.
Firmware#
./beril scan --target ./firmware.bin --deep
Then:
- Extract with unblob.
- Map init, web root, config, and secrets.
- Read the update path.
- Test the management daemon from the LAN.
- Record a recovery method before any write.
Report#
./beril report --input scans/app.json --profile engineer --out rapor.md
Manual block when the renderer is not used:
## Title
<primitive> in <asset>
## Attacker position
No account / one account / LAN
## Precondition
Version, role, config
## Reproduction
1. ...
2. ...
## Result
The exact response, crash, or file
## Impact
Data, money, account, code execution
## Root cause
The missing check and the line
## Fix
The smallest correct change
## Evidence
Path to request log, screenshot, crash input
## Confidence
Confirmed / inferred
Stop conditions#
- The agreed proof exists.
- The next test needs a write or a restart and the user has not approved it.
- The target is shared hosting and a scan could affect neighbors.
- A finding is already a duplicate and the user only needs the note.
- The budget is spent or the WAF returns 429 twice.
- Active work lost its ownership record and the user has not renewed it.
Quality gate#
Before sending:
- Every claim has a link or a path.
- The request is minimal.
- The root cause names the missing check.
- The impact is business language, not only CVSS.
- The report says what was not tested.