-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding discrimination between DC and MS #355
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvement @schnipschnap !
My suggestion would be to re-write this as a variants:
query:
- uid: mondoo-windows-security-network-access-named-pipes-that-can-be-accessed-anonymously-is-set-to-none
title: 'Ensure ''Network access: Named Pipes that can be accessed anonymously'' is set to ''None'''
impact: 100
variants:
- uid: mondoo-windows-security-network-access-named-pipes-that-can-be-accessed-anonymously-is-set-to-none-dc
- uid: mondoo-windows-security-network-access-named-pipes-that-can-be-accessed-anonymously-is-set-to-none-server
docs:
desc: |-
This policy setting determines which communication sessions, or pipes, will have attributes and permissions that allow anonymous access.
The recommended state for this setting is: `<blank>` (i.e. None).
remediation:
- id: default
desc: |-
#### Group Policy Approach
To establish the recommended configuration via GP, set the following UI path to `<blank>` (i.e. None):
```
Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Local Policies\\Security Options\\Network access: Named Pipes that can be accessed anonymously
```
**Impact:**
This configuration will disable null session access over named pipes, and applications that rely on this feature or on unauthenticated access to named pipes will no longer function.
- id: powershell
desc: |
#### PowerShell Approach
To establish the recommended configuration via PowerShell, run the following commands:
```powershell
$RegistryPath = 'HKLM:\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters'
$Name = 'NullSessionPipes'
$Value = ''
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType MultiString -Force
```
- uid: mondoo-windows-security-network-access-named-pipes-that-can-be-accessed-anonymously-is-set-to-none-dc
filters: |
windows.computerInfo.OsProductType == 2
mql: |
registrykey.property( path: 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters', name: 'NullSessionPipes' ).value.downcase == /lsarpc|netlogon|samr/
- uid: mondoo-windows-security-network-access-named-pipes-that-can-be-accessed-anonymously-is-set-to-none-server
filters: |
windows.computerInfo.OsProductType != 2
mql: |
registrykey.property( path: 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters', name: 'NullSessionPipes' ).value == ""
@mm-weber I thought about that but it would be inconsistent with other checks in the same file. I would suggest leaving this for now and then upgrading the whole policy later. What do you think? |
Hey @schnipschnap, we should try to establish new patterns where we can. |
@mm-weber Variants changes applied. Thank you for the assistance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @schnipschnap , just as we discussed yesterday, for now we should keep the -uid
in line with the current policy.
Will look for a solution on how to sync variants:
better in the future.
Co-authored-by: Manuel Weber <112621871+mm-weber@users.noreply.github.com> Signed-off-by: Christian Gross <cgross@mondoo.com>
Co-authored-by: Manuel Weber <112621871+mm-weber@users.noreply.github.com> Signed-off-by: Christian Gross <cgross@mondoo.com>
Co-authored-by: Manuel Weber <112621871+mm-weber@users.noreply.github.com> Signed-off-by: Christian Gross <cgross@mondoo.com>
@mm-weber Every query needs to have a title github complains? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.