T06 · System Persistence
- Location
SKILL.md:68- Finding
Persistent Privileged Network Bridge Exposes Host-Local Services to Containers
- Content
View full analysis
--.service > /dev/null << 'EOF' [Unit] Description=Socat bridge: -> : After=network.target docker.service [Service] Type=simple ExecStart=/usr/bin/socat TCP-LISTEN:,bind=,fork,reuseaddr TCP:127.0.0.1: Restart=always RestartSec=5 [Install] WantedBy=multi-user.target EOF # Review the file before enabling: cat /etc/systemd/system/socat---.service sudo systemctl daemon-reload sudo systemctl enable --now socat--- ``` ### Technical Analysis The instructions use root privileges to write a systemd unit under `/etc/systemd/system`, configure it with `Restart=always`, associate it with `multi-user.target`, and enable it immediately. Consequently, the network relay starts automatically after reboot and survives the individual Skill run. The relay forwards connections received on a Docker bridge gateway address to a service bound to host loopback. This deliberately crosses the isolation boundary that normally prevents containers from accessing services restricted to `127.0.0.1`. Although this behavior is disclosed and supports the declared bridge functionality, persistent startup registration is a high-impact host modification and is not necessary for one-time or temporary connectivity. Binding to a bridge IP reduces exposure compared with binding to `0.0.0.0`, but it does not establish per-container authorization. Any container or process able to reach the selected bridge and pass applicable firewall rules may access the forwarded service. Incorrect substitution of the gateway, network, or port placeholders may broaden the exposure. ### Attack Path ...[truncated 1885 chars]- Remediation
View remediation
-- sudo rm /etc/systemd/system/socat---.service sudo systemctl daemon-reload sudo systemctl reset-failed sudo ufw delete allow in on br- to any port proto tcp ``` 8. **Continuously verify exposure.** Test from an intended container, an unrela ...[truncated 413 chars]
