• Stars
    star
    218
  • Rank 180,888 (Top 4 %)
  • Language
    Ruby
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DevSec Windows Baseline - InSpec Profile

windows-baseline

Build Status Supermarket

This Baseline ensures, that all hardening projects keep the same quality.

Description

This InSpec compliance profile is inspired by CIS Windows 2012R2 and 2016 Benchmark and implements such rules in an automated way to provide security best-practice tests around Windows Servers in a production environment.

Implements:

  • CIS Microsoft Windows Server 2012 R2 Benchmark v2.3.0 - 03-30-2018
  • CIS Microsoft Windows Server 2016 RTM (Release 1607) Benchmark v1.1.0 - 10-31-2018

InSpec is an open-source run-time framework and rule language used to specify compliance, security, and policy requirements for testing any node in your infrastructure.

Requirements

  • at least InSpec Version 3.0.0
  • WinRM activated (for inspec remote usage)

Platform

  • Windows 2012R2
  • Windows 2016
  • Windows 2019

Attributes

We use a yml attribute file to steer the configuration, the following options are available:

  • level_1_or_2 define which CIS Benchmark Level (1 or 2) you want to execute

  • ms_or_dc define if you want to execute the profile in the context of a Member Server (MS) or Domain Controller (DC)

  • password_history_size define password history size

  • maximum_password_age define MaximumPasswordAge

  • se_network_logon_right define which users are allowed to access this computer from the network

  • se_interactive_logon_right define which users are allowed to log on locally

  • se_remote_interactive_logon_right define which users are allowed to log on through Remote Desktop Services

  • se_backup_privilege define which users are allowed to backup files and directories

  • se_systemtime_privilege define which users are allowed to change system time

  • se_time_zone_privilege define which users are allowed to change system time zone

  • se_create_symbolic_link_privilege define which users are allowed to create symbolic links

  • se_deny_network_logon_right define which users are not allowed to access this computer from the network

  • se_deny_remote_interactive_logon_right define which users are not allowed to log on through Remote Desktop Services

  • se_enable_delegation_privilege define which users are allowed to enable computer and user accounts to be trusted

  • se_impersonate_privilege define which users are allowed to impersonate a client after authentication

  • se_load_driver_privilege define which users are allowed to load and unload device drivers

  • se_batch_logon_right define which users are allowed to log on as a batch job

  • se_security_privilege define which users are allowed to manage auditing and security logs

  • se_assign_primary_token_privilege define which users are allowed to replace a process level token

  • se_restore_privilege define which users are allowed to restore files and directories

Usage

InSpec makes it easy to run your tests wherever you need. More options listed here: InSpec cli

# run profile locally and directly from Github
$ inspec exec https://github.com/dev-sec/windows-baseline

# run profile locally
$ git clone https://github.com/dev-sec/windows-baseline
$ inspec exec windows-baseline

# run profile on remote host via WinRM
inspec exec windows-baseline -t winrm://<ip-address>:5985 --user=<username> --password=<password>

# run profile on remote host via WinRM and define attribute value
inspec exec windows-baseline -t winrm://<ip-address>:5985 --user=<username> --password=<password> --attrs sample_attributes.yml

# run profile direct from inspec supermarket
inspec supermarket exec dev-sec/windows-baseline -t winrm://<ip-address>:5985 --user=<username> --password=<password>

Run individual controls

In order to verify individual controls, just provide the control ids to InSpec:

inspec exec windows-baseline --controls 'windows-001'

ToDo

  • adjust the inspec attributes according to the profile (Member Server or Domain Controller), because for the Domain Controller some attributes are different from a Member Server

Contributors + Kudos

License and Author

Author: Patrick Muench [email protected]
Author: Torsten Loebner [email protected]
Copyright: 2019 SVA System Vertrieb Alexander GmbH
Copyright: 2019 Lichtblick SE
Copyright: 2015-2016, Chef Software, Inc
Copyright: DevSec Hardening Framework Team
License: Apache License Version 2.0

More Repositories

1

ansible-collection-hardening

This Ansible collection provides battle tested hardening for Linux, SSH, nginx, MySQL
Jinja
3,906
star
2

linux-baseline

DevSec Linux Baseline - InSpec Profile
Ruby
774
star
3

ansible-ssh-hardening

This Ansible role provides numerous security-related ssh configurations, providing all-round base protection.
HTML
774
star
4

cis-docker-benchmark

CIS Docker Benchmark - InSpec Profile
Ruby
482
star
5

