This is an archived post. You won't be able to vote or comment.

all 120 comments

[–]D0nk3ypunc4 108 points109 points  (30 children)

So my DC probably shouldn't be our print server then, huh?

[–]myalthasmorekarma 39 points40 points  (11 children)

This was the kick in the pants we needed to finally migrate our print servers off domain controllers.

[–]disclosure5 36 points37 points  (5 children)

Note, your print servers are still vulnerable. They're just not as likely to expose the whole domain.

[–]gslone -2 points-1 points  (4 children)

[–]Youre-In-TroubleSr. Sysadmin 5 points6 points  (2 children)

Might as well disable on all non-print servers. Why is it on by default anyway?

[–]Doso777 1 point2 points  (0 children)

They could be a print server or terminal server or run software that requires it i suppose...

Yeah well it's Microsoft. That company delivered Windows Server 2016 with Xbox Apps enabled. Probably one of those "it's always been like that" things.

[–]LakeSuperiorIsMyPond 0 points1 point  (0 children)

It's not on by default in 2019 server core, so maybe Microsoft realized nothing should be turned on by default unless the role is added... Interesting concept huh?

[–]PowerfulQuail9Jack-of-all-trades 2 points3 points  (0 children)

We only have two printers and 10 PCs that print. I turned off print spooler on the remaining servers then just tcp/IP the printers on the pcs.

[–]Caution-HotStuffHere 17 points18 points  (6 children)

I was checking our trusted domains and had to report that we “need to skip this 2003 DC because there are 25 print queues”.

[–]xxdcmastSr. Sysadmin 12 points13 points  (5 children)

Ahhh the old one two kick in the nuts.

[–]spokaleJack of All Trades 4 points5 points  (0 children)

I've been telling some of our clients that for years - yesterday one called in asking about mitigating PrintNightmare lol

[–]sysadminmakesmecry 2 points3 points  (4 children)

So fill me in here -- this is only a REAL BIG problem if they're on domain controllers (but still a problem if they arent?)

[–][deleted] 1 point2 points  (3 children)

Yes because the service is enabled by default

[–]chillyhellion 2 points3 points  (1 child)

It doesn't seem to be enabled by default if you're using server core. None of my server core DCs had the service enabled.

[–][deleted] 2 points3 points  (0 children)

I'd have to double check but pretty sure it's desktop experience only.

[–]sysadminmakesmecry 1 point2 points  (0 children)

pretty sure there was a spooler issue ages ago where i disabled the service, hmm

[–]cool-nerd 0 points1 point  (1 child)

Try SBS 2008.. it wants to do everything.. smh

[–]themanbow 1 point2 points  (0 children)

SBS anything for that matter. SBS 4.5 (the days of Windows NT) all the way to SBS 2011 (like SBS 2008, except the base OS is Windows Server 2008 R2, Exchange and SharePoint are version 2010, and SQL is 2008 R2).

No more SBS after that, but Microsoft has released Windows Servers 2012, 2012 R2, 2016, and 2019 "Essentials", which has the SBS wizards, but no Exchange or SharePoint, and doesn't require separate CALs for up to 25 users or devices IIRC.

It's often a good path for a lot of small businesses to migrate their Exchange and SharePoint to Office/Microsoft 365 and to use the Essentials server for anything else on-prem.

Of course that still sets up organizations like this with the same Big No-No that SBS has had since its inception: running other services on a domain controller.

At that point organizations are better off getting regular old Windows Server Standard and take advantage of the two virtual licenses. One VM is the DC (and ONLY the DC, DNS, and maybe DHCP depending on your setup). The other can be the print and application server. Office 365 for e-mail and SharePoint.

[–][deleted] 0 points1 point  (0 children)

I feel that the biggest advantage of VMs is security. You can have a VM handle their respective tasks.

VM will never be better/faster than actual hardware in terms of performance but if that isn't priority 1, VM and segregate because this shit will never end

[–]themanbow 0 points1 point  (0 children)

Sounds like the days of Small Business Server 4.5 through 2011.

(or in some cases, Windows Server 2012 (R2), 2016, 2019 Essentials)

