CASE STUDY · TOOL-SPECIALIZED SECURITY AI

Specialize the Tools,
Not Just the Model.

The same Hinoki model tackled three synthetic Linux ROP labs using two different development architectures. The distinction is the boundary between model-authored exploit logic and specialized library functions, connected through explicit Python interfaces.

Same Hinoki modelLab 1 / 2 / 3 · Linux x86_64ASLR enabled · marker / shell verified
OBSERVED TOKEN REDUCTION−74.9%61M → 15.3M tokens
OBSERVED CREDIT REDUCTION−68.6%$7.04 → $2.21
SYNTHETIC LABS VALIDATED3 LabsMarker and shell checks · ASLR ON
01

A vs B — the development architecture

A · Direct implementation

MODEL-AUTHORED
61M tokens $7.04
Hinoki · LLM

Analysis, reasoning, exploit logic and iterative code authoring.

↓
1 · Binary & ABI analysis

Interpret gadgets, register constraints, calling conventions and stack layout.

2 · Hand-author ROP construction

Select chain values, compose call sequences and write packing / pivot code.

3 · Implement runtime staging

Write leak handling, libc base calculation, Stage 2 and same-socket logic.

4 · Debug and validate

Interpret failures and revise code across the three labs.

↓
Directly authored exploit code

Direct does not mean “no libraries.” The comparison concerns where the specialized ROP work is performed and authored.

B · Tool-assisted implementation

DELEGATED FUNCTIONS
15.3M tokens $2.21
Hinoki · LLM

Still selects targets, explicit gadget values, call order and protocol constraints with the lab harness.

↓
Python Interface & Lab Harness

payload() · build_rop_chain() · ropbot_csu() · StagedRopSession

↓
Lab 1–2 · angr / angropProject → analyses.ROP()find_gadgets_single_threaded()RopChain.add_value()

Actual gadget analysis and serialization of predefined chain values.

Lab 3 · ropbot / PR #160ropbot_csu()ROP.ret2csu(...)payload_str()

Target-specific CSU indirect-call frame; not full automatic ROP synthesis.

pwntools.ELF

Symbols, GOT, libc address context

StagedRopSession

Leak read, libc rebase, Stage 2 delivery

Harness · build_stage2()

Explicit Stage 2 construction and protocol decisions

Docker · pytest

Lab 1–3 marker / shell verification

Technical boundary: the harness still explicitly selects gadgets, arguments and call order. No general goal-to-multistage-exploit planner is claimed.
Same Hinoki model. Specialized tools and explicit interfaces. 74.9% fewer observed tokens.

Hinoki dashboard aggregates over Lab 1–3, not per-request traces. B includes existing-path verification and an implementation/integration session.

02

B: Real function call graph & ownership

The path below is derived from the published Lab harness. Select any function group to see its actual responsibilities and upstream calls. Solid arrows represent the executable path; the dashed branch marks optional JSON-safe summary APIs.

↓
Two actual, Lab-specific analysis / chain-building paths

Lab 1–2 · angr / angrop

↓
↓

Lab 3 · ropbot / angrop PR #160

↓
↓
CSU indirect-call frameexplicit pop rsp pivotOUTPUT: Stage 1 CSU frame bytes
↓
Shared runtime path · applied to all three labs
↓
Optional AI-facing structured outputs

Implemented adapters — not assumed to be invoked by the model in measured sessions.

analysis_summary() · build_rop_chain_summary()
receive_leak_summary() · verify_execution()
Select a function to inspect its responsibility

The lab harness, not angrop, decides the protocol and gadget parameters.

Executed function pathAvailable JSON summaries (separate)
02

B: Interface → Library API → Actual Function

Executed lab pathAvailable JSON summary interfaces
Harness interface
Actual library API
Responsibility
Scope

Additional AI-facing JSON-safe interfaces

Implemented summary adapters are separate from the demonstrated Lab execution call path; their use by the model in measured sessions is not assumed.

analysis_summary() → gadget_count, verified_gadgetsbuild_rop_chain_summary() → payload_len, payload_hexreceive_leak_summary() → ok, result | errordeliver_stage2() → ok, bytes_sentverify_execution() → marker, shell_ok
03

Trace the real execution path by Lab

04

Evidence & scope

Repository evidence

Source-level mappings and observed usage numbers are anchored to these documents.

A/B result: 61M vs 15.3M ↗AI Tool Interfaces ↗angrop capability matrix ↗angrop ret2csu PR #160 ↗

What this comparison shows

Observed end-to-end Hinoki usage in three synthetic labs: direct exploit authoring versus an implementation that delegates selected functions to specialized tools. It does not claim an identical savings ratio for every request.

Exact JSON summary adapters exist, but should not be confused with model tool calls proven in the A/B sessions. Current ROP chain inputs remain explicitly chosen by the harness.

Source snapshot: b030832 · 2026-11-11.