Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill wstg-conf-07명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | wstg-conf-07 |
| description | Test HTTP Strict Transport Security |
| category | configuration |
| owasp_id | WSTG-CONF-07 |
| version | 1.0.0 |
| author | cyberstrike-official |
| tags | ["misconfiguration","hardening","server","wstg","conf"] |
| tech_stack | [] |
| cwe_ids | ["CWE-200"] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
WSTG-CONF-07
Test HTTP Strict Transport Security (HSTS)
HTTP Strict Transport Security (HSTS) is a security mechanism that forces browsers to communicate with websites only over HTTPS. When properly implemented, HSTS protects against protocol downgrade attacks, SSL stripping, and cookie hijacking. This test verifies that the HSTS header is present, properly configured, and includes appropriate directives.
| Directive | Description | Recommended |
|---|---|---|
max-age | Time in seconds to enforce HTTPS | >= 31536000 (1 year) |
includeSubDomains | Apply HSTS to all subdomains | Yes |
preload | Include in browser preload lists | Recommended |
# Check for HSTS header
curl -sI https://target.com | grep -i strict-transport-security
# Full header analysis
curl -sI https://target.com | grep -iE 'strict-transport|content-security|x-frame|x-content'
# Check specific values
curl -sI https://target.com | grep -i strict-transport-security | \
grep -oP 'max-age=\d+'
#!/bin/bash
TARGET=$1
echo
hsts=$(curl -sI | grep -i | -d )
[ -z ];
1
max_age=$( | grep -oP )
[ -z ];
[ -lt 31536000 ];
| grep -qi ;
| grep -qi ;
# Check that HTTP redirects to HTTPS
curl -sI http://target.com | head -10
# Should return 301/302 redirect to HTTPS
# HSTS header should NOT be sent over HTTP
curl -sI http://target.com | grep -i strict-transport
# If includeSubDomains is set, verify all subdomains support HTTPS
subdomains=("www" "api" "mail" "app" "admin")
for sub in "${subdomains[@]}"; do
host="${sub}.target.com"
echo "=== $host ==="
# Check HTTPS works
https_status=$(curl -s -o /dev/null -w "%{http_code}" "https://$host" 2>/dev/null)
echo "HTTPS Status: $https_status"
# Check HSTS on subdomain
curl -sI "https://$host" 2>/dev/null | grep -i strict-transport
done
# Check if domain is in HSTS preload list
# Visit: https://hstspreload.org/?domain=target.com
# Or use API
curl -s "https://hstspreload.org/api/v2/status?domain=target.com" | jq
Strict-Transport-Security| Tool | Description | Usage |
|---|---|---|
| curl | HTTP client | curl -sI https://target.com |
| testssl.sh | SSL/TLS tester | testssl.sh --hsts target.com |
| sslyze | SSL analyzer | sslyze --hsts target.com |
| Tool | URL | Purpose |
|---|---|---|
| SSL Labs | ssllabs.com/ssltest | Comprehensive SSL test |
| HSTS Preload | hstspreload.org | Preload list check |
| Security Headers | securityheaders.com | Header analysis |
# Install testssl.sh
git clone https://github.com/drwetter/testssl.sh.git
# Run HSTS check
./testssl.sh --hsts target.com
# Full test
./testssl.sh target.com
# Install
pip install sslyze
# Run scan
sslyze --hsts target.com
# Check for missing HSTS
nuclei -u https://target.com -t http/misconfiguration/http-missing-security-headers.yaml
# In httpd.conf or .htaccess
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
</IfModule>
# In server block
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains; preload" />
</customHeaders>
</httpProtocol>
</system.webServer>
preload directiveincludeSubDomains is presentmax-age is at least 31536000 (1 year)Missing HSTS
| Metric | Value | Description |
|---|---|---|
| Attack Vector | Network | Remote attack |
| Attack Complexity | High | Requires MITM position |
| Privileges Required | None | No auth needed |
| User Interaction | Required | User visits site |
| Confidentiality | High | Session hijacking possible |
| Finding | Severity | Description |
|---|---|---|
| HSTS not implemented | Medium | SSL stripping possible |
| Low max-age value | Low | Reduced protection window |
| Missing includeSubDomains | Low | Subdomain attacks possible |
| Not in preload list | Info | First visit vulnerable |
| CWE ID | Title | Description |
|---|---|---|
| CWE-319 | Cleartext Transmission of Sensitive Information | Missing encryption enforcement |
| CWE-523 | Unprotected Transport of Credentials | Credential exposure risk |
| CWE-16 | Configuration | Security misconfiguration |
[ ] HSTS header checked on HTTPS response
[ ] max-age value verified (>= 31536000)
[ ] includeSubDomains directive checked
[ ] preload directive checked
[ ] HTTP to HTTPS redirect verified
[ ] HSTS not sent over HTTP
[ ] Subdomain HTTPS support verified
[ ] Preload list status checked
[ ] Mixed content issues checked
[ ] Browser testing completed
[ ] Findings documented