geedge.lantern.io
policy confidence: high public

TSG supports a LUA-scriptable plugin that, when traffic matches a proxy-policy condition, injects a user-supplied HTML response back to the client (C2S direction), with template placeholders for live substitution of timestamp, content-length, a per-hit random token, and a configurable redirect URL.

对于命中代理策略条件的HTTP(S)流量调用LUA插件,插件向当前数据发起方...推送用户预定义的html文件...并对应答内容中特定字符串进行替换...TTTIIIMMM...LLLEEENNN...UUURRRIII...UUURRRLLL:用户配置的下载服务器地址

Defense implications

censorsgeneric
capabilitycontent-injection

extracted_by: claude-sonnet-5 · added 2026-08-26 · id: 2026-ompub740-lua-http-content-injection

Related findings

detection

TSG implements heuristic tunnel-protocol detection distinguishing Teredo (IPv6-over-UDP, default port 3544) from GTP tunneling based on UDP payload inspection, used to decide 'innermost' session attribution for firewall matching.

detection

sapp's plugin API exposes explicit enforcement primitives -- MESA_kill_tcp()/MESA_rst_tcp() to inject a single RST, and MESA_set_stream_opt() with MSO_TCP_RST_REMEDY/MSO_DROP_STREAM to make RST-injection or packet-dropping persist for the remaining lifetime of a flow -- with a global sapp.toml auto_remedy toggle and a per-stream option controlling whether a lone RST is reinforced repeatedly for as long as the flow keeps sending data.

deployment

In sapp's inline deployment mode, packet injection is handled by a driver pair (mrzcpd + mrtunnat, an mrzcpd sub-component not previously catalogued) that must reconstruct per-link tunnel state (cached in /run/mrzcpd/mrmonit.tunnat) before forging a packet in the correct direction; the internal troubleshooting guide documents that injection silently fails for GTP/MPLS/GRE-tunneled flows when the reverse-direction tunnel identifier has never been observed on that link, an explicit "asymmetric address layer" edge case.

detection

sapp's internal architecture guide documents three deployment topologies (mirror/passive-tap, inline, dual-arm transparent) and four distinct methods for injecting blocking packets back onto the wire, including a MAC-in-MAC scheme that extracts device/link IDs from mirrored traffic's source MAC field to route an injected packet to the correct physically separate inline device over VXLAN when multiple injection points exist.

evaluation

A Sept 2021 MESA research report analyzes a Chinese patent (application 200710130726.7) for out-of-path UDP session blocking via forged ICMP destination/port-unreachable packets injected by raw socket, verifies the exact Linux 3.10.0 kernel code path that propagates the resulting ECONNREFUSED to the application layer, and empirically demonstrates it fully blocks Chrome's QUIC connections to Google (effective for all 16 ICMP unreachable subcodes, and through NAT), with Chrome falling back to HTTP/2 within seconds; combining it with TCP RST additionally blocks the HTTP/2 fallback.

deployment

A repo named "active-defense/houyi-deploy" is an Ansible playbook that installs a component called "houyi" (后羿) alongside sapp and a "wire-graft" packet-injection module (matching the taxonomy's marsio "wired_graft" plugin); the bundled RPMs/scripts include standalone binaries named tcp_syn_flood, udp_dns_flood, and a DNS-reflection-amplification script (reflect_dns.sh), indicating this TSG-adjacent platform includes offensive flooding/DDoS capability, not just passive blocking.