offensive-coding/linux-internals-dev/SKILL.md
Auth/lab dev: Linux internals; ELF loader, procfs, namespaces/caps, eBPF verifier/maps, LSM hooks for tooling/telemetry design.
npx skillsauth add aeondave/malskill linux-internals-devInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Deep Linux internals for practitioners who need to reason below libc and framework abstractions.
This skill is for structural mechanics: what the kernel and loader actually do, what invariants hold, what breaks across versions, and where detection surfaces appear.
/proc for process, memory, mount, or namespace intelligence and need race-safe interpretationclone, unshare, setns, or pidfd flowsIf the task is ordinary userland API usage, this skill is overkill. If the task is ABI and kernel boundary mechanics, use this skill first.
| Domain | File | Covers |
|---|---|---|
| ELF and dynamic linking | references/elf-format.md | ELF headers, program headers vs sections, dynamic tags, relocation flow, loader order, practical invariants |
| procfs semantics | references/procfs.md | /proc layout, ptrace-gated visibility, maps and smaps races, hidepid, mountinfo and pidns interactions |
| Namespaces and isolation | references/namespaces.md | namespace APIs, ownership and capability checks, pid and user namespace rules, lifetime pinning |
| Syscall dispatch internals | references/syscall-dispatch-linux.md | x86-64 syscall ABI details, vDSO-sourced syscall gadgets, fallback chains, errno handling, and telemetry implications |
| eBPF architecture | references/ebpf.md | bpf() command families, map and program lifecycle, verifier model, helper constraints, attach and pin patterns |
| LSM model | references/lsm.md | LSM stacking and ordering, active module discovery, process attr interfaces, hook surfaces and development implications |
| Area | Invariant |
|---|---|
| ELF | Runtime loading is driven by program headers, not section headers |
| ELF | PT_LOAD: p_filesz <= p_memsz; trailing bytes are zero-filled in memory |
| procfs | Access to many /proc/pid/* files for other processes is ptrace capability gated |
| procfs | Reading maps and smaps is inherently racy except single-read snapshots |
| namespaces | Joining namespaces requires capability checks in both current and owning user namespaces |
| pid namespaces | A process cannot move to an ancestor PID namespace |
| syscalls (x86-64) | Arg4 is in r10, not rcx; syscall clobbers rcx and r11 |
| eBPF | Verifier must prove termination, type safety, bounds safety, and reference release on all paths |
| eBPF | Helper calls can invalidate packet pointer proofs; bounds checks often must be redone |
| LSM | Active LSM order matters; checks run in configured order, capability module first |
| LSM | /sys/kernel/security/lsm reflects the active stack and check order |
Issue is binary load or symbol resolution behavior
elf-format.mdPT_INTERP, DT_NEEDED, DT_RPATH and DT_RUNPATH, then relocation type flowIssue is process or memory inspection mismatch
procfs.mdhidepid mode, and map-read race conditionsIssue is container boundary or namespace transition
namespaces.mdIssue is syscall origin, anti-hooking, or low-level ABI behavior
syscall-dispatch-linux.mdr10/rcx), dispatch source (vDSO vs libc vs direct), and fallback implicationsIssue is eBPF load rejection or runtime attach surprises
ebpf.mdIssue is policy enforcement or security hook behavior
lsm.mdUse this whenever implementing a low-level technique.
DT_RPATH and DT_RUNPATH are equivalent in dependency traversal/proc/pid/maps partial reads are stable under concurrent VMA changeshidepid and ptrace gating when process inventory appears incompletesetns to move the caller itself into a new PID namespace instead of affecting future childrenrcx instead of r10 on x86-64 and then debugging phantom failuresreferences/elf-format.md for loader and relocation mechanicsreferences/procfs.md for process and memory introspection semanticsreferences/namespaces.md for isolation model and transition constraintsreferences/syscall-dispatch-linux.md for syscall ABI, dispatch-source tradeoffs, and fallback designreferences/ebpf.md for verifier and syscall-level eBPF operationsreferences/lsm.md for LSM architecture and policy interaction modeldevelopment
Auth/lab ref: Unicorn Engine CPU-only emulation for shellcode, decryptors, custom VM handlers, instruction tracing, memory hooks, and register-level experiments.
development
Auth/lab ref: Renode board and SoC simulation for MCU/RTOS firmware, UART/GPIO/peripheral modeling, GDB remote debugging, REPL platforms, and RESC scripts.
development
Auth/lab ref: Qiling OS-layer binary emulation for PE/ELF/Mach-O/UEFI/shellcode with rootfs, syscall/API hooks, filesystem mapping, and runtime patching.
databases
Auth/lab ref: QEMU user-mode and full-system emulation for cross-arch binaries, firmware, kernels, disks, serial consoles, networking, and GDB stubs.