-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
Windows Update Service Solution #677
Comments
Simplewall can detect services, as far as I remember, but they have to be run in separate process. Although I would assume that one wants to use firewall precisely to stop updates from being forced on them... :) I must say I'm growing more and more depressed seeing that one cannot rely on "personal firewalls" to disable all unauthorized network traffic. Every firewall seems to have a hole in them. |
You misunderstand the problem, WFP supports creating rules by AppContainer SID ( The problem is that when you add the You can verify this like so:
Now create a firewall rule to block Outbound traffic from that SID: New-NetFirewallRule -DisplayName "Test One" -Enabled True -Direction Outbound -Action Block -LocalUser "D:(A;;CC;;;S-1-5-80-1014140700-3308905587-3330345912-272242898-93311788)" If you try to check for updates, it still works. The reason is that You can verify it like this, first get your SID:
Now put that SID into a New-NetFirewallRule -DisplayName "Test Two" -Enabled True -Direction Outbound -Action Block -LocalUser "D:(A;;CC;;;YOURSID)" Now windows update doesn't work.
Obviously, you can't realistically block or allow all the connections from your SID! 😆 The current solution used by @henrypp is to add a Here's that big list of update servers: https://github.com/henrypp/simplewall/blob/master/bin/blocklist.xml#L566 And here's where those rules get applied: Line 935 in 6bd53e2
The workaround I'm suggesting is to use a I just wanted to check if @henrypp had considered it 😄 |
Here is proof the problem is Impersonation:
|
This makes sense, and I think your solution is rather elegant. Not sure it's completely within the scope of simplewall, though: I'm leaning towards 'yes', but the fact that it requires a hack makes me think that people who want to block Windows Updates might as well go for something like https://www.sordum.org/9470/windows-update-blocker-v1-5/ so that the block isn't on the network level anymore. |
I stumbled upon this github issue today when I was looking for some details on similar solution myself. Someone said here:
Which I found very odd. Extensive googling did not bring any results as well. Anyway, I tested both copying and hardlink methods and both work perfectly. Hardlink initially requires ownership but then you can return it back. Since it is a hl, all updates are propagated back to it when original changes. This is probably the best solution. For the simplefirewall needs if you need more elegant and maintainable solution that uses this method - you can optimize it if you create just one hardlink for
I was wondering if targeting SID works if you change service's
If you set "Block All" mode in Windows Firewall for all domains you can block all traffic, provided you clean up default |
That would be me 😄 The original thread seems to be locked, so I cannot reply there. Yes, my phrasing is a little poor. Let me demonstrate what I mean. First of all,
Now, let's replicate that setup:
Now, let me create the proposed
All good, right? Now,
Did you notice what happened, because the whole
<edit>Let me try to rephrase the comment better: Sure you can have multiple hardlinks, which are essentially the same file, but you cannot have a
Interesting! I always thought it was because of thread pools and missing service tags for thread-pools. |
On Win10 20H*+ I've noticed that hardlink without some weird issues and side-effects in system32 is no longer possible so I delegated basic copying and version check to a simple service (or script, whatever you prefer) which will keep it up to date. Either way, make no mistake here, it is not some error or a bug (that went unaddressed for 10 years, eh?) it is pretty clear Micro$oft in their blind greed for private user data purposefully gimped WFP/BFE in favor of their telemetry bullshit loopholes, which is baffling to me, because it throws security under the rug. Quite pathetic. |
Can't we just allow After running updates verification under Windows Settings, I got: As you can see, Is there any problem doing it this way? I don't understand why we'd need lots of "Microsoft update servers" (that are shown under the Blocklists tab) to allow updates, or even creating a separated process for wuauserv like it was suggested in this thread. We probably don't even need the DNS and mDNS System Rules (and lots of other system rules), because we could just allow some services under the Services tab, like @taviso, @Kein, @ljani, @henrypp I'm sorry to bother, but could you please take a look? I'm a simple user with no network experience, it seems you're more capable to look at this. |
Hey, I can confirm the observation by @ThiagoRangel7 that On a fresh Windows 20H2 install, I first configured rules to permit all traffic using After applying KB4023057, KB4577586, KB4601554, and KB5001330, I turned off the rule for That first update is called "Update for Windows 10 Update Service components," so that would be my first guess? |
I wonder if that is a |
No it does not you just allow svchost blankly. It's been broken for ~7 years and suddenly out of nowhere fixed, haha? |
@ThiagoRangel7 I'm sorry, but would you mind explaining this a bit more for rookies like me? I tried simply enabling Thanks a lot! Update:I did the following and it worked: In the 'Apps' section, instead of blindly allowing all One last question, if you don't mind: how are you able to see the 'Allowed' state for connections listed in the Packets Log? Mine only shows the 'Blocked' ones And for future readers, it goes without saying that I have under 'Blocklist' in the top menu, 'Microsoft Update Servers' set to 'Allow', and I'm also allowing the |
Again, let me repeat - this was not fixed and probably never will be fixed in this iteration of Windows. May be in the next one too. Use the workaround if you need automatic updates. |
Thank you, Kein! But just to be clear, my solution seems to be working, I can download and install updates like that, and as far as I can see Simplewall seems to be blocking svchost.exe for everything else (at least I get a bunch of blocked svchost.exe entries in the packets log). It also seems to work as intended, I think I'm using Simplewall correctly. Am I missing something here as to why this shouldn't work? |
@dbaiser Post your user rule as a screenshot or its XML line(s) in |
@ltguillaume These are the rules:
I don't think I understood the 2nd part of your comment, how do I check for that log? If I enable these 2 rules, I still get in the Packets log entries telling me svchost is being blocked and the filter for these blocks is "Internal/BlockConnection" Outbound But I think I see what you're saying. I'm using it wrong. By checking in the "Apps" tab of the rule the boxes for wauserv and svchost, what I'm actually doing is allowing both svchost and wuauserv for anything, when what I actually wanted was to allow svchost to only be used by wuauserv |
Yes, I meant the packets log and that filter rule, so now I'm a bit confused about the blocked connections in the log. I'd say those should only occur if you haven't checked As for the last part of your comment, yes, that is what I meant. |
You need to allow Delivery Optimization service as well. |
Someone had success in trying windows updates without allowing svchost after [v.3.6.7] update? Changelog says it has windows update service solution, but I still can't manage to get it working. Allowed Delivery Optimization service and bunch of other services excluding svchost, tried with and without hardlink... |
Is my question similar to this? win10 21H2 x64 |
@random29 @wy16W2pIilK1xgqN |
I'm sure I did. Sorry, I'm a Chinese and don't know English. You can ignore my question. |
Thanks for your answer, I tried it, but sadly this changes nothing, still stuck at 0% forever. |
Awesome - this is the fix. It shows in the dropdown menu under Settings > Rules but not in the Settings dialog: a small bug perhaps? |
@random29 Please try again with this setting. It worked fine on Windows 11 22H2 version |
Tried same settings. Sadly, but for me on Windows 10 21H2 everything still stuck at 0%, idk what's wrong. |
Its a issue Microsoft has to fix. Found this when googling his exact same issue, 'Microsoft Account Sign-in Assistant' service seems to be in the same boat. |
I was wondering if you were aware of the following solution to the firewall being unable to identify the windows update service:
svchost.exe
, called e.g.wusvc.exe
ImagePath
inHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv
to usewusvc.exe
sc stop wuauserv
thensc start wuauserv
Now you can whitelist
wusvc.exe
. This seems like it might be a better solution than having to maintain a list of IP ranges, and could be implemented in code easily.Just wanted to make sure you knew about this.
The text was updated successfully, but these errors were encountered: