Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Incorrect file permissions can expose sensitive data, allow unauthorized modifications, or enable code execution. This test examines file and directory permissions to identify overly permissive settings that could be exploited by attackers. Proper file permissions are a critical component of defense-in-depth security.
What to Check
Files and Directories to Review
Web application files
Configuration files
Sensitive data files (encrypted data, keys)
Log files
Executable files (scripts, binaries)
Database files
Temporary files
Upload directories
Backup files
Permission Issues
World-readable sensitive files
World-writable directories
Executable permissions on data files
SUID/SGID binaries
Incorrect ownership
How to Test
Step 1: List File Permissions (Linux)
# List permissions in web directoryls -la /var/www/html/
# Recursive listingls -laR /var/www/html/
# Using namei for path permissions
namei -l /var/www/html/config/database.php
# Find world-writable files
find /var/www/html -perm -0002 -type f
# Find world-writable directories
find /var/www/html -perm -0002 -type d
find /var/www/html -perm -4000 - f
find /var/www/html -user root - f
# Find SUID files
type
# Find files owned by root
type
Step 2: Check Sensitive Files
# Configuration filesls -la /var/www/html/config/
ls -la /var/www/html/.env
ls -la /var/www/html/wp-config.php
# Should be readable only by web server user# Recommended: 640 or 600# Log filesls -la /var/log/apache2/
ls -la /var/log/nginx/
# Database filesls -la /var/lib/mysql/
Step 3: Check Upload Directories
# Upload directories should not allow executionls -la /var/www/html/uploads/
ls -la /var/www/html/media/
ls -la /var/www/html/files/
# Check for executable files in upload dirs
find /var/www/html/uploads -type f \( -name "*.php" -o -name "*.sh" -o -name "*.pl" \)
Step 4: Windows Permission Check
# List permissions
icacls C:\inetpub\wwwroot\
# Recursive
icacls C:\inetpub\wwwroot\ /T
# Check specific file
icacls C:\inetpub\wwwroot\web.config
Step 5: Remote Testing (Black Box)
# Try to access sensitive files via web
curl -s https://target.com/.htaccess
curl -s https://target.com/web.config
curl -s https://target.com/config/database.yml
curl -s https://target.com/.env
# Check for directory listing
curl -s https://target.com/uploads/
curl -s https://target.com/config/
curl -s https://target.com/logs/
Tools
Linux Tools
Tool
Description
Usage
ls
List files
ls -la /path
namei
Path permissions
namei -l /path/to/file
find
Find files
find /path -perm mode
stat
File status
stat /path/to/file
getfacl
ACL permissions
getfacl /path/to/file
Windows Tools
Tool
Description
icacls
Display/modify ACLs
AccessChk
Sysinternals tool
AccessEnum
Permission enumeration
Automated
Tool
Description
Lynis
Security auditing
Linux Exploit Suggester
Permission checks
Example Commands/Payloads
Permission Audit Script (Linux)
#!/bin/bash
WEBROOT=${1:-"/var/www/html"}echo"=== FILE PERMISSION AUDIT ==="echo"Web Root: $WEBROOT"echo""# World-writable filesecho"[+] World-writable files:"
find "$WEBROOT" -perm -0002 -type f 2>/dev/null
# World-writable directoriesecho""echo"[+] World-writable directories:"
find "$WEBROOT" -perm -0002 -type d 2>/dev/null
# SUID filesecho""echo"[+] SUID files:"
find "$WEBROOT" -perm -4000 -type f 2>/dev/null
# Config files with loose permissionsecho""echo"[+] Config files with permissions > 640:"
find "$WEBROOT" -name "*.conf" -o -name "*.config" -o -name "*.ini" -o -name "*.env" 2>/dev/null | whileread file; do
perms=$(stat -c %a "$file" 2>/dev/null)
if [ "$perms" -gt 640 ]; thenecho"$file: $perms"fidone# PHP files in upload directoriesecho""echo"[+] PHP files in upload directories:"fordirin uploads files media documents; do
find "$WEBROOT/$dir" -name "*.php" 2>/dev/null
doneecho""echo"[+] Audit complete"
Recommended Permissions
# Web files (read-only)
find /var/www/html -type f -execchmod 644 {} \;
# Directories (read + execute)
find /var/www/html -type d -execchmod 755 {} \;
# Configuration files (restrictive)chmod 640 /var/www/html/config/*.php
chmod 640 /var/www/html/.env
# Upload directories (no execution)chmod 755 /var/www/html/uploads
# Use .htaccess to prevent PHP execution
Remediation Guide
1. Standard Web Permissions
# Set ownershipchown -R www-data:www-data /var/www/html
# Files: 644 (rw-r--r--)
find /var/www/html -type f -execchmod 644 {} \;
# Directories: 755 (rwxr-xr-x)
find /var/www/html -type d -execchmod 755 {} \;