Sysadmin Magazine May
Sysadmin Magazine May
Security News:
PCI DSS v3
Implementation
Hurdle
Top Tips
for Windows
Server
Securit y
Useful How-tos
for Windows
Server
PowerShell
to Secure
While Windows Server is considered to be secure out-of-the-box, like any part of your IT
infrastructure, it needs to be patched, monitored and configured in an ongoing effort to
ensure that it isn?t left exposed to attack. Let go through some of the tools and best
practices that can help you keep Windows Server protected.
Windows Server is one of the most commonly deployed critical systems in the organization. Most of
the applications used in the organization are also Windows based, plus there are other legacy
applications built on these Windows platforms. Since these servers are used the most, they need to
be configured with tight security. The latest ones, Windows Server 2012 and Windows Server 2012
R2 have some great security features and improvements to protect from security threats and
vulnerabilities. These features need to be implemented and configured to prevent against any kind
of security breaches occurring in the environment. Given below are ten simple ways to prevent
security breaches in Windows Server 2012.
Security for organizations dealing with credit cards often boils down to one thing;
successful implementation of The Payment Card Industry Data Security Standard, better
known as PCI DSS. From securing transactions to increasing customer confidence, PCI DSS
compliance is a must in the modern economy. The PCI DSS standard version 3.0
requirements became effective January 1, 2015. While v3 has many changes, one is more
impactful, and more challenging to implement, than all the others.
Windows 10 is the latest client Operating system released by Microsoft, the technical summary of its latest
security features is available for download. High hopes have been pinned on Windows 10, since Windows 8,
its previous version, was kind of a let-down in the market. Following in the steps of the previous version,
Windows 10 will give you the same experience on both workstation and mobile device. The fact that
everything now is cloud ready opens the gates for more security breaches. Microsoft has made sure to
provide some great advanced features to overcome some of the modern security threats and to avoid data
loss.
2. User ?s client machines can contain business critical information and many
organizations deploy or configure Bitlocker for the clients to encrypt the disks on
local machines. This helps protect data, but not much can be done once the data
leaves client machines. To address this issue, Windows 10 offers data loss
prevention (DLP) to protect the files, which is quite transparent to the users, as they
don?t have to change their working style. In fact, they don?t even have to switch apps
or modes to protect their corporate data. Windows 10 automatically encrypts
corporate apps, data, email, website content and other sensitive information,
because it reaches a device from corporate network locations. Users can also
choose to differentiate between corporate and personal data in order to encrypt
and protect just one kind of data.
3.
Hardening Client s
Windows 10 provides another option to protect users from security breaches. Only
trusted apps can run on client machines. Organizations can decide which apps
should be installed. With this security feature, users cannot install any third-party
application that is not signed and which could cause potential threat to the
organizations.
4. Remote or sales team hardly come to office and they mostly use VPN to connect
from their mobile devices like tablets etc. There is always a potential risk associated
with their connection to office via VPN. Windows 10 provides an option of custom
specification of allowing or denying access to apps when VPN connection is used.
This enhances the security and also protects organizations from various threats,
particularly when they use the BYOD model.
Windows 10 is the next generation client operating system with some cool new features and
experience for the users. Looks like, once the final version of Windows 10 is released and
adopted, organizations will move towards highly secured environment.
1. Run eventvwr.msc > Windows Logs > Right-click ?Security? log > Properties: Make sure
the ?Enable logging? check box is selectedIncrease the log size for at least 1gb.
3. Open Event viewer and search the application log for the 4698 event ID with to find
latest created scheduled tasks.
5. Run "Task Scheduler " > Create new schedule task > Enter its name > Triggers tab > New
trigger > Set up the following options:
- Begin the task on an event
- Log ? Security
- Source ? Blank
- EventID ? 4698.
7. Now you will be notified about every scheduled task created on your windows server
via e-mail that will contain scheduled task creation time, name, computer name on
which this task was created and the name of the creator.
1. Run eventvwr.msc > Windows Logs > Right-click ?Application? log > Properties:
- Make sure the ?Enable logging? check box is selected
- Increase the log size for at least 1 GB
- Set retention method to ?Overwrite events as needed? or ?Archive the log when full?
2. Open Event Viewer and search the application log for the 11707 event ID with
MsiInstaller Event Source to find the last installed software.
4. Run "Task Scheduler " > Create new schedule task > Enter its name > Triggers tab >
New trigger > Set up the following options:
- Begin the task on an event
- Log ? Security
- Source ? Blank
- EventID ? 4698
6. Now you will be notified about every scheduled task created on your windows server
via e-mail that will contain scheduled task creation time, name, computer name on
which this task was created and the name of the creator.
A routine sysadmin task that PowerShell lends itself to is parsing data and text files, and the Windows event
logs use XML formatted information that can be easily parsed using the Get-EventLog and Get-WinEvent
PowerShell cmdlets. In this article I?m going to show you how to get started using PowerShell to parse the
event logs, and explain the differences between the two cmdlets to make the event log monitoring easier for
you.
Get -Event Log vs. Get -WinEvent dataset must be parsed by piping the results to the
Get-EventLog was the first PowerShell cmdlet that Where-Object cmdlet for further processing. This might
Microsoft included in Windows to facilitate working not be too much of a problem if you only want to
with the event logs. As of PowerShell v2.0, the work with the logs on the local machine, but can
?ComputerName parameter was added so that it could become a problem when querying remote computers,
also be used to query the logs on remote computers. as the logs need to be transferred across the network
But Get-EventLog has some limitations that led to the before they can be parsed, which takes extra time and
introduction of Get-WinEvent in PowerShell version 2. generates unnecessary network traffic if the logs are
Get-EventLog only works against the System, quite large.
Application, and Security logs, and not the new ETL Therefore, if you really want to return the entire
logs (Event Trace Logs) that were introduced withEvent contents of a log, and don?t need to work with it
Tracing for Windows (ETW) in Windows 7, which further, using Get-EventLog is an option, but
contain information from a much wider variety of Get-WinEvent was developed to address the
sources than the traditional logs that have been shortcomings of Get-EventLog, is equally capable of
present since the days of Windows NT. returning entire logs, and going forwards is likely the
The Get-EventLog cmdlet doesn?t allow the returned cmdlet that Microsoft will support for working with
results to be filtered directly, which means that the the event logs.
17 May 2015 SysAdmin Magazine
PowerShell Event Log Basics You can also get detailed information about a
Let?s start by returning the entire contents of an specific log as shown here by adding the
event log using Get-WinEvent. Open a PowerShell Format-Listcmdlet:
prompt, type the command line below and press Get-WinEvent ?ListLog
ENTER. ?Microsoft-Windows-BitLocker/BitLocker
Get-WinEvent ?LogName application Management?| Format-List -Property *
This will output the entire contents of the If you want to perform any of the above tasks on
Application log to the CLI. In practice, it?s likely a remote computer, just add the
that you?ll only want to see the most recent ?ComputerNameparameter, followed by the
events, and the easiest way to do that is by computer name:
adding the ?MaxEventsparameter: Get-WinEvent ?ListLog
Get-WinEvent ?LogName application ?MaxEvents 10 ?Microsoft-Windows-BitLocker/BitLocker
Management??ComputerName contososrv1 |
The above command line displays the last ten
Format-List -Property *
events recorded in the Application log.
Get-WinEvent can be used to parse the ETL logs, Don?t forget that you must hold the necessary
but you need to find the log name first. To list all permissions to read the desired log, whether it?s
the available logs, use: on the local computer, or a remote device.
Get-WinEvent ?ListLog *
And then look for the desired log name, for
example, the BitLocker Management log can be
returned using the command below. Note that
apostrophes are required at the top and tail of
the log name because it includes a space: Want to read more articles like this?
Subscribe to our blog:
Get-WinEvent ?LogName
?Microsoft-Windows-BitLocker/BitLocker blog.netwrix.com
Management??MaxEvents 10
PowerShell Remoting is enabled in Windows Server 2012 (and later) out-of-the-box, and while
many IT shops see this as a potential security risk, PowerShell is in fact one of the most secure ways
to administer servers if best practices are followed. In this article, I?m going to show you how to
configure Windows Server 2012 R2 to accept remote PowerShell connections from a specific group
of users, and how to restrict the cmdlets that can be run.
What are Const rained Endpoint s? remotely and exposes all available cmdlets and
Remote endpoints determine the users that can functions on the device.
connect to a device with PowerShell Remoting, as The good news is that you can create your own
well as what they can do once authenticated. The constrained endpoints and restrict what users
default PowerShell endpoint allows users that can do, allowing you to minimize the risks of
are members of the built-in Administrators and allowing PowerShell Remoting for administration
Remote Management Users group to connect purposes.
19 May 2015 SysAdmin Magazine
Creat e Const rained Endpoint s in Windows You?ll be prompted to confirm that you want to
Server 2012 R2
configure the new endpoint, restart the WinRM
Let?s create our own constrained endpoint in service, and configure access permissions to the
Windows Server 2012 R2. Log in with local endpoint. In this example, I?m going to give a
administrator privileges, and click the blue group calledHelpdesk ?Execute (Invoke)?
PowerShell icon on the desktop taskbar. permission on the new endpoint. Don?t forget to
To see the existing endpoints on the server, type give the Helpdesk group permission to manage
Get-PSSessionConfiguration in the PowerShell printers on the remote device, otherwise
prompt and press ENTER. In the PowerShell get-printer will fail.
console, you should see the four default If you run Get-PSSessionConfiguration again, you
endpoints. will be able to see the new endpoint listed.
To restrict the cmdlets and functions that a user
can execute when they connect to the Connect t o a Const rained Endpoint
constrained endpoint, we need to create a
configuration file. In the PowerShell console, type Now connect to the endpoint from a remote
the cmdlet shown below and press ENTER. machine. Log in to Windows 8 with a user that?s a
New-PSSessionConfigurationFile creates a new member of the Helpdesk group or the group to
configuration file calledPrintAdmin.pssc and sets which you assigned permissions on the
restrictions including limiting remote users to endpoint. Open a PowerShell prompt and run
functions that are part of the PrintManagement the command below, replacing contososrv1 with
PowerShell module. the name of the remote server:
Change Notifier for Group Policy Change Notifier for SQL Server
2. Tracks every change made to your group
policy objects (GPOs), including GPO links,
8. Detects changes made to your SQL Server
configurations, including database creation
audit policy, password policy, and software and deletion, changes to database users,
deployment changes, and fills major gaps found in roles, and schemas. It also reports ?before? and
native auditing tools. ?after? values for every change, and sends daily
Free Download reports showing all changes made.
Free Download
Event ID Reference
Local Policy Audit Set t ings (2003/ 2008 - 12)
Run gpedit.msc > Local Computer Policy > Computer Configuration > Securit y Log
Windows Settings > Security Settings > Local Policies > Audit Policy:
- 636/4732 ? Local group member
- Audit account management > Define > Success
added
- Audit object access > Define > Success
- 637/4733 ? Local group member
removed
- 635/4731 ? Local group created
- 638/4734 ? Local group deleted
Regist ry-level Audit ing Set t ings - 624/4720 ? User account created
- Run regedit.exe > HKEY_LOCAL_MACHINE > Right-click ?SOFTWARE? > - 630/4726 ? User account deleted
Permissions > Advanced > Auditing (Tab) > Click ?Add? > Principal - 639/4735 ? Local group changed
?Everyone? > Type ?Success? > Applies to ?This key and subkeys? > - 642/4738 ? User account changed
Advanced Permissions > Check ?Set Value?, ?Create Subkey?, ?Delete?, - 627/4723 ? Change password attempt
?Write DAC?, ?Write Owner ? > Click ?OK? - 628/4724 ? User account password set
- Repeat steps above for the ?HKEY_LOCAL_MACHINE\SYSTEM? and
- 685/4781 ? User name changed
?HKEY_USERS\.DEFAULT? nodes
- 567/4657,4663 ? Object access
attempt
- 560/4656 ? Object open
- 562/4658 ? Handle closed
Event Log Set t ings - 602/4698, 4699, 4700, 4701, 4702 ?
Run eventvwr.msc > Windows Logs > Right-click ?Application? log > Scheduled task created, deleted,
Properties: enabled, disabled, updated
- Make sure the ?Enable logging? check box is selected Applicat ion Log
- Set retention method to ?Overwrite events as needed? or Event Source: MsiInstaller
?Archive the log when full?
- 11707 ? Software was installed
Repeat this operation for the ?Security? and ?System? event logs
- 11724 ? Software was uninstalled
Open Event viewer and search the corresponding log for the id?s listed in
Syst em Log
the Event ID Reference box
Event Source: Service Control Manager
Open ADSI Edit > Connect to Default naming context > Expand DomainDNS object with the
3. name of your domain > System > Right ?lick MicrosoftDNS > Properties > Security (Tab) >
Advanced (Button) > Auditing (Tab) > Add Principal ?Everyone? > Type ?Success? > Applies to
?This object and all descendant objects? > Permissions > Select the following check boxes:
Write all properties, Delete, Delete subtree > Click ?OK?.
4. Open DNS Manager > Expand your servername > Forward Lookup Zone > Right click the zone
you want to audit > Properties > Security (Tab) > Advanced (Button) > Auditing (Tab) > Add
Principal ?Everyone? > Type ?Success? > Applies to ?This object and all descendant objects? >
Permissions > Select the following check boxes: Write all properties, Delete, Delete Subtree >
Click ?OK?.
5. Look for Event ID 4662 with Object Type: dnsNode in your Security Event log in order to track
DNS records deletion.
Copyright © Netwrix Corporation. All rights reserved. Netwrix is trademark of Netwrix Corporation and/ or one or more of its subsidiaries and may
be registered in the U.S. Patent and Trademark Office and in other countries. All other trademarks and registered trademarks are the property of
their respective owners.