Anti-AIClone

Log date · Mon

How to assess clone resistance after REA adds Frida

Published on · Updated

Use a fixed budget and withheld behavioral tests to assess replication. Our sample shows why runtime observations alone are not enough.

How should we assess clone resistance?

Assess clone resistance by comparing a reimplementation against behavioral tests withheld in advance, not merely by asking whether runtime observation is possible. In our synthetic pricing example, a candidate that memorized three observations matched all three but passed only one of four withheld inputs; a linear candidate passed 2/3 and 3/4 respectively.

This matters after REA merged Frida support on October 12, 2026: runtime observations can enter an analysis workflow, but observations alone are not a complete product. These results describe our example, not a protection score for a real app. [1][2]

Results for two candidates
QuestionResult
Memorized observationsObserved 3/3; withheld 1/4
Linear guessObserved 2/3; withheld 3/4
ImplicationMatching observations does not guarantee unseen behavior

The event and our setup

PR #1359 merged as commit 4a4ae9b into main at 14:01:58 UTC on 2026-10-12 (22:01:58 Beijing time). The latest release visible at the original check was 6.4.0 on October 11. Later releases now exist; a merge and a distributed package remain separate facts. [1][3] The pinned guide describes CLI/MCP process discovery, sessions and caller-authored scripts, and says REA does not install Frida server on a target. [2]

REA and Frida are unavailable on this machine. We used Node.js 20.19.5 on our own offline pricing rule as an illustration, not a test of the merge, an AI agent or a protection product. The rule charges 100 per item and subtracts 50 when quantity is at least five. One candidate assumes a linear price; the other memorizes three observations.

Captured output; each pair is expected/candidate price.
Node: v20.19.5
== expected/candidate quotes ==
linear observed: 1:100/100 2:200/200 5:450/500 pass=2/3
linear withheld: 0:0/0 3:300/300 4:400/400 6:550/600 pass=3/4
memorized observed: 1:100/100 2:200/200 5:450/450 pass=3/3
memorized withheld: 0:0/0 3:300/0 4:400/0 6:550/0 pass=1/4

Observation, explanation and replication

We deliberately included quantity five in the observed set: the linear model reveals its missing discount there, while the memorizing candidate gets a perfect observed score. Withheld quantity six checks whether the discount generalizes; quantities three and four expose the memorizer returning zero on unseen inputs. Even though the linear candidate scores better on the withheld set, it still fails at six.

Four cases are not proof for every input. A real product also has state, errors and time: a similar recorder interface does not establish recovery after denied permission, offline persistence, interrupted execution or cross-device state. Inventory capabilities and omissions first, then record path identification, rule explanation and behavioral pass rates separately. Different internal code can still yield a usable replica.

We infer that bringing runtime observations into an agent may reduce manual handoffs between tools; a controlled comparison is needed to measure any time saving. The documentation describes interfaces and authority, not guaranteed access to every app or complete replication of arbitrary applications. [2]

Recommendations for a controlled comparison

These are assessment recommendations, not protection effects measured in our example. Prepare functionally equivalent unprotected and protected builds. Use the same tools, model, time and spending limits for a binary-only track and a track permitting runtime observation on a controlled device. Use independent contexts for each round; withhold source, symbols, real user data and hidden answers.

Recommendations by outcome
CaseRecommendation
Critical path locatedRecord evidence; continue with rules and behavior.
Observed cases pass, withheld cases failRecord failure types and coverage; do not call it complete.
Tool installation or connection failsRecord a test limitation, not a defensive success.
Legitimate protected build regressesFix and retest the original before comparing replication cost.

Freeze the hidden tests, scoring and budget in advance; retain failures and omissions. Record completed coverage, error types and the cost of reaching correct behavior. Keep offline requirements for offline products and test local formats, recovery and persistence. The legitimate build must first pass functional, performance, signing and installation regression: breaking both sides is not an improvement.

Reproduce the example and assess your app

Run these commands to reproduce our sample. Then inventory capabilities in an app you own or are explicitly authorized to assess, keeping withheld tests separate from the evaluator. Freeze inputs, expected results and build versions before running on isolated devices. Do not extrapolate these toy scores to a tool or product security rating.

Run the sample we created.
printf 'Node: '; node --version
printf '%s\n' '== expected/candidate quotes =='
node <<'NODE'
// A synthetic offline quote rule and two deliberately simple candidates.
const quote = n => n * 100 - (n >= 5 ? 50 : 0);
const linear = n => n * 100;
const memorized = n => ({1: 100, 2: 200, 5: 450}[n] ?? 0);
for (const [name, fn] of [['linear', linear], ['memorized', memorized]]) {
  for (const [set, inputs] of [['observed', [1, 2, 5]], ['withheld', [0, 3, 4, 6]]]) {
    const pairs = inputs.map(n => `${n}:${quote(n)}/${fn(n)}`);
    const pass = inputs.filter(n => quote(n) === fn(n)).length;
    console.log(`${name} ${set}: ${pairs.join(' ')} pass=${pass}/${inputs.length}`);
  }
}
NODE

The pinned guide warns that scripts have the target process’s authority and cancellation or cleanup can yield partial observations; inspect sessions and cleanup errors afterward. [2] Keep production credentials and real content out of the test environment. Separate source review, local sample, target-platform validation and actual release in the report; describe which costs increased within the stated budget and coverage.

Your checklist

  • Pin the merge commit and installed version.
  • Inventory capabilities and freeze withheld tests.
  • Compare both builds and observation tracks under equal budgets.
  • Separate tool failures, rule understanding and behavioral replication.
  • Validate legitimate functionality, offline operation, signing and performance first.
  • Isolate production data and check session cleanup.

Primary sources

All sources and reproduction status ↗