Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Tutorial Windows Basic Powershell Harden filter_list
Author
Message
Windows Basic Powershell Harden #1
Code:
# Enable Windows Defender and ensure it's up to date
Set-MpPreference -DisableRealtimeMonitoring $false
Start-MpScan -ScanType QuickScan
Update-MpSignature

# Enable Windows Firewall
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True

# Enable BitLocker for system drive encryption
# Note: Customize the encryption method as needed (e.g., AES256)
Enable-BitLocker -MountPoint "C:" -EncryptionMethod XtsAes256 -UsedSpaceOnly

# Set a strong password policy
# Note: Adjust settings based on your organization's policies
secpol.exe /s /t /p "Security Settings\Account Policies\Password Policy" /v "MinimumPasswordAge" /d "1"
secpol.exe /s /t /p "Security Settings\Account Policies\Password Policy" /v "PasswordComplexity" /d "1"
secpol.exe /s /t /p "Security Settings\Account Policies\Password Policy" /v "PasswordLength" /d "12"

# Disable Remote Assistance and Remote Desktop
# Adjust as per your requirements
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 1

# Disable PowerShell scripts from running without signing
Set-ExecutionPolicy RemoteSigned

# Enable User Account Control (UAC)
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 5

# Enable SmartScreen Filter for Internet Explorer and Microsoft Edge
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter" -Name "EnabledV9" -Value 1
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "SmartScreenEnabled" -Value 1

# Disable Autorun for removable drives
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoDriveTypeAutoRun" -Value 255

# Enable auditing of logon events
Auditpol /set /subcategory:"Logon" /success:enable /failure:enable

# Restart the system for changes to take effect
Restart-Computer -Force

Reply

RE: Windows Basic Powershell Harden #2
Awesome,thanks for sharing.
Need something like this for work

Reply

RE: Windows Basic Powershell Harden #3
If you are looking for a good place to start learning PowerShell

Reply

RE: Windows Basic Powershell Harden #4
(11-08-2023, 11:05 PM)r00t020 Wrote: If you are looking for a good place to start learning PowerShell
I agree with this user

Reply

RE: Windows Basic Powershell Harden #5
Damn, actually very interesting. I am looking to really harden Windows as much as possible. I use it for gaming so it will have a lot of spyware anticheats but I don't do anything bad on it. AC's these days are a huge attack vector. (Think about the recent Apex Legends hacks)

Reply







Users browsing this thread: 1 Guest(s)