Commit Graph

69 Commits

Author SHA1 Message Date
keowu
5e951b3ea6 feat: Adjust Ryujin Wiki Link on README.md, fixed Diagrams structure
- Adjusting the link of Ryujin Wiki on README.md.
- Organizing Ryujin Diagrams.
2025-11-06 21:31:13 -03:00
keowu
1943572a15 feat: README.md adjustments, gitignore and Diagrams.
- Improved the README.md.
- Generated Diagrams png files.
- Update gitignore.
2025-11-05 21:37:19 -03:00
keowu
b50f2cebc1 feat: Add Test Binary into Ryujin Solution, Test Binary Code improvements and Output configs
- Now DemoObfuscation for TestBinary is part of Ryujin main Solution and able to compile together.
- Some code typos was fixed into DemoObfuscation.
- Output solution paths configs fix and more.
2025-11-05 16:57:44 -03:00
keowu
14237e0b34 feat: TestsBinary for testing Ryujin Core features
- Uploading tests binary project from Ryujin..
- Small repo organizations..
2025-11-05 16:14:44 -03:00
keowu
47b30de23c feat: Update README and Code Comments
- Updating README.md.
- Commenting on the code for explain the scope of RyujinMBAObfuscationPass.
2025-11-04 22:16:16 -03:00
keowu
1a96cc67e6 feat: Update README to Include dependencies for Custom MBA Obfuscation Passes
- Add vcpkg command into README.md
- Add exact development environment version of z3 into README.md
2025-11-03 21:32:54 -03:00
keowu
22813fcd07 feat: Introducing Ryujin Custom Passes header, bug fixies and much more
- Now Ryujin have a independent header file to organize all Custom Passes.
- Some bug fixies when detecting "mba_" prefix procedures was made.
2025-10-29 22:47:06 -03:00
keowu
09075db2f3 feat: Limit mba feature to run only on "mba_" prefix and translating
- Now the mba feature pass is limited to run only in functions with "mba_" prefix to be more stable.
- Translating comments from the code to english.
2025-10-28 22:34:05 -03:00
keowu
0a51b98c8d feat: Begin implementing MBA Obfuscation Pass and bug fixies on RunMiniVMObfuscation
- Started working on the feature to add a custom standalone pass that adds support for MBA obfuscation in arithmetic operators with guaranteed equivalence and semantics.
- Now Ryujin requires Z3 for MBA Obfuscation equivalence..
- Fixed context and flag handling issues in RunMiniVMObfuscation.
2025-10-27 21:06:08 -03:00
keowu
eef3473ab5 feat: add obfuscation support for Ryujin MiniVM stub (PIC-relative) with custom junk/mutation
- Added full support and the ability to obfuscate the MiniVM stub that uses logic different from the conventional one because it is PIC-relative.
- We added safe junkcode instructions to prevent problems.
- We will now have 40 padding bytes of NOP.
2025-09-23 20:58:54 -03:00
keowu
19bba59fd2 feat: Translate RunMiniVm and Ryujin.Run code comments to English
- Translating code comments into English to make them universally understandable.
2025-09-20 12:50:36 -03:00
keowu
27550432c2 feat: Fix shellcode-stub PIC bug in Ryujin MiniVm so relocations keep working correctly when obfuscated and mutated.
- Fixed a bug that prevented obfuscation of Ryujin MiniVm instructions.
- Implemented a specific algorithm to correct RIP-relative PIC relocations so the Ryujin shellcode stub can execute as expected when properly obfuscated.
- Only padding added for now. an obfuscation and mutation algorithm will be implemented next, independent and customized for the Ryujin MiniVm.
2025-09-20 12:17:10 -03:00
keowu
093569f7b5 feat: Migrate codebase to VS2026 Insider
- Migrating the Ryujin project solution from VS2022 to the newest VS2026 Insider and make it full compatible to use the newer features of MSVC.
2025-09-12 18:02:50 -03:00
keowu
646dd19407 feat: Small fixes in stack handling of RIP-relative relocations
- Fixed bugs that caused stack misalignment when handling RIP-relative relocations.
- Added comments to improve the readability of the relocation fix logic.
2025-09-11 09:23:54 -03:00
keowu
51668165b7 feat: Added source code as a comment to the Ryujin MiniVM Stub Shellcode, update ryujin core diagram
- Added the full source code for the Ryujin MiniVM hypervisor feature as a comment to the shellcode stub.
- Update Ryujin Core Diagram.
2025-08-29 21:34:34 -03:00
keowu
2f5f9e2bd5 feat: New HVPass (extension for code obfuscation) + MiniVM code mutation (for HVPass and standard MiniVM); Bug fixes for extracted unused registers (with future XMM support); Bug fixes for junk/mutation overwriting the RAX register unexpectedly; Improvements and added support for fixing relocation offsets in memory mov instructions; articles/projects diagrams and more.
- New HVPass feature – This feature allows the code VM to run through Microsoft’s Hypervisor API, adding an extra layer of analysis difficulty.
- MiniVM (normal) or MiniVM + HVPass – Now support junk/mutation in the stub, making the logic and instructions randomized at each interaction, further protecting the stub’s code.
- Bug fix – Fixed an issue in the extraction of unused registers from candidate procedures, where some registers were not being handled correctly.
- Bug fix – Fixed an issue in the extraction of XMM registers to enable junk/mutation support for multimedia registers.
- Bug fix – Fixed a problem in the junk/mutation logic for the instructions cdqe and cbw, which were incorrectly overwriting the RAX register, breaking results even when the registers were in use.
- Bug fix – Some instructions were not having relocations properly fixed by the RIP-relative relocation algorithm; this has now been corrected.
- Articles + Project Diagrams as well.

