10se1ucgo / DisableWinTracking

Uses some known methods that attempt to minimize tracking in Windows 10
GNU Lesser General Public License v3.0
4.97k stars 368 forks source link

IP's/Domains are not added to hosts file - error log attached #67

Closed th3r3isnospoon closed 9 years ago

th3r3isnospoon commented 9 years ago

Hello, the last rev prior to the latest release would work correctly (as in edit the host file) however the newer version does not. This is a win 10 64-BIT machine. Thanks for working on a cool tool :) Here are the errors:

23:46:44 ERROR: Registry: Unable to modify Service dmwappushsvc key.
Traceback (most recent call last):
  File "<string>", line 474, in modifyregistry
WindowsError: [Error 2] The system cannot find the file specified

23:46:44 ERROR: Registry: Unable to modify Service DiagTrack key.
Traceback (most recent call last):
  File "<string>", line 474, in modifyregistry
WindowsError: [Error 2] The system cannot find the file specified

23:46:44 ERROR: Services: dmwappushsvc unable to be stopped.
Traceback (most recent call last):
  File "<string>", line 358, in disableservice
  File "disablewintracking\win32serviceutil", line 409, in StopService
  File "disablewintracking\win32serviceutil", line 318, in ControlService
  File "disablewintracking\win32serviceutil", line 80, in SmartOpenService
error: (1060, 'GetServiceKeyName', 'The specified service does not exist as an installed service.')

23:46:44 ERROR: Services: Diagnostics Tracking Service unable to be stopped.
Traceback (most recent call last):
  File "<string>", line 358, in disableservice
  File "disablewintracking\win32serviceutil", line 409, in StopService
  File "disablewintracking\win32serviceutil", line 318, in ControlService
  File "disablewintracking\win32serviceutil", line 80, in SmartOpenService
error: (1060, 'GetServiceKeyName', 'The specified service does not exist as an installed service.')

23:46:44 ERROR: Services: Diagnostics Tracking Service unable to be stopped.
Traceback (most recent call last):
  File "<string>", line 358, in disableservice
  File "disablewintracking\win32serviceutil", line 409, in StopService
  File "disablewintracking\win32serviceutil", line 318, in ControlService
  File "disablewintracking\win32serviceutil", line 80, in SmartOpenService
error: (1060, 'GetServiceKeyName', 'The specified service does not exist as an installed service.')

23:46:44 ERROR: DiagTrack Log: Unable to clear/lock
Traceback (most recent call last):
  File "<string>", line 339, in cleardiagtracklog
IOError: [Errno 13] Permission denied: 'C:\\ProgramData\\Microsoft\\Diagnosis\\ETLLogs\\AutoLogger\\AutoLogger-Diagtrack-Listener.etl'
10se1ucgo commented 9 years ago

Not near a computer but I will try to fix it tomorrow morning.

DeeJayhX commented 9 years ago

Ran into same issue with WD/WFS registry keys and onedrive filesync, also not available for troubleshooting at the moment.

10se1ucgo commented 9 years ago

Hmm, I'm not seeming to have this issue. Can anyone else try? Gonna put a cannot reproduce tag for now.

DeeJayhX commented 9 years ago

@th3r3isnospoon Are you running a cracked (non-paid) version of Windows 10? We're not microsoft, we don't care what you do, but it's an important question because tracking related services might already be disabled in those for obvious reasons...

th3r3isnospoon commented 9 years ago

@Ruined1 No sir. It is a legitimate copy of Windows 10. I was thinking about the errors though. Would those errors pop up if I had run a previous version of this program? I did run the old version and press revert, then I ran the newer version of this program and those are the errors that came back. The latest rev would not add the IP's/Domain's into the hosts file, but the older version prior to this release worked. I double checked and when I run the older version with elevated privileges it successfully edits the host file.

DeeJayhX commented 9 years ago

These two lines are correct, as you probably deleted the services with a previous revision, so they don't exist to modify:

23:46:44 ERROR: Services: Diagnostics Tracking Service unable to be stopped.
Traceback (most recent call last):
  File "<string>", line 358, in disableservice
  File "disablewintracking\win32serviceutil", line 409, in StopService
  File "disablewintracking\win32serviceutil", line 318, in ControlService
  File "disablewintracking\win32serviceutil", line 80, in SmartOpenService
error: (1060, 'GetServiceKeyName', 'The specified service does not exist as an installed service.')

23:46:44 ERROR: Services: Diagnostics Tracking Service unable to be stopped.
Traceback (most recent call last):
  File "<string>", line 358, in disableservice
  File "disablewintracking\win32serviceutil", line 409, in StopService
  File "disablewintracking\win32serviceutil", line 318, in ControlService
  File "disablewintracking\win32serviceutil", line 80, in SmartOpenService
