builtbybel / privatezilla

👀👮🐢🔥Performs a privacy & security check of Windows 10
https://www.builtbybel.com/apps/privatezilla
MIT License
3.52k stars 164 forks source link

v0.12.3_x64/x86: 'Analyze' crashing/hanging on 'Do not show feedback notifications'. #6

Closed chivracq closed 3 years ago

chivracq commented 4 years ago

FCI: Win10_Pro_Eng v1909 #18363.836 + Spydish v0.12.3 (_x64 + _x86)

=> Both _x64/x86 Versions crashing/hanging if 'Do not show feedback notifications' is selected with:

Unhandled exception... [...]
Specified cast is not valid.

Grr...!!, 'GitHub' Editor buggy in my Browser (PM v26.3.3), 'Code'/'Quote' Formatting not working...! EDIT: Seems to work "a bit better" in FF v55.0.3, at least Formatting is working...

Details from _x64:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: Specified cast is not valid.
   at Spydish.RegistryHelper.IntEquals(String keyName, String valueName, Int32 expectedValue)
   at Spydish.Policy.Privacy.DisableFeedback.CheckPolicy()
   at Spydish.MainWindow.<>c__DisplayClass26_0.<BtnCheckGPO_Click>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Spydish.MainWindow.<BtnCheckGPO_Click>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Spydish
    Assembly Version: 0.12.3.0
    Win32 Version: 0.12.3.0
    CodeBase: file:///C:/Users/JFC/Downloads/Security/SpyDish/spydish_x64/Spydish.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4150.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Belim commented 4 years ago

It looks like a false Datatype in Registry. Spydish is expecting the following two Datatypes

- PeriodInNanoSeconds
- NumberOfSIUFInPeriod 

under HKEY_CURRENT_USER\Software\Microsoft\Siuf\Rules declared as DWORD and NOT String

Are you using any other Privacy tools? Deleting these Strings will fix the problem.

chivracq commented 4 years ago

Alright, using now a different Browser (FF v55.0.3) that seems to be able to handle this buggy and poorly Designed & Tested Site, probably meant for SmartPhones, I guess, grrr...!

OK, Thanks @Belim for your Reply, you are the Developer (I think...?), at least E-mail Notifs are working, ah-ah...!

<>

I checked my Registry, and I only have "your" 1st Entry, defined as 'QWORD', and not as 'DWORD', oops...!: PeriodInNanoSeconds - REG_QWORD - 0x05f5e100 (100000000) (+ '(Default)' = "(value not set)")

OK, you don't/didn't mention where those 2 Entries come from, but apparently from 'Settings' / 'Privacy' / 'Diagnostics & feedback', and at least the 'PeriodInNanoSeconds' comes from the 'Feedback frequency' => "Windows should ask for my feedback", and my "0x05f5e100 (100000000)" Value corresponds to "Always".

Some "New" Entry strangely appeared in the DDLB in 'Settings', => "Automatically (Recommended)", if I select it, then the Entry gets deleted in the Registry, and if I select "Always" again, then a new Entry gets recreated, and again as 'QWORD' Entry, and not as 'DWORD', so I guess you are not going "to fight" against MS and 'Windows Settings' if they want to create that Entry as a 'QWORD' and not as a 'DWORD', ah-ah...!

But hum, if I select "Once a day", then 'NumberOfSIUFInPeriod' does get indeed also created/added in the Registry, with Value = "(1)", and the Type for that one is indeed 'DWORD'. (Same for "Once a week" and "Never".)

Then hum, would be "handy" if a Right Click in your Tool on an Entry/Setting in the Left Column (not Resizable btw, a bit annoying) could yield 2 Context-Menu Entries like:

- Go to Setting in Control Panel
- Go to Key in Registry

Same also from the Right Column after getting the Results from 'Analyze'.

And "Configured" / "Not configured" is a bit "vague" as Result/Info... For each Item, you could display the existing Content from 'Settings' and the corresponding Entries (with their Values) from the Registry.

<>

Deleting these Strings will fix the problem.

=> Yeah well, ah-ah...! Hum..., your Tool should be a bit more "Fault Resilient" and shouldn't crash if it encounters a DataType that is different than the one it finds in the Registry, be you "right", or be MS ('Settings') right, that could also happen after every Windows Update. 'Analyze' shouldn't crash and could return some "Misconfigured" or "Unknown Status" or "Undefined" etc..., with its corresponding Section displaying what "it found" (and maybe what it expected).

<>

Are you using any other Privacy tools?

Euh-hum, not sure what you call "Privacy Tools"... 1- I do tweak from time to time my Registry, usually manually... (to know what I'm doing, ah-ah...!), but I also use some mini-'.reg' Import Files, and PowerShell Scripts... But hum, I didn't know this "SIUF" Key, so I never "touched" it in the Registry.

2- Yep, I review regularly all Privacy Settings in the Control Panel 'Settings' App, as they often get modified/reverted after each Windows Update, and as I "demonstrated", that was apparently the place where I had modified that Setting.

3- Not sure if it qualifies as a "Privacy Tool", but I also regularly use 'AutoRuns64', mostly because of 'Google Chrome' (that I consider "Malware", oops...!) after each CR Update, but also against all MS "Tricks" after each Windows Update, and both for Google/CR and MS/WinUpdate re-enabling/reinstalling a lot of Bloatware/Spyware and Background Services after each Update..., that I then need to re-kill again... But I don't think that 'AutoRuns64' will change the DataType of an Entry in the Registry, ah-ah...! That would be pretty cumbersome... (Need to delete and recreate the Entry, I think...) Well, and about CR, I am a TechMod on a Tech Forum (about Web-Automation) and many Users use this Browser, so I need to "run" it a bit from time to time, and to update it a bit also, ah-ah...!, when some User has a Pb that is CR-specific... (But I usually skip about 4 Versions each time...)

<>

Mini-Feedback/Advice about your Tool: I love the Idea/Concept..., but hum..., don't try to "take over", I would say, leave us "in Control", by showing us all Places (in 'Settings' + 'Registry') where your Tool is able to access and modify some Entry/Setting, and what our current Setting/Status is, letting us still modify "it" or one individual Setting from 'Settings'. The "beautiful Power" of your Tool is to have just one Centralized Place where all those (Privacy) Settings can be accessed, and easily disabled/(re-)enabled in Bulk...

Hum, and maybe you could add a Section about 'Google-Chrome' Privacy Settings, ah-ah...! But hum, 'Edge' + 'ChrEdge' + even 'FF' are not "much-much" better either...

Belim commented 4 years ago

Thanks for the awesome feedback :heart_eyes: You really took Spydish apart 😮😅

I will certainly attack some of your recommendations. Many things are on the list, the app is also just out and celebrating its two-week anniversary.

'Analyze' shouldn't crash and could return some "Misconfigured" or "Unknown Status" or "Undefined" etc..., with its corresponding Section displaying what "it found" (and maybe what it expected).

Absolutely right here :ok_hand: Must be fixed!

This one is difficult to support,

And "Configured" / "Not configured" is a bit "vague" as Result/Info... For each Item, you could display the existing Content from 'Settings' and the corresponding Entries (with their Values) from the Registry.

The normal user is not interested in this. He just wants to see if everything is green or not. That's how my old app Debotnet did it. It was very results-oriented and you could track every setting. SharpApp one of my other apps does the same. The scripts tell you exactly where what is changed, but only every 5 people look at the code and every 10th person understands it. That is also the reason why I made Spydish public. I have used it myself for internal purposes only and for a quick check of clients' systems. Spydish also supports advanced features. You might want to check out the community package