該項目最初是Windows 10的簡單硬化列表。一段時間後,創建了HardeningKitty來簡化Windows的硬化。現在,HardeningKitty支持Microsoft,CIS基準,DoD Stig和BSI Sisyphus Win10的指南。當然還有我自己的硬化清單。
這是一個硬化清單,可在私人和商業環境中用於硬化Windows 10。清單可用於所有Windows版本,但是在Windows 10 Home中,組策略編輯器未集成,並且必須在註冊表中直接進行調整。為此,有來自HardeningKitty的冰雹模式。
設置應被視為安全性和隱私建議,應仔細檢查它們是否會影響基礎架構的操作或影響關鍵功能的可用性。權衡安全性與可用性很重要。
該項目始於為Windows 10創建一個簡單的硬化清單。隨著HardeningKitty的開發,重點已轉移到對各種知名框架 /基準測試的審核中。同時,支持各種CIS基準和Microsoft安全基線。隨著冰雹模式的開發,還可以在Windows系統上應用任何硬化清單的設置。
HardeningKitty支持Windows系統的硬化。使用查找列表檢索和評估系統的配置。另外,可以根據預定義值硬化系統。 HardeningKitty讀取註冊表的設置,並使用其他模塊來讀取註冊表之外的配置。
該腳本是為英語系統開發的。在其他語言中,分析可能是不正確的。如果發生這種情況,請創建一個問題。
HardeningKitty的發展發生在此存儲庫中。在SCIP AG的存儲庫中是HardeningKitty的穩定版本,已通過SCIP AG的代碼簽名證書簽名。這意味著HardeningKitty也可以在僅允許簽名腳本的系統上運行。
運行具有管理特權以訪問機器設置的腳本。對於用戶設置,最好使用普通用戶帳戶執行它們。理想情況下,用戶帳戶用於日常工作。
下載HardeningKitty並將其複製到目標系統(腳本和列表)。然後可以進口和執行HardeningKitty:
PS C:tmp > Import-Module .HardeningKitty.psm1
PS C:tmp > Invoke-HardeningKitty - EmojiSupport
= ^ ._ .^ =
_ ( ) / HardeningKitty 0.9 . 0 - 1662273740
[ * ] 9 / 4 / 2022 8 : 54 : 12 AM - Starting HardeningKitty
[ * ] 9 / 4 / 2022 8 : 54 : 12 AM - Getting user information
[ * ] Hostname: DESKTOP - DG83TOD
[ * ] Domain: WORKGROUP
...
[ * ] [ * ] 9 / 4 / 2022 8 : 54 : 12 AM - Starting Category Account Policies
[?] ID 1103 , Store passwords using reversible encryption , Result = 0 , Severity = Passed
[?] ID 1100 , Account lockout threshold , Result = 10 , Severity = Passed
[?] ID 1101 , Account lockout duration , Result = 30 , Severity = Passed
...
[ * ] 9 / 4 / 2022 8 : 54 : 12 AM - Starting Category User Rights Assignment
[?] ID 1200 , Access this computer from the network , Result = BUILTINAdministrators;BUILTINUsers , Recommended = BUILTINAdministrators , Severity = Medium
...
[ * ] 9 / 4 / 2022 8 : 54 : 14 AM - Starting Category Administrative Templates: Printer
[?] ID 1764 , Point and Print Restrictions: When installing drivers for a new connection (CVE - 2021 - 34527 ) , Result = 1 , Recommended = 0 , Severity = High
[?] ID 1765 , Point and Print Restrictions: When updating drivers for an existing connection (CVE - 2021 - 34527 ) , Result = 2 , Recommended = 0 , Severity = High
...
[ * ] 9 / 4 / 2022 8 : 54 : 19 AM - Starting Category MS Security Guide
[?] ID 2200 , LSA Protection , Result = , Recommended = 1 , Severity = Medium
[?] ID 2201 , Lsass.exe audit mode , Result = , Recommended = 8 , Severity = Low
...
[ * ] 9 / 4 / 2022 8 : 54 : 25 AM - HardeningKitty is done
[ * ] 9 / 4 / 2022 8 : 54 : 25 AM - Your HardeningKitty score is: 4.82 . HardeningKitty Statistics: Total checks: 325 - Passed: 213 , Low: 33 , Medium: 76 , High: 3 .首先創建Directory HardeningKitty ,對於每個版本,在PSModulePath環境變量中列出的路徑中的子目錄中的一個子目錄。
將模塊hardeningkitty.psm1 , hardeningkitty.psd1和列表目錄複製到此新目錄。
PS C:tmp > $Version = " 0.9.3 "
PS C:tmp > New-Item - Path $ Env: ProgramFiles WindowsPowerShellModulesHardeningKitty $Version - ItemType Directory
PS C:tmp > Copy-Item - Path .HardeningKitty.psd1 , .HardeningKitty.psm1 , .lists - Destination $ Env: ProgramFiles WindowsPowerShellModulesHardeningKitty $Version - Recurse有關更多信息,請參見Microsoft的文章安裝PowerShell模塊。
您可以使用下面的腳本下載並安裝HardeningKitty的最新版本。
Function InstallHardeningKitty () {
$Version = ((( Invoke-WebRequest " https://api.github.com/repos/0x6d69636b/windows_hardening/releases/latest " - UseBasicParsing) | ConvertFrom-Json ).Name).SubString( 2 )
$HardeningKittyLatestVersionDownloadLink = (( Invoke-WebRequest " https://api.github.com/repos/0x6d69636b/windows_hardening/releases/latest " - UseBasicParsing) | ConvertFrom-Json ).zipball_url
$ProgressPreference = ' SilentlyContinue '
Invoke-WebRequest $HardeningKittyLatestVersionDownloadLink - Out HardeningKitty $Version .zip
Expand-Archive - Path " .HardeningKitty $Version .zip " - Destination " .HardeningKitty $Version " - Force
$Folder = Get-ChildItem .HardeningKitty $Version | Select-Object Name - ExpandProperty Name
Move-Item " .HardeningKitty $Version $Folder * " " .HardeningKitty $Version "
Remove-Item " .HardeningKitty $Version $Folder "
New-Item - Path $ Env: ProgramFiles WindowsPowerShellModulesHardeningKitty $Version - ItemType Directory
Set-Location .HardeningKitty $Version
Copy-Item - Path .HardeningKitty.psd1 , .HardeningKitty.psm1 , .lists - Destination $ Env: ProgramFiles WindowsPowerShellModulesHardeningKitty $Version - Recurse
Import-Module " $ Env: ProgramFiles WindowsPowerShellModulesHardeningKitty $Version HardeningKitty.psm1 "
}
InstallHardeningKitty默認模式是審核。 HardeningKitty執行審核,將結果保存到CSV文件並創建日誌文件。文件自動命名並接收時間戳。使用參數ReportFile或LogFile ,也可以分配您自己的名稱和路徑。
濾波器參數可用於過濾硬化列表。為此,必須使用PowerShell ScriptBlock語法,例如{ $_.ID -eq 4505 } 。以下元素可用於過濾:ID,類別,名稱,方法和嚴重性。
Invoke-HardeningKitty - Mode Audit - Log - ReportHardeningKitty可以使用由參數FileFindingList定義的特定列表執行。如果HardeningKitty在同一系統上運行多次,則隱藏機器信息可能很有用。參數Skipmachineformation用於此目的。
Invoke-HardeningKitty - FileFindingList .listsfinding_list_0x6d69636b_user.csv - SkipMachineInformationHardeningKitty使用默認列表,僅使用嚴重性介質檢查測試。
Invoke-HardeningKitty - Filter { $_ .Severity -eq " Medium " }模式配置重新檢索系統的所有當前設置。如果尚未配置設置,則HardeningKitty將使用查找列表中存儲的默認值。該模式可以與其他功能結合使用,例如創建備份。
HardeningKitty獲取當前設置並將其存儲在報告中:
Invoke-HardeningKitty - Mode Config - Report - ReportFile C:tmpmy_hardeningkitty_report.csv備份很重要。真的很重要。因此,HardeningKitty還具有檢索當前配置並以可以部分恢復的形式保存的功能。
免責聲明: HardeningKitty試圖恢復原始配置。這與註冊表鍵和硬化小貓非常有效。但是備份功能不是快照,也不能替換真實的系統備份。在冰雹之後,不可能單獨使用HardeningKitty恢復系統1:1。如果這是必需的,請創建圖像或系統備份並恢復它。
備份開關指定文件是以查找列表的形式編寫的,因此可以用於冰雹模式。備份的名稱和路徑可以使用參數備份文件指定。
Invoke-HardeningKitty - Mode Config - Backup請測試此功能,以查看其在進行任何嚴重更改之前是否真的在目標系統上正常工作。 Schrödinger的備份很危險。
請注意,如果未指定-FileFindingList ,則將備份轉介給默認查找列表。在以冰雹模式部署特定列表之前,請務必創建一個轉介到該特定列表的備份。
Invoke-HardeningKitty - Mode Config - Backup - BackupFile " .myBackup.csv " - FileFindingList " .list{list}.csv " 備份開關以查找列表的形式創建一個文件,以在任何查找列表中以冰雹模式恢復備份加載它:
Invoke-HardeningKitty - Mode HailMary - Log - Report - FileFindingList " .myBackup.csv " 冰雹方法非常強大。它可用於在系統上部署查找列表。所有發現均按照列表中的建議在此系統上設置。權力帶來責任。僅當您知道自己在做什麼時,請使用此模式。確保對系統進行備份。
目前,僅在審核和配置模式下支持過濾器功能。由於冰雹模式是一個微妙的問題,請創建自己的文件並刪除要過濾的所有線條。
Invoke-HardeningKitty - Mode HailMary - Log - Report - FileFindingList .listsfinding_list_0x6d69636b_machine.csv在冰雹運行之前,必須選擇一個發現清單。重要的是檢查設置是否對系統的穩定性和功能有影響。在運行冰雹之前,應進行備份。
多虧了@gderybel,HardeningKitty可以將查找列表轉換為組策略。作為基本要求,必須安裝組策略管理PowerShell模塊。目前,只有註冊表設置才能轉換,並且並非所有內容都已進行了測試。只要沒有將其分配給對象,就可以創建一個新的策略,就不會對系統進行更改。謹慎使用它。
Invoke-HardeningKitty - Mode GPO - FileFindingList .listsfinding_list_0x6d69636b_machine.csv - GPOName HardeningKitty - Machine - 01每個通過的發現給出了4分,一個低的發現給出了2分,一個介質發現給出1分,一個高發現給出0分。
HardeningKitty評分的公式為(達到點 /最大點) * 5 + 1 。
| 分數 | 等級休閒 | 評級專業人士 |
|---|---|---|
| 6 | ?出色的 | 出色的 |
| 5 | ?做得好 | 好的 |
| 4 | ?充足的 | 充足的 |
| 3 | ?你應該做得更好 | 不足的 |
| 2 | ?虛弱的 | 不足的 |
| 1 | ?虛假 | 不足的 |
@Ataumo構建了一個基於Web的界面,用於HardeningKitty。該工具可用於創建自己的列表,並提供有關硬化設置的其他信息。源代碼在AGPL許可下,並且有一個演示站點。
HardeningKitty可用於針對以下基準 /基準測試系統審核系統:
| 姓名 | 系統版本 | 版本 |
|---|---|---|
| 0x6d69636b Windows 10(機器) | 22H2 | |
| 0x6d69636b Windows 10(用戶) | 22H2 | |
| BSI Sisyphus Windows 10 Hoher SchutzbedarfDomänenmitglied(機器) | 1809年 | 1.0 |
| BSI Sisyphus Windows 10 Hoher Schutzbedarfdomänenmitglied(用戶) | 1809年 | 1.0 |
| BSI Sisyphus Windows 10正常的Schutzbedarfdomänenmitglied(機器) | 1809年 | 1.0 |
| BSI Sisyphus Windows 10正常人Schutzbedarfdomänenmitglied(用戶) | 1809年 | 1.0 |
| BSI Sisyphus Windows 10正常人Schutzbedarf Einzelrechner(機器) | 1809年 | 1.0 |
| BSI Sisyphus Windows 10 Normaler Schutzbedarf Einzelrechner(用戶) | 1809年 | 1.0 |
| 順式Microsoft Windows 10 Enterprise(機器) | 1809年 | 1.6.1 |
| 順式Microsoft Windows 10 Enterprise(用戶) | 1809年 | 1.6.1 |
| 順式Microsoft Windows 10 Enterprise(機器) | 1903年 | 1.7.1 |
| 順式Microsoft Windows 10 Enterprise(用戶) | 1903年 | 1.7.1 |
| 順式Microsoft Windows 10 Enterprise(機器) | 1909年 | 1.8.1 |
| 順式Microsoft Windows 10 Enterprise(用戶) | 1909年 | 1.8.1 |
| 順式Microsoft Windows 10 Enterprise(機器) | 2004 | 1.9.1 |
| 順式Microsoft Windows 10 Enterprise(用戶) | 2004 | 1.9.1 |
| 順式Microsoft Windows 10 Enterprise(機器) | 20H2 | 1.10.1 |
| 順式Microsoft Windows 10 Enterprise(用戶) | 20H2 | 1.10.1 |
| 順式Microsoft Windows 10 Enterprise(機器) | 21H1 | 1.11.0 |
| 順式Microsoft Windows 10 Enterprise(用戶) | 21H1 | 1.11.0 |
| 順式Microsoft Windows 10 Enterprise(機器) | 21H2 | 1.12.0 |
| 順式Microsoft Windows 10 Enterprise(用戶) | 21H2 | 1.12.0 |
| 順式Microsoft Windows 10 Enterprise(機器) | 22H2 | 2.0.0 |
| 順式Microsoft Windows 10 Enterprise(用戶) | 22H2 | 2.0.0 |
| 順式Microsoft Windows 10 Enterprise(機器) | 22H2 | 3.0.0 |
| 順式Microsoft Windows 10 Enterprise(用戶) | 22H2 | 3.0.0 |
| 順式Microsoft Windows 11 Enterprise(機器) | 21H2 | 1.0.0 |
| 順式Microsoft Windows 11 Enterprise(用戶) | 21H2 | 1.0.0 |
| 順式Microsoft Windows 11 Enterprise(機器) | 22H2 | 2.0.0 |
| 順式Microsoft Windows 11 Enterprise(用戶) | 22H2 | 2.0.0 |
| 順式Microsoft Windows 11 Enterprise(機器) | 23H2 | 3.0.0 |
| 順式Microsoft Windows 11 Enterprise(用戶) | 23H2 | 3.0.0 |
| 順式Microsoft Windows Server 2012 R2(機器) | R2 | 2.4.0 |
| 順式Microsoft Windows Server 2012 R2(用戶) | R2 | 2.4.0 |
| 順式Microsoft Windows Server 2012 R2(機器) | R2 | 2.6.0 |
| 順式Microsoft Windows Server 2012 R2(用戶) | R2 | 2.6.0 |
| 順式Microsoft Windows Server 2012 R2(機器) | R2 | 3.0.0 |
| 順式Microsoft Windows Server 2012 R2(用戶) | R2 | 3.0.0 |
| CIS Microsoft Windows Server 2016(機器) | 1607年 | 1.2.0 |
| 順式Microsoft Windows Server 2016(用戶) | 1607年 | 1.2.0 |
| CIS Microsoft Windows Server 2016(機器) | 1607年 | 1.3.0 |
| 順式Microsoft Windows Server 2016(用戶) | 1607年 | 1.3.0 |
| CIS Microsoft Windows Server 2016(機器) | 1607年 | 2.0.0 |
| 順式Microsoft Windows Server 2016(用戶) | 1607年 | 2.0.0 |
| CIS Microsoft Windows Server 2016(機器) | 1607年 | 3.0.0 |
| 順式Microsoft Windows Server 2016(用戶) | 1607年 | 3.0.0 |
| CIS Microsoft Windows Server 2019(機器) | 1809年 | 1.1.0 |
| 順式Microsoft Windows Server 2019(用戶) | 1809年 | 1.1.0 |
| CIS Microsoft Windows Server 2019(機器) | 1809年 | 1.2.1 |
| 順式Microsoft Windows Server 2019(用戶) | 1809年 | 1.2.1 |
| CIS Microsoft Windows Server 2019(機器) | 1809年 | 2.0.0 |
| 順式Microsoft Windows Server 2019(用戶) | 1809年 | 2.0.0 |
| CIS Microsoft Windows Server 2019(機器) | 1809年 | 3.0.0 |
| 順式Microsoft Windows Server 2019(用戶) | 1809年 | 3.0.0 |
| 順式Microsoft Windows Server 2022(機器) | 21H2 | 1.0.0 |
| 順式Microsoft Windows Server 2022(用戶) | 21H2 | 1.0.0 |
| 順式Microsoft Windows Server 2022(機器) | 22H2 | 2.0.0 |
| 順式Microsoft Windows Server 2022(用戶) | 22H2 | 2.0.0 |
| 順式Microsoft Windows Server 2022(機器) | 22H2 | 3.0.0 |
| 順式Microsoft Windows Server 2022(用戶) | 22H2 | 3.0.0 |
| DOD Microsoft Windows 10 Stig(機器) | 20H2 | V2R1 |
| DOD Microsoft Windows 10 Stig(用戶) | 20H2 | V2R1 |
| DOD Windows Server 2019域控制器Stig(機器) | 20H2 | V2R1 |
| DOD Windows Server 2019域控制器Stig(用戶) | 20H2 | V2R1 |
| DOD Windows Server 2019成員服務器(機器) | 20H2 | V2R1 |
| DOD Windows Server 2019成員服務器Stig(用戶) | 20H2 | V2R1 |
| DOD Windows Defender Antivirus Stig | 20H2 | V2R1 |
| DOD Windows防火牆柱頭 | 20H2 | V1R7 |
| Microsoft Edge的Microsoft安全基線 | 87 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 88、89、90、91 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 92 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 93,94 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 95 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 96 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 97 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 98、99、100、101、102、103、104、105、106 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 107、108、109、110、111 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 112,113 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 114、115、116 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 117、118、119、120、121、122、123、124、125、126、127 | 最終的 |
| Microsoft Edge的Microsoft安全基線 | 128,129,130 | 最終的 |
| Windows 10的Microsoft安全基線 | 2004 | 最終的 |
| Windows 10的Microsoft安全基線 | 20H2,21H1 | 最終的 |
| Windows 10的Microsoft安全基線 | 21H2 | 最終的 |
| Windows 10(機器)的Microsoft安全基線 | 22H2 | 最終的 |
| Windows 10(用戶)的Microsoft安全基線 | 22H2 | 最終的 |
| Windows 11的Microsoft安全基線 | 21H2 | 最終的 |
| Windows 11(機器)的Microsoft安全基線 | 22H2 | 最終的 |
| Windows 11(用戶)的Microsoft安全基線 | 22H2 | 最終的 |
| Windows 11(機器)的Microsoft安全基線 | 23H2 | 最終的 |
| Windows 11(用戶)的Microsoft安全基線 | 23H2 | 最終的 |
| Windows 11(機器)的Microsoft安全基線 | 24H2 | 最終的 |
| Windows 11(用戶)的Microsoft安全基線 | 24H2 | 最終的 |
| Windows Server(DC)的Microsoft安全基線 | 2004 | 最終的 |
| Windows Server的Microsoft安全基線(成員) | 2004 | 最終的 |
| Windows Server(DC)的Microsoft安全基線 | 20H2 | 最終的 |
| Windows Server的Microsoft安全基線(成員) | 20H2 | 最終的 |
| Windows Server 2022(DC)的Microsoft安全基線 | 21H2 | 最終的 |
| Windows Server 2022(成員)的Microsoft安全基線 | 21H2 | 最終的 |
| Office 365 Proplus(機器)的Microsoft安全基線 | 2019年9月 | 最終的 |
| Office 365 Proplus(用戶)的Microsoft安全基線 | 2019年9月 | 最終的 |
| Microsoft Security Bayliare for Enterprise(機器)的Microsoft 365應用程序 | V2104,V2106 | 最終的 |
| Microsoft Security Baselizon for Enterprise(用戶)的Microsoft 365應用程序 | V2104,V2106 | 最終的 |
| Microsoft Security Bayliare for Enterprise(機器)的Microsoft 365應用程序 | V2112 | 最終的 |
| Microsoft Security Baselizon for Enterprise(用戶)的Microsoft 365應用程序 | V2112 | 最終的 |
| Microsoft Security Bayliare for Enterprise(機器)的Microsoft 365應用程序 | V2206 | 最終的 |
| Microsoft Security Baselizon for Enterprise(用戶)的Microsoft 365應用程序 | V2206 | 最終的 |
| Microsoft Security Bayliare for Enterprise(機器)的Microsoft 365應用程序 | V2306,V2312 | 最終的 |
| Microsoft Security Baselizon for Enterprise(用戶)的Microsoft 365應用程序 | V2306,V2312 | 最終的 |
| Microsoft Windows Server TLS設置 | 1809年 | 1.0 |
| Microsoft Windows Server TLS設置(將來與TLSV1.3一起使用) | 1903年 | 1.0 |