• This repository has been archived on 17/Nov/2020
  • Stars
    star
    145
  • Rank 254,144 (Top 6 %)
  • Language
    Ruby
  • Created over 7 years ago
  • Updated almost 4 years ago

Reviews

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

Repository Details

This Ansible role provides windows hardening configurations for the DevSec Windows baseline profile.

windows-hardening (Ansible Role)

Attention: This role has been migrated to our hardening-collection:

Please open any issues and pull requests there!

Requirements

  • Ansible 2.3.0

Variables

Name Default Value Description
win_security_PasswordComplexity 1 Flag that indicates whether the operating system MUST require that passwords meet complexity requirements. Default: True
win_security_LockoutBadCount 4 Number of failed logon attempts after which a user account MUST be locked out. Default: 4
win_security_ResetLockoutCount 15 Number of minutes after a failed logon attempt that the account MUST be locked out. Default: 15 minutes
win_security_LockoutDuration 15 The number of minutes that a locked-out account MUST remain locked out before automatically becoming unlocked. Default: 15 minutes
win_security_SeRemoteInteractiveLogonRight *S-1-5-32-544 Determines which users or groups can access the logon screen of a remote computer through a RDP connection. Default: Administrators
win_security_SeTcbPrivilege *S-1-0-0 Allows a process to authenticate like a user and thus gain access to the same resources as a user. Default: Nobody
win_security_SeMachineAccountPrivilege *S-1-5-32-544 Allows the user to add a computer to a specific domain. Default: Administrators
win_security_SeTrustedCredManAccessPrivilege `` Access Credential Manager as a trusted caller policy setting is used by Credential Manager during backup and restore. Default: No One
win_security_SeNetworkLogonRight *S-1-0-0 Required for an account to log on using the network logon type. Default: Nobody

Example Playbook

    - hosts: localhost
      roles:
        - dev-sec.windows-hardening

Local Testing

For all our tests we use test-kitchen. If you are not familiar with test-kitchen please have a look at their guide.

We create multiple hosts - one linux host where Ansible runs on and the Windows hosts.

Next install test-kitchen:

# Install dependencies
gem install bundler
bundle install

Then you can run the playbook and tests:

# create the ansible and windows hosts
bundle exec kitchen create

# run ansible playbook on windows host
bundle exec kitchen converge default-ansibleserver

# verify windows machines
bundle exec kitchen verify windows

Contributing

See contributor guideline.

License and Author

  • Author:: Sebastian Gumprich

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

windows-baseline

DevSec Windows Baseline - InSpec Profile
Ruby
218
star
11

ansible-nginx-hardening

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

chef-ssh-hardening

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

cis-dil-benchmark

CIS Distribution Independent Linux Benchmark - InSpec Profile
Ruby
146
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