{"id":22050310,"url":"https://github.com/klezvirus/muts-opt-encoder","last_synced_at":"2025-05-08T23:23:11.642Z","repository":{"id":112318455,"uuid":"238264963","full_name":"klezVirus/muts-opt-encoder","owner":"klezVirus","description":"Independent implementation of the optimized SUB-Encoder","archived":false,"fork":false,"pushed_at":"2020-09-24T08:20:17.000Z","size":32,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T19:21:15.299Z","etag":null,"topics":["muts-encoder","osce","shellcode","sub-encoder"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klezVirus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-04T17:32:07.000Z","updated_at":"2024-08-12T19:57:22.000Z","dependencies_parsed_at":"2023-05-12T22:15:10.035Z","dependency_job_id":null,"html_url":"https://github.com/klezVirus/muts-opt-encoder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klezVirus%2Fmuts-opt-encoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klezVirus%2Fmuts-opt-encoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klezVirus%2Fmuts-opt-encoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klezVirus%2Fmuts-opt-encoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klezVirus","download_url":"https://codeload.github.com/klezVirus/muts-opt-encoder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253161600,"owners_count":21863765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["muts-encoder","osce","shellcode","sub-encoder"],"created_at":"2024-11-30T14:21:06.071Z","updated_at":"2025-05-08T23:23:11.634Z","avatar_url":"https://github.com/klezVirus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# muts-opt-encoder\n\nPure python, self-contained, independent implementation of the `add_sub` encoder and its optimized version (aka `opt_sub`).\n\n## Notes:\n\nThe script implements the same encoding scheme of add_sub and opt_sub msfvenom encoders, while mantaining a crucial difference:\n\n* By design, the script will generate only NASM instructions, not shellcode. I created it as a mean to understand the encoding scheme. If you want a ready to use shellcode, `add_sub` and `opt_sub` from msfvenom are your friends.\n\nThe name, \"Muts Optimised Encoder\", is to remember the original author of this beautiful encoding scheme, Muts, who created it while developing the famous HP OpenView NNM 7.5.1 exploit, available [here](http://www.exploit-db.com/exploits/5342/).\nThis encoding scheme is a piece of art in my opinion, as well as its 2 main implementations.\n\n## Usage\n\nmuts-opt-encoder has a few useful options, below:\n\n```\nusage: muts-opt-encoder [-h] (-f FILE | -s STDIN) [-a] [-m {add-sub,opt-sub}]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -f FILE, --file FILE  Get input from a file (default: None)\n  -s STDIN, --stdin STDIN\n                        Get input from stdin (default: None)\n  -a, --append          Append NASM instructions in \"encoder.nasm\" (default:\n                        False)\n  -m {add-sub,opt-sub}, --mode {add-sub,opt-sub}\n                        Operational mode (default: opt-sub)\n```\n\nA few things to notice:\n\n* It accepts payloads as hex strings, hex files or binary files\n* The append version allows to append the nasm code to an existent nasm snippet\n\n## Todo\n\nThere are a few things I would like to add in the future:\n\n* Cleaning the code\n* Add Python3 support\n\nThere are a few things that I won't introduce, as I don't want to:\n\n* Automatic shellcode generation\n\n## Contributing\n\nIn the unlikely event you would like to contribute, please fork the repository at [https://github.com/klezVirus/muts-opt-encoder](https://github.com/klezVirus/muts-opt-encoder) and use that. Any help to improve it is very welcome.\n\nIf you want to get in touch with me github is your best choice.\n\n## References\n\nA few presentation about automating this encoding scheme had already been presented many times:\n\n* https://armoredcode.com/blog/a-tale-of-a-restricted-charset-shellcode-generation/\n* http://xangosec.blogspot.com/2014/08/automating-sub-encoder.html\n* http://www.negation.net/papers/encoding_shellcode/\n\n## Credits:\n\n* Sagi Shahar\n\nThis script is an advanced version of the tool created by Sagi Shahar, available here: [muts-encoder](https://github.com/sagishahar/scripts/blob/master/muts_encoder.py).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklezvirus%2Fmuts-opt-encoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklezvirus%2Fmuts-opt-encoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklezvirus%2Fmuts-opt-encoder/lists"}