Exploit databaseDownload repository ZIP
GH-df4287dd088456f5efecb954017187bd
adibirzu/openclaw-security-monitor
Sources for CVE-2026-25253
7 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files63
adibirzu/openclaw-security-monitorRevision 9ac66fa576db
- ↑..Parent directory
- _common.sh
- check-01-c2-ips.sh
- check-02-amos-stealer.sh
- check-03-reverse-shells.sh
- check-04-exfil-endpoints.sh
- check-05-crypto-wallet.sh
- check-06-curl-pipe.sh
- check-07-file-perms.sh
- check-08-skill-integrity.sh
- check-09-skillmd-inject.sh
- check-10-memory-poison.sh
- check-11-base64-obfusc.sh
- check-12-binary-dl.sh
- check-13-gateway-config.sh
- check-14-websocket-sec.sh
- check-15-malicious-pub.sh
- check-16-env-leakage.sh
- check-17-dm-policy.sh
- check-18-tool-policy.sh
- check-19-sandbox-config.sh
- check-20-mdns-exposure.sh
- check-21-exec-guardrails.sh
- check-22-persistence.sh
- check-23-plugin-audit.sh
- check-24-log-redaction.sh
- check-25-proxy-bypass.sh
- check-26-exec-approvals.sh
- check-27-docker-sec.sh
- check-28-nodejs-cve.sh
- check-29-plaintext-creds.sh
- check-30-vscode-trojans.sh
- check-31-internet-expose.sh
- check-32-privilege-escalation.sh
- check-33-clawjacked.sh
- check-34-ssrf.sh
- check-35-safebins.sh
- check-36-workspace-plugin-discovery.sh
- check-37-symlink-traversal.sh
- check-38-sandbox-escape.sh
- check-39-shell-env-rce.sh
- check-40-vnc-observer-auth.sh
- check-41-device-identity-spoofing.sh
- check-42-browser-traversal.sh
- check-43-shell-expansion.sh
- check-44-approval-inject.sh
- check-45-sandbox-bridge.sh
- check-46-webhook-dos.sh
- check-47-tar-traversal.sh
- check-48-fetch-dos.sh
- check-49-agent-act.sh
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
scripts/remediate/check-07-file-perms.sh
Shell · 2,739 bytes#!/bin/bash
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source "$SCRIPT_DIR/_common.sh"
log "CHECK 7: Checking file and directory permissions..."
# Files that should be 600 (rw-------)
CONFIG_FILES=(
"$OPENCLAW_DIR/openclaw.json"
"$OPENCLAW_DIR/auth-profiles.json"
"$OPENCLAW_DIR/exec-approvals.json"
"$OPENCLAW_DIR/mcp.json"
"$OPENCLAW_DIR/.env"
"$OPENCLAW_DIR/credentials.json"
)
# Directories that should be 700 (rwx------)
SECURE_DIRS=(
"$OPENCLAW_DIR"
"$LOG_DIR"
"$OPENCLAW_DIR/workspace"
"$OPENCLAW_DIR/cache"
"$OPENCLAW_DIR/.ssh"
)
NEEDS_FIX=false
FILES_TO_FIX=()
DIRS_TO_FIX=()
# Check config files
log "Checking config file permissions..."
for file in "${CONFIG_FILES[@]}"; do
if [ -f "$file" ]; then
current_perms=$(stat -f "%OLp" "$file" 2>/dev/null || stat -c "%a" "$file" 2>/dev/null)
if [ "$current_perms" != "600" ]; then
log " ✗ $file has permissions $current_perms (should be 600)"
FILES_TO_FIX+=("$file")
NEEDS_FIX=true
else
log " ✓ $file (600)"
fi
fi
done
# Check directories
log "Checking directory permissions..."
for dir in "${SECURE_DIRS[@]}"; do
if [ -d "$dir" ]; then
current_perms=$(stat -f "%OLp" "$dir" 2>/dev/null || stat -c "%a" "$dir" 2>/dev/null)
if [ "$current_perms" != "700" ]; then
log " ✗ $dir has permissions $current_perms (should be 700)"
DIRS_TO_FIX+=("$dir")
NEEDS_FIX=true
else
log " ✓ $dir (700)"
fi
fi
done
if [ "$NEEDS_FIX" = false ]; then
log "All file and directory permissions are correct"
exit 2
fi
# Auto-fix permissions
log ""
log "Found permission issues:"
log " ${#FILES_TO_FIX[@]} file(s) need chmod 600"
log " ${#DIRS_TO_FIX[@]} directory(ies) need chmod 700"
if confirm "Fix these permissions?"; then
# Fix files
for file in "${FILES_TO_FIX[@]}"; do
if fix_perms "$file" 600 "config file"; then
log " ✓ Fixed $file"
FIXED=$((FIXED + 1))
else
log " ✗ Failed to fix $file"
FAILED=$((FAILED + 1))
fi
done
# Fix directories
for dir in "${DIRS_TO_FIX[@]}"; do
if fix_perms "$dir" 700 "directory"; then
log " ✓ Fixed $dir"
FIXED=$((FIXED + 1))
else
log " ✗ Failed to fix $dir"
FAILED=$((FAILED + 1))
fi
done
if [ $FIXED -gt 0 ]; then
log ""
guidance "File permissions have been secured." \
"" \
"What these permissions mean:" \
"- 600 (rw-------): Only you can read/write, no one else can access" \
"- 700 (rwx------): Only you can read/write/execute, no one else can access"
fi
else
log "Skipping permission fixes"
FAILED=$((FAILED + ${#FILES_TO_FIX[@]} + ${#DIRS_TO_FIX[@]}))
fi
finish