fix: address all Son of Anubhav review findings#1
Conversation
…, unique RANDOM preset indices
…t PRNG Removes the stdlib.h dependency from MutationEngine.c and makes the PRNG consistent with the XORshift pattern used in Crypto.c and Common.c. Two independent PRNG states (stdlib rand + XORshift) in the same Builder process now unified under one approach.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThese changes improve OPSEC mechanisms and code entropy through flag standardization, randomization hardening, and syscall validation enhancements. The flag Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
Summary
Full remediation of all findings from the Son of Anubhav code review across 5 commits.
SIZE_Toverflow beforeHeapAllocinMutationEngine.cHeapFree(NULL)in error pathFindCleanTrampolinereturned first0F 05 C3withoutRUNTIME_FUNCTIONvalidationRUNTIME_FUNCTIONentry (consistent withFindJmpRbxGadget)Syscalls.cDJB2_SEEDcould be 0, producing degenerate hash distribution[0,254]to[1,254]matchingXOR_SEEDconvention--preset RANDOMallowed duplicate DLL indicesEVASION_FLAG_UNHOOKmisnamed (loader feature, not evasion check)OPSEC_FLAG_UNHOOKacrossOpsecFlags.h,Stub.cpp,Builder.cppif (i > 0)guard; all four blocks now receive leading junk/NOPMutationEngine.cused stdlibrand()/srand()while rest of codebase uses XORshiftmut_rand()/mut_srand()XORshift;stdlib.hdependency removed/* Mapuj czyste kopie */in English codebaseCommits
081a220fix(MutationEngine): overflow guard, drop no-op HeapFree, add leading junk entropydd6a8dbfix(ApiHashing,Unhooker): DJB2_SEED non-zero range, translate Polish comment84bf6abfix(Syscalls): insertion sort for SSN table, RUNTIME_FUNCTION guard on trampolinefb94438fix(OpsecFlags,Builder): rename EVASION_FLAG_UNHOOK→OPSEC_FLAG_UNHOOK, unique RANDOM preset indicesb964bb2fix(MutationEngine): replace stdlib rand()/srand() with local XORshift PRNGTest plan
Builder.exe payload.exe out.exe --preset RANDOMmultiple times — verify no duplicate DLL indices in output logBuilder.exe payload.exe out.exe --unhook— verify flag accepted, stub behaves correctlySummary by CodeRabbit
Release Notes
New Features
--preset RANDOMnow ensures generated values are uniquely distributed.Bug Fixes
Refactor