├── .gitattributes ├── .gitignore ├── 01 - Active Directory ├── README.md └── shadowGroups.ps1 ├── 02 - Local users and groups └── README.md ├── 03 - Logon Restrictions └── README.md ├── 04 - Deploy Software ├── InstallLAPS.ps1 ├── README.md ├── installCmder.ps1 ├── installHyperV.ps1 ├── installMBAM.ps1 ├── installNmap.ps1 ├── installRSAT.ps1 ├── installSysinternals.ps1 └── installVIClient.ps1 ├── 05 - Allow Fingerprint Sign-in └── README.md ├── README.md ├── xx - Antivirus └── README.md ├── xx - AppLocker ├── README.md └── applocker.xml ├── xx - Authentication Policies and Silos └── README.md ├── xx - Baselines ├── CIS Baseline checklist.xlsx └── README.md ├── xx - BitLocker └── README.md ├── xx - Just enough Administration (JEA) └── README.md ├── xx - Just in Time Administration (JITA) └── README.md ├── xx - LAPS ├── README.md ├── Step by Step Guide to Deploy Microsoft LAPS.pdf └── installLAPS.ps1 ├── xx - UAC Settings └── README.md ├── xx - User Proxy ├── README.md └── proxy.pac └── xx - Windows Firewall with Advanced Security and IPSec Domain Isolation ├── README.md ├── firewall_2016.wfw ├── firewall_ipsec_ca.wfw ├── firewall_ipsec_dc.wfw ├── firewall_ipsec_radius.wfw ├── firewall_ipsec_tier0.wfw ├── firewall_ipsec_tier1.wfw ├── firewall_ipsec_tier2.wfw ├── firewall_paw.wfw └── firewall_win10.wfw /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *.cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | local_settings.py 55 | 56 | # Flask stuff: 57 | instance/ 58 | .webassets-cache 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # Jupyter Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # SageMath parsed files 79 | *.sage.py 80 | 81 | # Environments 82 | .env 83 | .venv 84 | env/ 85 | venv/ 86 | ENV/ 87 | 88 | # Spyder project settings 89 | .spyderproject 90 | .spyproject 91 | 92 | # Rope project settings 93 | .ropeproject 94 | 95 | # mkdocs documentation 96 | /site 97 | 98 | # mypy 99 | .mypy_cache/ 100 | -------------------------------------------------------------------------------- /01 - Active Directory/README.md: -------------------------------------------------------------------------------- 1 | ## Shadow Groups 2 | If you want to use Shadow Groups to aide in managing your devices, you will need to keep your PAW devices separate from your day-to-day devices. This means a separate OU for your PAW devices and a separate OU for all your other workstations. 3 | 4 | What are Shadow Groups? 5 | 6 | Shadow Groups are groups that mirror the membership of an Active Directory OU. If you have ever administrated a Novel Netware network, you will recall that you can apply the membership of an OU to a network object's ACL. Thus, giving access to an object based on the users in an OU. Active Directory does not allow you to add OUs to ACLs. Thus, if we wanted to replicate this behavior in AD, we need shadow groups. With shadow groups you now have all members of each department in a group. All departmental computers in their own groups. All laptops in their own groups. All Tablets in their own groups... 7 | 8 | What else can you do with Shadow Groups? 9 | 10 | * Apply GPO security filtering to shadow groups rather than **Authenticated Users**. Now you can apply the GPO to a higher level OU, and have it apply to only certain child OUs without the need for complicated WMI filters. 11 | * More effectively manage NPS 802.1x policies. 12 | * Quicker reporting for auditors. All employees are in thier own group, filtering out things like service accounts, contacts, and contractors which are members of the **Domain Users** group. Same for computers and the **Domain Computers** group. 13 | * Rule the world 14 | 15 | How are Shadow Groups managed? 16 | 17 | A scheduled task runs on a regular interval and creates groups based on your Active Directory OU hierarchy. It then takes the members of the OU and adds them as members of the group. Lastly, it removes group members that may have moved to a different OU, keeping your group membership accurate. 18 | 19 | ## Recommended Active Directory Hierarchy 20 | ``` 21 | DOMAIN.COM 22 | ├── Domain Controllers 23 | └── Company 24 | ├── Computers 25 | │ ├── Disabled-Computers - - - Will hold all disabled computer accounts 26 | │ └── Location A 27 | │ ├── PAW 28 | │ │ ├── Tier 0 - - - - Will hold Tier 0 PAWs (for domain admins) 29 | │ │ ├── Tier 1 - - - - Will hold Tier 1 PAWs (for server admins) 30 | │ │ └── Tier 2 - - - - Will hold Tier 2 PAWs (for helpdesk admins) 31 | │ ├── Servers 32 | │ │ ├── Tier 0 - - - - Will hold Tier 0 servers (but not DCs!) 33 | │ │ └── Tier 1 - - - - Will hold Tier 1 servers (most member servers) 34 | │ └── Workstations - - - - Will hold all Computer accounts. Feel free to organize your own hierarchy. For this example, we use \ 35 | │ ├── Laptops - - - - Laptops 36 | | | └── Departments - Department Specific OUs. Have one for every department 37 | │ ├── Desktops - - - - Desktops 38 | | | └── Departments - Department Specific OUs. Have one for every department 39 | │ └── VMs - - - - All VMs, including your PAW's day-to-day VM 40 | | └── Departments - Department Specific OUs. Have one for every department 41 | ├── Groups 42 | │ └── Security Groups 43 | │ ├── PAW - - - - All groups related to PAW management 44 | │ ├── Shadowgroups-Computers - - - Computer object's shadowgroups 45 | │ ├── Shadowgroups-Servers - - - - Server object's shadowgroups 46 | │ └── Shadowgroups-Users - - - - - User's object's shadowgroups 47 | └── Users 48 | ├── Employees - - - - Will hold all Employee accounts. Feel free to organize your own hierarchy. For this example, we use \ 49 | │ └── Location - - - - Each office location will have its own OU 50 | │ └── Department - - - Each department will hold the user accounts for that department 51 | ├── Disabled-Users - - - - Will hold all disabled user accounts 52 | ├── ServiceAccounts - - - - Will hold all service accounts, and special use accounts (like accounts that run scheduled tasks) 53 | └── PAW Accounts 54 | ├── Tier 0 - - - - Will hold Tier 0 user accounts (for domain admins) 55 | ├── Tier 1 - - - - Will hold Tier 1 user accounts (for server admins) 56 | └── Tier 2 - - - - Will hold Tier 2 user accounts (for helpdesk admins) 57 | ``` 58 | ## Active Directory Permissions 59 | The shadowgroup.ps1 script will be run by a standard user account which must be given the explicit permissions listed below. Modify AD Advanced Security Permissions of the following OUs (should probably be scripted in the future...) 60 | 61 | ***COMPANY.COM\Company\Computers*** 62 | * ACL 1 63 | * Principal: **AD-Company-Computers--DeleteComputerObjects** 64 | * Type: **Allow** 65 | * Applies to: **Descendant Computer Objects** 66 | * Properties: **Write Name, and Write name (capitol and lower case N & n)** 67 | * ACL 2 68 | * Principal: **AD-Company-Computers--DeleteComputerObjects** 69 | * Type: Allow 70 | * Applies to: **This object and all descendant Objects** 71 | * Permissions: **Delete Computer objects** 72 | * ACL 3 73 | * Principal: **AD-Company-Computers--DeleteComputerObjects** 74 | * Type: **Allow** 75 | * Applies to: **Descendant Computer Objects** 76 | * Permissions: **Read all properties** 77 | 78 | ***COMPANY.COM\Company\Users\Employees*** 79 | * ACL 1 80 | * Principal: **AD-Company-Users--DeleteUserObjects** 81 | * Type: **Allow** 82 | * Applies to: **Descendant User Objects** 83 | * Properties: **Write Name, and Write name (capitol and lower case N & n)** 84 | * ACL 2 85 | * Principal: **AD-Company-Users--DeleteUserObjects** 86 | * Type: **Allow** 87 | * Applies to: **This object and all descendant objects** 88 | * Permissions: **Delete user objects** 89 | * ACL 3 90 | * Principal: **AD-Company-Users--DeleteUserObjects** 91 | * Type: **Allow** 92 | * Applies to: **Descendant User Objects** 93 | * Properties: **Read all properties** 94 | 95 | ***COMPANY.COM\Company\Computers\Disabled-Computers*** 96 | * ACL 1 97 | * Principal: **AD-Company-Computers-DisabledComputers--CreateComputerObjects** 98 | * Type: **Allow** 99 | * Applies to: **This object and all descendant objects** 100 | * Permissions: **Create Computer objects** 101 | * ACL 2 102 | * Principal: **AD-Company-Computers-DisabledComputers--CreateComputerObjects** 103 | * Type: **Allow** 104 | * Applies to: **This object and all descendant objects** 105 | * Permissions: **List contents, Read all properties, write all properties, read permissions** 106 | 107 | ***COMPANY.COM\Company\Groups\SecurityGroups\ShadowGroups-Computers*** 108 | * ACL 1 109 | * Principal: **AD-Company-Groups-ShadowGroupsComputers--Modify** 110 | * Type: **Allow** 111 | * Applies to: **This object and all descendant objects** 112 | * Permissions: **Create Group objects, Delete Group objects** 113 | * ACL 2 114 | * Principal: **AD-Company-Groups-ShadowGroupsComputers--Modify** 115 | * Type: **Allow** 116 | * Applies to: **Descendant Group objects** 117 | * Permissions: **Full control** 118 | 119 | ***COMPANY.COM\Company\Groups\SecurityGroups\ShadowGroups-Servers*** 120 | * ACL 1 121 | * Principal: **AD-Company-Groups-ShadowGroupsServers--Modify** 122 | * Type: **Allow** 123 | * Applies to: **This object and all descendant objects** 124 | * Permissions: **Create Group objects, Delete Group objects** 125 | * ACL 2 126 | * Principal: **AD-Company-Groups-ShadowGroupsServers--Modify** 127 | * Type: **Allow** 128 | * Applies to: **Descendant Group objects** 129 | * Permissions: **Full control** 130 | 131 | ***COMPANY.COM\Company\Groups\SecurityGroups\ShadowGroups-Users*** 132 | * ACL 1 133 | * Principal: **AD-Company-Groups-ShadowGroupsUsers--Modify** 134 | * Type: **Allow** 135 | * Applies to: **This object and all descendant objects** 136 | * Permissions: **Create Group objects, Delete Group objects** 137 | * ACL 2 138 | * Principal: **AD-Company-Groups-ShadowGroupsUsers--Modify** 139 | * Type: **Allow** 140 | * Applies to: **Descendant Group objects** 141 | * Permissions: **Full control** 142 | 143 | ***COMPANY.COM\CompanyUsers\Disabled-Users*** 144 | * ACL 1 145 | * Principal: **AD-Company-Users-DisabledUsers--CreateUserObjects** 146 | * Type: **Allow** 147 | * Applies to: **This object only** 148 | * Permissions: **Create User objects** 149 | * ACL 2 150 | * Principal: **AD-Company-Users-DisabledUsers--CreateUserObjects** 151 | * Type: **Allow** 152 | * Applies to: **This object and all descendant objects** 153 | * Permissions: **Full control** 154 | ## Users 155 | 156 | ### Each Domain Admin will have the following accounts: 157 | * **Normal domain user account**: used for logging into the Tier 0 PAW. Will escalate to local admin to do admin stuff. Also logs into the PAW VM to do day-to-day tasks. 158 | * **Tier 0 Admin**: Member of domain admins, the normal domain account elevates to this account to admin stuff on Tier 0 servers. 159 | * **Tier 1 Admin**: Used to allow the user to RDP to Tier 1 member servers using /RemoteCredentialGuard. Normal domain user also uses this to elevate certain remote management consoles (RSAT/Server Manager) to manage remote Tier 1 servers. 160 | * **Tier 2 Admin (optional)**: If the user will ever administrate workstations, they will need this account. Used to allow the user to RDP to remote workstations using /RemoteCredentialGuard. Normal domain user also uses this to elevate certain remote management consoles (MMC) to manage remote workstations. 161 | * **Local user account**: Used as a contingency for any lost domain trusts. In other words, if you fubar the domain and you can no longer log in to your PAW, this is the account you would use. 162 | * **Local administrator account**: This account will be managed by LAPS. Also used for fixing domain trust issues. You would login with the local user account and elevate to this account to do admin stuff. 163 | * **Access to server LAPS accounts**. They can use this if RDP with /RestrictedAdmin is too restrictive. 164 | 165 | ### Each server administrator will have: 166 | * **Normal domain user account**: used for logging into the Tier 1 PAW. Will escalate to local admin to do admin stuff. Also logs into the PAW VM to do day-to-day tasks. 167 | * **Tier 1 Admin**: Used to allow the user to RDP to Tier 1 member servers using /RemoteCredentialGuard. Normal domain user also uses this to elevate certain remote management consoles (RSAT/Server Manager) to manage remote Tier 1 servers. 168 | * **Local user account**: Used as a contingency for any lost domain trusts. In other words, if you fubar the domain and you can no longer log in to your PAW, this is the account you would use. 169 | * **Local administrator account**: This account will be managed by LAPS. Also used for fixing domain trust issues. You would login with the local user account and elevate to this account to do admin stuff. 170 | * **Access to server LAPS accounts**. They can use this if RDP with /RestrictedAdmin is too restrictive. 171 | 172 | ### Each Helpdesk user will have: 173 | * **Normal domain user account**: used for logging into the Tier 1 PAW. Will escalate to local admin to do admin stuff. Also logs into the PAW VM to do day-to-day tasks. 174 | * **Tier 2 Admin**: Normal domain user uses this to elevate certain remote management consoles (MMC) to manage remote workstations. 175 | * **Local user account**: Used as a contingency for any lost domain trusts. In other words, if you fubar the domain and you can no longer log in to your PAW, this is the account you would use. 176 | * **Local administrator account**: This account will be managed by LAPS. Also used for fixing domain trust issues. You would login with the local user account and elevate to this account to do admin stuff. 177 | * **Access to all workstation LAPS accounts**. They can use this if RDP with RA is too restrictive. 178 | 179 | ***NOTE***: *Helpdesk should never use this with /RemoteCredentailGuard. This is because if an RDP session is initiated to a compromised client that an attacker already controls, the attacker could use that open channel to create sessions on the user's behalf (without compromising credentials) to access any of the user’s resources for a limited time (a few hours) after the session disconnects. [(Source)](https://docs.microsoft.com/en-us/windows/access-protection/remote-credential-guard)* 180 | 181 | ## Groups 182 | The following groups must be created in Company > Groups > SecurityGroups > RBAC-PAW. The sub-bullet point are the members of the specified group. 183 | 184 | **PAW-AllPAW-Computers** - Members of this group include all PAW Tier groups. It is a collection of all PAW machines. 185 | * PAW-Tier0-Computers 186 | * PAW-Tier1-Computers 187 | * PAW-Tier2-Computers 188 | 189 | **PAW-BlockPowershell** - Members of this group are blocked from using PowerShell via GPO. 190 | * PAW-Users 191 | 192 | **PAW-BlockLocalLogon** - Members of this group are not literally blocked from logging in locally, but rather from running certain applications via the AppLocker GPO after they have logged in. 193 | * PAW-Admins 194 | 195 | **PAW-Azure-Admins** - Members of this group are permitted to connect to pre-identified cloud services via Privileged Access Workstations 196 | * not sure yet. 197 | 198 | **PAW-Tier0-Admins** - Members of this group are Tier 0 server admins. 199 | * All members of the Company\Users\PAW Accounts\Tier 0 OU 200 | 201 | **PAW-Tier0-Computers** - Members of this group are Tier 0 PAWs. Used mainly for GPO filtering. 202 | * All Tier 0 PAWs 203 | 204 | **PAW-Tier0-Users** - Members of this group are tier 0 PAW users. They can log into Tier 0 PAWs. They are a normal user account on PAWs that use the Tier 0/1/2 Admin accounts to elevate certain tasks. 205 | * All domain user accounts that need to log into Tier 0 PAWs 206 | 207 | **PAW-Tier1-Admins** - Members of this group are Tier 1 server admins. 208 | * All members of the Company\Users\PAW Accounts\Tier 1 OU 209 | 210 | **PAW-Tier1-Computers** - Members of this group are Tier 1 PAWs. Used mainly for GPO filtering. 211 | * All Tier 1 PAWs 212 | 213 | **PAW-Tier1-Users** - Members of this group are tier 1 PAW users. They can log into Tier 1 PAWs. They are a normal user account on PAWs that use their Tier 1 Admin account to elevate certain tasks. 214 | * All domain user accounts that need to log into Tier 0 PAWs 215 | 216 | **PAW-Tier2-Admins** - Members of this group are Tier 2 server admins. 217 | * All members of the Company\Users\PAW Accounts\Tier 2 OU 218 | 219 | **PAW-Tier2-Computers** - Members of this group are Tier 2 PAWs. Used mainly for GPO filtering. 220 | * All Tier 2 PAWs 221 | 222 | **PAW-Tier2-Users** - Members of this group are tier 2 PAW users. They can log into Tier 2 PAWs. They are a normal user account on PAWs that use the Tier 2 Admin accounts to elevate certain tasks. 223 | * All domain user accounts that need to log into Tier 0 PAWs 224 | 225 | **PAW-Users** - Members of this groups include all the Tier 0, 1, and 2 Users 226 | * PAW-Tier0-Users 227 | * PAW-Tier1-Users 228 | * PAW-Tier2-Users 229 | 230 | **PAW-Admins** - Members of this groups include all the Tier 0, 1, and 2 Admins 231 | * PAW-Tier0-Admins 232 | * PAW-Tier1-Admins 233 | * PAW-Tier2-Admins 234 | 235 | ## Additional Resources 236 | For more information on what accounts count as Tier 0, see [Microsoft's recommendations here](https://docs.microsoft.com/en-us/windows-server/identity/securing-privileged-access/securing-privileged-access-reference-material#T0E_BM). 237 | -------------------------------------------------------------------------------- /02 - Local users and groups/README.md: -------------------------------------------------------------------------------- 1 | ## What is this? 2 | This is one of those rare security controls that grants security AND adds usability. PAW security is enhanced when you control the membership of local groups via Group Policy. You enforce membership in the local admin group. It also increases ease in usability because you are automating a process that would otherwise have to be done manually. 3 | 4 | ## Local Users 5 | Create the following accounts on each PAW: 6 | * **a local user account** - used as a backup in case any domain trust issues occur that knock the computer off the domain. It must be a standard user because local admins cannot log in. Only elevate. When using fingerprints, this will be their left hand “index finger”. 7 | * **a local admin account (Separate from Default Local Admin)** - PAW user will use this account for all administrative purposes. When using fingerprints, this will be their left hand “middle finger”. We don't want to use the default local admin because that password will change every 30 days via LAPS. 8 | 9 | These accounts will only be used if domain trust issues happen and a user cannot log into their PAW with their domain account. Because of the logon restrictions we will place on PAWs, local admin accounts will not be able to logon. 10 | 11 | ## Group Policy 12 | Create a new GPO on the DOMAIN.COM\Company\Computers OU called **Security - Local Groups - PAW** with the following settings: 13 | 14 | ***Computer Configuration > Preferences > Control Panel Settings > Local Users and Groups*** 15 | 16 | Create the following new groups 17 | 18 | * Administrators (built-in) - You will add a new one of these for every PAW user that needs local admin on their PAW 19 | * Order: **1** 20 | * Action: **Update** 21 | * Description: **Rich's PAW Local Admins** 22 | * Delete all users and groups: **Unchecked** 23 | * Members: 24 | * **.admin** - The account you created in the Local Users section above 25 | * **DOMAIN\user.t0** - The tier 0 account belonging to the PAW user 26 | * **DOMAIN\user.t1** - The tier 1 account belonging to the PAW user 27 | * **DOMAIN\user.t2** - The tier 2 account belonging to the PAW user 28 | 29 | * Item-level targeting 30 | * The NetBIOS computer name is