Some of these issues, as well as feature suggestions like HVPass, were discovered or suggested by the reviewers of Ryujin’s article.
2025-08-28 21:20:58 -03:00
keowu
d8c37b2d4c feat: Improve Custom Pass feature code, docs, and demos
- Improved the Custom Pass code to align with Ryujin coding standards.
- Added clear and helpful comments for better understanding of how RyujinCustomPassDemo works.
- Improved README.md for better structure and readability as user-facing documentation.
- Updated demo images for Ryujin and added more visual examples.
2025-07-27 11:10:32 -03:00
keowu
64cdfe6e71 feat: Add custom pass support for Ryujin users via callback
- Ryujin users can now register their own callbacks following the standard interface to create custom passes and extend Ryujin’s behavior.
- Updated configuration files to support safe usage.
- Adjusted README.md.
2025-07-27 09:12:11 -03:00
keowu
ffe6cb9655 feat: Improved pointer safety and performance for better adaptability. Also updated the README.
- Improved and organized pointer safety.
- Removed old, unused fields from the config.
- Introduced RyuJinConfigInternal to separate internal fields not directly related to the exposed config, used only by the Ryujin core.
- Updated README.md.
2025-07-26 22:16:21 -03:00
keowu
487f061d6c feat: Finalize memory protection logic, add GUI/CLI options, and fix README typos
- Added the original source code that generates the memory protection stub as a comment in the stub.
- Added a memory protection flag to the CLI and an option to the GUI.
- Improved CLI help text to be more detailed and explanatory.
- Updated README.md.
2025-07-25 20:30:20 -03:00
keowu
b8a571871d feat: Add logic stub and support for Memory CRC protection in Ryujin-protected binaries
- Implemented support for CRC-based memory protection stub.
- Improved CRC algorithm for better uniqueness and robustness.
- Added capability for Ryujin to store CRC from the .ryujin section into section header fields.
- Bug fixes and updated documentation.
2025-07-24 21:10:27 -03:00
keowu
0988e8e078 feat: Working on the base for Memory CRC32 Protection
- Working on a new feature to allow users to protect obfuscated code with a memory protection mechanism, inspired by VMProtect, where the protector uses CRC32 to validate if a page was modified on disk or in memory.
- This is just the base to start building the feature. It’s still in development and I hope it evolves a lot.
2025-07-19 22:06:32 -03:00
keowu
ac2d80c371 feat: Expanding Break Decompilers and Disassemblers feature
- The disassembler and decompiler's break feature now supports multiple techniques, inspired by a talk from BinjaDev at Off by One Conf. I've researched new capabilities to expand on this idea. The code has also been significantly improved to be more efficient and dynamic, allowing for future enhancements.
- Updated README.md to include the new Memory Protection feature.
2025-07-17 21:02:09 -03:00
keowu
dd22fc4aa9 feat: Break Decompilers and Disassemblers feature
- Ryujin can now break decompilers and disassemblers using a simple technique. This feature was inspired by a talk from BinjaDev at Off by One Conf. It will definitely be improved in the near future with more techniques.
2025-07-16 21:09:22 -03:00
keowu
508a204d21 feat: Add stub code comments for "AntiDump" feature and enhance README.md
- Added the shellcode generation code as comments within the "AntiDump" stub for better context and understanding.
- Enhanced README.md with more detailed descriptions and an outline of planned future features.
2025-07-13 20:05:55 -03:00
keowu
f647c39590 feat: Insert "AntiDump" stub to enable feature execution
- Added the shellcode stub for AntiDump execution.
2025-07-12 22:13:31 -03:00
keowu
a9bdbb1bdd feat: Start implementing the base for the "AntiDump" feature
- Begin work on the foundational structure for the "AntiDump" feature
- Introduced a new capability in Ryujin called "RyujinRunOncePass", which runs only on the first obfuscated function — ideal for volatile features
- Updated "RyujinCoreConfiguration" structures
 - Updated "RyujinGUI" to include the "AntiDump" option
