---
name: pentest-stig
description: DISA STIG (Security Technical Implementation Guide) audit + GPO remediation + keep-open justification advisory. Triggers on STIG, DISA, SCAP, OpenSCAP, Compliance Master, GPO, group policy hardening, keep-open justification, CKL.
license: MIT
compatibility: Works with Claude Code
allowed-tools: Read Write Edit Bash Grep
metadata:
  author: badi
  badi-version: ">=1.24.0"
  category: pentest
  scope: advisory
  inspired-by: 0xSteph/pentest-ai-agents stig-analyst
---

# pentest-stig

DISA STIG audit + remediation advisory. Devlet, finans, kritik altyapi engagement'lerinde standart.

## Triggers

- "STIG audit"
- "SCAP / OpenSCAP tarama"
- "GPO hardening"
- "keep-open justification"
- "CKL file analizi"
- "compliance baseline"

## STIG Nedir

US Department of Defense Defense Information Systems Agency (DISA) tarafindan yayinlanan **security configuration baseline**. Linux, Windows, web server, network device, database, application icin spesifik kurallar.

Format:
- **STIG ID** (Group_ID + Rule_ID): GENERIC-NIST-800-53'e map
- **Severity**: CAT I (kritik), CAT II (yuksek), CAT III (orta)
- **Vulnerability discussion**: niye onemli
- **Check Text**: nasil kontrol edilir
- **Fix Text**: nasil duzeltilir

## SCAP Tarama

```bash
# OpenSCAP (Linux audit)
oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_stig \
  --results scan-results.xml \
  --report scan-report.html \
  --datastream-id ds-rhel8.xml \
  ssg-rhel8-ds.xml

# Windows: SCC Tool (DISA) veya OpenSCAP Windows port
# Web: scap-security-guide / OpenSCAP web UI
```

## CKL (Checklist) Format

DISA STIG Viewer ile acilan XML format. Her STIG ID icin:
- **NotAFinding** — uygun
- **Open** — bulgu var
- **Not_Applicable** — kapsam disi
- **Not_Reviewed** — henuz bakilmadi

## Common STIG Categories (Linux RHEL 8)

| ID | Title | CAT |
|----|-------|-----|
| RHEL-08-010020 | Crypto Policy = FIPS | I |
| RHEL-08-010049 | Banner login warn message | III |
| RHEL-08-010130 | SSH PermitRootLogin no | II |
| RHEL-08-010140 | Disable USB mass storage | II |
| RHEL-08-010210 | /tmp nosuid mount | II |
| RHEL-08-010370 | sudo logging | II |
| RHEL-08-010460 | password complexity (pwquality) | II |
| RHEL-08-010620 | session timeout 15min | III |
| RHEL-08-020220 | account lockout 3 try | II |
| RHEL-08-040340 | firewalld enabled | II |

## Common STIG Categories (Windows Server 2022)

| ID | Title | CAT |
|----|-------|-----|
| WN22-00-000010 | Inactive accounts disable | III |
| WN22-AC-000010 | Lockout duration | II |
| WN22-AC-000020 | Lockout threshold | II |
| WN22-AU-000010 | Audit Account Logon | II |
| WN22-SO-000020 | Anonymous SID lookup | I |
| WN22-SO-000080 | LM hash storage off | I |
| WN22-SO-000100 | LMCompat Level 5 | I |

## Keep-Open Justification

Bazi STIG kurallari business-spesifik nedenle uygulanmaz. **Justification** yazimi:

```markdown
## STIG ID: RHEL-08-010130 (SSH PermitRootLogin)

### Status: Open (Mitigated)

### Justification
- **Risk**: Direct root SSH allows offline brute force, lateral movement
- **Compensating Control 1**: SSH bind only to management VLAN (192.168.99.0/24)
- **Compensating Control 2**: PubkeyAuth only (PasswordAuth off)
- **Compensating Control 3**: All sudo + root commands logged to remote syslog
- **Compensating Control 4**: 2FA via FreeIPA (TOTP)
- **Compensating Control 5**: Bastion host required (jump server with session record)
- **Business Need**: Legacy application requires root for service init
- **Remediation Roadmap**: Application refactor to sudo-only by Q4 2026
- **Approval**: Security Manager <name>, <date>
- **Review Frequency**: Every 6 months
```

## GPO Remediation Mapping

```powershell
# STIG WN22-SO-000080 (LM hash storage off)
# Manual GPO yolu:
# Computer Config -> Policies -> Windows Settings -> Security Settings
# -> Local Policies -> Security Options
# -> "Network security: Do not store LAN Manager hash value on next password change"
# Enable

# Komut ile (LGPO.exe veya ADMX):
ntfrsutl ds                           # AD baglanti var mi
# Group Policy Object icine ekle:
# HKLM\SYSTEM\CurrentControlSet\Control\Lsa\NoLMHash = 1
```

## STIG Audit Otomasyon

```bash
# Tum sistemde STIG check (cron / Ansible)
oscap xccdf eval --profile stig \
  --results-arf /var/log/stig-arf.xml \
  --report /var/log/stig-report.html \
  ssg-rhel8-ds.xml

# Ansible STIG playbook
ansible-playbook -i inventory stig-rhel8-playbook.yml --check

# Sonuc -> CKL'e convert
sscap-to-checklist --input stig-arf.xml --output system.ckl
```

## Output Sablonu

```markdown
## STIG Audit — <system>

### Compliance Score
- Total: 250 STIG rules
- NotAFinding: 195 (78%)
- Open: 38 (15.2%)
- Not_Applicable: 12 (4.8%)
- Not_Reviewed: 5 (2%)

### CAT I Open (Kritik — 5)
1. RHEL-08-010210 /tmp nosuid eksik (remediation: 1 satir mount opt)
2. WN22-SO-000080 LM hash storage acik (GPO update)
3. ... (3 more)

### Keep-Open Justified (Mitigated)
1. RHEL-08-010130 SSH root login (5 compensating control)
2. ...

### Remediation Plan
| Priority | Count | Effort | Timeline |
|----------|-------|--------|----------|
| CAT I | 5 | 8h | 1 hafta |
| CAT II | 28 | 32h | 1 ay |
| CAT III | 5 | 8h | 3 ay |
```

## Out-of-Scope

- Production hardening uygulamasi (musteri sysadmin yapar)
- STIG yazma (DISA resmi)
- Non-DISA framework (CIS Benchmark, NIST 800-53 — ayri skill)


---
Source attribution: aibot88
Original project: https://github.com/aibot88/sec_skill_store/blob/main/skills/claudskills/pentest-stig/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: aibot88
Original project: https://github.com/aibot88/sec_skill_store/blob/main/skills/claudskills/pentest-stig/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Legal, Operations
Roles: Compliance Officer, IT Operations, Security Engineer
Specialties: Backend
Tools: Openscap
Country applicability: United States
Classification basis: Source catalog labels
Instruction SHA-256: 38d8dd1942a22e9572e6a54377d4e26c6655b13216eebdebb715e6a2640232ab
