12 Commits

Author SHA1 Message Date
Ege Balcı 4e844b0c14 Gofmt formatting 2026-05-02 00:20:33 +02:00
Drew Bonasera ecc578b28c Apply encoder options within the main loop and fix various bugs related to encoding, obfuscation, and file handling.
- feat(cli): Apply obfuscation, encoding, and safe options in main loop
- feat(obfuscation): Allow disabling garbage instruction generation via obfuscation limit
- fix(encoder): Correct schema size calculation for x64 architecture
- fix(encoder): Pad encoded payload with NOPs to ensure schema alignment
- fix(obfuscation): Add fallback for random register selection in garbage generation
- fix(cli): Truncate output file on write and ensure it is closed
- fix(examples): Correct casing in sgn package import path
- style(encoder): Remove trailing whitespace from register save definitions
2026-04-30 05:10:02 -04:00
Drew Bonasera e2ccc66ff3 Corrects payload selection logic and several register definitions and selection mechanisms.
This commit also optimizes bad-byte checking and improves code style.

- fix(main): Correct payload selection logic for ASCII and bad byte constraints
- refactor(main): Improve readability of payload selection conditions
- fix(sgn): Correct register definitions for ESI, EDI, and RDI
- fix(sgn): Remove PUSH/POP of RSP from x64 register save/restore opcodes
- fix(sgn): Rework random register selection to prevent returning invalid registers
- perf(utils): Optimize `ContainsBytes` by using `bytes.IndexByte`
- style(utils): Export `ContainsBytes` function
- chore(main): Remove unused `bytes` import
2026-04-30 05:09:44 -04:00
Drew Bonasera 6203484fcd Fixes several bugs in encoding and obfuscation and adds a new payload execution stress test.
- fix(encode): Remove redundant modulo operations from ADD/SUB ciphers
- fix(obfuscate): Remove "JMP 2" from the list of safe garbage instructions
- fix(obfuscate): Use correct slice length when selecting random garbage instruction
- fix(sgn): Correct register exclusion logic in GetSafeRandomRegister
- test: Add integration stress test for payload execution on Windows
2026-04-30 05:09:17 -04:00
Ege Balcı f54fa65b57 GenerateGarbageAssembly function adjusted for better stability. 2024-02-22 16:20:57 +01:00
Ege Balcı 012c110584 GetSafeRandomRegister function fixed. 2024-02-22 16:20:10 +01:00
Ege Balcı 2e16f30c2b Decoder schema size calculation bug fixed. 2024-02-22 15:16:29 +01:00
Ege Balcı 3466708266 Improved GetSafeRandomRegister function. 2024-02-22 15:15:27 +01:00
Ege Balcı 45d96a3242 Adjusted SafeGarbageInstructions pool. 2024-02-22 15:14:55 +01:00
Ege Balcı 89544142e6 v2.0.1 release!
- Register preserving related bugs fixed
- Safe random register selection related bugs fixed
- Done major code refactoring
- New parameter parsing module added
- Command line parameters updated
- Example code updated
2023-12-18 01:09:13 +01:00
Ege Balcı 94a63c5456 Added more safe garbase instruction patterns 2021-03-01 09:31:26 +03:00
Ege Balcı 686e60d127 Go lib version updates 2020-11-26 06:39:25 +03:00