The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘Windows’ Category

Notes and links on proxytunnel, sslh, apache, stunnel, putty, ssh and more

Posted by jpluimers on 2016/12/12

This is based on lots of help from Rui Seabra with a G+ remark I made a while ago: “So what would be a proper way to setup an SSH connection over HTTPS given that the proxy in between is CNTLM providing credentials to an NTLM authenticating proxy that does HTTPS man-in-the-moddle? Clients are Linux or Windows with admin access. On the outside Linux with admin access as well.
This is also becoming more and more relevant with “free” WiFi providers only allowing HTTP/HTTPS and playing HTTPS Man-in-the-Middle.”

So the situation is something like this:

  • client ssh client
  • stunnel client
  • man-in-the-middle HTTP/HTTPS proxy only allowing outgoing traffic on ports 80/443
  • server: sslh
    • server apache daemon
    • stunnel daemon
    • server ssh daemon

Some links:

–jeroen

Posted in Cntlm, Power User, Windows, Windows-Http-Proxy | Leave a Comment »

Cleaning up C drive space temporary internet files after upgrading to IE10 or IE11 – via AsiaTech Microsoft APGC Internet Developer Support Team

Posted by jpluimers on 2016/12/09

You’d think Temporary Internet Files from Internet Explorer will be in that directory, right?

After upgrading to Internet Explorer 10 or 11 that is not true any more.

I got the below batch file to cleanup the WebCache directory via C drive space is using up on terminal server after upgrading to IE10 or IE11 – AsiaTech: Microsoft APGC Internet Developer Support Team


echo OFF
net stop COMSysApp
taskkill /F /IM dllhost.exe
taskkill /F /IM taskhost.exe
taskkill /F /IM taskhostex.exe
del /Q %LocalAppData%\Microsoft\Windows\WebCache\*.*
net start COMSysApp
echo ON

–jeroen

Posted in Internet Explorer, Power User, Web Browsers, Windows | 1 Comment »

ARM-Based Windows 10 Portable PCs!? Hell Yes! – Thurrott.com

Posted by jpluimers on 2016/12/08

Windows 10 on ARM will supply a long-rumored feature: The ability to run 32-bit Win32/x86 desktop applications—Apple iTunes, Adobe Photoshop, Google Chrome, whatever—directly on the system, unchanged.

Wow, just wow.

