Manual Setup Guide
Step-by-step instructions for manually configuring Windows security parameters
Overview
This guide provides detailed instructions for manually configuring Windows security parameters using various methods including Local Security Policy, Registry Editor, Command Line, and Group Policy. Each method is suitable for different scenarios and administrative requirements.
Setup Methods
Local Security Policy
Graphical interface for configuring security policies
Registry Editor
Direct registry modification for advanced settings
Command Line
Automated configuration using command-line tools
Group Policy
Enterprise-level policy management
Local Security Policy
The Local Security Policy editor provides a graphical interface for configuring Windows security settings. This is the most user-friendly method for manual configuration.
Accessing Local Security Policy
- Press
Win + R
to open the Run dialog - Type
secpol.msc
and press Enter - If prompted by UAC, click "Yes" to allow administrator access
Account Policies Configuration
1. Navigate to: Account Policies → Password Policy
2. Configure the following settings:
- Enforce password history: 24 passwords remembered
- Maximum password age: 90 days
- Minimum password age: 1 day
- Minimum password length: 12 characters
- Password must meet complexity requirements: Enabled
- Store passwords using reversible encryption: Disabled
3. Navigate to: Account Policies → Account Lockout Policy
4. Configure the following settings:
- Account lockout duration: 15 minutes
- Account lockout threshold: 5 invalid logon attempts
- Reset account lockout counter after: 10 minutes
Local Policies Configuration
1. Navigate to: Local Policies → User Rights Assignment
2. Configure the following settings:
- Access this computer from the network: Administrators, Authenticated Users
- Allow log on locally: Administrators, Users
- Back up files and directories: Administrators
- Change the system time: Administrators, LOCAL SERVICE
- Change the time zone: Administrators, LOCAL SERVICE
3. Navigate to: Local Policies → Security Options
4. Configure the following settings:
- Accounts: Block Microsoft accounts: Users cannot add or log on with Microsoft accounts
- Accounts: Guest account status: Disabled
- Accounts: Limit local account use of blank passwords: Enabled
- Interactive logon: Do not require CTRL+ALT+DEL: Disabled
- Interactive logon: Don't display last signed in: Enabled
Registry Editor
Direct registry modification provides the most granular control over Windows security settings. This method is recommended for advanced users and automated deployments.
Accessing Registry Editor
- Press
Win + R
to open the Run dialog - Type
regedit
and press Enter - If prompted by UAC, click "Yes" to allow administrator access
Password Policy Registry Settings
Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Set the following values:
- PasswordHistorySize: 24 (DWORD)
- MaximumPasswordAge: 90 (DWORD)
- MinimumPasswordAge: 1 (DWORD)
- MinimumPasswordLength: 12 (DWORD)
- PasswordComplexity: 1 (DWORD)
- ClearTextPassword: 0 (DWORD)
Account Lockout Registry Settings
Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Set the following values:
- LockoutBadCount: 5 (DWORD)
- LockoutDuration: 15 (DWORD)
- ResetLockoutCount: 10 (DWORD)
- AllowAdministratorLockout: 1 (DWORD)
Interactive Logon Registry Settings
Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Set the following values:
- DisableCAD: 0 (DWORD) - Require CTRL+ALT+DEL
- DontDisplayLastUserName: 0 (DWORD) - Don't display last signed in
- LegalNoticeCaption: "Legal Notice" (String)
- LegalNoticeText: "This system is restricted to authorized users" (String)
User Account Control Registry Settings
Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Set the following values:
- ConsentPromptBehaviorAdmin: 5 (DWORD) - Prompt for consent for non-Windows binaries
- ConsentPromptBehaviorUser: 3 (DWORD) - Automatically deny elevation requests
- EnableInstallerDetection: 1 (DWORD) - Enabled
- EnableLUA: 1 (DWORD) - Enabled
- PromptOnSecureDesktop: 1 (DWORD) - Enabled
- ValidateAdminCodeSignatures: 0 (DWORD) - Disabled
Command Line Configuration
Command-line tools provide automated configuration capabilities suitable for scripting and remote administration.
Using net accounts Command
# Configure password policy
net accounts /uniquepw:24
net accounts /maxpwage:90
net accounts /minpwage:1
net accounts /minpwlen:12
# Configure account lockout policy
net accounts /lockoutthreshold:5
net accounts /lockoutduration:15
net accounts /lockoutwindow:10
# View current settings
net accounts
Using reg add Command
# Password policy settings
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v PasswordHistorySize /t REG_DWORD /d 24 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v MaximumPasswordAge /t REG_DWORD /d 90 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v MinimumPasswordAge /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v MinimumPasswordLength /t REG_DWORD /d 12 /f
# Interactive logon settings
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableCAD /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DontDisplayLastUserName /t REG_DWORD /d 0 /f
# UAC settings
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 5 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorUser /t REG_DWORD /d 3 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 1 /f
Using secedit Command
# Export current security policy
secedit /export /cfg current_policy.inf
# Import security policy from file
secedit /configure /db security.sdb /cfg policy.inf
# Apply security template
secedit /configure /db security.sdb /cfg security_template.inf
Using auditpol Command
# Configure audit policies
auditpol /set /subcategory:"Credential Validation" /success:enable /failure:enable
auditpol /set /subcategory:"Account Logon" /success:enable /failure:enable
auditpol /set /subcategory:"Logon" /success:enable /failure:enable
# View current audit policy
auditpol /get /category:*
Group Policy Configuration
Group Policy provides enterprise-level policy management for Windows domains and organizational units.
Accessing Group Policy Management
- Press
Win + R
to open the Run dialog - Type
gpmc.msc
and press Enter - Navigate to your domain and organizational units
Computer Configuration Policies
Navigate to: Computer Configuration → Policies → Windows Settings → Security Settings
1. Account Policies → Password Policy
- Enforce password history: 24 passwords remembered
- Maximum password age: 90 days
- Minimum password age: 1 day
- Minimum password length: 12 characters
- Password must meet complexity requirements: Enabled
- Store passwords using reversible encryption: Disabled
2. Account Policies → Account Lockout Policy
- Account lockout duration: 15 minutes
- Account lockout threshold: 5 invalid logon attempts
- Reset account lockout counter after: 10 minutes
3. Local Policies → User Rights Assignment
- Access this computer from the network: Administrators, Authenticated Users
- Allow log on locally: Administrators, Users
- Back up files and directories: Administrators
- Change the system time: Administrators, LOCAL SERVICE
4. Local Policies → Security Options
- Accounts: Block Microsoft accounts: Users cannot add or log on with Microsoft accounts
- Accounts: Guest account status: Disabled
- Interactive logon: Do not require CTRL+ALT+DEL: Disabled
- Interactive logon: Don't display last signed in: Enabled
Advanced Audit Policy Configuration
Navigate to: Computer Configuration → Policies → Windows Settings → Security Settings → Advanced Audit Policy Configuration
1. Account Logon
- Audit Credential Validation: Success and Failure
- Audit Kerberos Authentication Service: Success and Failure
- Audit Kerberos Service Ticket Operations: Success and Failure
2. Account Management
- Audit Application Group Management: Success and Failure
- Audit Security Group Management: Success and Failure
- Audit User Account Management: Success and Failure
3. Logon/Logoff
- Audit Logon: Success and Failure
- Audit Logoff: Success
- Audit Account Lockout: Success and Failure
Microsoft Defender Application Guard
Navigate to: Computer Configuration → Policies → Administrative Templates → Windows Components → Microsoft Defender Application Guard
Configure the following settings:
- Allow auditing events: Disabled
- Allow camera and microphone access: Disabled
- Allow data persistence: Disabled
- Allow file download to host: Disabled
- Configure clipboard settings: Disabled
- Allow virtual GPU: Disabled
- Block non-enterprise content: Enabled
- Allow printing: Disabled
- Save files to host: Disabled
- Enable Application Guard: Enabled
Verification and Testing
Verifying Password Policy
# Check password policy settings
net accounts
# Verify registry settings
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v PasswordHistorySize
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v MaximumPasswordAge
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v MinimumPasswordLength
Verifying Account Lockout Policy
# Check account lockout settings
net accounts
# Verify registry settings
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LockoutBadCount
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LockoutDuration
Verifying UAC Settings
# Check UAC registry settings
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v PromptOnSecureDesktop
Verifying Audit Policies
# Check audit policy settings
auditpol /get /category:*
# Check specific subcategories
auditpol /get /subcategory:"Credential Validation"
auditpol /get /subcategory:"Account Logon"
auditpol /get /subcategory:"Logon"
Best Practices
Before Making Changes
- Create a backup: Always backup current security settings before making changes
- Test in non-production: Test all changes in a non-production environment first
- Document changes: Keep detailed records of all security policy changes
- Plan rollback: Have a rollback plan in case changes cause issues
Implementation Strategy
- Phased approach: Implement changes in phases to minimize risk
- Monitor impact: Monitor system performance and user experience after changes
- User communication: Inform users of any changes that may affect their workflow
- Regular reviews: Schedule regular reviews of security policy effectiveness
Maintenance and Monitoring
- Regular audits: Conduct regular security audits to ensure compliance
- Performance monitoring: Monitor system performance for any negative impacts
- Security updates: Keep security policies updated with latest best practices
- Incident response: Have procedures in place for security incidents
Troubleshooting
Common Issues
;gpupdate /force
to refresh Group Policy settings and restart the system.Recovery Procedures
# Restore from backup using secedit
secedit /configure /db security.sdb /cfg backup_policy.inf
# Reset to default security settings
secedit /configure /db security.sdb /cfg %windir%\inf\defltbase.inf
# Restore specific registry keys from backup
reg import backup_registry.reg