Apply Defense-in-Depth to Increase Security
Defense-in-depth provides multiple
layers of defense to protect a network environment.
Policies,
Procedures, and Awareness - Security documentation and user
education
Physical
Security - Guards and/or locks
Perimeter
- Firewalls
Internal
Network - Network segments (subnets), IPSec
Host
- OS hardening (latest patches and updates), authentication
Application
- Application hardening and testing, antivirus patches
Core Server Security Practices
Core server security practices should
be developed to effectively manage and maintain our servers.
- Always apply and test the latest service pack and all available security updates
- Use the Security Configuration Wizard (SCW) to implement server security
- Use Group Policy to apply security templates to servers and manage the servers
- Restrict scope of access for service accounts
- Restrict who is able to log on locally to servers
- Restrict physical and network access to servers
Security Configuration Wizard (SCW)
SCW reduces the surface attack area of
the server:
- You can create your security policies and apply later. They can be saved as XML files so that they can be opened in XML notepad and changes can be made, if needed.
- We can roll back a security policy, if we decide there is a problem.
- We can use Ipsec to block unused ports and secure ports left open.
- Reduces protocol exposure.
- You can configure audit settings.
- You can disable unnecessary services.
Note: Before
you run the SCW on a Server 2008 computer, make sure you have all the
roles and applications installed, so that it can make an effective
scan of the ports in use and services required, so an appropriate
policy will be generated.
What exactly is Windows Firewall?
Windows Firewall is a stateful
host-based application that provides:
- Filters both incoming and outgoing network traffic
- Can be managed either by the Control Panel tool or by the advanced Windows Firewall with the Advanced Security MMC console
- Integrates firewall filtering and IPSec protection settings
- Group Policy support
- Enabled by default
Security rules for Windows Firewall and for IPsec-based connections in Windows Vista and in Windows Server 2008
Demo – Security Configuration Wizard
- Start | Administrative Tools | Security Configuration Wizard
- Click Next
- Configuration Action (choose Create a new security policy)
- Create a new security policy
- Edit and existing security policy
- Apply an existing security policy
- Rollback the last applied security policy
- Click Next
- Select Server. In the Server text box, type: nyc-dc1
- Click Next
- Processing Security Configuration Database. Press View Configuration Database. The SCW is looking at the local machine to determine what roles and services are installed. Accept the ActiveX warning display. From here we can see the following. Scroll through and read the list in each of the following:
- Server Roles
- Client Features
- Administration and Other Options
- Services
- Windows Firewall
- Close the viewer dialog box after the above is viewed.
- Click Next
- Role-Based Service Configuration. We can configure security based on the roles this server is running. Click Next
- Select Server Roles. You can see the currently installed and active roles on the server. You can view:
- All roles
- Installed roles
- Uninstalled roles
- Selected roles
- Click Next
- Installed features. View the installed features.
- Click Next
- Installed Options. View the installed options.
- Handling Unspecified Services. Unspecified services are services that are not installed on the selected server and not listed in the security configuration database. You can select:
- Do not change the startup mode of the service
- Disable the service
- Click Next
- Confirm Service Changes. Scroll through the list to see which services are disabled.
- Click Next
- Network Security. This section is where you configure rules for Windows Firewall with Advanced Security.
- Click Next
- Network Security Rules. You can see the ports that are currently open and the rules configured.
- Click Next
- Registry Settings. Modify any required registry settings here. We will skip this section.
- Click Next
- Audit Policy. Configure auditing in this section. We will skip this section.
- Click Next
- Save Security Policy. Click Next.
- Security Policy File Name. The default path is c:\Windows\security\msscw\Policies. Type in a name and description at the end of the default path (it will be saved as an xml file). You can View Security Policy or Include Security Templates.
- Click Next
- Apply later or Apply now. We will Apply later.
- Click Next
- Click Finish
- Start | Computer
- Go to the path indicated in step 29, c:\Windows\security\msscw\Policies (you will see the security policy)
Using Security Templates to Secure Servers
What is a Security Policy?
A Security Policy is a
combination of security settings to be applied to a computer, locally
or in Active Directory.
Local Security Policies include:
(do not have the same level of
security as Active Directory)
- Account Policies
- Local Policies
- Windows Firewall with Advanced Security
- Public Key Policies
- IP Security Policies on Local Computer
Active Directory Security Policies
include:
- Event Log
- Restricted Groups
- System Services (allows you to disable a system service through Group Policy)
- Registry
- File System
- Wired and Wireless Network Policies
- Network Access protection
- IP Security Policies on Active Directory
What are Security Templates?
A security template is a collection of
configured security settings used to apply a security policy locally
or through Group Policy to a group of computers.
Built-in templates are located in
%SystemRoot%\Security\Templates. These templates are typically
used as a base to build your own customized security policies. Custom
security templates are stored in your local user profile folder. The
security templates are created and modified using the Security
Templates MMC snap-in.
- Security templates are deployed based on the server role. Some server roles are more security related, such as Active Directory Rights Management Services (AD RMS) and Active Directory Certificate Services (AD CS). To see a complete list of available server roles, run the Server Manager Wizard from Administrative Tools.
- Security templates can be deployed to individual computers using the SECEDIT command.
- Security Templates can be deployed to groups of computers using Group Policy.
Demo – Configuring Security Templates
- Start | mmc | Press Enter
- Select File
- Click Add/Remove Snap-in...
- Scroll down and select Security Templates from the list of Available snap-ins
- Click Add button
- Click OK
- Expand Security Templates (notice the default for saving the security templates is your user profile)
- Right-click on your user profile (the template path) and select New Template...
- We are going to create a base security template for a DHCP server...
- In the Template name: text box, type: DHCP Base Security policy
- Type something into the Description: text box
- Click OK
- Expand your user profile, and you will see the DHCP Base Security policy
- Expand DHCP Base Security policy to see the settings that you can modify and set:
- Account Policies
- Password Policy
- Account Lockout
- Kerberos Policy
- Local Policies
- Audit Policy
- User Rights Assignment
- Security Options
- Event Log (change event log settings here)
- Restricted Groups
- System Services (all the system services are listed here, you can stop and disable the service from here)
- Registry
- File System
- Close the MMC and click Close the MMC and click Yes to Save Security Templates
If you want to apply the security
policy locally to an individual computer, you can use the Local Group
Policy on the machine and import this security template into the
local security settings.
If you want to apply the security
policy to a group of computers, then you use Group Policy through
Active Directory:
- Start | Administrative Tools | Group Policy Management
- If you want to bring the security template into the Default Domain Policy, right-click Default Domain Policy and select Edit
- Expand Policies
- Expand Window Settings
- Expand Security Settings
- Right-click Security Settings and Import Policy...
- It is now defaulted to the security policy we just created in our profile. Select the policy and Open. Every machine that falls into the scope will then pickup these security settings.
What is the Security Configuration and Analysis Tool?
The Security and Configuration Analysis
Tool allows us to look at the current security configuration of a
computer and analyze that computer’s security configuration against
the configuration we have stored in one of our templates.
You can launch it from an mmc, you will
then be presented with an option to create a security database. You
are then asked which of your security templates you wish to import
into that security database. We can then analyze the computer’s
current security to see if it is compliant and where it fails.
If you then want to bring the computer
up to date, you can right-click Security Configuration and
Analysis and select Configure Computer Now.... This will
override the current computer security settings with the settings
from the security database.
Demo – Using the Security Configuration and Analysis Snap-in
- Start | mmc | Press Enter
- Select File
- Click Add/Remove Snap-in...
- Scroll down and select Security Configuration and Analysis from the list of Available snap-ins
- Click Add button
- Click OK
- Select Security Configuration and Analysis and the wizard displays
- Right-click Security Configuration and Analysis and select Open Database...
- Type demo into the File name: text box
- Click Open
- From here, we need to select a security template to use as a baseline to measure the local computer’s security. Earlier, for example, we created a Server baseline security template. Select this and click Open.
- We now have the ability to analyze the local computer against the template settings in our security database.
- Right-click Security Configuration and Analysis and select Analyze Computer Now...
- A Perform Analysis dialog box appears. There is and Error log file path: in the text box field
- Click OK
- Go to the Event Log in the main mmc console, and check the log for red x’s for discrepancies in the policy. You can click on the error and make changes to the security policy on the database. Or, when you want to bring the local computer up to date, you can right-click Security Configuration and Analysis and select Configure Computer Now....
Note: Before you Configure
Computer Now...., you should Export Template...
of the current machine in case you need to restore, if
needed.
Configure an Audit Policy
If you ever need to find out what
happened to a deleted file or folder, you can configure an audit
policy to tell you:
- Who deleted it?
- Where the file was deleted?
- What was the time the file was deleted?
The first three elements of an audit
policy are deployed in Active Directory. Other elements have to be
configured on the local computer.
What is Auditing?
Auditing tracks user and operating
system activities, and records selected events in security logs:
- What occurred?
- Who did it?
- When?
- What was the result?
Enable auditing to create a baseline,
detect threats and attacks, determine damages, and prevent further
damage.
You should audit access to objects,
management of accounts, and users logging on and off.
What is an Audit Policy?
An audit policy determines the security
events reported to the network administrator.
Set up an audit policy to track success
or failure of events, minimize unauthorized use of resources, and to
maintain a record of activity.
Security events are stored in security
logs.
The key to a good security policy is to
make it manageable. Who has time to go through and review a security
log with event viewer? If you don’t have something like Microsoft Operations Manager(MOM) or Systems Center Operations Manager (SCOM), you will
have to put aside time to review the event logs.
Types of Events to Audit
Audit for the success or failure or
both on the particular event.
The following are types of events to
audit:
Events that occur within Active
Directory:
- Account Logon. When the user logs onto AD through a domain controller.
- Account Management. Changes made to user, group, or computer accounts within AD.
- Directory Service Access
- Directory Service Changes
- Directory Service Replication
- Detailed Directory Service Replication
Changes made to the local computer
through Group Policy:
- Logon
- Object Access
- Policy Change
- Privilege Use
- Process Tracking
- System
Question: You need to monitor Active Directory replication and changes to Active Directory. You need these events to be recorded in the Windows Security Event log. What tool should you use?
Answer: Use Auditpol.exe. Active Directory Audit Policy supports Directory Service Access, Directory Service Changes, Directory Service Replication, and Detailed Directory Service Replication.
Demo – Configure Auditing
Go to the local policy of SVR1 machine.
- Start | gpedit.msc
- Press Enter
- The Local Group Policy Editor displays
- Under Local Computer Policy, expand Computer Configuration, Windows Settings, Security Settings, and Local Policies
- Highlight Audit Policy
- The audit events display. Double-click on the one you want, Audit object access, for example
- Choose Success or Failure under Audit these attempts: (you can do both, if you like)
- Click Apply
- Click OK
When we configure file and object
access, we have to configure the actual files and folders that we
want to audit access to. We do this through the Access Control
List (ACL) NTFS Permissions. How do we do this?
- Start | Computer
- Click on the C: drive
- Pretend you have some sensitive documents in the Resume folder. Right-click the Resume folder.
- Select Properties
- Go to the Security tab
- Click on the Advanced button at the bottom of the dialog box
- Click on the Auditing tab
- Click on the Edit button
- You need to set what users or group that you would like to audit. Click on the Add button.
- Under Enter the object name to select (examples): type in domain users in the text box.
- Click the Check Names button and click OK
- The Auditing Entry for Resume dialog box displays. Let’s choose Create file / write data. Check the Successful and Failed boxes.
- Click OK
- Click Apply
- Click OK
- Click OK
- Click OK
Now, we need to update the local policy
on SVR1:
- Start | cmd
- Press Enter
- Type: gpupdate /force
- Type: Exit
Later, when you are ready to check the
security log within Event Viewer:
- Start | Administrative Tools | Event Viewer
- Expand Windows Logs
- Select Security to review the events
Windows Server Update Services (WSUS)
We can deploy our own WSUS machines,
and from there we can deploy and test Windows software updates on a
schedule. This way we have complete control and really good reporting
functionality. This will minimize the amount of traffic generated from the root WSUS server. The update is transferred once from the root server to each WSUS server in remote locations. Local clients can receive updates from the local servers without generating additional traffic across the remote links where the root server is deployed.
The first version of WSUS was know as SUS, Software Update Services. SUS only delivered hotfixes and patches to Windows. Support for SUS ended in July, 2007. To migrate update information from SUS to WSUS, run
WSUSutil.exe command line utility on the WSUS server.The first version of WSUS was know as SUS, Software Update Services. SUS only delivered hotfixes and patches to Windows. Support for SUS ended in July, 2007. To migrate update information from SUS to WSUS, run
Windows Server Update Services
The list of available updates from the
Microsoft Update Web Site is propagated by a cab file, Wsusscan.cab
or wsusscn2.cab. This cab file is downloaded by the server that runs
WSUS, a Windows 2003 SP1 machine or later.
The settings for automatic updates can
be modified using Group Policy.
WSUS Process:
Phase 1: Assess
- Set up the production environment supporting update management using WSUS for routine and emergency installations
Phase 2: Identify
- Discover the new updates that are relevant for our production environment
Phase 3: Evaluate and Plan
- Test updates in a test environment that resembles the production environment. Set up the tasks necessary to deploy updates to production, plan, build, and schedule the update releases, and conduct acceptance testing of the releases.
Phase 4: Deploy
- Approve and schedule update installations. SCCM System Center Configuration Manager integrated with WSUS gives us enterprise reporting. SCCM supports Wake-On-Lan (WOL) so that we can update patches to computers that are turned off.
Server Requirements for WSUS:
- Windows Server 2003 SP1 or Windows Server 2008
- IIS 6.0 or later
- Windows Installer 3.1 or later
- Microsoft .NET Framework 2.0
- SQL Server 2005 SP1 or later (optional)
- Microsoft Report Viewer Redistributable 2005
Use Group Policy or the
registry to configure Automatic Updates. In a non-Active
Directory environment, use the Local Group Policy object (GPO)
or edit the registry directly.
Demo – Installing and Configure WSUS
- Start | Computer
- Go to the D: drive (where we have already downloaded the installation pkg)
- Double-click on the WSUS install pkg
- Extracting Files
- The Windows Server Update Services Setup Wizard dialog box displays
- Click Next
- On the Installation Mode Selection page:
- Full server installation including Administration Console (we will choose this one)
- Administration Console only
- Click Next
- The license agreement displays. Read and click I accept. Click Next.
- Now, pick where to install WSUS. Click Next.
- On the Database Options page, we will Use existing Windows Internal Database on this Computer and click Next
- You will see Connecting to SQL Server Instance. Click Next.
- You can Use existing database or Create new database. We will Create new database.
- Click Next
- We will Use the existing IIS Default Web Site (recommended). This will create a virtual directory within the default web site. Click Next.
- On the Ready to Install Windows Server Update Services page, click Next
- Installing...
- Click Finish
At the end of the WSUS installation,
you can configure the server using a wizard.
However, here is another way. WSUS 3.0 SP1 supports client-side targeting that allows you to create groups of computers and approve updates only for specific groups. In
this exercise we will create a computer group and approve an update:
- Start | Administrative Tools | Microsoft Windows Server Update Services
- The snap-in is added automatically and launched
- Select Options
- Update Source and Proxy Server you are going to use to connect to the Internet and choose the Update Source
- Products and Classifications. The types of products for which you want to synchronize updates and what classification (Critical updates, Drivers, Security Updates, etc.)
- Update Files and Languages.
- Synchronization Schedule. Manually or automatically.
- Automatic Approvals. Specify rules for automatically approving new updates when they are synchronized.
- Computers. Click All Computers. In the Actions pane, click Add Computer Group
- In the Add Computer Group dialog box, specify a computer group name of Payroll Computers and click Add
- In the Update Services list pane, under Computers and All Computers, click Unassigned Computers. In the Unassigned Computers details pane, specify Any in the Status drop-down list, and click Refresh
- Right-click one of the listed computers, and then click Change Membership...
- In the Set Computer Group Membership dialog box, select the Payroll Computers check box, and click OK
- In the Update Services administrative tool, in the list pane, expand Updates, and click Critical Updates. In the details pane, change Approval: drop-down box to Any Except Declined. Change the Status: drop-down box to Any and click Refresh (review the updates available)
- In the Critical Updates details pane, right-click on of the updates and then select Approve from the context menu
- In the Approve Updates dialog box that appears, click the arrow next to All Computers, select Approved for Install, and click OK
- On the Approval Progress page, when the process is complete, click Close
- The message appears stating the update is approved, but must be downloaded to complete
- In the Update Services console, click Reports to view the reports available in WSUS.
- Server Cleanup Wizard.
- Reporting Rollup.
- E=Mail Notifications.
- Microsoft Update Improvement Program.
Personalization.- WSUS Server Configuration Wizard.
Managing Windows Server Update Services
WSUS uses the MMC for its
administration. Within the console tree, there is a section for the
WSUS server and there is an Actions pane. The WSUS server
section encompasses:
- Updates
- Computers
- Downstream Servers
- Synchronizations (to the Windows Update Servers)
- Reports
- Options
Managing Computer Groups
We must configure the computers to
contact the WSUS server so that the WSUS server can recognize the
computers. Once the computer has been recognized, it will be assigned
to the All Computers and the Unassigned Computers group.
Computers can be assigned to more than
one group. Best practice is to create a computer group to test
updates before you deploy the updates to other computers.
We can use Client-side targeting
and Server-side targeting to set up computer groups. Client-side targeting involves using Group Policy and
modifying registry keys. Server-side targeting involves
manually adding each computer to a group.
Enable the Client-Side Targeting Group Policy setting and specify a target group name for the computer:
Enable the Client-Side Targeting Group Policy setting and specify a target group name for the computer:
- Go to the Update Services console and select Options. In the details pane, click Computers.
- In the Computers dialog box, select Use Group Policy Or Registry Settings On Computers. Click OK.
- Open the GPO in the Group Policy Management Editor.
- Select the Computer Configuration\Policies\Administrative Templates\Windows Components\Windows Update
- In the details pane, double-click Enable Client-Side Targeting policy.
- In the Properties dialog box, select Enabled. Type the name of the computer group that you want to add the computer to and then click OK.
Approving Updates
- Install
- Decline
- Unapprove
- Removal
The WSUS environment is configured. The
updates are downloaded. The updates now need to be approved before
they go out to the client machines. We can approve the installation
of updates for all of the computers within the WSUS environment or we
can apply the updates to different computer groups.
After the update is approved, we can
install the update, remove the update if the application supports
removal, or we can set a deadline for automatic installation. If we
set up an automatic installation, it will override the client
computer settings.
Demo – Managing WSUS
Configure client machines to get their updates from the internal WSUS server, rather than going to the Internet. Use the Group Policy Management Console to create and link a Group Policy Object (GPO) to the domain to configure client updates:
- Start | Administrative Tools | Group Policy Management
- Expand Domains and expand your domain
- Highlight Group Policy Objects and highlight Default Domain Policy
- Right-click and select Edit
- Under Computer Configuration, expand Policies
- Select Administrative Templates
- Expand Windows Components
- Scroll down and select Windows Update
- Select and double-click Configure Automatic Updates and set Enabled on the Setting tab
- Under Configure automatic updating:
- 2 – Notify for download and notify for install
- 3 – Auto download and notify for install
- 4 – Auto download and schedule the install (we will choose this one)
- Allow local admin to choose the setting
- Under Scheduled install day:, we will choose 1 – Every Sunday
- Under Scheduled install time: we will choose 3:00
- Click Apply
- Click OK
- Select and double-click Specify intranet Microsoft update service location
- Set to Enabled
- In the text boxes of Set the intranet update service for detecting updates: and Set the intranet statistics server: type: http://nyc-svr1 (example)
- Click Apply
- Click OK
- Examine the other settings in Windows Update to see if they need modifying
- Close down Group Policy itself and the Group Policy Management console
- Start | Run | cmd
- Type: gpupdate /force to update the Group Policy
- Close down command prompt
- Start | Control Panel | Windows Update
- You can see the changed settings in the Windows Update dialog box
A useful command line utility, wuaclt/detectnow is a Microsoft product that comes with Windows and is
a way to let users acquire critical security updates from the windows
update website.
Manage the updates on WSUS server, nyc-svr1 (example)
- Start | Administrative Tools | Microsoft Windows Server Update Services 3.0 SP1 (note: as of today , the current release is SP2. This demo is based on SP1)
- In this example, we see a number of security and critical updates waiting to be approved
- In the console tree, under Updates, we can review the update status:
- All Updates
- Critical Updates
- Security Updates
- WSUS Updates
- Right-click any status to get a context menu:
- Approve...
- Decline
- Group By
- Revision History
- File Information
- Status Report
- Help
- Back to the console tree, under Computers, All Computers, Unassigned Computers, we can see the status of the updates for the computers. Select the machine and:
- Delete
- Group By
- Status Report
- Help
Hi Dude,
ReplyDeleteYou initially configure archiving and compliance when you install the compliance server. After installation, you can manage and modify compliance settings by using the group chat server configuration tool. Thanks a lot....