opencode-skills-collection 4.0.68 → 4.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +266 -1
- package/bundled-skills/access-review/SKILL.md +394 -0
- package/bundled-skills/access-review/references/details.md +121 -0
- package/bundled-skills/agent-evals/SKILL.md +420 -0
- package/bundled-skills/agent-observability/SKILL.md +346 -0
- package/bundled-skills/agent-observability/references/details.md +786 -0
- package/bundled-skills/ai-agent-security/SKILL.md +393 -0
- package/bundled-skills/ai-agent-security/references/details.md +912 -0
- package/bundled-skills/ai-coding-agent-guardrails/SKILL.md +442 -0
- package/bundled-skills/ai-coding-agent-guardrails/references/details.md +753 -0
- package/bundled-skills/ai-inference-service-mesh/SKILL.md +449 -0
- package/bundled-skills/ai-pipeline-orchestration/SKILL.md +287 -0
- package/bundled-skills/ai-red-teaming/SKILL.md +409 -0
- package/bundled-skills/ai-security-hardening/SKILL.md +343 -0
- package/bundled-skills/ai-sre-incident-response/SKILL.md +336 -0
- package/bundled-skills/alerting-oncall/SKILL.md +458 -0
- package/bundled-skills/alerting-oncall/references/details.md +84 -0
- package/bundled-skills/apk-redteam-pipeline/SKILL.md +446 -0
- package/bundled-skills/argocd-gitops/SKILL.md +469 -0
- package/bundled-skills/arm-templates/SKILL.md +438 -0
- package/bundled-skills/arm-templates/references/details.md +64 -0
- package/bundled-skills/asset-inventory/SKILL.md +412 -0
- package/bundled-skills/asset-inventory/references/details.md +127 -0
- package/bundled-skills/audit-logging/SKILL.md +476 -0
- package/bundled-skills/aws-cloudtrail/SKILL.md +486 -0
- package/bundled-skills/aws-cost-optimization/SKILL.md +331 -0
- package/bundled-skills/aws-ec2/SKILL.md +426 -0
- package/bundled-skills/aws-ecs-fargate/SKILL.md +388 -0
- package/bundled-skills/aws-iam/SKILL.md +463 -0
- package/bundled-skills/aws-lambda/SKILL.md +428 -0
- package/bundled-skills/aws-rds/SKILL.md +380 -0
- package/bundled-skills/aws-s3/SKILL.md +434 -0
- package/bundled-skills/aws-secrets-manager/SKILL.md +486 -0
- package/bundled-skills/aws-vpc/SKILL.md +436 -0
- package/bundled-skills/azure-ai-document-intelligence-ts/SKILL.md +1 -1
- package/bundled-skills/azure-aks/SKILL.md +423 -0
- package/bundled-skills/azure-devops/SKILL.md +457 -0
- package/bundled-skills/azure-functions-devsec/SKILL.md +436 -0
- package/bundled-skills/azure-keyvault/SKILL.md +455 -0
- package/bundled-skills/azure-keyvault/references/details.md +83 -0
- package/bundled-skills/azure-monitor-audit/SKILL.md +379 -0
- package/bundled-skills/azure-networking/SKILL.md +448 -0
- package/bundled-skills/azure-networking/references/details.md +135 -0
- package/bundled-skills/azure-sql/SKILL.md +413 -0
- package/bundled-skills/azure-sql/references/details.md +113 -0
- package/bundled-skills/azure-vms/SKILL.md +402 -0
- package/bundled-skills/azure-vms/references/details.md +134 -0
- package/bundled-skills/backup-recovery/SKILL.md +388 -0
- package/bundled-skills/bb-methodology/SKILL.md +451 -0
- package/bundled-skills/bb-methodology/references/details.md +120 -0
- package/bundled-skills/block-storage/SKILL.md +371 -0
- package/bundled-skills/blue-green-deploy/SKILL.md +453 -0
- package/bundled-skills/blue-green-deploy/references/details.md +90 -0
- package/bundled-skills/bug-bounty/SKILL.md +447 -0
- package/bundled-skills/bug-bounty/references/details.md +1316 -0
- package/bundled-skills/bugcrowd-reporting/SKILL.md +351 -0
- package/bundled-skills/business-continuity/SKILL.md +463 -0
- package/bundled-skills/career-ops/SKILL.md +186 -0
- package/bundled-skills/cdn-setup/SKILL.md +374 -0
- package/bundled-skills/change-management/SKILL.md +438 -0
- package/bundled-skills/change-management/references/details.md +105 -0
- package/bundled-skills/circleci/SKILL.md +475 -0
- package/bundled-skills/cis-benchmarks/SKILL.md +150 -0
- package/bundled-skills/cloudflare-pages/SKILL.md +318 -0
- package/bundled-skills/cloudflare-r2/SKILL.md +353 -0
- package/bundled-skills/cloudflare-workers/SKILL.md +415 -0
- package/bundled-skills/cloudflare-zero-trust/SKILL.md +361 -0
- package/bundled-skills/cloudformation/SKILL.md +461 -0
- package/bundled-skills/constraint-driven-development/SKILL.md +335 -0
- package/bundled-skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/bundled-skills/container-hardening/SKILL.md +126 -0
- package/bundled-skills/container-registries/SKILL.md +435 -0
- package/bundled-skills/container-scanning/SKILL.md +416 -0
- package/bundled-skills/convex-backend/SKILL.md +338 -0
- package/bundled-skills/dast-scanning/SKILL.md +437 -0
- package/bundled-skills/database-backups/SKILL.md +425 -0
- package/bundled-skills/datadog/SKILL.md +487 -0
- package/bundled-skills/dependency-scanning/SKILL.md +457 -0
- package/bundled-skills/devcontainers-nix/SKILL.md +416 -0
- package/bundled-skills/disaster-recovery/SKILL.md +374 -0
- package/bundled-skills/disaster-recovery/references/details.md +219 -0
- package/bundled-skills/dns-management/SKILL.md +375 -0
- package/bundled-skills/docker-compose/SKILL.md +482 -0
- package/bundled-skills/docker-management/SKILL.md +426 -0
- package/bundled-skills/ebpf-observability/SKILL.md +436 -0
- package/bundled-skills/ebpf-observability/references/details.md +542 -0
- package/bundled-skills/elk-stack/SKILL.md +487 -0
- package/bundled-skills/enterprise-vpn-attack/SKILL.md +395 -0
- package/bundled-skills/evidence-hygiene/SKILL.md +404 -0
- package/bundled-skills/feature-flags/SKILL.md +426 -0
- package/bundled-skills/feature-flags/references/details.md +86 -0
- package/bundled-skills/fedramp-compliance/SKILL.md +453 -0
- package/bundled-skills/firebase-app-platform/SKILL.md +381 -0
- package/bundled-skills/firewall-config/SKILL.md +479 -0
- package/bundled-skills/gcp-audit-logs/SKILL.md +452 -0
- package/bundled-skills/gcp-audit-logs/references/details.md +56 -0
- package/bundled-skills/gcp-cloud-functions/SKILL.md +284 -0
- package/bundled-skills/gcp-cloud-sql/SKILL.md +277 -0
- package/bundled-skills/gcp-compute/SKILL.md +319 -0
- package/bundled-skills/gcp-gke/SKILL.md +307 -0
- package/bundled-skills/gcp-networking/SKILL.md +293 -0
- package/bundled-skills/gcp-secret-manager/SKILL.md +421 -0
- package/bundled-skills/gcp-secret-manager/references/details.md +131 -0
- package/bundled-skills/gdpr-compliance/SKILL.md +451 -0
- package/bundled-skills/gdpr-compliance/references/details.md +145 -0
- package/bundled-skills/geo-audit/SKILL.md +368 -0
- package/bundled-skills/geo-brand-mentions/SKILL.md +68 -0
- package/bundled-skills/geo-brand-mentions/references/details.md +471 -0
- package/bundled-skills/geo-citability/SKILL.md +350 -0
- package/bundled-skills/geo-compare/SKILL.md +340 -0
- package/bundled-skills/geo-content/SKILL.md +383 -0
- package/bundled-skills/geo-crawlers/SKILL.md +408 -0
- package/bundled-skills/geo-llmstxt/SKILL.md +464 -0
- package/bundled-skills/geo-platform-optimizer/SKILL.md +314 -0
- package/bundled-skills/geo-proposal/SKILL.md +378 -0
- package/bundled-skills/geo-prospect/SKILL.md +225 -0
- package/bundled-skills/geo-report/SKILL.md +436 -0
- package/bundled-skills/geo-report-pdf/SKILL.md +157 -0
- package/bundled-skills/geo-schema/SKILL.md +408 -0
- package/bundled-skills/geo-technical/SKILL.md +78 -0
- package/bundled-skills/geo-technical/references/details.md +543 -0
- package/bundled-skills/git-workflow/SKILL.md +460 -0
- package/bundled-skills/github-actions/SKILL.md +368 -0
- package/bundled-skills/gitlab-ci/SKILL.md +340 -0
- package/bundled-skills/gpu-kubernetes-operations/SKILL.md +468 -0
- package/bundled-skills/gpu-server-management/SKILL.md +236 -0
- package/bundled-skills/hashicorp-vault/SKILL.md +408 -0
- package/bundled-skills/helm-charts/SKILL.md +469 -0
- package/bundled-skills/hipaa-compliance/SKILL.md +451 -0
- package/bundled-skills/hunt-aspnet/SKILL.md +321 -0
- package/bundled-skills/hunt-ato/SKILL.md +184 -0
- package/bundled-skills/hunt-auth-bypass/SKILL.md +426 -0
- package/bundled-skills/hunt-auth-bypass/references/details.md +80 -0
- package/bundled-skills/hunt-brute-force/SKILL.md +341 -0
- package/bundled-skills/hunt-business-logic/SKILL.md +281 -0
- package/bundled-skills/hunt-cache-poison/SKILL.md +382 -0
- package/bundled-skills/hunt-captcha-bypass/SKILL.md +136 -0
- package/bundled-skills/hunt-cicd/SKILL.md +311 -0
- package/bundled-skills/hunt-clickjacking/SKILL.md +110 -0
- package/bundled-skills/hunt-cors/SKILL.md +335 -0
- package/bundled-skills/hunt-dom/SKILL.md +323 -0
- package/bundled-skills/hunt-exceptional-conditions/SKILL.md +111 -0
- package/bundled-skills/hunt-file-upload/SKILL.md +202 -0
- package/bundled-skills/hunt-fintech-graphql/SKILL.md +289 -0
- package/bundled-skills/hunt-forgot-password/SKILL.md +114 -0
- package/bundled-skills/hunt-grpc/SKILL.md +317 -0
- package/bundled-skills/hunt-host-header/SKILL.md +309 -0
- package/bundled-skills/hunt-html-injection/SKILL.md +106 -0
- package/bundled-skills/hunt-http-smuggling/SKILL.md +129 -0
- package/bundled-skills/hunt-http-smuggling/references/phase2h-smuggling-cachepoison.md +177 -0
- package/bundled-skills/hunt-idor/SKILL.md +434 -0
- package/bundled-skills/hunt-jwt-crypto/SKILL.md +221 -0
- package/bundled-skills/hunt-k8s/SKILL.md +337 -0
- package/bundled-skills/hunt-laravel/SKILL.md +255 -0
- package/bundled-skills/hunt-ldap/SKILL.md +351 -0
- package/bundled-skills/hunt-lfi/SKILL.md +311 -0
- package/bundled-skills/hunt-llm-ai/SKILL.md +289 -0
- package/bundled-skills/hunt-mfa-bypass/SKILL.md +177 -0
- package/bundled-skills/hunt-misc/SKILL.md +378 -0
- package/bundled-skills/hunt-nextjs/SKILL.md +299 -0
- package/bundled-skills/hunt-nodejs/SKILL.md +263 -0
- package/bundled-skills/hunt-nosqli/SKILL.md +210 -0
- package/bundled-skills/hunt-ntlm-info/SKILL.md +314 -0
- package/bundled-skills/hunt-oauth/SKILL.md +459 -0
- package/bundled-skills/hunt-open-redirect/SKILL.md +223 -0
- package/bundled-skills/hunt-race-condition/SKILL.md +381 -0
- package/bundled-skills/hunt-race-condition/references/details.md +159 -0
- package/bundled-skills/hunt-rag-vector/SKILL.md +212 -0
- package/bundled-skills/hunt-rce/SKILL.md +444 -0
- package/bundled-skills/hunt-rce/references/details.md +110 -0
- package/bundled-skills/hunt-saml/SKILL.md +156 -0
- package/bundled-skills/hunt-session/SKILL.md +342 -0
- package/bundled-skills/hunt-shadow-api/SKILL.md +198 -0
- package/bundled-skills/hunt-source-leak/SKILL.md +345 -0
- package/bundled-skills/hunt-spa-api/SKILL.md +163 -0
- package/bundled-skills/hunt-springboot/SKILL.md +285 -0
- package/bundled-skills/hunt-sqli/SKILL.md +466 -0
- package/bundled-skills/hunt-ssrf/SKILL.md +396 -0
- package/bundled-skills/hunt-ssrf/references/details.md +179 -0
- package/bundled-skills/hunt-ssti/SKILL.md +163 -0
- package/bundled-skills/hunt-subdomain/SKILL.md +379 -0
- package/bundled-skills/hunt-tls-network/SKILL.md +399 -0
- package/bundled-skills/hunt-xxe/SKILL.md +466 -0
- package/bundled-skills/i-have-adhd/SKILL.md +170 -0
- package/bundled-skills/identity-access-management/SKILL.md +382 -0
- package/bundled-skills/identity-access-management/references/details.md +524 -0
- package/bundled-skills/incident-management/SKILL.md +484 -0
- package/bundled-skills/incident-response/SKILL.md +448 -0
- package/bundled-skills/incident-response/references/details.md +113 -0
- package/bundled-skills/interview-me/SKILL.md +248 -0
- package/bundled-skills/iso27001-compliance/SKILL.md +460 -0
- package/bundled-skills/jenkins/SKILL.md +462 -0
- package/bundled-skills/jev-use/SKILL.md +158 -0
- package/bundled-skills/kubernetes-hardening/SKILL.md +154 -0
- package/bundled-skills/kubernetes-ops/SKILL.md +449 -0
- package/bundled-skills/kubernetes-ops/references/details.md +108 -0
- package/bundled-skills/kustomize/SKILL.md +478 -0
- package/bundled-skills/linux-administration/SKILL.md +367 -0
- package/bundled-skills/linux-hardening/SKILL.md +154 -0
- package/bundled-skills/llm-app-security/SKILL.md +389 -0
- package/bundled-skills/llm-app-security/references/details.md +674 -0
- package/bundled-skills/llm-caching/SKILL.md +334 -0
- package/bundled-skills/llm-cost-optimization/SKILL.md +311 -0
- package/bundled-skills/llm-fine-tuning/SKILL.md +329 -0
- package/bundled-skills/llm-gateway/SKILL.md +282 -0
- package/bundled-skills/llm-inference-scaling/SKILL.md +286 -0
- package/bundled-skills/llmops-platform-engineering/SKILL.md +472 -0
- package/bundled-skills/load-balancing/SKILL.md +403 -0
- package/bundled-skills/loki-logging/SKILL.md +479 -0
- package/bundled-skills/m365-entra-attack/SKILL.md +423 -0
- package/bundled-skills/mac-mini-llm-lab/SKILL.md +350 -0
- package/bundled-skills/mcp-server-security/SKILL.md +356 -0
- package/bundled-skills/mcp-server-security/references/details.md +745 -0
- package/bundled-skills/mdm-device-management/SKILL.md +404 -0
- package/bundled-skills/mdm-device-management/references/details.md +410 -0
- package/bundled-skills/meme-coin-audit/SKILL.md +402 -0
- package/bundled-skills/mid-engagement-ir-detection/SKILL.md +377 -0
- package/bundled-skills/model-registry-governance/SKILL.md +452 -0
- package/bundled-skills/model-serving-kubernetes/SKILL.md +339 -0
- package/bundled-skills/model-supply-chain-security/SKILL.md +427 -0
- package/bundled-skills/mongodb/SKILL.md +436 -0
- package/bundled-skills/multi-tenant-llm-hosting/SKILL.md +435 -0
- package/bundled-skills/multi-tenant-llm-hosting/references/details.md +211 -0
- package/bundled-skills/mysql/SKILL.md +390 -0
- package/bundled-skills/new-relic/SKILL.md +472 -0
- package/bundled-skills/nfs-storage/SKILL.md +356 -0
- package/bundled-skills/object-storage/SKILL.md +378 -0
- package/bundled-skills/offensive-osint/SKILL.md +443 -0
- package/bundled-skills/okta-attack/SKILL.md +436 -0
- package/bundled-skills/ollama-stack/SKILL.md +379 -0
- package/bundled-skills/openclaw-deployment-hardening/SKILL.md +135 -0
- package/bundled-skills/openclaw-local-mac-mini/SKILL.md +426 -0
- package/bundled-skills/openclaw-local-mac-mini/references/details.md +221 -0
- package/bundled-skills/openclaw-security-hardening/SKILL.md +135 -0
- package/bundled-skills/openshift/SKILL.md +485 -0
- package/bundled-skills/opentelemetry/SKILL.md +438 -0
- package/bundled-skills/opentelemetry/references/details.md +78 -0
- package/bundled-skills/opentofu-migration/SKILL.md +349 -0
- package/bundled-skills/osint-methodology/SKILL.md +460 -0
- package/bundled-skills/osint-methodology/references/details.md +1350 -0
- package/bundled-skills/pci-dss-compliance/SKILL.md +446 -0
- package/bundled-skills/penetration-testing/SKILL.md +152 -0
- package/bundled-skills/performance-tuning/SKILL.md +381 -0
- package/bundled-skills/planetscale/SKILL.md +297 -0
- package/bundled-skills/platform-engineering/SKILL.md +348 -0
- package/bundled-skills/platform-engineering/references/details.md +944 -0
- package/bundled-skills/podman/SKILL.md +405 -0
- package/bundled-skills/policy-as-code/SKILL.md +434 -0
- package/bundled-skills/policy-as-code/references/details.md +204 -0
- package/bundled-skills/postgresql-devsec/SKILL.md +378 -0
- package/bundled-skills/prometheus-grafana/SKILL.md +469 -0
- package/bundled-skills/prompt-injection-defense/SKILL.md +483 -0
- package/bundled-skills/rag-infrastructure/SKILL.md +269 -0
- package/bundled-skills/rag-observability-evals/SKILL.md +444 -0
- package/bundled-skills/rag-observability-evals/references/details.md +92 -0
- package/bundled-skills/recon-scope-triage/SKILL.md +128 -0
- package/bundled-skills/redis/SKILL.md +421 -0
- package/bundled-skills/redteam-report-template/SKILL.md +370 -0
- package/bundled-skills/report-writing/SKILL.md +426 -0
- package/bundled-skills/report-writing/references/details.md +187 -0
- package/bundled-skills/reverse-proxy/SKILL.md +420 -0
- package/bundled-skills/runbook-creation/SKILL.md +438 -0
- package/bundled-skills/runbook-creation/references/details.md +71 -0
- package/bundled-skills/saas-security-posture/SKILL.md +415 -0
- package/bundled-skills/sast-scanning/SKILL.md +444 -0
- package/bundled-skills/sbom-supply-chain/SKILL.md +433 -0
- package/bundled-skills/security-arsenal/SKILL.md +446 -0
- package/bundled-skills/security-arsenal/references/details.md +540 -0
- package/bundled-skills/security-automation/SKILL.md +146 -0
- package/bundled-skills/semantic-versioning/SKILL.md +434 -0
- package/bundled-skills/semantic-versioning/references/details.md +83 -0
- package/bundled-skills/service-mesh/SKILL.md +422 -0
- package/bundled-skills/soc2-compliance/SKILL.md +409 -0
- package/bundled-skills/sops-encryption/SKILL.md +124 -0
- package/bundled-skills/sre-dashboards/SKILL.md +143 -0
- package/bundled-skills/ssh-configuration/SKILL.md +324 -0
- package/bundled-skills/ssl-tls-management/SKILL.md +428 -0
- package/bundled-skills/ssl-tls-management/references/details.md +99 -0
- package/bundled-skills/startup-it-troubleshooting/SKILL.md +415 -0
- package/bundled-skills/supply-chain-attack-recon/SKILL.md +453 -0
- package/bundled-skills/supply-chain-attack-recon/references/details.md +258 -0
- package/bundled-skills/systemd-services/SKILL.md +379 -0
- package/bundled-skills/terraform-aws/SKILL.md +125 -0
- package/bundled-skills/terraform-azure/SKILL.md +415 -0
- package/bundled-skills/terraform-azure/references/details.md +231 -0
- package/bundled-skills/terraform-gcp/SKILL.md +369 -0
- package/bundled-skills/threat-modeling/SKILL.md +487 -0
- package/bundled-skills/user-management/SKILL.md +383 -0
- package/bundled-skills/using-agent-skills/SKILL.md +220 -0
- package/bundled-skills/vector-database-ops/SKILL.md +300 -0
- package/bundled-skills/vendor-management/SKILL.md +439 -0
- package/bundled-skills/vendor-management/references/details.md +109 -0
- package/bundled-skills/vercel-deployments/SKILL.md +296 -0
- package/bundled-skills/vllm-server/SKILL.md +236 -0
- package/bundled-skills/vmware-vcenter-attack/SKILL.md +412 -0
- package/bundled-skills/vpn-setup/SKILL.md +452 -0
- package/bundled-skills/vulnerability-scanning/SKILL.md +448 -0
- package/bundled-skills/waf-setup/SKILL.md +354 -0
- package/bundled-skills/waf-setup/references/details.md +211 -0
- package/bundled-skills/web2-recon/SKILL.md +440 -0
- package/bundled-skills/web2-recon/references/details.md +319 -0
- package/bundled-skills/web3-audit/SKILL.md +445 -0
- package/bundled-skills/web3-audit/references/details.md +224 -0
- package/bundled-skills/windows-hardening/SKILL.md +454 -0
- package/bundled-skills/windows-hardening/references/details.md +204 -0
- package/bundled-skills/windows-server/SKILL.md +318 -0
- package/bundled-skills/zero-trust/SKILL.md +461 -0
- package/package.json +1 -1
- package/skills_index.json +6943 -323
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: windows-hardening
|
|
3
|
+
description: Harden Windows servers per security baselines and CIS benchmarks. Configure
|
|
4
|
+
Group Policy, Windows Defender, and security features. Use when securing Windows
|
|
5
|
+
Server environments.
|
|
6
|
+
category: security
|
|
7
|
+
risk: critical
|
|
8
|
+
source: https://github.com/BagelHole/DevOps-Security-Agent-Skills
|
|
9
|
+
source_repo: BagelHole/DevOps-Security-Agent-Skills
|
|
10
|
+
source_type: community
|
|
11
|
+
date_added: '2026-09-20'
|
|
12
|
+
license: MIT
|
|
13
|
+
license_source: https://github.com/BagelHole/DevOps-Security-Agent-Skills/blob/main/LICENSE
|
|
14
|
+
compatibility: Requires the relevant security tooling (scanners, vault CLIs) and an
|
|
15
|
+
authorized scope for any active assessment. Docs-only; helper scripts and templates
|
|
16
|
+
not bundled.
|
|
17
|
+
metadata:
|
|
18
|
+
author: devops-skills
|
|
19
|
+
version: '1.0'
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Windows Hardening
|
|
23
|
+
|
|
24
|
+
Secure Windows servers following Microsoft security baselines and CIS benchmarks.
|
|
25
|
+
|
|
26
|
+
## Prerequisites
|
|
27
|
+
|
|
28
|
+
- Windows Server 2019 or later (2022 recommended)
|
|
29
|
+
- Local Administrator or Domain Admin access
|
|
30
|
+
- PowerShell 5.1+ (built into Windows Server)
|
|
31
|
+
- Group Policy Management Console for domain environments
|
|
32
|
+
- Microsoft Security Compliance Toolkit (recommended)
|
|
33
|
+
|
|
34
|
+
## Security Baseline Deployment
|
|
35
|
+
|
|
36
|
+
```powershell
|
|
37
|
+
# Download and apply Microsoft Security Baseline
|
|
38
|
+
# Download from: https://www.microsoft.com/en-us/download/details.aspx?id=55319
|
|
39
|
+
|
|
40
|
+
# Install Security Compliance Toolkit modules
|
|
41
|
+
Install-Module -Name SecurityPolicyDsc -Force
|
|
42
|
+
Install-Module -Name AuditPolicyDsc -Force
|
|
43
|
+
Install-Module -Name PSDesiredStateConfiguration -Force
|
|
44
|
+
|
|
45
|
+
# Import and apply a security baseline GPO (from Security Compliance Toolkit)
|
|
46
|
+
# Extract the toolkit, then:
|
|
47
|
+
Import-Module "$env:USERPROFILE\Downloads\SCT\LGPO.exe"
|
|
48
|
+
|
|
49
|
+
# Apply local group policy from baseline
|
|
50
|
+
.\LGPO.exe /g ".\GPO\{baseline-gpo-guid}"
|
|
51
|
+
|
|
52
|
+
# Export current security policy for review
|
|
53
|
+
secedit /export /cfg C:\SecurityAudit\current-policy.inf
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Account Policies
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
# ============================================
|
|
60
|
+
# Password Policy Configuration
|
|
61
|
+
# ============================================
|
|
62
|
+
|
|
63
|
+
# Set password policy via net accounts
|
|
64
|
+
net accounts /minpwlen:14 /maxpwage:90 /minpwage:1 /uniquepw:24
|
|
65
|
+
|
|
66
|
+
# Or configure via PowerShell DSC
|
|
67
|
+
Configuration PasswordPolicy {
|
|
68
|
+
Import-DscResource -ModuleName SecurityPolicyDsc
|
|
69
|
+
|
|
70
|
+
Node localhost {
|
|
71
|
+
AccountPolicy PasswordPolicy {
|
|
72
|
+
Name = "PasswordPolicy"
|
|
73
|
+
Minimum_Password_Length = 14
|
|
74
|
+
Maximum_Password_Age = 90
|
|
75
|
+
Minimum_Password_Age = 1
|
|
76
|
+
Enforce_password_history = 24
|
|
77
|
+
Password_must_meet_complexity_requirements = "Enabled"
|
|
78
|
+
Store_passwords_using_reversible_encryption = "Disabled"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
# ============================================
|
|
84
|
+
# Account Lockout Policy
|
|
85
|
+
# ============================================
|
|
86
|
+
net accounts /lockoutthreshold:5 /lockoutwindow:30 /lockoutduration:30
|
|
87
|
+
|
|
88
|
+
# ============================================
|
|
89
|
+
# User Account Hardening
|
|
90
|
+
# ============================================
|
|
91
|
+
|
|
92
|
+
# Rename and disable default accounts
|
|
93
|
+
Rename-LocalUser -Name "Administrator" -NewName "LocalAdmin"
|
|
94
|
+
Disable-LocalUser -Name "Guest"
|
|
95
|
+
Disable-LocalUser -Name "DefaultAccount"
|
|
96
|
+
|
|
97
|
+
# Remove unnecessary local accounts
|
|
98
|
+
$unnecessaryAccounts = Get-LocalUser | Where-Object {
|
|
99
|
+
$_.Enabled -eq $true -and
|
|
100
|
+
$_.Name -notin @("LocalAdmin", "SYSTEM", "NetworkService", "LocalService")
|
|
101
|
+
}
|
|
102
|
+
foreach ($account in $unnecessaryAccounts) {
|
|
103
|
+
Write-Host "Review account: $($account.Name) - Last logon: $($account.LastLogon)"
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
# Configure Local Administrator Password Solution (LAPS)
|
|
107
|
+
# Install LAPS module
|
|
108
|
+
Install-WindowsFeature -Name RSAT-AD-PowerShell
|
|
109
|
+
Import-Module AdmPwd.PS
|
|
110
|
+
|
|
111
|
+
# Configure LAPS for the OU
|
|
112
|
+
Set-AdmPwdComputerSelfPermission -OrgUnit "OU=Servers,DC=example,DC=com"
|
|
113
|
+
Set-AdmPwdReadPasswordPermission -OrgUnit "OU=Servers,DC=example,DC=com" -AllowedPrincipals "Domain Admins"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Group Policy Security Settings
|
|
117
|
+
|
|
118
|
+
```powershell
|
|
119
|
+
# ============================================
|
|
120
|
+
# User Rights Assignment (via GPO or local policy)
|
|
121
|
+
# ============================================
|
|
122
|
+
|
|
123
|
+
# Restrict remote desktop access
|
|
124
|
+
# Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > User Rights Assignment
|
|
125
|
+
# "Allow log on through Remote Desktop Services" = Administrators, Remote Desktop Users
|
|
126
|
+
|
|
127
|
+
# Deny log on locally for service accounts
|
|
128
|
+
# "Deny log on locally" = Service accounts
|
|
129
|
+
|
|
130
|
+
# Configure via registry (alternative to GPO)
|
|
131
|
+
# Restrict anonymous enumeration of SAM accounts
|
|
132
|
+
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" `
|
|
133
|
+
-Name "RestrictAnonymousSAM" -Value 1
|
|
134
|
+
|
|
135
|
+
# Restrict anonymous enumeration of shares
|
|
136
|
+
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" `
|
|
137
|
+
-Name "RestrictAnonymous" -Value 1
|
|
138
|
+
|
|
139
|
+
# Do not display last user name
|
|
140
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" `
|
|
141
|
+
-Name "DontDisplayLastUserName" -Value 1
|
|
142
|
+
|
|
143
|
+
# ============================================
|
|
144
|
+
# Security Options
|
|
145
|
+
# ============================================
|
|
146
|
+
|
|
147
|
+
# Disable SMBv1 (critical security hardening)
|
|
148
|
+
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart
|
|
149
|
+
Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force
|
|
150
|
+
|
|
151
|
+
# Require SMB signing
|
|
152
|
+
Set-SmbServerConfiguration -RequireSecuritySignature $true -Force
|
|
153
|
+
Set-SmbClientConfiguration -RequireSecuritySignature $true -Force
|
|
154
|
+
|
|
155
|
+
# Disable LLMNR (prevent credential theft)
|
|
156
|
+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" -Force
|
|
157
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" `
|
|
158
|
+
-Name "EnableMulticast" -Value 0
|
|
159
|
+
|
|
160
|
+
# Disable NetBIOS over TCP/IP
|
|
161
|
+
$adapters = Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object { $_.IPEnabled -eq $true }
|
|
162
|
+
foreach ($adapter in $adapters) {
|
|
163
|
+
$adapter.SetTcpipNetbios(2) # 2 = Disable
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
# Disable WDigest (prevent plaintext password caching)
|
|
167
|
+
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest" `
|
|
168
|
+
-Name "UseLogonCredential" -Value 0
|
|
169
|
+
|
|
170
|
+
# Enable LSA Protection
|
|
171
|
+
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" `
|
|
172
|
+
-Name "RunAsPPL" -Value 1
|
|
173
|
+
|
|
174
|
+
# Configure UAC
|
|
175
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" `
|
|
176
|
+
-Name "EnableLUA" -Value 1
|
|
177
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" `
|
|
178
|
+
-Name "ConsentPromptBehaviorAdmin" -Value 2
|
|
179
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" `
|
|
180
|
+
-Name "PromptOnSecureDesktop" -Value 1
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Windows Firewall Configuration
|
|
184
|
+
|
|
185
|
+
```powershell
|
|
186
|
+
# ============================================
|
|
187
|
+
# Enable Windows Firewall on all profiles
|
|
188
|
+
# ============================================
|
|
189
|
+
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
|
|
190
|
+
|
|
191
|
+
# Default deny inbound, allow outbound
|
|
192
|
+
Set-NetFirewallProfile -Profile Domain -DefaultInboundAction Block -DefaultOutboundAction Allow
|
|
193
|
+
Set-NetFirewallProfile -Profile Public -DefaultInboundAction Block -DefaultOutboundAction Allow
|
|
194
|
+
Set-NetFirewallProfile -Profile Private -DefaultInboundAction Block -DefaultOutboundAction Allow
|
|
195
|
+
|
|
196
|
+
# Enable logging
|
|
197
|
+
Set-NetFirewallProfile -Profile Domain -LogAllowed True -LogBlocked True `
|
|
198
|
+
-LogFileName "%SystemRoot%\System32\LogFiles\Firewall\pfirewall.log" `
|
|
199
|
+
-LogMaxSizeKilobytes 32768
|
|
200
|
+
|
|
201
|
+
# ============================================
|
|
202
|
+
# Inbound Rules
|
|
203
|
+
# ============================================
|
|
204
|
+
|
|
205
|
+
# Allow RDP from management network only
|
|
206
|
+
New-NetFirewallRule -DisplayName "Allow RDP - Management" `
|
|
207
|
+
-Direction Inbound -Protocol TCP -LocalPort 3389 `
|
|
208
|
+
-RemoteAddress 10.0.100.0/24 -Action Allow -Profile Domain
|
|
209
|
+
|
|
210
|
+
# Allow WinRM from management network
|
|
211
|
+
New-NetFirewallRule -DisplayName "Allow WinRM - Management" `
|
|
212
|
+
-Direction Inbound -Protocol TCP -LocalPort 5985,5986 `
|
|
213
|
+
-RemoteAddress 10.0.100.0/24 -Action Allow -Profile Domain
|
|
214
|
+
|
|
215
|
+
# Allow ICMP from internal networks
|
|
216
|
+
New-NetFirewallRule -DisplayName "Allow ICMP - Internal" `
|
|
217
|
+
-Direction Inbound -Protocol ICMPv4 -IcmpType 8 `
|
|
218
|
+
-RemoteAddress 10.0.0.0/8 -Action Allow
|
|
219
|
+
|
|
220
|
+
# Allow specific application
|
|
221
|
+
New-NetFirewallRule -DisplayName "Allow IIS HTTPS" `
|
|
222
|
+
-Direction Inbound -Protocol TCP -LocalPort 443 `
|
|
223
|
+
-Action Allow -Profile Domain,Private
|
|
224
|
+
|
|
225
|
+
# Block all other inbound by default (already set above)
|
|
226
|
+
|
|
227
|
+
# ============================================
|
|
228
|
+
# Outbound Rules (optional - restrict egress)
|
|
229
|
+
# ============================================
|
|
230
|
+
|
|
231
|
+
# Allow DNS
|
|
232
|
+
New-NetFirewallRule -DisplayName "Allow DNS" `
|
|
233
|
+
-Direction Outbound -Protocol UDP -RemotePort 53 `
|
|
234
|
+
-Action Allow
|
|
235
|
+
|
|
236
|
+
# Allow HTTPS for updates
|
|
237
|
+
New-NetFirewallRule -DisplayName "Allow HTTPS Out" `
|
|
238
|
+
-Direction Outbound -Protocol TCP -RemotePort 443 `
|
|
239
|
+
-Action Allow
|
|
240
|
+
|
|
241
|
+
# Allow NTP
|
|
242
|
+
New-NetFirewallRule -DisplayName "Allow NTP" `
|
|
243
|
+
-Direction Outbound -Protocol UDP -RemotePort 123 `
|
|
244
|
+
-Action Allow
|
|
245
|
+
|
|
246
|
+
# ============================================
|
|
247
|
+
# Firewall Audit
|
|
248
|
+
# ============================================
|
|
249
|
+
|
|
250
|
+
# List all enabled firewall rules
|
|
251
|
+
Get-NetFirewallRule -Enabled True | Format-Table DisplayName, Direction, Action, Profile
|
|
252
|
+
|
|
253
|
+
# Export firewall rules
|
|
254
|
+
netsh advfirewall export "C:\SecurityAudit\firewall-rules.wfw"
|
|
255
|
+
|
|
256
|
+
# Find overly permissive rules
|
|
257
|
+
Get-NetFirewallRule -Enabled True -Direction Inbound |
|
|
258
|
+
Where-Object { $_.RemoteAddress -eq "Any" -and $_.Action -eq "Allow" } |
|
|
259
|
+
Format-Table DisplayName, LocalPort, RemoteAddress, Profile
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Audit Policy Configuration
|
|
263
|
+
|
|
264
|
+
```powershell
|
|
265
|
+
# ============================================
|
|
266
|
+
# Advanced Audit Policy
|
|
267
|
+
# ============================================
|
|
268
|
+
|
|
269
|
+
# Account Logon
|
|
270
|
+
auditpol /set /subcategory:"Credential Validation" /success:enable /failure:enable
|
|
271
|
+
auditpol /set /subcategory:"Kerberos Authentication Service" /success:enable /failure:enable
|
|
272
|
+
auditpol /set /subcategory:"Kerberos Service Ticket Operations" /success:enable /failure:enable
|
|
273
|
+
|
|
274
|
+
# Account Management
|
|
275
|
+
auditpol /set /subcategory:"Computer Account Management" /success:enable
|
|
276
|
+
auditpol /set /subcategory:"Security Group Management" /success:enable
|
|
277
|
+
auditpol /set /subcategory:"User Account Management" /success:enable /failure:enable
|
|
278
|
+
|
|
279
|
+
# Logon/Logoff
|
|
280
|
+
auditpol /set /subcategory:"Logon" /success:enable /failure:enable
|
|
281
|
+
auditpol /set /subcategory:"Logoff" /success:enable
|
|
282
|
+
auditpol /set /subcategory:"Account Lockout" /success:enable /failure:enable
|
|
283
|
+
auditpol /set /subcategory:"Special Logon" /success:enable
|
|
284
|
+
|
|
285
|
+
# Object Access
|
|
286
|
+
auditpol /set /subcategory:"File System" /success:enable /failure:enable
|
|
287
|
+
auditpol /set /subcategory:"Registry" /success:enable /failure:enable
|
|
288
|
+
auditpol /set /subcategory:"SAM" /success:enable /failure:enable
|
|
289
|
+
|
|
290
|
+
# Policy Change
|
|
291
|
+
auditpol /set /subcategory:"Audit Policy Change" /success:enable /failure:enable
|
|
292
|
+
auditpol /set /subcategory:"Authentication Policy Change" /success:enable
|
|
293
|
+
auditpol /set /subcategory:"Authorization Policy Change" /success:enable
|
|
294
|
+
|
|
295
|
+
# Privilege Use
|
|
296
|
+
auditpol /set /subcategory:"Sensitive Privilege Use" /success:enable /failure:enable
|
|
297
|
+
|
|
298
|
+
# System
|
|
299
|
+
auditpol /set /subcategory:"Security State Change" /success:enable /failure:enable
|
|
300
|
+
auditpol /set /subcategory:"Security System Extension" /success:enable /failure:enable
|
|
301
|
+
auditpol /set /subcategory:"System Integrity" /success:enable /failure:enable
|
|
302
|
+
|
|
303
|
+
# Verify audit policy
|
|
304
|
+
auditpol /get /category:*
|
|
305
|
+
|
|
306
|
+
# Export audit policy
|
|
307
|
+
auditpol /backup /file:C:\SecurityAudit\audit-policy.csv
|
|
308
|
+
|
|
309
|
+
# ============================================
|
|
310
|
+
# PowerShell Logging (Critical for forensics)
|
|
311
|
+
# ============================================
|
|
312
|
+
|
|
313
|
+
# Enable Script Block Logging
|
|
314
|
+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" -Force
|
|
315
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" `
|
|
316
|
+
-Name "EnableScriptBlockLogging" -Value 1
|
|
317
|
+
|
|
318
|
+
# Enable Module Logging
|
|
319
|
+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging" -Force
|
|
320
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging" `
|
|
321
|
+
-Name "EnableModuleLogging" -Value 1
|
|
322
|
+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames" -Force
|
|
323
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames" `
|
|
324
|
+
-Name "*" -Value "*"
|
|
325
|
+
|
|
326
|
+
# Enable Transcription Logging
|
|
327
|
+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription" -Force
|
|
328
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription" `
|
|
329
|
+
-Name "EnableTranscripting" -Value 1
|
|
330
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription" `
|
|
331
|
+
-Name "OutputDirectory" -Value "C:\PSLogs"
|
|
332
|
+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription" `
|
|
333
|
+
-Name "EnableInvocationHeader" -Value 1
|
|
334
|
+
|
|
335
|
+
# Configure Windows Event Forwarding (WEF) for centralized logging
|
|
336
|
+
wecutil qc /q
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## Windows Defender Configuration
|
|
340
|
+
|
|
341
|
+
```powershell
|
|
342
|
+
# ============================================
|
|
343
|
+
# Real-time Protection
|
|
344
|
+
# ============================================
|
|
345
|
+
Set-MpPreference -DisableRealtimeMonitoring $false
|
|
346
|
+
Set-MpPreference -DisableBehaviorMonitoring $false
|
|
347
|
+
Set-MpPreference -DisableIOAVProtection $false
|
|
348
|
+
Set-MpPreference -DisableScriptScanning $false
|
|
349
|
+
|
|
350
|
+
# ============================================
|
|
351
|
+
# Cloud Protection
|
|
352
|
+
# ============================================
|
|
353
|
+
Set-MpPreference -MAPSReporting Advanced
|
|
354
|
+
Set-MpPreference -SubmitSamplesConsent SendAllSamples
|
|
355
|
+
Set-MpPreference -CloudBlockLevel High
|
|
356
|
+
Set-MpPreference -CloudExtendedTimeout 50
|
|
357
|
+
|
|
358
|
+
# ============================================
|
|
359
|
+
# Scan Configuration
|
|
360
|
+
# ============================================
|
|
361
|
+
Set-MpPreference -ScanScheduleDay Everyday
|
|
362
|
+
Set-MpPreference -ScanScheduleTime 02:00:00
|
|
363
|
+
Set-MpPreference -ScanParameters FullScan
|
|
364
|
+
|
|
365
|
+
# Quick scan daily, full scan weekly
|
|
366
|
+
Set-MpPreference -ScanScheduleQuickScanTime 12:00:00
|
|
367
|
+
|
|
368
|
+
# Scan removable drives
|
|
369
|
+
Set-MpPreference -DisableRemovableDriveScanning $false
|
|
370
|
+
|
|
371
|
+
# Scan network files
|
|
372
|
+
Set-MpPreference -DisableScanningNetworkFiles $false
|
|
373
|
+
|
|
374
|
+
# ============================================
|
|
375
|
+
# Attack Surface Reduction (ASR) Rules
|
|
376
|
+
# ============================================
|
|
377
|
+
|
|
378
|
+
# Block executable content from email and webmail
|
|
379
|
+
Add-MpPreference -AttackSurfaceReductionRules_Ids BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550 `
|
|
380
|
+
-AttackSurfaceReductionRules_Actions Enabled
|
|
381
|
+
|
|
382
|
+
# Block Office applications from creating child processes
|
|
383
|
+
Add-MpPreference -AttackSurfaceReductionRules_Ids D4F940AB-401B-4EFC-AADC-AD5F3C50688A `
|
|
384
|
+
-AttackSurfaceReductionRules_Actions Enabled
|
|
385
|
+
|
|
386
|
+
# Block credential stealing from LSASS
|
|
387
|
+
Add-MpPreference -AttackSurfaceReductionRules_Ids 9E6C4E1F-7D60-472F-BA1A-A39EF669E4B2 `
|
|
388
|
+
-AttackSurfaceReductionRules_Actions Enabled
|
|
389
|
+
|
|
390
|
+
# Block process creations from PSExec and WMI commands
|
|
391
|
+
Add-MpPreference -AttackSurfaceReductionRules_Ids D1E49AAC-8F56-4280-B9BA-993A6D77406C `
|
|
392
|
+
-AttackSurfaceReductionRules_Actions Enabled
|
|
393
|
+
|
|
394
|
+
# Block JavaScript and VBScript from launching downloaded content
|
|
395
|
+
Add-MpPreference -AttackSurfaceReductionRules_Ids D3E037E1-3EB8-44C8-A917-57927947596D `
|
|
396
|
+
-AttackSurfaceReductionRules_Actions Enabled
|
|
397
|
+
|
|
398
|
+
# Block Office macros from calling Win32 API
|
|
399
|
+
Add-MpPreference -AttackSurfaceReductionRules_Ids 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B `
|
|
400
|
+
-AttackSurfaceReductionRules_Actions Enabled
|
|
401
|
+
|
|
402
|
+
# View ASR rule status
|
|
403
|
+
Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Ids
|
|
404
|
+
Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Actions
|
|
405
|
+
|
|
406
|
+
# ============================================
|
|
407
|
+
# Exclusions (minimize these)
|
|
408
|
+
# ============================================
|
|
409
|
+
# Only add exclusions when absolutely necessary and document the reason
|
|
410
|
+
Add-MpPreference -ExclusionPath "C:\AppData\SpecificApp" # Reason: false positive on app binary
|
|
411
|
+
|
|
412
|
+
# Review current exclusions
|
|
413
|
+
Get-MpPreference | Select-Object -ExpandProperty ExclusionPath
|
|
414
|
+
Get-MpPreference | Select-Object -ExpandProperty ExclusionProcess
|
|
415
|
+
Get-MpPreference | Select-Object -ExpandProperty ExclusionExtension
|
|
416
|
+
|
|
417
|
+
# Update definitions manually
|
|
418
|
+
Update-MpSignature
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
## Contents
|
|
423
|
+
|
|
424
|
+
- [BitLocker Drive Encryption](references/details.md)
|
|
425
|
+
- [Credential Guard](references/details.md)
|
|
426
|
+
- [AppLocker Configuration](references/details.md)
|
|
427
|
+
- [Security Audit Script](references/details.md)
|
|
428
|
+
- [Troubleshooting](references/details.md)
|
|
429
|
+
- [Best Practices](references/details.md)
|
|
430
|
+
- [Related Skills](references/details.md)
|
|
431
|
+
|
|
432
|
+
## When to Use This Skill
|
|
433
|
+
|
|
434
|
+
Use this skill when:
|
|
435
|
+
- Hardening new Windows Server deployments
|
|
436
|
+
- Implementing CIS benchmarks or Microsoft security baselines
|
|
437
|
+
- Preparing for compliance audits (SOC2, PCI-DSS, HIPAA)
|
|
438
|
+
- Configuring security features after a security incident
|
|
439
|
+
- Setting up Windows Defender and advanced threat protection
|
|
440
|
+
- Establishing Group Policy security standards for a domain
|
|
441
|
+
|
|
442
|
+
## Limitations
|
|
443
|
+
|
|
444
|
+
- Apply guidance only within authorized scope; test destructive steps in non-production first.
|
|
445
|
+
- Docs-only import: upstream scripts and templates not bundled.
|
|
446
|
+
|
|
447
|
+
### Example
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
# Read-only first: inventory before any active step.
|
|
451
|
+
which <tool> && <tool> --help | head -n 20
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
> Adapted from [BagelHole/DevOps-Security-Agent-Skills](https://github.com/BagelHole/DevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use/Limitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Details (moved from SKILL.md)
|
|
2
|
+
|
|
3
|
+
> Extended reference content for `windows-hardening`, kept under `references/` so the entrypoint stays within the audit budget.
|
|
4
|
+
|
|
5
|
+
## BitLocker Drive Encryption
|
|
6
|
+
|
|
7
|
+
```powershell
|
|
8
|
+
# ============================================
|
|
9
|
+
# Enable BitLocker on OS drive with TPM
|
|
10
|
+
# ============================================
|
|
11
|
+
|
|
12
|
+
# Check TPM status
|
|
13
|
+
Get-Tpm
|
|
14
|
+
|
|
15
|
+
# Enable BitLocker with TPM protector
|
|
16
|
+
Enable-BitLocker -MountPoint "C:" -TpmProtector -EncryptionMethod XtsAes256
|
|
17
|
+
|
|
18
|
+
# Add recovery password protector
|
|
19
|
+
Add-BitLockerKeyProtector -MountPoint "C:" -RecoveryPasswordProtector
|
|
20
|
+
|
|
21
|
+
# Backup recovery key to Active Directory
|
|
22
|
+
Backup-BitLockerKeyProtector -MountPoint "C:" -KeyProtectorId (
|
|
23
|
+
(Get-BitLockerVolume -MountPoint "C:").KeyProtector |
|
|
24
|
+
Where-Object { $_.KeyProtectorType -eq "RecoveryPassword" }
|
|
25
|
+
).KeyProtectorId
|
|
26
|
+
|
|
27
|
+
# Enable BitLocker on data drives
|
|
28
|
+
Enable-BitLocker -MountPoint "D:" -RecoveryPasswordProtector -EncryptionMethod XtsAes256 -Password (
|
|
29
|
+
Read-Host -AsSecureString "Enter BitLocker password for D:"
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
# Check BitLocker status
|
|
33
|
+
Get-BitLockerVolume | Format-Table MountPoint, VolumeStatus, EncryptionMethod, ProtectionStatus
|
|
34
|
+
|
|
35
|
+
# Configure BitLocker via Group Policy
|
|
36
|
+
# Computer Configuration > Administrative Templates > Windows Components > BitLocker Drive Encryption
|
|
37
|
+
# - Require additional authentication at startup: Enabled (Allow BitLocker without a compatible TPM: unchecked)
|
|
38
|
+
# - Choose drive encryption method: XTS-AES 256-bit
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Credential Guard
|
|
43
|
+
|
|
44
|
+
```powershell
|
|
45
|
+
# ============================================
|
|
46
|
+
# Enable Windows Credential Guard
|
|
47
|
+
# ============================================
|
|
48
|
+
|
|
49
|
+
# Check hardware compatibility
|
|
50
|
+
# Requires: UEFI, Secure Boot, TPM 2.0, VBS-compatible CPU
|
|
51
|
+
systeminfo | findstr /i "Hyper-V"
|
|
52
|
+
|
|
53
|
+
# Enable via registry
|
|
54
|
+
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" `
|
|
55
|
+
-Name "EnableVirtualizationBasedSecurity" -Value 1
|
|
56
|
+
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" `
|
|
57
|
+
-Name "RequirePlatformSecurityFeatures" -Value 3 # 3 = Secure Boot + DMA Protection
|
|
58
|
+
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" `
|
|
59
|
+
-Name "LsaCfgFlags" -Value 1 # 1 = Enabled with UEFI lock
|
|
60
|
+
|
|
61
|
+
# Verify Credential Guard status
|
|
62
|
+
Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard |
|
|
63
|
+
Select-Object SecurityServicesRunning, VirtualizationBasedSecurityStatus
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## AppLocker Configuration
|
|
68
|
+
|
|
69
|
+
```powershell
|
|
70
|
+
# ============================================
|
|
71
|
+
# Configure AppLocker for application whitelisting
|
|
72
|
+
# ============================================
|
|
73
|
+
|
|
74
|
+
# Generate default rules
|
|
75
|
+
# Computer Configuration > Policies > Windows Settings > Security Settings > Application Control Policies > AppLocker
|
|
76
|
+
|
|
77
|
+
# Create default executable rules via PowerShell
|
|
78
|
+
$ruleCollection = @"
|
|
79
|
+
<AppLockerPolicy Version="1">
|
|
80
|
+
<RuleCollection Type="Exe" EnforcementMode="AuditOnly">
|
|
81
|
+
<FilePathRule Id="921cc481-6e17-4653-8f75-050b80acca20" Name="Allow Program Files" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
|
82
|
+
<Conditions>
|
|
83
|
+
<FilePathCondition Path="%PROGRAMFILES%\*"/>
|
|
84
|
+
</Conditions>
|
|
85
|
+
</FilePathRule>
|
|
86
|
+
<FilePathRule Id="a61c8b2c-a319-4cd0-9690-d2177cad7b51" Name="Allow Windows" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
|
87
|
+
<Conditions>
|
|
88
|
+
<FilePathCondition Path="%WINDIR%\*"/>
|
|
89
|
+
</Conditions>
|
|
90
|
+
</FilePathRule>
|
|
91
|
+
<FilePublisherRule Id="b7af7102-efde-4369-8a89-7a6a392d1473" Name="Allow signed by Microsoft" Description="" UserOrGroupSid="S-1-1-0" Action="Allow">
|
|
92
|
+
<Conditions>
|
|
93
|
+
<FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION*" ProductName="*" BinaryName="*">
|
|
94
|
+
<BinaryVersionRange LowSection="*" HighSection="*"/>
|
|
95
|
+
</FilePublisherCondition>
|
|
96
|
+
</Conditions>
|
|
97
|
+
</FilePublisherRule>
|
|
98
|
+
</RuleCollection>
|
|
99
|
+
</AppLockerPolicy>
|
|
100
|
+
"@
|
|
101
|
+
|
|
102
|
+
# Start AppLocker service
|
|
103
|
+
Set-Service -Name AppIDSvc -StartupType Automatic
|
|
104
|
+
Start-Service AppIDSvc
|
|
105
|
+
|
|
106
|
+
# Set to Audit mode first, then switch to Enforce after tuning
|
|
107
|
+
# Review logs: Event Viewer > Applications and Services Logs > Microsoft > Windows > AppLocker
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
## Security Audit Script
|
|
112
|
+
|
|
113
|
+
```powershell
|
|
114
|
+
# windows-security-audit.ps1 - Comprehensive security audit
|
|
115
|
+
|
|
116
|
+
Write-Host "=== Windows Security Audit Report ===" -ForegroundColor Cyan
|
|
117
|
+
Write-Host "Date: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss UTC' -AsUTC)"
|
|
118
|
+
Write-Host "Host: $env:COMPUTERNAME"
|
|
119
|
+
Write-Host ""
|
|
120
|
+
|
|
121
|
+
# OS Info
|
|
122
|
+
Write-Host "--- OS Information ---" -ForegroundColor Yellow
|
|
123
|
+
Get-CimInstance Win32_OperatingSystem | Format-Table Caption, Version, BuildNumber, OSArchitecture
|
|
124
|
+
|
|
125
|
+
# Firewall status
|
|
126
|
+
Write-Host "--- Firewall Status ---" -ForegroundColor Yellow
|
|
127
|
+
Get-NetFirewallProfile | Format-Table Name, Enabled, DefaultInboundAction, DefaultOutboundAction
|
|
128
|
+
|
|
129
|
+
# SMBv1 status
|
|
130
|
+
Write-Host "--- SMB Status ---" -ForegroundColor Yellow
|
|
131
|
+
$smb1 = Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol
|
|
132
|
+
if ($smb1.EnableSMB1Protocol) { Write-Host "WARNING: SMBv1 is ENABLED" -ForegroundColor Red }
|
|
133
|
+
else { Write-Host "OK: SMBv1 is disabled" -ForegroundColor Green }
|
|
134
|
+
|
|
135
|
+
# Windows Defender status
|
|
136
|
+
Write-Host "--- Windows Defender ---" -ForegroundColor Yellow
|
|
137
|
+
Get-MpComputerStatus | Format-Table AMServiceEnabled, RealTimeProtectionEnabled, AntivirusSignatureLastUpdated
|
|
138
|
+
|
|
139
|
+
# BitLocker status
|
|
140
|
+
Write-Host "--- BitLocker ---" -ForegroundColor Yellow
|
|
141
|
+
Get-BitLockerVolume | Format-Table MountPoint, ProtectionStatus, EncryptionMethod
|
|
142
|
+
|
|
143
|
+
# Open ports
|
|
144
|
+
Write-Host "--- Listening Ports ---" -ForegroundColor Yellow
|
|
145
|
+
Get-NetTCPConnection -State Listen | Sort-Object LocalPort |
|
|
146
|
+
Format-Table LocalAddress, LocalPort, OwningProcess,
|
|
147
|
+
@{N="Process";E={(Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue).Name}}
|
|
148
|
+
|
|
149
|
+
# Local administrators
|
|
150
|
+
Write-Host "--- Local Administrators ---" -ForegroundColor Yellow
|
|
151
|
+
Get-LocalGroupMember -Group "Administrators" | Format-Table Name, ObjectClass, PrincipalSource
|
|
152
|
+
|
|
153
|
+
# Pending updates
|
|
154
|
+
Write-Host "--- Windows Update ---" -ForegroundColor Yellow
|
|
155
|
+
$updateSession = New-Object -ComObject Microsoft.Update.Session
|
|
156
|
+
$updateSearcher = $updateSession.CreateUpdateSearcher()
|
|
157
|
+
$pendingUpdates = $updateSearcher.Search("IsInstalled=0")
|
|
158
|
+
Write-Host "Pending updates: $($pendingUpdates.Updates.Count)"
|
|
159
|
+
|
|
160
|
+
# Audit policy
|
|
161
|
+
Write-Host "--- Audit Policy ---" -ForegroundColor Yellow
|
|
162
|
+
auditpol /get /category:* | Select-String "Success|Failure|No Auditing"
|
|
163
|
+
|
|
164
|
+
Write-Host "`n=== Audit Complete ===" -ForegroundColor Cyan
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## Troubleshooting
|
|
169
|
+
|
|
170
|
+
| Problem | Cause | Solution |
|
|
171
|
+
|---------|-------|----------|
|
|
172
|
+
| GPO not applying | GPO not linked or filtered | Run `gpresult /r`; check OU linking and security filtering |
|
|
173
|
+
| BitLocker fails to enable | TPM not present or enabled | Check BIOS/UEFI for TPM; run `manage-bde -status` |
|
|
174
|
+
| AppLocker blocks legitimate apps | Rules too restrictive | Start in Audit mode; review AppLocker event logs; add exceptions |
|
|
175
|
+
| Credential Guard breaks apps | Legacy auth protocols blocked | Identify apps using NTLM/CredSSP; migrate to Kerberos/modern auth |
|
|
176
|
+
| SMBv1 removal breaks legacy devices | Old devices require SMBv1 | Isolate legacy devices; plan migration; document risk acceptance |
|
|
177
|
+
| Windows Defender exclusions too broad | Performance tuning added wide paths | Review and narrow exclusions; document business justification |
|
|
178
|
+
| Audit logs filling disk | Too many audit events | Increase log size; configure log forwarding to SIEM; tune audit categories |
|
|
179
|
+
| Firewall rules not persisting | Rules created without -PolicyStore | Use `-PolicyStore PersistentStore`; verify with `Get-NetFirewallRule` |
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
## Best Practices
|
|
183
|
+
|
|
184
|
+
- Apply Microsoft security baselines as a starting point
|
|
185
|
+
- Disable SMBv1 on all systems (no exceptions without documented risk acceptance)
|
|
186
|
+
- Enable Credential Guard on all compatible hardware
|
|
187
|
+
- Configure AppLocker in audit mode first, then enforce after tuning
|
|
188
|
+
- Enable all recommended audit subcategories and forward to SIEM
|
|
189
|
+
- Enable PowerShell script block and module logging on all servers
|
|
190
|
+
- Implement LAPS for local administrator password management
|
|
191
|
+
- Enable BitLocker on all drives with TPM and recovery key backup
|
|
192
|
+
- Apply Attack Surface Reduction rules in Windows Defender
|
|
193
|
+
- Perform monthly security audits with the audit script
|
|
194
|
+
- Keep Windows fully patched with automated update management
|
|
195
|
+
- Disable unnecessary services and features to reduce attack surface
|
|
196
|
+
- Use Windows Firewall with explicit allow rules per application
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
## Related Skills
|
|
200
|
+
|
|
201
|
+
- cis-benchmarks (`cis-benchmarks`) - Compliance scanning
|
|
202
|
+
- windows-server (`windows-server`) - Server administration
|
|
203
|
+
- linux-hardening (`linux-hardening`) - Linux security hardening
|
|
204
|
+
|