[WayBackARM-Based Windows 10 Portable PCs!? Hell Yes! – Thurrott.com

Via:

Posted in ARM, Assembly Language, Development, Power User, Windows, Windows 10 | Leave a Comment »

Copy-Paste from Website to Terminal – always paste via an intermediate text editor

Posted by jpluimers on 2016/11/22

Everybody surely knows about more and more software trying to smart replace straight double quotes " with opening ” and closing ” ones.

WordPress is no exception and when you forget to embed these quotes in code and/or pre tags, your source code won’t paste as such.

For terminal code (nx or Windows console doesn’t matter much): it’s much worse: you should not copy/paste code directly to the terminal.

I usually did this any way to get quotes corrected, but  – via Daniela Osterhagen referring Dorin Duminica – recently came across a reason that’s much more important:

What’s on the clipboard might not be what you saw on the web site.

An elaborate example is at User iteraction based exploitation: WYSINWYC (What you see is not what you copy) but it comes down to:

  1. The clipboard is getting all text from a selection
  2. The browser hides some part of that text by cleverly using one more more  style tags.

So basically copy/pasting to the console is just as risky as piping curl through bash or another shell. You can actually detect that server-side (and abuse it)!

–jeroen

Source: Copy-Paste from Website to Terminal

Posted in Console (command prompt window), Development, Power User, Scripting, Software Development, Windows | Leave a Comment »

Only the KB2267602 updates (all others are fine) failing on Windows 8.1 with error 8007051A?

Posted by jpluimers on 2016/10/27

On a Windows 8.1 system, I’m having trouble installing KB2267602 [Definition Update for Windows Defender – KB2267602 (Definition 1.231.456.0)] as it throws error 8007051A each time even after reboots, shutdowns, re-tries and using different ISPs.

https://www.google.com/search?q=8007051A+KB2267602 didn’t get me any further.

On other Windows 8.1 systems this went fine (this one has Visual Studio 2015 installed) as were the Windows 7 installs of KB2310138 [Definition Update for Microsoft Security Essentials – KB2310138 (Definition 1.231.456.0)].

I’ve not tried manual downloads from https://www.microsoft.com/security/portal/definitions/adl.aspx [WayBack] yet: anyone tried that before?

–jeroen _ _ _

Posted in LifeHacker, Power User, Windows, Windows 8.1 | Leave a Comment »

permissions – recursively change owner windows 7 – Super User

Posted by jpluimers on 2016/10/27

Slightly updated the answer the /D Y part will recursively accept taking ownership when directory listing is denied in the permissions:

To fix really broken permissions, the best is to run these two commands one after the other:

takeown /F /D Y "C:\path\to\folder" /R
icacls "C:\path\to\folder" /reset /T

The first one will give you ownership of all the files, however that might not be enough, for example if all the files have the read/write/exec permissions set to “deny”. You own the files but still cannot do anything with them.

In that case, run the second command, which will fix the broken permissions.

via: permissions – recursively change owner windows 7 – Super User

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Development, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP | Leave a Comment »

display – How can I move spaces between external monitors in Mavericks? – Ask Different

Posted by jpluimers on 2016/10/21

display – How can I move spaces between external monitors in Mavericks? – Ask Different [WayBack]

You can only move spaces which are non-active.

For example, lets say you have spaces 1 and 2. If space 1 is active, you can not move it. You first have to select space 2 then you can move space 1 to a different monitor.

This helped me work around version 8.35 of Microsoft Remote Desktop for OS X breaks second monitor usage [WayBack]:

  1. Double click a connection so it goes to a new space on the primary display
  2. Make the normal space active (by three finger swiping on the primary display)
  3. Go to mission control
  4. Move the non-active RDP space to the secondary monitor

Sometimes the primary monitor doesn’t have a non-active space any more so you have to create a new one in the top right of Mission Control [WayBack].

–jeroen

Posted in Apple, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Pro, OS X 10.9 Mavericks, Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Windows | Leave a Comment »

FileZilla on Windows is waaaay faster than WinSCP

Posted by jpluimers on 2016/10/21

Not sure why yet, but on a gigabit network between a Windows 2008 R2 Server and a Proxmox KVM machine, WinSCP gets around 10 megabit/second and FileZilla > 30 megabit/second.

Others seem to agree that filezilla faster than winscp.

–jeroen

Posted in Communications Development, Development, Internet protocol suite, Power User, Proxmox, SSH, TCP, Virtualization, VMware, Windows, Windows Server 2008, Windows Server 2008 R2 | 1 Comment »

When a PC lost its trust relationship with a domain controller: “The trust relationship between this workstation and the primary domain failed”

Posted by jpluimers on 2016/10/17

(Don’t ask for details; at a site with Microsoft Data Protection Manager an external company monitoring that DPM didn’t notice various backups – including the domain controller – were months old despite daily tape changes; so then the RAID fell out because multiple disks failed within hours, contingency aftermath took weeks)

When you logon to a client machine and get “The trust relationship between this workstation and the primary domain failed”

  1. do not rejoin your client machine to the domain
  2. ensure on the client machine:
    1. you can logon without a domain account (part of any contingency plan should be logging in with a local account or without a domain controller if you have the – potential risky – cached domain logon enabled, otherwise you’ve to do more nasty measures)
    2. you have PowerShell v3 or later on the client machine
  3. on the client machine
    1. Ensure it’s connected to the same network as the domain controller
    2. Ensure you can ping the domain controller
    3. Test with Powershell Test-ComputerSecureChannel to see if the connection is indeed lost:
      1. if it returns True then you have a different problem (have not seen this, but just in case: this blog post won’t solve that)
      2. if it returns False, then continue with the next step
    4. Run Powershell Test-ComputerSecureChannel -Repair and check if the output is True (when False there )

Note there are various posts suggesting to use Powershell Reset-ComputerMachinePassword and netdom.exe resetpwd /s:dc-hostname.domain /ud:domainadminusername /pd:*. Though faster than rejoining the domain, the Powershell Test-ComputerSecureChannel is even faster and easier.

–jeroen

via:

Posted in Power User, Windows | Leave a Comment »

Yet another refresh of KB3172605 to (again) fix Windows 7 SP1 Windows Update stuck checking for updates – via Super User

Posted by jpluimers on 2016/10/10

Checking for Updates until the first of never...

Checking for Updates until the first of never…

I already re-installed a few of the VMs from scratch (re-licensing and such) but to no avail.

So I’m wondering: does Microsoft hate Windows 7 users this much?

Microsoft keeps refreshing KB3172605 (July 2016 update rollup for Windows 7 SP1 and Windows Server 2008 R2 SP1).

I’ve seen at least 3 different versions that I needed in the same number of occasions of updating Windows 7 x64 VMs that usually are off-line (I use them every few weeks to do some testing).

Each and every time the situation is the same:

  1. Windows Update will be stuck in “Checking for Updates” for hours (even overnight)
  2. When stuck, Windows Update still uses 1 CPU core at 100%
  3. Warm reboot won’t help
  4. Shutdown and cold boot won’t help

The only thing that consistently solves this is reliably:

  1. Reboot and logon
  2. Stop Windows Update service (wuauserv in Task Manager)
  3. Wait until CPU usage drops
  4. Install the latest Windows Update client
    1. currently this is KB3172605 which – though named July 2016 – has been refreshed quite a few times as late as September 2016
    2. older versions (including KB3102810KB3138612 and KB3161647) are described at Windows 7 SP1 Windows Update stuck checking for updates – Super User
    3. the installation of the .MSU file with the Windows Update client usually seems to “hang” on "checking for installed updates" for like 30 minutes, but if you forget to stop the Windows Update service, the .MSU install will be stuck on "checking for installed updates" forever
  5. Reboot
  6. Try Windows Update again and wait for at least 30 minutes

You need to re-apply to a more recent Windows Update client each and every time this happens taking a few hours of your time.

Windows 8

After a fresh boot, I tried https://download.microsoft.com/download/A/A/8/AA842D3A-D5B0-4307-89F1-3485D88A1853/Windows8-RT-KB2937636-x64.msu via How to update the Windows Update Agent to the latest version but it shows [WayBack] “The update is not applicable to your computer

–jeroen

via: Windows 7 SP1 Windows Update stuck checking for updates – Super User [WayBack]

See also:

 

Posted in Power User, Windows, Windows 7 | 1 Comment »