{"id":13643287,"url":"https://github.com/ixty/xarch_shellcode","last_synced_at":"2025-04-21T01:32:12.921Z","repository":{"id":138062658,"uuid":"66469398","full_name":"ixty/xarch_shellcode","owner":"ixty","description":"Cross Architecture Shellcode in C","archived":false,"fork":false,"pushed_at":"2016-08-24T14:48:18.000Z","size":48,"stargazers_count":195,"open_issues_count":0,"forks_count":41,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-09T15:42:24.898Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ixty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-08-24T14:09:24.000Z","updated_at":"2024-08-01T10:45:59.000Z","dependencies_parsed_at":"2024-01-14T09:24:11.864Z","dependency_job_id":null,"html_url":"https://github.com/ixty/xarch_shellcode","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/ixty%2Fxarch_shellcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixty%2Fxarch_shellcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixty%2Fxarch_shellcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixty%2Fxarch_shellcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ixty","download_url":"https://codeload.github.com/ixty/xarch_shellcode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249982591,"owners_count":21355728,"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-08-02T01:01:45.246Z","updated_at":"2025-04-21T01:32:12.580Z","avatar_url":"https://github.com/ixty.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Cross Arch Shellcode Compiler\n\n2016 - ixty\n\n## Information\nThis program allows to build portable, architecture independant shellcode from C code.\nIt currently supports the following architectures:\n- x86\n- x86_64\n- arm\n- arm_64\n\nIt works by:\n- compiling the same C code for each architecture\n- linking it to arch specific syscall implementation\n- using a polyglot dispatching shellcode\n\nThe final layout of the output binary is:\n    [ DISPATCHER   ]\n    [ X86 BLOCK    ]\n    [ X86_64 BLOCK ]\n    [ ARM BLOCK    ]\n    [ ARM_64 BLOCK ]\n\nThe dispatcher is in stage0\nOpen [stage0/README](./stage0/README) for information on how it works\n\nEach arch specific block has the following layout:\n\n    [ LOADER    ]\n    [ RELOC NUM ]\n    [ RELOC 0   ]\n    [ RELOC 1   ]\n        ...\n    [ RELOC N   ]\n    [ START OFF ]\n    [ CODE      ]\n\nOpen [stage1/README](./stage1/README) for information on loaders\n\nThe final payload code is the stage2.\nOpen [stage2/README](./stage2/README) for information on the payload\n\n\n## Dependencies\n\n- python2.7\n- nasm\n- gcc\n- pyelftools (pip install pyelftools)\n- qemu-user-static\n- qemu-utils\n- arm chroot with gcc\n- arm64 chroot with gcc\n\n#### Assuming you use debian:\n\n```\n# apt-get install gcc nasm python2.7 python-pip\n# apt-get install qemu qemu-user-static qemu-utils binfmt-support debootstrap\n# qemu-debootstrap --arch=arm64 jessie /opt/arm64/ http://ftp.debian.org/debian\n# qemu-debootstrap --arch=armhf jessie /opt/armhfxx/ http://ftp.debian.org/debian\n\n# chroot /opt/arm64\n# apt-get install gcc\n# exit\n\n# chroot /opt/armhf\n# apt-get install gcc\n# exit\n```\n\n## Running \u0026 testing\n\n`$ ./build.py`\n\nIf everything goes well, it creates ./ouput which is the portable multi-arch shellcode.\n\nTo test that everything works, use the provided 'sc' utility:\n```\nOn the local x86_64 machine\nuser@x86_64-box   $ ./sc_86     ./output\nuser@x86_64-box   $ ./sc_x86_64 ./output\n... And in the chroots for arm/arm64\nuser@armhf-chroot $ ./sc_arm    ./output\nuser@arm64-chroot $ ./sc_arm_64 ./output\n```\n\n## Credits\nThanks to feliam\n\u003e https://github.com/feliam/mkShellcode\n\n\u003e http://blog.binamuse.com/2013/01/about-shellcodes-in-c.html\n \nThe x86 / x86_64 loader code is taken from this project and the shellcode extraction technique is based upon his work aswell.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixty%2Fxarch_shellcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fixty%2Fxarch_shellcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixty%2Fxarch_shellcode/lists"}