error: (1060, 'GetServiceKeyName', 'The specified service does not exist as an installed service.')

I'm looking into the rest.

th3r3isnospoon commented 9 years ago

@Ruined1 That would make sense, I did delete them with the previous revision. I will try this on another machine sometime today and report back. Thanks!

10se1ucgo commented 9 years ago

@Ruined1 all of these error messages make sense. Except for the registry key error, I'll look into that later. As for the DiagTrack log, it makes sense because Python can't access the logger once it's cleared and locked because system has access denied to it, only the user himself can modify it.

DeeJayhX commented 9 years ago

EDIT: THIS COMMENT WAS BASED ON COMMIT https://github.com/10se1ucgo/DisableWinTracking/commit/e7afd5c3d60575b69cd455d9db82e9e6f20887c6

Will be uploading results from latest commit...

@10se1ucgo

I Ran the latest commit, with all checks and DISABLE services, on a test machine with a brand new 64-bit Windows 10 clean install.

I hope this is useful to you, as I can now easy provide it in the future from a clean install every time.

Console Output:

Log

(Ignore the Path/Filename.. Assume it is run.py)

DeeJayhX commented 9 years ago

Latest test on clean install 64-bit Win 10 shows aces:

Marking fixed and closing.

th3r3isnospoon commented 9 years ago

Awesome thanks @10se1ucgo @Ruined1 !

10se1ucgo commented 9 years ago
File "E:\CUSTOM~2\DISABL~1\DisableWinTracking-WIP.py", line 376, in modifytelemetryregs modifyregistry(regdict=telemetrydict, bit=32) Why are we calling 32bit on a 64bit system?

Because the Telemetry registry things isn't a 64 bit regkey AFAIK. I'll look into this further.

skibbipl commented 9 years ago

I'm also having issues with latest version. After running it my hosts files and firewall rules were deleted. And there are no errors in the log. However the old version has following enitries in the log: Domains successfully appended to HOSTS file. IPs succesfully blocked. The new version does not display any of those.

10se1ucgo commented 9 years ago

The new version did not change anything in regards to IP blocking, so it's def not a problem from the update.

something

skibbipl commented 9 years ago

Old version updates hosts file and firewall rules - new doesn't. There is def a problem somewhere. Unfortunately new version does not log anything suspicious.

10se1ucgo commented 9 years ago

The new version does log things EVEN BETTER for devs. DisableWinTracking.log.

Also, I just showed to you that it works for me. Something is up on your side. Mind giving a bit more information, e.g. Windows version, 64-bit/32-bit, Windows edition?

10se1ucgo commented 9 years ago

@skibbipl try this https://github.com/10se1ucgo/DisableWinTracking/releases/tag/v2.4.1

skibbipl commented 9 years ago

I use 64-bit polish windows. But I think I found the problem. If I select Telemetry + Block tracking domains hosts file is nulled. If I select only block... it works fine. Firewall rules are created correctly.

10se1ucgo commented 9 years ago

Really? That's odd. I'll look into this. Going to re-open for now.

DeeJayhX commented 9 years ago

Here's my test, making sure the compiled EXE is the same as the source code I'm running.

Both OS's were installed from the same media.

There is something very strange going on here, and I don't like it...

Maybe I'm too tired to see something obvious...

10se1ucgo commented 9 years ago

I may have been able to fix it with the latest commit, we'll see.

10se1ucgo commented 9 years ago

@Ruined1 It works!!!

Services: dmwappushsvc key successfully modified.
Services: DiagTrack key successfully modified.
Services: dmwappushsvc unable to be stopped.
Services: Diagnostics Tracking Service unable to be stopped.
Services: Diagnostics Tracking Service unable to be stopped.
DiagTrack Log: Succesfully cleared and locked.
Telemetry: AllowTelemetry key successfully modified.
Domain block: Domains succesfully appended.
Extra domain block: Domains succesfully appended.
IP Blocking: Succesfully blocked.
WifiSense/Defender: Unable to modify Windows Defender Spynet key.
WifiSense/Defender: Unable to modify Windows Defender Sample Submission key.
WifiSense/Defender: WifiSense Open-ness key successfully modified.
WifiSense/Defender: WifiSense Credential Share key successfully modified.
WifiSense/Defender: Windows Defender Delivery Optimization Download key successfully modified.
OneDrive: : ListPin key successfully modified.
OneDrive: : FileSync key successfully modified.
OneDrive: Succesfully uninstalled.
Done. It's recommended that you reboot as soon as possible for the full effect.
If any errors were found, please make a GitHub ticket with the contents of DisableWinTracking.log
DeeJayhX commented 9 years ago

@10se1ucgo Eureka! I'm going to check this on a test bench with a clean install and manually check all the keys/settings/etc to make sure, but I think it's good!