The patched version of spoolsv for #PrinterNightmare is interesting. The call to YIsElevated seems to be an admin check is disguise, basically only admins can open the process token for TOKEN_QUERY, which if fails will return FALSE even if the process token is elevated.
It'll then check if elevation is required from the NoWarningNoElevationOnInstall is enabled. If YIsElevated returns FALSE and YIsElevationRequired returns TRUE then it's based on the result of RunningAsLUA.
This is where the impersonation token is checked. If the caller's token is a Limited token then the result is TRUE. If a Full token it's FALSE. However if it's a Default token (which is what you get as a network token) it's based on the value of elevation.
And their is the bug, because the caller is from the network it gets a Default token. As the caller is also by in the 2000 compat group the token is considered elevated, therefore the 0x8000 isn't unset.
Setting NoWarningNoElevationOnInstall should enable the bug again. Also if for some reason the caller has access TOKEN_QUERY access to the spooler service's token that's also a bypass. You could also bypass locally on Win8 I think but it would effectively by a UAC bypass ;-)
One more fun finding, if you're the type of person to disable UAC completely (not just turning off the prompting, but totally disabled) then the "fix" also breaks. Perhaps this is why some people see it working on their test machines?

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with James Forshaw

James Forshaw Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(