- Updated "RyujinConsole" to display the "AntiDump" feature
- Updated "README.md" accordingly
2025-07-12 21:26:12 -03:00
keowu
a96d97b9b0 feat: MSVC optimization bug fixes, FFI standard support, and Anti-Debug options in RyujinGui
- Fixed a bug related to MSVC optimizations that broke Ryujin's relocation algorithm and its fix-up logic.
- Introduced a standardized FFI argument-passing method for Ryujin Core; the legacy method remains compatible.
- Ryujin GUI now fully supports the Anti-Debug features.
- Various minor bug fixes and improvements to project structure.
2025-07-10 20:55:39 -03:00
keowu
d6caf05940 feat: Finish work on Anti-Debug + TrollReversers features.
- Ryujin is now fully capable of detecting debuggers from both userland and kernel land.
- Ryujin inserts its detection stub without breaking application logic.
- Ryujin supports two modes:
      - Troll – triggers a BSOD using a Microsoft Windows bug.
      - Normal – simply calls NtTerminateProcess when a debugger is detected.
- This implementation can be improved in the future to handle more advanced detection methods, but it's good for now.
2025-07-09 10:59:07 -03:00
keowu
ed224188f7 feat: Working on Anti-Debug + TrollReversers Insertion Stub Research
- Researching how to insert a safe stub to handle detections for anti-debugging and troll attempts as part of the TrollReversers feature.
- Currently, it only inserts a "Hello World" MessageBox in each procedure indicated to Ryujin.
- This stub is completely safe and does not break the original code logic or flow. It can be fully mutated and obfuscated when reanalyzing opcodes, making it fully compatible with all Ryujin features simultaneously.
2025-07-07 21:20:26 -03:00
keowu
bc265c6d6b feat: Begin working on AntiDebug + TrollReversers features
- Started working on the initial concept and base implementation for AntiDebug detection.
- The goal is to use stealthy techniques (similar to Themida) to detect debugging attempts.
- An additional feature is being developed to troll reverse engineers by triggering a forced BSOD upon detection, causing them to lose their analysis progress.
2025-07-04 16:39:43 -03:00
keowu
370e855413 feat: Fixing typos on README.md
- Fixing some typos on README.md
2025-07-04 09:33:11 -03:00
keowu
c678458745 feat: Begin writing README.md
- Create the Ryujin README.md with current features, planned features, demos, and more.
2025-07-03 20:55:55 -03:00
keowu
a574e90401 feat: Check for inputs in RyujinGUI
- Added validation to check for empty inputs in the RyujinGUI obfuscation run logic.
2025-07-03 20:07:47 -03:00
keowu
e17e54ef1e feat: Organize RyujinGUI project structure
- Aligning the RyujinGUI project structure with the main Ryujin project structure.
2025-07-03 19:41:42 -03:00
keowu
9d5c6fb06c feat: Improve RyujinGUI to support RyujinCore
- RyujinGUI now uses RyujinCore to properly obfuscate code with full configuration support.
- Added new Ryujin logo.
- Added new Ryujin banner.
- Improved UI design, components, and more.
2025-07-03 09:37:46 -03:00
keowu
6d146f06bf feat: Initialize Ryujin GUI with basic layout and functionality
- Set up base GUI project structure using wxWidgets.
- Implement main window with custom styles and fixed dimensions.
- Add input fields for EXE, PDB, and output paths.
- Include obfuscation options with styled checkboxes.
- Add procedure list with add/remove functionality.
- Implement progress bar and "Run Obfuscator" button.
- Bind events for file selection, procedure management, and obfuscation run.
2025-07-01 21:17:23 -03:00
keowu
b078160d6b feat: Complete RyujinConsole implementation with full CLI support
The implementation of RyujinConsole is now complete. Users can fully customize the obfuscation process using a wide range of command-line options.
- Added full command-line interface support for RyujinConsole.
- Users can now specify input and output paths, and provide a PDB file for symbol mapping.
- Supports various obfuscation techniques via flags:
  - --virtualize: Enables code virtualization.
  - --junk: Inserts junk code.
  - --encrypt: Encrypts the obfuscated code.
  - --iat: Enables Import Address Table obfuscation.
  - --random-section: Uses a randomized PE section for output.
  - --keep-original: Preserves the original code (does not remove it).
