このプロジェクトは、Windows 10のシンプルな硬化リストとして始まりました。しばらくして、Windowsの硬化を簡素化するためにHardeningKittyが作成されました。現在、HardeningKittyは、Microsoft、CIS Benchmarks、Dod Stig、BSI Sisyphus Win10のガイドラインをサポートしています。そしてもちろん、私自身の強化リスト。
これは、Windows 10を強化するためにプライベートおよびビジネス環境で使用できる強化チェックリストです。チェックリストはすべてのWindowsバージョンに使用できますが、Windows 10 Homeではグループポリシーエディターは統合されておらず、調整はレジストリで直接実行する必要があります。このためには、 HardeningKittyからのailmaryモードがあります。
設定は、セキュリティとプライバシーの推奨と見なされるべきであり、インフラストラクチャの運用に影響を与えるか、重要な機能の使いやすさに影響を与えるかどうかを慎重に確認する必要があります。ユーザビリティに対してセキュリティを比較検討することが重要です。
このプロジェクトは、Windows 10の単純な硬化チェックリストの作成から始まりました。焦点は、 HardeningKittyの開発を伴うさまざまな有名なフレームワーク /ベンチマークの監査に移行しました。一方、さまざまなCISベンチマークとMicrosoftセキュリティベースラインがサポートされています。 Hailmaryモードの開発により、Windowsシステムに硬化チェックリストの設定を適用することもできます。
HardeningKittyは、Windowsシステムの硬化をサポートします。システムの構成が取得され、検索リストを使用して評価されます。さらに、定義された値に応じてシステムを強化できます。 HardeningKittyはレジストリから設定を読み取り、他のモジュールを使用してレジストリの外側の構成を読み取ります。
スクリプトは英語システム用に開発されました。他の言語では、分析が正しくない可能性があります。これが発生した場合は問題を作成してください。
HardeningKittyの開発は、このリポジトリで発生します。 SCIP AGのリポジトリには、 SCIP AGのコード署名証明書に署名されたHardeningKittyの安定したバージョンがあります。これは、 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 .最初にディレクトリを作成し、すべてのバージョンについて、 PSModulePath環境変数にリストされているパスに0.9.3のようなサブディレクトリを作成します。
モジュール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詳細については、PowerShellモジュールをインストールするMicrosoftの記事を参照してください。
以下のスクリプトを使用して、 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を使用して、独自の名前とパスを割り当てることもできます。
フィルターパラメーターを使用して、硬化リストをフィルタリングできます。この目的のために、 { $_.ID -eq 4505 }など、PowerShell Scriptblock構文を使用する必要があります。次の要素は、フィルタリングに役立ちます:ID、カテゴリ、名前、方法、および重大度。
Invoke-HardeningKitty - Mode Audit - Log - Reporthardeningkittyは、パラメーターfilefindinglistで定義された特定のリストで実行できます。 HardeningKittyが同じシステムで数回実行される場合、マシン情報を非表示にすると便利かもしれません。この目的のために、パラメーターSkipMachineInformationが使用されます。
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は、元の構成を復元しようとします。これはレジストリキーで非常にうまく機能し、硬化キティは本当にそのベストを試しています。しかし、バックアップ関数はスナップショットではなく、実際のシステムバックアップを置き換えません。 Hailmaryの後にHardeningKittyだけでシステム1:1を復元することはできません。これが要件である場合は、画像またはシステムのバックアップを作成して復元します。
バックアップスイッチは、ファイルが発見リストの形式で記述されているため、 aillmaryモードに使用できることを指定します。バックアップの名前とパスは、パラメーターバックアップファイルで指定できます。
Invoke-HardeningKitty - Mode Config - Backupこの関数をテストして、深刻な変更を加える前に、ターゲットシステムで実際に適切に機能するかどうかを確認してください。 Schrödingerのバックアップは危険です。
-filefindinglistが指定されていない場合、バックアップはデフォルトの結果リストに参照されることに注意してください。 Hailmaryモードで特定のリストを展開する前に、常にその特定のリストに言及されたバックアップを作成してください。
Invoke-HardeningKitty - Mode Config - Backup - BackupFile " .myBackup.csv " - FileFindingList " .list{list}.csv " バックアップスイッチは、発見リストの形式でファイルを作成し、バックアップロードを任意の検索リストと同様にhailmaryモードで復元します。
Invoke-HardeningKitty - Mode HailMary - Log - Report - FileFindingList " .myBackup.csv " 大hy式方法は非常に強力です。システムに発見リストを展開するために使用できます。すべての調査結果は、リストで推奨されているように、このシステムに設定されています。権力とともに責任があります。あなたが何をしているのかを知っている場合にのみ、このモードを使用してください。システムのバックアップを必ず用意してください。
今のところ、フィルター関数は監査モードと構成モードでのみサポートされています。 Hailmaryモードは繊細な問題であるため、独自のファイルを作成し、フィルタリングするすべての行を削除します。
Invoke-HardeningKitty - Mode HailMary - Log - Report - FileFindingList .listsfinding_list_0x6d69636b_machine.csvHailmaryが実行される前に、発見リストを選択する必要があります。設定がシステムの安定性と機能に影響を与えるかどうかを確認することが重要です。 Hailmaryを実行する前に、バックアップを作成する必要があります。
@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は、hardeningkitty用のWebベースのインターフェイスを構築します。このツールは、独自のリストを作成するために使用でき、硬化設定に関する追加情報を提供できます。ソースコードはAGPLライセンスの下にあり、デモサイトがあります。
HardeningKittyは、次のベースライン /ベンチマークに対してシステムを監査するために使用できます。
| 名前 | システムバージョン | バージョン |
|---|---|---|
| 0x6D69636B Windows10(マシン) | 22H2 | |
| 0x6D69636B Windows10(ユーザー) | 22H2 | |
| bsi sisyphus windows 10 hoher schutzbedarfdomänenmitglied(マシン) | 1809 | 1.0 |
| bsi sisyphus windows 10 hoher schutzbedarfdomänenmitglied(user) | 1809 | 1.0 |
| bsi sisyphus windows 10 normaler schutzbedarfdomänenmitglied(マシン) | 1809 | 1.0 |
| bsi sisyphus windows 10 normaler schutzbedarfdomänenmitglied(user) | 1809 | 1.0 |
| BSI Sisyphus Windows 10 Normaler Schutzbedarf einzelrechner(マシン) | 1809 | 1.0 |
| BSI Sisyphus Windows 10 Normaler Schutzbedarf Einzelrechner(ユーザー) | 1809 | 1.0 |
| CIS MicrosoftWindows10 Enterprise(Machine) | 1809 | 1.6.1 |
| CIS MicrosoftWindows10 Enterprise(ユーザー) | 1809 | 1.6.1 |
| CIS MicrosoftWindows10 Enterprise(Machine) | 1903 | 1.7.1 |
| CIS MicrosoftWindows10 Enterprise(ユーザー) | 1903 | 1.7.1 |
| CIS MicrosoftWindows10 Enterprise(Machine) | 1909 | 1.8.1 |
| CIS MicrosoftWindows10 Enterprise(ユーザー) | 1909 | 1.8.1 |
| CIS MicrosoftWindows10 Enterprise(Machine) | 2004年 | 1.9.1 |
| CIS MicrosoftWindows10 Enterprise(ユーザー) | 2004年 | 1.9.1 |
| CIS MicrosoftWindows10 Enterprise(Machine) | 20H2 | 1.10.1 |
| CIS MicrosoftWindows10 Enterprise(ユーザー) | 20H2 | 1.10.1 |
| CIS MicrosoftWindows10 Enterprise(Machine) | 21H1 | 1.11.0 |
| CIS MicrosoftWindows10 Enterprise(ユーザー) | 21H1 | 1.11.0 |
| CIS MicrosoftWindows10 Enterprise(Machine) | 21H2 | 1.12.0 |
| CIS MicrosoftWindows10 Enterprise(ユーザー) | 21H2 | 1.12.0 |
| CIS MicrosoftWindows10 Enterprise(Machine) | 22H2 | 2.0.0 |
| CIS MicrosoftWindows10 Enterprise(ユーザー) | 22H2 | 2.0.0 |
| CIS MicrosoftWindows10 Enterprise(Machine) | 22H2 | 3.0.0 |
| CIS MicrosoftWindows10 Enterprise(ユーザー) | 22H2 | 3.0.0 |
| CIS MicrosoftWindows11 Enterprise(Machine) | 21H2 | 1.0.0 |
| CIS MicrosoftWindows11 Enterprise(ユーザー) | 21H2 | 1.0.0 |
| CIS MicrosoftWindows11 Enterprise(Machine) | 22H2 | 2.0.0 |
| CIS MicrosoftWindows11 Enterprise(ユーザー) | 22H2 | 2.0.0 |
| CIS MicrosoftWindows11 Enterprise(Machine) | 23H2 | 3.0.0 |
| CIS MicrosoftWindows11 Enterprise(ユーザー) | 23H2 | 3.0.0 |
| CIS Microsoft Windows Server 2012 R2(マシン) | R2 | 2.4.0 |
| CIS Microsoft Windows Server 2012 R2(ユーザー) | R2 | 2.4.0 |
| CIS Microsoft Windows Server 2012 R2(マシン) | R2 | 2.6.0 |
| CIS Microsoft Windows Server 2012 R2(ユーザー) | R2 | 2.6.0 |
| CIS Microsoft Windows Server 2012 R2(マシン) | R2 | 3.0.0 |
| CIS Microsoft Windows Server 2012 R2(ユーザー) | R2 | 3.0.0 |
| CIS MicrosoftWindows Server 2016(マシン) | 1607 | 1.2.0 |
| CIS MicrosoftWindows Server 2016(ユーザー) | 1607 | 1.2.0 |
| CIS MicrosoftWindows Server 2016(マシン) | 1607 | 1.3.0 |
| CIS MicrosoftWindows Server 2016(ユーザー) | 1607 | 1.3.0 |
| CIS MicrosoftWindows Server 2016(マシン) | 1607 | 2.0.0 |
| CIS MicrosoftWindows Server 2016(ユーザー) | 1607 | 2.0.0 |
| CIS MicrosoftWindows Server 2016(マシン) | 1607 | 3.0.0 |
| CIS MicrosoftWindows Server 2016(ユーザー) | 1607 | 3.0.0 |
| CIS Microsoft Windows Server 2019(マシン) | 1809 | 1.1.0 |
| CIS MicrosoftWindows Server 2019(ユーザー) | 1809 | 1.1.0 |
| CIS Microsoft Windows Server 2019(マシン) | 1809 | 1.2.1 |
| CIS MicrosoftWindows Server 2019(ユーザー) | 1809 | 1.2.1 |
| CIS Microsoft Windows Server 2019(マシン) | 1809 | 2.0.0 |
| CIS MicrosoftWindows Server 2019(ユーザー) | 1809 | 2.0.0 |
| CIS Microsoft Windows Server 2019(マシン) | 1809 | 3.0.0 |
| CIS MicrosoftWindows Server 2019(ユーザー) | 1809 | 3.0.0 |
| CIS Microsoft Windows Server 2022(マシン) | 21H2 | 1.0.0 |
| CIS Microsoft Windows Server 2022(ユーザー) | 21H2 | 1.0.0 |
| CIS Microsoft Windows Server 2022(マシン) | 22H2 | 2.0.0 |
| CIS Microsoft Windows Server 2022(ユーザー) | 22H2 | 2.0.0 |
| CIS Microsoft Windows Server 2022(マシン) | 22H2 | 3.0.0 |
| CIS Microsoft Windows Server 2022(ユーザー) | 22H2 | 3.0.0 |
| Dod MicrosoftWindows10 Stig(マシン) | 20H2 | V2R1 |
| DOD MicrosoftWindows10 Stig(ユーザー) | 20H2 | V2R1 |
| Dod Windows Server 2019ドメインコントローラーStig(マシン) | 20H2 | V2R1 |
| Dod Windows Server 2019ドメインコントローラーStig(ユーザー) | 20H2 | V2R1 |
| Dod Windows Server 2019メンバーサーバーStig(マシン) | 20H2 | V2R1 |
| Dod Windows Server 2019メンバーサーバーStig(ユーザー) | 20H2 | V2R1 |
| Dod Windows Defender Antivirus Stig | 20H2 | V2R1 |
| Dod Windows Firewall Stig | 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 Security Baseline | 2004年 | ファイナル |
| Windows 10のMicrosoft Security Baseline | 20H2、21H1 | ファイナル |
| Windows 10のMicrosoft Security Baseline | 21H2 | ファイナル |
| Windows10のMicrosoftセキュリティベースライン(マシン) | 22H2 | ファイナル |
| Windows10のMicrosoftセキュリティベースライン(ユーザー) | 22H2 | ファイナル |
| Windows 11用のMicrosoftセキュリティベースライン | 21H2 | ファイナル |
| Windows11のMicrosoftセキュリティベースライン(マシン) | 22H2 | ファイナル |
| Windows11のMicrosoftセキュリティベースライン(ユーザー) | 22H2 | ファイナル |
| Windows11のMicrosoftセキュリティベースライン(マシン) | 23H2 | ファイナル |
| Windows11のMicrosoftセキュリティベースライン(ユーザー) | 23H2 | ファイナル |
| Windows11のMicrosoftセキュリティベースライン(マシン) | 24H2 | ファイナル |
| Windows11のMicrosoftセキュリティベースライン(ユーザー) | 24H2 | ファイナル |
| Windows ServerのMicrosoftセキュリティベースライン(DC) | 2004年 | ファイナル |
| Windows ServerのMicrosoftセキュリティベースライン(メンバー) | 2004年 | ファイナル |
| Windows ServerのMicrosoftセキュリティベースライン(DC) | 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 Baseline for Microsoft 365 Apps for Enterprise(Machine) | V2104、V2106 | ファイナル |
| Microsoft Security Baseline for Microsoft365 Apps for Enterprise(ユーザー) | V2104、V2106 | ファイナル |
| Microsoft Security Baseline for Microsoft 365 Apps for Enterprise(Machine) | V2112 | ファイナル |
| Microsoft Security Baseline for Microsoft365 Apps for Enterprise(ユーザー) | V2112 | ファイナル |
| Microsoft Security Baseline for Microsoft 365 Apps for Enterprise(Machine) | V2206 | ファイナル |
| Microsoft Security Baseline for Microsoft365 Apps for Enterprise(ユーザー) | V2206 | ファイナル |
| Microsoft Security Baseline for Microsoft 365 Apps for Enterprise(Machine) | V2306、V2312 | ファイナル |
| Microsoft Security Baseline for Microsoft365 Apps for Enterprise(ユーザー) | V2306、V2312 | ファイナル |
| Microsoft Windows Server TLS設定 | 1809 | 1.0 |
| Microsoft Windows Server TLS設定(TLSV1.3での将来の使用) | 1903 | 1.0 |