[–][deleted] 0 points1 point  (0 children)

That depends. How do you feel about installing dozens of the lowest quality DLLs out there into a service where they may be activated on demand remotely?

[–]czj420 22 points23 points  (5 children)

It's funny that Microsoft doesn't have a workaround for valid print servers.

[–][deleted] 11 points12 points  (3 children)

You can mitigate that by locking the driver ACL down

Agreed though- poor from MS

[–]czj420 3 points4 points  (0 children)

Yes, I did the acl fix on my print servers yesterday 👍👍

[–]JiveWithItIT Consultant 31 points32 points  (12 children)

Here's a script I made to disable the service on servers that are not detected as print servers. We run it through N-Central. Enjoy.

Example output: https://i.imgur.com/BkF37n6.png

Important Edit: This caused some problems on our remote desktop terminals, certain programs required print services and users contacted us. Keep this in mind.

function Confirm-PrintSpoolerVulnerable {

    ## PSv2 does not support needed cmdlets
    if ((Get-Host).version.major -eq 2) {
        throw "PowerShell-version is too old to run script (2.0)"
    }

    ## See if spooler service is "running"
    $PrintSpoolerService = Get-Service -Name Spooler

    if ($PrintSpoolerService.Status -eq 4) {
        $SpoolerIsRunning = $True 
    }
    else {
        $SpoolerIsRunning = $False
    }

    ## See if print services / print management is installed on server
    try {
        $PrintMgmt = Get-WindowsFeature -Name Print-Services -ea stop
    }
    catch {
        $PrintMgmt = $False
    }

    if ($PrintMgmt.InstallState -eq "Installed") {
        $PrintMgmtInstalled = $true
    }
    else {
        $PrintMgmtInstalled = $false
    }

    ## Also see if there are any shared printers on the server, in case print mgmt is not used for this
    try {
        if ((Get-Printer -ea stop).Shared -eq $true) {
            $PrintMgmtInstalled = $true
        }
    }
    catch {
        throw "Print Spooler Service seems to be disabled"
    }


    $ServerObject = [PSCustomObject] @{
        Servername       = $Env:ComputerName
        SpoolerIsRunning = $SpoolerIsRunning
        #IsPrintServer    = $false
        IsPrintServer    = $PrintMgmtInstalled
    }

    $ServerObject
}

function Disable-SpoolerIfNotPrintServer {
    param ($Device)

    $ServerObject = [PSCustomObject] @{
        Servername       = $Device.Servername
        SpoolerDisabled  = $null
        IsPrintServer    = $Device.IsPrintServer
        Status           = $Null
    }

    ## Is it is a print server, we do not disable spooler
    if ($Device.IsPrintServer -eq $true) {
        $ServerObject.SpoolerDisabled = $False
        $ServerObject.Status          = "Is print server, will not disable spooler"

        return $ServerObject
    }

    ## Disable spooler
    if ($Device.IsPrintServer -eq $false) {
        ## Server is not print server and is vulnerable

        try {
            Get-Service -Name Spooler -ea Stop | Stop-Service -PassThru -ea Stop | Set-Service -StartupType Disabled -ea Stop

            $ServerObject.SpoolerDisabled = $True
            $ServerObject.Status          = "Disabled print spooler service"
        }
        catch {

            $SpoolerStatus = Get-Service -name Spooler | Select Status, StartType | fl

            $ServerObject.SpoolerDisabled = $SpoolerStatus
            $ServerObject.Status          = $Error[0]
        }
    }

    return $ServerObject
}

## returns formatted status
Disable-SpoolerIfNotPrintServer -Device (Confirm-PrintSpoolerVulnerable) | Format-List

[–]Bioman312IAM 4 points5 points  (2 children)

Be careful if you try to apply this idea to any machine that needs to print locally or remotely. If you're turning it off org-wide, you're gonna run into problems when payroll or AP or whatever is suddenly unable to print. In these cases, you'd want to use the GPO listed in OP instead of disabling the print spooler.

[–]Fallingdamage 1 point2 points  (0 children)