- Allows fine-grained control over which procedures to obfuscate via --procs.
- Includes a --help option that provides detailed usage information.
- Example usage is provided in the built-in help message.
2025-06-28 20:53:53 -03:00
keowu
3683e8dbba feat: Improved project structure, added Ryujin includer header, export definitions, and more.
- The Ryujin console can now include the Ryujin core through a dedicated header file.
- Exporting is now standardized using a definition file.
- The project's compiled output is now placed in a folder named compiled, organized by the desired configuration (Release or Debug).
- Some code organization improvements have been made.
2025-06-24 21:23:15 -03:00
keowu
cbd7fb67f7 feat: Independent "Ryujin Core as a library" for better usability
- Ryujin now includes a component called Core, where the main obfuscator logic resides. It functions as an independent library that can be used anywhere.
- RyujinConsole now operates by loading the RyujinCore library to run the obfuscator.
- This is a preparation step for additional Ryujin components, such as a future Ryujin GUI and more features like passes and advanced obfuscation options.
2025-06-22 13:48:30 -03:00
keowu
eb6d14c4f2 feat: Improve the "Encrypt Obfuscated Code" feature to use TeaDelKew for encryption
- The "Encrypt Obfuscated Code" feature is now complete, using a new encryption algorithm called TeaDelKew, which is based on XTEA, to encrypt all obfuscated code and decrypt it at the entry point before execution.
- Some code improvements were also made.
2025-06-21 19:52:37 -03:00
keowu
83a8d2a2b9 feat: Implement full logic for the "Encrypt Obfuscated Code" feature
- The encryption feature in Ryujin is now fully implemented and functional. Currently, it uses a simple XOR-based algorithm for encryption and decryption. This approach will be improved in the future to enhance security.
- The feature overrides the Original Entry Point (OEP) with a new stub that decrypts all obfuscated code at runtime, then transfers control to the original entry point to continue normal execution.
2025-06-20 16:01:10 -03:00
keowu
06d5d8751b feat: Base for implementing the "Encrypt obfuscated code" feature.
- Started working on the logic to obfuscate opcodes in the Ryujin section to prevent static analysis. This is just the initial groundwork for the feature.
2025-06-19 18:37:41 -03:00
keowu
52f5cb1b11 feat: Ryujin MiniVM encrypted constants
- Ryujin MiniVM can now hide its immediate constants and bytecode from static analysis.
2025-06-18 21:31:29 -03:00
keowu
0b5c9b3808 feat: Improve Ryujin MiniVM to support dual arguments for better compatibility and more
- Ryujin MiniVM now supports dynamic register values, allowing it to store immediate values and registers using dual arguments: the first as the register operand (argument one) and the VM bytecode as the second (argument two).
- Code improvements and bug fixes.
2025-06-17 21:12:15 -03:00
keowu
da1c91d07a feat: Functional MiniVM Entry and Stable VM Stub for Running Virtualized Bytecode (To Be Improved in Future Commits)
- Ryujin can now interpret MiniVM bytecode. It inserts the MiniVM entry routine's RVA to enable execution of the VM interpreter.
- This is just the initial implementation and will be significantly improved in future commits. We're pushing our first working solution for now.
2025-06-16 21:32:34 -03:00
keowu
3a3a92f7ca feat: Initial implementation of Ryujin MiniVM virtualization
- Ryujin can now locate candidate instructions, convert them into VM bytecode, and insert the MiniVM entry point to enable execution of these bytecodes.
- Minor bug fixes.
2025-06-15 18:23:55 -03:00
keowu
b1b309d32f feat: Base for Simple-Virtualization Feature
- Prepare the codebase for the upcoming simple-virtualization feature for Ryujin.
2025-06-10 20:59:53 -03:00
keowu
a3a4f9884a feat: Completed implementation of dynamic junk code obfuscation algorithm
- Ryujin can now generate dynamic junk code instructions that are truly random on every iteration.
- Fixed several constants used in junk code obfuscation.
2025-06-10 20:20:30 -03:00
keowu
c1d6e48682 feat: add base for dynamic junk code obfuscation algorithm
- Implemented the base for Junk Code dynamic generation.
- Implemented logic for ZydisRegister to GP register conversion.
- Fixed a heuristic analysis feature that stored unused stack registers.
- Ignored reserved stack registers.
- Increased the number of obfuscation passes.
2025-06-09 21:21:53 -03:00