Skip to main content Skills Marketplace Discover and explore AI skills built by the community.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Copy promptShow prompt details A direct command skips the review prompt. Inspect the source before running it.
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill wstg-conf-02The command stays on one line. Scroll horizontally to inspect it before copying.
Prefer a local copy? Download the files currently available to SkillsMP.
Download Zip Downloading... name wstg-conf-02 description Test Application Platform Configuration category configuration owasp_id WSTG-CONF-02 version 1.0.0 author cyberstrike-official tags ["misconfiguration","hardening","server","wstg","conf"] tech_stack [] cwe_ids ["CWE-16"] chains_with [] prerequisites [] severity_boost {}
wstg-conf-02
Test ID
WSTG-CONF-02
Test Name
Test Application Platform Configuration
High-Level Description
This test examines the configuration of the application platform including web servers, application servers, and their components. Misconfigurations can expose sensitive information, enable attacks, or provide unauthorized access. Key areas include default files, sample applications, debug settings, error handling, and logging mechanisms.
What to Check
Configuration Elements
Logging Security
How to Test
Step 1: Default File Discovery
for file in \
/examples/ \
/samples/ \
/docs/ \
/manual/ \
/test/ \
/phpinfo.php \
/info.php \
/test.php \
/server-status \
/server-info \
/.htaccess \
/web.config \
/crossdomain.xml \
/clientaccesspolicy.xml; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://target.com$file " )
if [ != ];
"$status "
"404"
then
echo
"Found: $file - Status: $status "
fi
done
Step 2: Platform-Specific Checks
Apache
curl -s https://target.com/server-status
curl -s https://target.com/server-info
curl -s https://target.com/.htaccess
curl -s https://target.com/icons/
curl -s https://target.com/manual/
IIS
curl -s https://target.com/iisstart.htm
curl -s https://target.com/web.config
curl -s https://target.com/trace.axd
curl -s https://target.com/elmah.axd
Tomcat
curl -s https://target.com/manager/html
curl -s https://target.com/host-manager/html
curl -s https://target.com/examples/
curl -s https://target.com/docs/
curl -s https://target.com/WEB-INF/web.xml
PHP
curl -s https://target.com/phpinfo.php
curl -s https://target.com/info.php
curl -s https://target.com/php.ini
curl -s https://target.com/test.php
Step 3: Debug Mode Detection
curl -s "https://target.com/nonexistent"
curl -s "https://target.com/?id='"
curl -s "https://target.com/" -H "Content-Type: invalid"
curl -sI https://target.com | grep -iE 'x-debug|x-trace|x-powered'
curl -s https://target.com/trace.axd
Step 4: Error Page Analysis
curl -s "https://target.com/nonexistent-page-12345"
curl -s "https://target.com/" -X INVALID
curl -s "https://target.com/?id='"
curl -s "https://target.com/" -H "Host: invalid"
Step 5: Directory Listing Check
for dir in / /images/ /uploads/ /files/ /assets/ /static/ /css/ /js/; do
response=$(curl -s "https://target.com$dir " )
if echo "$response " | grep -qi "index of\|directory listing\|parent directory" ; then
echo "Directory listing enabled: $dir "
fi
done
Step 6: Configuration File Exposure
for file in \
/config.php \
/configuration.php \
/settings.php \
/database.yml \
/config.yml \
/config.json \
/app.config \
/web.config \
/.env \
/.env.local \
/.env.production \
/application.properties \
/application.yml; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://target.com$file " )
if [ "$status " == "200" ]; then
echo "FOUND: $file "
fi
done
Step 7: Backup File Discovery
for ext in .bak .backup .old .orig .save .swp .tmp ~; do
for file in index config database settings; do
for orig_ext in .php .asp .aspx .jsp .html .xml .yml .json; do
test_file="${file} ${orig_ext} ${ext} "
status=$(curl -s -o /dev/null -w "%{http_code}" "https://target.com/$test_file " )
if [ "$status " == "200" ]; then
echo "FOUND: $test_file "
fi
done
done
done
Step 8: Logging Analysis If log access is possible (gray-box testing):
grep -r "password\|passwd\|secret\|token\|api_key" /var/log/apache2/
grep -r "password\|passwd\|secret\|token\|api_key" /var/log/nginx/
ls -la /var/log/apache2/
ls -la /var/log/nginx/
cat /etc/logrotate.d/apache2
Tools
Scanners Tool Description Usage Nikto Web server scanner nikto -h target.comNuclei Template scanner nuclei -u target.com -t misconfigs/Gobuster Directory brute-force gobuster dir -u target.com -w wordlist.txt
Configuration Auditing Tool Description CIS-CAT Lite CIS benchmark assessment Lynis Unix security auditing Microsoft Baseline Security Analyzer Windows auditing
Example Commands/Payloads
Nuclei Configuration Checks
nuclei -u https://target.com -t misconfiguration/
nuclei -u https://target.com -t exposures/
nuclei -u https://target.com -t technologies/
nuclei -u https://target.com -t http/misconfiguration/directory-listing.yaml
nuclei -u https://target.com -t http/exposures/configs/
Comprehensive Config Scanner #!/bin/bash
TARGET=$1
echo "=== APPLICATION PLATFORM CONFIG TEST ==="
echo "[+] Checking default files..."
defaults=("/phpinfo.php" "/info.php" "/server-status" "/server-info"
"/.htaccess" "/web.config" "/trace.axd" "/elmah.axd"
"/examples/" "/manager/html" "/docs/" )
for path in "${defaults[@]} " ; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://$TARGET$path " )
if [ "$status " != "404" ] && [ "$status " != "403" ]; then
echo " [!] Found: $path (Status: $status )"
fi
done
echo "[+] Checking backup files..."
backups=("/index.php.bak" "/config.php.bak" "/web.config.bak"
"/database.yml.bak" "/.env.backup" "/settings.php.old" )
for path in "${backups[@]} " ; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://$TARGET$path " )
if [ "$status " == "200" ]; then
echo " [!] BACKUP FOUND: $path "
fi
done
echo "[+] Checking directory listing..."
dirs =("/" "/images/" "/uploads/" "/files/" "/assets/" )
for path in "${dirs[@]} " ; do
if curl -s "https://$TARGET$path " | grep -qi "index of" ; then
echo " [!] Directory listing: $path "
fi
done
echo "[+] Testing error handling..."
error_response=$(curl -s "https://$TARGET /nonexistent-12345" )
if echo "$error_response " | grep -qiE "stack trace|exception|error in|line [0-9]" ; then
echo " [!] Verbose error messages detected"
fi
echo "[+] Scan complete"
Remediation Guide
1. Remove Default Files
rm -rf /var/www/html/manual/
rm -rf /var/www/html/icons/
rm -rf $CATALINA_HOME /webapps/examples/
rm -rf $CATALINA_HOME /webapps/docs/
2. Disable Debug Mode
display_errors = Off
log_errors = On
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
<system.web >
<customErrors mode ="On" defaultRedirect ="/error.html" >
<error statusCode ="404" redirect ="/404.html" />
<error statusCode ="500" redirect ="/500.html" />
</customErrors >
<compilation debug ="false" />
<trace enabled ="false" />
</system.web >
3. Custom Error Pages # Apache
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html
# nginx
error_page 400 401 403 404 /40x.html;
error_page 500 502 503 504 /50x.html;
4. Disable Directory Listing # Apache
Options -Indexes
5. Secure Logging # Apache - exclude sensitive data
# Don't log query strings with sensitive data
SetEnvIf Request_URI "password" dontlog
CustomLog logs/access.log combined env=!dontlog
# Log storage best practices:
- Store logs on separate partition/server
- Restrict log file permissions (640)
- Implement log rotation
- Define retention policy
- Never expose logs to web
Risk Assessment
CVSS Score Finding CVSS Severity phpinfo.php exposed 5.3 Medium Debug mode enabled 7.5 High Backup files accessible 7.5 High Directory listing enabled 5.3 Medium Sensitive config exposed 9.8 Critical Verbose error messages 5.3 Medium
CWE Categories CWE ID Title Description CWE-16 Configuration Improper configuration CWE-200 Information Exposure Sensitive info disclosure CWE-209 Error Message Information Exposure Verbose errors CWE-215 Information Exposure Through Debug Debug info leak CWE-548 Directory Listing Directory enumeration
References
Checklist [ ] Default files checked (phpinfo, examples, docs)
[ ] Sample applications removed/secured
[ ] Debug mode disabled
[ ] Custom error pages implemented
[ ] Directory listing disabled
[ ] Configuration files protected
[ ] Backup files scanned
[ ] Logging configuration reviewed
[ ] Sensitive data not logged
[ ] Log access restricted
[ ] Log rotation configured
[ ] Server modules minimized
[ ] Findings documented
More from this repository
Related occupations SOC
Based on SOC occupation classification