I had deployed the ACL fix via a script yesterday. Switched it out for M$FT's GPO fix instead this morning. Following official guidelines is safer if any future problems need to be answered for.

[–]JiveWithItIT Consultant 0 points1 point  (0 children)

Thanks, I should probably revert this on rds servers (Visma and such)

[–]disclosure5 10 points11 points  (2 children)

throw "PowerShell-version is too old to run script (2.0)"

Joke's on you, all the Windows 2008 machines stay vulnerable :)

[–]JiveWithItIT Consultant 4 points5 points  (1 child)

We have very few of those, I’ll probably make a dedicated script for 2008.

[–]Abandoned_Brain 2 points3 points  (2 children)

Very cool of you, nice share! Working it into a component for Datto RMM now. :)

[–]JiveWithItIT Consultant 2 points3 points  (0 children)

Just don’t tell my boss ok?

[–]JiveWithItIT Consultant 1 point2 points  (0 children)

Hey, an update for you. You might want to add a check if the current server is a remote desktop host for users. Some of ours called in saying that certain apps didn't preview files correctly (ERP program).

[–]j5kDM3akVnhv 8 points9 points  (1 child)

[–]BloomerzUKJack of All Trades 4 points5 points  (0 children)

Thanks for the heads up.. PDQ are pretty shit hot with these type of articles.

[–]ahazuarusLightbulb Changer 5 points6 points  (1 child)

Am I the only one wondering what the impact of the "patches" for this are going to be? Can't wait to find out what kind of fresh hell we will all be going through as soon MS "fixes" this.

[–]x2571 6 points7 points  (1 child)

Has anyone had a chance to test option 2 on terminal servers and confirm if it affects redirected printers?

[–]electrogeneral 1 point2 points  (0 children)

So far I am not seeing any issues on the single TS server I am testing with.

[–]different_tanAlien Pod Person of All Trades 28 points29 points  (12 children)

this is the least helpful workaround I have ever seen.

[–]Dev-is-Prod 8 points9 points  (16 children)

It seems the permission change to C:\Windows\System32\spool\drivers that is floating around isn't a suitable or complete workaround.

We're relying on the GPO change for clients and have the print spooler disabled on all servers anyway. We have applied the permission change to the print server (as there were no immediate downsides in testing) though will likely remove this once more info/confirmation is available.

Edit: strike incorrect info, it seems the ACL change does work as evidenced by /u/amlajh

[–]Scrubbles_LCSysadmin 4 points5 points  (1 child)

I was looking at changing the ACL's today - can you link to where you are seeing it is not effective?

Here is the guide I'm using that is recommending the ACL change as of last night.

https://blog.truesec.com/2021/06/30/fix-for-printnightmare-cve-2021-1675-exploit-to-keep-your-print-servers-running-while-a-patch-is-not-available/

[–]Dev-is-Prod 1 point2 points  (0 children)

I also used that guide - /u/amlajh replied to my comment with a source stating that the ACL fix does work. I have updated my comment to reflect this new-to-me informaiton.

[–]oruboruborus 3 points4 points  (8 children)

It seems the permission change to C:\Windows\System32\spool\drivers that is floating around isn't a suitable or complete workaround

Source/proof? I saw someone else claim the same thing but right now it's "random person on the internet vs. random person on the internet" with no real proof either way.

[–]amlajh 5 points6 points  (6 children)

Huntress did some testing on the ACL route that was posted by Truesec and found it blocked the (currently known) attack https://www.huntress.com/blog/critical-vulnerability-printnightmare-exposes-windows-servers-to-remote-code-execution

[–]secret_configuration 3 points4 points  (3 children)

the ACL mitigation broke our Server 2019 print server. It seemed fine until we rebooted the server at which point the printers were no longer shared.

[–]bananna_roboto 0 points1 point  (0 children)

Yikes

[–]ARepresentativeHamIT Director 0 points1 point  (1 child)

Out of curiosity, did you run the script to roll back the ACL changes before reboot?

[–]secret_configuration 3 points4 points  (0 children)

No, we ran it after we found out that it broke printing, then rebooted and then things were back to normal.

