{"id":17383336,"url":"https://github.com/ac3ss0r/c2shell","last_synced_at":"2025-10-08T07:59:24.123Z","repository":{"id":241577676,"uuid":"804341085","full_name":"ac3ss0r/c2shell","owner":"ac3ss0r","description":"A C/C++ framework designed to simplify shellcode creation on any compilers and platforms using C. Supports Windows \u0026 Linux, and practically any existing architecture.","archived":false,"fork":false,"pushed_at":"2024-09-16T22:35:50.000Z","size":632,"stargazers_count":15,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-25T07:11:34.933Z","etag":null,"topics":["assembly","low-level","native","reverse-engineering","shellcode"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ac3ss0r.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":"2024-05-22T12:14:03.000Z","updated_at":"2025-07-14T02:09:23.000Z","dependencies_parsed_at":"2024-05-29T05:11:52.512Z","dependency_job_id":"f4540616-df5b-4ce9-8a9c-fddf475dfeca","html_url":"https://github.com/ac3ss0r/c2shell","commit_stats":null,"previous_names":["ac3ss0r/shellcodelab","ac3ss0r/c2shell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ac3ss0r/c2shell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac3ss0r%2Fc2shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac3ss0r%2Fc2shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac3ss0r%2Fc2shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac3ss0r%2Fc2shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ac3ss0r","download_url":"https://codeload.github.com/ac3ss0r/c2shell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac3ss0r%2Fc2shell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278909714,"owners_count":26066887,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["assembly","low-level","native","reverse-engineering","shellcode"],"created_at":"2024-10-16T07:41:19.140Z","updated_at":"2025-10-08T07:59:24.102Z","avatar_url":"https://github.com/ac3ss0r.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# c2shell\nA C/C++ framework designed to simplify shellcode creation on any compilers and platforms using C. Supports Windows \u0026 Linux, and practically any existing architecture.\n\n## ℹ️ Overview \u0026 theory\nA shellcode is an offset-independent assembly code which can be executed from any part of program. Those are commonly used by cyber-security engineers, hackers and lowlevel developers (anticheats, protections, etc). This project presents a way to create shellcodes easily in pure C, without any ASM usage, allowing to write universal shellcodes across architectures/platforms. On windows PEB (Process Environment Block) and TEB (Thread Environment Block) can be used to obtain function addresses without using any externals. On linux you can just use syscalls.\n\n\u003cdiv align=center style=\"background-color: transparent;\"\u003e\n    \u003cimg width=\"100%\" src=\"Images/shellcode_source.png\"\u003e\u003c/img\u003e\n    \u003ctext\u003eTwo methods are used to mark \u0026 dump shellcode from a compiled C method\u003c/text\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003cdiv align=center style=\"background-color: transparent;\"\u003e\n    \u003cimg width=\"100%\" src=\"Images/shellcode_binja.png\"\u003e\u003c/img\u003e\n    \u003ctext\u003eWhen compiled, the shellcode is placed in a separete section\u003c/text\u003e\n\u003c/div\u003e\u003cbr/\u003e\n\nThis way the shellcode can be extracted via 2 methods: function address substraction during runtime, or PE/ELF section parsing. I prefer the first one, since it's easier + more universal.\n\n\u003cdiv align=center style=\"background-color: transparent;\"\u003e\n    \u003cimg width=\"100%\" src=\"Images/shellcode_source_2.png\"\u003e\u003c/img\u003e\n    \u003ctext\u003eFunction address substraction to extract shellcode\u003c/text\u003e\n\u003c/div\u003e\n\n## ℹ️ Demonstration\n\u003cdiv align=center style=\"background-color: transparent;\"\u003e\n    \u003cimg width=\"100%\" src=\"Images/vsc++preview.jpg\"\u003e\u003c/img\u003e\n    \u003ctext\u003eMicrosoft Visual C++ compiler\u003c/text\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003cdiv align=center style=\"background-color: transparent;\"\u003e\n    \u003cimg width=\"100%\" src=\"Images/clang_preview.jpg\"\u003e\u003c/img\u003e\n    \u003ctext\u003eClang (LLVM/MinGW) compiler\u003c/text\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003cdiv align=center style=\"background-color: transparent;\"\u003e\n    \u003cimg width=\"100%\" src=\"Images/android_preview.jpg\"\u003e\u003c/img\u003e\n    \u003ctext\u003eClang ARM64 (Android) compiler\u003c/text\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fac3ss0r%2Fc2shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fac3ss0r%2Fc2shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fac3ss0r%2Fc2shell/lists"}