Большинство «шума» вокруг запуска Windows Server 2016 связано с такими особенностями как контейнеры или Nano Server. Хотя эти возможности, безусловно, полезны, важно обратить внимание на развитие функций безопасности.
VIRTUAL SECURE MODE (VSM)
Этот режим – одна из новейших разработок Microsoft в области безопасности. Идея заключается в том, чтобы сделать операционную систему более безопасной, передав часть функций безопасности «железу», вместо того, чтобы выполнять их на программном уровне. VSM – это компонент уровня инфраструктуры, и является основной для других функций безопасности, о которых будет рассказано ниже.
Функция №1: Credential Guard
Процесс авторизации в Windows является функцией Local Security Authority (LSA). LSA обеспечивает интерактивные сервисы авторизации, генерирует токены безопасности, управляет локальной политикой безопасности. Credential Guard переносит LSA в виртуализированное пространство, созданное с помощью Virtual Secure Mode.
Память, используемая LSA, изолирована, также как у виртуальных машин. Microsoft также ограничивает код, который может запускать LSA, и при этом обязательно строгое подписание этого кода. И наконец другой код, такой как драйверы, не может быть запущен в Isolated User Mode.
Функция №2: Device Guard
В Device Guard присутствует специальный компонент VSM Protected Code Integrity. Этот компонент следит за целостностью кода, выполняемого на уровне ядра. Другой компонент, Configurable Code Integrity следит за тем, чтобы только доверенный код исполнялся системой. Администраторы могут New-CIPolicy в Power Shell, чтобы создать политики целостности, которые фактически работают как «белые списки» для приложений. Эти политики работают на основе подписей приложений. Поскольку не все приложения подписаны, можно использовать средство SignTool.exe для неподписанных приложений.
Функция №3: Host Guardian и защищенных виртуальных машин
Хотя виртуализация сервера доказала свою относительную безопасность, у нее есть одна «ахиллесова пята»: переносимость виртуальных машин. Сегодня практически ничто не может остановить «злонамеренного» администратора от того, чтобы скопировать виртуальный жесткий диск виртуальной машины на флэшку.
Такой администратор затем может в другом месте подключить виртульный жесткий диск к другому компьютеру и получить полный доступ к содержимому. Администратор может даже запустить свой собственный сервер и запустить на нем украденную виртуальную машину. HostGuardian предназначен для того, чтобы не допустить этого через создание защищенных виртуальных машин.
Host Guardian позволяет сконфигурировать хост Hyper-V как «защищенный хост». Такой хост должен быть положительно идентифицирован в сети и аттестован на уровне Active Directory и/или TPM.
HostGuardian позволяет создание защищенных виртуальных машин – таких виртуальных машин, у которых их виртуальные жесткие диски зашифрованы с помощью виртуального TPM. Это шифрование предотвратит запуск такой защищенной машины на другом Hyper-V сервере, кроме как на обозначенном защищенном хосте. Если виртуальный диск такой машины будет украден из организации, его содержимое нельзя прочитать и виртуальная машина не запустится.
В заключение, отметим, что безопасность была одним из краеугольных камней создания WindowsServer 2016. Microsoftстремится убедить своих клиентов запускать критически важные процессы в Azure. И поскольку Azure работает на Windows Server, у Microsoft не было выхода, кроме как поставить безопасность на первое место при разработке Windows Server 2016.
По материалам E-security Planet
Published: September 20, 2018
Updated: March 17, 2023
You may have been following our series of blog posts on Microsoft Windows Server security features and capabilities for reducing risk in your IT infrastructure.
Today, we’ve compiled a list of all these blog posts. You can use them in two ways as you work to secure your Windows Server operating system. First, of course, you can use this list to go directly to the specific topic you’re interested in.
But stepping through the posts in order is also a great way to get a comprehensive understanding of Windows Server Security features. We explore Windows Server security baselines, network security, credentials security, apps and data protection, security enhancements for VMs, and much more. For example, you’ll find out about Windows Server 2016 security features like Just Enough Administration, Credential Guard, Device Guard, Windows Defender, Shielded Virtual Machines, Guarded Fabric, BitLocker, Local Administrator Password Solution, auditing and more — knowledge you can put right to work protecting your information technology environment against common attacks and threats.
Contents:
- Protecting Credentials in Windows Server
- Windows Auditing
- Privileged Access Management in Windows Server
- File Server Security with File Server Resource Manager, Encrypted File System and BitLocker Applications
- Securing a Server with Windows Defender, AppLocker and Security Compliance Toolkit
- Hyper-V Security in Windows Server
- What are Windows Firewall and IPsec?
- Windows Server 2016 Containers
If you want to get all the chapters at once, we’ve got you covered — we’ve combined all the posts into one convenient PDF document available for free download.
Download Windows Server Security Tutorial pdf for free >>
What resources — blogs, forums, etc. — do you use to learn more about Windows Server security? Please let us know in the comments below.
Product Evangelist at Netwrix Corporation, writer, and presenter. Ryan specializes in evangelizing cybersecurity and promoting the importance of visibility into IT changes and data access. As an author, Ryan focuses on IT security trends, surveys, and industry insights.
More great reading
Blog
10 Essential Baseline Security Hardening Considerations for Windows Server 2016
November 6, 2017
Increase your Windows server security by enabling the following features and configurations.
While Windows Server has numerous features and configuration options to provide enhanced security, these features are not enabled by default. Administrators have to configure these options properly to provide increased server security. Here are ten recommended baseline security hardening considerations for your Windows Server 2016. Your individual server set up may vary and require additional security considerations. These ten steps provide a baseline security setup and serve as a starting point for additional security hardening.
Windows Server Security Setup
1.Network Security
- Set static IPs for servers. This ensures you are reaching the right server when making connections.
- Segment your network. Hosts that are on the same subnet/Vlan will have an easier time masquerading as the server. Segmentation helps address that.
- Add a network firewall.
- Be sure to disable any services you are not using, such as IPv6.
- Also disable any inbound traffic on ports that are not in use.
- Use secondary DNS servers for load-balancing and redundancy.
- Have more than one DNS server to allow for fall-back.
- Each server should have (in DNS):
- A record
- PTR record
2.Configure Time Synchronization
- Sync time on domain controllers to a stratum-one external time server.
- Also sync time on non-domain servers to an external NTP server.
- Relying on an external NTP server protects against NTP-based DDoS attacks.
- Additionally, ensure servers are set to proper time zone (for logging etc.)
3.Ensure Windows Server is up to date with all patches installed
- Where possible, upgrade all existing servers to the latest Windows Server.
- Critical updates should be applied as soon as possible. Apply these updates in test environments first to confirm proper function, then in production if there are no compatibility issues.
- Be sure to update any other Microsoft products in use, such as Exchange Server and SQL Server.
- Update other third-party applications on a regular cadence, as well.
4. Configure Windows Firewall
- Restrict traffic only to ports that need to be open for services. For example, web servers will need to provide access to TCP ports 80 and 443 to most users, but they do not need RDP access from all sources.
- Restrict management access (e.g. RDP, WMI, etc) to only those IPs and networks belonging to system administrators.
5. Secure and Encrypt Remote Access
- RDP should only be accessible by authorized administrators.
- Prune Remote Desktop Users group.
- Telnet and other unencrypted management protocols should be disabled across the whole environment.
- Use only encrypted remote access:
- SFTP
- SSH (From VPN access)
6. Restrict Unnecessary Services
- Disable unnecessary services.
- Set up specific service accounts, locally or in Active Directory, for application and user services.
- This way if applications are compromised, the attacker has limited user rights, not full system or privileged user rights.
7. Disable local administrators and secure administrator rights
- At the very least, make a secure password for local admins.
- Do not re-use admin passwords throughout the environment.
- Change administrator passwords regularly to prevent password leaks from resulting in new breaches.
- Enforce a strong password policy using these considerations:
- Complexity and length
- Expiration
- Re-use policy
- Enable Account lockout for repeated failed attempts.
- Create a new account (in Active Directory, or locally if the environment does not use AD) and add it to the Administrators group.
- Use a non-admin user account for normal business.
- Use the “Run As” feature to run specific applications with Administrator privileges when necessary.
- Disable local guest accounts.
8. Configure User Access Control (UAC)
- These policy settings are located in Security SettingsLocal PoliciesSecurity Options in the Local Security Policy snap-in.
9. Uninstall Unnecessary Frameworks and Packages through Windows Features
- Remove applications included in Windows Server by default but not be used in your environment.
10. Implement Activity Logging
- Consolidate logs by collection logs to a central location.
- Back up logs to prevent data loss.
- Monitor and analyze logs to identify attackers, rogue devices, and suspicious usage patterns.
Remember that every business situation is unique, and depending on your organization’s risk profile, you may need to develop a much more robust security framework. However, the above security recommendations will serve as a good starting point for establishing a hardened security stature for Windows Server 2016.
For more in-depth hardening processes, see the Center for Internet Security at: https://www.cisecurity.org/cis-benchmarks/
About the Author
Ben Dimick is a Director, Security Consulting Services
Back to Resource Center
В Windows Server 2016 и 2019 по умолчанию установлен и включен “родной” бесплатный антивирус Microsoft — Windows Defender (начиная с Windows 10 2004 используется название Microsoft Defender). В этой статье мы рассмотрим особенности настройки и управления антивирусом Windows Defender в Windows Server 2019/2016.
Содержание:
- Графический интерфейс Windows Defender
- Удаление антивируса Microsoft Defender в Windows Server 2019 и 2016
- Управление Windows Defender с помощью PowerShell
- Добавить исключения в антивирусе Windows Defender
- Получаем статус Windows Defender с удаленных компьютеров через PowerShell
- Обновление антивируса Windows Defender
- Управление настройками Microsoft Defender Antivirus с помощью GPO
Графический интерфейс Windows Defender
В версиях Windows Server 2016 и 2019 (в том числе в Core редакции) уже встроен движок антивируса Windows Defender (Защитник Windows). Вы можете проверить наличие установленного компонента Windows Defender Antivirus с помощью PowerShell:
Get-WindowsFeature | Where-Object {$_. name -like "*defender*"} | ft Name,DisplayName,Installstate
Однако в Windows Server 2016 у Windows Defender по-умолчанию нет графического интерфейса управления. Вы можете установить графическую оболочку Windows Defender в Windows Server 2016 через консоль Server Manager (Add Roles and Features -> Features -> Windows Defender Features -> компонент GUI for Windows Defender).
Установить графический компонент антивируса Windows Defender можно с помощью PowerShell командлета Install-WindowsFeature:
Install-WindowsFeature -Name Windows-Defender-GUI
Для удаления графического консоли Defender используется командлет:
Uninstall-WindowsFeature -Name Windows-Defender-GUI
В Windows Server 2019 графический интерфейс Defender основан на APPX приложении и доступен через меню Windows Security (панель Settings -> Update and Security).
Настройка Windows Defender производится через меню “Virus and threat protection”.
Если вы не можете открыть меню настроек Defender, а при запуске апплета Windows Security у вас появляется ошибка “You’ll need a new app to open this windowsdefender”, нужно перерегистрировать APPX приложение с помощью файла манифеста такой командой PowerShell:
Add-AppxPackage -Register -DisableDevelopmentMode "C:\Windows\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\AppXManifest.xml"
Если APPX приложение полностью удалено, можно его восстановить вручную по аналогии с восстановлением приложения Micorosft Store.
Удаление антивируса Microsoft Defender в Windows Server 2019 и 2016
В Windows 10 при установке любого стороннего антивируса (Kaspersky, McAfee, Symantec, и т.д.) встроенный антивирус Windows Defender автоматически отключается, однако в Windows Server этого не происходит. Отключать компонент встроенного антивируса нужно вручную (в большинстве случаев не рекомендуется использовать одновременно несколько разных антивирусов на одном компьютере/сервере).
Удалить компонент Windows Defender в Windows Server 2019/2016 можно из графической консоли Server Manager или такой PowerShell командой:
Uninstall-WindowsFeature -Name Windows-Defender
Не удаляйте Windows Defender, если на сервере отсутствует другой антивирус.
Установить службы Windows Defender можно командой:
Add-WindowsFeature Windows-Defender-Features,Windows-Defender-GUI
Управление Windows Defender с помощью PowerShell
Рассмотрим типовые команды PowerShell, которые можно использовать для управления антивирусом Windows Defender.
Проверить, запущена ли служба Windows Defender Antivirus Service можно с помощью команды PowerShell Get-Service:
Get-Service WinDefend
Как вы видите, служба запушена (статус –
Running
).
Текущие настройки и статус Defender можно вывести с помощью командлета:
Get-MpComputerStatus
Вывод комадлета содержит версию и дату обновления антивирусных баз (AntivirusSignatureLastUpdated, AntispywareSignatureLastUpdated), включенные компоненты антвируса, время последнего сканирования (QuickScanStartTime) и т.д.
Отключить защиту в реальном времени Windows Defender (RealTimeProtectionEnabled) можно с помощью команды:
Set-MpPreference -DisableRealtimeMonitoring $true
После выполнения данной команды, антивирус не будет сканировать на лету все обрабатываемые системой файлы.
Включить защиту в реальном времени:
Set-MpPreference -DisableRealtimeMonitoring $false
Более полный список командлетов PowerShell, которые можно использовать для управления антивирусом есть в статье Управление Windows Defender с помощью PowerShell.
Добавить исключения в антивирусе Windows Defender
В антивирусе Microsoft можно задать список исключений – это имена, расширения файлов, каталоги, которые нужно исключить из автоматической проверки антивирусом Windows Defender.
Особенность Защитника в Windows Server – он автоматически генерируемый список исключений антивируса, который применяется в зависимости от установленных ролей сервера. Например, при установке роли Hyper-V в исключения антивируса добавляются файлы виртуальных и дифференциальных дисков, vhds дисков (*.vhd, *.vhdx, *.avhd), снапшоты и другие файлы виртуальных машин, каталоги и процессы Hyper-V (Vmms.exe, Vmwp.exe)
Если нужно отключить автоматические исключения Microsoft Defender, выполните команду:
Set-MpPreference -DisableAutoExclusions $true
Чтобы вручную добавить определенные каталоги в список исключения антивируса, выполните команду:
Set-MpPreference -ExclusionPath "C:\Test", "C:\VM", "C:\Nano"
Чтобы исключить антивирусную проверку определенных процессов, выполните команду:
Set-MpPreference -ExclusionProcess "vmms.exe", "Vmwp.exe"
Получаем статус Windows Defender с удаленных компьютеров через PowerShell
Вы можете удаленно опросить состояние Microsoft Defender на удаленных компьютерах с помощью PowerShell. Следующий простой скрипт при помощи командлета Get-ADComputer выберет все Windows Server хосты в домене и через WinRM (командлетом Invoke-Command) получит состояние антивируса, время последнего обновления баз и т.д.
$Report = @()
$servers= Get-ADComputer -Filter 'operatingsystem -like "*server*" -and enabled -eq "true"'| Select-Object -ExpandProperty Name
foreach ($server in $servers) {
$defenderinfo= Invoke-Command $server -ScriptBlock {Get-MpComputerStatus | Select-Object -Property Antivirusenabled,RealTimeProtectionEnabled,AntivirusSignatureLastUpdated,QuickScanAge,FullScanAge}
If ($defenderinfo) {
$objReport = [PSCustomObject]@{
User = $defenderinfo.PSComputername
Antivirusenabled = $defenderinfo.Antivirusenabled
RealTimeProtectionEnabled = $defenderinfo.RealTimeProtectionEnabled
AntivirusSignatureLastUpdated = $defenderinfo.AntivirusSignatureLastUpdated
QuickScanAge = $defenderinfo.QuickScanAge
FullScanAge = $defenderinfo.FullScanAge
}
$Report += $objReport
}
}
$Report|ft
Для получения информации о срабатываниях антивируса с удаленных компьютеров можно использовать такой PowerShell скрипт:
$Report = @()
$servers= Get-ADComputer -Filter 'operatingsystem -like "*server*" -and enabled -eq "true"'| Select-Object -ExpandProperty Name
foreach ($server in $servers) {
$defenderalerts= Invoke-Command $server -ScriptBlock {Get-MpThreatDetection | Select-Object -Property DomainUser,ProcessName,InitialDetectionTime ,CleaningActionID,Resources }
If ($defenderalerts) {
foreach ($defenderalert in $defenderalerts) {
$objReport = [PSCustomObject]@{
Computer = $defenderalert.PSComputername
DomainUser = $defenderalert.DomainUser
ProcessName = $defenderalert.ProcessName
InitialDetectionTime = $defenderalert.InitialDetectionTime
CleaningActionID = $defenderalert.CleaningActionID
Resources = $defenderalert.Resources
}
$Report += $objReport
}
}
}
$Report|ft
В отчете видно имя зараженного файла, выполненное действие, пользователь и процесс-владелец.
Обновление антивируса Windows Defender
Антивирус Windows Defender может автоматически обновляться из Интернета с серверов Windows Update. Если в вашей внутренней сети установлен сервер WSUS, антивирус может получать обновления с него. Убедитесь, что установка обновлений одобрена на стороне WSUS сервера (в консоли WSUS обновления антивирусных баз Windows Defender, называются Definition Updates), а клиенты нацелены на нужный сервер WSUS с помощью GPO.
В некоторых случаях, после получения кривого обновления, Защитник Windows может работать некорректно. В этом случае рекомендуется сбросить текущие базы и перекачать их заново:
"%PROGRAMFILES%\Windows Defender\MPCMDRUN.exe" -RemoveDefinitions -All
"%PROGRAMFILES%\Windows Defender\MPCMDRUN.exe" –SignatureUpdate
Если на сервере нет прямого доступа в Интернет, вы можете настроить обновление Microsoft Defender из сетевой папки.
Скачайте обновления Windows Defender вручную (https://www.microsoft.com/en-us/wdsi/defenderupdates) и помесите в сетевую папку.
Укажите путь к сетевому каталогу с обновлениями в настройках Defender:
Set-MpPreference -SignatureDefinitionUpdateFileSharesSources \\fs01\Updates\Defender
Запустите обновление базы сигнатур:
Update-MpSignature -UpdateSource FileShares
Управление настройками Microsoft Defender Antivirus с помощью GPO
Вы можете управлять основными параметрами Microsoft Defender на компьютерах и серверах домена централизованно с помощью GPO. Для этого используется отдельный раздел групповых политик Computer Configurations -> Administrative Template -> Windows Component -> Windows Defender Antivirus.
В этом разделе доступно более 100 различных параметров для управления настройками Microsoft Defender.
Например, для отключения антивируса Microsoft Defender нужно включить параметр GPO Turn off Windows Defender Antivirus.
Более подробно о доступных параметрах групповых политик Defender можно посмотреть здесь https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/use-group-policy-microsoft-defender-antivirus
Централизованное управление Windows Defender доступно через Advanced Threat Protection доступно через портал “Azure Security Center” (ASC) при наличии подписки (около 15$ за сервер в месяц).
IT and Virtualization Consultant. Vladan is the founder, and executive editor of the ESX Virtualization Blog at vladan.fr. He is a VMware VCAP-DCA and VCAP-DCD, and has been a vExpert from 2009 to 2023.
IT and Virtualization Consultant. Vladan is the founder, and executive editor of the ESX Virtualization Blog at vladan.fr. He is a VMware VCAP-DCA and VCAP-DCD, and has been a vExpert from 2009 to 2023.
While the Windows Server 2016 “Technical Preview (TP) 5 has had the option for restoring data via System Restore protection, Microsoft did not keep this option in the final release. As such, we have only two built-in options.
After spyware and malware IT administrators do have to face another threat – A Ransomware. You have to pay to recover your data that has been encrypted by malware. Clever move from the Pirate’s perspective. Indeed. Pirates are hoping that they can make some dirty money out of it. And sometimes they’re successful. You might be asking what can you do, as a system administrator, to protect yourself against ransomware?
Hackers will always find a way to your data and Anti-malware solutions will always try a way to block them. But you as an admin, must be prepared for an eventual data loss. Prepared how? We’ll try to find some strategies and tools which might be good to know. The tools that are built-in Windows Server 2016 that will be out later this year. Currently in TP5, but there won’t be any major updates on features further down the development cycle so the RTM of Windows Server 2016 shall have all what you can see in the TP5 which is available for download since about a week. We try to do a recap on which tools can be helpful to fight ransomware today.
The data you’re protecting might or might not be stored on Windows system volume. I never do that, but in case the server has RDSH and stores by default the user’s profiles on the system volume, you should be fine. We’ll focus on Windows server system which stores data on another volume, in this post as most enterprises are having their file servers correctly configured and separate the user’s data from system volumes.
First thing which comes in mind is the fact that Windows Server does have some built-in tools which can be useful to know and use for defense.
First – System Restore Protection
You can activate a system protection, a kind of Time Machine for a volume that needs to be protected. However, you don’t always have a control when system restore point is created. It might be useful in case the attacker is able to get into the system and corrupt system values, modify registry keys, or damages system files so the system crashes and is unable to boot. This is a smart move, but does not protect the data itself.
To activate system protection on Windows Server 2016:
Right click Start > System > Advanced System Settings > System Protection TAB
And then create a manual restore point immediately. You can do that after activation only, because otherwise, as you can see above, the button is grayed out
Now imagine that your system is corrupted and cannot boot. You can boot through Windows DVD and launch system restore from command line with:
“C:\Windows\System32\rstrui.exe”
Wizard based as well…
Second – System backup
By activating a scheduled backup you will be able to backup selected folders/files up to several times a day. Yes, Windows Server 2016 has still Windows backup feature. You need to add it via Add/remove Roles/features first…
Then find it through Windows Administrative tools > Windows Server Backup
You can than create new Backup Schedule > Custom > Add
And you can select what you want to backup. It’s selective backup method where you can pick any folders, user’s profiles, system state ……
Scheduling several backups a day allows to lower RPO, but needs more storage space for those backups indeed.
You can backup to:
- dedicated hard drive (nothing else can reside on the disk. It’s formatted by the software, before storing any backups, and then it’s invisible through Windows explorer)
- Backup to a volume – less performant, but you can store something else than backups
- Network share – backups are sent to a network share, which can be a NAS located in another room or building. (note that only single backup is kept as the software erases the previous backup with the new backup … kind of silly).
Image below shows Backup to a volume
The solution is rather rudimentary. You don’t have any possibility to configure e-mail reporting either so the only way to check If the backup went fine is to login into the console and check manually.
Here I could recommend Free tool – Veeam Endpoint Backup which can in it’s latest version 1.5 sent e-mail after backup, and also it can disconnect an USB drive (if setup as a backup target) after backup. This can further prevent cryptolocker or other ransomware to encrypt your backups if you’re hit by the thread after backup being successfully done.
Third – Activate Shadow Copies
By activating shadow copies on a volume, with a scheduling, you’re basically activate a versioning. It means that users can restore files backed previously by VSS, at the volume level.
Where to activate? At the volume level. If your volume where you storing user’s files is E: then simply Right click the D: drive > Properties > Shadow copies > Enable
Then you go and click the Settings button where you can further configure the options, with an Advanced settings as well…
Once you have several copies (you can verify the snapshots in the Previous versions tab) you and your users are able to recover previous versions of a file, in case this one has been encrypted by a ransomware software. This stays however an individual approach only as you have to requests individually a previous version for each file that you want to recover.
If you have the whole volume encrypted by a ransomware, then you have to go to the Shadow copies tab > select a point in time before the corruption > click Revert button.
Note that this operation is permanent. You cannot go back. All changes to files and folders on this volume made after the selected shadow copy time will be permanently lost.
Wrap up:
Windows Server 2016 by itself has several built-in tools which are useful when protecting yourself against data corruption. Coupled to an up-to-date antivirus/antimalware software which is also present on Windows Server 2016 as Windows Defender, then you can fight data corruption quite successfully.
If you’re not familiar with those concepts and don’t want to alter users’ data I’d suggest to setup a lab environment with VMware Player, Workstation or Free version of ESXi. All those products would allow you to test those features before going into production environment.
- How to Configure Storage Replication using Windows Server 2016? – Part 1
- HOW TO: Monitor a Nano Server on Windows Server TP4