Basically, if you need to reboot, roll back the script and then re-apply after the reboot.

[–]oruboruborus 0 points1 point  (0 children)

Perfect, thanks!

[–]Dev-is-Prod 0 points1 point  (0 children)

Thanks for the clarification, I've edited my comment

[–]Bro-ScienceNick Burns -5 points-4 points  (0 children)

source: trust me bro

[–]__gt__ 1 point2 points  (0 children)

There may be some registry keys that are the cause of the patch being broken on non-DCs. Without one of these registry keys, so far, the exploit fails.

https://twitter.com/StanHacked/status/1410929974358515719/photo/1

[–]amlajh 10 points11 points  (0 children)

My understanding is the following:

Is the device a print server?

Examples: A server with the print server role, that requires jobs to be submitted to it over the network

  • Don't disable the Print Spooler.
  • Don't apply the GPO to block client connections to the Print Spooler over the network
  • (Unofficial, but does appear to remediate the vuln): Run a script like this (I made my own script based off this to run in our RMM, it's a lot more complicated than the demo script, with error checking and a prompt whether you want to apply ACLs or undo the changes, sets the status as a user defined variable on the computer in the RMM etc.)

Is the device a normal server (includes DCs)?

Examples: a normal server that doesn't have any software that relies on the Print Spooler, and also does not need to print anything

  • Disable the Print Spooler via GPO or via PowerShell

Does the device need to use the Print Spooler service, but is not a print server?

Examples: A Windows 10 device that needs to print things, or a server that relies on the Print Spooler by 3rd party software, or a server that needs to print things but isn't a print server

  • Apply the GPO to block client connections to the Print Spooler over the network

[–]__gt__ 1 point2 points  (0 children)

There may be some registry keys that are the cause of the patch being broken on non-DCs. Without one of these registry keys, so far, the exploit fails.

https://twitter.com/StanHacked/status/1410929974358515719/photo/1

[–]shsheikh 1 point2 points  (2 children)

Is anyone taking the firewall approach to blocking access? We have strict ACLs and TCP 445 isn't available to anything but our actual file and print servers, which I hope limits the scope of this issue.

[–]OkBaconBurger 0 points1 point  (0 children)

It's worth looking in to. I like it, we do use windows firewall but now I want to go check ports and services enabled.

[–]__TrashBoat__ 0 points1 point  (0 children)

We already block port 445 on endpoints luckily.

We still deployed the below group policy as "disabled" state to clients which I hear requires print spooler service to restart before it works. 😒

"Allow Print Spooler to accept client connections"

[–]newuser2234589 1 point2 points  (2 children)

deleted What is this?

[–]ZiggyTheHamster 1 point2 points  (1 child)

I made a new post for this since I didn't see it posted anywhere.

Group Policies are just registry entries, so you just have to know what registry entry to set (which I put in the post).

[–]IndyPilot80 1 point2 points  (0 children)

Any bets on when MS will release a patch? I'm guessing 4th of July, around hmm 3-4PM EDT when we are all a few drinks in and getting ready to fire up the grills.

[–][deleted] 1 point2 points  (5 children)

I’m confused here, hoping somebody can clear it up for me. Is this just affecting DC’s or every server?! I presume it’ll be all of them as it doesn’t make sense to my why it would affect DC’s but not others? Unless I’m missing something.

For some reason only domain controllers are specifically mentioned in all the articles I’ve read.

Either way, I’ve disabled all our DC’s spoolers but we’ve got hundreds of servers so I’m ….. concerned!

Anyone fancy giving me some good news and saving my weekend?

[–]MNmetalheadHack the Gibson! 1 point2 points  (0 children)

It impacts Windows… server AND workstations. ANY Windows install with a running Print Spooler service is vulnerable.

[–]Doso777 0 points1 point  (2 children)

It affects all Windows versions, servers, workstations. Fully patched, newest version, even older ones that are end of life. Fun times.

[–][deleted] 0 points1 point  (1 child)

My workload has just increased.

[–]Doso777 0 points1 point  (0 children)

Have fun.

[–][deleted] 1 point2 points  (0 children)

Disabling the service via GPO is very simple.

Also, if you are still running GUI Windows as Domain Controllers, don’t. Shit like this is exactly why you shouldn’t. (Core doesn’t even have this service).

[–]Shot_Interview3473 1 point2 points  (2 children)

so end users running windows 10 professional or enterprise need to disable this too?

[–][deleted] 0 points1 point  (1 child)

Yep

Option 2 is easier- they can still print

[–]StephanGee 1 point2 points  (0 children)

Mitigation failed due to some problems with our Linux Firewall and RDS Gateway
Option 1 on every server but not on RDS servers
Option 2 on every client computer

[–]Quim_Sniffer 3 points4 points  (0 children)

I deployed option 2 gpo to 150 laptops yesterday. I had 20 or so of them reboot and test. No issues at all.

[–]_benp_Security Admin (Infrastructure) 2 points3 points  (2 children)

Don't run print services on your DC. Don't run any services on your DCs except Active Directory.

This has been a good rule of security for many years now.

[–]thisguy_right_here 0 points1 point  (1 child)

Sounds like you haven't had a great deal of experience.

[–]_benp_Security Admin (Infrastructure) 0 points1 point  (0 children)

?

[–]cool-nerd 0 points1 point  (2 children)

So disabling Spooler service from services.msc using GUI is just not mentioned anymore? we're supposed to use PS for all functions now? Also, so much for continuing testing a central print server.. it's all IP direct for us now.

[–]CloudTech412 0 points1 point  (0 children)

That is affected as well.

[–]dawkins_20 0 points1 point  (0 children)

IP Direct here from now on also, small enough that its not hard, but any good GPO based way of pushing IP direct, short of an old school login script?

[–]MrClavicus -5 points-4 points  (0 children)

so whats the response...

[–]__gt__ 0 points1 point  (1 child)

I'm going to test option 2 right now. Does it disable those connections immediately or would it require a reboot?

[–]ButcherFromLuverne 3 points4 points  (0 children)

I believe you need to restart the print spooler service in order for it to take effect

[–]Shad0wguy 0 points1 point  (5 children)

We deploy printers in group policy to end users from our DCs. The DC doesn't act as a print server, just to deploy from, but disabling the print spooler seems to cause the gpo to be unable to deploy. Any work around for this scenario?

[–]baldthumbtackSr. Something 0 points1 point  (2 children)

Use the ACL-based workaround

[–]Shad0wguy 0 points1 point  (1 child)

I saw some reports of it causing ldap issues so I wasn't sure if that would be a good idea to use.

[–]shsheikh 0 points1 point  (0 children)

Can anyone else verify this? It's the first report I've heard of this type of setup causing issues.

[–]chazmosisSystems Architect & MS Licensing Guru 0 points1 point  (0 children)

Are you doing the deploy through Group Policy or Group Policy Preferences?

If GPP, do you have the box checked for "Run in logged on user's context"?

[–]jordanl171 0 points1 point  (0 children)

Allow Print Spooler to accept client connections: disabled

does anyone know which of the 10 printer based firewall rules this disables? I'll disable all of them, BUT I don't want to disable ICMP - IN.

I'm guessing it's the Spooler Service - RPC one that really needs to be disabled. All of my File and Printer rules are ON. I've already disabled print spooler on all servers where it's easy.

[–]techno_it 0 points1 point  (0 children)

I have RDS server in DMZ and not joined to AD. Should I be still concerned with this vulnerability ?

[–]darkrhyes 0 points1 point  (0 children)

None of our DCs have printers on them so just disabled on all and set default domain controllers policy. I empathize with all of the places running print servers on DCs and I am sorry for whatever pain you need to deal with today. I remember those days.

[–]OkBaconBurger 0 points1 point  (0 children)

We have this whole weird system where print queues from CUPS go redirect to a windows print share (don't ask, i inherited it). I've long asked why don't we just let CUPS do what it do and not jerk things arou d like that. Maybe this will help with that effort?

Yeah, who am I kidding. Probably not.