T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:30- Finding
Overly Broad Host and Sensitive-Resource Reconnaissance
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 30-127
Vulnerability Type: Excessive read access and host reconnaissance
Risk Level: MediumVulnerable Code Snippet
markdown ### 0) Identify Environment 1. Determine OS and host context: - `uname -a` - `cat /etc/os-release` - `hostname` 2. Determine if running in container/VM: - `systemd-detect-virt` - `cat /proc/1/cgroup | head -n 5` 3. Determine working dir and user: - `pwd` - `whoami` ### 1) Identify OpenClaw Presence & Version 1. Check gateway process: - `ps aux | grep -i openclaw-gateway | grep -v grep` 2. Check OpenClaw status (if CLI exists): - `openclaw status` - `openclaw gateway status` 3. Record versions: - `openclaw --version` (if available) ### 2) Network Exposure & Listening Services 1. List open ports: - `ss -tulpen` ### 3) Gateway Bind & Auth Configuration 1. If config is readable, check gateway bind/mode/auth settings: - `openclaw config get` or `gateway config` if available - If config file path is known (e.g., `~/.openclaw/config.json`), read it **read-only**. ### 7) Credentials & Secret Storage 1. Check for plaintext secrets locations: - `~/.openclaw/` directories - `.env` files, token dumps, backups 2. Identify world-readable or group-readable secret files: - `find ~/.openclaw -type f -perm -o+r -maxdepth 4 2>/dev/null | head -n 50` 3. Report only **paths**, never contents. ### 8) File Permissions & Privilege Escalation Risks 1. Check for risky permissions on key dirs: - `ls -ld ~/.openclaw` - `ls -l ~/.openclaw | head -n 50` 2. Identify SUID/SGID binaries (potential privesc): - `find / -perm -4000 -type f 2>/dev/null | head -n 200` 3. Flag if OpenClaw runs as root or with unnecessary sudo. ### 9) Process & Persistence Indicators 1. Check for unexpected cron jobs: - `crontab -l` ...[truncated 3711 chars]- Remediation
View remediation
Remediation Suggestions
- Require explicit user authorization before inspecting logs, credential locations, cron entries, system services, or privileged binaries.
- Split the workflow into a minimal default audit and clearly labeled advanced host-security checks.
- Scope filesystem searches to OpenClaw-owned directories by default. Do not run
find / -perm -4000unless the user explicitly requests a host-wide privilege-escalation review. - Run all checks under a dedicated unprivileged account and prohibit automatic use of
sudoor root execution. - Prefer narrowly filtered process, socket, service, and log queries rather than unrestricted enumeration.
- Never print configuration values that may contain credentials. Report setting names and safe status summaries instead.
- Add mandatory redaction for tokens, authorization headers, cookies, API keys, session identifiers, credential-bearing URLs, usernames, and sensitive command arguments.
- Limit journal queries to fields and events needed for the stated check, and sanitize every returned line before including it in a report.
- Preserve the current read-only treatment of cron and systemd. Explicitly prohibit creating, modifying, enabling, or deleting scheduled tasks or services without separate informed approval.
- Document the exact access scope before execution and mark checks as
UNKNOWNwhen the required information cannot be obtained without broader privileges.
