Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/6915b805-87ec-8007-88b5-6ddad7eb36fb
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== ### ==== Zdroj: kód Security.psm1 * Modul s funkcí Invoke-SecurityTweaks, která má kategorie: <syntaxhighlight lang="text">'MitigationsCPU', 'WinUpdateServices', 'WinUpdateDrivers', 'VBS', 'Integrity', 'LSA', 'TSX', 'DefenderRT', 'DefenderBlock', 'FullAdmin', 'OtherServices', 'TelemetryServices', 'TimerResolution', 'All' </syntaxhighlight> * Menu Show-SecurityHazardMenu: - vyžaduje heslo extreme, - každý krok má vlastní PIN potvrzení. * Explicitně označené jako RISKY / snižuje bezpečnost. Níže jen hlavní a konkrétní technické body. ===== Zdroj: kód ===== Cesta: <syntaxhighlight lang="text">HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management </syntaxhighlight> Operace (běží jako SYSTEM přes Invoke-WithPrivilege): * Remove-ItemProperty ... "FeatureSettings" * Set-ItemProperty ... "FeatureSettingsOverride" = 3 (DWORD) * Set-ItemProperty ... "FeatureSettingsOverrideMask" = 3 (DWORD) * Apply: zapne override → vypne část CPU mitigací kvůli výkonu. '' Bez -Apply: key FeatureSettingsOverride'' smaže → obnoví default chování OS (mitigace podle MS policy). Dopad: * Snížení dopadu Spectre/Meltdown mitigací na výkon, ale: - otevření CPU na potenciální útoky (side-channel / speculative execution). ===== Zdroj: kód ===== Služby v poli $services: <syntaxhighlight lang="text">wuauserv, BITS, UsoSvc, WaaSMedicSvc, DoSvc </syntaxhighlight> * Apply: - Start = 4 (Disabled), - Stop-Service pro každou. * Revert: - Start pro: - wuauserv → 2 (Automatic) - BITS → 2 - UsoSvc → 2 - WaaSMedicSvc → 3 - DoSvc → 2 - Start-Service tam, kde dává smysl. Dopad: * Hard stop Windows Update (v kombinaci s dalšími moduly může jít o velmi agresivní disable). ===== Zdroj: kód ===== Cesty: <syntaxhighlight lang="text">HKLM\SOFTWARE\Policies\Microsoft\Windows\Device Metadata HKLM\SOFTWARE\Policies\Microsoft\Windows\DriverSearching HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate </syntaxhighlight> Typické hodnoty: * PreventDeviceMetadataFromNetwork = 1 * DontSearchWindowsUpdate = 1 * DontPromptForWindowsUpdate = 1 * DriverUpdateWizardWuSearchEnabled = 0 * ExcludeWUDriversInQualityUpdate = 1 → zákaz nabízení driverů přes Windows Update. ===== Zdroj: kód ===== * Pracuje s: <syntaxhighlight lang="text">HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard </syntaxhighlight> (čtení/zápis EnableVirtualizationBasedSecurity a příbuzných hodnot – v kódu přímo tento název vidím, přesný set hodnot je v modulu, nechci dokreslovat.) * Používá bcdedit: - bcdedit /set hypervisorlaunchtype off (Apply) - bcdedit /set hypervisorlaunchtype auto (Revert) - bcdedit /deletevalue vm (při revertu, pokud existuje) Dopad: * Vypnutí VBS (Credential Guard a spol.) → více výkonu, méně bezpečnosti. * V kombinaci s HVCI / LSA zásahy už jde o heavy-hardening in reverse. ===== Zdroj: kód ===== * Kontrola Confirm-SecureBootUEFI: - pokud Secure Boot zapnutý → varování, že je třeba ho vypnout, aby se Memory Integrity dalo vypnout. * Test bcdedit /enum {current} pro nointegritychecks. * Registry: <syntaxhighlight lang="text">HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity </syntaxhighlight> * nastavuje: - Enabled = 0 (Apply) → vypnutí HVCI - revert → Enabled = 1 nebo odstranění hodnot (podle implementace v kódu). Dopad: * Memory Integrity (GUI „Core isolation / Memory Integrity“) se vypne / zapne. * nointegritychecks v BCD rozhoduje, jestli OS vynucuje integritu ovladačů → v kombinaci s tímhle lze spustit unsigned/špinavé ovladače → velké bezpečnostní riziko. ===== Zdroj: kód ===== Pracuje s: <syntaxhighlight lang="text">HKLM\SYSTEM\CurrentControlSet\Control\Lsa </syntaxhighlight> Hodnota: * LsaCfgFlags: - 0 → LSA Protection OFF - 1 → LSA Protection ON Apply v tomto modulu = „vypnout ochranu“ (z kontextu: „Vypínám LSA ochranu… LsaCfgFlags=0“). Dopad: * LSA Protection OFF: - LSASS je snáz dumpnutelný, - credential theft útoky (Mimikatz, apod.) se stávají triviálnějšími. ===== Zdroj: kód ===== * Zmiňuje TSX v popisu kategorií; v kódu upravuje TSX nastavení přes registry/bcdedit (typicky BCD tsx / registry pro CPU features; přesný key je v modulu, ale nepíšu ho, abych nevymýšlel). Dopad: * TSX bývá bezpečnostně problematický (TSX Asynchronous Abort); OS ho někdy defaultně vypíná. * Modul umožňuje TSX znovu povolit kvůli výkonu → za cenu potenciálních attack surfaces. ===== Zdroj: kód ===== Používá: <syntaxhighlight lang="text">HKLM\SOFTWARE\Policies\Microsoft\Windows Defender HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Scan </syntaxhighlight> Hodnoty: * DisableAntiSpyware * DisableRealtimeMonitoring * DisableBehaviorMonitoring * DisableOnAccessProtection * DisableIOAVProtection '' další Disable'' klíče pod Scan a Real-Time Protection. → v různých profilech: * DefenderRT – vypnutí reálné ochrany (RT), * DefenderBlock – ještě agresivnější blokace Defenderu + souvisejících služeb. Dopad: * Anti-malware ochrana OS je silně oslabená nebo vypnutá. ===== Zdroj: kód ===== * Část dělá skrz services: - DiagTrack, dmwappushservice, WdiServiceHost, WdiSystemHost, wisvc, lfsvc, MapsBroker, TroubleshootingSvc, … * Další část přes Invoke-HostsTelemetryBlock (viz níže). Některé služby přepíná na: * Start = 4 (Disabled), * revertuje zpět na OEM/Default (2/3 podle typu služby). ===== Timer Resolution ===== Zdroj: kód * Get-LiveTimerResolution: - čte NtQueryTimerResolution přes P/Invoke. * Show-TimerResolutionMenu: - umožní nastavit např. 0.5 ms timer resolution (klasický tweak pro latenci). * Čistě runtime, ne registry; riziko: - mírně vyšší CPU load, výhoda pro latency-critical (gaming/audio). HostsTelemetry Zdroj: funkce <code>Invoke-HostsTelemetryBlock</code>, <code>Invoke-HostsTelemetryRestore</code> * Cíl: hosts soubor: <syntaxhighlight lang="text">%SystemRoot%\System32\drivers\etc\hosts </syntaxhighlight> * Přidá ~40 MS domén na 127.0.0.1 (telemetrie, telemetry.ingest, event, atd. – seznam je v kódu). * Vytvoří firewall rule pro blokaci telemetrických IP. * Restore smaže příslušné řádky + firewall pravidlo. Dopad: * Výrazné omezení telemetrie, ale: - může rozbít některé WU/Store funkce, - AV to může hlásit jako podezřelé chování. ===== Před ===== * Jasně si definuj cíl: - potřebuješ víc FPS, nebo jen „mám pocit, že by to mohlo pomoct“? * Měj plný backup: - image, - export relevantních větví (Memory Management, DeviceGuard, Lsa, Defender, Services). * Ověř, že máš funkční Revert/Recovery modul (RevertHazard.psm1). Relativně méně nebezpečné kategorie (ale pořád opatrně) * TimerResolution – experimentuj, ale sleduj overall CPU load. * WinUpdateDrivers – pokud ovladače řešíš ručně. * TelemetryServices / HostsTelemetryBlock – jen pokud víš, že nepotřebuješ WU/Store „na 100 %“. Vysoce rizikové kategorie * MitigationsCPU, VBS, Integrity, LSA, TSX, DefenderRT, DefenderBlock, FullAdmin: - používej pouze na lab/test strojích, - nikdy ne na stroji s citlivými daty / produkčním AD klientem. * Po použití: - MSINFO32 → ověř VBS, Hyper-V, Device Guard stav, - coreinfo.exe (Sysinternals) pro TSX, - PowerShell Get-MpComputerStatus pro Defender. Revert * Vždy testuj také revert-branch: - zavolat Invoke-SecurityTweaks bez -Apply pro danou kategorii, - nebo použít příslušnou funkci z RevertHazard.psm1 (pokud existuje kategorie mapování). * Po revertu i tak ověř: - BCD (bcdedit /enum {current}), - DeviceGuard/HVCI stav v MSINFO32.
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)