{"id":13606137,"url":"https://github.com/Maldev-Academy/HellHall","last_synced_at":"2025-04-12T08:30:24.833Z","repository":{"id":157865469,"uuid":"584622314","full_name":"Maldev-Academy/HellHall","owner":"Maldev-Academy","description":"Performing Indirect Clean Syscalls","archived":false,"fork":false,"pushed_at":"2023-04-19T06:10:47.000Z","size":30,"stargazers_count":475,"open_issues_count":2,"forks_count":62,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-11-07T11:43:40.299Z","etag":null,"topics":["edrs","syscalls"],"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/Maldev-Academy.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":"2023-01-03T04:43:05.000Z","updated_at":"2024-11-01T19:16:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"cceeff26-e796-48de-8737-60d43d6bab73","html_url":"https://github.com/Maldev-Academy/HellHall","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/Maldev-Academy%2FHellHall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maldev-Academy%2FHellHall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maldev-Academy%2FHellHall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maldev-Academy%2FHellHall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maldev-Academy","download_url":"https://codeload.github.com/Maldev-Academy/HellHall/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248539744,"owners_count":21121226,"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":["edrs","syscalls"],"created_at":"2024-08-01T19:01:06.429Z","updated_at":"2025-04-12T08:30:24.568Z","avatar_url":"https://github.com/Maldev-Academy.png","language":"C","funding_links":[],"categories":["PoC"],"sub_categories":[],"readme":"## HellsHall - Another Way To Fetch Clean Syscalls\n\nHellsHall is a combination of [HellsGate](https://github.com/am0nsec/HellsGate) and indirect syscalls.  \n\n\u003cbr\u003e\n\n\n## How it works\n\nFirst, HellsHall checks whether the *syscall address* is hooked and tries to retrieve the syscall number by checking the presence of the following bytes: \n\n`0x4C, 0x8B, 0xD1, 0xB8` which represent `mov r10,rcx \u0026\u0026 mov eax,SSn`. This is how every syscall should start.\n\nAt this point, HellsGate simply grabs the Syscall SSn (Syscall Number) and uses it **directly** resulting in a syscall being called from outside of the address space of `ntdll.dll`. This is an IoC in itself and can be used to detect such syscalls. Detection Examples:\n\n* [Detecting Manual Syscalls from User Mode](https://winternl.com/detecting-manual-syscalls-from-user-mode/)\n\n* [Detecting Direct Syscalls with Frida](https://passthehashbrowns.github.io/detecting-direct-syscalls-with-frida)\n\nHellsHall however will search for a `syscall` instruction near the address of the syscall function and then save this *syscall's instruction's address* to a global variable which will be jumped to later on rather than executing this instruction directly from the `asm` file. This will cause the syscall function to be executed from inside of `ntdll.dll` address space with the only difference being that it's unhooked.\n\n## Enhancement\n\n[TartarusGate](https://github.com/trickster0/TartarusGate) can be used to further enhance this technique.\n\n\u003cbr\u003e\n\n\n## HellsGate\n\n![image](https://user-images.githubusercontent.com/111295429/210207400-594383fb-158f-415c-9e3a-2d3d43198644.png)\n\n\u003cbr\u003e\n\n## HellsHall\n\n![image](https://user-images.githubusercontent.com/111295429/210207411-f6dca820-dbfe-4c87-bb33-60e0d036bd73.png)\n\n\n\u003cbr\u003e\n\n## Profit\nBypassing The Below EDR using [This HellsHall Implementation](https://github.com/Maldev-Academy/HellHall/blob/main/Hell'sHall-Clang%26NoCrt.zip) That is Using `NtAllocateVirtualMemory`, `NtProtectVirtualMemory`, and `NtCreateThreadEx` syscalls with an `RWX` section. \n\n![image](https://user-images.githubusercontent.com/111295429/210299245-d366566a-0e14-4622-8bb0-91fd645a9d2e.png)\n\n\n\u003cbr\u003e\n\n## Code\nThe Github repo can be found [here](https://github.com/Maldev-Academy/HellHall)\n\n\u003cbr\u003e\n\n## Authors\n\n* NULL (@NUL0x4C)\n* mr.d0x (@mrd0x)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMaldev-Academy%2FHellHall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMaldev-Academy%2FHellHall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMaldev-Academy%2FHellHall/lists"}