dsccommunity / dsccommunity/NetworkingDsc

Firewall: If Builtin rule does not exist than a wide open rule gets created

Open
#422 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
PowerShell
Stars
235
Forks
93
PR merge metrics
No merged PRs in 30d

Description

Details of the scenario you tried and the problem that is occurring

If you try to enable a predefined rule that does not already exist than instead you end up with a wide open rule permitting all traffic inbound.

This could potentially cause security holes to someone that does not notice.

Firewall export of the rule as CSV
RemoteFwAdmin-In-TCP,,All,Yes,Allow,No,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,

Verbose logs showing the problem
Suggested solution to the issue

Perhaps send an error to the user indicating that the builtin rule they are trying to use does not exist and do not create a wide open rule.

The DSC configuration that is used to reproduce the issue (as detailed as possible)
Configuration Firewall_EnableBuiltInFirewallRule_Config
{
    Import-DSCResource -ModuleName NetworkingDsc

    Node localhost
    {
        Firewall EnableBuiltInFirewallRule
        {
            Name                  = 'RemoteFwAdmin-In-TCP'
            Ensure                = 'Present'
            Enabled               = 'True'
        }
    }
}

# insert configuration here

instance of MSFT_Firewall as $MSFT_Firewall51ref
{
ResourceID = "[Firewall]RemoteFwAdmin-In-TCP";
Enabled = "True";
Ensure = "Present";
Name = "RemoteFwAdmin-In-TCP";
ModuleName = "NetworkingDSC";
ModuleVersion = "7.3.0.1";

};

The operating system the target node is running

OsName : Microsoft Windows Server 2016 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsBuildLabEx : 14393.3204.amd64fre.rs1_release.190830-1500
OsLanguage : en-US
OsMuiLanguages : {en-US}

Version and build of PowerShell the target node is running

Name Value


PSVersion 5.1.14393.3053
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3053
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

ModuleName = "NetworkingDSC";
ModuleVersion = "7.3.0.1"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Firewall resource in NetworkingDsc and run the supplied PowerShell DSC configuration for the missing RemoteFwAdmin-In-TCP built-in rule. Trace how a nonexistent rule is handled; done means the configuration reports an error and does not create a wide-open inbound rule.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.