chef-os-hardening

This chef cookbook provides numerous security-related configurations, providing all-round base protection.
Ruby
438
star
6

hardening

DevSec Examples
Ruby
319
star
7

cis-kubernetes-benchmark

CIS Kubernetes Benchmark - InSpec Profile
Ruby
292
star
8

puppet-os-hardening

This puppet module provides numerous security-related configurations, providing all-round base protection.
Puppet
280
star
9

ssh-baseline

DevSec SSH Baseline - InSpec Profile
Ruby
275
star
10

ansible-nginx-hardening

This Ansible role provides secure nginx configurations.
Ruby
185
star
11

chef-ssh-hardening

This chef cookbook provides secure ssh-client and ssh-server configurations.
Ruby
160
star
12

cis-dil-benchmark

CIS Distribution Independent Linux Benchmark - InSpec Profile
Ruby
146
star
13

ansible-windows-hardening

This Ansible role provides windows hardening configurations for the DevSec Windows baseline profile.
Ruby
145
star
14

ansible-mysql-hardening

This Ansible role provides security configuration for MySQL.
Ruby
140
star
15

nginx-baseline

DevSec Nginx Baseline - InSpec Profile
Ruby
102
star
16

chef-windows-hardening

This chef cookbook provides windows hardening configurations for the DevSec Windows baseline profile.
Ruby
97
star
17

linux-patch-baseline

DevSec Linux Patch Baseline - InSpec Profile
Ruby
85
star
18

ssl-baseline

DevSec SSL/TLS Baseline - InSpec Profile
Ruby
65
star
19

puppet-ssh-hardening

This puppet module provides secure ssh-client and ssh-server configurations.
Ruby
59
star
20

mysql-baseline

DevSec MySQL Baseline - InSpec Profile
Ruby
58
star
21

postgres-baseline

DevSec PostgreSQL Baseline - InSpec Profile
Ruby
50
star
22

chef-nginx-hardening

This chef cookbook provides secure nginx configurations.
Ruby
50
star
23

windows-patch-baseline

DevSec Windows Patch Baseline - InSpec Profile
Ruby
47
star
24

apache-baseline

DevSec Apache Baseline - InSpec Profile
Ruby
38
star
25

ansible-apache-hardening

HTML
36
star
26

example-puppet-hardening

β›” DEPRECATED
Dockerfile
34
star
27

php-baseline

DevSec PHP baseline - InSpec Profile
Ruby
27
star
28

chef-postgres-hardening

This chef cookbook provides security configuration for PostgreSQL.
Ruby
27
star
29

chef-mysql-hardening

This chef cookbook provides security configuration for mysql.
Ruby
26
star
30

chef-apache-hardening

Ruby
25
star
31

puppet-nginx-hardening

Nginx Web Server Hardening with Puppet
Puppet
23
star
32

docker-ansible

Docker containers that include ansible latest stable 2.x version.
Dockerfile
23
star
33

openstack-baseline

Use InSpec to run through the configurations from the OpenStack Security Guide.
Ruby
18
star
34

puppet-mysql-hardening

MySql Server Hardening with Puppet
Puppet
18
star
35

dev-sec.github.io

project website
SCSS
18
star
36

chef-jenkins-hardening

β›” DEPRECATED: A secure jenkins installation
Ruby
17
star
37

puppet-apache-hardening

Apache Web Server Hardening with Puppet
HTML
15
star
38

docs

β›” DEPRECATED, migrated to dev-sec/dev-sec.github.io
12
star
39

puppet-postgres-hardening

Postgres Web Server Hardening with Puppet
Puppet
11
star
40

patcher

β›” DEPRECATED: CLI to extract patches from InSpec report
Ruby
7
star
41

blog

β›” DEPRECATED, migrated to dev-sec/dev-sec.github.io
HTML
6
star
42

pam-tester

Python
5
star
43

git-contributors

Get contributors of your git repos.
Ruby
4
star
44

puppet-hardening-stdlib

Shared functions for puppet hardening.
Ruby
4
star
45

chef-percona-hardening

β›” DEPRECATED: Security Configuration for Percona
Ruby
4
star
46

chef-linux-patch

β›” DEPRECATED: Update Linux packages according to InSpec linux-patch-baseline output
Ruby
4
star
47

cnspec-collection-baselines

DevSec Security Baselines provide battle tested hardening checks for Linux, SSH, nginx, MySQL in cnspec
4
star
48

.github

2
star