T09 · Insecure Skill Coding Practices
- Location
SKILL.md:739- Finding
Automatic DISM ResetBase and VSS Resizing Remove Recovery Capabilities Without Consent
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:739-754
Vulnerability Type: Destructive privileged operations without explicit authorization
Risk Level: HighVulnerable Code
powershell ### 4c. DISM Component Cleanup (long timeout: 600s) ```powershell Write-Host "DISM basic cleanup..." dism /online /cleanup-image /startcomponentcleanup Write-Host "DISM deep cleanup (/resetbase) — removes ALL superseded components." Write-Host "WARNING: After /resetbase, you cannot uninstall Windows updates. This is generally fine." dism /online /cleanup-image /startcomponentcleanup /resetbase4d. System Restore / VSS Slim Down
powershell Write-Host "Resizing VSS to 1GB max..." vssadmin resize shadowstorage /for=C: /on=C: /maxsize=1GB vssadmin list shadowstoragetext ### Technical Analysis The Skill places both operations in its automatic sequential cleanup phase rather than treating them as separately authorized recovery-policy changes. `DISM /startcomponentcleanup /resetbase` permanently establishes currently installed component versions as the new base. Superseded updates can no longer be uninstalled afterward. Printing a warning does not constitute informed user consent. `vssadmin resize shadowstorage` can delete existing Volume Shadow Copy snapshots and restore points when the new one-gigabyte limit is smaller than current usage. The fixed limit also ignores disk size, existing recovery requirements, endpoint-management policy, and available restore history. Both commands normally require administrator privileges. Although elevated access may be appropriate for selected Windows maintenance tasks, altering rollback and recovery facilities exceeds the minimum privilege and impact necessary for ordinary cache cleanup. ### Attack Path 1. A user requests routine or deep C-drive cleanup. 2. The agent follows the instruction to auto-execute Phase 4 sequentially. 3. The agent inv ...[truncated 802 chars]- Remediation
View remediation
Remediation Suggestions
- Remove DISM
/resetbaseand VSS resizing from all default and automatic cleanup paths. - Run only the non-reset DISM component cleanup by default.
- Before
/resetbase, explain that superseded updates will no longer be uninstallable and require explicit confirmation for that exact command. - Before changing VSS, report current allocation, maximum allocation, restore-point count, and estimated space savings.
- Require separate explicit confirmation before resizing VSS.
- Use a percentage-based or administrator-approved limit instead of a fixed one-gigabyte value.
- Respect enterprise management policy and refuse the operation when recovery settings are centrally managed.
- Log the original VSS configuration and the user's authorization.
- Provide a dry-run plan and allow the user to skip each privileged operation independently.
- Remove DISM
